Skip to content

获取或刷新访问令牌

POST
/token/access

通过授权码获取访问令牌,或通过刷新令牌更新访问令牌

参数

查询参数

grant_type*

授权类型

类型
string
必填
有效值
"authorization_code""refresh_token"
client_id*

注册应用的唯一 id

类型
string
必填
client_secret*

注册应用的 secret

类型
string
必填
code

授权码,grant_type=authorization_code 时必填

类型
string
redirect_uri

回调地址,grant_type=authorization_code 时必填,若无则填 none

类型
string
refresh_token

刷新 token,grant_type=refresh_token 时必填

类型
string

响应

令牌获取成功

application/json
JSON
{
  
"error_code": 200,
  
"access_token": "xxxxx",
  
"refresh_token": "xxxxxx",
  
"expires_in": 172800,
  
"openid": "53102fb4bf1044ed8b0ba36c"
}

试验场

变量

示例