【问题标题】:OAuth 2.0 Playground Error 403: access_deniedOAuth 2.0 游乐场错误 403:access_denied
【发布时间】:2021-04-06 10:10:36
【问题描述】:

我在尝试授权 API 时收到来自 OAuth 2.0 Playground 的授权错误。我已经多次检查应用程序的权限(因为我是所有者),我已经修复了安全问题(谷歌提问),尝试了多个浏览器和多个电子邮件帐户(在新项目下)。以下是错误信息:

Error 403: access_denied
The developer hasn’t given you access to this app. It’s currently being tested and it hasn’t been verified by Google. If you think you should have access, contact the developer (recipe.tracker.app@gmail.com).
Learn more
Request Details
access_type=offline
response_type=code
redirect_uri=https://developers.google.com/oauthplayground
prompt=consent
client_id=765247627523-mhvqb7sc2or6rittk8dp0ti7b1ba8eel.apps.googleusercontent.com
scope=https://mail.google.com

【问题讨论】:

  • Gmail API 不是您项目的一部分 (scope=mail.google.com)。您尝试访问哪些 API?
  • 不确定。我试图绕过当 gmail 不允许 nodemailer 向/从 gmail 帐户发送电子邮件时出现的错误。网上有视频和说明建议使用 XOAuth 2 以确保连接安全并更容易通过。而且我一直卡在 OAuth 2.0 Playground 部分....我认为它应该可以工作,因为前几天设置工作正常。我只是无法让应用程序工作,所以我决定今天不知道客户端 ID 和客户端密码运气。
  • 您的问题缺乏真实的细节。如果您的目标是通过 Gmail 发送电子邮件,请使用 Less Secure Appssupport.google.com/accounts/answer/6010255?hl=en

标签: node.js google-cloud-platform oauth nodemailer


【解决方案1】:

Daniyal dehleh's original answer that solved my problem

我的 OAuth 2.0 Playground 错误的解决方案:

  1. 转到您的开发者控制台。
  2. 转到 OAuth 同意屏幕。
  3. 转到+添加用户,待测用户。
  4. 为测试添加用户(如果没有它,甚至是所有者的电子邮件地址)

【讨论】:

    【解决方案2】:

    我遇到了同样的问题。

    我的解决方案是

    1. https://www.google.com/settings/security/lesssecureapps 启用不太安全的应用
    2. https://accounts.google.com/b/0/displayunlockcaptcha启用此功能
    3. 在应用程序处于开发模式时添加测试用户的电子邮件 enter image description here

    【讨论】:

      猜你喜欢
      • 2015-12-20
      • 1970-01-01
      • 1970-01-01
      • 2017-12-21
      • 1970-01-01
      • 2021-07-06
      • 2017-10-09
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多