While working on installing an Apps Script to a Google Sheet, one step in the instructions required me to add the script project’s redirect URI to the list of authorized OAuth URIs in the supporting GCP project. Despite being the owner of the project, GCP refused to save my update to the authorized redirect URIs list, presenting me instead with this super informative error message about not having permission to perform the action:
I scoured the internet for an answer and came up with nothing even close to helpful. At my wit’s end, I decided to give a shot to just creating credentials for a second web application within my GCP project, inputting the necessary redirect URI from my Apps Script project. Lo and behold, this worked and I was successfully able to complete my implementation of the aforementioned script.
The steps are straightforward, but if you do encounter an issue with saving an update to your list of authorized redirect URIs for a web application in GCP, here they are spelled out:
On the “Credentials” page for your GCP project, select Create credentials > OAuth client ID.
Fill out the form to create a new client ID, with “Web application” under Application type, some relevant name and the authorized redirect URI you need to use. Click Create and you will be given a client ID/client secret pair to use as needed.
I hope this post helps shorten your search for a solution if you ever encounter this permissions issue!