I am trying to call the Google Sheets API via a Google Apps Script. As an example, I have followed the instructions provided here:
https://developers.google.com/sheets/api/quickstart/js
I have generated the client ID and API Key via my Google Cloud Platform project as suggested elsewhere.
Now, I have created a google apps script with two files, the Code.gs file and a file called index.html containing the code copied and pasted from the Google Sheets API Quickstart above (with my client ID and API inserted).
When testing deployment, I get the following error message:
{
"error": "idpiframe_initialization_failed",
"details": "Not a valid origin for the client: https://<some numbers>-script.googleusercontent.com has not been registered for client ID <MY_CLIENT_ID>. Please go to https://console.developers.google.com/ and register this origin for your project's client ID."
}
I have registered script.google.com as an origin for my project.
Am I doing something obviously wrong? How would I proceed from here to get past this error?