In a Sendbird application, users can chat with other users by participating in open channels and joining group channels, and even moderate their channels as an operator. They are identified by their own unique ID, and may have a customized nickname and profile image. Using the API, you can manage various attributes and actions of a user.
Users can chat with each other by participating in open channels and joining group channels. Depending on the channel type and the assigned role within the channel, users can be given different labels: participant, member, or operator. Users are identified by their own unique ID, and may have a customized nickname and profile image. Using Platform API, you can manage various attributes and actions of a user.
Type
Definition
User
Scope: Application Refers to someone who can access all chat features of a Sendbird application with their own unique ID but does not have administrative privileges.
Participant
Scope: Open channels Refers to a user who has entered an open channel without an invitation and is online in the channel. Open channel participants are provided with limited information only. As opposed to group channel members, relational information such as connection status, typing indicators, and read receipts are not provided to open channel participants. These participants can enter and exit the channel at all times.
Member
Scope: Group channels Refers to a user who has joined a group channel through either an invitation from a channel member or without an invitation depending on the channel's characteristics. Relational information such as connection status, typing indicators, and read receipts can be provided to group channel members depending on the channel settings.
Operator
Scope: Open channels and Group channels Refers to a user who can moderate participants or members with abnormal activities. Users must be assigned as a moderator to carry the role. Moderation tools includes mute, ban, freeze and block. Additionally, channel operators can also delete or update any messages sent in a channel.
The following table shows the list of properties in a user resource.
Name
Type
Description
user_id
string
A user's unique ID. The length is limited to 80 characters.
nickname
string
A user's nickname. The length is limited to 80 characters.
profile_url
string
The URL of a user's profile image. If left empty, no profile image is set for the user. The length is limited to 2,048 characters.
access_token
string
An opaque string that identifies the user. It is recommended that every user has their own access token and provides it upon login for security.
has_ever_logged_in
boolean
Indicates whether the user has ever logged into the application.
is_active
boolean
Indicates whether the user is active within the Sendbird application.
* Monthly Active Users (MAU) isn't calculated based on this property.
is_online
boolean
Indicates whether the user is connected to the Sendbird server.
discovery_keys[]
array of strings
An array of unique keys of the user, which is provided to Sendbird server when searching for friends. The unique key acts as an identifier for users' friends to find each other. The server uses discovery keys to identify and match the user with other users.
preferred_languages[]
array of strings
An array of one or more language codes to translate notification messages to preferred languages. Up to four languages can be set for the user. If messages are sent in one of the preferred languages, notification messages won't be translated. If messages are sent in a language other than the preferred languages, notification messages are translated into the first language in the array. Messages translated into other preferred languages are provided in the sendbird property of the notification message payload.
The time the user went offline in Unix milliseconds format to indicate when the user was last connected to the Sendbird server. If the user is online, the value is set as 0. If the user is offline and there's no last_seen_at data, the value is set as -1.
* This property isn't tracked by default. To start tracking last_seen_at, visit this page and contact us on Sendbird Dashboard.
metadata
nested object
A JSON object of one or more key-value items to store additional user information such as phone number, email or a long description of the user. For more information, see the managing metadata page.
is_blocking_me
boolean
Indicates whether the listed user is blocking the user specified in the user_id parameter.
*Only included in the members[] property when user_id is specified.
is_blocked_by_me
boolean
Indicates whether the listed user is blocked by the user specified in the user_id parameter.
*Only included in the members[] property when user_id is specified.
session_tokens[]
list
(Deprecated) A list of information of session tokens that identifies the user session that has no validity after their own expiration time. Each of the items consists of two session_token and expires_at properties. The session_token is an opaque string and expires_at is a validation period of the session token. It is recommended that a new session token is periodically issued to every user, and provided upon the user's login for security.
The following table shows a list of actions supported for users. API endpoints are relative to the base URL allocated to your Sendbird application. The base URL for the following endpoints are https://api-{application_id}.sendbird.com/v3.
Note: If you want to know the ID and base URL of your application, go to Settings > Application > General on Sendbird Dashboard, and then check the Application ID and API request URL.
It's recommended that the parameter values, such as {user_id} and {channel_url}, in API URLs be urlencoded.
POST/users Creates a new user in the application. You can choose to authenticate the user with just their user ID, or with either an access token or a session token.
POST/applications/settings_by_channel_custom_type/{custom_type}/operators Registers one or more users as operators at once to a channel with a custom channel type.
DELETE/settings_by_channel_custom_type/{custom_type}/operators Cancels the registration of operators in channels with a specified custom channel type but leaves them in the channels.
GET/users/{user_id}/unread_item_count Retrieves a set of total number of a user's unread messages, unread mentioned messages, or received invitations in either Supergroup channels or non-Supergroup channels.