Expand description
Available types
Structs§
- 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.
- BotCommand
- This object represents a bot command.
- 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.
- 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
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 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
Permissions - Describes actions that a non-administrator user is allowed to take in a chat.
- Chat
Photo - This object represents a chat photo.
- Chosen
Inline Result - Represents a result of an inline query that was chosen by the user and sent to their chat partner.
- Contact
- This object represents a phone contact.
- Dice
- This object represents an animated emoji that displays a random value.
- 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.
- 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.
- 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.
- Inline
Keyboard Button - This object represents one button of an inline keyboard. You must use exactly one of the optional fields.
- 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 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.
- 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 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 Photo - Represents a photo to be sent.
- Input
Media Video - Represents a video to be sent.
- 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. For simple text buttons String can be used instead of this object to specify text of the button. Optional fields web_app, request_contact, request_location, and request_poll are mutually exclusive.
- 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.
- Labeled
Price - This object represents a portion of the price for goods or services.
- Location
- This object represents a point on the map.
- 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:
- Mask
Position - This object describes the position on faces where a mask should be placed by default.
- 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.
- Order
Info - This object represents information about an order.
- Passport
Data - Describes Telegram Passport data shared with the bot by the user.
- 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
Option - This object contains information about one answer option in a poll.
- PreCheckout
Query - This object contains information about an incoming pre-checkout query.
- 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.
- Reply
Keyboard Markup - This object represents a custom keyboard with reply options (see Introduction to bots for details and examples).
- 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).
- Response
Parameters - Describes why a request was unsuccessful.
- Sent
WebApp Message - Describes an inline message sent by a Web App on behalf of a user.
- 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.
- Sticker
- This object represents a sticker.
- Sticker
Set - This object represents a sticker set.
- Successful
Payment - This object contains basic information about a successful payment.
- Update
- This object represents an incoming update.
- User
- This object represents a Telegram user or bot.
- User
Profile Photos - This object represent a user’s profile pictures.
- 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).
- 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.
Enums§
- BotCommand
Scope - This object represents the scope to which bot commands are applied. Currently, the following 7 scopes are supported:
- ChatId
- Unique identifier for the target chat or username of the target channel
- Chat
Member - This object contains information about one member of a chat. Currently, the following 6 types of chat members are supported:
- Chat
Type - Type of chat, can be either “private”, “group”, “supergroup” or “channel”
- Inline
Query Result - This object represents one result of an inline query. Telegram clients currently support results of the following 20 types:
- Input
File - This object represents the contents of a file to be uploaded. Must be posted using multipart/form-data in the usual way that files are uploaded via the browser.
- Input
File Result - On success,returns a InputFileResult object data method
- Input
Media - This object represents the content of a media message to be sent. It should be one of
- 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 5 types:
- MayBe
Message - method will return Message or True
- Menu
Button - This object describes the bot’s menu button in a private chat. It should be one of
- 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:
- Reply
Markup - Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.
Type Aliases§
- Params
- Params represents a set of parameters that gets passed to a request.