I'm trying to access an Apps Script I have created, via Python using a service account that I have which is linked to my GCP project.
I've created an API executable deployment, and set the project number to the correct one, I've also made it public for every Google user and shared it with my service account's gmail.
YET, I still receive 404 when executing the query, does anyone happen to know what am I missing?
I'm also providing the following scopes:
['https://www.googleapis.com/auth/drive.readonly',
'https://www.googleapis.com/auth/script.external_request',
'https://www.googleapis.com/auth/spreadsheets',
'https://www.googleapis.com/auth/gmail.readonly']
execute GCP scripts().run using service account, if you are trying to request "Method: scripts.run" of Apps Script API using the service account, unfortunately, in the current stage, this cannot be achieved by the current specification of the Google side. Ref In this case, please use the access token from OAuth2. If you are required to achieve your goal using the service account, this post might be useful. Ref