requestPasswordReset

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

// Request password reset with phone number
client.requestPasswordReset({
  phoneNumber: string,
  origin: string,
  captchaToken: string
  captchaProvider: 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

origin string

Free text parameter describing the source of the action (e.g, login, password reset request).

captchaToken string

Pass along the response token you have received from the captcha provider.

Defaults to null.

captchaProvider string

The captcha provider.

This is one of the following:

  • recaptcha

  • captchafox

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]

R5 AI Assistant

Confirm Deletion