Expand description
Telegram Bot API types generated from the pinned upstream schema.
Structs§
- Accepted
Gift Types - This object describes the types of gifts that can be gifted to a user or a chat.
- Affiliate
Info - Contains information about the affiliate that received a commission via this transaction.
- Animation
- This object represents an animation file (GIF or H.264/MPEG-4 AVC video without sound).
- Audio
- This object represents an audio file to be treated as music by the Telegram clients.
- Background
Fill - This object describes the way a background is filled based on the selected colors. Currently, it can be one of
- Background
Fill Freeform Gradient - The background is a freeform gradient that rotates after every message in the chat.
- Background
Fill Gradient - The background is a gradient fill.
- Background
Fill Solid - The background is filled using the selected color.
- Background
Type - This object describes the type of a background. Currently, it can be one of
- Background
Type Chat Theme - The background is taken directly from a built-in chat theme.
- Background
Type Fill - The background is automatically filled based on the selected colors.
- Background
Type Pattern - The background is a .PNG or .TGV (gzipped subset of SVG with MIME type ‘application/x-tgwallpattern’) pattern to be combined with the background fill chosen by the user.
- Background
Type Wallpaper - The background is a wallpaper in the JPEG format.
- Birthdate
- Describes the birthdate of a user.
- BotAccess
Settings - This object describes the access settings of a bot.
- BotCommand
- This object represents a bot command.
- BotCommand
Scope - This object represents the scope to which bot commands are applied. Currently, the following 7 scopes are supported:
- BotCommand
Scope AllChat Administrators - Represents the scope of bot commands, covering all group and supergroup chat administrators.
- BotCommand
Scope AllGroup Chats - Represents the scope of bot commands, covering all group and supergroup chats.
- BotCommand
Scope AllPrivate Chats - Represents the scope of bot commands, covering all private chats.
- BotCommand
Scope Chat - Represents the scope of bot commands, covering a specific chat.
- BotCommand
Scope Chat Administrators - Represents the scope of bot commands, covering all administrators of a specific group or supergroup chat.
- BotCommand
Scope Chat Member - Represents the scope of bot commands, covering a specific member of a group or supergroup chat.
- BotCommand
Scope Default - Represents the default scope of bot commands. Default commands are used if no commands with a narrower scope are specified for the user.
- BotDescription
- This object represents the bot’s description.
- BotName
- This object represents the bot’s name.
- BotShort
Description - This object represents the bot’s short description.
- BotSubscription
Updated - This object contains information about changes to a user payment subscription toward the current bot.
- Business
BotRights - Represents the rights of a business bot.
- Business
Connection - Describes the connection of the bot with a business account.
- Business
Intro - Contains information about the start page settings of a Telegram Business account.
- Business
Location - Contains information about the location of a Telegram Business account.
- Business
Messages Deleted - This object is received when messages are deleted from a connected business account.
- Business
Opening Hours - Describes the opening hours of a business.
- Business
Opening Hours Interval - Describes an interval of time during which a business is open.
- Callback
Game - A placeholder, currently holds no information. Use BotFather to set up your game.
- Callback
Query - This object represents an incoming callback query from a callback button in an inline keyboard. If the button that originated the query was attached to a message sent by the bot, the field message will be present. If the button was attached to a message sent via the bot (in inline mode), the field inline_message_id will be present. Exactly one of the fields data or game_short_name will be present.
- Chat
- This object represents a chat.
- Chat
Administrator Rights - Represents the rights of an administrator in a chat.
- Chat
Background - This object represents a chat background.
- Chat
Boost - This object contains information about a chat boost.
- Chat
Boost Added - This object represents a service message about a user boosting a chat.
- Chat
Boost Removed - This object represents a boost removed from a chat.
- Chat
Boost Source - This object describes the source of a chat boost. It can be one of
- Chat
Boost Source Gift Code - The boost was obtained by the creation of Telegram Premium gift codes to boost a chat. Each such code boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription.
- Chat
Boost Source Giveaway - The boost was obtained by the creation of a Telegram Premium or a Telegram Star giveaway. This boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription for Telegram Premium giveaways and prize_star_count / 500 times for one year for Telegram Star giveaways.
- Chat
Boost Source Premium - The boost was obtained by subscribing to Telegram Premium or by gifting a Telegram Premium subscription to another user.
- Chat
Boost Updated - This object represents a boost added to a chat or changed.
- Chat
Full Info - This object contains full information about a chat.
- Chat
Invite Link - Represents an invite link for a chat.
- Chat
Join Request - Represents a join request sent to a chat.
- Chat
Location - Represents a location to which a chat is connected.
- Chat
Member - This object contains information about one member of a chat. Currently, the following 6 types of chat members are supported:
- Chat
Member Administrator - Represents a chat member that has some additional privileges.
- Chat
Member Banned - Represents a chat member that was banned in the chat and can’t return to the chat or view chat messages.
- Chat
Member Left - Represents a chat member that isn’t currently a member of the chat, but may join it themselves.
- Chat
Member Member - Represents a chat member that has no additional privileges or restrictions.
- Chat
Member Owner - Represents a chat member that owns the chat and has all administrator privileges.
- Chat
Member Restricted - Represents a chat member that is under certain restrictions in the chat. Supergroups only.
- Chat
Member Updated - This object represents changes in the status of a chat member.
- Chat
Owner Changed - Describes a service message about an ownership change in the chat.
- Chat
Owner Left - Describes a service message about the chat owner leaving the chat.
- Chat
Permissions - Describes actions that a non-administrator user is allowed to take in a chat.
- Chat
Photo - This object represents a chat photo.
- Chat
Shared - This object contains information about a chat that was shared with the bot using a KeyboardButtonRequestChat button.
- Checklist
- Describes a checklist.
- Checklist
Task - Describes a task in a checklist.
- Checklist
Tasks Added - Describes a service message about tasks added to a checklist.
- Checklist
Tasks Done - Describes a service message about checklist tasks marked as done or not done.
- Chosen
Inline Result - Represents a result of an inline query that was chosen by the user and sent to their chat partner.
- Community
- Represents a community (a group of chats).
- Community
Chat Added - Describes a service message about a chat being added to a community.
- Community
Chat Removed - Describes a service message about a chat being removed from a community. Currently holds no information.
- Contact
- This object represents a phone contact.
- Copy
Text Button - This object represents an inline keyboard button that copies specified text to the clipboard.
- Dice
- This object represents an animated emoji that displays a random value.
- Direct
Message Price Changed - Describes a service message about a change in the price of direct messages sent to a channel chat.
- Direct
Messages Topic - Describes a topic of a direct messages chat.
- Document
- This object represents a general file (as opposed to photos, voice messages and audio files).
- Encrypted
Credentials - Describes data required for decrypting and authenticating EncryptedPassportElement. See the Telegram Passport Documentation for a complete description of the data decryption and authentication processes.
- Encrypted
Passport Element - Describes documents or other Telegram Passport elements shared with the bot by the user.
- External
Reply Info - This object contains information about a message that is being replied to, which may come from another chat or forum topic.
- File
- This object represents a file ready to be downloaded. The file can be downloaded via the link https://api.telegram.org/file/bot
/<file_path>. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling getFile. - Force
Reply - Upon receiving a message with this object, Telegram clients will display a reply interface to the user (act as if the user has selected the bot’s message and tapped ‘Reply’). This can be extremely useful if you want to create user-friendly step-by-step interfaces without having to sacrifice privacy mode. Not supported in channels and for messages sent on behalf of a user account.
- Forum
Topic - This object represents a forum topic.
- Forum
Topic Closed - This object represents a service message about a forum topic closed in the chat. Currently holds no information.
- Forum
Topic Created - This object represents a service message about a new forum topic created in the chat.
- Forum
Topic Edited - This object represents a service message about an edited forum topic.
- Forum
Topic Reopened - This object represents a service message about a forum topic reopened in the chat. Currently holds no information.
- Game
- This object represents a game. Use BotFather to create and edit games, their short names will act as unique identifiers.
- Game
High Score - This object represents one row of the high scores table for a game.
- General
Forum Topic Hidden - This object represents a service message about General forum topic hidden in the chat. Currently holds no information.
- General
Forum Topic Unhidden - This object represents a service message about General forum topic unhidden in the chat. Currently holds no information.
- Gift
- This object represents a gift that can be sent by the bot.
- Gift
Background - This object describes the background of a gift.
- Gift
Info - Describes a service message about a regular gift that was sent or received.
- Gifts
- This object represent a list of gifts.
- Giveaway
- This object represents a message about a scheduled giveaway.
- Giveaway
Completed - This object represents a service message about the completion of a giveaway without public winners.
- Giveaway
Created - This object represents a service message about the creation of a scheduled giveaway.
- Giveaway
Winners - This object represents a message about the completion of a giveaway with public winners.
- Inaccessible
Message - This object describes a message that was deleted or is otherwise inaccessible to the bot.
- Inline
Keyboard Button - This object represents one button of an inline keyboard. Exactly one of the fields other than text, icon_custom_emoji_id, and style must be used to specify the type of the button.
- Inline
Keyboard Markup - This object represents an inline keyboard that appears right next to the message it belongs to.
- Inline
Query - This object represents an incoming inline query. When the user sends an empty query, your bot could return some default or trending results.
- Inline
Query Result - This object represents one result of an inline query. Telegram clients currently support results of the following 20 types:
- Inline
Query Result Article - Represents a link to an article or web page.
- Inline
Query Result Audio - Represents a link to an MP3 audio file. By default, this audio file will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the audio.
- Inline
Query Result Cached Audio - Represents a link to an MP3 audio file stored on the Telegram servers. By default, this audio file will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the audio.
- Inline
Query Result Cached Document - Represents a link to a file stored on the Telegram servers. By default, this file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the file.
- Inline
Query Result Cached Gif - Represents a link to an animated GIF file stored on the Telegram servers. By default, this animated GIF file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with specified content instead of the animation.
- Inline
Query Result Cached Mpeg4 Gif - Represents a link to a video animation (H.264/MPEG-4 AVC video without sound) stored on the Telegram servers. By default, this animated MPEG-4 file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the animation.
- Inline
Query Result Cached Photo - Represents a link to a photo stored on the Telegram servers. By default, this photo will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the photo.
- Inline
Query Result Cached Sticker - Represents a link to a sticker stored on the Telegram servers. By default, this sticker will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the sticker.
- Inline
Query Result Cached Video - Represents a link to a video file stored on the Telegram servers. By default, this video file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the video.
- Inline
Query Result Cached Voice - Represents a link to a voice message stored on the Telegram servers. By default, this voice message will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the voice message.
- Inline
Query Result Contact - Represents a contact with a phone number. By default, this contact will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the contact.
- Inline
Query Result Document - Represents a link to a file. By default, this file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the file. Currently, only .PDF and .ZIP files can be sent using this method.
- Inline
Query Result Game - Represents a Game.
- Inline
Query Result Gif - Represents a link to an animated GIF file. By default, this animated GIF file will be sent by the user with optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the animation.
- Inline
Query Result Location - Represents a location on a map. By default, the location will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the location.
- Inline
Query Result Mpeg4 Gif - Represents a link to a video animation (H.264/MPEG-4 AVC video without sound). By default, this animated MPEG-4 file will be sent by the user with optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the animation.
- Inline
Query Result Photo - Represents a link to a photo. By default, this photo will be sent by the user with optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the photo.
- Inline
Query Result Venue - Represents a venue. By default, the venue will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the venue.
- Inline
Query Result Video - Represents a link to a page containing an embedded video player or a video file. By default, this video file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the video.
- Inline
Query Result Voice - Represents a link to a voice recording in an .OGG container encoded with OPUS. By default, this voice recording will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the the voice message.
- Inline
Query Results Button - This object represents a button to be shown above inline query results. You must use exactly one of the optional fields.
- Input
Checklist - Describes a checklist to create.
- Input
Checklist Task - Describes a task to add to a checklist.
- Input
Contact Message Content - Represents the content of a contact message to be sent as the result of an inline query.
- Input
Invoice Message Content - Represents the content of an invoice message to be sent as the result of an inline query.
- Input
Location Message Content - Represents the content of a location message to be sent as the result of an inline query.
- Input
Media - This object represents the content of a media message to be sent. It should be one of
- Input
Media Animation - Represents an animation file (GIF or H.264/MPEG-4 AVC video without sound) to be sent.
- Input
Media Audio - Represents an audio file to be treated as music to be sent.
- Input
Media Document - Represents a general file to be sent.
- Input
Media Link - Represents an HTTP link to be sent.
- Input
Media Live Photo - Represents a live photo to be sent.
- Input
Media Location - Represents a location to be sent.
- Input
Media Photo - Represents a photo to be sent.
- Input
Media Sticker - Represents a sticker file to be sent.
- Input
Media Venue - Represents a venue to be sent.
- Input
Media Video - Represents a video to be sent.
- Input
Media Voice Note - Represents a voice message file to be sent.
- Input
Message Content - This object represents the content of a message to be sent as a result of an inline query. Telegram clients currently support the following types:
- Input
Paid Media - This object describes the paid media to be sent. Currently, it can be one of
- Input
Paid Media Live Photo - The paid media to send is a live photo.
- Input
Paid Media Photo - The paid media to send is a photo.
- Input
Paid Media Video - The paid media to send is a video.
- Input
Poll Media - This object represents the content of a poll description or a quiz explanation to be sent. It should be one of
- Input
Poll Option - This object contains information about one answer option in a poll to be sent.
- Input
Poll Option Media - This object represents the content of a poll option to be sent. It should be one of
- Input
Profile Photo - This object describes a profile photo to set. Currently, it can be one of
- Input
Profile Photo Animated - An animated profile photo in the MPEG4 format.
- Input
Profile Photo Static - A static profile photo in the .JPG format.
- Input
Rich Block - This object represents a block in a rich formatted message to be sent. Currently, it can be any of the following types:
- Input
Rich Block Anchor - A block with an anchor, corresponding to the HTML tag with the attribute name.
- Input
Rich Block Animation - A block with an animation, corresponding to the HTML tag
- Input
Rich Block Audio - A block with a music file, corresponding to the HTML tag
- Input
Rich Block Block Quotation - A block quotation, corresponding to the HTML tag
.
- Input
Rich Block Collage - A collage, corresponding to the custom HTML tag
. - Input
Rich Block Details - An expandable block for details disclosure, corresponding to the HTML tag .
- Input
Rich Block Divider - A divider, corresponding to the HTML tag
. - Input
Rich Block Footer - A footer, corresponding to the HTML tag
- Input
Rich Block List - A list of blocks, corresponding to the HTML tag
- or
- .
- with multiple nested tags
- Input
Rich Block List Item - An item of a list to be sent.
- Input
Rich Block Map - A block with a map, corresponding to the custom HTML tag
. The map’s width and height must not exceed 10000 in total. The width and height ratio must be at most 20. - Input
Rich Block Mathematical Expression - A block with a mathematical expression in LaTeX format, corresponding to the custom HTML tag
. - Input
Rich Block Paragraph - A text paragraph, corresponding to the HTML tag
.
- Input
Rich Block Photo - A block with a photo, corresponding to the HTML tag
.
- Input
Rich Block Preformatted - A preformatted text block, corresponding to the nested HTML tags
and
. - Input
Rich Block Pull Quotation - A quotation with centered text, loosely corresponding to the HTML tag
- Input
Rich Block Section Heading - A section heading, corresponding to the HTML tags
,
,
,
,
, or
.
- Input
Rich Block Slideshow - A slideshow, corresponding to the custom HTML tag
. - Input
Rich Block Table - A table, corresponding to the HTML tag
.
- Input
Rich Block Thinking - A block with a ‘Thinking…’ placeholder, corresponding to the custom HTML tag
. The block may be used only in sendRichMessageDraft, therefore it can’t be received in messages. See https://t.me/addemoji/AIActions for examples of custom emoji that are recommended for usage in the block. - Input
Rich Block Video - A block with a video, corresponding to the HTML tag
- Input
Rich Block Voice Note - A block with a voice note, corresponding to the HTML tag
- Input
Rich Message - Describes a rich message to be sent. Exactly one of the fields html, markdown, or blocks must be used.
- Input
Rich Message Content - Represents the content of a rich message to be sent as the result of an inline query.
- Input
Rich Message Media - Describes a media element embedded in an outgoing rich message.
- Input
Sticker - This object describes a sticker to be added to a sticker set.
- Input
Story Content - This object describes the content of a story to post. Currently, it can be one of
- Input
Story Content Photo - Describes a photo to post as a story.
- Input
Story Content Video - Describes a video to post as a story.
- Input
Text Message Content - Represents the content of a text message to be sent as the result of an inline query.
- Input
Venue Message Content - Represents the content of a venue message to be sent as the result of an inline query.
- Invoice
- This object contains basic information about an invoice.
- Keyboard
Button - This object represents one button of the reply keyboard. At most one of the fields other than text, icon_custom_emoji_id, and style must be used to specify the type of the button. For simple text buttons, String can be used instead of this object to specify the button text.
- Keyboard
Button Poll Type - This object represents type of a poll, which is allowed to be created and sent when the corresponding button is pressed.
- Keyboard
Button Request Chat - This object defines the criteria used to request a suitable chat. Information about the selected chat will be shared with the bot when the corresponding button is pressed. The bot will be granted requested rights in the chat if appropriate..
- Keyboard
Button Request Managed Bot - This object defines the parameters for the creation of a managed bot. Information about the created bot will be shared with the bot using the update managed_bot and a Message with the field managed_bot_created.
- Keyboard
Button Request User - This object defines the criteria used to request a suitable user. The identifier of the selected user will be shared with the bot when the corresponding button is pressed.
- Keyboard
Button Request Users - This object defines the criteria used to request suitable users. Information about the selected users will be shared with the bot when the corresponding button is pressed.
- Labeled
Price - This object represents a portion of the price for goods or services.
- Link
- Represents an HTTP link.
- Link
Preview Options - Describes the options used for link preview generation.
- Live
Photo - This object represents a live photo.
- Location
- This object represents a point on the map.
- Location
Address - Describes the physical address of a location.
- Login
Url - This object represents a parameter of the inline keyboard button used to automatically authorize a user. Serves as a great replacement for the Telegram Login Widget when the user is coming from Telegram. All the user needs to do is tap/click a button and confirm that they want to log in:
- Managed
BotCreated - This object contains information about the bot that was created to be managed by the current bot.
- Managed
BotUpdated - This object contains information about the creation, token update, or owner update of a bot that is managed by the current bot.
- Mask
Position - This object describes the position on faces where a mask should be placed by default.
- Maybe
Inaccessible Message - This object describes a message that can be inaccessible to the bot. It can be one of
- Menu
Button - This object describes the bot’s menu button in a private chat. It should be one of
- Menu
Button Commands - Represents a menu button, which opens the bot’s list of commands.
- Menu
Button Default - Describes that no specific value for the menu button was set.
- Menu
Button WebApp - Represents a menu button, which launches a Web App.
- Message
- This object represents a message.
- Message
Auto Delete Timer Changed - This object represents a service message about a change in auto-delete timer settings.
- Message
Entity - This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc.
- Message
Id - This object represents a unique message identifier.
- Message
Origin - This object describes the origin of a message. It can be one of
- Message
Origin Channel - The message was originally sent to a channel chat.
- Message
Origin Chat - The message was originally sent on behalf of a chat to a group chat.
- Message
Origin Hidden User - The message was originally sent by an unknown user.
- Message
Origin User - The message was originally sent by a known user.
- Message
Reaction Count Updated - This object represents reaction changes on a message with anonymous reactions.
- Message
Reaction Updated - This object represents a change of a reaction on a message performed by a user.
- Order
Info - This object represents information about an order.
- Owned
Gift - This object describes a gift received and owned by a user or a chat. Currently, it can be one of
- Owned
Gift Regular - Describes a regular gift owned by a user or a chat.
- Owned
Gift Unique - Describes a unique gift received and owned by a user or a chat.
- Owned
Gifts - Contains the list of gifts received and owned by a user or a chat.
- Paid
Media - This object describes paid media. Currently, it can be one of
- Paid
Media Info - Describes the paid media added to a message.
- Paid
Media Live Photo - The paid media is a live photo.
- Paid
Media Photo - The paid media is a photo.
- Paid
Media Preview - The paid media isn’t available before the payment.
- Paid
Media Purchased - This object contains information about a paid media purchase.
- Paid
Media Video - The paid media is a video.
- Paid
Message Price Changed - Describes a service message about a change in the price of paid messages within a chat.
- Passport
Data - Describes Telegram Passport data shared with the bot by the user.
- Passport
Element Error - This object represents an error in the Telegram Passport element which was submitted that should be resolved by the user. It should be one of:
- Passport
Element Error Data Field - Represents an issue in one of the data fields that was provided by the user. The error is considered resolved when the field’s value changes.
- Passport
Element Error File - Represents an issue with a document scan. The error is considered resolved when the file with the document scan changes.
- Passport
Element Error Files - Represents an issue with a list of scans. The error is considered resolved when the list of files containing the scans changes.
- Passport
Element Error Front Side - Represents an issue with the front side of a document. The error is considered resolved when the file with the front side of the document changes.
- Passport
Element Error Reverse Side - Represents an issue with the reverse side of a document. The error is considered resolved when the file with reverse side of the document changes.
- Passport
Element Error Selfie - Represents an issue with the selfie with a document. The error is considered resolved when the file with the selfie changes.
- Passport
Element Error Translation File - Represents an issue with one of the files that constitute the translation of a document. The error is considered resolved when the file changes.
- Passport
Element Error Translation Files - Represents an issue with the translated version of a document. The error is considered resolved when a file with the document translation change.
- Passport
Element Error Unspecified - Represents an issue in an unspecified place. The error is considered resolved when new data is added.
- Passport
File - This object represents a file uploaded to Telegram Passport. Currently all Telegram Passport files are in JPEG format when decrypted and don’t exceed 10MB.
- Photo
Size - This object represents one size of a photo or a file / sticker thumbnail.
- Poll
- This object contains information about a poll.
- Poll
Answer - This object represents an answer of a user in a non-anonymous poll.
- Poll
Media - At most one of the optional fields can be present in any given object.
- Poll
Option - This object contains information about one answer option in a poll.
- Poll
Option Added - Describes a service message about an option added to a poll.
- Poll
Option Deleted - Describes a service message about an option deleted from a poll.
- PreCheckout
Query - This object contains information about an incoming pre-checkout query.
- Prepared
Inline Message - Describes an inline message to be sent by a user of a Mini App.
- Prepared
Keyboard Button - Describes a keyboard button to be used by a user of a Mini App.
- Proximity
Alert Triggered - This object represents the content of a service message, sent whenever a user in the chat triggers a proximity alert set by another user.
- Reaction
Count - Represents a reaction added to a message along with the number of times it was added.
- Reaction
Type - This object describes the type of a reaction. Currently, it can be one of
- Reaction
Type Custom Emoji - The reaction is based on a custom emoji.
- Reaction
Type Emoji - The reaction is based on an emoji.
- Reaction
Type Paid - The reaction is paid.
- Refunded
Payment - This object contains basic information about a refunded payment.
- Reply
Keyboard Markup - This object represents a custom keyboard with reply options (see Introduction to bots for details and examples). Not supported in channels and for messages sent on behalf of a business account.
- Reply
Keyboard Remove - Upon receiving a message with this object, Telegram clients will remove the current custom keyboard and display the default letter-keyboard. By default, custom keyboards are displayed until a new keyboard is sent by a bot. An exception is made for one-time keyboards that are hidden immediately after the user presses a button (see ReplyKeyboardMarkup). Not supported in channels and for messages sent on behalf of a business account.
- Reply
Parameters - Describes reply parameters for the message that is being sent.
- Response
Parameters - Describes why a request was unsuccessful.
- Revenue
Withdrawal State - This object describes the state of a revenue withdrawal operation. Currently, it can be one of
- Revenue
Withdrawal State Failed - The withdrawal failed and the transaction was refunded.
- Revenue
Withdrawal State Pending - The withdrawal is in progress.
- Revenue
Withdrawal State Succeeded - The withdrawal succeeded.
- Rich
Block - This object represents a block in a rich formatted message. Currently, it can be any of the following types:
- Rich
Block Anchor - A block with an anchor, corresponding to the HTML tag with the attribute name.
- Rich
Block Animation - A block with an animation, corresponding to the HTML tag
- Rich
Block Audio - A block with a music file, corresponding to the HTML tag
- Rich
Block Block Quotation - A block quotation, corresponding to the HTML tag
.
- Rich
Block Caption - Caption of a rich formatted block.
- Rich
Block Collage - A collage, corresponding to the custom HTML tag
. - Rich
Block Details - An expandable block for details disclosure, corresponding to the HTML tag
.- Rich
Block Divider - A divider, corresponding to the HTML tag
.- Rich
Block Footer - A footer, corresponding to the HTML tag
- Rich
Block List - A list of blocks, corresponding to the HTML tag
- or
- .
- with multiple nested tags
- Rich
Block List Item - An item of a list.
- Rich
Block Map - A block with a map, corresponding to the custom HTML tag
. - Rich
Block Mathematical Expression - A block with a mathematical expression in LaTeX format, corresponding to the custom HTML tag
. - Rich
Block Paragraph - A text paragraph, corresponding to the HTML tag
.
- Rich
Block Photo - A block with a photo, corresponding to the HTML tag
.
- Rich
Block Preformatted - A preformatted text block, corresponding to the nested HTML tags
and
.- Rich
Block Pull Quotation - A quotation with centered text, loosely corresponding to the HTML tag
- Rich
Block Section Heading - A section heading, corresponding to the HTML tags
,
,
,
,
, or
.
- Rich
Block Slideshow - A slideshow, corresponding to the custom HTML tag
. - Rich
Block Table - A table, corresponding to the HTML tag
.
- Rich
Block Table Cell - Cell in a table.
- Rich
Block Thinking - A block with a ‘Thinking…’ placeholder, corresponding to the custom HTML tag
. The block may be used only in sendRichMessageDraft, therefore it can’t be received in messages. See https://t.me/addemoji/AIActions for examples of custom emoji that are recommended for usage in the block. - Rich
Block Video - A block with a video, corresponding to the HTML tag
- Rich
Block Voice Note - A block with a voice note, corresponding to the HTML tag
- Rich
Message - Rich formatted message.
- Rich
Text - This object represents a rich formatted text. Currently, it can be either a String for plain text, an Array of RichText, or any of the following types:
- Rich
Text Anchor - An anchor.
- Rich
Text Anchor Link - A link to an anchor.
- Rich
Text Bank Card Number - A text with a bank card number.
- Rich
Text Bold - A bold text.
- Rich
Text BotCommand - A bot command.
- Rich
Text Cashtag - A cashtag.
- Rich
Text Code - A monowidth text.
- Rich
Text Custom Emoji - A custom emoji.
- Rich
Text Date Time - Formatted date and time.
- Rich
Text Email Address - A text with an email address.
- Rich
Text Hashtag - A hashtag.
- Rich
Text Italic - An italicized text.
- Rich
Text Marked - A marked text.
- Rich
Text Mathematical Expression - A mathematical expression.
- Rich
Text Mention - A mention by a username.
- Rich
Text Phone Number - A text with a phone number.
- Rich
Text Reference - A reference.
- Rich
Text Reference Link - A link to a reference.
- Rich
Text Spoiler - A text covered by a spoiler.
- Rich
Text Strikethrough - A strikethrough text.
- Rich
Text Subscript - A subscript text.
- Rich
Text Superscript - A superscript text.
- Rich
Text Text Mention - A mention of a Telegram user by their identifier.
- Rich
Text Underline - An underlined text.
- Rich
Text Url - A text with a link.
- Sent
Guest Message - Describes an inline message sent by a guest bot.
- Sent
WebApp Message - Describes an inline message sent by a Web App on behalf of a user.
- Shared
User - This object contains information about a user that was shared with the bot using a KeyboardButtonRequestUsers button.
- Shipping
Address - This object represents a shipping address.
- Shipping
Option - This object represents one shipping option.
- Shipping
Query - This object contains information about an incoming shipping query.
- Star
Amount - Describes an amount of Telegram Stars.
- Star
Transaction - Describes a Telegram Star transaction. Note that if the buyer initiates a chargeback with the payment provider from whom they acquired Stars (e.g., Apple, Google) following this transaction, the refunded Stars will be deducted from the bot’s balance. This is outside of Telegram’s control.
- Star
Transactions - Contains a list of Telegram Star transactions.
- Sticker
- This object represents a sticker.
- Sticker
Set - This object represents a sticker set.
- Story
- This object represents a story.
- Story
Area - Describes a clickable area on a story media.
- Story
Area Position - Describes the position of a clickable area within a story.
- Story
Area Type - Describes the type of a clickable area on a story. Currently, it can be one of
- Story
Area Type Link - Describes a story area pointing to an HTTP or tg:// link. Currently, a story can have up to 3 link areas.
- Story
Area Type Location - Describes a story area pointing to a location. Currently, a story can have up to 10 location areas.
- Story
Area Type Suggested Reaction - Describes a story area pointing to a suggested reaction. Currently, a story can have up to 5 suggested reaction areas.
- Story
Area Type Unique Gift - Describes a story area pointing to a unique gift. Currently, a story can have at most 1 unique gift area.
- Story
Area Type Weather - Describes a story area containing weather information. Currently, a story can have up to 3 weather areas.
- Successful
Payment - This object contains basic information about a successful payment. Note that if the buyer initiates a chargeback with the relevant payment provider following this transaction, the funds may be debited from your balance. This is outside of Telegram’s control.
- Suggested
Post Approval Failed - Describes a service message about the failed approval of a suggested post. Currently, only caused by insufficient user funds at the time of approval.
- Suggested
Post Approved - Describes a service message about the approval of a suggested post.
- Suggested
Post Declined - Describes a service message about the rejection of a suggested post.
- Suggested
Post Info - Contains information about a suggested post.
- Suggested
Post Paid - Describes a service message about a successful payment for a suggested post.
- Suggested
Post Parameters - Contains parameters of a post that is being suggested by the bot.
- Suggested
Post Price - Describes the price of a suggested post.
- Suggested
Post Refunded - Describes a service message about a payment refund for a suggested post.
- Switch
Inline Query Chosen Chat - This object represents an inline button that switches the current user to inline mode in a chosen chat, with an optional default inline query.
- Text
Quote - This object contains information about the quoted part of a message that is replied to by the given message.
- Transaction
Partner - This object describes the source of a transaction, or its recipient for outgoing transactions. Currently, it can be one of
- Transaction
Partner Affiliate Program - Describes the affiliate program that issued the affiliate commission received via this transaction.
- Transaction
Partner Chat - Describes a transaction with a chat.
- Transaction
Partner Fragment - Describes a withdrawal transaction with Fragment.
- Transaction
Partner Other - Describes a transaction with an unknown source or recipient.
- Transaction
Partner Telegram Ads - Describes a withdrawal transaction to the Telegram Ads platform.
- Transaction
Partner Telegram Api - Describes a transaction with payment for paid broadcasting.
- Transaction
Partner User - Describes a transaction with a user.
- Unique
Gift - This object describes a unique gift that was upgraded from a regular gift.
- Unique
Gift Backdrop - This object describes the backdrop of a unique gift.
- Unique
Gift Backdrop Colors - This object describes the colors of the backdrop of a unique gift.
- Unique
Gift Colors - This object contains information about the color scheme for a user’s name, message replies and link previews based on a unique gift.
- Unique
Gift Info - Describes a service message about a unique gift that was sent or received.
- Unique
Gift Model - This object describes the model of a unique gift.
- Unique
Gift Symbol - This object describes the symbol shown on the pattern of a unique gift.
- Update
- This object represents an incoming update.
- User
- This object represents a Telegram user or bot.
- User
Chat Boosts - This object represents a list of boosts added to a chat by a user.
- User
Profile Audios - This object represents the audios displayed on a user’s profile.
- User
Profile Photos - This object represent a user’s profile pictures.
- User
Rating - This object describes the rating of a user based on their Telegram Star spendings.
- User
Shared - This object contains information about the user whose identifier was shared with the bot using a KeyboardButtonRequestUser button.
- Users
Shared - This object contains information about the users whose identifiers were shared with the bot using a KeyboardButtonRequestUsers button.
- Venue
- This object represents a venue.
- Video
- This object represents a video file.
- Video
Chat Ended - This object represents a service message about a video chat ended in the chat.
- Video
Chat Participants Invited - This object represents a service message about new members invited to a video chat.
- Video
Chat Scheduled - This object represents a service message about a video chat scheduled in the chat.
- Video
Chat Started - This object represents a service message about a video chat started in the chat. Currently holds no information.
- Video
Note - This object represents a video message (available in Telegram apps as of v.4.0).
- Video
Quality - This object represents a video file of a specific quality.
- Voice
- This object represents a voice note.
- WebApp
Data - Describes data sent from a Web App to the bot.
- WebApp
Info - Describes a Web App.
- Webhook
Info - Describes the current status of a webhook.
- Write
Access Allowed - This object represents a service message about a user allowing a bot to write messages after adding it to the attachment menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method requestWriteAccess.
Enums§
- Background
Fill Union - Background
Type Union - BotCommand
Scope Union - Chat
Boost Source Union - ChatId
- Integer chat id or public
@usernameaccepted by Telegram methods. - Chat
Member Union - Inline
Query Result Union - Input
File - A Telegram file reference or a new in-memory upload.
- Input
Media Union - Input
Message Content Union - Input
Paid Media Union - Input
Poll Media Union - Input
Poll Option Media Union - Input
Poll Option Union - Input
Profile Photo Union - Input
Rich Block Union - Input
Rich Message Media Union - Input
Story Content Union - Maybe
Inaccessible Message Union - Media
Union - Menu
Button Union - Message
Origin Union - Owned
Gift Union - Paid
Media Union - Passport
Element Error Union - Reaction
Type Union - Reply
Markup Union - Result
Chat Member Union - Result
Menu Button Union - Revenue
Withdrawal State Union - Rich
Block Union - Rich
Text Union - Story
Area Type Union - Transaction
Partner Union - Update
Event Ref - Type-safe counterpart of aiogram’s dynamic
Update.eventproperty.
Constants§
- API_
ENTITY_ COUNT - Number of entity definitions in the pinned upstream snapshot.
- API_
UNION_ COUNT - Number of aiogram-compatible helper unions.
- BOUND_
METHOD_ COUNT - Number of bound object helpers declared by the pinned aiogram aliases.
- MAPPED_
PYTHON_ TYPE_ ANNOTATION_ COUNT - Number of final Python field annotations mapped into generated Rust types.
Traits§
- Downloadable
- Telegram objects that expose a file identifier accepted by
getFile.
Type Aliases§
- Input