requestPasswordReset
client.requestPasswordReset( email, phoneNumber success, failure // Optional arguments redirectUrl, )
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.
Be sure 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"
success = { _ -> ... }, // Do something
failure = { error -> ... } // Handle a ReachFive error
)
client.requestPasswordReset(
phoneNumber = "+33682234940",
success = { _ -> ... }, // Do something
failure = { error -> ... } // Handle a ReachFive error
)
Parameters
The email address of the profile. |
|
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. |
|
The URL sent in the email to which the user is redirected. This URL must be whitelisted in the |
|
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. |
||||||||||||||
getErrorCode() |
The error code’s enumeration value. |
||||||||||||||
code |
The HTTP status code or SDK error code. |
||||||||||||||
exception |
The stack trace of the error. |
||||||||||||||
data |
Additional data about the error.
|