I have the refresh token stored, How can I use it

2019-03-01 13:30发布

问题:

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.

回答1:

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