REQUEST
This API is used to check the password of the current User.
The structure of API as below:
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 password is correct or not. To get the Token, please refer Authenticate User for more details.
Code Block |
---|
{
"accept": "application/json",
"X-Auth-Token": "Admin 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 provide the wrong password, the server will return code 202200 with a message as below:
Code Block |
---|
{
"error_type": "operation_error",
"success": false,
"error": {
"message": "Incorrect password",
"code": 200,
"reason": "incorrect_password"
}
} |
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": false,
"errors": [ {
"password": ["Missing data for required field."]
}]
} |
If the Token wrong, it will return code 401 with a message as below:
Code Block |
---|
{
"error_type": "unauthenticated_error",
"success": false,
"error": {
"message": "No header X-Auth-Token present",
"code": 110,
"reason": "auth_token_not_provided"
}
} |