I am trying to access a Google sheet using Google Sheets API. When I tried it locally, I was able to do it. When I tried the same from Google Sites by embedding the code, it gives me the following error.
{
"error": "idpiframe_initialization_failed",
"details": "Not a valid origin for the client: https://<dynamic-number>-atari-embeds.googleusercontent.com has not been whitelisted for client ID <client_id>. Please go to https://console.developers.google.com/ and whitelist this origin for your project's client ID."
}
As you can see from the error message, which I have edited to hide information, the origin of the embed is dynamic. So I can't update the whitelist on developer console.
Is there a way to solve this somehow? Thanks in advance