Skip to main content
This guide covers generating call tokens and joining call sessions using the CometChat Calls SDK.

Generate Token

Before joining a call, you need to generate a call token. The token authenticates the user for the specific call session.
The sessionId should be unique for each call. You can use a UUID, a combination of user IDs, or any unique string that identifies the call session.

Join Session with Component

The CometChatCalls.Component renders the call UI. Pass the generated token and call settings to join the session.

Component Props

Session ID Strategies

Choose a session ID strategy based on your use case:

1:1 Calls

For direct calls between two users, create a deterministic session ID:

Group Calls

For group calls, use the group ID or a unique identifier:

Unique Sessions

For one-time calls, generate a unique ID:

Complete Example

Error Handling

Common errors when joining a session: