Skip to content

Guide

How to get a Telegram bot token from @BotFather, step by step

Get a Telegram bot token from @BotFather step by step: name and username rules, keeping the token safe, renewing it, recommended settings and common mistakes.

Topics
  • Telegram

To connect a Telegram bot to software, you need the bot's token. The token comes from @BotFather, the account Telegram uses for creating bots. This guide walks you through creating the bot and getting, storing and renewing the token, based on Telegram's own documentation.

Before you start

You need a Telegram account; it becomes the bot's owner. Prefer an account your company keeps over the personal account of someone who may leave.

Step by step: create the bot and get the token

  1. Open @BotFather. Search for @BotFather in Telegram and pick the account whose username is exactly @BotFather.
  2. Send /newbot. BotFather asks for the bot's name, then for its username.
  3. Choose a name and a username. The name is what customers see in the chat, and you can change it later. The username has 5–32 characters, uses only Latin letters, digits and underscores, ends in "bot" (for example examplestore_support_bot) and cannot be changed later. Do not use the word "Telegram" in the name or the username: Telegram's terms forbid impersonating Telegram and using its name or brand in a way that suggests an affiliation.
  4. Copy the token. Once the bot exists, BotFather gives you a token: digits, a colon and a long code, for example 110201543:AAH…. Copy all of it.
A simplified drawing of the @BotFather chat on Telegram. The messages are shortened, and the token is a shortened example.

Keep the token secret

Anyone with the token can control your bot. Store it like a password. Never put it in an email, a chat or a support ticket, and share it with no one, UPPU support included.

  • /setjoingroups → Disable: the bot cannot be added to groups.
  • Set your bot's privacy policy in BotFather. Otherwise Telegram's standard policy applies, and you are responsible for it being sufficient.
  • Note: /setprivacy is not the privacy policy. It sets which group messages the bot sees.

Connecting to UPPU

After connecting

A bot works with one system at a time. Another webhook, or a tool that uses getUpdates, takes the bot away from the other system. Telegram keeps updates that arrived before the connection for up to 24 hours.

Renew the token

If the token leaks or gets lost, use /token in BotFather to generate a new one for your bot, and stop using the old one.

Common mistakes

  • Copying only part of the token.
  • Giving the same token to another system as well.
  • Leaving groups on.
  • Putting "Telegram" in the name or the username.
  • Choosing the username in a hurry; it cannot be changed.

Your duties as the bot owner

Under Telegram's Bot Developer Terms, the bot owner's main duties are to:

  • provide a privacy policy;
  • delete a person's data when they ask;
  • collect no more data than needed, and none for AI datasets;
  • send no unsolicited messages;
  • not impersonate Telegram;
  • keep user data encrypted at rest and stored separately from its encryption key;
  • run the bot in a reasonably secure environment and protect it from malicious clients;
  • make every effort to fix a data leak or security breach at once, and tell users about a data breach as applicable law requires;
  • keep the token confidential: anything others do with it counts as done by you.

FAQ

Does Telegram charge for bots?

Bots message users for free by default. Fees apply only to very high-speed, paid broadcasting.

Can a bot send the first message?

No. The person has to message the bot first.

What happens to messages sent before the bot is connected?

They wait for up to 24 hours.

Terms in this post

Sources

  1. Telegram: Bot Features (BotFather, username rules, tokens, /token, /setjoingroups, /setprivacy) (accessed 23 November 2026)
  2. Telegram: Bot Tutorial (keeping the token safe) (accessed 22 October 2026)
  3. Telegram: Bot Developer Terms (§4, §4.2, §4.3, §4.4, §4.5, §5.2, §8.1) (accessed 23 November 2026)
  4. Telegram: Standard Bot Privacy Policy (accessed 23 November 2026)
  5. Telegram Bot API: Getting updates (accessed 23 November 2026)
  6. Telegram: Bots FAQ (accessed 23 November 2026)
  7. Telegram: Bots (bots cannot start a conversation) (accessed 23 November 2026)