Optionaloptions: Partial<Options>Optionalresponse: ResponseKick a user from a group, a supergroup or a channel. In the case of supergroups and channels, the user will not be able to return to the group on their own using invite links, etc., unless unbanned first. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights.
Unique identifier for the target group or username of the target supergroup or channel (in the format @channelusername)
OptionaluntilDate: numberDate when the user will be unbanned, unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever
Optionalextra: Omit<{}, "chat_id" | "user_id" | "until_date">since API 5.3. Use Telegram.banChatMember
Use this method to set the thumbnail of a regular or mask sticker set. The format of the thumbnail file must match the format of the stickers in the set.
Sticker set name
User identifier of the sticker set owner
Optionalthumbnail: string | InputFileA .WEBP or .PNG image with the thumbnail, must be up to 128 kilobytes in size and have a width and height of exactly 100px, or a .TGS animation with a thumbnail up to 32 kilobytes in size (see animated sticker technical requirements), or a WEBM video with the thumbnail up to 32 kilobytes in size; see video sticker technical requirements. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass a HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using Input helpers. Animated and video sticker set thumbnails can't be uploaded via HTTP URL. If omitted, then the thumbnail is dropped and the first sticker is used as the thumbnail.
Format of the sticker set thumbnail; must be one of "static", "animated", or "video"
since API 6.8. Use Telegram.setStickerSetThumbnail
If set to true, first eligible call will avoid performing a POST request.
Note that such a call:
https://core.telegram.org/bots/faq#how-can-i-make-requests-in-response-to-updates https://github.com/telegraf/telegraf/pull/1250
Add a new sticker to a set created by the bot.
User identifier of sticker set owner
Sticker set name
Send answers to an inline query. No more than 50 results per query are allowed.
Optionalextra: Omit<{}, "chat_id" | "inline_query_id" | "results">Once the user has confirmed their payment and shipping details, the Bot API sends the final confirmation in the form of an Update with the field pre_checkout_query. Respond to such pre-checkout queries. On success, True is returned. Note: The Bot API must receive an answer within 10 seconds after the pre-checkout query was sent.
Specify True if everything is alright (goods are available, etc.) and the bot is ready to proceed with the order. Use False if there are any problems.
OptionalerrorMessage: stringRequired if ok is False. Error message in human readable form that explains the reason for failure to proceed with the checkout (e.g. "Sorry, somebody just bought the last of our amazing black T-shirts while you were busy filling out your payment details. Please choose a different color or garment!"). Telegram will display this message to the user.
If you sent an invoice requesting a shipping address and the parameter is_flexible was specified, the Bot API will send an Update with a shipping_query field to the bot. Reply to shipping queries.
Specify True if delivery to the specified address is possible and False if there are any problems (for example, if delivery to the specified address is not possible)
Required if ok is True. A JSON-serialized array of available shipping options.
Required if ok is False. Error message in human readable form that explains why it is impossible to complete the order (e.g. "Sorry, delivery to your desired address is unavailable'). Telegram will display this message to the user.
Use this method to set the result of an interaction with a Web App and send a corresponding message on behalf of the user to the chat from which the query originated. On success, a SentWebAppMessage object is returned.
A JSON-serialized object describing the message to be sent
Approve a chat join request. The bot must be an administrator in the chat for this to work and must have the can_invite_users administrator right.
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
Unique identifier of the target user
Use this method to approve a suggested post in a direct messages chat. The bot must have the 'can_post_messages' administrator right in the corresponding channel chat. Returns True on success.
Unique identifier for the target direct messages chat
Identifier of a suggested post message to approve
Optionalextra: Omit<{}, "chat_id">Point in time (Unix timestamp) when the post is expected to be published; omit if the date has already been specified when the suggested post was created. If specified, then the date must be not more than 2678400 seconds (30 days) in the future
Kick a user from a group, a supergroup or a channel. In the case of supergroups and channels, the user will not be able to return to the group on their own using invite links, etc., unless unbanned first. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights.
Unique identifier for the target group or username of the target supergroup or channel (in the format @channelusername)
OptionaluntilDate: numberDate when the user will be unbanned, unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever
Optionalextra: Omit<{}, "chat_id" | "user_id" | "until_date">Ban a channel chat in a supergroup or a channel. The owner of the chat will not be able to send messages and join live streams on behalf of the chat, unless it is unbanned first. The bot must be an administrator in the supergroup or channel for this to work and must have the appropriate administrator rights.
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
Unique identifier of the target sender chat
Optionalextra: { caption?: string | FmtString<string> }Close the bot instance before moving it from one local server to another.
Use this method to close an open topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success.
Unique identifier for the target message thread of the forum topic
Use this method to close an open 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. Returns True on success.
Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
Converts a given regular gift to Telegram Stars. Requires the can_convert_gifts_to_stars business bot right. Returns True on success.
Unique identifier of the business connection
Unique identifier of the regular gift that should be converted to Telegram Stars
Send copy of existing message.
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
Unique identifier for the chat where the original message was sent (or channel username in the format @channelusername)
Message identifier in the chat specified in from_chat_id
Optionalextra: { caption?: string | FmtString<string> }Use this method to copy messages of any kind. If some of the specified messages can't be found or copied, they are skipped. Service messages, giveaway messages, giveaway winners messages, and invoice messages can't be copied. A quiz poll can be copied only if the value of the field correct_option_id is known to the bot. The method is analogous to the method forwardMessages, but the copied messages don't have a link to the original message. Album grouping is kept for copied messages.
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
Unique identifier for the chat where the original messages were sent (or channel username in the format @channelusername)
Identifiers of 1-100 messages in the chat from_chat_id to copy. The identifiers must be specified in a strictly increasing order.
Optionalextra: Omit<{}, "chat_id" | "from_chat_id" | "message_ids">Use this method to create a subscription invite link for a channel chat. The bot must have the can_invite_users administrator rights. The link can be edited using the method editChatSubscriptionInviteLink or revoked using the method revokeChatInviteLink. Returns the new invite link as a ChatInviteLink object.
Unique identifier for the target channel chat or username of the target channel (in the format @channelusername)
The amount of Telegram Stars a user must pay initially and after each subsequent subscription period to be a member of the chat; 1-10000
Optionalextra: Omit<{}, "chat_id" | "subscription_period" | "subscription_price">Invite link name; 0-32 characters
Use this method to create a topic in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator right. Returns information about the created topic as a ForumTopic object.
Topic name, 1-128 characters
Optionalextra: Omit<{}, "chat_id" | "name">Color of the topic icon in RGB format. Currently, must be one of 7322096 (0x6FB9F0), 16766590 (0xFFD67E), 13338331 (0xCB86DB), 9367192 (0x8EEE98), 16749490 (0xFF93B2), or 16478047 (0xFB6F5F)
Unique identifier of the custom emoji shown as the topic icon. Use getForumTopicIconStickers to get all allowed custom emoji identifiers.
Create new sticker set owned by a user. The bot will be able to edit the created sticker set.
User identifier of created sticker set owner
Short name of sticker set, to be used in t.me/addstickers/ URLs (e.g., animals). Can contain only english letters, digits and underscores. Must begin with a letter, can't contain consecutive underscores and must end in “by
Sticker set title, 1-64 characters
Decline a chat join request. The bot must be an administrator in the chat for this to work and must have the can_invite_users administrator right.
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
Unique identifier of the target user
Use this method to decline a suggested post in a direct messages chat. The bot must have the 'can_manage_direct_messages' administrator right in the corresponding channel chat. Returns True on success.
Unique identifier for the target direct messages chat
Identifier of a suggested post message to approve
Optionalextra: Omit<{}, "chat_id">Comment for the creator of the suggested post; 0-128 characters
Delete messages on behalf of a business account. Requires the can_delete_sent_messages business bot right to delete messages sent by the bot itself, or the can_delete_all_messages business bot right to delete any message. Returns True on success.
Unique identifier of the business connection on behalf of which to read the message
A JSON-serialized list of 1-100 identifiers of messages to delete. All messages must be from the same chat. See deleteMessage for limitations on which messages can be deleted
Use this method to delete a forum topic along with all its messages in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_delete_messages administrator rights. Returns True on success.
Unique identifier for the target message thread of the forum topic
Delete a message, including service messages, with the following limitations:
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
Identifier of the message to delete
Use this method to delete multiple messages simultaneously. If some of the specified messages can't be found, they are skipped.
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
Identifiers of 1-100 messages to delete. See deleteMessage for limitations on which messages can be deleted
Delete a sticker from a set created by the bot.
File identifier of the sticker
Deletes a story previously posted by the bot on behalf of a managed business account. Requires the can_manage_stories business bot right. Returns True on success.
Unique identifier of the business connection
Unique identifier of the story to delete
Remove webhook integration.
Optionalextra: { drop_pending_updates?: boolean }Use this method to edit a subscription invite link created by the bot. The bot must have the can_invite_users administrator rights. Returns the edited invite link as a ChatInviteLink object.
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
The invite link to edit
Optionalextra: Omit<{}, "chat_id" | "invite_link">Invite link name; 0-32 characters
Use this method to edit name and icon of a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success.
Unique identifier for the target message thread of the forum topic
Use this method to edit the name of the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have can_manage_topics administrator rights. Returns True on success.
Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
New topic name, 1-128 characters
Edit captions of messages sent by the bot or via the bot (for inline bots). On success, if edited message is sent by the bot, the edited Message is returned, otherwise True is returned.
Required if inlineMessageId is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)
Required if inlineMessageId is not specified. Identifier of the sent message
Required if chatId and messageId are not specified. Identifier of the inline message
New caption of the message
Optionalextra: Omit<{}, "caption" | "chat_id" | "message_id" | "inline_message_id">Use this method to edit a checklist on behalf of a connected business account. On success, the edited Message is returned.
Unique identifier of the business connection on behalf of which the message will be sent
Unique identifier for the target chat
Unique identifier for the target message
A JSON-serialized object for the checklist to send
Optionalextra: Omit<{}, "chat_id" | "business_connection_id" | "message_id" | "checklist">A JSON-serialized object for the new inline keyboard for the message
Optionalextra: Omit<Edit animation, audio, document, photo, or video messages. If a message is a part of a message album, then it can be edited only to a photo or a video. Otherwise, message type can be changed arbitrarily. When inline message is edited, new file can't be uploaded. Use previously uploaded file via its file_id or specify a URL.
Required if inlineMessageId is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)
Required if inlineMessageId is not specified. Identifier of the sent message
Required if chatId and messageId are not specified. Identifier of the inline message
New media of message
Optionalextra: Omit<{}, "chat_id" | "message_id" | "inline_message_id" | "media">Additional parameters, such as reply_markup
Edit only the reply markup of messages sent by the bot or via the bot (for inline bots).
Required if inlineMessageId is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)
Required if inlineMessageId is not specified. Identifier of the sent message
Required if chatId and messageId are not specified. Identifier of the inline message
A JSON-serialized object for an inline keyboard.
If edited message is sent by the bot, the edited Message is returned, otherwise True is returned.
Edit text and game messages sent by the bot or via the bot (for inline bots). On success, if edited message is sent by the bot, the edited Message is returned, otherwise True is returned.
Required if inlineMessageId is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)
Required if inlineMessageId is not specified. Identifier of the sent message
Required if chatId and messageId are not specified. Identifier of the inline message
New text of the message
Optionalextra: Omit<{}, "text" | "chat_id" | "message_id" | "inline_message_id">Edits a story previously posted by the bot on behalf of a managed business account. Requires the can_manage_stories business bot right. Returns Story on success.
Unique identifier of the business connection
Unique identifier of the story to edit
Content of the story
Optionalextra: { caption?: string | FmtString<string> }Optionalcaption?: string | FmtString<string>Caption of the story, 0-2048 characters after entities parsing
Allows the bot to cancel or re-enable extension of a subscription paid in Telegram Stars. Returns True on success.
Identifier of the user whose subscription will be edited
Telegram payment identifier for the subscription
Pass True to cancel extension of the user subscription; the subscription must be active up to the end of the current subscription period. Pass False to allow the user to re-enable a subscription that was previously canceled by the bot.
Export an invite link to a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights.
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
Forward existing message.
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
Unique identifier for the chat where the original message was sent (or channel username in the format @channelusername)
Message identifier in the chat specified in from_chat_id
Optionalextra: Omit<{}, "chat_id" | "from_chat_id" | "message_id">Use this method to forward multiple messages of any kind. If some of the specified messages can't be found or forwarded, they are skipped. Service messages and messages with protected content can't be forwarded. Album grouping is kept for forwarded messages.
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
Unique identifier for the chat where the original messages were sent (or channel username in the format @channelusername)
Identifiers of 1-100 messages in the chat from_chat_id to forward. The identifiers must be specified in a strictly increasing order.
Optionalextra: Omit<{}, "chat_id" | "from_chat_id" | "message_ids">Returns the list of gifts that can be sent by the bot to users and channel chats. Requires no parameters. Returns a Gifts object.
Returns the gifts received and owned by a managed business account. Requires the can_view_gifts_and_stars business bot right. Returns OwnedGifts on success.
Unique identifier of the business connection
Optionalextra: Omit<{}, "chat_id" | "business_connection_id">Pass True to exclude gifts that aren't saved to the account's profile page
Pass True to exclude gifts that are saved to the account's profile page
Pass True to exclude gifts that can be purchased an unlimited number of times
Pass True to exclude gifts that can be purchased a limited number of times and can be upgraded to unique
Pass True to exclude gifts that can be purchased a limited number of times and can't be upgraded to unique
Pass True to exclude unique gifts
Pass True to exclude gifts that were assigned from the TON blockchain and can't be resold or transferred in Telegram
Pass True to sort results by gift price instead of send date. Sorting is applied before pagination.
Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results
The maximum number of gifts to be returned; 1-100. Defaults to 100
Returns the amount of Telegram Stars owned by a managed business account. Requires the can_view_gifts_and_stars business bot right. Returns StarAmount on success.
Unique identifier of the business connection
Get up to date information about the chat (current name of the user for one-on-one conversations, current username of a user, group or channel, etc.).
Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)
Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)
Returns the gifts owned by a chat. Returns OwnedGifts on success.
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
Optionalextra: Omit<{}, "chat_id">Pass True to exclude gifts that aren't saved to the account's profile page
Pass True to exclude gifts that are saved to the account's profile page
Pass True to exclude gifts that can be purchased an unlimited number of times
Pass True to exclude gifts that can be purchased a limited number of times and can be upgraded to unique
Pass True to exclude gifts that can be purchased a limited number of times and can't be upgraded to unique
Pass True to exclude gifts that were assigned from the TON blockchain and can't be resold or transferred in Telegram
Pass True to exclude unique gifts
Pass True to sort results by gift price instead of send date. Sorting is applied before pagination.
Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results
The maximum number of gifts to be returned; 1-100. Defaults to 100
Get information about a member of a chat.
Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)
Unique identifier of the target user
Get the number of members in a chat.
Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)
Use this method to get the current value of the bot's menu button in a private chat, or the default menu button. Returns MenuButton on success.
Unique identifier for the target private chat. If not specified, default bot's menu button will be returned.
Get basic info about a file and prepare it for downloading.
Id of file to get link to
Get download link to a file.
Use this method to get custom emoji stickers, which can be used as a forum topic icon by any user. Requires no parameters. Returns an Array of Sticker objects.
Get basic information about the bot
Get the current list of the bot's commands.
Use this method to get the current default administrator rights of the bot. Returns ChatAdministratorRights on success.
Pass true to get default administrator rights of the bot in channels. Otherwise, default administrator rights of the bot for groups and supergroups will be returned.
Use this method to get the current bot description for the given user language.
Optionallanguage_code: stringA two-letter ISO 639-1 language code.
Use this method to get the current bot name for the given user language.
Optionallanguage_code: stringA two-letter ISO 639-1 language code or an empty string
Use this method to get the current bot short description for the given user language.
Optionallanguage_code: stringA two-letter ISO 639-1 language code or an empty string
A method to get the current Telegram Stars balance of the bot. Requires no parameters. On success, returns a StarAmount object.
Returns the bot's Telegram Star transactions in chronological order. On success, returns a StarTransactions object.
Optionaloffset: numberNumber of transactions to skip in the response
Optionallimit: numberThe maximum number of transactions to be retrieved. Values between 1-100 are accepted. Defaults to 100
Directly request incoming updates.
You should probably use Telegraf::launch instead.
Use this method to get the list of boosts added to a chat by a user. Requires administrator rights in the chat. Returns a UserChatBoosts object.
Unique identifier for the chat or username of the channel (in the format @channelusername)
Unique identifier of the target user
Returns the gifts owned and hosted by a user. Returns OwnedGifts on success.
Unique identifier of the user
Optionalextra: Omit<{}, "chat_id" | "user_id">Pass True to exclude gifts that can be purchased an unlimited number of times
Pass True to exclude gifts that can be purchased a limited number of times and can be upgraded to unique
Pass True to exclude gifts that can be purchased a limited number of times and can't be upgraded to unique
Pass True to exclude gifts that were assigned from the TON blockchain and can't be resold or transferred in Telegram
Pass True to exclude unique gifts
Pass True to sort results by gift price instead of send date. Sorting is applied before pagination.
Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results
The maximum number of gifts to be returned; 1-100. Defaults to 100
Use this method to get a list of profile audios for a user. Returns a UserProfileAudios object.
Unique identifier of the target user
Optionalextra: Omit<{}, "chat_id" | "user_id">Sequential number of the first audio to be returned. By default, all audios are returned.
Limits the number of audios to be retrieved. Values between 1-100 are accepted. Defaults to 100.
Use this method to get a list of profile pictures for a user. Returns a UserProfilePhotos object.
Unique identifier of the target user
Optionaloffset: numberSequential number of the first photo to be returned. By default, all photos are returned.
Optionallimit: numberLimits the number of photos to be retrieved. Values between 1-100 are accepted. Defaults to 100.
Gifts a Telegram Premium subscription to the given user. Returns True on success.
Unique identifier of the target user who will receive a Telegram Premium subscription
Number of months the Telegram Premium subscription will be active for the user; must be one of 3, 6, or 12
Number of Telegram Stars to pay for the Telegram Premium subscription; must be 1000 for 3 months, 1500 for 6 months, and 2500 for 12 months
Optionalextra: Omit<{}, "chat_id" | "user_id" | "star_count" | "month_count">Text that will be shown along with the service message about the subscription; 0-128 characters
Mode for parsing entities in the text. See formatting options for more details. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, and “custom_emoji” are ignored.
A JSON-serialized list of special entities that appear in the gift text. It can be specified instead of text_parse_mode. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, and “custom_emoji” are ignored.
Use this method to hide the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. The topic will be automatically closed if it was open. Returns True on success.
Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
Use this method for your bot to leave a group, supergroup or channel.
Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)
Log out from the cloud Bot API server before launching the bot locally.
Pin a message in a group, a supergroup, or a channel. The bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' admin right in the supergroup or 'can_edit_messages' admin right in the channel.
Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
Optionalextra: { disable_notification?: boolean }Posts a story on behalf of a managed business account. Requires the can_manage_stories business bot right. Returns Story on success.
Unique identifier of the business connection
Content of the story
Period after which the story is moved to the archive, in seconds; must be one of 6 * 3600, 12 * 3600, 86400, or 2 * 86400
Optionalextra: { caption?: string | FmtString<string> }Optionalcaption?: string | FmtString<string>Caption of the story, 0-2048 characters after entities parsing
Promote or demote a user in a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Pass False for all boolean parameters to demote a user.
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
Marks incoming message as read on behalf of a business account. Requires the can_read_messages business bot right. Returns True on success.
Unique identifier of the business connection on behalf of which to read the message
Unique identifier of the chat in which the message was received. The chat must have been active in the last 24 hours.
Unique identifier of the message to mark as read
Refunds a successful payment in Telegram Stars. Returns True on success.
Identifier of the user whose payment will be refunded
Telegram payment identifier
Removes the current profile photo of a managed business account. Requires the can_edit_profile_photo business bot right. Returns True on success.
Unique identifier of the business connection
OptionalisPublic: booleanPass True to remove the public photo, which is visible even if the main photo is hidden by the business account's privacy settings. After the main photo is removed, the previous profile photo (if present) becomes the main photo.
Removes verification from a chat that is currently verified on behalf of the organization represented by the bot. Returns True on success.
Unique identifier for the target chat or username of the target channel (in the format @channelusername). Channel direct messages chats can't be verified.
Removes the profile photo of the bot. Requires no parameters. Returns True on success.
Removes verification from a user who is currently verified on behalf of the organization represented by the bot. Returns True on success.
Unique identifier of the target user
Use this method to reopen a closed topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success.
Unique identifier for the target message thread of the forum topic
Use this method to reopen a closed 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. The topic will be automatically unhidden if it was hidden. Returns True on success.
Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
Reposts a story on behalf of a business account from another business account. Both business accounts must be managed by the same bot, and the story on the source account must have been posted (or reposted) by the bot. Requires the can_manage_stories business bot right for both business accounts. Returns Story on success.
Unique identifier of the business connection
Unique identifier of the chat which posted the story that should be reposted
Unique identifier of the story that should be reposted
Period after which the story is moved to the archive, in seconds; must be one of 6 * 3600, 12 * 3600, 86400, or 2 * 86400
Optionalextra: Omit<Pass True to keep the story accessible after it expires
Pass True if the content of the story must be protected from forwarding and screenshotting
Restrict a user in a supergroup. The bot must be an administrator in the supergroup for this to work and must have the appropriate admin rights. Pass True for all boolean parameters to lift restrictions from a user.
Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
Stores a message that can be sent by a user of a Mini App. Returns a PreparedInlineMessage object.
Unique identifier of the target user that can use the prepared message
A JSON-serialized object describing the message to be sent
Optionalextra: Omit<{}, "chat_id" | "user_id" | "result">Pass True if the message can be sent to private chats with users
Pass True if the message can be sent to private chats with bots
Pass True if the message can be sent to group and supergroup chats
Pass True if the message can be sent to channel chats
Send .gif animations.
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
Optionalextra: { caption?: string | FmtString<string> }Send audio files, if you want Telegram clients to display them in the music player. Your audio must be in the .mp3 format. Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future.
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
Optionalextra: { caption?: string | FmtString<string> }Use this method when you need to tell the user that something is happening on the bot's side. The status is set for 5 seconds or less (when a message arrives from your bot, Telegram clients clear its typing status).
Optionalextra: Omit<{}, "action" | "chat_id">Use this method to send a checklist on behalf of a connected business account. On success, the sent Message is returned.
Unique identifier of the business connection on behalf of which the message will be sent
Unique identifier for the target chat
A JSON-serialized object for the checklist to send
Optionalextra: Omit<{}, "chat_id" | "checklist">Sends the message silently. Users will receive a notification with no sound.
Protects the contents of the sent message from forwarding and saving
Unique identifier of the message effect to be added to the message
A JSON-serialized object for description of the message to reply to
A JSON-serialized object for an inline keyboard
Optionalextra: Omit<{}, "phone_number" | "chat_id" | "first_name">Send copy of existing message.
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
Received message object
Optionalextra: { caption?: string | FmtString<string> }Send a dice, which will have a random value from 1 to 6.
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
Optionalextra: Omit<{}, "chat_id">Send general files. Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future.
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
Optionalextra: { caption?: string | FmtString<string> }Unique identifier for the target chat
Optionalextra: Omit<{}, "chat_id" | "game_short_name">Sends a gift to the given user or channel chat. The gift can't be converted to Telegram Stars by the receiver. Returns True on success.
Identifier of the gift; limited gifts can't be sent to channel chats
Optionalextra: Omit<{}, "chat_id" | "gift_id">Required if user_id is not specified. Unique identifier for the chat or username of the channel (in the format @channelusername) that will receive the gift.
Required if user_id is not specified. Unique identifier for the chat or username of the channel (in the format @channelusername) that will receive the gift.
Pass True to pay for the gift upgrade from the bot's balance, thereby making the upgrade free for the receiver
Text that will be shown along with the gift; 0-128 characters
Mode for parsing entities in the text. See formatting options for more details. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, and “custom_emoji” are ignored.
A JSON-serialized list of special entities that appear in the gift text. It can be specified instead of text_parse_mode. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, and “custom_emoji” are ignored.
Unique identifier for the target private chat
Optionalextra: Omit<Send point on the map.
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
Optionalextra: Omit<{}, "chat_id" | "latitude" | "longitude">Send a group of photos or videos as an album.
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
A JSON-serialized array describing photos and videos to be sent, must include 2–10 items
Optionalextra: Omit<{}, "chat_id" | "media">Send a text message.
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
Text of the message to be sent
Optionalextra: Omit<{}, "text" | "chat_id">Use this method to stream a partial message to a user while the message is being generated; supported only for bots with forum topic mode enabled. Returns True on success.
Unique identifier for the target private chat
Unique identifier of the message draft; must be non-zero. Changes of drafts with the same identifier are animated
Text of the message to be sent, 1-4096 characters after entities parsing
Optionalextra: Omit<{}, "text" | "chat_id" | "draft_id">Unique identifier for the target message thread
Mode for parsing entities in the message text. See formatting options for more details.
A JSON-serialized list of special entities that appear in message text, which can be specified instead of parse_mode
Use this method to send paid media. On success, the sent Message is returned.
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
The number of Telegram Stars that must be paid to buy access to the media; 1-25000
A JSON-serialized array describing the media to be sent; up to 10 items
Optionalextra: Omit<{}, "caption" | "chat_id" | "media" | "star_count">Unique identifier for the target chat or username of the target channel (in the format @channelusername)
Optionalextra: { caption?: string | FmtString<string> }Send a native poll.
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
Poll question, 1-255 characters
A JSON-serialized list of answer options, 2-10 strings 1-100 characters each
Optionalextra: Omit<{}, "type" | "chat_id" | "question" | "options">Send a native quiz.
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
Poll question, 1-255 characters
A JSON-serialized list of answer options, 2-10 strings 1-100 characters each
Optionalextra: Omit<{}, "type" | "chat_id" | "question" | "options">Send .webp, animated .tgs, or video .webm stickers
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
Optionalextra: Omit<{}, "chat_id" | "sticker">Optionalextra: Omit<{}, "chat_id" | "title" | "latitude" | "longitude" | "address">Send video files, Telegram clients support mp4 videos (other formats may be sent as Document). Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future.
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
Optionalextra: { caption?: string | FmtString<string> }Send video messages.
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
Optionalextra: Omit<{}, "chat_id" | "video_note">Send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .ogg file encoded with OPUS (other formats may be sent as Audio or Document). On success, the sent Message is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future.
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
Optionalextra: { caption?: string | FmtString<string> }Changes the bio of a managed business account. Requires the can_change_bio business bot right. Returns True on success.
Unique identifier of the business connection
Optionalbio: stringThe new value of the bio for the business account; 0-140 characters
Changes the privacy settings pertaining to incoming gifts in a managed business account. Requires the can_change_gift_settings business bot right. Returns True on success.
Unique identifier of the business connection
Pass True, if a button for sending a gift to the user or by the business account must always be shown in the input field
Types of gifts accepted by the business account
Changes the first and last name of a managed business account. Requires the can_change_name business bot right. Returns True on success.
Unique identifier of the business connection
The new value of the first name for the business account; 1-64 characters
The new value of the last name for the business account; 0-64 characters
Changes the profile photo of a managed business account. Requires the can_edit_profile_photo business bot right. Returns True on success.
Unique identifier of the business connection
The new profile photo to set
OptionalisPublic: booleanPass True to set the public photo, which will be visible even if the main photo is hidden by the business account's privacy settings. An account can have only one public photo.
Changes the username of a managed business account. Requires the can_change_username business bot right. Returns True on success.
Unique identifier of the business connection
The new value of the username for the business account; 0-32 characters
Optionaldescription: stringUse this method to change the bot's menu button in a private chat, or the default menu button. Returns true on success.
Unique identifier for the target private chat. If not specified, default bot's menu button will be changed.
Change the title of a chat. Titles can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights.
Unique identifier for the target group or username of the target supergroup or channel (in the format @channelusername)
New chat title, 1-255 characters
Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. In albums, bots must react to the first message.
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
Identifier of the target message
Optionalreaction: ReactionType[]New list of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators.
Optionalis_big: booleanPass True to set the reaction with a big animation
Change the list of the bot's commands.
A list of bot commands to be set as the list of the bot's commands. At most 100 commands can be specified.
Optionalextra: Omit<{}, "chat_id" | "commands">Use this method to change the default administrator rights requested by the bot when it's added as an administrator to groups or channels. These rights will be suggested to users, but they are are free to modify the list before adding the bot.
Use this method to change the bot's description, which is shown in the chat with the bot if the chat is empty.
New bot description; 0-512 characters. Pass an empty string to remove the dedicated description for the given language.
Optionallanguage_code: stringA two-letter ISO 639-1 language code. If empty, the description will be applied to all users for whose language there is no dedicated description.
Use this method to change the bot's name.
New bot name; 0-64 characters. Pass an empty string to remove the dedicated name for the given language.
Optionallanguage_code: stringA two-letter ISO 639-1 language code. If empty, the name will be shown to all users for whose language there is no dedicated name.
Changes the profile photo of the bot. Returns True on success.
The new profile photo to set
Use this method to change the bot's short description, which is shown on the bot's profile page and is sent together with the link when users share the bot.
Optionallanguage_code: stringA two-letter ISO 639-1 language code. If empty, the short description will be applied to all users for whose language there is no dedicated short description.
Optionalkeywords: string[]Optionalmask_position: MaskPositionMove a sticker in a set created by the bot to a specific position.
File identifier of the sticker
New sticker position in the set, zero-based
Use this method to set the thumbnail of a regular or mask sticker set. The format of the thumbnail file must match the format of the stickers in the set.
Sticker set name
User identifier of the sticker set owner
Optionalthumbnail: string | InputFileA .WEBP or .PNG image with the thumbnail, must be up to 128 kilobytes in size and have a width and height of exactly 100px, or a .TGS animation with a thumbnail up to 32 kilobytes in size (see animated sticker technical requirements), or a WEBM video with the thumbnail up to 32 kilobytes in size; see video sticker technical requirements. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass a HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using Input helpers. Animated and video sticker set thumbnails can't be uploaded via HTTP URL. If omitted, then the thumbnail is dropped and the first sticker is used as the thumbnail.
Format of the sticker set thumbnail; must be one of "static", "animated", or "video"
Changes the emoji status for a given user that previously allowed the bot to manage their emoji status via the Mini App method requestEmojiStatusAccess. Returns True on success.
Unique identifier of the target user
Optionalextra: Omit<{}, "chat_id" | "user_id">Custom emoji identifier of the emoji status to set. Pass an empty string to remove the status.
Expiration date of the emoji status, if any
Specify a url to receive incoming updates via an outgoing webhook.
HTTPS url to send updates to. Use an empty string to remove webhook integration
Optionalextra: Omit<{}, "url" | "chat_id">Optionalmarkup: InlineKeyboardMarkupUnique identifier for the target chat or username of the target channel (in the format @channelusername)
Identifier of the original message with the poll
Optionalextra: Omit<{}, "chat_id" | "message_id">Transfers Telegram Stars from the business account balance to the bot's balance. Requires the can_transfer_stars business bot right. Returns True on success.
Unique identifier of the business connection
Number of Telegram Stars to transfer; 1-10000
Transfers an owned unique gift to another user. Requires the can_transfer_and_upgrade_gifts business bot right. Requires can_transfer_stars business bot right if the transfer is paid. Returns True on success.
Unique identifier of the business connection
Unique identifier of the regular gift that should be transferred
Unique identifier of the chat which will own the gift. The chat must be active in the last 24 hours.
Optionalextra: Omit<The amount of Telegram Stars that will be paid for the transfer from the business account balance. If positive, then the can_transfer_stars business bot right is required.
Unban a user from a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights.
Unique identifier for the target group or username of the target supergroup or channel (in the format @username)
Unique identifier of the target user
Optionalextra: { only_if_banned?: boolean }Unban a previously banned channel chat in a supergroup or channel. The bot must be an administrator for this to work and must have the appropriate administrator rights.
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
Unique identifier of the target sender chat
Use this method to unhide the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. Returns True on success.
Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
Clear the list of pinned messages in a chat.
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
Use this method to clear the list of pinned messages in a forum topic. The bot must be an administrator in the chat for this to work and must have the can_pin_messages administrator right in the supergroup. Returns True on success.
Unique identifier for the target message thread of the forum topic
Use this method to clear the list of pinned messages in a General forum topic. The bot must be an administrator in the chat for this to work and must have the can_pin_messages administrator right in the supergroup.
Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
Unpin a message in a group, a supergroup, or a channel. The bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' admin right in the supergroup or 'can_edit_messages' admin right in the channel.
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
OptionalmessageId: numberUpgrades a given regular gift to a unique gift. Requires the can_transfer_and_upgrade_gifts business bot right. Additionally requires the can_transfer_stars business bot right if the upgrade is paid. Returns True on success.
Unique identifier of the business connection
Unique identifier of the regular gift that should be upgraded to a unique one
Optionalextra: Omit<{}, "chat_id" | "business_connection_id" | "owned_gift_id">Pass True to keep the original gift text, sender and receiver in the upgraded gift
amount of Telegram Stars that will be paid for the upgrade from the business account balance. If gift.prepaid_upgrade_star_count > 0, then pass 0, otherwise, the can_transfer_stars business bot right is required and gift.upgrade_star_count must be passed.
Upload a .png file with a sticker for later use in createNewStickerSet and addStickerToSet methods (can be used multiple times). https://core.telegram.org/bots/api#sending-files
User identifier of sticker file owner
Verifies a chat on behalf of the organization which is represented by the bot. Returns True on success.
Unique identifier for the target chat or username of the target channel (in the format @channelusername). Channel direct messages chats can't be verified.
Optionalextra: Omit<{}, "chat_id">Custom description for the verification; 0-70 characters. Must be empty if the organization isn't allowed to provide a custom verification description.
Verifies a user on behalf of the organization which is represented by the bot. Returns True on success.
Unique identifier of the target user
Optionalextra: Omit<{}, "chat_id" | "user_id">Custom description for the verification; 0-70 characters. Must be empty if the organization isn't allowed to provide a custom verification description.
Kick a user from a group, a supergroup or a channel. In the case of supergroups and channels, the user will not be able to return to the group on their own using invite links, etc., unless unbanned first. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights.