User Object
This document explains the user object.
Refer to the user object example for more details.
id
type | description |
---|---|
string | The user's ID. |
memberId
To create a member user, you must use
memberId
.Refer to the memberId in the boot option and the boot.
type | description |
---|---|
string | The ID used for recognizing a member user. If memberId is specified in the boot option, the user is considered a member user. |
name
type | description |
---|---|
string | undefined | The name of a user. Set via updateUser. |
avatarUrl
type | description |
---|---|
string | The URL of the user's avatar image. |
unread
type | description |
---|---|
number | The 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
type | description |
---|---|
number | The count of important unread notifications for the user. It is displayed as a number on the channel button. |
profile
type | description |
---|---|
object | undefined | A 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
type | description |
---|---|
boolean | Indicates whether the user has opted out of marketing emails. Set via updateUser or unsubscribeEmail of boot option. |
unsubscribeTexting
type | description |
---|---|
boolean | Indicates whether the user has opted out of marketing SMS. Set via updateUser or unsubscribeTexting of boot option. |
tags
type | description |
---|---|
string[] | A list of tags associated with the user. All tags are in lowercase. Set via updateUser, addTags, and removeTags. |
language
type | description |
---|---|
string | The 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"
}
Updated 11 months ago