gpt4 book ai didi

python - HTTPError 403(禁止),Django 和 python-social-auth 使用 OAuth2 连接到 Google

转载 作者:IT老高 更新时间:2023-10-28 21:32:44 26 4
gpt4 key购买 nike

使用 python-social-auth,我在接受来自 google 的访问后收到 403: Forbiden 错误消息

编辑:我最近(2017 年)遇到了同样的错误,但出现了一条新消息:401 Client Error: Unauthorized for url: https://accounts.google.com/o/oauth2/token

最佳答案

此答案已过时,因为 Google+ API 将于 2019 年 3 月 7 日弃用

您需要添加 Google+ API到 Google Developer Console 上启用的 API 列表(在 APIs 下)

注意:如果要查看真正的错误信息,请使用回溯查看response 变量(response.text)的内容。我为此使用 werkzeug (django-extensions + python manage.py runserver_plus)。

关于python - HTTPError 403(禁止),Django 和 python-social-auth 使用 OAuth2 连接到 Google,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24377506/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com