Connect, configure, and manage Telegram bots in the Chat App Message Service console.
Prerequisites
-
You have created a Telegram bot. How to create a Telegram bot.
-
You have created a Telegram channel. Create and manage Telegram channels.
Connect a bot to a channel
Connect a new or existing Telegram bot to a channel:
Log on to the Chat App Message Service console.
-
In the left navigation pane, click Channel Management.
-
Find the Telegram channel that you want to manage, and then click the channel's Channel ID.
-
On the channel operations page, click the Chatbot Management tab, and then choose Create Bot or Connect Existing Bot.
-
Enter the Telegram bot token.
-
Click Connect.
Create a bot
If you do not have a Telegram bot, create one in the Telegram client and then connect it to your channel.
-
In the Telegram client, create a bot by using BotFather.
-
Copy the API token that BotFather provides.
-
In the Chat App Message Service console, paste the API token into the input field.
-
Click Connect.
Connect an existing bot
If you already have a Telegram bot with an API token, connect it to your channel.
-
Paste the API token into the input field.
-
Click Connect.
After a successful connection, the bot information appears on the page.
Each Telegram channel supports only one bot. To manage multiple bots, create a separate Telegram channel for each bot and connect them individually.
Update token
If a bot's API token is compromised or expires, you can update it in the console.
Updating the token replaces the existing one and may briefly disconnect the bot, affecting message delivery. Perform this operation during off-peak hours.
-
In the Telegram client, open BotFather and generate a new API token for your bot.
-
On the Chatbot Management page, click Update Token.
-
In the dialog box that appears, paste the new API token.
-
Click OK.
Configure message workbench
The message workbench lets you centrally view and manage incoming messages sent to your bot.
-
On the Chatbot Management page, click Message Workbench Settings.
-
Select a message display mode:
Mode
Description
Scenarios
Enable Message Workbench
Displays all incoming messages.
Monitor all bot conversations.
Triggered by Keyword
Displays only messages that match the configured keywords.
Focus on specific topics by filtering irrelevant messages.
Delete a bot
Deleting a bot permanently removes all synchronized group and channel information, which cannot be recovered. You can no longer send messages through the deleted bot.
-
On the Chatbot Management page, click Delete.
-
In the confirmation dialog box that appears, click OK.
Configure webhook
Configure a webhook to receive callbacks for message delivery and read statuses.
-
On the Chatbot Management page, click Configure Webhook.
-
Configure the webhook settings. Receipt message overview and configuration.
Configure the following parameters in the Webhook Settings dialog box:
Parameter
Description
HTTP Protocol
Enable or disable HTTP callback URLs. When turned on, the Status Report Callback URL, MO Message Callback URL, and Notification Callback URL fields become required.
Status Report Callback URL
The HTTP callback URL to receive message delivery status reports. Required when HTTP Protocol is turned on.
MO Message Callback URL
The HTTP callback URL to receive mobile-originated (MO) message callbacks. Required when HTTP Protocol is turned on.
Notification Callback URL
The HTTP callback URL to receive audit notification callbacks. Required when HTTP Protocol is turned on.
Message Queue Monitoring
Enable or disable message queue monitoring.
Message Receipt Queue
The queue name for message delivery status. Read-only. Click the copy icon to copy the queue name.
MO Message Queue
The queue name for MO messages. Read-only. Click the copy icon to copy the queue name.
Notification Queue
The queue name for audit notifications. Read-only. Click the copy icon to copy the queue name.
Next steps
After connecting your bot:
-
Design message templates. Template design.
-
Send messages to users. Send message.