Authorization is required to perform that action after Google redirect
See original GitHub issueI’m trying to set up a standalone Apps Script to list and process files from Google Cloud Storage. In trying to following the example from the README, I am unable to get my script to complete the redirect portion of the OAuth2 flow.
I am able to successfully see the Google authorization screen and click the Allow button, but when my browser redirects to the script’s URL with the /usercallback?state=
path and query string, I see the following message.
Authorization is required to perform that action.
I’ve dug into the ScriptApp documentation (https://developers.google.com/apps-script/reference/script/script-app#newStateToken()) and actually just tried testing hitting the callback URL without going through an actual authorization from Google and I still see the same issue. It leads me to believe that there is something wrong with the permissions on the Apps Script despite the fact that I am the owner of the script and there’s a single sign-in active on my machine.
I’m curious as to whether this is specifically related to the library, or to my method of using a standalone Apps Script in general.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:6
- Comments:36
The Apps Script team pushed out a new build that they believe should resolve this issue. Let me know if you see otherwise.
I was able to successfully get the example to work!
For me, I had to explicitly set the oauthScopes property in the appsscript.json manifest file to the following:
Adding those explicitly allowed the redirect function to be called which successfully completed the OAuth authorization.