Skip to main content
The CometChat JavaScript SDK enables you to add real-time messaging, voice, and video calling capabilities to any JavaScript application — whether it’s a web app built with React, Angular, Vue, or vanilla JavaScript.

What You Can Build

  • One-on-one and group messaging
  • Voice and video calling
  • Typing indicators and read receipts
  • User presence (online/offline status)
  • Message reactions and threads
  • File and media sharing
  • Push notifications

Requirements

RequirementVersion
npm8.x or above
Node.js16 or above
The SDK works in all modern browsers (Chrome, Firefox, Safari, Edge) and can be used with SSR frameworks like Next.js and Nuxt.

Getting Started

1

Get your credentials

Sign up for CometChat and create an app. Note your App ID, Region, and Auth Key from the Dashboard.
2

Install and initialize

Add the SDK to your project and initialize it with your credentials. See Setup SDK.
3

Authenticate users

Log in users with Auth Key (development) or Auth Token (production). See Authentication.
4

Start messaging

Send and receive messages in real-time. See Send Messages.

Sample Apps

Explore working examples with full source code:

React

React sample app

Angular

Angular sample app

Vue

Vue sample app

UI Kits

Skip the UI work and use our pre-built components:

React UI Kit

Ready-to-use React components

Angular UI Kit

Ready-to-use Angular components

Vue UI Kit

Ready-to-use Vue components

Chat Widget

For the fastest integration, embed our Chat Widget with just a few lines of code — no SDK knowledge required.

Resources

Key Concepts

Understand UIDs, GUIDs, auth tokens, and core concepts

Changelog

See what’s new in the latest SDK version

Upgrading from V3

Migration guide for V3 users

Troubleshooting

Common issues and solutions