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


idstring | numberThe 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
rolestring | nullTalkJS 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.
customCustomDataAllows you to set custom metadata for the User. Set any property to null to delete the existing value, if any. When omitted or undefined, the existing value remains unchanged.
availabilityTextstring | nullAvailability acts similarly to welcomeMessage but appears as a System Message
localestring | nullThe locale field expects an IETF language tag. See the localization documentation.

Used by