Telegram· 5 min read

Telegram Business bots: answer chats for a business account


A Telegram Business bot answers private chats on behalf of a user who connected it to their account. You receive a business_connection update when they connect, each incoming chat message as a business_message, and you reply with sendMessage plus business_connection_id. Check rights.can_reply before you send. Telegram Premium is not required: “Connecting a business bot does not require Telegram Premium” (connected business bots, accessed 2026-11-04). Field names follow the Bot API reference, version 10.3 of August 24, 2026 (accessed 2026-11-04).

Who can connect a bot

Telegram describes the feature as users connecting bots “that will process and answer messages on their behalf” (Telegram Business, accessed 2026-11-04). The other Business features are free for Premium subscribers, and the same page adds that “connected bots are also available to non-Premium users.” Older tutorials that list Premium as a requirement are out of date on this point.

“Currently just one business bot may be connected to a user account” (connected business bots page). The account owner also picks which chats the bot sees. At the MTProto level that is a recipient list with options for existing chats, new chats, contacts, non-contacts and specific users, plus an exclusion list. Pausing the bot in one chat moves that chat out of its reach.

getMe tells you whether the bot can take business connections: can_connect_to_business is true when the bot can be connected to a user account.

Turn on Secretary Mode and handle the updates

Telegram’s bot features page (accessed 2026-11-04) calls the BotFather switch Secretary Mode. The MTProto error text on the connected bots page still says “business mode”, so look for either label. The quick start on the features page reduces to five steps:

  1. Enable Secretary Mode for your bot in @BotFather.
  2. Store each business_connection update: the user connected, edited or ended the connection.
  3. Handle business_message, edited_business_message and deleted_business_messages.
  4. Read rights from the latest connection, including can_reply.
  5. Send with business_connection_id in sendMessage, sendChatAction and the other send methods.

The four update types

Update field Type Telegram’s description
business_connection BusinessConnection “The bot was connected to or disconnected from a business account, or a user edited an existing connection with the bot”
business_message Message “New message from a connected business account”
edited_business_message Message “New version of a message from a connected business account”
deleted_business_messages BusinessMessagesDeleted “Messages were deleted from a connected business account”

An empty allowed_updates list in setWebhook or getUpdates delivers every update type except chat_member, message_reaction and message_reaction_count. Business updates arrive by default. If you pass an explicit list, add all four names or the bot never sees them.

Each business message carries business_connection_id. A message sent by an away or greeting message, or a scheduled one, has is_from_offline set. Outgoing messages your bot sent on the account’s behalf carry sender_business_bot. deleted_business_messages gives you business_connection_id, chat and message_ids, and Telegram warns that “The bot may not have access to the chat or the corresponding user.”

BusinessConnection and its rights

Field Type Meaning
id String The business connection ID you send with
user User The business account user who created the connection
user_chat_id Integer Your bot’s private chat with that user; up to 52 bits
date Integer When the connection was established, Unix time
rights BusinessBotRights Optional. What the bot may do
is_enabled Boolean True if the connection is active

Bot API 9.0 of April 11, 2025 “replaced the field can_reply with the field rights of the type BusinessBotRights” (changelog, accessed 2026-11-04). Code that reads business_connection.can_reply gets nothing on a current Bot API. Read business_connection.rights.can_reply.

Every right is an optional field of type True, so a missing field means the right is off. can_reply covers sending and editing “in the private chats that had incoming messages in the last 24 hours”. The rest cover reading, deleting, the account’s profile, gifts and Stars, and stories:

Method Right it needs
readBusinessMessage can_read_messages
deleteBusinessMessages (1 to 100 IDs) can_delete_sent_messages for the bot’s own messages, can_delete_all_messages for any
setBusinessAccountName, setBusinessAccountUsername, setBusinessAccountBio can_edit_name, can_edit_username, can_edit_bio
setBusinessAccountProfilePhoto can_edit_profile_photo
getBusinessAccountStarBalance can_view_gifts_and_stars
postStory can_manage_stories

The three account methods name can_change_name, can_change_username and can_change_bio in their descriptions, while the BusinessBotRights fields are can_edit_*, so check the field names. Gift rights also exist: can_change_gift_settings, can_convert_gifts_to_stars, can_transfer_and_upgrade_gifts and can_transfer_stars.

Reply to a business message

