0

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']
2
  • 2
    Please add a minimal reproducible example Commented Jun 7 at 16:54
  • About 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 Commented Jun 8 at 0:13

1 Answer 1

0

Google Apps Script REST API doesn't support service accounts --ref. https://developers.google.com/apps-script/api/concepts

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.