python - 在没有 OAuth 同意屏幕的情况下尝试授权 AWS Lambda 进行 Google Calendar API 调用

标签 python amazon-web-services oauth-2.0 google-calendar-api

我正在编写一个 Alexa 技能,它将使用 Google Calendar API 根据我的 Google Calendar 的内容给我一个自定义响应。我基本上完成了,除了一个绊脚石。当我尝试从 AWS Lambda 调用 API 时,出现以下错误:

Your browser has been opened to visit:

https://accounts.google.com/o/oauth2/auth?client_id=235499230491-5nkukk98kfnt16fvtmm2acrgq4r4ucr2.apps.googleusercontent.com&redirect_uri=http%3A%2F%2Flocalhost%3A8080%2F&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcalendar.readonly&access_type=offline&response_type=code

If your browser is on a different machine then exit and re-run this application with the command-line parameter

--noauth_local_webserver

我想知道是否可以通过任何方式验证此 AWS 实例以接受我的 Google Calendar API。有什么想法吗,StackOverflow?

最佳答案

您需要使用 Google 服务帐户。

这些用于服务器到服务器的应用程序。

https://developers.google.com/identity/protocols/OAuth2ServiceAccount

关于python - 在没有 OAuth 同意屏幕的情况下尝试授权 AWS Lambda 进行 Google Calendar API 调用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45490206/

相关文章:

amazon-web-services - Spring Boot - 不同的系统(eureka、zuul、ribbon、nginx)用于什么?

python - Windows 的 Python 3.x 信号库是否不完整?

python - 如何在 python 中绘制 3D 数据的核密度估计 (KDE) 和零交叉?

amazon-web-services - 什么是 AWS 中的低延迟事件溯源服务?

amazon-web-services - 亚马逊 emr : best compression/fileformat

spring - 在 Spring OAuth2 中,为什么即使我在资源服务器中标记了我的资源,它仍然不 protected ?

django - 如何使用 OAuth2 创建用户?

php - 使用 HybridAuth 时了解 base_url 参数

python - 根据符号将 numpy 数组分解为子数组

python - 如何创建相关字段?