Documentation Index
Fetch the complete documentation index at: https://www.cometchat.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
CometChat Dashboard
The CometChat Dashboard enables you to create new apps (projects) and manage your existing apps.How many apps to create?Ideally, you should create two apps- one for development and one for production. And you should use a single app irrespective 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!
- For every app, a unique App ID is generated. This App ID will be 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.
Auth & Rest API Keys
You can generate two types of keys from the dashboard.| Type | Privileges | Recommended Use |
|---|---|---|
| Auth Key | The Auth Key can be used to create & login users. | In your client side code (during development) |
| Rest API Key | The Rest API Key can be used to perform any CometChat operation. | In your server side code |
Users
A user is anyone who uses CometChat.UID
- Each user is uniquely identified using UID.
- The UID is typically the primary ID of the user from your database.
Auth Token
- A single user can have multiple auth tokens. The auth tokens should be per user per device.
- It should be generated by API call ideally, via server to server call. The auth token should then be given to CometChat for login.
- An Auth Token can only be deleted via dashboard or using REST API.
Authentication
To allow a user to use CometChat, the user must log in to CometChat. CometChat does not handle user management. You must handle user registration and login at your end. Once the user is logged into your app/site, you can log in the user to CometChat programmatically. So the user does not ever directly login to CometChat. CometChat does not handle friends management. If you want to associate friends with your users, you must handle friends management in your app. Once two users are friends (i.e. they have accepted each other as friends), then you can associate them as friends in CometChat.Typical Workflow
| Your App | Your Server | CometChat |
|---|---|---|
| User registers in your app | You store the user information in your database (e.g. ID, name, email, phone, location etc. in users table) | You add the user to CometChat (only ID & name) using the Rest API |
| User logs in to your app | You verify the credentials, login the user and retrieve the user ID | You log in the user to CometChat using the same user ID programmatically |
| User sends a friend request | You display the request to the potential friend | No action required |
| User accepts a friend request | You display the users as friends | You add both the users as friends using the 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.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:| Type | Privileges | Recommended Use |
|---|---|---|
| Auth Key | Create & login users | Client-side code (development only) |
| REST API Key | Perform any CometChat operation | Server-side code only |
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.
| Your App | Your Server | CometChat |
|---|---|---|
| User registers | Store user info in your database | Create user via REST API (UID & name) |
| User logs in | Verify credentials, retrieve user ID | Log in user programmatically with UID |
| User sends friend request | Display request to potential friend | No action required |
| User accepts friend request | Display users as friends | Add both users as friends via REST API |
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
| Type | Visibility | Participation |
|---|---|---|
| Public | All users | Any user can join |
| Password | All users | Users with valid password can join |
| Private | Members only | Users must be invited (auto-joined) |
Member Scopes
Once a user joins a group, they become a member with one of three scopes:| Scope | Default | Privileges |
|---|---|---|
| Admin | Group creator | Full control: manage members, change scopes, kick/ban anyone, update/delete group |
| Moderator | — | Moderate: change participant scopes, kick/ban participants, update group |
| Participant | All other members | Basic: send & receive messages and calls |
Message Categories
Every message belongs to one of these categories:| Category | Types | Description |
|---|---|---|
message | text, image, video, audio, file | Standard messages |
custom | Developer-defined | Custom data (e.g., location, polls) |
action | groupMember, message | System-generated (joins, edits, deletes) |
call | audio, video | Call-related messages |
Glossary
| Term | Definition | Learn More |
|---|---|---|
| UID | Unique User Identifier — alphanumeric string you assign to each user | Users Overview |
| GUID | Group Unique Identifier — alphanumeric string you assign to each group | Groups Overview |
| Auth Key | Development-only credential for quick testing. Never use in production | Authentication |
| Auth Token | Secure, per-user token generated via REST API. Use in production | Authentication |
| REST API Key | Server-side credential for REST API calls. Never expose in client code | CometChat Dashboard |
| Receiver Type | Specifies if a message target is a user or group | Send Message |
| Scope | Group member scope: admin, moderator, or participant | Change Member Scope |
| Listener | Callback handler for real-time events (messages, presence, calls, groups) | All Real-Time Listeners |
| Conversation | A chat thread between two users or within a group | Retrieve Conversations |
| Metadata | Custom JSON data attached to users, groups, or messages | Send Message |
| Tags | String labels for categorizing users, groups, conversations, or messages | Message Filtering |
| RequestBuilder | Builder pattern class for constructing filtered/paginated queries | Message Filtering |
| AppSettings | Configuration object for initializing the SDK (App ID, Region, presence) | Setup SDK |
| Transient Message | Ephemeral message not stored on server (typing indicators, live reactions) | Transient 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