This guide demonstrates how to add chat to a JavaScript application using CometChat. Before you begin, we strongly recommend you read the Key Concepts guide.Documentation Index
Fetch the complete documentation index at: https://www.cometchat.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
I want to integrate with my app
- Get your application keys
- Add the CometChat dependency
- Initialize CometChat
- Register and Login your user
- Integrate our UI Kits
- Integrate our Chat Widget
I want to explore a sample app (includes UI)
Open the app folder in your favorite code editor and follow the steps mentioned in theREADME.md file.
React Sample App
Angular Sample App
Vue Sample App
Get your Application Keys
Signup for CometChat and then:- Create a new app
- Head over to the API & Auth Keys section and note the Auth Key, App ID & Region
Add the CometChat Dependency
NPM
- JavaScript
cometchat-uid-1 through cometchat-uid-5
SSR: SDK requires browser APIs — initialize client-side only (useEffect / mounted)Requirements
| Requirement | Minimum Version |
|---|---|
| npm | 8.x |
| Node.js | 16 |
Getting Started
Get your credentials
Sign up for CometChat and create an app. Note
your App ID, Region, and Auth Key from the Dashboard.
Install and initialize
Add the SDK to your project and initialize it with your credentials. See
Setup SDK.
Authenticate users
Log in users with Auth Key (development) or Auth Token (production). See
Authentication.
Features
Messaging
1:1 and group chat, threads, reactions, typing indicators, read receipts,
and file sharing.
Voice & Video Calling
Ringing flows, direct call sessions, standalone calling, recording, virtual
backgrounds, and screen sharing.
Users
Create, retrieve, and manage users. Track online/offline presence and
block/unblock users.
Groups
Public, private, and password-protected groups with member management,
roles, and ownership transfer.
Sample Apps
Explore working examples with full source code:React
React sample app
Angular
Angular sample app
UI Kits
Skip the UI work — use pre-built, customizable components:React
React UI Kit
Angular
Angular UI Kit
Resources
Key Concepts
UIDs, GUIDs, auth tokens, and core SDK concepts
Message Structure
Message categories, types, and hierarchy
Changelog
Latest SDK version and release notes
Upgrading from V3
Migration guide for V3 users
Troubleshooting
Common issues and solutions