unlink

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('unlink', {
  accessToken: string,
  identityId: string,
  callback: function,
  // Optional fields
  fields: string,
})

About this command

Unlink social account from the current user. Returns the updated user.

Examples

reach5('unlink', {
  accessToken: 'eyJ0eXAiOiJKV1QiL...',
  identityId: 'facebook:123456789...'
}, function (err, user) {
  if (err) {
    // Handle error
    return;
  }
  // do something with user
});

Parameters

accessToken string

User’s access token.

identityId string

Identity id to remove.

fields string

User’s fields to retrieve in the response. Defaults to id,name,email.

callback string

Event callback that was used with on.