Chat / JavaScript
Chat JavaScript v4
Chat JavaScript
Chat
JavaScript
Home
/
Chat
/
JavaScript
This is the new Docs for Chat SDK v4 for JavaScript. To see the previous Docs, click here.

Overview

Users can chat with one another by participating in open channels or joining group channels within a Sendbird application. The operator role can be assigned to certain users to moderate other users. Users are identified by their own unique ID, and may have a customized nickname and profile image. You can manage various user attributes and actions using the Chat API.

Note: Sendbird Chat SDK v4 supports both TypeScript and JavaScript.

Note: By default, the Allow retrieving user list and Allow updating user metadata options are turned on which means that any user can retrieve a list of users and their metadata as well as alter other users' nicknames and their metadata within your application. This may grant access to unwanted data or operations, leading to potential security concerns. To manage your access control settings, you can turn on or off each option in Settings > Application > Security > Access control list on Sendbird Dashboard.


User types

Depending on the channel type your users are chatting in, they are given different labels as well as access to different actions and information. Users can interact with other users in a private chat or block specific users from sending direct messages. In some cases, users can be given an operator role and the designated operators can moderate other users who display abnormal activities.

TypeScopeDefinition

User

Application

Refers to a user who can access all the chat features of a Sendbird application with their own unique ID but doesn't have any administrative privileges.

Participant

Open channels

Refers to a specific user who has entered an open channel without an invitation and is remaining online in the channel. Open channel participants are provided with limited information only. These participants can enter and exit the channel at all times.

Member

Group channels

Refers to a specific user who has joined a group channel through an invitation from a channel member or on their own. Relational information such as connection status, typing indicators, and read receipts is only available to the group channel members depending on the channel settings.

Operator

You can assign operators in each channel to moderate participants or members engaging in inappropriate activities by banning or muting them in the channel.

When banned, participants or members are immediately kicked out of the channel. After the ban time set by the operators has expired, they can participate back in or rejoin the channel. On the other hand, muted participants or members are allowed to remain in the channel and view the messages, but can't send messages until the operators unmute them.

Additionally, operators can also delete or update any messages sent in a channel.


Functionalities by topic

With the Chat SDK, you can retrieve users in a channel, moderate user activity, and manage user information. The following is a list of functionalities that our SDK supports.

Retrieving users

FunctionalityDescriptionOpen channelGroup channel

Retrieve a list of users in an application

Retrieves a list of all or a specified subset of users in a Sendbird application.

Retrieve a list of users in a channel

Retrieves a list of users in a channel.

Retrieve a list of users and operators

Retrieves a list of users and operators in a channel in an alphabetical order or by another specified order.

Retrieve users who have read a message

Retrieves users who have read a specific message in a channel.

Retrieve a list of operators

Retrieves a list of operators who monitor and control the activities in a channel

Moderating a user

FunctionalityDescriptionOpen channelGroup channel

Retrieve a list of blocked users

Retrieves a list of all or a specified subset of blocked users in a Sendbird application.

Retrieve a list of banned users

Retrieves a list of users who are banned from a channel.

Retrieve a list of muted users

Retrieves a list of users who are muted in a channel.

Block and unblock other users

Blocks or unblocks specified users for a user in a channel.

Ban and unban a user

Operators can ban or unban users from a channel. Banned users are immediately expelled from a channel and allowed to participate in the channel again after the time period set by the operators.

Mute and unmute a user

Operators can mute or unmute users in a channel. Muted users remain in the channel and are allowed to view the messages, but can't send any messages until the operators unmute them.

Retrieving and updating user information

FunctionalityDescriptionOpen channelGroup channel

Retrieve the online status of a user

Checks if a certain user in a Sendbird application is currently connected to the Sendbird server.

Update user profile

Updates a user's nickname and profile image with a URL.

Retrieve the latest information on users

Retrieves the latest and updated information on each user in a Sendbird application or a channel who is online.

Managing user metadata

FunctionalityDescriptionOpen channelGroup channel

Manage user metadata

Stores additional information to users. You can create, retrieve, update and delete the additional information.