updateEmail
client.updateEmail( authToken, email, success, failure, // Optional arguments redirectUrl )
About this command
Update the profile’s email address and send a verification email.
|
Examples
import com.reach5.identity.sdk.core.models.AuthToken
val profileAuthToken: AuthToken = // Here paste the authorization token of the profile retrieved after login
client.updateEmail(
authToken = profileAuthToken,
email = "johnatthan.doe@gmail.com",
redirectUrl = "https://example-email-update.com"
success = { updatedProfile -> ... }, // Get the updated profile
failure = { error -> ... } // Return a ReachFive error
)
Parameters
Authorization token of the profile retrieved from login (less than 5 minutes old).
|
|||||||||||||
The email address of the profile. The new email address must be different from the old one. |
|||||||||||||
The URL sent in the email to which the user is redirected. This URL must be whitelisted in the |
|||||||||||||
Callback called once the update has succeeded. You’ll get the updated |
|||||||||||||
Callback called once the request has failed. You’ll get a |
Response
Type: Unit
Profile
id |
The ReachFive identifier of the profile. |
||||||||||||||||||||||||
givenName |
The given name of the profile. |
||||||||||||||||||||||||
middleName |
The middle name of the profile. |
||||||||||||||||||||||||
familyName |
The family name of the profile. |
||||||||||||||||||||||||
name |
The full name of the profile. |
||||||||||||||||||||||||
nickname |
The nickname of the profile. |
||||||||||||||||||||||||
birthdate |
The birthdate of the profile, represented as an ISO 8601 |
||||||||||||||||||||||||
profileURL |
The URL of one of the user’s profile page (usually a social provider’s page). |
||||||||||||||||||||||||
picture |
The URL of one of the profile picture. This URL refers to an image file (PNG, JPEG, or GIF image file). |
||||||||||||||||||||||||
externalId |
The external identifier of the profile. |
||||||||||||||||||||||||
authTypes |
The list of the authentication providers used to login by the profile (e.g. facebook, password …). |
||||||||||||||||||||||||
loginSummary |
The login activities history of the profile.
|
||||||||||||||||||||||||
username |
The username of the profile (the login’s name). |
||||||||||||||||||||||||
gender |
The gender of the profile. Allowed values are |
||||||||||||||||||||||||
email |
The primary email address of the profile. |
||||||||||||||||||||||||
emailVerified |
|
||||||||||||||||||||||||
emails |
The e-mail addresses of the profile.
|
||||||||||||||||||||||||
phoneNumber |
The primary 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. |
||||||||||||||||||||||||
phoneNumberVerified |
|
||||||||||||||||||||||||
addresses |
The list of the profile’s postal addresses. To get this attribute, the profile must have been granted the
|
||||||||||||||||||||||||
locale |
The profile’s language code in lowercase and country code in uppercase, separated by a dash (e.g. |
||||||||||||||||||||||||
bio |
The biography of the profile. |
||||||||||||||||||||||||
customFields |
The custom fields of the profile. |
||||||||||||||||||||||||
consents |
The consents granted to the profile. It is a map of string keys with the associated consent object.
|
||||||||||||||||||||||||
createdAt |
The time the profile’s information was created. |
||||||||||||||||||||||||
updatedAt |
The time the profile’s information was last updated. |
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.
|