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.
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 }
Name | Type | Description |
---|---|---|
id | string | The unique ID which is used to identify the user in TalkJS |
name | string | The user's name which will be displayed on the TalkJS UI |
photoUrl | string | null | An optional URL to a photo which will be displayed as the user's avatar |
welcomeMessage | string | null | The default message a user sees when starting a chat with that person |
role | string | TalkJS 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. |
custom | CustomData | Custom metadata you have set on the user |
locale | string | null | The locale field expects an IETF language tag. See the localization documentation. When locale is null, the app's default locale will be used |