I'm trying to make a standalone Google Apps Script to access an API through the OAuth2 library, found here: https://github.com/googlesamples/apps-script-oauth2
I have not been able to get any of the examples to work so far, but I think it's because I cannot register my application and set the OAuth redirect URI. This is my first attempt at using OAuth.
Here are the steps I've taken:
- Create a new standalone Google App Script
- Paste in the contents of Dropbox.gs (for this example)
- Add the OAuth2 library to my script (Resources > Libraries, and paste in the ID listed in the how-to)
- Go to the console (Resources > Cloud Platform project) and navigate to the APIs & Services > Credentials page
- Grab the Client ID and Client secret from that page and paste them into my script.
- Get the redirect URI from the script (by running logRedirectUri())
- Paste the redirect URI into the cloud platform console, and hit save.
I get the error shown at this link (which reads "You do not have permission to perform this action.
From what I've studied, I need this URI entered in order to make this script work. Why won't this save?


