updateProfile

client.updateProfile({
  accessToken: string,
  redirectUrl: string,
  data: Profile
})

About this command

Update the information of the profile.

  • The profile must have been granted the full_write scope at the last authentication.

  • The email and the password fields of the profile can’t be updated with this method, except if the profile has no email address (usually when it is not provided by the social provider). Instead, use the updateEmail method.

  • The phoneNumber field of the profile can’t be updated if the SMS verification code is disabled on the account settings.

Examples

client.updateProfile({
  accessToken: 'eyJ0eXAiOiJKV1QiL...',
  redirectUrl: 'https://example-email-validate.com',
  data: {
    givenName: 'John',
    familyName: 'Doe'
  }
})

Parameters

accessToken string

The authorization credential JSON Web Token (JWT) used to access the ReachFive API.

redirectUrl string

The URL sent in the email to which the user is redirected. This URL must be whitelisted in the Allowed Callback URLs field of your ReachFive client settings.

profile Profile

The profile with the new data. Only the provided fields will be updated.

password string

The password of the profile. Password must meet the minimum requirements defined by the zxcvbn used.

email string

The primary email address of the profile.

phoneNumber string

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.

givenName string

The given name of the profile.

middleName string

The middle name of the profile.

familyName string

The family name of the profile.

name string

The full name of the profile.

nickname string

The nickname of the profile.

birthdate string

The birthdate of the profile, represented as an ISO 8601 YYYY-MM-DD format.

profileURL string

The URL of one of the user’s profile page (usually a social provider’s page).

picture string

The URL of one of the profile picture. This URL refers to an image file (PNG, JPEG, or GIF image file).

username string

The username of the profile (the login’s name).

gender string

The gender of the profile.

Allowed values are female, male and other.

company string

The company’s name of the profile.

addresses ProfileAddress[]

The list of the profile’s postal addresses

locale string

The profile’s language code in lowercase and country code in uppercase, separated by a dash (for instance: en, fr-FR…​).

bio string

The biography of the profile.

customFields Map<string, any>

The custom fields of the profile.

consents Map<string, Consent>

The consents granted to the profile. It is a map of string keys with the associated consent object.

Response

Type: Promise[void]