getUser

client.getUser({
  accessToken: string,
  // Optional arguments
  fields: string
})

About this command

Retrieve the user profile.

Examples

client
  .getUser({
    accessToken: 'eyJ0eXAiOiJKV1QiL...',
    fields: 'id,givenName,familyName,email,birthdate'
  })
  .then(profile => {
    // Display the profile
  })
  .catch(err => console.error(err))

Parameters

accessToken string

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

fields string

The user fields to fetch in the response.

Defaults to id,name,email.

Response

Type: Promise<Profile>

where Profile is a Record<string, any>