Get Token
Service Address
http://api-az-cn.danghongyun.com/rest
Request Method
GET
Request Parameters
| Parameter | Description | Type | Required |
|---|---|---|---|
| accessKey | The user access key | String | Required |
| action | API name, this api is "getToken" | String | Required |
| version | API version, currently must be 2.0 | String | Required |
| timestamp | Invoke time in milliseconds since january 1 1970, eg: 1466488681033 | String | Required |
| signature | Signature generated by signature rule. | String | Required |
Response Example
{
"code":0,
"message":"success",
"result":
{
"accessToken":"6ee00e4f662b2e157b105ce3db8f4a22",
"accessTokenTime":1461914407759,
"expiresIn":2592000,
"refreshToken":"64af3ba262261770f99ba951ab6aea38",
"userId":185
},
"success":true
}
Response Fields
| Field | Description |
|---|---|
| accessToken | Access token |
| accessTokenTime | The time when the access token was generated |
| expiresIn | Expiration time in seconds |
| refreshToken | The update token is used to obtain the next access token |
| userId | User id |
Error Codes
| Code | Message |
|---|---|
| 0 | success |
| 10000 | Exception |
| 10001 | get_access_token_failed |
| 10201 | api_not_exists |