小编Ela*_*ayA的帖子

谷歌 Oauth2-redirect_uri_mismatch 400

你好,我正在尝试将 Google Sign In 集成到我的 python 脚本中,并且运行此错误:

\n

访问被阻止:此应用程序\xe2\x80\x99s请求无效

\n

您无法\xe2\x80\x99 登录,因为此应用发送了无效请求。您可以稍后再试,或者联系开发人员解决此问题。了解有关此错误的更多信息

\n

如果您是此应用程序的开发人员,请参阅错误详细信息

\n

错误 400:redirect_uri_mismatch

\n

我尝试运行的 python 脚本是来自 Google 来源的基本脚本:

\n
# import the required libraries\nfrom googleapiclient.discovery import build\nfrom google_auth_oauthlib.flow import InstalledAppFlow\nfrom google.auth.transport.requests import Request\nimport pickle\nimport os.path\nimport base64\nimport email\nfrom bs4 import BeautifulSoup\n\n# Define the SCOPES. If modifying it, delete the token.pickle file.\nSCOPES = ['https://www.googleapis.com/auth/gmail.readonly']\n\ndef getEmails():\n    # Variable creds will store the user access token.\n    # If no valid token found, we will create one.\n …
Run Code Online (Sandbox Code Playgroud)

python oauth-2.0 google-api-python-client gmail-api google-developers-console

4
推荐指数
1
解决办法
5503
查看次数