verifyEmail
client.verifyEmail( authToken, email, verificationCode, success, failure )
About this command
Confirms the user’s email address using the provided verification code. This method is called after the user receives the verification email and inputs the code.
If successful, the email is marked as verified in the user’s profile.
Examples
import com.reach5.identity.sdk.core.models.AuthToken
val authToken: AuthToken = // The authentication token obtained following signup or login.
client.verifyEmail(
authToken = authToken,
email = "bob@example.com",
verificationCode = "0123456",
success = { _ -> ... }, // Do something
failure = { error -> ... } // Handle a ReachFive error
)
Parameters
Parameter | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
The email address of the profile. |
|||||||||||||
Callback called once the request has failed. You’ll get a |
|||||||||||||
Authorization token of the profile retrieved from login (less than 5 minutes old).
|
|||||||||||||
Callback called once the request has succeeded. |
|||||||||||||
The verification code sent by email or SMS. |
Response
Type: Unit
If verified, you receive "Successfully verified email".
If the email is already verified, you receive "Email already verified".
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.
|