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

Sendbird's APIs and SDKs provide two basic types of channels: open channel and group channel. Each type of channel is designed to support a wide variety of use cases that your business requires. This page explains the differences and characteristics of the two types.


Open channel

An open channel is a Twitch-style public chat where millions of users can easily join without permission. Open channels can be used in short-lived live events, such as streaming, news-feed type messaging to massive audience, or events that don't require a permanent membership.

Choose a type of an open channel

With our Chat SDK for JavaScript, you can use a variety of behavior related properties when creating different types of open channels.

Classic vs. Dynamic partitioning

Sendbird Chat SDK now supports two operation systems for open channels, which are classic and dynamic partitioning. These two systems offer the same features and functions, except that dynamic partitioning allows open channels to accommodate a massive number of users. Classic open channels are the original open channels Sendbird has been providing, and a single classic open channel can handle up to 1,000 participants. On the other hand, dynamic partitioning open channels are designed to accommodate much greater number of users than the classic open channels using subchannels where you can divide users evenly.

Note: Sendbird applications created before December 15, 2020, are using classic open channels. The classic open channels will be deprecated soon, but the classic channels created up until the deprecation date will remain and function the same way. When the deprecation takes place, all Chat SDK users will be automatically migrated to the new dynamic partitioning system. If you wish to convert to dynamic partitioning open channels beforehand, contact our support team.

Learn more about how dynamic partitioning open channel operates in the open channel guide of Platform API.

Note: Sendbird's JavaScript Chat SDK v3.0.140 or later is recommended to use dynamic partitioning open channels.

Ephemeral vs. Persistent

Messages in ephemeral open channels are not saved in the Sendbird's database. This means that old messages pushed out by new ones can't be retrieved as they are one-time data. On the other hand, messages in a persistent open channel are permanently stored in the database, which is the default.


Group channel

A group channel is a chat that allows close interactions among a limited number of users. In order to join a group channel, an invitation from a channel member is required. Depending on how you implement the joining process on the application level, an invited user can automatically join a group channel or manually accept the invitation. Various properties can be leveraged to design different types of group channels that suit your use cases, such as Twitter-style 1-to-1 direct messaging, WhatsApp-style group chat, and more.

Choose a type of a group channel

With our Chat SDK for JavaScript, you can use a variety of behavior related properties when creating different types of group channels. You can create a group channel after configuring these properties.

Private vs. Public

A private group channel can be joined only by users that have accepted an invitation from an existing channel member by default. On the other hand, a public group channel can be joined by any user without an invitation, like an open channel.

A private channel can be used for 1-on-1 conversations, such as clinical consultations and Instagram-style Direct Messages, while a public channel for 1-to-N conversations, such as small group discussions among students.

1-to-1 vs. 1-to-N

The distinct property determines whether to resume an old channel or to create a new one when someone attempts to open a channel with the same members. For a 1-to-1 chat, it is highly recommended that you turn on the distinct property to continuously use the existing channel.

Let's say there is a distinct group channel with user A, B, and C. If you attempt to create a new channel with the same members, the existing channel will be used. This is similar to Twitter-style 1-to-1 direct messaging. If the distinct property of the channel is set to false, a new channel will be created.

Note: The default value of this property is false. When a new member is invited or an existing member leaves the channel, then distinct of the channel is automatically turned off as well.

Supergroup vs. Group

For occasions that demand engagement among a relatively high volume of members, you can create a Supergroup channel, an expanded version of a group channel. It can be used for midsize conferences or large group discussions, such as company-wide stand-ups.

When the super property is set to true, a Supergroup channel will be created and up to tens of thousands members can gather in the channel. The maximum number of members for a Supergroup channel can be adjusted depending on your Chat subscription plan.

Note: When the super property is set to true, the distinct property can't be supported.

Ephemeral vs. Persistent

Messages sent in an ephemeral group channel are not saved in Sendbird's database. As such, old messages that are pushed out of a user's chat view due to new messages can't be retrieved. On the other hand, messages sent in a persistent group channel are stored permanently in the database by default.


Supergroup channel

A Supergroup channel is an expanded version of a group channel, which can accommodate a massive number of members while serving the same functions as a group channel. The maximum number can stretch up to tens of thousands of members depending on your Sendbird plan. Because a Supergroup channel is built upon the same foundation as a group channel, Platform APIs and SDK functions for both channel types are identical.

Note: Supergroup and group channels are alike in terms of Platform API and SDK design, except for the isSuper. The is_super property indicates whether the channel is a Supergroup channel or a group channel.

Use cases

Supergroup channels can be used for a wide range of occasions that demand real-time engagement among a large number of users. One of the common use cases for Supergroup channels is community building, ranging from public forums to private events with a large membership.

  • Ask-me-anything events: Supergroup channels also work as a platform for users to seek advice from an influencer or expert, such as Reddit Chat.

  • Gaming community: Another common set-up is gaming communities, where users gather to find players to team up with or exchange ideas and strategies to advance further in the game.

  • Stand-ups: Supergroup channels are a great place for midsize conferences, such as a organization-wide stand-up.

Note: To learn about differences among open channels, group channels, and Supergroup channels, see Channel types.

Limitations

