【问题标题】:googleapis oauth2 token API not returning refresh_tokengoogleapis oauth2 令牌 API 未返回 refresh_token
【发布时间】:2017-11-14 22:46:18
【问题描述】:

我正在尝试生成 access_token 和 refresh_token 来访问 google 电子表格 API。我使用了 API https://www.googleapis.com/oauth2/v3/token?code=&grant_type=authorization_code&redirect_uri=&client_id=&client_secret=&approval_prompt=force 这个 API 在响应中只给出“access_token”、“type”和“expires_in”,没有给出“refresh_token” 我们如何刷新访问令牌?我尝试使用需要“refresh_token”作为查询参数的 API https://accounts.google.com/o/oauth2/token。我最初没有找到任何 refresh_token,因此无法访问此 API。有人可以描述获取电子表格 API 的 refresh_token 的步骤吗?

【问题讨论】:

标签: oauth-2.0 spreadsheet access-token google-apis-explorer refresh-token


【解决方案1】:

您似乎想使用 access_type=offline

来源:https://developers.google.com/identity/protocols/OAuth2WebServer#offline

【讨论】:

    猜你喜欢
    • 2016-06-26
    • 2017-04-04
    • 2013-03-23
    • 1970-01-01
    • 1970-01-01
    • 2017-07-20
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多