updateEmail

Deprecation Notice

This SDK is deprecated in favor of the Core and UI JS SDKs. See Migrating to the latest SDKs to use the latest Core and UI SDKs.

Support for the Legacy JS SDK ends on 28 February, 2021.

reach5('updateEmail', {
  accessToken: string,
  email: string,
  callback: function,
  // Optional fields
  redirectUrl: string,
})

About this command

Update user’s email and send a verification email.

Examples

reach5('updateEmail', {
  accessToken: 'eyJ0eXAiOiJKV1QiL...',
  email: '...'
}, function(err, result) {
  if (err) {
    // Handle error
    return;
  }
  // do something with result
});

Parameters

accessToken string

User’s access token.

email string

User’s email

redirectUrl string

The URL the user will be redirected to after clicking on the link contained in the email. This URL must be whitelisted in the Allowed Callback URLs field of your ReachFive client settings.

callback string

Event callback that was used with on.