REQUEST
This API is used to check the Token of the current User. If the token correct, system will generate the new token for the user.
The structure of API as below:
HEADER
The request requires you given the Token of the user that you want to check in headers. Based on this token, the system will detect the user then check the token is correct or not. To get the Token, please refer Authenticate User for more details.
Code Block |
---|
{
"accept": "application/json",
"X-Auth-Token": "AdminUser Token"
} |
BODY
You have to put the ID of the Agent that you want to authenticate into the body as below:
Code Block |
---|
{
"password": "string"
} |
JSON RESPONSE
There is message return as JSON format. It will return the result of API and the related information as well.
If you provide correct password, the server will return code 200 with a message as below:
Code Block |
---|
{
"success": true
} |
If you call API without header, the system will return the If you provide the wrong password, the server will return code 202 with a message as below:
Code Block |
---|
{
"error_type": "operationunauthenticated_error",
"success": false,
"error": {
"message": "Incorrect passwordNo header X-Auth-Token present",
"code": 200110,
"reason": "incorrect_passwordauth_token_not_provided"
}
} |
JSON RESPONSE
There is message return as JSON format. It will return the result of API and the related information as well.
If you provide correct token, the server will return code 200 with a message as If you don't input anything in the body or missing any fields, It will return code 400 and message as below:
Code Block |
---|
{
"error_type": "validation_error",
"success": falsetrue,
"errorspayload": [ {
"password"token": ["Missing data for required field."]
}]New Token"}
} |
If you provide the Token wrong, it wrong token, the server will return code 401code 120 with a a message as below:
Code Block |
---|
{
"error_type": "unauthenticated_error",
"success": false,
"error": {
"message": "NoIncorrect header X-Auth-Token presenttoken provided",
"code": 110120,
"reason": "authincorrect_token_not_provided"
}
} |