updatePassword
This SDK is deprecated in favor of the Core and UI JS SDKs. See Migrating to the latest SDKs to use the latest Core and UI SDKs.
Support for the Legacy JS SDK ends on 28 February, 2021. |
reach5('updatePassword', { email: string, password: string, oldPassword: string, verificationCode: string, accessToken: string, phoneNumber: string, callback: function, })
About this command
Update user’s password. To be accepted, the request must include, in addition to the new password, either:
-
A fresh accessToken (less than 5 minutes old)
-
An accessToken and the user’s oldPassword
-
For the request password reset flow, the email or phoneNumber and the verificationCode associated
Examples
reach5('updatePassword', {
accessToken: 'eyJ0eXAiOiJKV1QiL...',
password: 'N5uiKvve'
}, function(err, result) {
if (err) {
// Handle error
return;
}
// do something with result
});
Parameters
User’s access token. |
|
User’s password. |
|
Old password. |
|
Verification code for request password reset flow. |
|
User’s email |
|
User’s phone number. Both the international format and the national conventions of the account’s country are accepted if configured in account settings. |
|
Event callback that was used with on. |