2. jiace开放平台Token服务
2.1. 获取ACCESS_TOKEN
Type: POST
Author: lones
Content-Type: application/json; charset=utf-8
Description: 获取ACCESS_TOKEN
Body-parameters:
Parameter | Type | Description | Required | Since |
---|---|---|---|---|
appKey |
string |
应用APPKEY |
false |
- |
appSecret |
string |
应用APPSECRET |
false |
- |
timestamp |
int64 |
时间戳 |
false |
- |
Request-example:
curl -X POST -H 'Content-Type: application/json; charset=utf-8' -i /token/getToken --data '{
"appKey": "c1r4um",
"appSecret": "2npq0p",
"timestamp": 1683440518260
}'
Response-fields:
Field | Type | Description | Since |
---|---|---|---|
code |
int64 |
No comments found. |
- |
message |
string |
No comments found. |
- |
data |
object |
No comments found. |
- |
└─accessToken |
string |
ACCESS_TOKEN |
- |
└─tokenExpire |
int64 |
ACCESS_TOKEN过期时间 |
- |
└─refreshToken |
string |
REFRESH_TOKEN |
- |
└─refreshExpire |
int64 |
REFRESH_TOKEN过期时间 |
- |
Response-example:
{
"code": 199,
"message": "success",
"data": {
"accessToken": "d8eitv",
"tokenExpire": 510,
"refreshToken": "t4vkpw",
"refreshExpire": 901
}
}
2.2. 刷新ACCESS_TOKEN
Type: POST
Author: lones
Content-Type: application/json; charset=utf-8
Description: 刷新ACCESS_TOKEN
Body-parameters:
Parameter | Type | Description | Required | Since |
---|---|---|---|---|
appKey |
string |
应用APPKEY |
false |
- |
appSecret |
string |
应用APPSECRET |
false |
- |
timestamp |
int64 |
时间戳 |
false |
- |
refreshToken |
string |
应用REFRESH_TOKEN |
false |
- |
Request-example:
curl -X POST -H 'Content-Type: application/json; charset=utf-8' -i /token/refreshToken --data '{
"appKey": "nwfy7x",
"appSecret": "wdywop",
"timestamp": 1683440518260,
"refreshToken": "8mk4l2"
}'
Response-fields:
Field | Type | Description | Since |
---|---|---|---|
code |
int64 |
No comments found. |
- |
message |
string |
No comments found. |
- |
data |
object |
No comments found. |
- |
└─accessToken |
string |
ACCESS_TOKEN |
- |
└─tokenExpire |
int64 |
ACCESS_TOKEN过期时间 |
- |
└─refreshToken |
string |
REFRESH_TOKEN |
- |
└─refreshExpire |
int64 |
REFRESH_TOKEN过期时间 |
- |
Response-example:
{
"code": 287,
"message": "success",
"data": {
"accessToken": "hr2j9y",
"tokenExpire": 310,
"refreshToken": "f8qfnw",
"refreshExpire": 192
}
}