How to use BotFather

BotFather is Telegram's official bot for creating and managing other bots. It is the only authorized way to register new bots, obtain API tokens, and configure bot settings such as names, descriptions, commands, and profile pictures. Every Telegram bot in existence was created through BotFather.

What Is BotFather and Why Does It Matter?

BotFather (@BotFather) is a special meta-bot developed and maintained by Telegram itself. Launched alongside the Telegram Bot API in 2015, it serves as the central management interface for all bot-related operations. Think of it as the admin panel for your bots — except it works entirely through a chat conversation.

Every bot on Telegram — from simple auto-reply assistants to complex payment processors handling thousands of transactions — starts with a single command sent to BotFather. Without it, there is no way to obtain the API token required to connect your code to Telegram's servers.

Key Capabilities

BotFather allows you to:

  • Create new bots and receive their unique API tokens
  • Edit bot profiles (name, description, about text, profile photo)
  • Set up command lists visible to users in the menu
  • Configure inline mode for bots that work in any chat
  • Manage bot settings like privacy mode and group permissions
  • Generate new API tokens if the current one is compromised
  • Delete bots you no longer need
  • Set up payments by connecting payment providers

Step-by-Step Guide: Creating Your First Bot

Step 1: Open BotFather

Search for @BotFather in Telegram's search bar. Make sure you select the verified account — it has a blue checkmark next to its name. Tap Start or send /start to begin the conversation.

Step 2: Create a New Bot

Send the command:

/newbot

BotFather will ask you two questions in sequence:

  1. Choose a display name — This is the human-readable name users will see (e.g., "My Channel Assistant"). It can contain spaces, emojis, and most characters. Maximum length is 64 characters.

  2. Choose a username — This must end in bot or Bot (e.g., my_channel_assistant_bot). It must be unique across all of Telegram, contain only Latin characters, numbers, and underscores, and be between 5-32 characters long.

Step 3: Save Your API Token

After successfully creating the bot, BotFather will respond with a message containing your API token. It looks something like this:

7123456789:AAHk5-JxFr0mEx4mpLeT0k3nStr1ng

Important: Treat this token like a password. Anyone with this token can fully control your bot — send messages as the bot, read incoming messages, and access any data the bot handles. Never share it publicly or commit it to version control.

Step 4: Configure Your Bot's Profile

Use these commands to make your bot look professional:

  • /setname — Change the display name
  • /setdescription — Set the text users see before starting the bot (max 512 characters). This appears on the bot's profile page and should explain what the bot does.
  • /setabouttext — Set the short bio visible in the bot's profile (max 120 characters)
  • /setuserpic — Upload a profile picture (recommended: 512x512 pixels)

Step 5: Set Up Bot Commands

Send /setcommands and select your bot. Then provide a list of commands in this format:

start - Begin interaction with the bot
help - Show available commands
settings - Configure your preferences
stats - View channel statistics

These commands will appear in the menu button (the / icon) when users chat with your bot, making it much easier to discover available features.

Step 6: Adjust Bot Settings

Use /mybots to access an inline keyboard interface for managing all your bots. Select a bot to see options for:

  • Bot Settings — Toggle group privacy mode, inline mode, and inline feedback
  • Payments — Connect payment providers like Stripe or specific regional options
  • Transfer Ownership — Move the bot to another Telegram account

Essential BotFather Commands Reference

Command Purpose /newbot Create a new bot /mybots Manage your existing bots /setname Change bot's display name /setdescription Set profile description /setabouttext Set short "about" text /setuserpic Change profile picture /setcommands Define the command menu /deletebot Permanently delete a bot /token View current API token /revoke Generate a new API token (invalidates the old one) /setinline Enable and configure inline mode /setinlinefeedback Set inline query feedback probability /setjoingroups Allow or disallow adding bot to groups /setprivacy Toggle group privacy mode

Connecting Your Bot to a Telegram Channel

One of the most common uses for bots is channel management and automation. Here is how to connect your bot to a channel:

  1. Add the bot as an administrator — Open your channel settings, go to Administrators, and add your bot by its username. Grant it the permissions it needs (typically: post messages, edit messages, delete messages).

  2. Configure webhooks or polling — In your bot's code, set up either a webhook URL or long polling to receive updates. For services like tgchannel.space that automatically export channel content to web blogs, the bot token is used to set up a webhook that processes incoming channel posts.

  3. Test the connection — Post a test message to your channel and verify your bot receives and processes it correctly.

