startMfaPhoneNumberRegistration
client.startMfaPhoneNumberRegistration( authToken, phoneNumber, (1) success, failure, action, trustDevice )
1 | If the user already has a verified phone number as an identifier in their account, there’s no need to pass the phoneNumber parameter.
If an existing phone number is unverified, it becomes automatically verified with the verifyMfaPhoneNumberRegistration step. |
About this command
Starts the MFA phone number registration flow. When the flow is started, an SMS is sent to the user for verification.
Examples
import com.reach5.identity.sdk.core.models.AuthToken
val authToken: AuthToken = // The authentication token obtained from login or signup.
client.startMfaPhoneNumberRegistration(
authToken = authToken,
phoneNumber = "+33612345678",
success = { _ -> ... }, // Do something
failure = { error -> ... } // Handle a ReachFive error
)
Parameters
Authorization token of the profile retrieved from login.
|
|||||||||||||||||
Boolean indicating if the device should be trusted or not.
Defaults to
|
|||||||||||||||||
Callback called once the request has failed. You’ll get a |
|||||||||||||||||
An optional string describing the action for the MFA flow. You can value this with whatever you like. It should match the value you describe in your MFA templates. We recommend using meaningful values like |
|||||||||||||||||
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. |
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. See Android SDK errors for more details. |
||||||||||||||
exception |
The stack trace of the error. |
||||||||||||||
data |
Additional data about the error.
|