You can provide an animation for your game so that it looks stylish in chats (check out Lumberjack for an example).
This object represents an audio file (voice note).
This object represents an audio file (voice note).
Unique identifier for this file
Duration of the audio in seconds as defined by sender
Optional Performer of the audio as defined by sender or by audio tags
Optional Title of the audio as defined by sender or by audio tags
Optional MIME type of the file as defined by sender
Optional File size
PhotoSize Optional. Thumbnail of the album cover to which the music file belongs
A placeholder, currently holds no information.
A placeholder, currently holds no information. Use BotFather to set up your game.
This object represents an incoming callback query from a callback button in an inline keyboard.
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 presented. If the button was attached to a message sent via the bot (in inline mode), the field inline_message_id will be presented.
String Unique identifier for this query
User Sender
Message Optional Message with the callback button that originated the query. Note that message content and message date will not be available if the message is too old
String Optional Identifier of the message sent via the bot in inline mode, that originated the query
String Identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in games.
String Optional. Data associated with the callback button. Be aware that a bad client can send arbitrary data in this field.
String Optional. Short name of a Game to be returned, serves as the unique identifier for the game Note: After the user presses an inline button, Telegram clients will display a progress bar until you call answerCallbackQuery. It is, therefore, necessary to react by calling answerCallbackQuery even if no notification to the user is needed (e.g., without specifying any of the optional parameters).
This object represents a chat.
This object represents a chat.
Integer Unique identifier for this chat, not exceeding 1e13 by absolute value
String Type of chat, can be either "private", "group", "supergroup" or "channel"
String Optional Title, for channels and group chats
String Optional Username, for private chats and channels if available
String Optional First name of the other party in a private chat
String Optional Last name of the other party in a private chat
Boolean Optional. True if a group has 'All Members Are Admins' enabled.
ChatPhoto Optional. Chat photo. Returned only in getChat.
String Optional. Description, for groups, supergroups and channel chats. Returned only in getChat.
String Optional. Optional. Chat invite link, for groups, supergroups and channel chats. Each administrator in a chat generates their own invite links, so the bot must first generate the link using exportChatInviteLink. Returned only in getChat.
Message Optional. Pinned message, for supergroups. Returned only in getChat.
ChatPermissions Optional. Default chat member permissions, for groups and supergroups. Returned only in getChat.
String Optional. For supergroups, name of group sticker set. Returned only in getChat.
Boolean Optional. True, if the bot can change the group sticker set. Returned only in getChat.
Represents either a chat or channel.
This object contains information about one member of the chat.
This object contains information about one member of the chat.
User Information about the user
String The member's status in the chat. Can be "creator", "administrator", "member", "left" or "kicked"
Integer Optional. Restricted and kicked only. Date when restrictions will be lifted for this user, unix time
Boolean Optional. Administrators only. True, if the bot is allowed to edit administrator privileges of that user
Boolean Optional. Administrators and restricted only. True, if the user is allowed to change the chat title, photo and other settings
Boolean Optional. Administrators only. True, if the administrator can post in the channel, channels only
Boolean Optional. Administrators only. True, if the administrator can edit messages of other users, channels only
Boolean Optional. Administrators only. True, if the administrator can delete messages of other users
Boolean Optional. Administrators and restricted only. True, if the user is allowed to invite new users to the chat
Boolean Optional. Administrators only. True, if the administrator can restrict, ban or unban chat members
Boolean Optional. Administrators and restricted only. True, if the user is allowed to pin messages; groups and supergroups only
Boolean Optional. Administrators only. True, if the administrator can add new administrators with a subset of his own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user)
Boolean Optional. Restricted only. True, if the user is a member of the chat at the moment of the request
Boolean Optional. Restricted only. True, if the user can send text messages, contacts, locations and venues
Boolean Optional. Restricted only. True, if the user can send audios, documents, photos, videos, video notes and voice notes, implies can_send_messages
Boolean Optional. Restricted only. True, if the user is allowed to send polls
Boolean Optional. Restricted only. True, if the user can send animations, games, stickers and use inline bots, implies can_send_media_messages
Boolean Optional. Restricted only. True, if user may add web page previews to his messages, implies can_send_media_messages
Describes actions that a non-administrator user is allowed to take in a chat.
Describes actions that a non-administrator user is allowed to take in a chat.
Boolean Optional. True, if the user is allowed to send text messages, contacts, locations and venues
Boolean Optional. True, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes, implies can_send_messages
Boolean Optional. True, if the user is allowed to send polls, implies can_send_messages
Boolean Optional. True, if the user is allowed to send animations, games, stickers and use inline bots, implies can_send_media_messages
Boolean Optional. True, if the user is allowed to add web page previews to their messages, implies can_send_media_messages
Boolean Optional. True, if the user is allowed to change the chat title, photo and other settings. Ignored in public supergroups
Boolean Optional. True, if the user is allowed to invite new users to the chat
Boolean Optional. True, if the user is allowed to pin messages. Ignored in public supergroups
This object represents a chat photo.
This object represents a chat photo.
String Unique file identifier of small (160x160) chat photo. This file_id can be used only for photo download.
String Unique file identifier of big (640x640) chat photo. This file_id can be used only for photo download.
This object represents a result of an inline query that was chosen by the user and sent to their chat partner.
This object represents a result of an inline query that was chosen by the user and sent to their chat partner.
String The unique identifier for the result that was chosen.
User The user that chose the result.
Location Optional Sender location, only for bots that require user location
String Optional Identifier of the sent inline message. Available only if there is an inline keyboard attached to the message. Will be also received in callback queries and can be used to edit the message.
String The query that was used to obtain the result
This object represents a phone contact.
This object represents a phone contact.
Contact's phone number
Contact's first name
Optional Contact's last name
Optional Contact's user identifier in Telegram
String Optional. Additional data about the contact in the form of a vCard
This object represents a general file (as opposed to photos and audio files).
This object represents a general file (as opposed to photos and audio files).
Unique file identifier
Optional Document thumbnail as defined by sender
Optional Original filename as defined by sender
Optional MIME type of the file as defined by sender
Optional File size
This object represents a file ready to be downloaded.
This object represents a file ready to be downloaded.
The file can be downloaded via the link https://api.telegram.org/file/bot<token>/<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. Maximum file size to download is 20 MB
Unique identifier for this file
Optional File size, if known
Optional File path. Use https://api.telegram.org/file/bot<token>/<file_path> to get the file.
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').
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.
Example: A poll bot for groups runs in privacy mode (only receives commands, replies to its messages and mentions). There could be two ways to create a new poll: Explain the user how to send a command with parameters (e.g. /newpoll question answer1 answer2). May be appealing for hardcore users but lacks modern day polish. Guide the user through a step-by-step process. 'Please send me your question', 'Cool, now let's add the first answer option', 'Great. Keep adding answer options, then send /done when you're ready'.
The last option is definitely more attractive. And if you use ForceReply in your bot's questions, it will receive the user's answers even if it only receives replies, commands and mentions - without any extra work for the user.
True Shows reply interface to the user, as if they manually selected the bot's message and tapped 'Reply'
Optional Use this parameter if you want to force reply from specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has replyToMessage_id), sender of the original message.
This object represents a game.
This object represents a game. Use BotFather to create and edit games, their short names will act as unique identifiers.
String Title of the game
String Description of the game
Array of PhotoSize Photo that will be displayed in the game message in chats.
String Optional. Brief description of the game or high scores included in the game message. Can be automatically edited to include current high scores for the game when the bot calls setGameScore, or manually edited using editMessageText. 0-4096 characters.
Array of MessageEntity Optional. Special entities that appear in text, such as usernames, URLs, bot commands, etc.
Animation Optional. Animation that will be displayed in the game message in chats. Upload via BotFather
This object represents one row of the high scores table for a game.
This object represents one row of the high scores table for a game.
Integer Position in high score table for the game
User User
Integer Score
This object represents one button of an inline keyboard.
This object represents one button of an inline keyboard. You must use exactly one of the optional fields.
Notes: This offers an easy way for users to start using your bot in inline mode when they are currently in a private chat with it. Especially useful when combined with switch_pm... actions - in this case the user will be automatically returned to the chat they switched from, skipping the chat selection screen. This will only work in Telegram versions released after 9 April, 2016. Older clients will display unsupported message.
String Label text on the button
String Optional Data to be sent in a callback query to the bot when button is pressed, 1-64 bytes
String Optional HTTP url to be opened when button is pressed
LoginUrl Optional. An HTTP URL used to automatically authorize the user. Can be used as a replacement for the Telegram Login Widget.
String Optional If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. Can be empty, in which case just the bot's username will be inserted.
String Optional. If set, pressing the button will insert the bot's username and the specified inline query in the current chat's input field. Can be empty, in which case only the bot's username will be inserted. This offers a quick way for the user to open your bot in inline mode in the same chat - good for selecting something from multiple options.
CallbackGame Optional. Description of the game that will be launched when the user presses the button. NOTE: This type of button must always be the first button in the first row.
This object represents an inline keyboard that appears right next to the message it belongs to.
This object represents an inline keyboard that appears right next to the message it belongs to.
Warning: Inline keyboards are currently being tested and are only available in one-on-one chats (i.e., user-bot or user-user in the case of inline bots).
Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will display unsupported message.
Warning: Inline keyboards are currently being tested and are not available in channels yet. For now, feel free to use them in one-on-one chats or groups.
Array of Array of InlineKeyboardButton Array of button rows, each represented by an Array of InlineKeyboardButton objects
This object represents an incoming 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.
String Unique identifier for this query
User Sender
Location Optional Sender location, only for bots that request user location
String Text of the query
String Offset of the results to be returned, can be controlled by the bot
This object represents one result of an inline query.
This object represents one result of an inline query. Telegram clients currently support results of the following 19 types:
InlineQueryResultCachedAudio InlineQueryResultCachedDocument InlineQueryResultCachedGif InlineQueryResultCachedMpeg4Gif InlineQueryResultCachedPhoto InlineQueryResultCachedSticker InlineQueryResultCachedVideo InlineQueryResultCachedVoice InlineQueryResultArticle InlineQueryResultAudio InlineQueryResultContact InlineQueryResultDocument InlineQueryResultGif InlineQueryResultLocation InlineQueryResultMpeg4Gif InlineQueryResultPhoto InlineQueryResultVenue InlineQueryResultVideo InlineQueryResultVoice
Represents a link to an article or web page.
Represents a link to an article or web page.
String Unique identifier for this result, 1-64 Bytes
String Title of the result
InputMessageContent Content of the message to be sent
InlineKeyboardMarkup Optional Inline keyboard attached to the message
String Optional URL of the result
Boolean Optional Pass True, if you don't want the URL to be shown in the message
String Optional Short description of the result
String Optional Url of the thumbnail for the result
Integer Optional Thumbnail width
Integer Optional Thumbnail height
String Type of the result, must be article
Represents a link to an mp3 audio file.
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.
String Unique identifier for this result, 1-64 bytes
String A valid URL for the audio file
String Title
String Optional. Caption, 0-200 characters
String Optional Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.
String Optional Performer
Integer Optional Audio duration in seconds
InlineKeyboardMarkup Optional Inline keyboard attached to the message
InputMessageContent Optional Content of the message to be sent instead of the audio Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.
String Type of the result, must be audio
Represents a link to an mp3 audio file stored on the Telegram servers.
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.
String Unique identifier for this result, 1-64 bytes
String A valid file identifier for the audio file
String Optional. Caption, 0-200 characters
String Optional Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.
InlineKeyboardMarkup Optional An Inline keyboard attached to the message
InputMessageContent Optional Content of the message to be sent instead of the audio Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.
String Type of the result, must be audio
Represents a link to a file stored on the Telegram servers.
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. Currently, only pdf-files and zip archives can be sent using this method.
String Unique identifier for this result, 1-64 bytes
String Title for the result
String A valid file identifier for the file
String Optional Short description of the result
String Optional Caption of the document to be sent, 0-200 characters
String Optional Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.
InlineKeyboardMarkup Optional An Inline keyboard attached to the message
InputMessageContent Optional Content of the message to be sent instead of the file Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.
String Type of the result, must be document
Represents a link to an animated GIF file stored on the Telegram servers.
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.
String Unique identifier for this result, 1-64 bytes
String A valid file identifier for the GIF file
String Optional Title for the result
String Optional Caption of the GIF file to be sent, 0-200 characters
String Optional Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.
InlineKeyboardMarkup Optional An Inline keyboard attached to the message
InputMessageContent Optional Content of the message to be sent instead of the GIF animation
String Type of the result, must be gif
Represents a link to a video animation (H.264/MPEG-4 AVC video without sound) stored on the Telegram servers.
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.
String Unique identifier for this result, 1-64 bytes
String A valid file identifier for the MP4 file
String Optional Title for the result
String Optional Caption of the MPEG-4 file to be sent, 0-200 characters
String Optional Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.
InlineKeyboardMarkup Optional An Inline keyboard attached to the message
InputMessageContent Optional Content of the message to be sent instead of the video animation
String Type of the result, must be mpeg4_gif
Represents a link to a photo stored on the Telegram servers.
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.
String Unique identifier for this result, 1-64 bytes
String A valid file identifier of the photo
String Optional Title for the result
String Optional Short description of the result
String Optional Caption of the photo to be sent, 0-200 characters
String Optional Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.
InlineKeyboardMarkup Optional Inline keyboard attached to the message
InputMessageContent Optional Content of the message to be sent instead of the photo
String Type of the result, must be photo
Represents a link to a sticker stored on the Telegram servers.
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.
String Unique identifier for this result, 1-64 bytes
String A valid file identifier of the sticker
InlineKeyboardMarkup Optional An Inline keyboard attached to the message
InputMessageContent Optional Content of the message to be sent instead of the sticker Note: This will only work in Telegram versions released after 9 April, 2016 for static stickers and after 06 July, 2019 for animated stickers. Older clients will ignore them.
String Type of the result, must be sticker
Represents a link to a video file stored on the Telegram servers.
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.
String Unique identifier for this result, 1-64 bytes
String A valid file identifier for the video file
String Title for the result
String Optional Short description of the result
String Optional Caption of the video to be sent, 0-200 characters
String Optional Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.
InlineKeyboardMarkup Optional An Inline keyboard attached to the message
InputMessageContent Optional Content of the message to be sent instead of the video
String Type of the result, must be video
InlineQueryResultCachedVoice
InlineQueryResultCachedVoice
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.
String Unique identifier for this result, 1-64 bytes
String A valid file identifier for the voice message
String Voice message title
String Optional. Caption, 0-200 characters
String Optional Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.
InlineKeyboardMarkup Optional An Inline keyboard attached to the message
InputMessageContent Optional Content of the message to be sent instead of the voice message Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.
String Type of the result, must be voice
Represents a contact with a phone number.
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.
String Unique identifier for this result, 1-64 Bytes
String Contact's phone number
String Contact's first name
String Optional Contact's last name
String Optional. Additional data about the contact in the form of a vCard, 0-2048 bytes
InlineKeyboardMarkup Optional Inline keyboard attached to the message
InputMessageContent Optional Content of the message to be sent instead of the contact
String Optional Url of the thumbnail for the result
Integer Optional Thumbnail width
Integer Optional Thumbnail height Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.
String Type of the result, must be contact
Represents a link to a file.
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.
String Unique identifier for this result, 1-64 bytes
String Title for the result
String Optional Caption of the document to be sent, 0-200 characters
String Optional Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.
String A valid URL for the file
String Mime type of the content of the file, either "application/pdf" or "application/zip"
String Optional Short description of the result
InlineKeyboardMarkup Optional Inline keyboard attached to the message
InputMessageContent Optional Content of the message to be sent instead of the file
String Optional URL of the thumbnail (jpeg only) for the file
Integer Optional Thumbnail width
Integer Optional Thumbnail height
String Type of the result, must be document
Represents a Game.
Represents a Game.
String Unique identifier for this result, 1-64 bytes
String Short name of the game
InlineKeyboardMarkup Optional. Inline keyboard attached to the message Note: This will only work in Telegram versions released after October 1, 2016. Older clients will not display any inline results if a game result is among them.
String Type of the result, must be game
Represents a link to an animated GIF file.
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.
String Unique identifier for this result, 1-64 bytes
String A valid URL for the GIF file. File size must not exceed 1MB
Integer Optional Width of the GIF
Integer Optional Height of the GIF
Integer Optional. Duration of the GIF
String URL of the static thumbnail for the result (jpeg or gif)
String Optional Title for the result
String Optional Caption of the GIF file to be sent, 0-200 characters
String Optional Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.
InlineKeyboardMarkup Optional Inline keyboard attached to the message
InputMessageContent Optional Content of the message to be sent instead of the GIF animation
String Type of the result, must be gif
Represents a location on a map.
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.
String Unique identifier for this result, 1-64 Bytes
Float number Location latitude in degrees
Float number Location longitude in degrees
String Location title
InlineKeyboardMarkup Optional Inline keyboard attached to the message
InputMessageContent Optional Content of the message to be sent instead of the location
String Optional Url of the thumbnail for the result
Integer Optional Thumbnail width
Integer Optional Thumbnail height Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.
String Type of the result, must be location
Represents a link to a video animation (H.264/MPEG-4 AVC video without sound).
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.
String Unique identifier for this result, 1-64 bytes
String A valid URL for the MP4 file. File size must not exceed 1MB
Integer Optional Video width
Integer Optional Video height
Integer Optional. Video duration
String URL of the static thumbnail (jpeg or gif) for the result
String Optional Title for the result
String Optional Caption of the MPEG-4 file to be sent, 0-200 characters
String Optional Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.
InlineKeyboardMarkup Optional Inline keyboard attached to the message
InputMessageContent Optional Content of the message to be sent instead of the video animation
String Type of the result, must be mpeg4_gif
Represents a link to a 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.
String Unique identifier for this result, 1-64 bytes
String A valid URL of the photo. Photo must be in jpeg format. Photo size must not exceed 5MB
String URL of the thumbnail for the photo
Integer Optional Width of the photo
Integer Optional Height of the photo
String Optional Title for the result
String Optional Short description of the result
String Optional Caption of the photo to be sent, 0-200 characters
String Optional Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.
InlineKeyboardMarkup Optional Inline keyboard attached to the message
InputMessageContent Optional Content of the message to be sent instead of the photo
String Type of the result, must be photo
Represents a 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.
String Unique identifier for this result, 1-64 Bytes
Float Latitude of the venue location in degrees
Float Longitude of the venue location in degrees
String Title of the venue
String Address of the venue
String Optional Foursquare identifier of the venue if known
String Optional. Foursquare type of the venue, if known. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.)
InlineKeyboardMarkup Optional Inline keyboard attached to the message
InputMessageContent Optional Content of the message to be sent instead of the venue
String Optional Url of the thumbnail for the result
Integer Optional Thumbnail width
Integer Optional Thumbnail height Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.
String Type of the result, must be venue
Represents a link to a page containing an embedded video player or a video file.
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.
String Unique identifier for this result, 1-64 bytes
String A valid URL for the embedded video player or video file
String Mime type of the content of video url, "text/html" or "video/mp4"
String URL of the thumbnail (jpeg only) for the video
String Title for the result
String Optional Caption of the video to be sent, 0-200 characters
String Optional Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.
Integer Optional Video width
Integer Optional Video height
Integer Optional Video duration in seconds
String Optional Short description of the result
InlineKeyboardMarkup Optional Inline keyboard attached to the message
InputMessageContent Optional Content of the message to be sent instead of the video
String Type of the result, must be video
Represents a link to a voice recording in an .ogg container encoded with OPUS.
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.
String Unique identifier for this result, 1-64 bytes
String A valid URL for the voice recording
String Recording title
String Optional. Caption, 0-200 characters
String Optional Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.
Integer Optional Recording duration in seconds
InlineKeyboardMarkup Optional Inline keyboard attached to the message
InputMessageContent Optional Content of the message to be sent instead of the voice recording Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.
String Type of the result, must be voice
Represents the content of a contact message to be sent as the result of an inline query.
Represents the content of a contact message to be sent as the result of an inline query.
Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.
String Contact's phone number
String Contact's first name
String Optional Contact's last name
String Optional. Additional data about the contact in the form of a vCard, 0-2048 bytes
This object represents the contents of a file to be uploaded.
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.
Resending files without reuploading There are two ways of sending a file (photo, sticker, audio etc.). If it's a new file, you can upload it using multipart/form-data. If the file is already on our servers, you don't need to reupload it: each file object has a file_id field, you can simply pass this file_id as a parameter instead.
It is not possible to change the file type when resending by file_id. I.e. a video can't be sent as a photo, a photo can't be sent as a document, etc. It is not possible to resend thumbnails. Resending a photo by file_id will send all of its sizes.
Represents the content of a location message to be sent as the result of an inline query.
Represents the content of a location message to be sent as the result of an inline query.
Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.
Float Latitude of the location in degrees
Float Longitude of the location in degrees
Represents an animation file (GIF or H.264/MPEG-4 AVC video without sound) to be sent.
Represents an animation file (GIF or H.264/MPEG-4 AVC video without sound) to be sent.
String File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More info on Sending Files »
InputFile or String Optional. Thumbnail of the file sent. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail‘s width and height should not exceed 90. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can’t be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files »
String Optional. Caption of the animation to be sent, 0-200 characters
String Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.
Integer Optional. Animation width
Integer Optional. Animation height
Integer Optional. Animation duration
String Type of the result, must be animation
Represents an audio file to be treated as music to be sent.
Represents an audio file to be treated as music to be sent.
String File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More info on Sending Files »
InputFile or String Optional. Thumbnail of the file sent. thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail‘s width and height should not exceed 90. if the file is not uploaded using multipart/form-data. Thumbnails can’t be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files »
String Optional. Caption of the audio to be sent, 0-200 characters
String Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.
Integer Optional. Duration of the audio in seconds
String Optional. Performer of the audio
String Optional. Title of the audio
String Type of the result, must be audio
Represents a general file to be sent.
Represents a general file to be sent.
String File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More info on Sending Files »
InputFile or String Optional. Thumbnail of the file sent. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail‘s width and height should not exceed 90. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can’t be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files »
String Optional. Caption of the document to be sent, 0-200 characters
String Type of the result, must be document
Represents a photo to be sent.
Represents a photo to be sent.
String File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass "attach://<file_attach_name>" to upload a new one using multipart/form-data under <file_attach_name> name. More info on Sending Files »
InputFile for the "attach://file_attach_name" case.
String Optional. Caption of the photo to be sent, 0-200 characters
String Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.
String Type of the result, must be photo
Represents a video to be sent.
Represents a video to be sent.
String File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass "attach://<file_attach_name>" to upload a new one using multipart/form-data under <file_attach_name> name. More info on Sending Files »
String Optional. Caption of the video to be sent, 0-200 characters
Integer Optional. Video width
Integer Optional. Video height
Integer Optional. Video duration
String Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.
Boolean Optional. Pass True, if the uploaded video is suitable for streaming
String Type of the result, must be video
This object represents the content of a message to be sent as a result of an inline query.
This object represents the content of a message to be sent as a result of an inline query.
Telegram clients currently support the following 4 types: InputTextMessageContent InputLocationMessageContent InputVenueMessageContent InputContactMessageContent
Represents the content of a text message to be sent as the result of an inline query.
Represents the content of a text message to be sent as the result of an inline query.
String Text of the message to be sent, 1-4096 characters
String Optional Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in your bot's message.
Boolean Optional Disables link previews for links in the sent message
Represents the content of a venue message to be sent as the result of an inline query.
Represents the content of a venue message to be sent as the result of an inline query.
Float Latitude of the venue in degrees
Float Longitude of the venue in degrees
String Name of the venue
String Address of the venue
String Optional Foursquare identifier of the venue, if known
String Optional. Foursquare type of the venue, if known. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.) Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.
This object contains basic information about an invoice.
This object contains basic information about an invoice.
String Product name
String Product description
String Unique bot deep-linking parameter that can be used to generate this invoice
String Three-letter ISO 4217 currency code
Integer Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).
This object represents one button of the reply keyboard.
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 are mutually exclusive.
Note: requestContact and requestLocation options will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.
String Text of the button. If none of the optional fields are used, it will be sent to the bot as a message when the button is pressed
Boolean Optional If True, the user's phone number will be sent as a contact when the button is pressed. Available in private chats only
Boolean Optional If True, the user's current location will be sent when the button is pressed. Available in private chats only
This object represents a portion of the price for goods or services.
This object represents a portion of the price for goods or services.
String Portion label
Integer Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).
This object represents a point on the map.
This object represents a point on the map.
Longitude as defined by sender
Latitude as defined by sender
This object represents a parameter of the inline keyboard button used to automatically authorize a user.
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:
Telegram apps support these buttons as of version 5.7.
Sample bot: @discussbot
String An HTTP URL to be opened with user authorization data added to the query string when the button is pressed. If the user refuses to provide authorization data, the original URL without information about the user will be opened. The data added is the same as described in Receiving authorization data. NOTE: You must always check the hash of the received data to verify the authentication and the integrity of the data as described in Checking authorization.
String Optional. New text of the button in forwarded messages.
String Optional. Username of a bot, which will be used for user authorization. See Setting up a bot for more details. If not specified, the current bot's username will be assumed. The url's domain must be the same as the domain linked with the bot. See Linking your domain to the bot for more details.
Boolean Optional. Pass True to request the permission for your bot to send messages to the user.
This object describes the position on faces where a mask should be placed by default.
This object describes the position on faces where a mask should be placed by default.
String The part of the face relative to which the mask should be placed. One of “forehead”, “eyes”, “mouth”, or “chin”.
Float number Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. For example, choosing -1.0 will place mask just to the left of the default mask position.
Float number Shift by Y-axis measured in heights of the mask scaled to the face size, from top to bottom. For example, 1.0 will place the mask just below the default mask position.
Float number Mask scaling coefficient. For example, 2.0 means double size.
This object represents a message.
This object represents a message.
Unique message identifier
Sender
Date the message was sent in Unix time
User or GroupChat Conversation the message belongs to - user in case of a private message, GroupChat in case of a group
Optional For forwarded messages, sender of the original message
Optional For messages forwarded from a channel, information about the original channel
Integer Optional. For forwarded channel posts, identifier of the original message in the channel
String Optional. For messages forwarded from channels, signature of the post author if present
String Optional. Sender's name for messages forwarded from users who disallow adding a link to their account in forwarded messages
Optional For forwarded messages, date the original message was sent in Unix time
Optional For replies, the original message. Note that the Message object in this field will not contain further replyToMessage fields even if it itself is a reply.
Optional. Date the message was last edited in Unix time
String Optional. Signature of the post author for messages in channels
Optional For text messages, the actual UTF-8 text of the message
Array of MessageEntity Optional For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text
Array of MessageEntity Optional. For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption
Optional Message is an audio file, information about the file
Optional Message is a general file, information about the file
Optional. Message is an animation, information about the animation. For backward compatibility, when this field is set, the document field will also be set
Game Optional. Message is a game, information about the game. More about games »
Optional Message is a photo, available sizes of the photo
Optional Message is a sticker, information about the sticker
Optional Message is a video, information about the video
Optional Message is a voice message, information about the file
Optional Message is a video note, information about the video message
Array of User Optional. New members that were added to the group or supergroup and information about them (the bot itself may be one of these members)
Optional Caption for the photo or video
Optional Message is a shared contact, information about the contact
Optional Message is a shared location, information about the location
Venue Optional Message is a venue, information about the venue
Poll Optional. Message is a native poll, information about the poll
Optional A member was removed from the group, information about them (this member may be bot itself)
Optional A group title was changed to this value
Optional A group photo was change to this value
Optional Informs that the group photo was deleted
Optional Informs that the group has been created
True Optional Service message: the supergroup has been created
True Optional Service message: the channel has been created
Integer Optional The group has been migrated to a supergroup with the specified identifier, not exceeding 1e13 by absolute value
Integer Optional The supergroup has been migrated from a group with the specified identifier, not exceeding 1e13 by absolute value
Message Optional Specified message was pinned. Note that the Message object in this field will not contain further reply_to_message fields even if it is itself a reply.
Invoice Optional. Message is an invoice for a payment, information about the invoice. More about payments »
Optional. Message is a service message about a successful payment, information about the payment.
String Optional. The domain name of the website on which the user has logged in. More about Telegram Login »
InlineKeyboardMarkup Optional. Inline keyboard attached to the message. login_url buttons are represented as ordinary url buttons.
This object represents one special entity in a text message.
This object represents one special entity in a text message.
For example, hashtags, usernames, URLs, etc.
String Type of the entity. One of mention (@username), hashtag, bot_command, url, email, bold (bold text), italic (italic text), code (monowidth string), pre (monowidth block), text_link (for clickable text URLs), text_mention (for users without usernames)
Integer Offset in UTF-16 code units to the start of the entity
Integer Length of the entity in UTF-16 code units
String Optional For "text_link" only, url that will be opened after user taps on the text
User Optional. For "text_mention" only, the mentioned user
This object represents information about an order.
This object represents information about an order.
String Optional. User name
String Optional. User's phone number
String Optional. User email
ShippingAddress Optional. User shipping address
This object represents one size of a photo or a file / sticker thumbnail.
This object represents one size of a photo or a file / sticker thumbnail.
Unique identifier for this file
Photo width
Photo height
Optional File size
This object contains information about a poll.
This object contains information about a poll.
Unique poll identifier
Poll question, 1-255 characters
List of poll options
True, if the poll is closed
This object contains information about one answer option in a poll.
This object contains information about one answer option in a poll.
Option text, 1-100 characters
Number of users that voted for this option
This object contains information about an incoming pre-checkout query.
This object contains information about an incoming pre-checkout query.
String Unique query identifier
User User who sent the query
String Three-letter ISO 4217 currency code
Integer Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).
String Bot specified invoice payload
String Optional. Identifier of the shipping option chosen by the user
OrderInfo Optional. Order info provided by the user
This object represents a custom keyboard with reply options (see Introduction to bots for details and telegrambot4s.examples).
This object represents a custom keyboard with reply options (see Introduction to bots for details and telegrambot4s.examples).
Example: A user requests to change the bot's language, bot replies to the request with a keyboard to select the new language. Other users in the group don't see the keyboard.
Array of button rows, each represented by an Array of KeyboardButton objects
Optional Requests clients to resize the keyboard vertically for optimal fit (e.g., make the keyboard smaller if there are just two rows of buttons). Defaults to false, in which case the custom keyboard is always of the same height as the app's standard keyboard.
Optional Requests clients to hide the keyboard as soon as it's been used. Defaults to false.
Optional Use this parameter if you want to show the keyboard to specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has replyToMessage_id), sender of the original message.
Upon receiving a message with this object, Telegram clients will remove the current custom keyboard and display the default letter-keyboard.
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).
True Requests clients to remove the custom keyboard (user will not be able to summon this keyboard; if you want to hide the keyboard from sight but keep it accessible, use one_time_keyboard in ReplyKeyboardMarkup)
Boolean Optional. Use this parameter if you want to remove the keyboard for specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message. Example: A user votes in a poll, bot returns confirmation message in reply to the vote and removes the keyboard for that user, while still showing the keyboard with poll options to users who haven't voted yet.
ReplyMarkup
ReplyMarkup
Base for custom (keyboard) markups.
Contains information about why a request was unsuccessful.
Contains information about why a request was unsuccessful.
Integer Optional. The group has been migrated to a supergroup with the specified identifier. This number may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier.
Integer Optional. In case of exceeding flood control, the number of seconds left to wait before the request can be repeated
This object represents a shipping address.
This object represents a shipping address. See CountryCode for a full listing.
Country codes can be easily found/validated using the following:
Locale .getISOCountries() .map(cc => (cc, new Locale("", cc) .getDisplayCountry())) .toMap
String ISO 3166-1 alpha-2 country code
String State, if applicable
String City
String First line for the address
String Second line for the address
String Address post code
This object represents one shipping option.
This object represents one shipping option.
String Shipping option identifier
String Option title
Array of LabeledPrice List of price portions
This object contains information about an incoming shipping query.
This object contains information about an incoming shipping query.
String Unique query identifier
User User who sent the query
String Bot specified invoice payload
ShippingAddress User specified shipping address
This object represents a sticker.
This object represents a sticker.
Unique identifier for this file
Sticker width
Sticker height
Boolean True, if the sticker is animated
Optional Sticker thumbnail in .webp or .jpg format
Optional. Emoji associated with the sticker
String Optional. Name of the sticker set to which the sticker belongs
MaskPosition Optional. For mask stickers, the position where the mask should be placed
Integer Optional. File size
This object represents a sticker set.
This object represents a sticker set.
String Sticker set name
String Sticker set title
Boolean True, if the sticker set contains animated stickers
Boolean True, if the sticker set contains masks
Array of Sticker List of all set stickers
This object contains basic information about a successful payment.
This object contains basic information about a successful payment.
String Three-letter ISO 4217 currency code
Integer Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).
String Bot specified invoice payload
String Optional. Identifier of the shipping option chosen by the user
OrderInfo Optional. Order info provided by the user
String Telegram payment identifier
String Provider payment identifier
This object represents an incoming update.
This object represents an incoming update. At most one of the optional parameters can be present in any given update.
The update's unique identifier. Update identifiers start from a certain positive number and increase sequentially. This ID becomes especially handy if you're using Webhooks, since it allows you to ignore repeated updates or to restore the correct update sequence, should they get out of order.
Optional New incoming message of any kind - text, photo, sticker, etc.
Optional. New version of a message that is known to the bot and was edited
Message Optional. New incoming channel post of any kind - text, photo, sticker, etc.
Message Optional. New version of a channel post that is known to the bot and was edited
InlineQuery Optional New incoming inline query
ChosenInlineResult Optional The result of a inline query that was chosen by a user and sent to their chat partner
Optional New incoming callback query
ShippingQuery Optional. New incoming shipping query. Only for invoices with flexible price
PreCheckoutQuery Optional. New incoming pre-checkout query. Contains full information about checkout
Poll Optional. New poll state. Bots receive only updates about polls, which are sent or stopped by the bot
This object represents a Telegram user or bot.
This object represents a Telegram user or bot.
Unique identifier for this user or bot
Boolean True, if this user is a bot
User's or bot's first name
Optional User's or bot's last name
Optional User's or bot's username
String Optional. IETF language tag of the user's language
This object represent a user's profile pictures.
This object represent a user's profile pictures.
Total number of profile pictures the target user has
Requested profile pictures (in up to 4 sizes each)
This object represents a venue.
This object represents a venue.
Location Venue location
String Name of the venue
String Address of the venue
String Optional Foursquare identifier of the venue
String Optional. Foursquare type of the venue. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.)
This object represents a video file.
This object represents a video file.
Unique identifier for this file
Video width as defined by sender
Video height as defined by sender
Duration of the video in seconds as defined by sender
Optional Video thumbnail
Optional Mime type of a file as defined by sender
Optional File size
This object represents a video message (available in Telegram apps as of v.4.0).
This object represents a video message (available in Telegram apps as of v.4.0).
String Unique identifier for this file
Integer Video width and height as defined by sender
Integer Duration of the video in seconds as defined by sender
PhotoSize Optional. Video thumbnail
Integer Optional. File size
This object represents a voice note.
This object represents a voice note.
Unique identifier for this file
Duration of the audio in seconds as defined by sender
Optional MIME type of the file as defined by sender
Optional File size
Contains information about the current status of a webhook.
Contains information about the current status of a webhook.
Webhook URL, may be empty if webhook is not set up
True, if a custom certificate was provided for webhook certificate checks
Number of updates awaiting delivery
Optional. Unix time for the most recent error that happened when trying to deliver an update via webhook
Optional. Error message in human-readable format for the most recent error that happened when trying to deliver an update via webhook
Type of chat, can be either "private", "group", "supergroup" or "channel"
ISO 3166-1 alpha-2 country codes.
Parsed from https://core.telegram.org/bots/payments/currencies.json.
Preferred (safe) way to instantiate InlineKeyboardButton.
Preferred (safe) way to instantiate InlineKeyboardButton.
InlineKeyboardButton.callbackData("1990", "#1") InlineKeyboardButton.url("Google Google", "http://lmgtfy.com/?q=Google")
Preferred (safe) way to instantiate KeyboardButton.
Preferred (safe) way to instantiate KeyboardButton.
KeyBoardButton.text("OK") KeyBoardButton.requestLocation("Share location") KeyBoardButton.requestContact("Share contact")
The part of the face relative to which the mask should be placed.
The part of the face relative to which the mask should be placed. One of "forehead", "eyes", "mouth", or "chin".
Different types of in-message entities.
Provides grouped update types to filter updates (e.g.
Provides grouped update types to filter updates (e.g. message related, payments related).
You can provide an animation for your game so that it looks stylish in chats (check out Lumberjack for an example). This object represents an animation file to be displayed in the message containing a game.
String Unique file identifier
PhotoSize Optional. Animation thumbnail as defined by sender
String Optional. Original animation filename as defined by sender
String Optional. MIME type of the file as defined by sender
Integer Optional. File size