get_user_token
Description
- Retrieve a user's token by specifying the terminal type used during login.
Request Method
post
Request URL
{API_ADDRESS}/auth/get_user_token
Header
Header Name | Example Value | Optional | Type | Description |
---|---|---|---|---|
operationID | 1646445464564 | Required | string | Used for global traceability, recommended to use a timestamp for uniqueness in each request. |
token | eyJhbxxxx3Xs | Required | string | Admin token |
Request Body Example
{
"platformID": 1,
"userID": "111111"
}
Field Name | Optional | Type | Description |
---|---|---|---|
platformID | Required | int | User login terminal type, values range from 1-9 |
userID | Required | string | User ID |
Success Response Example
{
"errCode": 0,
"errMsg": "",
"errDlt": "",
"data": {
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVc2VySUQiOiJvcGVuSU1BZG1pbiIsIlBsYXRmb3JtSUQiOjEsImV4cCI6MTY5Njc1NDgwNSwibmJmIjoxNjg4OTc4NTA1LCJpYXQiOjE2ODg5Nzg4MDV9.SAu86X3PzfYjtjBeYA4vZefNr1IiFKRgg12FeiXSm14",
"expireTimeSeconds": 7776000
}
}
Success Response Parameters
Parameter Name | Type | Description |
---|---|---|
errCode | int | Error code, 0 means success |
errMsg | string | Brief error message, empty if successful |
errDlt | string | Detailed error information, empty if successful |
data | object | General data object, see structure below |
token | string | Retrieved user token |
expireTimeSeconds | string | Token expiration time in seconds |
Failure Response Example
{
"errCode": 1004,
"errMsg": "RecordNotFoundError",
"errDlt": ": [1004]RecordNotFoundError"
}
Failure Response Parameters
Parameter Name | Type | Description |
---|---|---|
errCode | int | Error code, refer to the global error code documentation |
errMsg | string | Brief error message |
errDlt | string | Detailed error message |