1---2name: 2587-api-methods-d06893ba3description: Telegram Bot API - Complete Methods Reference4---5# Telegram Bot API - Complete Methods Reference67> Based on Bot API 9.4 (February 2026). Base URL: `https://api.telegram.org/bot<token>/METHOD_NAME`89---1011## Getting Updates1213| Method | Description |14|---|---|15| `getUpdates` | Long polling. Returns array of `Update` objects. Use `offset` to confirm receipt, `timeout` for long polling, `allowed_updates` to filter. |16| `setWebhook` | Set HTTPS URL for incoming updates. Ports: 443, 80, 88, 8443. Supports `secret_token` header verification. `ip_address` for DNS workaround. `max_connections` (1-100, default 40). |17| `deleteWebhook` | Remove webhook integration. Optional `drop_pending_updates`. |18| `getWebhookInfo` | Get current webhook status: URL, pending count, last error, allowed updates. |1920**Polling vs Webhook decision:**21- **Polling** (`getUpdates`): Simpler setup, good for development, no HTTPS needed. Set `timeout` to 30+ for long polling efficiency.22- **Webhook** (`setWebhook`): Better for production, lower latency, requires HTTPS. Use `secret_token` for verification.2324---2526## Bot Identity & Commands2728| Method | Description |29|---|---|30| `getMe` | Returns basic bot info (id, name, username, can_join_groups, etc.) |31| `logOut` | Log out from cloud Bot API before switching to local server. |32| `close` | Close bot instance gracefully. |33| `setMyCommands` | Register bot commands visible in menu. Accepts `commands[]` and `scope` (default, private chats, groups, specific chat, etc.) and `language_code`. |34| `deleteMyCommands` | Remove commands for given scope/language. |35| `getMyCommands` | Get current command list for scope/language. |36| `setMyName` | Set bot display name (up to 64 chars) per language. |37| `getMyName` | Get bot display name. |38| `setMyDescription` | Bot description shown in empty chat (up to 512 chars). |39| `getMyDescription` | Get bot description. |40| `setMyShortDescription` | Brief description for sharing (up to 120 chars). |41| `getMyShortDescription` | Get short description. |42| `setMyDefaultAdministratorRights` | Set default admin rights when added to groups/channels. |43| `getMyDefaultAdministratorRights` | Get default admin rights. |44| `setMyProfilePhoto` | Update bot profile picture. |45| `removeMyProfilePhoto` | Delete bot profile image. |4647---4849## Sending Messages5051### Text & Formatting5253| Method | Description |54|---|---|55| `sendMessage` | Send text message. Supports `parse_mode` (HTML, Markdown, MarkdownV2), `entities`, `link_preview_options`, `reply_markup`, `reply_parameters`, `message_thread_id` for forum topics. |5657**Parse modes:**58- **HTML**: `<b>bold</b>`, `<i>italic</i>`, `<u>underline</u>`, `<s>strike</s>`, `<code>code</code>`, `<pre>pre</pre>`, `<a href="url">link</a>`, `<tg-spoiler>spoiler</tg-spoiler>`, `<blockquote>quote</blockquote>`, `<tg-emoji emoji-id="ID">emoji</tg-emoji>`59- **MarkdownV2**: `*bold*`, `_italic_`, `__underline__`, `~strikethrough~`, `||spoiler||`, `` `code` ``, ` ```pre``` `, `[link](url)`, `>blockquote`, ``. Escape: `_*[]()~>#+-=|{}.!`6061### Media Messages6263| Method | Description |64|---|---|65| `sendPhoto` | Send photo (file_id, URL, or upload). Max 10MB. Supports `caption`, `parse_mode`, `has_spoiler`, `show_caption_above_media`. |66| `sendVideo` | Send video. Max 50MB. Supports `duration`, `width`, `height`, `thumbnail`, `has_spoiler`, `supports_streaming`. |67| `sendAnimation` | Send GIF or H.264 video without sound. Max 50MB. |68| `sendAudio` | Send audio/music file. Max 50MB. Supports `title`, `performer`, `duration`. |69| `sendDocument` | Send general file. Max 50MB. `disable_content_type_detection` optional. |70| `sendVoice` | Send voice message (.ogg OPUS). Max 50MB. |71| `sendVideoNote` | Send round/circular video. Max 1 min, equal width/height. |72| `sendMediaGroup` | Send album of 2-10 photos/videos/documents/audios. Returns array of Messages. |73| `sendSticker` | Send .webp, .tgs (animated), or .webm (video) sticker. |74| `sendPaidMedia` | Send photo/video requiring Telegram Stars payment (up to 25000 Stars). |7576### Interactive Content7778| Method | Description |79|---|---|80| `sendLocation` | Send GPS point. Optional `live_period` (60-86400s) for live location, `heading`, `proximity_alert_radius`. |81| `sendVenue` | Send venue with name, address, and optional foursquare/google place IDs. |82| `sendContact` | Send phone contact (phone_number, first_name, optional last_name, vcard). |83| `sendPoll` | Create poll. `type`: "regular" or "quiz". Supports `is_anonymous`, `allows_multiple_answers`, `correct_option_id` (quiz), `explanation`, `open_period` or `close_date`. |84| `sendDice` | Send animated emoji with random value. Emoji: dice, darts, basketball, football, bowling, slot machine. |85| `sendInvoice` | Send payment invoice. Requires `title`, `description`, `payload`, `currency`, `prices[]`. Supports `provider_token`, `need_shipping_address`, `is_flexible`, Telegram Stars (`currency: "XTR"`). |86| `sendGame` | Send game. Requires `game_short_name` registered with @BotFather. |8788### Message Draft (Streaming)8990| Method | Description |91|---|---|92| `sendMessageDraft` | Stream partial messages during generation. Useful for AI-powered bots showing typing progress. |9394---9596## Message Operations9798| Method | Description |99|---|---|100| `forwardMessage` | Forward message preserving original sender. |101| `forwardMessages` | Forward multiple messages (up to 100) as album. |102| `copyMessage` | Copy message content without forward header. Returns `MessageId`. |103| `copyMessages` | Copy multiple messages. Returns array of `MessageId`. |104| `editMessageText` | Edit text of sent message (bot's own or inline). |105| `editMessageCaption` | Edit media caption. |106| `editMessageMedia` | Replace media content entirely. |107| `editMessageReplyMarkup` | Update inline keyboard. |108| `editMessageLiveLocation` | Update live location message. |109| `stopMessageLiveLocation` | Stop live location updates. |110| `deleteMessage` | Delete message (bot's own: no time limit; others: within 48h in groups). |111| `deleteMessages` | Delete multiple messages (up to 100) at once. |112| `setMessageReaction` | Add/remove emoji or custom emoji reaction. |113114---115116## Chat Management117118### Chat Information119120| Method | Description |121|---|---|122| `getChat` | Get `ChatFullInfo`: photo, bio, permissions, linked chat, pinned message, sticker set, invite link, slow mode, etc. |123| `getChatAdministrators` | List all administrators with their rights. |124| `getChatMemberCount` | Get total member count. |125| `getChatMember` | Get info about specific member (status, rights, restrictions). |126| `leaveChat` | Bot leaves the group/supergroup/channel. |127128### Chat Modification129130| Method | Description |131|---|---|132| `setChatTitle` | Change chat title (1-128 chars). |133| `setChatDescription` | Change chat description (0-255 chars). |134| `setChatPhoto` | Set chat profile photo. |135| `deleteChatPhoto` | Remove chat photo. |136| `setChatPermissions` | Set default member permissions. `use_independent_chat_permissions` for granular control. |137| `setChatStickerSet` | Set supergroup sticker set. |138| `deleteChatStickerSet` | Remove supergroup sticker set. |139| `setChatBackground` | Set chat background (fill, wallpaper, pattern, theme). |140| `deleteChatBackground` | Reset chat background. |141| `pinChatMessage` | Pin message. `business_connection_id` supported. |142| `unpinChatMessage` | Unpin specific message. |143| `unpinAllChatMessages` | Unpin all messages. |144145### Member Management146147| Method | Description |148|---|---|149| `banChatMember` | Ban user (and optionally `revoke_messages`). `until_date` for temporary ban. |150| `unbanChatMember` | Unban user. `only_if_banned` to avoid adding removed users back. |151| `restrictChatMember` | Apply specific `ChatPermissions` to user. `until_date` for temporary. |152| `promoteChatMember` | Grant/revoke admin rights: `can_manage_chat`, `can_delete_messages`, `can_manage_video_chats`, `can_restrict_members`, `can_promote_members`, `can_change_info`, `can_invite_users`, `can_post_stories`, `can_edit_stories`, `can_delete_stories`, `can_pin_messages`, `can_manage_topics`, `can_manage_direct_messages`. |153| `setChatAdministratorCustomTitle` | Set custom title for admin (up to 16 chars). |154| `acceptChatJoinRequest` | Approve join request. |155| `declineChatJoinRequest` | Reject join request. |156157### Invite Links158159| Method | Description |160|---|---|161| `exportChatInviteLink` | Generate new primary invite link. |162| `createChatInviteLink` | Create additional invite link with optional `name`, `expire_date`, `member_limit`, `creates_join_request`. |163| `editChatInviteLink` | Edit non-primary invite link. |164| `revokeChatInviteLink` | Revoke invite link. |165| `approveChatJoinRequest` | Approve user who requested to join. |166| `declineChatJoinRequest` | Decline join request. |167168---169170## Forum Topics171172| Method | Description |173|---|---|174| `createForumTopic` | Create topic in forum supergroup or private chat. Params: `name`, `icon_color`, `icon_custom_emoji_id`. |175| `editForumTopic` | Edit topic name and icon. |176| `closeForumTopic` | Close/archive topic. |177| `reopenForumTopic` | Reopen closed topic. |178| `deleteForumTopic` | Delete topic with all messages. |179| `unpinAllForumTopicMessages` | Unpin all messages in topic. |180| `editGeneralForumTopic` | Rename general topic. |181| `closeGeneralForumTopic` | Close general topic. |182| `reopenGeneralForumTopic` | Reopen general topic. |183| `hideGeneralForumTopic` | Hide general topic. |184| `unhideGeneralForumTopic` | Unhide general topic. |185| `getForumTopicIconStickers` | Get custom emoji stickers for topic icons. |186187---188189## Inline Mode190191| Method | Description |192|---|---|193| `answerInlineQuery` | Respond to inline query with up to 50 results. Supports `cache_time`, `is_personal`, `next_offset` for pagination, `button` for switching to PM. |194195**Result types:** `InlineQueryResultArticle`, `InlineQueryResultPhoto`, `InlineQueryResultGif`, `InlineQueryResultMpeg4Gif`, `InlineQueryResultVideo`, `InlineQueryResultAudio`, `InlineQueryResultVoice`, `InlineQueryResultDocument`, `InlineQueryResultLocation`, `InlineQueryResultVenue`, `InlineQueryResultContact`, `InlineQueryResultGame`, `InlineQueryResultCachedPhoto`, `InlineQueryResultCachedGif`, `InlineQueryResultCachedMpeg4Gif`, `InlineQueryResultCachedSticker`, `InlineQueryResultCachedDocument`, `InlineQueryResultCachedVideo`, `InlineQueryResultCachedVoice`, `InlineQueryResultCachedAudio`196197---198199## Callback Queries & Web Apps200201| Method | Description |202|---|---|203| `answerCallbackQuery` | Respond to callback button press. Optional `text` (notification), `show_alert` (modal), `url` (open URL/game), `cache_time`. |204| `answerWebAppQuery` | Set result of Web App interaction. Returns `SentWebAppMessage`. |205206---207208## Payments209210| Method | Description |211|---|---|212| `sendInvoice` | Send payment invoice with product info, prices, and optional shipping. |213| `createInvoiceLink` | Create invoice link for any chat. Returns URL string. |214| `answerShippingQuery` | Respond to shipping query with available options or error. |215| `answerPreCheckoutQuery` | Final confirmation before charging. Must respond within 10 seconds. |216| `refundStarPayment` | Refund Telegram Stars payment. Requires `user_id` and `telegram_payment_charge_id`. |217| `getStarTransactions` | Get bot's Star transaction history. |218219**Telegram Stars:** Use `currency: "XTR"`, no `provider_token` needed. One price item only. Supports refunds via `refundStarPayment`.220221---222223## Stickers224225| Method | Description |226|---|---|227| `sendSticker` | Send sticker by file_id, URL, or upload. |228| `getStickerSet` | Get sticker set by name. |229| `getCustomEmojiStickers` | Get custom emoji stickers by IDs (up to 200). |230| `uploadStickerFile` | Upload sticker file for later use in set. |231| `createNewStickerSet` | Create sticker set owned by user. Supports static, animated, video, mask, custom_emoji types. |232| `addStickerToSet` | Add sticker to existing set (up to 120 for static, 50 for animated/video). |233| `setStickerPositionInSet` | Move sticker within set. |234| `deleteStickerFromSet` | Remove sticker from set. |235| `replaceStickerInSet` | Replace existing sticker in set. |236| `setStickerEmojiList` | Set emoji list for sticker. |237| `setStickerKeywordList` | Set search keywords for sticker. |238| `setStickerMaskPosition` | Set mask position for mask sticker. |239| `setStickerSetTitle` | Rename sticker set. |240| `setStickerSetThumbnail` | Set sticker set thumbnail. |241| `setCustomEmojiStickerSetThumbnail` | Set custom emoji set thumbnail. |242| `deleteStickerSet` | Delete sticker set created by bot. |243244---245246## Games247248| Method | Description |249|---|---|250| `sendGame` | Send game (registered via @BotFather). |251| `setGameScore` | Update game score. `force` to overwrite lower. `disable_edit_message` to not update message. |252| `getGameHighScores` | Get high score table around target user. |253254---255256## Gifts & Boosts257258| Method | Description |259|---|---|260| `getAvailableGifts` | List available gifts for sending. |261| `sendGift` | Send gift to user or channel. |262| `getUserGifts` | Get gifts received by user. |263| `getChatGifts` | Get gifts for chat/user. |264| `getBusinessAccountGifts` | Get gifts for business account. |265| `getUserChatBoosts` | Get user's boosts for specific chat. |266267---268269## Suggested Posts (Channel Direct Messages)270271| Method | Description |272|---|---|273| `approveSuggestedPost` | Approve incoming suggested post. |274| `declineSuggestedPost` | Reject incoming suggested post. |275276---277278## Checklists279280| Method | Description |281|---|---|282| `addTaskToChecklist` | Append task to message checklist. |283| `editChecklistTask` | Modify task text or completion status. |284| `deleteChecklistTask` | Remove task from checklist. |285286---287288## Stories289290| Method | Description |291|---|---|292| `repostStory` | Cross-post story across managed business accounts. |293294---295296## Giveaways297298| Method | Description |299|---|---|300| `sendGiveaway` | Create scheduled giveaway. |301| `getGiveawayWinners` | List giveaway winners. |302303---304305## Passport306307| Method | Description |308|---|---|309| `setPassportDataErrors` | Notify user of issues with their Telegram Passport documents. Accepts array of `PassportElementError` types. |310311**Error types:** `PassportElementErrorDataField`, `PassportElementErrorFrontSide`, `PassportElementErrorReverseSide`, `PassportElementErrorSelfie`, `PassportElementErrorFile`, `PassportElementErrorFiles`, `PassportElementErrorTranslationFile`, `PassportElementErrorTranslationFiles`, `PassportElementErrorUnspecified`312313---314315## File Handling316317| Method | Description |318|---|---|319| `getFile` | Get file download path. Returns `File` with `file_path`. Download: `https://api.telegram.org/file/bot<token>/<file_path>`. Max 20MB via Bot API. |320321**File limits (standard Bot API):**322- Download: 20 MB max323- Upload: 50 MB max324- Photo upload: 10 MB max325326**Local Bot API Server:**327- Download/Upload: up to 2000 MB328- Supports `file://` URIs329- HTTP webhooks allowed (no HTTPS required)330331**Sending files three ways:**3321. **file_id**: Reuse previously uploaded file (most efficient)3332. **URL**: Telegram downloads from URL (max 5MB for photos, 20MB for others)3343. **Upload**: multipart/form-data upload335336---337338## Profile Audio339340| Method | Description |341|---|---|342| `getUserProfileAudios` | Fetch user's profile audio list. |343| `getUserProfilePhotos` | Get user profile photos. `offset` and `limit` for pagination. |