Guides · messaging · Popular APIs

Telegram Bot (Bot API)

Create a bot with @BotFather to get a bot token for the Telegram Bot API, then optionally set a webhook with a secret token.

Researched · not yet run liveLast researched 25 October 2026 · Telegram · provider site

Researched, not yet run live. Built from the provider’s official pages (linked below). A person hasn’t walked this flow end to end yet, so check each step against the source.

Who owns what

A Telegram user account talks to @BotFather, which creates bots owned by that account; each bot has its own token.

  • Telegram user account personal owned by the personNeeded to message @BotFather.
  • Bot developer owned by the person · under Telegram user accountThe username cannot be changed after creation.

Have ready

  • A Telegram account signed in on a Telegram app: You create the bot by chatting with @BotFather. Phone-number requirements for Telegram accounts are not covered in the bot docs reviewed. [to verify]
  • A privacy policy for the bot: The Bot Platform Developer Terms require an easily accessible privacy policy; Telegram's Standard Policy may be used if you have none.
  • A privacy policy URL for the bot, or acceptance of Telegram's Standard Policy · The Bot Platform Developer Terms require bots to have a privacy policy easily accessible to users. [5]Needed for: Review the Bot Platform Developer Terms
  • An HTTPS endpoint on port 443, 80, 88 or 8443 if you use a webhook · Webhooks can only be delivered to those ports; otherwise use getUpdates long polling. [3]Needed for: Set a webhook with a secret token (optional)

Steps

Steps marked “human step” are ones only you can do: verapli never signs in, submits, pays or accepts terms for you.

  1. Review the Bot Platform Developer Terms

    Read the Telegram Bot Platform Developer Terms, which apply on top of the Telegram Terms of Service and Privacy Policy, including the privacy policy requirement and the Stars-only rule for digital goods.

    • Guided by hand
    • Human step: You accept the terms

    Where: https://telegram.org/tos/bot-developers

  2. Create the bot with @BotFather

    In Telegram, open @BotFather and send /newbot. Give a display name and a username of 5-32 characters (Latin letters, digits, underscores) ending in "bot"; the username cannot be changed later. BotFather replies with the bot token; verapli writes it to your env file.

    • Guided by hand
    • Human step: You press submit
    • After: Review the Bot Platform Developer Terms

    verapli captures TELEGRAM_BOT_TOKEN here by plain code: encrypted in your browser, never shown to AI.

    If something goes wrong (1)
    • Token leaked or lost: Use the /token command in @BotFather to generate a new token; anyone holding the old token can control the bot. [1]

    Where: https://t.me/botfather

  3. Set a webhook with a secret token (optional)optional

    Call setWebhook with your HTTPS URL (port 443, 80, 88 or 8443) and a secret_token of 1-256 characters (A-Z, a-z, 0-9, _ and -). Telegram sends it in the X-Telegram-Bot-Api-Secret-Token header so you can verify requests. While a webhook is set, getUpdates long polling does not work.

    • Official API
    • After: Create the bot with @BotFather

    verapli captures TELEGRAM_WEBHOOK_SECRET here by plain code: encrypted in your browser, never shown to AI.

Terms and gotchas

Plain-English summary, not legal advice. Each card links its source.

Can get you bannedThe rules say

Digital goods must be sold for Telegram Stars

Payments for digital goods and services in bots and Mini Apps must be made exclusively in Telegram Stars (currency XTR), even if you have your own website or payment system; crypto is not allowed. Telegram may hide bots that sell digital goods by other means from mobile users. Physical goods may use third-party payment providers. [6]

Can cost moneyThe rules say

Required /terms, /paysupport and /support commands for payments

Bots that take payments must answer /terms (users confirm they agree before purchase), /paysupport for payment issues, and offer /support or another clear support channel. Refunds use refundStarPayment and are deducted from the bot's balance. [6]

Can cost moneyThe rules say

Privacy policy and data limits

