我已存储刷新令牌,如何使用它刷新我的访问令牌 [英] I have the refresh token stored, How can I use it for refreshing my access token

查看:108
本文介绍了我已存储刷新令牌,如何使用它刷新我的访问令牌的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据我的阅读,我可以看到curl使用我的刷新令牌来获取access_token.我如何使用python重用我的刷新令牌. 谢谢,很抱歉,如果这是任何重复的话.

As per my reading, I can see curl to get the access_token using my refresh token. How can i reuse my refresh token using python. Thanks and sorry if this is a kind of any duplicate.

推荐答案

如果您使用的是Google API Python客户端库,则当访问令牌过期时,刷新令牌将自动使用. OAuth2Credentials对象具有用于手动执行此操作的refresh()方法.此处的更多信息: https://developers.google.com/api -client-library/python/guide/aaa_oauth#OAuth2Credentials

If you are using the Google APIs Python Client Library, the refresh token will be used automatically when your access token expires. The OAuth2Credentials object has a refresh() method for doing this manually. More information here: https://developers.google.com/api-client-library/python/guide/aaa_oauth#OAuth2Credentials

这篇关于我已存储刷新令牌,如何使用它刷新我的访问令牌的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