Overview
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.
User types
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 |
Participant | Scope: Open channels |
Member | Scope: Group channels |
Operator | Scope: Open channels and Group channels |
Resource representation
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. |
role | string | A user's role in a channel. When the user is an operator, its value is set to |
joined_ts | int | The time the user joined the channel in Unix milliseconds format. |
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 |
created_at | long | The time that the user was created in Unix seconds format. |
last_seen_at | long | 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 |
metadata | nested object | A |
is_blocking_me | boolean | Indicates whether the listed user is blocking the user specified in the |
is_blocked_by_me | boolean | Indicates whether the listed user is blocked by the user specified in the |
| 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 |
Actions
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.
List of actions for managing users
Action | HTTP request |
---|---|
| |
| |
| |
| |
| |
| |
|
List of actions for operating users' channels
Action | HTTP request |
---|---|
| |
| |
| |
| |
| |
Register users as operators to a channel by a custom channel type |
|
Register a user as an operator to channels by custom channel types |
|
| |
| |
Unregister operators from a channel by a custom channel type |
|
| |
| |
| |
| |
| |
| |
| |
| |
|
List of actions for managing users' push notifications
Action | HTTP request |
---|---|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
List of actions for managing user metadata
Action | HTTP request |
---|---|
| |
| |
| |
|