刷新授权小程序的接口调用凭据
当在授权小程序的接口调用凭据(authorizer_access_token)失效时,可用刷新令牌(authorizer_refresh_token)获取新的令牌。当换取 authorizer_refresh_token 后建议保存。
请求地址
GET https://open.microapp.bytedance.com/openapi/v1/oauth/token
Query 参数
参数名 | 参数类型 | 是否必须 | 备注 |
---|---|---|---|
component_appid | string | 是 | 第三方平台的 appid |
component_access_token | string | 是 | 第三方平台 access_token |
authorizer_refresh_token | string | 是 | 刷新令牌,使用后失效 |
grant_type | string | 是 | 固定字符串:app_to_tp_refresh_token |
返回值
参数名 | 参数类型 | 备注 |
---|---|---|
authorizer_access_token | string | 接口调用令牌 |
authorizer_refresh_token | string | 刷新令牌主要用于第三方平台获取和刷新已授权用户的 authorizer_access_token。一旦丢失,只能让用户重新授权,才能再次拿到新的刷新令牌。用户重新授权后,之前的刷新令牌会失效 |
expires_in | int | authorizer_access_token 的有效期,单位:秒 |
返回值示例
{
"authorizer_access_token": "xxx",
"authorizer_refresh_token": "xxx",
"expires_in": 7200
}
点击纠错
评价此篇文档