获取授权过的令牌

接口地址

/api/index.php/Oauth2/access_token


返回格式

JSON/HTML


http请求方式

POST


请求参数
参数名称 必须 类型及范围 描述
access_token string Oauth2授权成功后获得的access_token
client_id string

申请应用时分配的AppKey。

client_secret string

申请应用时分配的AppSecret

grant_type string

请求的类型,填写 "authorization_code"

code string

请求类型为authorization_code时,该参数值为调用authorize获得的code值。

redirect_uri string

请求类型为authorization_code时,该地址与请求authorize时的redirect_uri相同


返回结果
{
  "access_token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "expires_in": 3600,
  "token_type": "Bearer",
  "scope": null,
  "refresh_token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
  }