Profiles are used to collect activity in chat, widgets, and other features inside a single identity. Profiles can be provisioned arbitrarily and can be used to extend your existing user account records. These profiles can either be local, allowing you to create anonymous experiences, or persisted in your user databases, allowing you to create profiles that persist across a user's devices.
When a profile is first created it is given a unique ID and a credential called an Access Token. It is also automatically given a nickname if one is not provided. Profiles will persist for as long as its credentials are stored and passed back to the SDKs & APIs. Nicknames are used for personalization, and show up next to chat messages and in leaderboards.
Nicknames are not unique!
The profile ID and access token are the identifying fields of a profile. Nicknames are not guaranteed to be unique and can often be freely updated by users.
To modify an existing user profile, use the
LiveLike.updateUserProfile method. Providing a
nickname property in the options argument will update the name shown for future chat messages sent by that profile.
updateProfile function will return a promise which resolves the updated user profile object. This profile object does not contain the access token, so it is important to save it before running this function.
You can create a profile manually at any time using
LiveLike.createUserProfile. Even if the SDK has already been initialised, a new profile will be returned.
Use this method to get a User Profile using the
AccessToken as a parameter
Use this method to add event listener for a given UserProfileEvent.
UserProfileEvent could be:
Remove a attached listenerFn for the given UserProfileEvent, when no listener passed, all registered event listener will be removed.
Updated 12 months ago