REQUEST
This API is used to check the password of the current 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 password is correct or not. To get the Token, please refer Authenticate User for more details.
{
"accept": "application/json",
"X-Auth-Token": "Admin Token"
} |
If you call API without header, the system will return the message as below:
{
"error_type": "unauthenticated_error",
"success": false,
"error": {
"message": "No header X-Auth-Token present",
"code": 110,
"reason": "auth_token_not_provided"
}
} |
BODY
You have to put the ID of the Agent that you want to authenticate into the body as below:
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:
If you provide the wrong password, the server will return code 200 with a message as below:
{
"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:
{
"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:
{
"error_type": "unauthenticated_error",
"success": false,
"error": {
"message": "No header X-Auth-Token present",
"code": 110,
"reason": "auth_token_not_provided"
}
} |