This request is built from the sendMessage parameters, not copied from a Telegram sample. chat_id is the chat of the incoming business message:

curl -s "https://api.telegram.org/bot$BOT_TOKEN/sendMessage" \
  -H "Content-Type: application/json" \
  -d '{"business_connection_id": "BUSINESS_CONNECTION_ID", "chat_id": 123456789, "text": "Thanks, we will reply shortly."}'

Our webhook server below uses only the Python standard library. It stores each connection, checks is_enabled and rights.can_reply, and replies to text messages. It fetches a connection it hasn’t seen with getBusinessConnection.

import hmac
import json
import os
import urllib.request
from http.server import BaseHTTPRequestHandler, HTTPServer

TOKEN = os.environ["BOT_TOKEN"]
SECRET = os.environ["WEBHOOK_SECRET"]  # the secret_token you passed to setWebhook
connections = {}  # business_connection_id -> BusinessConnection; use a database in production


def call(method, payload):
    req = urllib.request.Request(
        f"https://api.telegram.org/bot{TOKEN}/{method}",
        data=json.dumps(payload).encode(),
        headers={"Content-Type": "application/json"},
    )
    with urllib.request.urlopen(req, timeout=10) as resp:
        return json.load(resp)


def connection(connection_id):
    if connection_id not in connections:
        result = call("getBusinessConnection", {"business_connection_id": connection_id})
        connections[connection_id] = result["result"]
    return connections[connection_id]


def handle(update):
    if "business_connection" in update:
        conn = update["business_connection"]
        connections[conn["id"]] = conn
    elif "business_message" in update:
        msg = update["business_message"]
        conn = connection(msg["business_connection_id"])
        rights = conn.get("rights", {})
        from_owner = msg.get("from", {}).get("id") == conn["user"]["id"]
        skip = from_owner or msg.get("is_from_offline") or "sender_business_bot" in msg
        if conn.get("is_enabled") and rights.get("can_reply") and "text" in msg and not skip:
            call("sendMessage", {
                "business_connection_id": msg["business_connection_id"],
                "chat_id": msg["chat"]["id"],
                "text": "Thanks, we will reply shortly.",
            })
    elif "deleted_business_messages" in update:
        deleted = update["deleted_business_messages"]
        print("deleted", deleted["chat"]["id"], deleted["message_ids"])


class Webhook(BaseHTTPRequestHandler):
    def do_POST(self):
        token = self.headers.get("X-Telegram-Bot-Api-Secret-Token", "")
        if not hmac.compare_digest(token, SECRET):
            self.send_response(401)
            self.end_headers()
            return
        body = self.rfile.read(int(self.headers.get("Content-Length", 0)))
        self.send_response(200)
        self.end_headers()
        handle(json.loads(body))


HTTPServer(("", int(os.environ.get("PORT", "8080"))), Webhook).serve_forever()

The skip line is defensive. It stops the bot answering the account owner, an away message or its own replies, in case any of them reach the handler as a business_message. The secret token comparison is the one from Telegram webhook setup with a secret token. This handler answers every text message, which suits a demo. A real bot decides when a human should take over.

Limits that shape the design

can_reply stops at chats with an incoming message in the last 24 hours. Telegram doesn’t say outright whether a business bot can open a new chat, but that limit suggests it can’t. Design the bot around answering chats the customer started.

Inline keyboard buttons of type web_app are “Not supported for messages sent on behalf of a business account”. Launch Mini Apps from your bot’s own private chat, as described in Telegram Mini Apps and initData.

Users who connect your bot see a bar at the top of each managed chat. Tapping “Manage Bot” sends your bot a deep link message, /start bizChat<user_chat_id>. Parse it like any other start parameter, as in Telegram bot deep links.

Privacy mode governs groups: bots in groups “only see relevant messages and commands” by default. Business chats are private chats, so the gate here is the owner’s chat selection. That’s our reading, since Telegram’s pages don’t address business chats in the privacy section. Group behaviour is in Telegram bot privacy mode.

Bot API 10.0 added replies to other bots from a business bot, if the business bot enabled bot-to-bot communication. The pages we read list no rate limits specific to business bots, so the general ones in Telegram Bot API limits and retry_after are the only reference. The features page also points business bot developers to Section 5.4 of Telegram’s Bot Developer Terms.

Z-API Omni team