Overview
The CometChat Calls SDK provides two ways to join a session:Both approaches require a container element in your HTML where the call interface will be rendered.
Container Setup
Add a container element to your HTML where the call interface will be rendered:Generate Token
Generate a call token for the session. Each token is unique to a specific session and user combination.
The method returns an object with:
The
generateToken() method uses the auth token of the currently logged-in user. Ensure a user is logged in before calling this method.Join Session
Use the generated token to join the session along with your call settings and container element.
The method returns an object with:
Complete Example
All participants joining the same call must use the same session ID.