requestPasswordReset

// Request password reset with email
client.requestPasswordReset({
  email: string,
  // Optional arguments
  redirectUrl: string,
  returnToAfterPasswordReset: string, (1)
  loginLink: string,
  captchaToken: string
})

// Request password reset with phone number
client.requestPasswordReset({
  phoneNumber: string
  captchaToken: string
})
1 This parameter should only be used with Hosted Pages.

About this command

Request a password reset for the given email or phone number. On success, an email or an SMS with a reset token is sent to the user.

Examples

  • With an email

  • With a phone number

client.requestPasswordReset({
  email: 'john.doe@example.com',
  redirectUrl: 'https://example-password-reset.com'
})
client.requestPasswordReset({
    phoneNumber: '+33682234940'
})

Parameters

captchaToken string

Pass along the response token you have received from reCAPTCHA. See Google’s documentation on how to obtain it.

Defaults to null.

email string

The user’s email address.

loginLink string

The login URL the user will be redirected to after requesting password reset. This attribute can be used in a user interface.

phoneNumber string

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.

redirectUrl string

The URL sent in the email to which the user is redirected. This URL must be whitelisted in the Allowed Callback URLs field of your ReachFive client settings.

returnToAfterPasswordReset string

Returned in the redirectUrl as a query parameter, this parameter is used to redirect users to a specific URL after a password reset.

This parameter should only be used with Hosted Pages.

Response

Type: Promise[void]