Skip to main content
Key identifiers:
  • UID — Unique User Identifier (alphanumeric, underscore, hyphen)
  • GUID — Group Unique Identifier (alphanumeric, underscore, hyphen)
  • Auth Key — Development-only credential for quick testing
  • Auth Token — Secure per-user token for production use
  • REST API Key — Server-side credential, never expose in client code
Group types: Public | Password | Private Member scopes: Admin | Moderator | Participant Message categories: message | custom | action | call | interactive
This page covers the core concepts you’ll encounter when building with CometChat. Read this before diving into the SDK guides — it’ll make everything else click faster.

Users

A user is anyone who uses CometChat. Each user is uniquely identified by a UID (Unique User Identifier).
  • The UID is typically the primary ID of the user from your database
  • UID can be alphanumeric with underscore and hyphen only — spaces, punctuation, and other special characters are not allowed

User Roles

A role is a category for grouping similar users. For example, group premium users with the role “Premium” to filter users or enable/disable features conditionally.

Authentication

CometChat does not handle user registration or friends management — you handle that in your app, then log users into CometChat programmatically.

API Keys

You can generate two types of keys from the CometChat Dashboard:
Never expose your REST API Key in client-side code. Use Auth Tokens for production authentication.

Auth Tokens

Auth Tokens are secure, per-user credentials for production use:
  • A single user can have multiple auth tokens (one per device)
  • Generate tokens server-side via the REST API
  • Tokens can only be deleted via the Dashboard or REST API

Authentication Flow

Create your apps in the CometChat Dashboard — each app gets a unique App ID required for SDK initialization. Ideally, create two apps — one for development and one for production. Use a single app regardless of the number of platforms; if you create separate apps per platform, your users won’t be able to communicate across them.

Groups

A group enables multiple users to communicate on a particular topic or interest. Each group is uniquely identified using a GUID (Group Unique Identifier).
  • The GUID is typically the primary ID of the group from your database
  • GUID can be alphanumeric with underscore and hyphen only

Group Types

Member Scopes

Once a user joins a group, they become a member with one of three scopes:

Message Categories

Every message belongs to one of these categories: For more details, see the Message Structure and Hierarchy guide.

Glossary


Next Steps

Setup SDK

Install and initialize the CometChat SDK

Authentication

Log users in and manage auth tokens

Send Messages

Send your first text or media message

Groups Overview

Create and manage group conversations