How to create a Telegram bot in BotFather

A Telegram bot is created for free in the official @BotFather in about two minutes. You give it a name and a username and get an API token. That token is the only thing BotB2B needs to make the AI reply to your customers. Here is the whole flow with screenshots.

  1. 1

    Find @BotFather in Telegram

    Type @botfather in the Telegram search and open the bot with the blue verification badge. BotFather is Telegram's official tool: every bot is created and managed through it.

    There are many fakes. Check the badge and the exact spelling. Your bot token must never be sent to anyone except the official BotFather.

  2. 2

    Press Start and send /newbot

    Send /start (or press Start). BotFather lists its commands. Send /newbot, the command that creates a new bot.

  3. 3

    Choose a name and a username

    BotFather asks two questions. Name is what customers see in the chat header, for example "Demo BotB2B AI" or your company name. Username is the bot's address in Latin letters and it must end in bot, for example demo_botb2b_ai_bot. If the username is taken, BotFather asks for another one.

  4. 4

    Copy the API token

    The "Done! Congratulations on your new bot" message contains the token: a string like 8664790317:AAEzrq…. Copy it. You can always find it again: send /mybots, pick the bot and press API Token, or open the bot page in the BotFather app and press Copy.

    The token is the key to your bot. Keep it secret. If it leaks, press Revoke on the bot page in BotFather: the old token stops working and you get a new one.

  5. 5

    Connect the bot to BotB2B

    With the token in your clipboard, open BotB2B and connect the bot: Front Desk → Accounts → Add account → Telegram. The full flow is in Connect a Telegram bot.

Managing the bot later

Send /mybots to BotFather to see your bots. For each one you can change the name, description, profile photo and commands (Edit Bot), open Bot Settings or the API Token. The BotFather app (the Open button) shows the same in a visual form.

Give the bot a profile photo and a short description in Edit Bot: customers see them before they write the first message and it raises trust.

Does creating a bot cost anything?

No. Bots in Telegram are free, and there is no limit on how many you can create in BotFather.

Can I use one bot for several purposes?

One bot token can be connected to BotB2B as one account. If you want separate bots for sales and support, create two bots in BotFather and connect each one.

I lost the token. What do I do?

Send /mybots to BotFather, pick the bot and press API Token. If you suspect the token was leaked, press Revoke to get a new one, then reconnect the account in BotB2B.

Want the bot to reply in your personal chats?Connect the same bot through Telegram Business

See also

Try BotB2B for free

Sign-up takes a minute and starter tokens are on us. Set everything up with this guide.

Start for free