Reputation: 523
I'm developing an add on for the Google Sheets Add On Marketplace, and I'm somewhat stuck with the validation process that Google requires. They are asking me to re-do the screencapture of the process of authorizing the app for the first time, but since I already gave permission to my add on to run, I am unable to get the permission window to show up again.
Anyone know how can I force Google Sheets to ask for the Oauth permissions?
Thanks in advance
Upvotes: 3
Views: 684
Reputation: 31300
Authorization can be manually removed, or removed with code. Your users should also know how to remove authorization. You could provide a menu item, or button to users to remove authorization.
function removeAuthorization() {//This must be run from your add-on code
ScriptApp.invalidateAuth();
}
Make sure that you are not logged into multiple Google accounts.
You need to be logged into just the Google account that installed the add-on.
Go to Manage your Google account:
https://myaccount.google.com/
Go to the security check up
https://myaccount.google.com/security-checkup
Open third party access
Scroll down to the bottom, and click "Show Others"
Remove access for {{Name of your Add-on}}
At this point you've removed authorization to the add-on through your account.
If you have a Workspace account, or some other paid Google account, then you may get the error message:
Uninstall app for domain in admin console
You will need to go into the admin console and delete the app.
Now go back to the add-on and use it and you will be prompted to re-authorize.
Upvotes: 3