User Object

This document explains the user object.
Refer to the user object example for more details.

id

typedescription
stringThe user's ID.

memberId

๐Ÿ“˜

To create a member user, you must use memberId.

Refer to the memberId in the boot option and the boot.

typedescription
stringThe ID used for recognizing a member user.
If memberId is specified in the boot option, the user is considered a member user.

name

typedescription
string | undefinedThe name of a user.
Set via updateUser.

avatarUrl

typedescription
stringThe URL of the user's avatar image.

unread

typedescription
numberThe total count of unread notifications for the user.
It includes the number of alert. It is displayed as a red dot on the channel button.

alert

typedescription
numberThe count of important unread notifications for the user.
It is displayed as a number on the channel button.

profile

typedescription
object | undefinedA userโ€™s profile information.
Set via updateUser or the profile of boot option.

๐Ÿ“˜

Use onFollowUpChanged to register a callback function that is invoked when the user updates their profile.

unsubscribeEmail

typedescription
booleanIndicates whether the user has opted out of marketing emails.
Set via updateUser or unsubscribeEmail of boot option.

unsubscribeTexting

typedescription
booleanIndicates whether the user has opted out of marketing SMS.
Set via updateUser or unsubscribeTexting of boot option.

tags

typedescription
string[]A list of tags associated with the user.
All tags are in lowercase.
Set via updateUser, addTags, and removeTags.

language

typedescription
stringThe user's language setting.
Used for translation purposes.
Set via updateUser and language of boot option.

Following 32 languages supported.
: 'de'(German), 'hi'(Hindi), 'no'(Norwegian), 'ru'(Russian), 'fi'(Finnish), 'pt'(Portuguese), 'hr'(Croatian), 'fr'(French), 'hu'(Hungarian), 'uk'(Ukrainian), 'sk'(Slovak), 'ca'(Catalan), 'sv'(Swedish), 'ko'(Korean), 'id'(Indonesian), 'ms'(Malay), 'el'(Greek), 'en'(English), 'it'(Italian), 'es'(Spanish), 'he'(Hebrew), 'zh'(Chinese), 'cs'(Czech), 'ar'(Arabic), 'vi'(Vietnamese),'th'(Thai), 'ja'(Japanese), 'pl'(Polish), 'ro'(Romanian), 'da'(Danish), 'nl'(Dutch), 'tr'(Turkish)

Example

{
    "id": "USER_ID",
    "memberId": "MEMBER_ID",
    "name": "USER_NAME",
    "avatarUrl": "AVATAR_URL",
    "unread": 5,
    "alert": 3,
    "profile": {
      "name": "USER_NAME",
      "email": "USER_EMAIL",
      "mobileNumber": "+821012345678",
      "CUSTOM_VALUE_1": "VALUE_1",
      "CUSTOM_VALUE_2": "VALUE_2"
    },
    "unsubscribeEmail": true,
    "unsubscribeTexting": true,
    "tags": ["tag1", "tag2"],
    "language": "ko"
}