Skip to main content
npm install @cometchat/chat-sdk-react-native
import { CometChat } from "@cometchat/chat-sdk-react-native";

// 1. Initialize (once at app startup)
const appSettings = new CometChat.AppSettingsBuilder()
  .setRegion("APP_REGION") // e.g. "us", "eu", "in"
  .subscribePresenceForAllUsers()
  .autoEstablishSocketConnection(true)
  .build();

await CometChat.init("APP_ID", appSettings);

// 2. Login (check session first)
const existing = await CometChat.getLoggedinUser();
if (!existing) {
  await CometChat.login("cometchat-uid-1", "AUTH_KEY"); // dev only — use Auth Token in production
}
Credentials: App ID, Region, Auth Key from CometChat Dashboard Test UIDs: cometchat-uid-1 through cometchat-uid-5
The CometChat React Native SDK lets you add real-time messaging, voice, and video calling to any React Native application.

Requirements

RequirementMinimum Version
npm8.x
Node.js16
React Native0.63
Android minSdkVersion24
iOS11.0

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 building

Send your first message, make a call, or manage users and groups.

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, 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 Native Sample App

React Native sample app with UI components

UI Kits

Skip the UI work — use pre-built, customizable components:

React Native UI Kit

React Native 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