在小程序接口调用令牌(authorizer_access_token)失效时,可以使用刷新令牌(authorizer_refresh_token)获取新的接口调用令牌。
注意: authorizer_access_token 有效期为 2 小时,开发者需要缓存 authorizer_access_token,避免获取/刷新接口调用令牌的 API 调用触发每日限额。
POST https://api.q.qq.com/api/component/authorizer_token/get?component_access_token=COMPONENT_ACCESS_TOKEN
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
component_access_token | string | 是 | 令牌 |
component_appid | string | 是 | 第三方平台 appid |
authorizer_appid | string | 是 | 授权方 appid |
authorizer_refresh_token | string | 是 | 刷新令牌,获取授权信息时得到 |
POST 数据示例:
{"component_appid":"appid_value","authorizer_appid":"auth_appid_value","authorizer_refresh_token":"refresh_token_value"}
参数 | 类型 | 说明 |
---|---|---|
authorizer_access_token | string | 授权方令牌 |
expires_in | nubmer 有效期,单位:秒 | |
authorizer_refresh_token | string | 刷新令牌 |
返回结果示例:
{"authorizer_access_token":"some-access-token","expires_in":7200,"authorizer_refresh_token":"refresh_token_value"}
← 使用授权码获取授权信息 授权变更推送通知 →