Skip to content

刷新访问令牌 ​

https://cnapi.sciener.com/oauth2/token

通过获取访问令牌接口返回的刷新令牌(默认有效期为10年)获取新的访问令牌。

1 HTTP请求方法及示例 ​

POST, ContentType:application/x-www-form-urlencoded

javascript
curl --location -g --request POST 'https://cnapi.sciener.com/oauth2/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'clientId=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
--data-urlencode 'clientSecret=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
--data-urlencode 'grant_type=refresh_token' \
--data-urlencode 'refresh_token=1bd2a21a7df889630f444364813738d7'

2 参数说明 ​

名称是否必需参数值描述
clientIdY创建应用分配的clientId
clientSecretY创建应用分配的clientSecret
grant_typeYrefresh_token授权类型为refresh_token
refresh_tokenY刷新令牌

3 返回参数及示例 ​

参数类型描述
access_tokenString访问令牌
expires_inInt访问令牌过期时间,单位秒
refresh_tokenString刷新令牌
{
    "access_token": "39caac89b0b51c980aa61ad4264b693b",
    "refresh_token": "1bd2a21a7df889630f444364813738d7",
    "expires_in": 7776000
}