Documentation
Everything you need to add live chat to your site and receive messages in Telegram.
Quick Start
Get from zero to a working chat widget in under 5 minutes.
- 1 Create an account
Sign up at dash.bubblegram.co.
- 2 Create a project
Enter a name and your site's domain (e.g.
example.com). - 3 Connect Telegram
Link a Telegram group so messages are delivered there. See Telegram Setup.
- 4 Embed the script tag
Paste one line of HTML into your site. See Embed the Widget.
- 5 Done.
The chat bubble appears on your site. Visitors send messages; you reply in Telegram. Replies are delivered back to the widget in real time.
Telegram Setup
Bubblegram delivers visitor messages to a Telegram group. Each visitor gets a dedicated topic thread so conversations stay organized.
1. Create a Telegram group
- Open Telegram and tap the pencil icon (or "New Message").
- Choose New Group.
- Add at least one member (you can add yourself from another account, or a teammate).
- Give the group a name, then create it.
2. Enable Topics (Forum mode)
Topics allow each visitor to get their own thread inside the group. Without this, all messages arrive in one mixed stream.
- Open the group, tap the group name at the top.
- Tap Edit (pencil icon).
- Go to Group Type and enable Topics.
- Set the topic display to Display as List. This makes it easier to scan and manage multiple visitor conversations.
- Save.
3. Add the bot
In the dashboard, open your project and click Link Telegram. This generates a unique link that adds the bot to your group and grants it admin rights automatically.
- Click the Link Telegram button in your project.
- Tap the link — Telegram opens and prompts you to add the bot.
- Confirm. The bot joins the group and requests admin permissions.
- Approve the permission request.
4. Link your group
If you're using the manual flow (bot already in the group), send this command in the group:
/start YOUR_LINK_TOKEN The bot replies: "Project linked successfully." Your project's status in the dashboard will show Linked.
Embed the Widget
The widget loads from a CDN and is initialized with your project's API key.
Script tag
Add this to your HTML, just before the closing </body> tag:
<script
src="https://cdn.bubblegram.co/widget.js"
data-key="pk_live_YOUR_KEY_HERE"
async
></script> Your API key is shown in the project's Embed section in the dashboard, visible after your Telegram group is linked.
Attributes
| Attribute | Required | Description |
|---|---|---|
data-key | Required | Your project's public API key. Starts with pk_live_. |
data-api | Optional | API base URL. Defaults to https://api.bubblegram.co. |
JavaScript API
After the script loads, a Bubblegram object is available on
window. You can control the widget programmatically:
Bubblegram.open() // open the chat panel
Bubblegram.close() // close the chat panel
Bubblegram.connect() // reconnect WebSocket (if disconnected) For React or other SPAs, inject the script dynamically:
useEffect(() => {
const script = document.createElement('script')
script.src = 'https://cdn.bubblegram.co/widget.js'
script.setAttribute('data-key', 'pk_live_YOUR_KEY_HERE')
script.async = true
document.body.appendChild(script)
}, []) Widget Customization
All visual settings are configured in the Project Builder in your dashboard. Changes are reflected in the live preview as you edit and applied to your site when you click Publish changes.
| Setting | Description | Limit |
|---|---|---|
| Brand color | Primary color for the chat button, header, and sent messages. | Any hex color |
| Logo | Shown in the widget header. PNG, JPEG, or WebP. | 512 KB max |
| Welcome message | Displayed as the first message when the widget opens, before the visitor types anything. | 200 characters |
| Greeting bubble | Short text shown in a speech bubble above the chat button. Leave empty to hide it. | 100 characters |
| Require email | When on, visitors must enter their email before sending a message. When off, anonymous messaging is allowed. | Toggle |
Multiple Sites
Each project in Bubblegram corresponds to one website and one Telegram group. Every project is fully isolated:
- Its own API key for the embed script
- Its own widget configuration (colors, messages, logo)
- Its own Telegram group with separate topic threads
- Its own message history and analytics
To add a second site, create a new project in the dashboard and run through the Telegram setup again for that site's group.
Dashboard Overview
The dashboard at dash.bubblegram.co has four main sections:
Aggregate stats across all your projects: total conversations, today's conversations, unresponded sessions, and response rate.
Browse and search all visitor conversations in one place. See the full message thread for any session.
Create, configure, and delete projects. Open the Project Builder to customize a widget's appearance and copy its embed code.
Manage your account: update your password.
Troubleshooting
Widget not appearing on my site
Check that the data-key attribute in your script tag matches
the API key shown in your project's Embed section. The key starts with
pk_live_. Also confirm the script tag is in the <body>, not the <head>.
Messages aren't arriving in Telegram
Your project may not be linked to a Telegram group. Open the project in the dashboard — if the status shows Not linked, follow the Telegram Setup steps. The bot must be in the group and have admin rights.
Origin mismatch error
The domain saved in your project settings must exactly match the
domain your site runs on. Enter it without https:// and without
a trailing slash. For example: example.com, not https://example.com/. Subdomains count as different domains.
Bot joined the group but messages aren't creating topics
The bot needs admin rights. Open your Telegram group, go to Administrators, find the bot, and ensure it has permission to manage topics, post messages, and delete messages. Without these, topic creation fails silently.
Link token expired
Link tokens are valid for 10 minutes. If you waited too long between generating the token and completing the setup, go back to your project in the dashboard, click Link Telegram again, and use the newly generated token.