【问题标题】:Google OAuth Access Token expired how to get Refresh TokenGoogle OAuth 访问令牌过期如何获取刷新令牌
【发布时间】:2019-10-02 09:07:54
【问题描述】:

我正在开发 Google Drive Rest Api,以便在使用 google 登录后将文件上传和下载到 google drive。

我能够获得每 60 分钟后过期的访问令牌我想通过使用以前的令牌登录来获得刷新访问令牌我该如何实现这一点。

提前致谢

【问题讨论】:

    标签: android google-oauth drive


    【解决方案1】:

    使用用户登录时提供的刷新令牌并使用此 url 发送 POST 请求

    https://oauth2.googleapis.com/token?client_id=your_client_id&client_secret=your_client_secret&refresh_token=refresh_token&grant_type=refresh_token

    有关更多信息,请查看文档: https://developers.google.com/identity/protocols/OAuth2InstalledApp#handlingresponse

    【讨论】:

      猜你喜欢
      • 2015-11-26
      • 2014-07-15
      • 2017-06-09
      • 2021-08-25
      • 2013-09-05
      • 2013-10-27
      • 1970-01-01
      • 1970-01-01
      • 2013-11-05
      相关资源
      最近更新 更多