To secure stable operation and optimized user experience of a Supergroup channel, a few functions are subject to limits. Some of those limitations include:

  • Visual interactions: read and delivery receipts aren’t supported in Supergroup channels to provide an optimal performance in Supergroup channels.

  • Unread counts: unread counts are marked up to 100 only. In the case they surpass 100, we suggest you display the counts as 99+ to avoid confusion.

  • Push notifications: The way push notifications for Supergroup channels work is determined by two factors: the number of members in a channel and the online status of its member.

    • When there are less than 100 members: A push notification will be sent for every message created in the channel.

    • When there are 100 members or more: A ten-minute time window will be applied to Supergroup channels with more than 100 members. Once the number of members exceeds 100 and a new message is created, a push notification will be sent for the new message and then the next push notification can come ten minutes after that.
      For example, the number of members in Channel A surpasses 100 at 13:00 and then a new message is sent at 13:01, a push notification will be sent for the 13:01 message and the ten-minute time window begins. For the following ten minutes, there will be no push notifications for any messages created within the time frame. When ten minutes pass and another message is sent at 13:11, the second push notification will be made for that message.

    • When a user becomes active: If one of the Supergroup channel members enters the channel and reads a message, the user will be recognized as active. Then only for the following one minute, the user will be receiving push notifications for all messages sent within the time frame.


Comparing channel types

The optimal use cases for each channel type can vary because different channels support different features. The following tables compare open channels, group channels, and Supergroup channels in terms of possible use cases and supported features.

Use cases by channel type

Choose which channel type to use based on key factors such as the duration of a chat and the number of users participating in it. The following table lists possible use cases for each channel type.

TypeUsed for

Open channel

- Short-lived live events, such as concerts and streaming.
- News-feed type messaging to massive audience, such as Twitter-style feed.
- Events that don't require a permanent membership.

Group channel

- Private 1-on-1 conversations, such as clinical consultations and Instagram-style Direct Messages.
- Public 1-to-N conversations, such as small group discussions among students.
- Invitation-only chats with a handful group of users.

Supergroup channel

- Ask-me-anything type events with a large number of users.
- Midsize conferences for regular updates, such as company-wide meetings.

Comparison of channel types

The following table compares the difference among two types of channels.

Open channelGroup channelSupergroup channel

Maximum number in a channel

Up to millions of participants

100 members

Up to tens of thousands of members depending on your Sendbird plan.

Accessible by

Anyone within the application

Invited users only if private or anyone if public

Invited users only if private or anyone if public

Ephemeral messaging

Supported

Supported

Supported

Online presence

Supported

Supported

Supported

Last message

N/A

Supported

Supported

UIKit

Supported

Supported

Supported

Operators

Supported

Supported

Supported

Ban users

Supported

Supported

Supported

Mute users

Supported

Supported

Supported

Freeze channels

Supported

Supported

Supported

Delivery receipts

N/A

Supported

N/A

Read receipts

N/A

Supported

N/A

Unread counts

N/A

Supported

Supported

* Up to 100 unread counts are supported.

Typing indicators

N/A

Supported

Supported

* Up to 3 concurrent indicators are supported.

Mention others in message

Supported

Supported

Supported

Mention counts

N/A

Supported

Supported

Reactions

N/A

Supported

Supported

Spam flood protection

Supported

Supported

Supported

Chatbot interface

Supported

Supported

Supported

Smart throttling

Supported (Default: true)

Supported (Default: false)

Supported (Default: false)

Push notifications

N/A

* Push notifications for announcements only.

Supported

* Push notifications for every message sent.

Supported

* Refer to Limitations.

View a channel with its participant list or member list

N/A

Supported

Supported

* Only ten members are retrieved as a preview.
To get an entire list of members, use the list members API instead.

Pagination for participant list or member list

Supported

Supported

Supported

Order of channel list

- Chronological

- Chronological
- Latest last message
- Channel name
- Metadata value

- Chronological
- Latest last message
- Channel name
- Metadata value


Functionalities by topic

Users can interact with other users in a channel by sending, receiving, replying to messages, and more. The following is a list of features that our Chat SDK provides. All the functionalities are supported in both open channels and group channels, unless noted otherwise.

Creating a channel

FunctionalityDescriptionOpen channelGroup channel

Create a channel

Creates a channel where users can chat.

Managing operators

FunctionalityDescriptionOpen channelGroup channel

Register and remove operators in a channel

Adds and removes users as operators to a channel.

Joining and leaving a channel

FunctionalityDescriptionOpen channelGroup channel

Enter and exit an open channel

Users can enter and exit open channels to receive messages.

Join and leave a group channel

Users can join and leave group channels to receive messages.

Retrieving channels

FunctionalityDescriptionOpen channelGroup channel

Retrieve a list of channels

Retrieves a list of channels.

Retrieve a channel by URL

Retrieves a channel by its URL.

Inviting users to a group channel

FunctionalityDescriptionOpen channelGroup channel

Invite users as members

Invites new users to a channel which is performed only by the members of a group channel.

Accept or decline an invitation

Accepts or declines invitation to join a group channel.

Searching channels

FunctionalityDescriptionOpen channelGroup channel

Search open channels by name, URL, or custom types

Searches for specific open channels by using a keyword.

Search group channels by name, URL, or other filters

Searches for specific group channels by using name, URL, or several types of filters.

Filter group channels by user IDs

Filters group channels by using user IDs.

Categorizing channels

FunctionalityDescriptionOpen channelGroup channel

Categorize channels by custom type

Specifies a custom channel to subclassify channels.

Managing channels

FunctionalityDescriptionOpen channelGroup channel

Delete a channel

Deletes a channel which only operators can do.

Hide or archive a group channel

Hides or archives a specific group channel from a list of the channels.

Refresh all data related to a group channel

Updates the user's group channels with the latest information.

Moderating a channel

FunctionalityDescriptionOpen channelGroup channel

Freeze and unfreeze a channel

Temporarily disables various functions of a channel.

Managing channel metadata

FunctionalityDescriptionOpen channelGroup channel

Manage channel metadata

Store additional information to a channel. You can create, retrieve, update and delete the additional information.

Managing channel metacounter

FunctionalityDescriptionOpen channelGroup channel

Manage metacounter

Store additional numerical information to a channel. You can create, retrieve, update and delete the additional information.