Customer service
BotFather guide: create a Telegram bot and get its token
BotFather is Telegram's own bot for creating and managing bots. Here is every step from /newbot to a working token, the settings a business bot needs, what to do when the token leaks, and how to connect the bot to your team inbox.
MonoChat Team Updated: 4 min read
On this page
BotFather (@BotFather) is Telegram’s official bot for creating and managing bots. You send it /newbot, choose a name and a username, and it replies with your bot’s token, the key that lets software such as MonoChat send and receive messages as your bot. The whole process takes about two minutes; the details below are what keep the bot working and safe later.
Step 1: Create the bot with /newbot
- In Telegram, search for @BotFather and open the account with the blue verification mark.
- Send
/newbot. - Send the name: what people see in chats, for example “Lumen Dental”. You can change it later with
/setname. - Send the username: 5 to 32 characters, Latin letters, numbers and underscores, ending in “bot”, such as
lumendental_botorLumenDentalBot. It is not case sensitive and cannot be changed later, so choose it the way you would choose a domain. - BotFather confirms with a message that contains your bot’s link (
t.me/lumendental_bot) and its token, which looks like110201543:AAHdqTcvCH1vGWJxfSeofSAs0K5PALDsaw.
If BotFather says the username is taken, try a variant with your city or an underscore; usernames are unique across Telegram.
Step 2: Keep the token safe
The token is the bot’s password. Anyone who has it can read the messages your bot receives and send messages in its name.
- Store it in your password manager, not in a chat, an e-mail or a shared document.
- Paste it only into the tool that runs the bot.
- If it leaks, or a former employee or agency had it, send
/tokenin BotFather to generate a new one, then update the tool that uses it. - To see your bots and their settings at any time, send
/mybots.
Step 3: Set up the profile customers see
These BotFather commands decide what a customer sees before the first message:
| Command | What it sets | Tip for a business bot |
|---|---|---|
/setuserpic | Profile picture | Your logo, square and readable at small size |
/setdescription | The text under “What can this bot do?” (up to 512 characters) | What people can ask, and when a person answers |
/setabouttext | The line on the profile and in shared links (up to 120 characters) | One sentence and your opening hours |
/setcommands | The menu people see when they type ”/“ | /start, /help, plus two or three of your own, such as /order or /book |
/setprivacy | Which group messages the bot receives | Leave privacy on unless the bot must read every group message |
/setjoingroups | Whether the bot can be added to groups | Turn it off for a one-to-one support bot |
Step 4: Share the bot
A bot cannot start a conversation: a person has to open it and tap Start, or add it to a group, first. So the link is your growth channel:
- Put
t.me/<username>on your website, receipts, packaging and social profiles, or show it as a QR code at the counter. - Add a parameter to see where people came from:
t.me/lumendental_bot?start=instagramarrives at the bot as/start instagram. Parameters can use letters, numbers,_and-, up to 64 characters.
Step 5: Connect the bot to MonoChat
MonoChat connects your bot with the token, without code:
- In MonoChat, go to Settings › Chat › Channels and click Connect.
- Choose Telegram Bot.
- Paste the token from BotFather into Telegram Bot Key and click Save.
Messages to your bot now arrive in the team inbox next to WhatsApp, Instagram and your other channels. From there you can let an AI assistant answer from your own content, hand chats over to your team, and send Telegram broadcasts to everyone who started the bot.
Common mistakes
- Connecting one bot to two tools. A bot delivers its updates through one webhook or by polling, not both, so the second tool silently takes the messages away from the first. Use one bot per tool.
- Deleting instead of renaming.
/deletebotremoves the bot and frees its username, and it cannot be undone. To rebrand, change the name and picture instead. - Handing the bot to an agency for good. You can transfer a bot with
/mybots› your bot › Transfer ownership, only to someone who has used the bot, and the transfer is permanent. Keep the bot on a company account and share access through your tools instead. - Messaging too fast. Telegram asks bots to send no more than about one message per second in a chat and 20 per minute in a group, and about 30 messages per second for bulk sends.
Our guide to Telegram for business compares bots with Business accounts, channels and groups.
You can start free at app.monochat.ai.
Sources
Put this into practice with MonoChat