Update User's Password
Update the password of a user
Overview
This PUT endpoint enables you to update the password of an existing user by providing the old and the new password. This operation is different from the password reset process where the old password is unknown but can be reset via email.
There are four required parameters that must be provided in the request:
Et-App-Key (header). This is the unique key of your app that identifies your app when communicating with our service. Contact your administrator to get this key.
Authorization (header). This is the authorization token from the very first token request.
API version (path). Unless necessary, leave it at "1.0".
userID (path). This is the internal ID of the user whose password you'd like to updated. If the request is sent on behalf of the user whose authorization token is used to perform the request, set this parameter to
@me
.userPassword (body). This is a JSON object containing the the old and the new password of the user.
Body Syntax
The body of the request represents a JSON object containing the old, the new, and the confirmation of the new password.
{
"OldPassword": "jqwejr09er9wcwek",
"Password": "ekrf09238f9a9j88aj49f8jpa983hp89f",
"PasswordConfirm": "ekrf09238f9a9j88aj49f8jpa983hp89f"
}
A user's password can only be updated by the user themselves. Even an administrator of the platform is not authorized to update traders' passwords.
The following is the final template for this request:
PUT apiURL/v1.0/users/{userID}/password/change
Response
In response to this request, if the user's password was successfully updated, you will receive the 200 status code and no error message.
Common Mistakes
Here are some of the common mistakes that developers make when attempting to update a user's password:
Failing to Specify the Et-App-Key Parameter
If you specify the wrong Et-App-Key parameter or fail to include it in the header altogether, you'll get the following error:
{
"error": "Application key is not defined or does not exist"
}
Failure to Provide the Old Password
If you fail to provide the old password in the body of the request, you will receive the following error:
{
"Message": "Validation error occured while processing entity",
"ModelState": {
"userPassword.OldPassword": [
"Password is required"
]
}
}
Last updated