Obtain access_token

Feature Description

Obtainaccess_token

Interface Address

GET /v1.0/token

Header Parameter

Parameter name Type Parameter position Description Required
client_id String header client_id Yes
sign String header Signature calculated by the “before get token” signature algorithm Yes
sign_method String header Digestion algorithm of signature, HMAC-SHA256 Yes
t Long header 13-digit standard time stamp Yes

Request Parameters

Parameter name Type Parameter position Description Required
grant_type Integer URL Grant type,1-easy mode 2-authorization code mode Yes
code String URL Authorization code. Required in authorization code mode No

Request Example

GET /v1.0/token?grant_type=1

GET /v1.0/token?grant_type=2code=1234567890

Return Messages

Parameter name Type Description
code Integer Response code(see error code section for details)
success Boolean Success or failed: (true: success, false: failed)
msg String Request failed message. Empty when successful
result Object User device messages

Result Description

Parameter name Type Description
access_token String Access token
expire_time Integer Expiry time. Unit: seconds
refresh_token String For refreshingaccess_token

Return Example

{
"success":true,
"result": {
"access_token": "",
"expire_time": 7200,
"refresh_token": ""
}

}

400 Call

Consult

400-881-8611