Change Password
The Password Change API provides a secure and convenient way for users to change their account password. This API allows users to update their existing password to a new one, ensuring the security and integrity of their account.
Endpoint:
api/customer/profile/change_password
Http Method:
POST
Request Body
Key | Type | Description |
---|---|---|
old_password | string | the user's current password that needs to be verified before proceeding with the password change. |
password | string | the new password that the user wants to set for their account. |
{
"old_password": "123456",
"password": "12345678"
}
- Success Response:
{
"code": 200,
"message": "Success",
"data": null,
"meta": []
}
- Failure Response:
Incorrect current password
{
"code": 403,
"message": "Incorrect password, kindly check them again.",
"errors": {
"errorMessage": "invalid data",
"errorDetails": []
}
}
Missing old password
{
"code": 422,
"message": "The old password field is required.",
"errors": {
"errorMessage": "Invalid data",
"errorDetails": {
"old_password": [
"The old password field is required."
]
}
}
}
معلومات
Check the following section to learn more about the Change Password API Reference