updatePassword
// Update a password with the old password client.updatePassword({ password: string, // Optional fields accessToken: string, oldPassword: string }) // Update a password with the email client.updatePassword({ email: string, verificationCode: string, password: string, // Optional fields accessToken: string }) // Update a password with the phone number client.updatePassword({ phoneNumber: string, verificationCode: string, password: string, // Optional fields accessToken: string })
About this command
Update the profile’s password. The parameters required in addition to the new password are either:
-
A fresh access token (less than 5 minutes old).
-
An access token and the old password.
-
The profile’s email address/phone number and the verification code sent by email/SMS through a request password reset flow.
|
Examples
client.updatePassword({
accessToken: 'eyJ0eXAiOiJKV1QiL...',
password: 'ZPf7LFtc',
oldPassword: 'gVc7piBn'
})
client.updatePassword({
accessToken: 'eyJ0eXAiOiJKV1QiL...',
password: 'ZPf7LFtc'
})
client.updatePassword({
email: 'john.doe@example.com',
verificationCode: '234',
password: 'ZPf7LFtc'
})
client.updatePassword({
phoneNumber: '+33682234940',
verificationCode: '234',
password: 'ZPf7LFtc'
})
Parameters
The authorization credential JSON Web Token (JWT) used to access the ReachFive API. |
|
The user’s password. |
|
The old password of the profile. |
|
The verification code sent by email or SMS. |
|
The user’s email address. |
|
The user’s phone number. Both the international format and the national conventions of the account’s country are accepted if configured in account settings. |