requestPasswordReset
client.requestPasswordReset( successWithNoContent, failure // Optional arguments email, redirectUrl, phoneNumber )
About this command
Request a password reset for a profile. It will send an email if the email address is provided and an SMS if the phone number is given.
It is required to configure and to enable the Password reset email or the Password reset SMS templates in the account’s settings.
Examples
client.requestPasswordReset(
email = "john.doe@gmail.com",
redirectUrl = "https://example-password-reset.com"
successWithNoContent = { _ -> ... }, // Do something
failure = { error -> ... } // Return a ReachFive error
)
client.requestPasswordReset(
phoneNumber = "+33682234940",
successWithNoContent = { _ -> ... }, // Do something
failure = { error -> ... } // Return a ReachFive error
)
Parameters
The email address of the profile. |
|
The URL sent in the email to which the user is redirected. This URL must be whitelisted in the |
|
The phone number of the profile. Both the international format and the national conventions of the account’s country are accepted if configured in account settings. |
|
Callback called once the request has succeeded. No argument is expected. |
|
Callback called once the request has failed. You’ll get a |
Response
Type: Unit
ReachFiveError
message |
The message of the error. |
||||||||||||||
code |
The HTTP status code. |
||||||||||||||
exception |
The stack trace of the error. |
||||||||||||||
data |
Additional data about the error.
|