我正在使用 google oauthlib 来获取access_token
并使用它来获取 gmail atom 提要,requests
因为 python lib 不支持它。
使用驱动器等支持的服务时,令牌会自动刷新,在我的情况下该怎么做?
我正在使用 google oauthlib 来获取access_token
并使用它来获取 gmail atom 提要,requests
因为 python lib 不支持它。
使用驱动器等支持的服务时,令牌会自动刷新,在我的情况下该怎么做?
假设您有刷新令牌,您可以使用它通过 HTTP POST 请求新的访问令牌
https://accounts.google.com/o/oauth2/token
client_id={ClientId}.apps.googleusercontent.com&client_secret={ClientSecret}&refresh_token=1/ffYmfI0sjR54Ft9oupubLzrJhD1hZS5tWQcyAvNECCA&grant_type=refresh_token
此链接可能有助于Google 3 legged oauth2 flow