This object represents an animation file (GIF or H.264/MPEG-4 AVC video without sound).
Builder for the Animation structure
Use this method to send answers to callback queries sent from
inline keyboards. The answer will be displayed to the user as a notification at the top of the chat screen or as an alert. On success,
true is returned.
Alternatively, the user can be redirected to the specified Game URL. For this option to work, you must first create a game for your bot via @BotFather and accept the terms. Otherwise, you may use links like t.me/your_bot?start=XXXX that open your bot with a parameter
Builder for the AnswerCallbackQuery structure
Use this method to send answers to an inline query. On success, True is returned.
Builder for the AnswerInlineQuery structure
Once the user has confirmed their payment and shipping details, the Bot API sends the final confirmation in the form of an Update with the field pre_checkout_query. Use this method to respond to such pre-checkout queries. On success, True is returned. Note: The Bot API must receive an answer within 10 seconds after the pre-checkout query was sent.
Builder for the AnswerPreCheckoutQuery structure
If you sent an invoice requesting a shipping address and the parameter is_flexible was specified, the Bot API will send an Update with a shipping_query field to the bot. Use this method to reply to shipping queries. On success, True is returned.
Builder for the AnswerShippingQuery structure
Use this method to set the result of an interaction with a Web App and send a corresponding message on behalf of the user to the chat from which the query originated. On success, a SentWebAppMessage object is returned.
Builder for the AnswerWebAppQuery structure
Use this method to approve a chat join request. The bot must be an administrator in the chat for this to work and must have the can_invite_users administrator right. Returns true on success.
Builder for the ApproveChatJoinRequest structure
This object represents an audio file to be treated as music by the Telegram clients.
Builder for the Audio structure
Use this method to ban a user in a group, a supergroup or a channel. In the case of supergroups and channels, the user will not be able to return to the chat on their own using invite links, etc., unless
unbanned first. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns
true on success.
Builder for the BanChatMember structure
Use this method to ban a channel chat in a supergroup or a channel. Until the chat is
unbanned, the owner of the banned chat won't be able to send messages on behalf of
any of their channels. The bot must be an administrator in the supergroup or channel for this to work and must have the appropriate administrator rights. Returns
true on success.
Builder for the BanChatSenderChat structure
This object represents a bot command.
Builder for the BotCommand structure
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.
Builder for the CallbackQuery structure
This object represents a chat.
Represents the rights of an administrator in a chat.
Builder for the ChatAdministratorRights structure
Builder for the Chat structure
Represents an invite link for a chat.
Builder for the ChatInviteLink structure
Represents a join request sent to a chat.
Builder for the ChatJoinRequest structure
Represents a location to which a chat is connected.
Builder for the ChatLocation structure
Describes actions that a non-administrator user is allowed to take in a chat.
Builder for the ChatPermissions structure
This object represents a chat photo.
Builder for the ChatPhoto structure
Represents a result of an inline query that was chosen by the user and sent to their chat partner.
Note: It is necessary to enable inline feedback via @BotFather in order to receive these objects in updates.
Builder for the ChosenInlineResult structure
Use this method to close an open topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success.
Builder for the CloseForumTopic structure
Use this method to close an open ‘General’ topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. Returns True on success.
Builder for the CloseGeneralForumTopic structure
This object represents a phone contact.
Builder for the Contact structure
Use this method to copy messages of any kind. Service messages and invoice messages can't be copied. A quiz
Poll can be copied only if the value of the field
correct_option_id is known to the bot. The method is analogous to the method
forward_message, but the copied message doesn't have a link to the original message. Returns the
MessageIdof the sent message on success.
Builder for the CopyMessage structure
Use this method to create an additional invite link for a chat. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. The link can be revoked using the method
revoke_chat_invite_link. Returns the new invite link as
ChatInviteLink object.
Builder for the CreateChatInviteLink structure
Use this method to create a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. Returns information about the created topic as a ForumTopic object.
Builder for the CreateForumTopic structure
Use this method to create a link for an invoice. Returns the created invoice link as String on success.
Builder for the CreateInvoiceLink structure
Use this method to decline a chat join request. The bot must be an administrator in the chat for this to work and must have the can_invite_users administrator right. Returns true on success.
Builder for the DeclineChatJoinRequest structure
Use this method to delete a chat photo. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns true on success.
Builder for the DeleteChatPhoto structure
Use this method to delete a group sticker set from a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Use the field
can_set_sticker_set optionally returned in
get_chat requests to check if the bot can use this method. Returns
true on success.
Builder for the DeleteChatStickerSet structure
Use this method to delete a forum topic along with all its messages in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_delete_messages administrator rights. Returns True on success.
Builder for the DeleteForumTopic structure
Use this method to delete the list of the bot's commands for the given scope and user language. After deletion,
higher level commands will be shown to affected users. Returns
true on success.
Builder for the DeleteMyCommands structure
This object represents an animated emoji that displays a random value.
Builder for the Dice structure
This object represents a general file (as opposed to photos, voice messages and audio files).
Builder for the Document structure
Use this method to edit a non-primary invite link created by the bot. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the edited invite link as a
ChatInviteLink object.
Builder for the EditChatInviteLink structure
Use this method to edit name and icon of a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success.
Builder for the EditForumTopic structure
Use this method to edit the name of the ‘General’ topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have can_manage_topics administrator rights. Returns True on success.
Builder for the EditGeneralForumTopic structure
Use this method to edit live location messages. A location can be edited until its
live_period expires or editing is explicitly disabled by a call to
stop_message_live_location. On success, if the edited message is not an inline message, the edited
Message is returned, otherwise
true is returned.
Builder for the EditMessageLiveLocation structure
Describes data required for decrypting and authenticating EncryptedPassportElement. See the Telegram Passport Documentation for a complete description of the data decryption and authentication processes.
Describes documents or other Telegram Passport elements shared with the bot by the user.
Use this method to generate a new primary invite link for a chat; any previously generated primary link is revoked. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the new invite link as String on success.
Builder for the ExportChatInviteLink structure
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.
Builder for the File structure
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.
Builder for the ForceReply structure
This object represents a service message about a forum topic closed in the chat. Currently holds no information
Builder for the ForumTopicClosed structure
This object represents a service message about a new forum topic created in the chat
Builder for the ForumTopicCreated structure
This object represents a service message about an edited forum topicF
Builder for the ForumTopicEdited structure
This object represents a service message about a forum topic reopened in the chat. Currently holds no information
Builder for the ForumTopicReopened structure
Use this method to forward messages of any kind. Service messages can't be forwarded. On success, the sent
Message is returned.
Builder for the ForwardMessage structure
This object represents a game. Use BotFather to create and edit games, their short names will act as unique identifiers.
Builder for the Game structure
This object represents one row of the high scores table for a game.
Builder for the GameHighScore structure
This object represents a service message about General forum topic hidden in the chat. Currently holds no information
Builder for the GeneralForumTopicHidden structure
This object represents a service message about General forum topic unhidden in the chat. Currently holds no information
Builder for the GeneralForumTopicUnhidden structure
Use this method to get up to date information about the chat (current name of the user for one-on-one conversations, current username of a user, group or channel, etc.). Returns a
Chat object on success.
Use this method to get a list of administrators in a chat, which aren't bots. Returns an Array of
ChatMember objects.
Builder for the GetChatAdministrators structure
Builder for the GetChat structure
Use this method to get information about a member of a chat. Returns a
ChatMember object on success.
Builder for the GetChatMember structure
Use this method to get the number of members in a chat. Returns Int on success.
Builder for the GetChatMemberCount structure
Use this method to get the current value of the bot's menu button in a private chat, or the default menu button. Returns
MenuButton on success.
Builder for the GetChatMenuButton structure
Use this method to get basic information about a file and prepare it for downloading. For the moment, bots can download files of up to 20MB in size. On success, a
File object is returned. The file can then be downloaded via the link
https://api.telegram.org/file/bot<token>/<file_path>, where
<file_path>; is taken from the response. 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
get_file again.
Builder for the GetFile structure
Use this method to get data for high score tables. Will return the score of the specified user and several of their neighbors in a game. Returns an Array of GameHighScore objects.
Builder for the GetGameHighScores structure
Use this method to get the current list of the bot's commands for the given scope and user language. Returns an Array of
BotCommand objects. If commands aren't set, an empty list is returned.
Builder for the GetMyCommands structure
Use this method to get the current default administrator rights of the bot. Returns
ChatAdministratorRights on success.
Builder for the GetMyDefaultAdministratorRights structure
Use this method to get a list of profile pictures for a user. Returns a
UserProfilePhotos object.
Builder for the GetUserProfilePhotos structure
Use this method to hide the ‘General’ topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. The topic will be automatically closed if it was open. Returns True on success.
Builder for the HideGeneralForumTopic structure
This object represents one button of an inline keyboard. You must use exactly one of the optional fields.
This object represents an incoming inline query. When the user sends an empty query, your bot could return some default or trending results.
Builder for the InlineQuery structure
This object contains basic information about an invoice.
Builder for the Invoice structure
fields web_app, request_contact, request_location, and request_poll are mutually exclusive.
Builder for the KeyboardButton structure
This object represents type of a poll, which is allowed to be created and sent when the corresponding button is pressed.
Builder for the KeyboardButtonPollType structure
This object represents a portion of the price for goods or services.
Builder for the LabeledPrice structure
Use this method for your bot to leave a group, supergroup or channel. Returns true on success.
Builder for the LeaveChat structure
This object represents a point on the map.
Builder for the Location structure
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:
Builder for the LoginUrl structure
This object describes the position on faces where a mask should be placed by default
Builder for the MaskPosition structure
This object represents a message.
This object represents a service message about a change in auto-delete timer settings.
Builder for the MessageAutoDeleteTimerChanged structure
Builder for the Message structure
This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc.
Builder for the MessageEntity structure
This object represents a unique message identifier.
Builder for the MessageId structure
This object represents information about an order.
Builder for the OrderInfo structure
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.
This object represents one size of a photo or a file / sticker thumbnail.
Builder for the PhotoSize structure
Use this method to add a message to the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns true on success.
Builder for the PinChatMessage structure
This object contains information about a poll.
This object represents an answer of a user in a non-anonymous poll.
Builder for the PollAnswer structure
Builder for the Poll structure
This object contains information about one answer option in a poll.
Builder for the PollOption structure
This object contains information about an incoming pre-checkout query.
Builder for the PreCheckoutQuery structure
Use this method to promote or demote a user in a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Pass False for all boolean parameters to demote a user. Returns true on success.
Builder for the PromoteChatMember structure
This object represents the content of a service message, sent whenever a user in the chat triggers a proximity alert set by another user.
Builder for the ProximityAlertTriggered structure
Use this method to reopen a closed topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success.
Builder for the ReopenForumTopic structure
Use this method to reopen a closed ‘General’ topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. The topic will be automatically unhidden if it was hidden. Returns True on success.
Builder for the ReopenGeneralForumTopic structure
This object represents a custom keyboard with reply options (see Introduction to bots for details and examples).
Builder for the ReplyKeyboardMarkup structure
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).
Builder for the ReplyKeyboardRemove structure
BotCommandScopeDefault
If a menu button other than MenuButtonDefault is set for a private chat, then it is applied in the chat. Otherwise the default menu button is applied. By default, the menu button opens the list of bot commands.
Describes why a request was unsuccessful.
Builder for the ResponseParameters structure
Use this method to restrict a user in a supergroup. The bot must be an administrator in the supergroup for this to work and must have the appropriate administrator rights. Pass true for all permissions to lift restrictions from a user. Returns true on success.
Builder for the RestrictChatMember structure
Use this method to revoke an invite link created by the bot. If the primary link is revoked, a new link is automatically generated. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the revoked invite link as
ChatInviteLink object.
Builder for the RevokeChatInviteLink structure
Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound). On success, the sent
Message is returned. Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future.
Builder for the SendAnimation structure
Use this method to send audio files, if you want Telegram clients to display them in the music player. Your audio must be in the .MP3 or .M4A format. On success, the sent
Message is returned. Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future.
For sending voice messages, use the send_invoice method instead.
Builder for the SendAudio structure
Use this method when you need to tell the user that something is happening on the bot's side. The status is set for 5 seconds or less (when a message arrives from your bot, Telegram clients clear its typing status). Returns
true on success.
Example: The ImageBot needs some time to process a request and upload the image. Instead of sending a text message along the lines of “Retrieving image, please wait…”, the bot may use send_chat_action with action = upload_photo. The user will see a “sending photo” status for the bot.
We only recommend using this method when a response from the bot will take a noticeable amount of time to arrive.
Builder for the SendChatAction structure
Use this method to send phone contacts. On success, the sent
Message is returned.
Builder for the SendContact structure
Use this method to send an animated emoji that will display a random value. On success, the sent
Message is returned.
Builder for the SendDice structure
Use this method to send general files. On success, the sent
Message is returned. Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future.
Builder for the SendDocument structure
Use this method to send a game. On success, the sent Message is returned.
Builder for the SendGame structure
Use this method to send invoices. On success, the sent Message is returned.
Builder for the SendInvoice structure
Use this method to send point on the map. On success, the sent
Message is returned.
Builder for the SendLocation structure
Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of
Message that were sent is returned.
Builder for the SendMediaGroup structure
Use this method to send text messages. On success, the sent
Message is returned.
Builder for the SendMessage structure
Use this method to send photos. On success, the sent
Message is returned.
Builder for the SendPhoto structure
Use this method to send a native poll. On success, the sent
Message is returned.
Builder for the SendPoll structure
Use this method to send information about a venue. On success, the sent
Message is returned.
Builder for the SendVenue structure
Use this method to send video files, Telegram clients support MPEG4 videos (other formats may be sent as
Document). On success, the sent
Message is returned. Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future.
Builder for the SendVideo structure
As of
v.4.0, Telegram clients support rounded square MPEG4 videos of up to 1 minute long. Use this method to send video messages. On success, the sent
Message is returned.
Builder for the SendVideoNote structure
Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .OGG file encoded with OPUS (other formats may be sent as
Audio or
Document). On success, the sent
Message is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future.
Builder for the SendVoice structure
Describes an inline message sent by a Web App on behalf of a user.
Builder for the SentWebAppMessage structure
Use this method to set a custom title for an administrator in a supergroup promoted by the bot. Returns true on success.
Builder for the SetChatAdministratorCustomTitle structure
Use this method to change the description of a group, a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns true on success.
Builder for the SetChatDescription structure
Use this method to change the bot's menu button in a private chat, or the default menu button. Returns true on success.
Builder for the SetChatMenuButton structure
Use this method to set default chat permissions for all members. The bot must be an administrator in the group or a supergroup for this to work and must have the can_restrict_members administrator rights. Returns true on success.
Builder for the SetChatPermissions structure
Use this method to set a new profile photo for the chat. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns true on success.
Builder for the SetChatPhoto structure
Use this method to set a new group sticker set for a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Use the field
can_set_sticker_set optionally returned in
get_chat requests to check if the bot can use this method. Returns
true on success.
Builder for the SetChatStickerSet structure
Use this method to change the title of a chat. Titles can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns true on success.
Builder for the SetChatTitle structure
Use this method to set the score of the specified user in a game message. On success, if the message is not an inline message, the Message is returned, otherwise True is returned. Returns an error, if the new score is not greater than the user’s current score in the chat and force is False.
Builder for the SetGameScore structure
Use this method to change the list of the bot’s commands. See this manual for more details about bot commands. Returns true on success
Builder for the SetMyCommands structure
Use this method to change the default administrator rights requested by the bot when it's added as an administrator to groups or channels. These rights will be suggested to users, but they are are free to modify the list before adding the bot. Returns true on success.
Builder for the SetMyDefaultAdministratorRights structure
Informs a user that some of the Telegram Passport elements they provided contains errors. The user will not be able to re-submit their Passport to you until the errors are fixed (the contents of the field for which you returned the error must change). Returns True on success.
Builder for the SetPasswordDataErrors structure
This object represents a shipping address.
Builder for the ShippingAddress structure
This object represents one shipping option.
Builder for the ShippingOption structure
This object contains information about an incoming shipping query.
Builder for the ShippingQuery structure
This object represents a sticker
Builder for the Sticker structure
This object represents a sticker set
Builder for the StickerSet structure
Use this method to stop updating a live location message before
live_period expires. On success, if the message is not an inline message, the edited
Message is returned, otherwise
true is returned.
Builder for the StopMessageLiveLocation structure
This object contains basic information about a successful payment.
Builder for the SuccessfulPayment structure
Use this method to unban a previously banned user in a supergroup or channel. The user will not return to the group or channel automatically, but will be able to join via link, etc. The bot must be an administrator for this to work. By default, this method guarantees that after the call the user is not a member of the chat, but will be able to join it. So if the user is a member of the chat they will also be removed from the chat. If you don't want this, use the parameter only_if_banned. Returns true on success.
Builder for the UnbanChatMember structure
Use this method to unban a previously banned channel chat in a supergroup or channel. The bot must be an administrator for this to work and must have the appropriate administrator rights. Returns true on success.
Builder for the UnbanChatSenderChat structure
Use this method to unhide the ‘General’ topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. Returns True on success.
Builder for the UnhideGeneralForumTopic structure
Use this method to clear the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns true on success.
Builder for the UnpinAllChatMessages structure
Use this method to clear the list of pinned messages in a forum topic. The bot must be an administrator in the chat for this to work and must have the can_pin_messages administrator right in the supergroup. Returns True on success.
Builder for the UnpinAllForumTopicMessages structure
Use this method to remove a message from the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns true on success.
Builder for the UnpinChatMessage structure
This object represents a Telegram user or bot
Builder for the User structure
This object represent a user’s profile pictures.
Builder for the UserProfilePhotos structure
This object represents a venue.
Builder for the Venue structure
This object represents a video file.
Builder for the Video structure
This object represents a service message about a video chat ended in the chat.
Builder for the VideoChatEnded structure
This object represents a service message about new members invited to a video chat.
Builder for the VideoChatParticipantsInvited structure
This object represents a service message about a video chat scheduled in the chat.
Builder for the VideoChatScheduled structure
This object represents a service message about a video chat started in the chat. Currently holds no information.
Builder for the VideoChatStarted structure
This object represents a video message (available in Telegram apps as of v.4.0).
Builder for the VideoNote structure
This object represents a voice note.
Builder for the Voice structure
Describes data sent from a Web App to the bot.
Builder for the WebAppData structure
Builder for the WebAppInfo structure
This object represents a service message about a user allowing a bot added to the attachment menu to write messages. Currently holds no information
Builder for the WriteAccessAllowed structure