Prerequisites
| Requirement | Version |
|---|---|
| npm | 8.x or above |
| Node.js | 16 or above |
- App ID
- Region
- Auth Key (for development)
Setup Steps
Install the SDK
Add the CometChat SDK to your project via npm or CDN. See Installation.
Initialize CometChat
Configure and initialize the SDK with your App ID and Region. See Initialization.
Authenticate users
Log in users to start sending and receiving messages. See Authentication.
Framework Guides
Using an SSR framework? The SDK requires browser APIs and needs client-side initialization:Next.js
Dynamic imports with useEffect
NuxtJS
Client-side mounted hook
Ionic/Cordova
Direct SDK usage
Migrating from V3 to V4? Your existing app can be migrated — no need to create a new one. See Upgrading from V3.
Quick Reference
Pages in This Section
Installation
Add the SDK via npm or CDN
Initialization
Configure and initialize the SDK
SSR Compatibility
Next.js, Nuxt, and Ionic setup
Authentication
Log in users with Auth Key or Token