I accidentally deleted the OAuth credential used in my Google Apps Script Addon. Now I see a deleted_client error when I try to test and authorize my addon.
is there any way to fix this?
I don't see a way to create a new Credential, or a way to specify which credential my Add-On should use.
CodePudding user response:
The first thing that you should do is to review that the Cloud Project linked to your add-on still exists. If it was recently deleted you should be able to recover it. See https://cloud.google.com/resource-manager/docs/creating-managing-projects#restoring_a_project for the official instructions.
If you are not able to restore the Cloud project, you will have to create a new one.
The next thing will be to review the set / review the OAuth consent screen.
CodePudding user response:
Google Support helped me answer this:
- Create or get a different project's ID
- Go to the Script's Project Settings page
- Enter the new Project ID under the "Google Cloud Platform (GCP) Project" section and click "Change Project"
- Enter the original GCP Project ID and click "Change Project" again
- The automatically provisioned credential should now be recreated!
