Quick Reference - Generate token and start a standalone call session:
Available via: SDK | UI Kits
Overview
This section demonstrates how to implement calling functionality using only the CometChat Calls SDK, without requiring the Chat SDK. This is ideal for applications that need video/audio calling capabilities without the full chat infrastructure.Before you begin, ensure you have completed the Calls SDK setup.
User Authentication
To start a call session, you need a user auth token. Since this implementation doesn’t use the Chat SDK, you’ll need to obtain the auth token via the CometChat REST API.To understand user authentication in CometChat, see the User Auth documentation.
- Create Auth Token — Creates a new auth token for a user
- Get Auth Token — Retrieves an existing auth token
Generate Call Token
Use thegenerateToken() method to create a call token:
- JavaScript
- TypeScript
Start Call Session
Use theCometChatCalls.Component to render the call UI.
- JavaScript
- TypeScript
End Call Session
To end the call session, callCometChatCalls.endSession() in the onCallEndButtonPressed() callback.
Methods
Switch Camera
Mute Audio
Pause Video
Set Audio Mode
Switch To Video Call
Best Practices
Best Practices
- Generate call tokens just before use — they are session-specific and time-limited
- Use a shared session ID for participants to join the same call
- Secure your auth tokens — generate them server-side and deliver securely to the client
- Clean up listeners on component unmount
- Wrap the call component in a full-screen container
Troubleshooting
Troubleshooting
- Call token generation fails: Verify the auth token is valid and hasn’t expired
- Call UI does not render: Ensure the component is wrapped in a
Viewwith explicit dimensions - Participants can’t join the same call: Both participants must use the exact same
sessionId - Audio or video not working: Check device permissions for camera and microphone
Next Steps
Calls SDK Setup
Install dependencies, configure permissions, and initialize the Calls SDK
Recording
Record call sessions for playback and compliance
Video View Customisation
Customize the main video container and participant tiles
Call Session
Full call session management with the Chat SDK integration