/ SDKs / JavaScript
SDKs
Chat SDKs JavaScript v4
Chat SDKs JavaScript
Chat SDKs
JavaScript
Version 4

Overview

Copy link

Before starting to build a chat service, it's important to understand the core functionalities of your Sendbird application. By learning how to manage connections with the Sendbird server, authenticate users, and understand how rate limits work, you can build a chat in your app that ensures optimal performance and stability.

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


Functionalities by topic

Copy link

The following is a list of basic functionalities for application management that our Chat SDK provides.

Authenticating a user

Copy link
FunctionalityDescriptionOpen channelGroup channel

Initialize the Chat SDK with APP_ID

Initializes the Chat SDK by passing APP_ID of your Sendbird application as an argument to a parameter in SendbirdChat.init().

Connect to the Sendbird server with a user ID

Authenticates a user using a unique user ID and connect to the Sendbird server.

Connect to the Sendbird server with a user ID and a token

Authenticates a user using either a unique user ID or a token and connect to the Sendbird server.

Set a session handler

Sets a session handler to automatically refresh a user's session token when it's expired.

Disconnect from the Sendbird server

Disconnects a user from the Sendbird server when they no longer need to receive messages from an online state.

Disconnect the WebSocket only

Disconnects only the WebSocket, keeping all locally cached data.

Understanding rate limits

Copy link
FunctionalityDescriptionOpen ChannelGroup channel

Default settings

Sendbird applications have default limits on the number of messages per second that a user can send.

Rate-limited methods

Rate limits are applied to SDK methods that are associated with objects such as channel, user, and message.

Rate-limited real-time events

Some real-time events taking place in client apps are rate-limited.

Error responses

When a request is rate-limited, two types of errors are returned.