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
This guide covers the fundamental concepts you need to understand when building with CometChat.

CometChat Dashboard

The CometChat Dashboard enables you to create new apps (projects) and manage your existing apps.
  • For every app, a unique App ID is generated. This App ID is required when integrating CometChat within your app.
  • Along with the App ID, you will need to create an Auth Key (from the Dashboard) which can be used for user authentication.
Ideally, create two apps — one for development and one for production. Use a single app regardless of the number of platforms. Do not create separate apps for every platform; if you do, your users on different platforms will not be able to communicate with each other.

API Keys

You can generate two types of keys from the dashboard:
TypePrivilegesRecommended Use
Auth KeyCreate & login usersClient-side code (development only)
REST API KeyPerform any CometChat operationServer-side code only
Never expose your REST API Key in client-side code. Use Auth Tokens for production authentication.

Users

A user is anyone who uses CometChat. Each user is uniquely identified using 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

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

CometChat does not handle user management or friends management. You handle registration and login in your app, then log users into CometChat programmatically.
Your AppYour ServerCometChat
User registersStore user info in your databaseCreate user via REST API (UID & name)
User logs inVerify credentials, retrieve user IDLog in user programmatically with UID
User sends friend requestDisplay request to potential friendNo action required
User accepts friend requestDisplay users as friendsAdd both users as friends via REST API

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.

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

TypeVisibilityParticipation
PublicAll usersAny user can join
PasswordAll usersUsers with valid password can join
PrivateMembers onlyUsers must be invited (auto-joined)

Member Scopes

Once a user joins a group, they become a member with one of three scopes:
ScopeDefaultPrivileges
AdminGroup creatorFull control: manage members, change scopes, kick/ban anyone, update/delete group
ModeratorModerate: change participant scopes, kick/ban participants, update group
ParticipantAll other membersBasic: send & receive messages and calls

Message Categories

Every message belongs to one of these categories:
CategoryTypesDescription
messagetext, image, video, audio, fileStandard messages
customDeveloper-definedCustom data (e.g., location, polls)
actiongroupMember, messageSystem-generated (joins, edits, deletes)
callaudio, videoCall-related messages
For more details, see the Message Structure and Hierarchy guide.

Glossary

TermDefinitionLearn More
UIDUnique User Identifier — alphanumeric string you assign to each userUsers Overview
GUIDGroup Unique Identifier — alphanumeric string you assign to each groupGroups Overview
Auth KeyDevelopment-only credential for quick testing. Never use in productionAuthentication
Auth TokenSecure, per-user token generated via REST API. Use in productionAuthentication
REST API KeyServer-side credential for REST API calls. Never expose in client codeCometChat Dashboard
Receiver TypeSpecifies if a message target is a user or groupSend Message
ScopeGroup member scope: admin, moderator, or participantChange Member Scope
ListenerCallback handler for real-time events (messages, presence, calls, groups)All Real-Time Listeners
ConversationA chat thread between two users or within a groupRetrieve Conversations
MetadataCustom JSON data attached to users, groups, or messagesSend Message
TagsString labels for categorizing users, groups, conversations, or messagesAdditional Filtering
RequestBuilderBuilder pattern class for constructing filtered/paginated queriesAdditional Filtering
AppSettingsConfiguration object for initializing the SDK (App ID, Region, presence)Setup SDK
Transient MessageEphemeral message not stored on server (typing indicators, live reactions)Transient Messages
Interactive MessageMessage with actionable UI elements (forms, cards, buttons)Interactive Messages

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