UserSnapshot

A snapshot of a user's attributes at a given moment in time.

Users also have private information, such as email addresses and phone numbers, but these are only exposed on the REST API.

Example

1{
2 "id": "650d5ed0cae49",
3 "name": "Alice",
4 "welcomeMessage": null,
5 "photoUrl": null,
6 "role": "default",
7 "custom": {},
8 "availabilityText": null,
9 "locale": null,
10 }

Properties

NameTypeDescription
idstringThe unique ID which is used to identify the user in TalkJS
namestringThe user's name which will be displayed on the TalkJS UI
photoUrlstring | nullAn optional URL to a photo which will be displayed as the user's avatar
welcomeMessagestring | nullThe default message a user sees when starting a chat with that person
rolestringTalkJS supports multiple sets of settings, called "roles". Roles allow you to change the behavior of TalkJS for different users. You have full control over which user gets which configuration.
customCustomDataCustom metadata you have set on the user
localestring | nullThe locale field expects an IETF language tag. See the localization documentation.
When locale is null, the app's default locale will be used

Used by