Embed 使用';嵌入';:&引用;不是客户的有效来源”;错误

Embed 使用';嵌入';:&引用;不是客户的有效来源”;错误,embed,google-sheets-api,google-sites,Embed,Google Sheets Api,Google Sites,我正在尝试使用GoogleSheetsAPI访问GoogleSheet。当我在本地尝试时,我成功了。当我通过嵌入代码在谷歌网站上尝试同样的方法时,它给出了以下错误 { "error": "idpiframe_initialization_failed", "details": "Not a valid origin for the client: https://<dynamic-number>-atari-embeds.googleusercontent.com has n

我正在尝试使用GoogleSheetsAPI访问GoogleSheet。当我在本地尝试时,我成功了。当我通过嵌入代码在谷歌网站上尝试同样的方法时,它给出了以下错误

{
  "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."
}
{
“错误”:“idpiframe\u初始化\u失败”,
“详细信息”:“不是客户端的有效来源:https://-atari-embeds.googleusercontent.com 尚未将客户端ID列入白名单。请转到https://console.developers.google.com/ 并将此来源作为项目的客户端ID列入白名单。“
}
正如您可以从错误消息中看到的,我对其进行了编辑以隐藏信息,嵌入的来源是动态的。所以我不能在开发者控制台上更新白名单

有办法解决这个问题吗?
提前感谢

您是否已启动服务器? 如果您使用的是python3,请在放置index.html文件的同一目录中尝试此命令

python3 -m http.server 8000
用于蟒蛇2

python -m SimpleHTTPServer 8000
然后直接输入
如果您使用的是vscode,则无需使用LiveServer扩展。

代码是在Google站点中编写的,因此无需启动任何服务器。