Production-ready messaging for web and mobile, ready to drop into your stack.
Building with an AI agent? Install this skill and start building instantly.
Use our pre-built UI kits or SDKs to add chat to your website or mobile app instantly.
Get a fully functional chat interface in minutes. Configure via our ui kit builder — no complex setup required.
Build your own chat interface using individual components. Each component includes built-in chat logic.
Build your own UI from scratch with our complete SDK feature set.
Add chat to any website with a simple script tag. Perfect for customer support and community chat.
Sync your user database with CometChat for a seamless experience.
See CometChat in action. Clone these sample apps to get started quickly.
Explore our core offerings to power your in-app communication needs.
Enhance your app with these powerful communication features.
Additional solutions to customize your CometChat experience.
Quick links to deeper integration guides, API references, and community support.
Adjust the widget width & height.
**isDocked = true** - appears as icon on page and expands when clicked.
**isDocked = false** - appears embedded on the page.
| | `variantID` | Specifies a particular version or snapshot of your widget configuration. If omitted, the first available variant is used. | | `chatType` | Determines the type of conversation the widget initiates by default (one-on-one user chat or a group chat). | | `defaultChatID` | The specific chat with user (`uid`) or group (`guid`) that should automatically open when the widget loads. | | `dockedAlignment` | Controls the position of the docked widget interface on the page (left side or right side). | | `autoOpenFirstItem` | When set to `false`, the widget does not automatically open the first conversation on load. Defaults to `true`. | ## 2. Create + Log In User On The Fly **Use this when:** * Every person already has an ID inside your product (email, username etc.) * You want that ID to drive their chat identity automatically ### Copy this into `` ```html theme={null} ``` ### Copy this into `` ```html lines highlight={8-9, 11, 14, 16, 20-22, 27-29} theme={null} ``` ### Update these values | Setting | What to enter / where to find it | | --------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `appID`, `region`, `authKey` | Copy from **[Dashboard](https://app.cometchat.com)** | | `uid` | Pass the unique ID from your page (for example `customer.id`). CometChat creates the user the first time it sees that ID. | | `language` | Optional locale for the widget UI. Defaults to `en-US`. Supported: `en-US`, `en-GB`, `fr`, `de`, `es`, `hi`, `ja`, `zh`, `zh-TW`, `pt`, `ru`, `it`, `nl`, `tr`, `ko`, `sv`, `ms`, `lt`, `hu`. | | `user.name`, `user.avatar`, `user.link` | Optional profile info you already store for that person. | | `mode` | Keep this as `"uid"` so the widget knows you’re logging in with IDs. | | `width`, `height`, `isDocked` |Adjust the widget width & height.
**isDocked = true** - appears as icon on page and expands when clicked.
**isDocked = false** - appears embedded on the page.
| | `variantID` | Specifies a particular version or snapshot of your widget configuration. If omitted, the first available variant is used. | | `chatType` | Determines the type of conversation the widget initiates by default (one-on-one user chat or a group chat). | | `defaultChatID` | The specific chat with user (`uid`) or group (`guid`) that should automatically open when the widget loads. | | `dockedAlignment` | Controls the position of the docked widget interface on the page (left side or right side). | | `autoOpenFirstItem` | When set to `false`, the widget does not automatically open the first conversation on load. Defaults to `true`. | ## 3. Backend-Created User (Auth Token Login) **Use this when:** * People sign in through your backend, and you generate their CometChat auth token server-side. **Server-side flow (auth token login):** 1. Authenticate the user in your app. 2. If it’s their first time, call **Create User** ([https://www.cometchat.com/docs/rest-api/users/create](https://www.cometchat.com/docs/rest-api/users/create)) — you can also request an auth token in that call. 3. For returning users, call **Create Auth Token** ([https://www.cometchat.com/docs/rest-api/auth-tokens/create](https://www.cometchat.com/docs/rest-api/auth-tokens/create)) to issue a fresh token. 4. Send the token to the browser and place it in the widget config below. 5. The same token works for the CometChat Widget, UI Kit, or SDK. Full walkthrough: [How to properly log in and create users in CometChat](https://community.cometchat.com/t/how-to-properly-log-in-and-create-users-in-cometchat/31). ### Copy this into `` ```html theme={null} ``` ### Copy this into `` ```html lines highlight={8-9, 11, 13, 15, 19-20} theme={null} ``` ### Update these values | Setting | What to enter / where to find it | | ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `appID`, `region` | Copy from **[Dashboard](https://app.cometchat.com)** | | `mode` | Keep as `"authToken"` so the widget expects a server-issued token. | | `authToken` | Generate on your **server**: (1) call the CometChat Auth Token API with your API key, (2) get the token for that user, (3) send it to the page and place it here. | | `language` | Optional locale for the widget UI. Defaults to `en-US`. Supported: `en-US`, `en-GB`, `fr`, `de`, `es`, `hi`, `ja`, `zh`, `zh-TW`, `pt`, `ru`, `it`, `nl`, `tr`, `ko`, `sv`, `ms`, `lt`, `hu`. | | `width`, `height`, `isDocked` |Adjust the widget width & height.
**isDocked = true** - appears as icon on page and expands when clicked.
**isDocked = false** - appears embedded on the page.
| | `variantID` | Specifies a particular version or snapshot of your widget configuration. If omitted, the first available variant is used. | | `chatType` | Determines the type of conversation the widget initiates by default (one-on-one user chat or a group chat). | | `defaultChatID` | The specific chat with user (`uid`) or group (`guid`) that should automatically open when the widget loads. | | `dockedAlignment` | Controls the position of the docked widget interface on the page (left side or right side). | | `autoOpenFirstItem` | When set to `false`, the widget does not automatically open the first conversation on load. Defaults to `true`. | # CometChat Widget Builder For HTML Source: https://www.cometchat.com/docs/widget/html/overview CometChat Widget Builder for HTML is a no-code solution that lets you embed a fully functional chat interface into any HTML website using a simple code snippet. It provides a ready-to-use chat widget backed by CometChat's real-time infrastructure — no frontend framework required. With CometChat Widget Builder, you can: * Embed chat and calling into any HTML page * Customize themes, colors, and typography * Toggle features on and off * Go live with a simple embed code snippet The widget connects to CometChat's SDK and infrastructure, which manages message transport, sync, and backend scaling.Adjust the widget width & height.
**isDocked = true** - appears as icon on page and expands when clicked.
**isDocked = false** - appears embedded on the page.
| | `variantID` | Specifies a particular version or snapshot of your widget configuration. If omitted, the first available variant is used. | | `chatType` | Determines the type of conversation the widget initiates by default (one-on-one user chat or a group chat). | | `defaultChatID` | The specific chat with user (`uid`) or group (`guid`) that should automatically open when the widget loads. | | `dockedAlignment` | Controls the position of the docked widget interface on the page (left side or right side). | | `autoOpenFirstItem` | When set to false, the widget does not automatically open the first conversation on load. Defaults to true. | *** ## 2. Create + Log In User On The Fly **Use this when:** you already have user IDs (email, username, member ID) and want to log people in with that ID automatically. CometChat creates the user the first time it sees the ID. ### Add this to Site Settings → Custom Code → Head Code ```html theme={null} ``` ### Paste this into the Webflow Embed ```html theme={null} ``` ### Update these values | Setting | What to enter / where to find it | | --------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `appID`, `region`, `authKey` | Copy from **[Dashboard](https://app.cometchat.com)** | | `uid` | Pass the unique ID from your page (for example `member.id`, email, or a UUID). CometChat creates the user the first time it sees that ID. | | `language` | Optional locale for the widget UI. Defaults to `en-US`. Supported: `en-US`, `en-GB`, `fr`, `de`, `es`, `hi`, `ja`, `zh`, `zh-TW`, `pt`, `ru`, `it`, `nl`, `tr`, `ko`, `sv`, `ms`, `lt`, `hu`. | | `user.name`, `user.avatar`, `user.link` | Optional profile info you already store for that person. | | `mode` | Keep this as `"uid"` so the widget knows you’re logging in with IDs. | | `width`, `height`, `isDocked` |Adjust the widget width & height.
**isDocked = true** - appears as icon on page and expands when clicked.
**isDocked = false** - appears embedded on the page.
| | `variantID` | Specifies a particular version or snapshot of your widget configuration. If omitted, the first available variant is used. | | `chatType` | Determines the type of conversation the widget initiates by default (one-on-one user chat or a group chat). | | `defaultChatID` | The specific chat with user (`uid`) or group (`guid`) that should automatically open when the widget loads. | | `dockedAlignment` | Controls the position of the docked widget interface on the page (left side or right side). | | `autoOpenFirstItem` | When set to false, the widget does not automatically open the first conversation on load. Defaults to true. | ### Memberstack auto-login (Webflow + Memberstack, still UID flow) Use this when your Webflow site uses Memberstack and you want the widget to log members in automatically (with a persistent guest fallback). **Step 1 — add Memberstack to Head (Site Settings → Custom Code → Head):** ```html theme={null} ``` **Step 2 — add the chat widget (Site Settings → Custom Code → Footer, or a page Embed):** ```html theme={null} ``` **Optional (without reload):** listen for Memberstack auth changes and swap users/guests. ```html theme={null} ``` *** ## 3. Backend-Created User (Auth Token Login) **Use this when:** people sign in through your backend and you generate their CometChat auth token server-side. This keeps your Auth Key off the page. **Server-side flow (auth token login):** 1. Authenticate the user in your app. 2. If it’s their first time, call **Create User** ([https://www.cometchat.com/docs/rest-api/users/create](https://www.cometchat.com/docs/rest-api/users/create)) — you can also request an auth token in that call. 3. For returning users, call **Create Auth Token** ([https://www.cometchat.com/docs/rest-api/auth-tokens/create](https://www.cometchat.com/docs/rest-api/auth-tokens/create)) to issue a fresh token. 4. Send the token to the browser and place it in the widget config below. 5. The same token works for the CometChat Widget, UI Kit, or SDK. Full walkthrough: [How to properly log in and create users in CometChat](https://community.cometchat.com/t/how-to-properly-log-in-and-create-users-in-cometchat/31). ### Paste this into the Webflow Embed ```html theme={null} ``` ### Update these values | Setting | What to enter / where to find it | | ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `appID`, `region` | Copy from **[Dashboard](https://app.cometchat.com)** | | `mode` | Keep as `"authToken"` so the widget expects a server-issued token. | | `authToken` | Generate on your **server**: (1) call the CometChat Auth Token API with your API key, (2) get the token for that user, (3) send it to the page and place it here. | | `language` | Optional locale for the widget UI. Defaults to `en-US`. Supported: `en-US`, `en-GB`, `fr`, `de`, `es`, `hi`, `ja`, `zh`, `zh-TW`, `pt`, `ru`, `it`, `nl`, `tr`, `ko`, `sv`, `ms`, `lt`, `hu`. | | `width`, `height`, `isDocked` |Adjust the widget width & height.
**isDocked = true** - appears as icon on page and expands when clicked.
**isDocked = false** - appears embedded on the page.
| | `variantID` | Specifies a particular version or snapshot of your widget configuration. If omitted, the first available variant is used. | | `chatType` | Determines the type of conversation the widget initiates by default (one-on-one user chat or a group chat). | | `defaultChatID` | The specific chat with user (`uid`) or group (`guid`) that should automatically open when the widget loads. | | `dockedAlignment` | Controls the position of the docked widget interface on the page (left side or right side). | | `autoOpenFirstItem` | When set to false, the widget does not automatically open the first conversation on load. Defaults to true. | *** ### Troubleshooting * **Widget not appearing?** Ensure the Embed is set to **Code** and the script loads (`chat-embed@1.x.x`). Publish the site after adding the snippet. * **Login/auth errors?** For UID mode, ensure the `uid` is unique and you’re using an **App Auth Key** (not REST API key). For auth token mode, make sure the token matches the logged-in user. * **Only guests showing?** Confirm you’re providing `uid` or `authToken` in the snippet and that your page logic passes the right IDs. * **Embed clipped?** Resize the Embed element to give the widget enough space (`width`/`height` also configurable in the config). *** ## Advanced JavaScript Controls The embed works out of the box. Use the helpers below only if you need to open a specific chat, listen for widget events, or change settings on the fly. ### Before you follow advanced setup steps 1. Keep the standard widget snippet (from the Integration guide) on your page. 2. Add another ` ``` ### Update these values | Setting | What to enter / where to find it | | --------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `appID`, `region`, `authKey` | Copy from **[Dashboard](https://app.cometchat.com)** | | `language` | Optional locale for the widget UI. Defaults to `en-US`. Supported: `en-US`, `en-GB`, `fr`, `de`, `es`, `hi`, `ja`, `zh`, `zh-TW`, `pt`, `ru`, `it`, `nl`, `tr`, `ko`, `sv`, `ms`, `lt`, `hu`. | | `user.name`, `user.avatar`, `user.link` | Optional guest display info—leave blank if you don’t need it. | | `width`, `height`, `isDocked` |Adjust the widget width & height.
**isDocked = true** - appears as icon on page and expands when clicked.
**isDocked = false** - appears embedded on the page.
| | `variantID` | Specifies a particular version or snapshot of your widget configuration. If omitted, the first available variant is used. | | `chatType` | Determines the type of conversation the widget initiates by default (one-on-one user chat or a group chat). | | `defaultChatID` | The specific chat with user (`uid`) or group (`guid`) that should automatically open when the widget loads. | | `dockedAlignment` | Controls the position of the docked widget interface on the page (left side or right side). | | `autoOpenFirstItem` | When set to false, the widget does not automatically open the first conversation on load. Defaults to true. | *** ## 2. Create + Log In User On The Fly **Use this when:** you already have user IDs (email, username, member ID) and want to log people in with that ID automatically. CometChat creates the user the first time it sees the ID. ### Paste this into the Wix Embed HTML element ```html theme={null} ``` ### Update these values | Setting | What to enter / where to find it | | --------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `appID`, `region`, `authKey` | Copy from **[Dashboard](https://app.cometchat.com)** | | `uid` | Pass the unique ID from your page (for example `member.id`, email, or a UUID). CometChat creates the user the first time it sees that ID. | | `language` | Optional locale for the widget UI. Defaults to `en-US`. Supported: `en-US`, `en-GB`, `fr`, `de`, `es`, `hi`, `ja`, `zh`, `zh-TW`, `pt`, `ru`, `it`, `nl`, `tr`, `ko`, `sv`, `ms`, `lt`, `hu`. | | `user.name`, `user.avatar`, `user.link` | Optional profile info you already store for that person. | | `mode` | Keep this as `"uid"` so the widget knows you’re logging in with IDs. | | `width`, `height`, `isDocked` |Adjust the widget width & height.
**isDocked = true** - appears as icon on page and expands when clicked.
**isDocked = false** - appears embedded on the page.
| | `variantID` | Specifies a particular version or snapshot of your widget configuration. If omitted, the first available variant is used. | | `chatType` | Determines the type of conversation the widget initiates by default (one-on-one user chat or a group chat). | | `defaultChatID` | The specific chat with user (`uid`) or group (`guid`) that should automatically open when the widget loads. | | `dockedAlignment` | Controls the position of the docked widget interface on the page (left side or right side). | | `autoOpenFirstItem` | When set to false, the widget does not automatically open the first conversation on load. Defaults to true. | *** ## 3. Backend-Created User (Auth Token Login) **Use this when:** people sign in through your backend and you generate their CometChat auth token server-side. This keeps your Auth Key off the page. **Server-side flow (auth token login):** 1. Authenticate the user in your app. 2. If it’s their first time, call **Create User** ([https://www.cometchat.com/docs/rest-api/users/create](https://www.cometchat.com/docs/rest-api/users/create)) — you can also request an auth token in that call. 3. For returning users, call **Create Auth Token** ([https://www.cometchat.com/docs/rest-api/auth-tokens/create](https://www.cometchat.com/docs/rest-api/auth-tokens/create)) to issue a fresh token. 4. Send the token to the browser and place it in the widget config below. 5. The same token works for the CometChat Widget, UI Kit, or SDK. Full walkthrough: [How to properly log in and create users in CometChat](https://community.cometchat.com/t/how-to-properly-log-in-and-create-users-in-cometchat/31). ### Paste this into the Wix Embed HTML element ```html theme={null} ``` ### Update these values | Setting | What to enter / where to find it | | ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `appID`, `region` | Copy from **[Dashboard](https://app.cometchat.com)** | | `mode` | Keep as `"authToken"` so the widget expects a server-issued token. | | `authToken` | Generate on your **server**: (1) call the CometChat Auth Token API with your API key, (2) get the token for that user, (3) send it to the page and place it here. | | `language` | Optional locale for the widget UI. Defaults to `en-US`. Supported: `en-US`, `en-GB`, `fr`, `de`, `es`, `hi`, `ja`, `zh`, `zh-TW`, `pt`, `ru`, `it`, `nl`, `tr`, `ko`, `sv`, `ms`, `lt`, `hu`. | | `width`, `height`, `isDocked` |Adjust the widget width & height.
**isDocked = true** - appears as icon on page and expands when clicked.
**isDocked = false** - appears embedded on the page.
| | `variantID` | Specifies a particular version or snapshot of your widget configuration. If omitted, the first available variant is used. | | `chatType` | Determines the type of conversation the widget initiates by default (one-on-one user chat or a group chat). | | `defaultChatID` | The specific chat with user (`uid`) or group (`guid`) that should automatically open when the widget loads. | | `dockedAlignment` | Controls the position of the docked widget interface on the page (left side or right side). | | `autoOpenFirstItem` | When set to false, the widget does not automatically open the first conversation on load. Defaults to true. | *** ### Troubleshooting * **Widget not appearing?** Confirm the HTML Embed is set to **Code** and the script loads (`chat-embed@1.x.x`). Resize the embed box if it’s too small. * **Login/auth errors?** For UID mode, ensure the `uid` is unique and you’re using an **App Auth Key** (not REST API key). For auth token mode, make sure the token matches the logged-in user. * **Still showing guests only?** Make sure you’re actually providing `uid` or `authToken` in the snippet (and that your page logic passes the right IDs). * **Page preview vs published:** Test on a published page if preview blocks scripts. *** ## Advanced JavaScript Controls The embed works out of the box. Use the helpers below only if you need to open a specific chat, listen for widget events, or change settings on the fly. ### Before you follow advanced setup steps 1. Keep the standard widget snippet (from the Integration guide) on your page. 2. Add another `