Change Password

This method will change the password of a user. It supports 3 modes of operation. With an access token that has UserAuthNormal permission (i.e. without admin permission), the password can either be changed by providing the old password or a password reset token, which can be generated using Reset Password Token method. Finally, if you call this method with an access token that has UserAuthAdmin permission, it will allow you to set AdminMode to True and only provide the NewPassword.

This method is accessed by https://api.cryptolens.io/api/userauth/ChangePassword

Parameters

Parameter Description Remarks
Username The username. required
OldPassword The old password if available. optional
NewPassword The new password. required
PasswordResetToken The password reset token. optional
AdminMode A boolean that allows you to enable the admin mode. optional
v Method version. optional. by default, it's 1.

Results

Parameter Description Remarks
Result This is either 0(=success) or 1(=error). always returned
Message The message that provides additional information about the result. always returned.

Example results

{"result":0,"message":""}

Errors

Error
Access denied.
The input parameters were incorrect.
No username or password supplied.
Could not update the password.
;