我正在构建一个 AWS Lambda 函数,该函数使用 Node.js 从 Google Calendar API 中提取信息。然后 Node 应用程序向第三方应用程序发送一个 html 响应。我基本上遵循google 的本指南,除了我将 html 发送到其他地方进行渲染。我一直遇到一个错误,Google 告诉我我没有将来自 Lambda 的 javascript 来源列入白名单。这是错误文本:
{error: "idpiframe_initialization_failed", details: ""Not a valid origin for the client: https://<Lambda URL>.execute-api.us-west-2.amazonaws.com has not been whitelisted for client ID <My_Google_API_Client_Id>.apps.googleusercontent.com. Please go to https://console.developers.google.com/ and whitelist this origin for your project's client ID."}
我已经进入 Google API 开发人员控制台并将该 URL 列入白名单,但我仍然收到该错误。这是一个屏幕截图。
我也试过将“us-west-2.amazonaws.com”列入白名单,但没有成功。谢谢!!
google-calendar-api google-api amazon-web-services node.js aws-lambda