The Telegram Bot API Methods That Actually Matter, Grouped by Job

The Telegram Bot API Methods That Actually Matter, Grouped by Job

The official reference lists every method alphabetically, which is correct and unhelpful when you are trying to build a specific thing.

This groups the methods by what you are actually doing, with the parameter limits and behaviours that cause real bugs. Quoted text below is verbatim from Telegram's documentation; unquoted figures come from the Bot API reference, the Bot FAQ or the Telegram Stars terms, and anything that is our own inference is marked as such.

Selling access to a channel

createChatSubscriptionInviteLink — a recurring paid subscription link.

editChatSubscriptionInviteLink — takes chat_id, invite_link, and name. That is all.

You cannot change the price of an existing subscription link. To sell at a new price, create a new link. The Bot API documents only that editChatSubscriptionInviteLink takes chat_id, invite_link and name — it says nothing about what happens to users already subscribed through the old link, so verify that on a test channel before you build pricing around it. See tiered access.

Managing invite links

createChatInviteLink

revokeChatInviteLink"If the primary link is revoked, a new link is automatically generated." Revoking your primary link invalidates every published copy of it. Revoke the links you created for a purpose; leave the primary alone.

Footgun: revoke a member's link when you remove them, or that link works again. See invite link leaks.

Approving members

approveChatJoinRequest / declineChatJoinRequest — both need can_invite_users.

The ChatJoinRequest object is more useful than most people realise:

A five-minute private channel to a prospective member who is not yet in your group. See join requests.

Removing and restricting

banChatMember

unbanChatMember

Always pass only_if_banned=True. Without it, unbanning an active member kicks them. A cleanup job over past removals will silently eject paying subscribers.

restrictChatMember — takes a ChatPermissions object. This is how you mute new accounts for their first 24–48 hours, which is the defence that actually matches modern join-raid attacks. Bot API 10.0 added can_react_to_messages as a separately restrictable permission.

Ticketing with forum topics

A supergroup with topics enabled is a ticket system. The primitives:

MethodJobRequires
createForumTopicOpen a ticket (name 1–128 chars, icon_color)can_manage_topics
closeForumTopicMark resolvedcan_manage_topics (or be the topic's creator)
reopenForumTopicCustomer came backcan_manage_topics (or be the topic's creator)
editForumTopicRename as the issue clarifiescan_manage_topics (or be the topic's creator)
deleteForumTopicRemove topic and all messagescan_delete_messages

message_thread_id is Optional on Message"Unique identifier of a message thread or forum topic to which the message belongs; for supergroups and private chats only" — so it is absent on messages outside a thread; treat absence as the General topic rather than indexing blind. To route a reply into a topic you pass message_thread_id yourself on the send method. Ticket status reaches you as service messages, not as your own calls: forum_topic_closed and forum_topic_reopened are Optional fields on Message (ForumTopicClosed / ForumTopicReopened, both "Currently holds no information" — the topic is identified by the message's message_thread_id). Count those for reopen rate; counting your closeForumTopic / reopenForumTopic calls misses every close a human admin performs in the Telegram app. deleteForumTopic is your erasure primitive — though it only touches the Telegram side, not your database.

Receiving updates

setWebhook

getUpdates — long polling.

getWebhookInfo — pending update count and last delivery error. The first thing to call when updates stop. See debugging webhook failures.

deleteWebhook — required before switching back to polling; they are mutually exclusive.

Payments

refundStarPayment — refund a Stars purchase. It takes user_id and telegram_payment_charge_id (the value on SuccessfulPayment), so store both at purchase time.

Your bot must also handle /paysupport — a documented requirement for bots taking Stars payments, not a suggestion.

Delivery limits

Not a method, but it governs everything you send:

ScopeLimit
Single chat~1 message/second
Group20 messages/minute
Bulk broadcast~30 messages/second
With Paid Broadcastsup to 1,000/second

allow_paid_broadcast on send methods enables the higher rate at 0.1 Stars per message above the free 30/sec. The two official sources disagree on the gate: the Bot FAQ says "a bot must have at least 100,000 Stars on its balance and at least 100,000 monthly active users", while the Bot API page's Paid Broadcasts section says "In order to use this feature, a bot must have at least 10,000 Stars on its balance" and states no user requirement. Confirm in @BotFather before planning around either number.

On 429 the error response's parameters object (ResponseParameters) normally carries retry_after"Optional. In case of exceeding flood control, the number of seconds left to wait before the request can be repeated". Read it as parameters.retry_after, wait that long, and fall back to your own bounded backoff when it is absent. The same object carries migrate_to_chat_id when a group has been upgraded to a supergroup. See error handling.

Useful fields people miss

FieldOnWhy
language_codeUserIETF tag — routing default. Optional; may be absent
is_premiumUserWeak trust signal; costs money to maintain
bioChatJoinRequestSpam signal before admission
user_chat_idChatJoinRequestThe 5-minute pre-membership window
invite_linkChatMemberUpdatedAttribution — which link they joined through
via_join_requestChatMemberUpdatedDid they come via approval

invite_link on ChatMemberUpdated is easy to miss. Issue a separate link per traffic source and you get join attribution — but you must be an administrator and pass "chat_member" explicitly in allowed_updates, because it is not in the default set. invite_link is itself Optional, present "for joining by invite link events only", so joins by search, chat-folder link or an approved join request arrive without it.

The five that cause the most bugs

  1. unbanChatMember without only_if_banned — removes active members
  2. banChatMember with until_date under 30 seconds — permanent ban, silently
  3. member_limit read as total uses rather than simultaneous members
  4. editChatSubscriptionInviteLink assumed to change price — it cannot
  5. getUpdates left at timeout=0 — short polling, explicitly for testing only

Every parameter, limit and quoted behaviour verified directly against Telegram's Bot API documentation and Bot FAQ, September 2026. The /paysupport obligation is from the Telegram Stars terms. The ~$0.0133 net per Star figure is Telegram's payout rate, not a number published in the Bot API docs or the FAQ, and is approximate.