Table of Contents

Understanding Channels in Sendbird Chat

Understanding Channels in Sendbird Chat

Alex Preston
Solutions Engineer
Tutorial Type: Basic Reading Time: 5 mins Building Time: 10 mins
APIBasicChatAndroidiOSJSSDK

Introduction

This guide explains another core Sendbird concept: Channels. Channels are fundamental to a solid implementation of Sendbird within your app. By the end of this guide, you will understand the various types of Channels within Sendbird. You will also understand how to create, update, delete, and view Channel objects. Please note that while some implementations will vary from platform to platform, the core concepts remain the same across all SDKs.

We’ll cover:

  • The two main types of Channels and their use cases
  • How to create, view, update, and delete Channels

Let’s get started! 💻

What are Channels in Sendbird?

Sendbird Channels are essential to all chat interactions. Users belong to them, and messages are sent in them. Sendbird provides different types of Channels to support various use cases. This guide will cover the two main types of channels: Group Channels and Open Channels. We will also talk about how you can use them.Sendbird Channels diagram

Diagram 1. Relationship between users, messages, and a channel.

Group Channels

Group Channels are the most used Channel type within Sendbird. Group Channels allow for close interactions among a small group (up to 100) of users. From a developer standpoint, this Channel type offers a greater deal of customization and control. This comes in the form of read and delivery receipts, reactions, push notifications, mentions, and much more. For a full list of features, check out the docs.

There are two main types of Group Channels: private and public.

Public: A Public Channel is a Channel which any user can join without an invitation.

Private: A Private Channel is a Channel which only invited users can access.

While Group Channels, by default, can have up to 100 members in capacity, many of our customers use them for 1:1 interactions to create a more intimate conversation. These conversations should be defined as distinct, which means any time a user tries to initiate a new discussion with a similar user, the same Channel will be reused. This feature is especially relevant for dating, on-demand, or healthcare apps.

Please see the docs for the full resource representation of a Group Channel.

In the situation where you’d like to use Group Channels with more than 100 participants, check out Supergroup Channels. These can have over 2,000 members in a single Channel with a Pro plan and up to 20,000 members with an Enterprise plan.

Open Channels

The other main type of Channel is the Open Channel. Unlike Group Channels, membership for Open Channels is not permanent and only exists while users are connected. This is a Public Channel that hosts a large number of online users, who can enter and contribute to the conversation without any invitation. This type of channel supports fewer features and event notifications to enable larger audiences. For a complete list of features, check out the docs.

There are two different types of Open Channels: Classic and Dynamically partitioned.

Classic: This is the default type of Open Channel. This Channel allows for up to 1,000 participants in a given Channel. (Please note that classic was deprecated in lieu of dynamic partitioned Channels in March 2021).

Dynamic partitioned: This type of Channel was designed to accommodate massive amounts of users. They range anywhere from 20,000 participants in shared regions and up to 60,000 users in a dedicated region. Contact our sales team if you wish to increase the number beyond 60,000 participants. Open Channels are used for live sporting events, in-game chat, and chat rooms. For the full resource representation of a group Channel please see the docs.

How to create, view, update, and delete a Channel

By default, Channels can be created, updated, reviewed, and deleted via Sendbird’s:

  • Platform API
  • iOS SDK
  • Android SDK
  • Javascript SDK

Remember that a Channel object contains all of the high level data for the conversation between its members.

The Channel object interacts with the SDKs. Some interactions provide real-time communication through Websockets, and other services automatically contact Sendbird to send or fetch data via secure HTTPS requests.

Creating Channels

Creating new Group Channel

Image 2 – How to create a channel

Dashboard

  • Click on either the Open Channel or Group Channel tab on the left side
  • Click “Create Channel +’
  • Fill out the relevant information
  • Click create

Platform API

Refer to the docs to understand how to create Channels with a Platform API call.

SDK

  • In general, Channels are typically created via the Platform API or the SDK
  • For use cases in which you wish to limit a user’s ability to create Channels, you can restrict Channel creation to the platform API only

Reviewing Channels

Reviewing Channels

Image 3 – Viewing channels and associated information

Dashboard

(Please note that viewing Channels via the dashboard is a moderation premium feature)

  • Click on either the Open Channel, or Group Channel tab on the left side
  • Click the Channel you wish to view
  • This view allows you to perform various moderation tasks as well as view Channels

Platform API

Refer to the docs to learn more about reviewing Channels via Platform API call.

SDK

  • The SDK provides a means to view a list of Channels, as well as to view individual Channels

Updating Channels

Updating Channels

Image 4 – How to update channel information

Dashboard

  • Click on either the Open Channel, or Group Channel tab on the left side
  • Select the relevant Channel
  • Click the edit button in the top right corner
  • Edit the information needed
  • Click update

Platform API

Check out the docs to understand how to update Channels with a Platform API call.

SDK

  • Channels can be updated via the SDK on all platforms
  • If needed, this operation can be restricted to be done only via platform API

Deleting Channels

Delete Channels

Image 5 – Deleting a channel

Dashboard

  • Click on either the Open Channel or Group Channel tab on the left side
  • Click the checkbox next to the Channel(s) you wish to delete
  • Click Delete

Platform API

Refer to the docs to learn how to delete Channels by Platform API call.

SDK

  • The SDKs provide a means to delete Channels via the SDK. This is limited to an operator-only action
  • This can also be limited to the Platform API only

Congratulations

This guide should have given you a solid understanding of Channels, types of Channels, their use cases, and how they can be manipulated via CRUD operations. From here, we recommend checking out the related documentation for both Open and Group Channels as there are many more advanced concepts and features that can help you create a world-class application.

Happy chat building! ✌

This site is registered on wpml.org as a development site.