我一直在与Google API合作。有时我的刷新令牌刷新刷新,而其他时候它会失败并导致A fresherror。'为什么?如何修复?
错误:
google.auth.exceptions.refresherror :('invalid_grant:令牌已过期或已撤销。 P>
。使用不同的帐户,从未遇到任何问题。我为这两者都使用相同的Python Oauth Quickstart。
Error:
google.auth.exceptions.RefreshError: ('invalid_grant: Token has been expired or revoked.', {'error': 'invalid_grant', 'error_description': 'Token has been expired or revoked.'})
However, another app I use, with a different account, never runs into any issues. I use the same Python OAuth Quickstart for both.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
基本上意味着用户已撤销您的访问权限或Google拥有。用户可以随时在其Google帐户中直接删除您的访问。
如果您使用的是Gmail范围,则Google已过期令牌
无论您的原因是什么原因,您的应用程序应以某种方式配置,以便如果刷新令牌已过期,请再次请求授权。
Basically means just that either the user has revoked your access or google has. Users can remove your access directly in their google account when ever they want to.
Google expired tokens
no matter what the cause your application should be configured in a way as to request authorization from them again if the refresh token has expired.