Bots must have an easily accessible privacy policy (Telegram's Standard Policy can be used), collect only data the service needs, encrypt user data at rest stored apart from its key, and must not collect data to build datasets, machine learning models or AI products, including scraping public group or channel content. [5]

Can cost moneyThe rules say

Prohibited uses and termination

No spam or unsolicited messages, malware, illegal or pirated goods, MLM or Ponzi schemes, growth manipulation, or phishing such as asking for Telegram passwords or OTPs; Mini Apps may not promote non-TON cryptoassets. Telegram may ban bots or accounts and may discontinue the Bot Platform or any bot at any time; conflicts are resolved in Telegram's favour. [5]

Worth knowingThe rules say

Stars economics and fees

Stars received expire three years after receipt; Stars can be spent on Telegram Ads (valued at 0.02 USD of ad credit) or exchanged for rewards. Enabling topics in private chats adds a 15% fee on Star purchases. [5]

Worth knowingThe rules say

Messaging rate limits

Avoid more than about 1 message per second per chat and 20 per minute per group; bulk sending is about 30 messages per second. Paid broadcasts allow up to 1000 per second at 0.1 Stars per message above 30/s and need at least 100,000 Stars and 100,000 monthly active users. [4]

What you end up with

Env varSecretFormatWhat it is
TELEGRAM_BOT_TOKENsecret123456789:AA… (numeric id, colon, alphanumeric string)Bot API token from @BotFather, used in https://api.telegram.org/bot<token>/METHOD
TELEGRAM_WEBHOOK_SECRETsecret1-256 chars of A-Z a-z 0-9 _ - (you choose it)…Secret you choose and pass as secret_token to setWebhook; compare it with the X-Telegram-Bot-Api-Secret-Token header

Pricing

  • Free tier: Creating bots and using the Bot API is free; bots can message their users at no cost by default.
  • Costs: Paid broadcasts cost 0.1 Stars per message above the free 30 messages per second.
  • Commercial bots may sell physical goods through third-party payment providers and digital goods only for Stars.

Source [4]

For agents

The same entry as JSON: /api/v1/entries/telegram/bot · requirements /api/v1/requirements/telegram/bot · terms /api/v1/terms/telegram/bot.

Remote MCP (read-only, no auth)
claude mcp add --transport http verapli https://verapli.com/mcp

> "What do I need for Telegram Bot (Bot API), and how long will it take?"
  → tools/call requirements { "provider_id": "telegram/bot" }

Sources

  1. Telegram Bot Features - BotFather /newbot creates a bot; username 5-32 chars, Latin letters/digits/underscores, must end in bot, cannot be changed; token format numeric id, colon, alphanumeric string; /token regenerates; keep token secure · accessed 25 October 2026 · official
  2. Telegram bot tutorial Get a token from @BotFather via /newbot; token can be revoked any time via @BotFather; treat token like a password; store in environment variables in production · accessed 25 October 2026 · official
  3. Telegram Bot API reference (Bot API 10.3) Requests to https://api.telegram.org/bot<token>/METHOD; webhook ports 443, 80, 88, 8443; secret_token 1-256 chars A-Z a-z 0-9 _ - sent in X-Telegram-Bot-Api-Secret-Token; getUpdates does not work while a webhook is set · accessed 25 October 2026 · official
  4. Telegram Bots FAQ About 1 message per second per chat, 20 per minute per group, about 30 per second bulk; paid broadcasts up to 1000/s at 0.1 Stars per message over 30/s, needing 100,000 Stars and 100,000 MAU; messaging users is free by default · accessed 25 October 2026 · official
  5. Telegram Bot Platform Developer Terms Digital goods must be sold exclusively for Telegram Stars; physical goods via third-party providers; privacy policy required; data minimisation and ban on collecting data for datasets/AI; encryption at rest; prohibited uses; Telegram may ban or discontinue; /paysupport; Stars expire three years after receipt; 15% fee with private-chat topics · accessed 25 October 2026 · official
  6. Telegram Bot Payments for digital goods (Stars) Digital goods must use Stars (currency XTR); provider_token only for physical goods; bots must answer /terms, /paysupport and offer /support; refundStarPayment for refunds; app store rules · accessed 25 October 2026 · official

Provider rules change. This page is generated from verapli registry version 2026.1025.316; spotted something out of date? Tell us. Telegram is not affiliated with verapli.