Managing Multiple Bots

BotFather does not limit how many bots a single account can create. You can manage dozens of bots from one Telegram account. Use /mybots to see a full list and switch between them easily.

For organization, consider a naming convention:

  • projectname_prod_bot — Production bot
  • projectname_dev_bot — Development/testing bot
  • projectname_staging_bot — Staging environment

This makes it simple to identify which bot serves which purpose when you have many listed in BotFather.

Tips & Best Practices

  • Always create a separate bot for development and production. This prevents test messages from reaching real users and lets you experiment without risk.
  • Revoke and regenerate your token immediately if you accidentally expose it in a public repository, screenshot, or message. Use the /revoke command — the old token stops working instantly.
  • Write a clear description and about text. Users who discover your bot will decide whether to start it based on these texts. Include what the bot does, what commands are available, and any prerequisites.
  • Set up a complete command list. Bots with visible commands in the menu feel more polished and are easier to use. Even simple bots benefit from having /start and /help defined.
  • Use the inline keyboard interface (/mybots) rather than individual commands when making multiple changes — it is faster and shows all options in one place.
  • Enable group privacy mode unless your bot specifically needs to read all messages in a group. With privacy mode on, the bot only receives messages that mention it or start with a / command, which is better for user privacy and reduces unnecessary processing.

Common Mistakes

Mistake 1: Sharing the API token publicly
Why it's a problem: Anyone with the token gains full control of your bot. Leaked tokens on GitHub are regularly exploited within minutes by automated scanners.
How to avoid: Store tokens in environment variables or encrypted credential stores. Never hardcode them in source files. Use .env files locally and secrets management in production.

Mistake 2: Choosing a username that is too generic
Why it's a problem: Usernames like helper_bot or news_bot are almost certainly taken, and even if available, they are hard for users to find and remember.
How to avoid: Include your brand or project name in the username. For example, techdigest_news_bot is far more distinctive than news_bot.

Mistake 3: Forgetting to set bot commands
Why it's a problem: Without defined commands, users see no menu and have to guess how to interact with your bot. Many will simply leave.
How to avoid: Run /setcommands immediately after creating your bot, even if you only define /start and /help initially.

Mistake 4: Not testing in a development environment
Why it's a problem: Sending test messages, triggering errors, or experimenting with features on a production bot can confuse or annoy real users.
How to avoid: Create a dedicated development bot with /newbot and use its token during development. Switch to the production token only for deployment.

Mistake 5: Ignoring the bot description and about text
Why it's a problem: An empty profile looks unprofessional and gives users no reason to trust or try the bot.
How to avoid: Use /setdescription to write a concise explanation (2-3 sentences) and /setabouttext for a one-line summary. Add a profile picture with /setuserpic.

Frequently Asked Questions

Can I change my bot's username after creation?
Yes. Use the /setname command to change the display name at any time. However, changing the username (the @handle) requires contacting BotFather with /mybots, selecting the bot, then Edit BotEdit Username. Note that the new username must still end in bot and be available.

Is there a limit to how many bots I can create?
Telegram does not publish a hard limit, but most accounts can create at least 20 bots without issues. If you need more, you can contact Telegram support. Each bot operates independently with its own token and settings.

What happens if I delete a bot through BotFather?
The bot is permanently removed. Its username becomes available again after some time, the API token stops working immediately, and all data associated with the bot (chats, messages, inline results) is deleted. This action cannot be undone.

Can I transfer my bot to another Telegram account?
Yes. Use /mybots, select the bot, and choose Transfer Ownership. You will need to confirm with your Telegram account's two-factor authentication password. The new owner gains full control through their BotFather.

How do I use my bot to automate a Telegram channel's web presence?
After creating a bot and adding it as a channel administrator, you can connect it to services that publish your channel content on the web. For instance, tgchannel.space uses your bot token to receive channel updates via webhooks and automatically converts them into SEO-optimized blog posts, making your Telegram content discoverable through search engines.