This topic describes how to create a bot in Telegram, obtain an API token, and configure admin rights for groups and channels to prepare for integration with Chat App Message Service.
Use cases
Chat App Message Service allows you to reach users worldwide through a Telegram channel. Before using a Telegram channel, you must create a bot on the Telegram platform to obtain an API token, which is your access credential. You also need to configure admin rights for the bot to manage groups and channels, enabling scenarios such as broadcast messaging and community operations.
Overview
To create a Telegram bot and configure its permissions, follow these steps:
Create a new bot using BotFather.
Set the bot's name and username.
Obtain and save the API token.
Complete the bot's profile (optional).
Configure admin rights for groups and channels.
BotFather is Telegram's official bot management tool. You create and configure all bots by chatting with BotFather.
Step 1: Open BotFather and create a bot
Using your registered Telegram account, open BotFather in your Telegram client (mobile, desktop, or web). You can do this in one of two ways:
Search: In the Telegram search bar, enter
BotFatherand select the account with the official verification checkmark.Link: Go directly to https://t.me/BotFather.
After opening the chat, click Start to begin the conversation. Then, send the following command to create a new bot: /newbot. BotFather will guide you through setting the bot's name and username.
Ensure your network connection allows access to Telegram. For a more stable experience, we recommend using the mobile or desktop client.
Step 2: Set the bot name
BotFather first asks for the bot's display name (name). This name is shown to end users and supports Chinese, English, or other languages. Enter a name and send it. Examples:
Customer Support AssistantMy Shop AssistantOrder Service Bot
Step 3: Set the bot username
BotFather then asks you to set the bot username (username). The username must meet the following requirements:
It can contain only English letters, numbers, and underscores.
It must end with
bot.
Examples: my_demo_bot, MyShopHelperBot.
The following usernames are invalid and cannot be used:
Invalid username | Reason |
| Contains non-English characters. |
| Does not end with |
| Contains a hyphen and does not end with |
| Too short or already taken. |
If the username is already taken, BotFather prompts you to enter another one. Try adding numbers or underscores, such as my_shop_bot or service_01_bot.
Step 4: Obtain and save the API token
After the bot is created, BotFather returns a message that includes the API token in the following format: 123456789:AAExampleTokenxxxxxxxxxxxxxxxxxxx
The API token is the core access credential for calling the Telegram Bot API and is required to connect your bot to Chat App Message Service. We recommend recording the following information for later use:
Item | Example |
Bot name | Customer Support Bot |
Bot username | my_demo_bot |
API token | 123456789:AAExxxxxxxxxxxxxxxxx |
The API token is a secret credential for your bot, similar to a password. Anyone who has this token can control your bot. Do not share it in group chats, post screenshots of it, or commit it to public code repositories. If you suspect the token has been leaked, immediately reset it in BotFather and update it in the Chat App Message Service console.
Step 5: Complete the bot profile (optional)
After you create the bot, you can further customize its profile in BotFather. The following settings are not required, but they improve the user experience:
Command | Description |
| Sets the bot's description. |
| Sets the short "about" text shown when a user starts a chat with the bot. |
| Sets the bot's profile picture. |
Step 6: Configure bot permissions
If you want to use the bot in a group or channel, you must enable the required permissions. Complete all of the following operations in the BotFather chat.
Enable Allow Groups
If this permission is not enabled, you cannot add the bot to a group.
Path: /mybots > Select your bot > Bot Settings > Allow Groups > Turn groups on
Disable Group Privacy
By default, a bot in a group receives only messages that @mention the bot or are replies to its messages. After you disable Group Privacy, the bot reads all messages in the group.
Path: /mybots > Select your bot > Bot Settings > Group Privacy > Turn off
Configure Group Admin Rights
Path: /mybots > Select your bot > Bot Settings > Group Admin Rights > Select the required permissions
Configure the following Group Admin Rights for the bot based on your business needs:
The recommendations below are based on the official Telegram documentation and may not reflect the latest platform updates. Select permissions based on your actual business requirements.
Permission | Description | Recommendation |
Change group name, photo, etc. | Change the group name, photo, and description. | Recommended |
Delete messages | Retract or delete any message sent by a group member. | Required |
Restrict, ban or unban members | Ban, block, or restrict members from sending messages. | Required |
Invite new users | Generate a group invitation link or add users directly to the group. | Recommended |
Pin messages | Pin messages to the top of the group chat. | Optional |
Add new administrators | Appoint other members as administrators. | Optional |
Manage voice chats | Start, stop, or manage voice or video chats in the group. | Optional |
Promote anonymous admins | Allow administrators to post anonymously on behalf of the group. | Optional |
Manage Topics | Manage discussion Topics in a supergroup where Topics are enabled. | Optional |
Post stories | Post content to Telegram Stories on behalf of the group. Requires Telegram Premium. | Not Recommended |
Edit stories | Edit published group Stories. Requires Telegram Premium. | Not Recommended |
Delete stories | Delete published group Stories. Requires Telegram Premium. | Not Recommended |
Manage chat | Modify advanced group settings, such as slow mode and default member permissions. | Required |
Configure Channel Admin Rights
Path: /mybots > Select your bot > Bot Settings > Channel Admin Rights > Select the required permissions
Configure the following Channel Admin Rights for the bot based on your business needs:
The recommendations below are based on the official Telegram documentation and may not reflect the latest platform updates. Select permissions based on your actual business requirements.
Permission | Description | Recommendation |
Change the chat name, photo, etc. | Change the channel name, photo, and description. | Recommended |
Post in the channel | Send messages directly as the channel. | Required |
Edit messages of other users, pin messages | Edit messages posted by other administrators or pin messages. | Recommended |
Delete messages | Retract or delete any message published in the channel. | Recommended |
Delete participants | Remove subscribers from the channel or mute them. | Recommended |
Add new administrators | Appoint other members as channel administrators. | Optional |
Invite via link | Create, manage, and revoke invitation links for the channel. | Recommended |
Manage video chat / live stream | Start, stop, or manage voice or video live streams in the channel. | Not Recommended |
Manage direct messages | Receive and reply to direct messages sent to the channel. Requires Telegram Premium. | Not Recommended |
Post stories | Post stories to Telegram Stories on behalf of the channel. Requires Telegram Premium. | Not Recommended |
Edit stories | Edit published channel Stories. Requires Telegram Premium. | Not Recommended |
Delete stories | Delete published channel Stories. Requires Telegram Premium. | Not Recommended |
Manage channel | Modify advanced channel settings and view the channel's audit log. | Required |
Verify the bot
After you create and configure the bot, perform the following checks to verify that it works as expected:
In the Telegram search bar, search for your bot's username (for example,
my_demo_bot) to confirm that it is discoverable.Open the bot's profile page and click Start to confirm that it responds correctly.
Visit
https://t.me/<your_bot_username>to confirm that the link opens correctly.Add the bot to a test group or channel to confirm it has the correct permissions.
Next steps
After you create and configure the bot, create a Telegram channel in the and bind the bot's API token. You can then start sending messages through the Telegram channel.
FAQ
Cannot find BotFather
Check the following:
Make sure you are searching for the exact keyword
BotFather(case-sensitive).Make sure you select the account with the official verification checkmark.
Make sure your network connection allows access to Telegram.
You can also access it directly using the link: https://t.me/BotFather.
Username is unavailable
This username is already taken. Try one of the following methods to create a unique username:
Change the keywords in the username.
Add a numeric suffix.
Use underscores to separate words.
The modified username must still end with bot. Examples: my_shop_bot, myshophelper1_bot, service_01_bot.
Lost API token
Reopen your chat with BotFather and send the /mybots command. Select the corresponding bot to view or regenerate its API token.