Access Token
The access token interface requires the authorization code Code returned after user authorization, along with appId and appSecret information, to call the interface to exchange for the access token. Finally, this token can be used to obtain basic user information and perform authorization binding.
Steps:
1. Open the authorization page to obtain the authorization code
2. The third-party platform exchanges the authorization code for an access token
3. Obtain user information based on the access token for account binding
Header parameters
tracestringRequiredExample:
{{mock_trace}}
companystringRequiredExample:
{{company}}
Body
appIdstringRequired
appSecretstringRequired
codestringRequired
Responses
200
Success
application/json
Responseobject
post
POST /cats-gateway-auth2/auth2/token HTTP/1.1
Host: prepc-real.headline.net
trace: text
company: text
Content-Type: application/json
Accept: */*
Content-Length: 137
{
"appId": "088b591f5fd735be62608a272f4d971f",
"code": "e06a0a7f-9332-4e5a-a539-e2dc976fd08e",
"appSecret": "262f13697a56fe059b1daa0ba2ec7b6b"
}
200
Success
{
"bizCode": "",
"code": "0",
"msg": "Success",
"tm": 0,
"trace": "",
"msgParams": null,
"data": {
"accessToken": "650c1011-db8f-49bb-91e2-75ef207d2e4e",
"refreshToken": "9a1c03e9-cfe0-4796-8a73-20d53f6b399e"
},
"ok": true,
"fail": false
}
Last updated