Telegram.Bot Provides data for MakingApiRequest event Bot API Request HTTP Request Message Provides data for ApiResponseReceived event HTTP response received from API Event arguments of this request Initialize an object HTTP response received from API Event arguments of this request Represents an API error Gets the error code. Contains information about why a request was unsuccessful. Initializes a new instance of the class. The message that describes the error. Initializes a new instance of the class. The message. The error code. Initializes a new instance of the class. The error message that explains the reason for the exception. The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. Initializes a new instance of the class. The message. The error code. The inner exception. Initializes a new instance of the class The message The error code Response parameters Initializes a new instance of the class The message The error code Response parameters The inner exception Represents failed API response Gets the error message. Gets the error code. Contains information about why a request was unsuccessful. Initializes an instance of Error code Error message Information about why a request was unsuccessful Default implementation of that always returns Parses unsuccessful responses from Telegram Bot API to make specific exceptions Parses HTTP response and constructs a specific exception out of it ApiResponse with an error Represents a request error of the received response Initializes a new instance of the class. The message that describes the error. Initializes a new instance of the class. The error message that explains the reason for the exception. The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. Initializes a new instance of the class. The error message that explains the reason for the exception. of the received response Initializes a new instance of the class. The error message that explains the reason for the exception. of the received response The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. Extension Methods Deserialize body from HttpContent into instance Type of the resulting object Thrown when body in the response can not be deserialized into Deserialized JSON in Stream into with content Type of the resulting object Deserialized instance of or null A client interface to use the Telegram Bot API Unique identifier for the bot from bot token. For example, for the bot token "1234567:4TT8bAc8GHUspu3ERYn-KGcvsvGB9u_n4ddy", the bot id is "1234567". Token format is not public API so this property is optional and may stop working in the future if Telegram changes it's token format. Timeout for requests Instance of to parse errors from Bot API into This property is not thread safe Occurs before sending a request to API Occurs after receiving the response to an API request Send a request to Bot API Type of expected result in the response object API request object Result of the API request Test the API token true if token is valid Use this method to download a file. Get by calling Path to file on server Destination stream to write file to A cancellation token that can be used by other objects or threads to receive notice of cancellation. filePath is null, empty or too short is null Processes s and errors. See for a simple implementation Handles an The instance of the bot receiving the The to handle The which will notify that method execution should be cancelled Handles an The instance of the bot receiving the The to handle The which will notify that method execution should be cancelled Requests new s and processes them using provided instance Starts receiving s invoking for each . This method will block if awaited. The used for processing s The with which you can stop receiving A that will be completed when cancellation will be requested through Options to configure getUpdates requests Identifier of the first update to be returned. Will be ignored if is set to true. Indicates which s are allowed to be received. In case of null the previous setting will be used Limits the number of updates to be retrieved. Values between 1-100 are accepted. Defaults to 100 when is set to null. Thrown when the value doesn't satisfies constraints Indicates if all pending s should be thrown out before start polling. If set to true should be set to not null, otherwise will effectively be set to receive all s. A very simple implementation Constructs a new with the specified callback functions The function to invoke when an update is received The function to invoke when an error occurs A simple > implementation that requests new updates and handles them sequentially Constructs a new with the specified > instance and optional The used for making GetUpdates calls Options used to configure getUpdates requests Will attempt to throw the last update using offset set to -1. Update ID of the last increased by 1 if there were any List of special entities that appear in the caption, which can be specified instead of List of special entities that appear in message text, which can be specified instead of Mode for parsing entities in the new caption. See formatting options for more details. Identifier of the inline message An inline keyboard Additional interface options. An inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user. Sends the message silently. Users will receive a notification with no sound. If the message is a reply, ID of the original message Pass true, if the message should be sent even if the specified replied-to message is not found Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. 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> Protects the contents of sent messages from forwarding and saving Represents a request having parameter Unique identifier for the target chat or username of the target channel (in the format @channelusername) Represents a request to Bot API HTTP method of request API method name Allows this object to be used as a response in webhooks Generate content of HTTP message Content of HTTP request Represents a request to Bot API Type of result expected in result Represents a request having parameter User identifier 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. Unique identifier for the query to be answered Text of the notification. If not specified, nothing will be shown to the user, 0-200 characters If true, an alert will be shown by the client instead of a notification at the top of the chat screen. Defaults to false URL that will be opened by the user's client. If you have created a Game and accepted the conditions via @Botfather, specify the URL that opens your game — note that this will only work if the query comes from a callback_game button. Otherwise, you may use links like t.me/your_bot? start = XXXX that open your bot with a parameter The maximum amount of time in seconds that the result of the callback query may be cached client-side. Telegram apps will support caching starting in version 3.14. Defaults to 0 Initializes a new request with callbackQueryId Unique identifier for the query to be answered 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. An object, describing scope of users for which the commands are relevant. Defaults to . A two-letter ISO 639-1 language code. If empty, commands will be applied to all users from the given Scope, for whose language there are no dedicated commands Initializes a new request Use this method to get the current list of the bot’s commands for the given scope and user language. Returns Array of on success. If commands aren't set, an empty list is returned. An object, describing scope of users. Defaults to . A two-letter ISO 639-1 language code or an empty string Initializes a new request Use this method to change the list of the bot’s commands. See for more details about bot commands. Returns true on success A list of bot commands to be set as the list of the bot’s commands. At most 100 commands can be specified. An object, describing scope of users for which the commands are relevant. Defaults to . A two-letter ISO 639-1 language code. If empty, commands will be applied to all users from the given , for whose language there are no dedicated commands Initializes a new request with commands A list of bot commands to be set Use this method to get basic info about a file and prepare it for downloading. For the moment, bots can download files of up to 20MB in size. On success, a 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 again. You can use or methods to download the file File identifier to get info about Initializes a new request with File identifier to get info about Use this method to get a list of profile pictures for a user. Returns a object. Sequential number of the first photo to be returned. By default, all photos are returned Limits the number of photos to be retrieved. Values between 1-100 are accepted. Defaults to 100 Initializes a new request with userId Unique identifier of the target user Use this method to get the current value of the bot’s menu button in a private chat, or the default menu button. Returns on success. Optional. Unique identifier for the target private chat. If not specified, default bot’s menu button will be changed Initializes a new request A simple method for testing your bot’s auth token. Requires no parameters. Returns basic information about the bot in form of a object. Initializes a new request Use this method to get the current default administrator rights of the bot. Returns on success. Pass true to get default administrator rights of the bot in channels. Otherwise, default administrator rights of the bot for groups and supergroups will be returned. Use this method to close the bot instance before moving it from one local server to another. You need to delete the webhook before calling this method to ensure that the bot isn't launched again after server restart. The method will return error 429 in the first 10 minutes after the bot is launched. Returns True on success. Requires no parameters. Initializes a new request Use this method to log out from the cloud Bot API server before launching the bot locally. You must log out the bot before running it locally, otherwise there is no guarantee that the bot will receive updates. After a successful call, you can immediately log in on a local server, but will not be able to log in back to the cloud Bot API server for 10 minutes. Returns true on success. Requires no parameters. Initializes a new request 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 admin rights. Returns true on success. Date when the user will be unbanned. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever. Applied for supergroups and channels only. Pass True to delete all messages from the chat for the user that is being removed. If false, the user will be able to see messages in the group that were sent before the user was removed. Always True for supergroups and channels. Initializes a new request with chatId and userId Unique identifier for the target chat or username of the target channel (in the format @channelusername) Unique identifier of the target user Use this request to ban a channel chat in a supergroup or a channel. The owner of the chat will not be able to send messages and join live streams on behalf of the chat, unless it is unbanned first. The bot must be an administrator in the supergroup or channel for this to work and must have the appropriate administrator rights. Returns true on success Unique identifier of the target sender chat Date when the sender chat will be unbanned, unix time. If the chat is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever. Initializes a new request with chatId and senderChatId Unique identifier for the target chat or username of the target channel (in the format @channelusername) Unique identifier of the target sender chat Use this request to approve a chat join request. The bot must be an administrator in the chat for this to work and must have the administrator right. Returns true on success. Unique identifier of the target user Initializes a new request with chatId and userId Unique identifier for the target chat or username of the target channel (in the format @channelusername) Unique identifier of the target user Use this method to 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 admin rights. The link can be revoked using the method . Returns the new invite link as object. Invite link name; 0-32 characters Point in time when the link will expire Maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999 Set to true, if users joining the chat via the link need to be approved by chat administrators. If true, can't be specified Initializes a new request with chatId Unique identifier for the target chat or username of the target channel (in the format @channelusername) Use this request to decline a chat join request. The bot must be an administrator in the chat for this to work and must have the administrator right. Returns true on success. Unique identifier of the target user Initializes a new request with chatId and userId Unique identifier for the target chat or username of the target channel (in the format @channelusername) Unique identifier of the target user Use this method to 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 admin rights. Returns the edited invite link as a object. The invite link to edit Invite link name; 0-32 characters Point in time when the link will expire Maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999 Set to true, if users joining the chat via the link need to be approved by chat administrators. If true, can't be specified Initializes a new request with chatId and inviteLink Unique identifier for the target chat or username of the target channel (in the format @channelusername) The invite link to edit 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 admin rights. Returns the new invite link as string on success. Initializes a new request with chatId Unique identifier for the target chat or username of the target channel (in the format @channelusername) 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 admin rights. Returns the revoked invite link as object. The invite link to revoke Initializes a new request with chatId and inviteLink Unique identifier for the target chat or username of the target channel (in the format @channelusername) The invite link to revoke 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 admin rights. Returns true on success. Initializes a new request with chatId Unique identifier for the target chat or username of the target channel (in the format @channelusername) 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 admin rights. Use the field optionally returned in requests to check if the bot can use this method. Returns true on success. Initializes a new request with chatId Unique identifier for the target chat or username of the target channel (in the format @channelusername) Use this method to get a list of administrators in a chat. On success, returns an Array of objects that contains information about all chat administrators except other bots. If the chat is a group or a supergroup and no administrators were appointed, only the creator will be returned. Initializes a new request with chatId Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername) Use this method to get the number of members in a chat. Returns int on success. Initializes a new request with chatId Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername) Use this method to get information about a member of a chat. Returns a object on success. Initializes a new request with chatId and userId Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername) Unique identifier of the target user Use this method to get the number of members in a chat. Returns int on success. Initializes a new request with chatId Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername) 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 object on success. Initializes a new request with chatId Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername) 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 admin rights. Returns true on success. Date when the user will be unbanned. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever. Applied for supergroups and channels only. Pass True to delete all messages from the chat for the user that is being removed. If false, the user will be able to see messages in the group that were sent before the user was removed. Always True for supergroups and channels. Initializes a new request with chatId and userId Unique identifier for the target chat or username of the target channel (in the format @channelusername) Unique identifier of the target user Use this method for your bot to leave a group, supergroup or channel. Returns true on success. Initializes a new request with chatId Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername) 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 '' admin right in a supergroup or '' admin right in a channel. Returns true on success. Identifier of a message to pin Initializes a new request with chatId and messageId Unique identifier for the target chat or username of the target channel (in the format @channelusername) Identifier of a message to pin 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 admin rights. Pass false for all boolean parameters to demote a user. Returns true on success. Pass True, if the administrator's presence in the chat is hidden Pass True, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege Pass True, if the administrator can create channel posts, channels only Pass True, if the administrator can edit messages of other users and can pin messages, channels only Pass True, if the administrator can delete messages of other users Pass True, if the administrator can manage voice chats Pass True, if the administrator can manage video chats Pass True, if the administrator can restrict, ban or unban chat members Pass True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by him) Pass True, if the administrator can change chat title, photo and other settings Pass True, if the administrator can invite new users to the chat Pass True, if the administrator can pin messages, supergroups only Initializes a new request with chatId and userId Unique identifier for the target chat or username of the target channel (in the format @channelusername) Unique identifier of the target user Use this method to restrict a user in a supergroup. The bot must be an administrator in the supergroup for this to work and must have the appropriate admin rights. Pass true for all permissions to lift restrictions from a user. Returns true on success. New user permissions Date when restrictions will be lifted for the user, unix time. If user is restricted for more than 366 days or less than 30 seconds from the current time, they are considered to be restricted forever. Initializes a new request with chatId, userId and new user permissions Unique identifier for the target chat or username of the target channel (in the format @channelusername) Unique identifier of the target user New user permissions Use this method to set a custom title for an administrator in a supergroup promoted by the bot. Returns true on success. New custom title for the administrator; 0-16 characters, emoji are not allowed Initializes a new request with chatId, userId and customTitle Unique identifier for the target chat or username of the target channel (in the format @channelusername) Unique identifier of the target user New custom title for the administrator; 0-16 characters, emoji are not allowed 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 admin rights. Returns true on success. New chat Description, 0-255 characters Initializes a new request with chatId Unique identifier for the target chat or username of the target channel (in the format @channelusername) 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 admin rights. Returns true on success. New default chat permissions Initializes a new request with chatId and new default permissions Unique identifier for the target chat or username of the target channel (in the format @channelusername) New default chat permissions 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 admin rights. Returns true on success. New chat photo, uploaded using multipart/form-data Initializes a new request with chatId and photo Unique identifier for the target chat or username of the target channel (in the format @channelusername) New chat photo, uploaded using multipart/form-data 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 admin rights. Use the field optionally returned in requests to check if the bot can use this method. Returns true on success. Name of the sticker set to be set as the group sticker set Initializes a new request with chatId and new stickerSetName Unique identifier for the target chat or username of the target channel (in the format @channelusername) Name of the sticker set to be set as the group sticker set 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 admin rights. Returns true on success. New chat title, 1-255 characters Initializes a new request with chatId and title Unique identifier for the target chat or username of the target channel (in the format @channelusername) New chat title, 1-255 characters 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 . Returns true on success. Do nothing if the user is not banned Initializes a new request with chatId and userId Unique identifier for the target chat or username of the target channel (in the format @channelusername) Unique identifier of the target user Use this request 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 Unique identifier of the target sender chat Initializes a new request with chatId and senderChatId Unique identifier for the target chat or username of the target channel (in the format @channelusername) Unique identifier of the target sender chat Use this method to 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 '' admin right in a supergroup or '' admin right in a channel. Returns true on success. Initializes a new request with chatId Unique identifier for the target chat or username of the target channel (in the format @channelusername) 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 '' admin right in a supergroup or '' admin right in a channel. Returns true on success. Identifier of a message to unpin. If not specified, the most recent pinned message (by sending date) will be unpinned. Initializes a new request with chatId Unique identifier for the target chat or username of the target channel (in the format @channelusername) Use this method to copy messages of any kind. Service messages and invoice messages can't be copied. The method is analogous to the method , but the copied message doesn't have a link to the original message. Returns the of the sent on success. Unique identifier for the target chat or username of the target channel (in the format @channelusername) Unique identifier for the chat where the original message was sent (or channel username in the format @channelusername) Message identifier in the chat specified in New caption for media, 0-1024 characters after entities parsing. If not specified, the original caption is kept Initializes a new request with chatId, fromChatId and messageId Unique identifier for the target chat or username of the target channel (in the format @channelusername) Unique identifier for the chat where the original message was sent (or channel username in the format @channelusername) Message identifier in the chat specified in Use this method to forward messages of any kind. Service messages can't be forwarded. On success, the sent is returned. Unique identifier for the target chat or username of the target channel (in the format @channelusername) Unique identifier for the chat where the original message was sent (or channel username in the format @channelusername) Message identifier in the chat specified in Initializes a new request with chatId, fromChatId and messageId Unique identifier for the target chat or username of the target channel (in the format @channelusername) Unique identifier for the chat where the original message was sent (or channel username in the format @channelusername) Message identifier in the chat specified in Use this method to edit live location messages. A location can be edited until its expires or editing is explicitly disabled by a call to . On success True is returned. Latitude of new location Longitude of new location The radius of uncertainty for the location, measured in meters; 0-1500 Direction in which the user is moving, in degrees. Must be between 1 and 360 if specified. Maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified. Initializes a new request with inlineMessageId, latitude and longitude Identifier of the inline message Latitude of new location Longitude of new location Use this method to edit live location messages. A location can be edited until its expires or editing is explicitly disabled by a call to . On success the edited is returned. Identifier of the message to edit Latitude of new location Longitude of new location The radius of uncertainty for the location, measured in meters; 0-1500 Direction in which the user is moving, in degrees. Must be between 1 and 360 if specified. Maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified. Initializes a new request with chatId, messageId, latitude and longitude Unique identifier for the target chat or username of the target channel (in the format @channelusername) Identifier of the message to edit Latitude of new location Longitude of new location Use this method to send point on the map. On success, the sent is returned. Latitude of the location Longitude of the location Period in seconds for which the location will be updated, should be between 60 and 86400 For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified. For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified. Sends the message silently. Users will receive a notification with no sound. If the message is a reply, ID of the original message Pass true, if the message should be sent even if the specified replied-to message is not found Initializes a new request with chatId, latitude and longitude Unique identifier for the target chat or username of the target channel (in the format @channelusername) Latitude of the location Longitude of the location Use this method to send information about a venue. On success, the sent is returned. Latitude of the venue Longitude of the venue Name of the venue Address of the venue Foursquare identifier of the venue Foursquare type of the venue, if known. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.) Google Places identifier of the venue Google Places type of the venue. (See supported types.) Initializes a new request with chatId, location, venue title and address Unique identifier for the target chat or username of the target channel (in the format @channelusername) Latitude of the venue Longitude of the venue Name of the venue Address of the venue Use this method to stop updating a live location message before expires. On success True is returned. Initializes a new request with inlineMessageId Identifier of the inline message Use this method to stop updating a live location message before expires. On success the sent is returned. Identifier of the sent message Initializes a new request with chatId and messageId Unique identifier for the target chat or username of the target channel (in the format @channelusername) Identifier of the sent message Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound). On success, the sent is returned. Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future. Animation to send. Pass a as String to send an animation that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an animation from the Internet, or upload a new animation using multipart/form-data Duration of sent animation in seconds Animation width Animation height Animation caption (may also be used when resending animation by ), 0-1024 characters after entities parsing Initializes a new request with chatId and animation Unique identifier for the target chat or username of the target channel (in the format @channelusername) Animation to send. Pass a as String to send an animation that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an animation from the Internet, or upload a new animation using multipart/form-data 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 is returned. Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future. Audio file to send. Pass a as String to send an audio file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an audio file from the Internet, or upload a new one using multipart/form-data Audio caption, 0-1024 characters after entities parsing Duration of the audio in seconds Performer Track name Initializes a new request with chatId and audio Unique identifier for the target chat or username of the target channel (in the format @channelusername) Audio file to send. Pass a as String to send an audio file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an audio file from the Internet, or upload a new one using multipart/form-data Use this request 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 with = . 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. Type of action to broadcast. Choose one, depending on what the user is about to receive: for text messages, for photos, or for videos, or for voice notes, for general files, for location data, or for video notes Initializes a new request chatId and action Unique identifier for the target chat or username of the target channel (in the format @channelusername) Type of action to broadcast. Choose one, depending on what the user is about to receive Use this method to send phone contacts. On success, the sent is returned. Contact's phone number Contact's first name Contact's last name Additional data about the contact in the form of a vCard, 0-2048 bytes Initializes a new request with chatId, phoneNumber and firstName Unique identifier for the target chat or username of the target channel (in the format @channelusername) Contact's phone number Contact's first name Use this method to send an animated emoji that will display a random value. On success, the sent is returned. Emoji on which the dice throw animation is based. Defaults to Initializes a new request with chatId Unique identifier for the target chat or username of the target channel (in the format @channelusername) Use this method to send general files. On success, the sent 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. File to send. Pass a as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data Document caption (may also be used when resending documents by file_id), 0-1024 characters after entities parsing Disables automatic server-side content type detection for files uploaded using multipart/form-data Initializes a new request with chatId and document Unique identifier for the target chat or username of the target channel (in the format @channelusername) File to send. Pass a as string to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data 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 s that were sent is returned. An array describing messages to be sent, must include 2-10 items Initializes a request with chatId and media Unique identifier for the target chat or username of the target channel (in the format @channelusername) An array describing messages to be sent, must include 2-10 items Use this method to send text messages. On success, the sent is returned. Text of the message to be sent, 1-4096 characters after entities parsing Disables link previews for links in this message Initializes a new request with chatId and text Unique identifier for the target chat or username of the target channel (in the format @channelusername) Text of the message to be sent, 1-4096 characters after entities parsing Use this method to send photos. On success, the sent is returned. Photo to send. Pass a as String to send a photo that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a photo from the Internet, or upload a new photo using multipart/form-data. The photo must be at most 10 MB in size. The photo's width and height must not exceed 10000 in total. Width and height ratio must be at most 20 Photo caption (may also be used when resending photos by ), 0-1024 characters after entities parsing Initializes a new request with chatId and photo Unique identifier for the target chat or username of the target channel (in the format @channelusername) Photo to send. Pass a as String to send a photo that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a photo from the Internet, or upload a new photo using multipart/form-data. The photo must be at most 10 MB in size. The photo's width and height must not exceed 10000 in total. Width and height ratio must be at most 20 Use this method to send a native poll. On success, the sent is returned. Poll question, 1-300 characters A list of answer options, 2-10 strings 1-100 characters each True, if the poll needs to be anonymous, defaults to True Poll type, defaults to True, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to False 0-based identifier of the correct answer option, required for polls in quiz mode Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters with at most 2 line feeds after entities parsing Mode for parsing entities in the explanation. See formatting options for more details. List of special entities that appear in the poll explanation, which can be specified instead of Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with . Point in time when the poll will be automatically closed. Must be at least 5 and no more than 600 seconds in the future. Can't be used together with . Pass True, if the poll needs to be immediately closed. This can be useful for poll preview. Initializes a new request with chatId, question and Unique identifier for the target chat or username of the target channel (in the format @channelusername) Poll question, 1-300 characters A list of answer options, 2-10 strings 1-100 characters each As of v.4.0, Telegram clients support rounded square mp4 videos of up to 1 minute long. Use this method to send video messages. On success, the sent is returned. Video note to send. Pass a as String to send a video note that exists on the Telegram servers (recommended) or upload a new video using multipart/form-data. Sending video notes by a URL is currently unsupported Duration of sent video in seconds Video width and height, i.e. diameter of the video message Initializes a new request with chatId and videoNote Unique identifier for the target chat or username of the target channel (in the format @channelusername) Video note to send. Pass a as String to send a video note that exists on the Telegram servers (recommended) or upload a new video using multipart/form-data. Sending video notes by a URL is currently unsupported Use this method to send video files, Telegram clients support mp4 videos (other formats may be sent as ). On success, the sent is returned. Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future. Video to send. Pass a as String to send a video that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a video from the Internet, or upload a new video using multipart/form-data Duration of sent video in seconds Video width Video height Video caption (may also be used when resending videos by file_id), 0-1024 characters after entities parsing Pass True, if the uploaded video is suitable for streaming Initializes a new request with chatId and video Unique identifier for the target chat or username of the target channel (in the format @channelusername) Video to send. Pass a as String to send a video that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a video from the Internet, or upload a new video using multipart/form-data 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 or ). On success, the sent is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future. Audio file to send. Pass a as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data Voice message caption, 0-1024 characters after entities parsing Duration of the voice message in seconds Initializes a new request with chatId and voice Unique identifier for the target chat or username of the target channel (in the format @channelusername) Audio file to send. Pass a as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data Use this method to change the bot’s menu button in a private chat, or the default menu button. Returns true on success. Optional. Unique identifier for the target private chat. If not specified, default bot’s menu button will be changed Optional. An object for the new bot’s menu button. Defaults to Initializes a new request 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. Optional. An object describing new default administrator rights. If not specified, the default administrator rights will be cleared. Optional. Pass true to change the default administrator rights of the bot in channels. Otherwise, the default administrator rights of the bot for groups and supergroups will be changed. Represents an API request with a file Type of result expected in result Initializes an instance of request Bot API method Initializes an instance of request Bot API method HTTP method to use Generate multipart form data content Generate multipart form data content 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. On success, returns an Array of objects. This method will currently return scores for the target user, plus two of their closest neighbors on each side. Will also return the top three users if the user and his neighbors are not among them. Please note that this behavior is subject to change. Unique identifier for the target chat Identifier of the sent message Initializes a new request with userId, chatId and messageId Target user id Unique identifier for the target chat Identifier of the sent message 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. On success, returns an Array of objects. This method will currently return scores for the target user, plus two of their closest neighbors on each side. Will also return the top three users if the user and his neighbors are not among them. Please note that this behavior is subject to change. Initializes a new request with userId and inlineMessageId User identifier Identifier of the inline message Use this method to send a game. On success, the sent is returned. Unique identifier for the target chat Short name of the game, serves as the unique identifier for the game. Set up your games via @Botfather Initializes a new request with chatId and gameShortName Unique identifier for the target chat Short name of the game, serves as the unique identifier for the game. Set up your games via @Botfather Use this method to set the score of the specified user in a game. On success returns the edited . Returns an error, if the new score is not greater than the user's current score in the chat and is false. New score, must be non-negative Pass True, if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters. Pass true, if the game message should not be automatically edited to include the current scoreboard Unique identifier for the target chat Identifier of the sent message Initializes a new request User identifier New score, must be non-negative Unique identifier for the target chat Identifier of the sent message Use this method to set the score of the specified user in a game. On success returns true. Returns an error, if the new score is not greater than the user's current score in the chat and is false. New score, must be non-negative Pass True, if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters. Pass True, if the game message should not be automatically edited to include the current scoreboard Initializes a new request with userId, inlineMessageId and new score User identifier New score, must be non-negative Identifier of the inline message Use this method to remove webhook integration if you decide to switch back to . Returns true on success. Pass True to drop all pending updates Initializes a new request Use this method to receive incoming updates using long polling (wiki). An Array of objects is returned. This method will not work if an outgoing webhook is set up. In order to avoid getting duplicate updates, recalculate after each server response. Identifier of the first update to be returned. Must be greater by one than the highest among the identifiers of previously received updates. By default, updates starting with the earliest unconfirmed update are returned. An update is considered confirmed as soon as is called with an higher than its . The negative offset can be specified to retrieve updates starting from -offset update from the end of the updates queue. All previous updates will forgotten. Limits the number of updates to be retrieved. Values between 1-100 are accepted. Defaults to 100 Timeout in seconds for long polling. Defaults to 0, i.e. usual short polling. Should be positive, short polling should be used for testing purposes only. A list of the update types you want your bot to receive. For example, specify [, , ] to only receive updates of these types. See for a complete list of available update types. Specify an empty list to receive all update types except (default). If not specified, the previous setting will be used. Please note that this parameter doesn't affect updates created before the call to the getUpdates, so unwanted updates may be received for a short period of time. Initializes a new GetUpdates request Use this method to get current webhook status. Requires no parameters. On success, returns a object. If the bot is using , will return an object with the field empty. Initializes a new request Use this method to specify a url and receive incoming updates via an outgoing webhook. Whenever there is an update for the bot, we will send an HTTPS POST request to the specified url, containing a JSON-serialized . In case of an unsuccessful request, we will give up after a reasonable amount of attempts. Returns true on success. If you'd like to make sure that the Webhook request comes from Telegram, we recommend using a secret path in the URL, e.g. https://www.example.com/<token>. Since nobody else knows your bot’s token, you can be pretty sure it's us. You will not be able to receive updates using for as long as an outgoing webhook is set up. To use a self-signed certificate, you need to upload your public key certificate using parameter. Please upload as , sending a String will not work. Ports currently supported for Webhooks: 443, 80, 88, 8443 If you're having any trouble setting up webhooks, please check out this amazing guide to Webhooks. HTTPS url to send updates to. Use an empty string to remove webhook integration Upload your public key certificate so that the root certificate in use can be checked. See our self-signed guide for details The fixed IP address which will be used to send webhook requests instead of the IP address resolved through DNS Maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery, 1-100. Defaults to 40. Use lower values to limit the load on your bot’s server, and higher values to increase your bot’s throughput A list of the update types you want your bot to receive. For example, specify [, , ] to only receive updates of these types. See for a complete list of available update types. Specify an empty list to receive all update types except (default). If not specified, the previous setting will be used Please note that this parameter doesn't affect updates created before the call to the , so unwanted updates may be received for a short period of time. Pass true to drop all pending updates Initializes a new request with uri HTTPS url to send updates to. Use an empty string to remove webhook integration Use this method to send answers to an inline query. On success, true is returned. No more than 50 results per query are allowed. Unique identifier for the answered query An array of results for the inline query The maximum amount of time in seconds that the result of the inline query may be cached on the server. Defaults to 300 Pass true, if results may be cached on the server side only for the user that sent the query. By default, results may be returned to any user who sends the same query Pass the offset that a client should send in the next query with the same text to receive more results. Pass an empty string if there are no more results or if you don't support pagination. Offset length can't exceed 64 bytes If passed, clients will display a button with specified text that switches the user to a private chat with the bot and sends the bot a start message with the parameter Deep-linking parameter for the /start message sent to the bot when user presses the switch button. 1-64 characters, only A-Z, a-z, 0-9, _ and - are allowed. An inline bot that sends YouTube videos can ask the user to connect the bot to their YouTube account to adapt search results accordingly. To do this, it displays a 'Connect your YouTube account' button above the results, or even before showing any. The user presses the button, switches to a private chat with the bot and, in doing so, passes a start parameter that instructs the bot to return an oauth link. Once done, the bot can offer a button so that the user can easily return to the chat where they wanted to use the bot’s inline capabilities. Initializes a new request with inlineQueryId and an array of Unique identifier for the answered query An array of results for the inline query 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 object is returned. Unique identifier for the query to be answered An object describing the message to be sent Initializes a new request with and a Unique identifier for the query to be answered An object describing the message to be sent Represents a request that doesn't require any parameters Initializes an instance of Name of request method Initializes an instance of Name of request method HTTP request method Once the user has confirmed their payment and shipping details, the Bot API sends the final confirmation in the form of an with the field . Use this method to respond to such pre-checkout queries. On success, true is returned. The Bot API must receive an answer within 10 seconds after the pre-checkout query was sent. Unique identifier for the query to be answered Specify True if everything is alright (goods are available, etc.) and the bot is ready to proceed with the order. Use False if there are any problems. Required if is False. Error message in human readable form that explains the reason for failure to proceed with the checkout (e.g. "Sorry, somebody just bought the last of our amazing black T-shirts while you were busy filling out your payment details. Please choose a different color or garment!"). Telegram will display this message to the user. Initializes a new successful answerPreCheckoutQuery request Unique identifier for the query to be answered Initializes a new failing answerPreCheckoutQuery request with error message Unique identifier for the query to be answered Required if is true. Error message in human readable form that explains the reason for failure to proceed with the checkout (e.g. "Sorry, somebody just bought the last of our amazing black T-shirts while you were busy filling out your payment details. Please choose a different color or garment!"). Telegram will display this message to the user. If you sent an invoice requesting a shipping address and the parameter was specified, the Bot API will send an with a field to the bot. Use this method to reply to shipping queries. On success, true is returned. Unique identifier for the query to be answered Specify true if delivery to the specified address is possible and false if there are any problems (for example, if delivery to the specified address is not possible) Required if is True. An array of available shipping options. Required if is False. Error message in human readable form that explains why it is impossible to complete the order (e.g. "Sorry, delivery to your desired address is unavailable'). Telegram will display this message to the user. Initializes a new failing answerShippingQuery request with error message Unique identifier for the query to be answered Error message in human readable form Initializes a new successful answerShippingQuery request with shipping options Unique identifier for the query to be answered A JSON-serialized array of available shipping options Use this method to send invoices. On success, the sent is returned. Unique identifier for the target chat or username of the target channel (in the format @channelusername) Product name, 1-32 characters Product description, 1-255 characters Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes Payments provider token, obtained via @Botfather Three-letter ISO 4217 currency code, see more on currencies Price breakdown, a list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.) The maximum accepted amount for tips in the smallest units of the currency. For example, for a maximum tip of US$ 1.45 pass = 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). Defaults to 0 An array of suggested amounts of tips in the smallest units of the currency. At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed Unique deep-linking parameter. If left empty, forwarded copies of the sent message will have a Pay button, allowing multiple users to pay directly from the forwarded message, using the same invoice. If non-empty, forwarded copies of the sent message will have a URL button with a deep link to the bot (instead of a Pay button), with the value used as the start parameter A JSON-serialized data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider. URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service. People like it better when they see what they are paying for. Photo size Photo width Photo height Pass True, if you require the user's full name to complete the order Pass True, if you require the user's phone number to complete the order Pass True, if you require the user's email to complete the order Pass True, if you require the user's shipping address to complete the order Pass True, if user's phone number should be sent to provider Pass True, if user's email address should be sent to provider Pass True, if the final price depends on the shipping method Initializes a new request with chatId, title, description, payload, providerToken, currency and an array of Unique identifier for the target chat or username of the target channel (in the format @channelusername) Product name, 1-32 characters Product description, 1-255 characters Bot-defined invoice payload, 1-128 bytes Payments provider token, obtained via @Botfather Three-letter ISO 4217 currency code, see more on currencies Price breakdown, a list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.) Represents an API request Type of result expected in result Initializes an instance of request Bot API method Initializes an instance of request Bot API method HTTP method to use Generate content of HTTP message Content of HTTP request If is set to is set to the method name, otherwise it won't be serialized Use this request to add a new animated sticker to a set created by the bot. Static sticker sets can have up to 120 stickers. Returns true on success. WEBM video with the sticker, uploaded using multipart/form-data. for technical requirements WEBM video with the sticker, uploaded using multipart/form-data. for technical requirements Use this request to add a new static sticker to a set created by the bot. Static sticker sets can have up to 120 stickers. Returns true on success. PNG image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. Pass a as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data PNG image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. Pass a as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data Use this request to add a new sticker to a set created by the bot. Static sticker sets can have up to 120 stickers. Returns true on success. Sticker set name One or more emoji corresponding to the sticker An object for position where the mask should be placed on faces User identifier Sticker set name One or more emoji corresponding to the sticker Use this request to add a new video sticker to a set created by the bot. Static sticker sets can have up to 120 stickers. Returns true on success. WEBM video with the sticker, uploaded using multipart/form-data. for technical requirements WEBM video with the sticker, uploaded using multipart/form-data. for technical requirements Use this method to create a new animated sticker set owned by a user. The bot will be able to edit the sticker set thus created. Returns true on success. TGS animation with the sticker, uploaded using multipart/form-data. See for technical requirements TGS animation with the sticker, uploaded using multipart/form-data. See for technical requirements Use this method to create a new static sticker set owned by a user. The bot will be able to edit the sticker set thus created. Returns true on success. PNG image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. Pass a as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data PNG image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. Pass a as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data Short name of sticker set, to be used in t.me/addstickers/ URLs (e.g., animals). Can contain only english letters, digits and underscores. Must begin with a letter, can't contain consecutive underscores and must end in "_by_<bot username>". <bot_username> is case insensitive. 1-64 characters Sticker set title, 1-64 characters One or more emoji corresponding to the sticker Pass True, if a set of mask stickers should be created An object for position where the mask should be placed on faces Initializes a new request with userId, name and emojis User identifier of sticker set owner Short name of sticker set, to be used in t.me/addstickers/ URLs (e.g., animals). Can contain only english letters, digits and underscores. Must begin with a letter, can't contain consecutive underscores and must end in "_by_<bot username>". <bot_username> is case insensitive. 1-64 characters Sticker set title, 1-64 characters One or more emoji corresponding to the sticker Use this method to create a new video sticker set owned by a user. The bot will be able to edit the sticker set thus created. Returns true on success. WEBM animation with the sticker, uploaded using multipart/form-data. See for technical requirements WEBM animation with the sticker, uploaded using multipart/form-data. See for technical requirements Use this method to delete a sticker from a set created by the bot. Returns true on success. File identifier of the sticker Initializes a new request with sticker File identifier of the sticker Use this method to get a sticker set. On success, a object is returned. Name of the sticker set Initializes a new request with name Name of the sticker set Use this method to send static .WEBP or animated .TGS stickers. On success, the sent is returned. Sticker to send. Pass a as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP file from the Internet, or upload a new one using multipart/form-data Initializes a new request chatId and sticker Unique identifier for the target chat or username of the target channel (in the format @channelusername) Sticker to send. Pass a as string to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a string for Telegram to get a .WEBP file from the Internet, or upload a new one using multipart/form-data Use this method to move a sticker in a set created by the bot to a specific position. Returns true on success. File identifier of the sticker New sticker position in the set, zero-based Initializes a new request with sticker and position File identifier of the sticker New sticker position in the set, zero-based Use this method to set the thumbnail of a sticker set. Animated thumbnails can be set for animated sticker sets only. Returns true on success. Sticker set name A PNG image with the thumbnail, must be up to 128 kilobytes in size and have width and height exactly 100px, or a TGS animation with the thumbnail up to 32 kilobytes in size; see for animated sticker technical requirements. Pass a as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. Animated sticker set thumbnail can't be uploaded via HTTP URL Initializes a new request with sticker and position Sticker set name User identifier of the sticker set owner Use this method to upload a .PNG file with a sticker for later use in / and / methods (can be used multiple times). Returns the uploaded on success. PNG image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px Initializes a new request with userId and pngSticker User identifier of sticker file owner PNG image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px Use this method to delete a message, including service messages, with the following limitations: A message can only be deleted if it was sent less than 48 hours ago A dice message in a private chat can only be deleted if it was sent more than 24 hours ago Bots can delete outgoing messages in private chats, groups, and supergroups Bots can delete incoming messages in private chats Bots granted can_post_messages permissions can delete outgoing messages in channels If the bot is an administrator of a group, it can delete any message there If the bot has can_delete_messages permission in a supergroup or a channel, it can delete any message there Returns true on success. Identifier of the message to delete Initializes a new request with chatId and messageId Unique identifier for the target chat or username of the target channel (in the format @channelusername) Identifier of the message to delete Use this method to edit captions of messages. On success true is returned. New caption of the message, 0-1024 characters after entities parsing Initializes a new request with inlineMessageId and new caption Identifier of the inline message Use this method to edit animation, audio, document, photo, or video messages. If a message is part of a message album, then it can be edited only to an audio for audio albums, only to a document for document albums and to a photo or a video otherwise. Use a previously uploaded file via its or specify a URL. On success true is returned. A new media content of the message Initializes a new request with inlineMessageId and new media Identifier of the inline message A new media content of the message Use this method to edit only the reply markup of messages. On success true is returned. Initializes a new request with inlineMessageId and new inline keyboard Identifier of the inline message Use this method to edit text and game messages. On success true is returned. New text of the message, 1-4096 characters after entities parsing Disables link previews for links in this message Initializes a new request with inlineMessageId and new text Identifier of the inline message New text of the message, 1-4096 characters after entities parsing Use this method to edit captions of messages. On success the edited is returned. Identifier of the message to edit New caption of the message, 0-1024 characters after entities parsing Initializes a new request with chatId and messageIdn Unique identifier for the target chat or username of the target channel (in the format @channelusername) Identifier of the message to edit Use this method to edit animation, audio, document, photo, or video messages. If a message is part of a message album, then it can be edited only to an audio for audio albums, only to a document for document albums and to a photo or a video otherwise. Use a previously uploaded file via its or specify a URL. On success the edited is returned. Identifier of the message to edit A new media content of the message Initializes a new request with chatId, messageId and new media Unique identifier for the target chat or username of the target channel (in the format @channelusername) Identifier of the message to edit A new media content of the message Use this method to edit only the reply markup of messages. On success the edited is returned. Identifier of the message to edit Initializes a new request with chatId and messageId Unique identifier for the target chat or username of the target channel (in the format @channelusername) Identifier of the message to edit Use this method to edit text and game messages. On success the edited is returned. Identifier of the message to edit New text of the message, 1-4096 characters after entities parsing Disables link previews for links in this message Initializes a new request with chatId, messageId and text Unique identifier for the target chat or username of the target channel (in the format @channelusername) Identifier of the message to edit New text of the message, 1-4096 characters after entities parsing Use this method to stop a poll which was sent by the bot. On success, the stopped with the final results is returned. Identifier of the original message with the poll Initializes a new request with chatId, messageId Unique identifier for the target chat or username of the target channel (in the format @channelusername) Identifier of the original message with the poll A client to use the Telegram Bot API Timeout for requests Occurs before sending a request to API Occurs after receiving the response to an API request Create a new instance. Configuration for A custom Thrown if is null Create a new instance. A custom Thrown if format is invalid Test the API token true if token is valid Extension methods that map to requests from Bot API documentation Provides extension methods for that allow for polling Use this method to receive incoming updates using long polling (wiki) An instance of Identifier of the first update to be returned. Must be greater by one than the highest among the identifiers of previously received updates. By default, updates starting with the earliest unconfirmed update are returned. An update is considered confirmed as soon as is called with an higher than its . The negative offset can be specified to retrieve updates starting from -offset update from the end of the updates queue. All previous updates will forgotten. Limits the number of updates to be retrieved. Values between 1-100 are accepted. Defaults to 100 Timeout in seconds for long polling. Defaults to 0, i.e. usual short polling. Should be positive, short polling should be used for testing purposes only. A list of the update types you want your bot to receive. For example, specify [, , ] to only receive updates of these types. See for a complete list of available update types. Specify an empty list to receive all update types except (default). If not specified, the previous setting will be used. A cancellation token that can be used by other objects or threads to receive notice of cancellation This method will not work if an outgoing webhook is set up In order to avoid getting duplicate updates, recalculate after each server response An Array of objects is returned. Use this method to specify a url and receive incoming updates via an outgoing webhook. Whenever there is an update for the bot, we will send an HTTPS POST request to the specified url, containing a JSON-serialized . In case of an unsuccessful request, we will give up after a reasonable amount of attempts If you'd like to make sure that the Webhook request comes from Telegram, we recommend using a secret path in the URL, e.g. https://www.example.com/<token>. Since nobody else knows your bot’s token, you can be pretty sure it's us. An instance of HTTPS url to send updates to. Use an empty string to remove webhook integration Upload your public key certificate so that the root certificate in use can be checked. See our self-signed guide for details The fixed IP address which will be used to send webhook requests instead of the IP address resolved through DNS Maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery, 1-100. Defaults to 40. Use lower values to limit the load on your bot’s server, and higher values to increase your bot’s throughput A list of the update types you want your bot to receive. For example, specify [, , ] to only receive updates of these types. See for a complete list of available update types. Specify an empty list to receive all update types except (default). If not specified, the previous setting will be used Please note that this parameter doesn't affect updates created before the call to the , so unwanted updates may be received for a short period of time. Pass true to drop all pending updates A cancellation token that can be used by other objects or threads to receive notice of cancellation You will not be able to receive updates using for as long as an outgoing webhook is set up To use a self-signed certificate, you need to upload your public key certificate using parameter. Please upload as , sending a string will not work Ports currently supported for Webhooks: 443, 80, 88, 8443 If you're having any trouble setting up webhooks, please check out this amazing guide to Webhooks. Use this method to remove webhook integration if you decide to switch back to An instance of Pass true to drop all pending updates A cancellation token that can be used by other objects or threads to receive notice of cancellation Returns true on success Use this method to get current webhook status. An instance of A cancellation token that can be used by other objects or threads to receive notice of cancellation On success, returns a object. If the bot is using , will return an object with the field empty. A simple method for testing your bot’s auth token. An instance of A cancellation token that can be used by other objects or threads to receive notice of cancellation Returns basic information about the bot in form of a object. Use this method to log out from the cloud Bot API server before launching the bot locally. You must log out the bot before running it locally, otherwise there is no guarantee that the bot will receive updates. After a successful call, you can immediately log in on a local server, but will not be able to log in back to the cloud Bot API server for 10 minutes. An instance of A cancellation token that can be used by other objects or threads to receive notice of cancellation Use this method to close the bot instance before moving it from one local server to another. You need to delete the webhook before calling this method to ensure that the bot isn't launched again after server restart. The method will return error 429 in the first 10 minutes after the bot is launched. An instance of A cancellation token that can be used by other objects or threads to receive notice of cancellation Use this method to send text messages. An instance of Unique identifier for the target chat or username of the target channel (in the format @channelusername) Text of the message to be sent, 1-4096 characters after entities parsing Mode for parsing entities in the new caption. See formatting options for more details List of special entities that appear in message text, which can be specified instead of Disables link previews for links in this message Sends the message silently. Users will receive a notification with no sound Protects the contents of sent messages from forwarding and saving If the message is a reply, ID of the original message Pass true, if the message should be sent even if the specified replied-to message is not found Additional interface options. An inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user A cancellation token that can be used by other objects or threads to receive notice of cancellation On success, the sent is returned. Use this method to forward messages of any kind. Service messages can't be forwarded. An instance of Unique identifier for the target chat or username of the target channel (in the format @channelusername) Unique identifier for the chat where the original message was sent (or channel username in the format @channelusername) Message identifier in the chat specified in Sends the message silently. Users will receive a notification with no sound Protects the contents of sent messages from forwarding and saving A cancellation token that can be used by other objects or threads to receive notice of cancellation On success, the sent is returned. Use this method to copy messages of any kind. Service messages and invoice messages can't be copied. The method is analogous to the method , but the copied message doesn't have a link to the original message. An instance of Unique identifier for the target chat or username of the target channel (in the format @channelusername) Unique identifier for the chat where the original message was sent (or channel username in the format @channelusername) Message identifier in the chat specified in New caption for media, 0-1024 characters after entities parsing. If not specified, the original caption is kept Mode for parsing entities in the new caption. See formatting options for more details List of special entities that appear in the caption, which can be specified instead of Sends the message silently. Users will receive a notification with no sound Protects the contents of sent messages from forwarding and saving If the message is a reply, ID of the original message Pass true, if the message should be sent even if the specified replied-to message is not found Additional interface options. An inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user A cancellation token that can be used by other objects or threads to receive notice of cancellation Returns the of the sent message on success. Use this method to send photos. An instance of Unique identifier for the target chat or username of the target channel (in the format @channelusername) Photo to send. Pass a as String to send a photo that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a photo from the Internet, or upload a new photo using multipart/form-data. The photo must be at most 10 MB in size. The photo's width and height must not exceed 10000 in total. Width and height ratio must be at most 20 Photo caption (may also be used when resending photos by ), 0-1024 characters after entities parsing Mode for parsing entities in the new caption. See formatting options for more details List of special entities that appear in the caption, which can be specified instead of Sends the message silently. Users will receive a notification with no sound Protects the contents of sent messages from forwarding and saving If the message is a reply, ID of the original message Pass true, if the message should be sent even if the specified replied-to message is not found Additional interface options. An inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user A cancellation token that can be used by other objects or threads to receive notice of cancellation On success, the sent is returned. 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. Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future. An instance of Unique identifier for the target chat or username of the target channel (in the format @channelusername) Audio file to send. Pass a as String to send an audio file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an audio file from the Internet, or upload a new one using multipart/form-data Audio caption, 0-1024 characters after entities parsing Mode for parsing entities in the new caption. See formatting options for more details List of special entities that appear in the caption, which can be specified instead of Duration of the audio in seconds Performer Track name Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. 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> Sends the message silently. Users will receive a notification with no sound Protects the contents of sent messages from forwarding and saving If the message is a reply, ID of the original message Pass true, if the message should be sent even if the specified replied-to message is not found Additional interface options. An inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user A cancellation token that can be used by other objects or threads to receive notice of cancellation On success, the sent is returned. Use this method to send general files. Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future. An instance of Unique identifier for the target chat or username of the target channel (in the format @channelusername) File to send. Pass a as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. 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> Document caption (may also be used when resending documents by file_id), 0-1024 characters after entities parsing Mode for parsing entities in the new caption. See formatting options for more details List of special entities that appear in the caption, which can be specified instead of Disables automatic server-side content type detection for files uploaded using multipart/form-data Sends the message silently. Users will receive a notification with no sound Protects the contents of sent messages from forwarding and saving If the message is a reply, ID of the original message Pass true, if the message should be sent even if the specified replied-to message is not found Additional interface options. An inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user A cancellation token that can be used by other objects or threads to receive notice of cancellation On success, the sent is returned. Use this method to send video files, Telegram clients support mp4 videos (other formats may be sent as ). Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future. An instance of Unique identifier for the target chat or username of the target channel (in the format @channelusername) Video to send. Pass a as String to send a video that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a video from the Internet, or upload a new video using multipart/form-data Duration of sent video in seconds Video width Video height Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. 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> Video caption (may also be used when resending videos by file_id), 0-1024 characters after entities parsing Mode for parsing entities in the new caption. See formatting options for more details List of special entities that appear in the caption, which can be specified instead of Pass true, if the uploaded video is suitable for streaming Sends the message silently. Users will receive a notification with no sound Protects the contents of sent messages from forwarding and saving If the message is a reply, ID of the original message Pass true, if the message should be sent even if the specified replied-to message is not found Additional interface options. An inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user A cancellation token that can be used by other objects or threads to receive notice of cancellation On success, the sent is returned. Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound). Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future. An instance of Unique identifier for the target chat or username of the target channel (in the format @channelusername) Animation to send. Pass a as String to send an animation that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an animation from the Internet, or upload a new animation using multipart/form-data Duration of sent animation in seconds Animation width Animation height Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. 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> Animation caption (may also be used when resending animation by ), 0-1024 characters after entities parsing Mode for parsing entities in the new caption. See formatting options for more details List of special entities that appear in the caption, which can be specified instead of Sends the message silently. Users will receive a notification with no sound Protects the contents of sent messages from forwarding and saving If the message is a reply, ID of the original message Pass true, if the message should be sent even if the specified replied-to message is not found Additional interface options. An inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user A cancellation token that can be used by other objects or threads to receive notice of cancellation On success, the sent is returned. 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 or ). Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future. An instance of Unique identifier for the target chat or username of the target channel (in the format @channelusername) Audio file to send. Pass a as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data Voice message caption, 0-1024 characters after entities parsing Mode for parsing entities in the new caption. See formatting options for more details List of special entities that appear in the caption, which can be specified instead of Duration of the voice message in seconds Sends the message silently. Users will receive a notification with no sound Protects the contents of sent messages from forwarding and saving If the message is a reply, ID of the original message Pass true, if the message should be sent even if the specified replied-to message is not found Additional interface options. An inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user A cancellation token that can be used by other objects or threads to receive notice of cancellation On success, the sent is returned. As of v.4.0, Telegram clients support rounded square mp4 videos of up to 1 minute long. Use this method to send video messages. An instance of Unique identifier for the target chat or username of the target channel (in the format @channelusername) Video note to send. Pass a as String to send a video note that exists on the Telegram servers (recommended) or upload a new video using multipart/form-data. Sending video notes by a URL is currently unsupported Duration of sent video in seconds Video width and height, i.e. diameter of the video message Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. 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> Sends the message silently. Users will receive a notification with no sound Protects the contents of sent messages from forwarding and saving If the message is a reply, ID of the original message Pass true, if the message should be sent even if the specified replied-to message is not found Additional interface options. An inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user A cancellation token that can be used by other objects or threads to receive notice of cancellation On success, the sent is returned. 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. An instance of Unique identifier for the target chat or username of the target channel (in the format @channelusername) An array describing messages to be sent, must include 2-10 items Sends the message silently. Users will receive a notification with no sound Protects the contents of sent messages from forwarding and saving If the message is a reply, ID of the original message Pass true, if the message should be sent even if the specified replied-to message is not found A cancellation token that can be used by other objects or threads to receive notice of cancellation On success, an array of s that were sent is returned. Use this method to send point on the map. An instance of Unique identifier for the target chat or username of the target channel (in the format @channelusername) Latitude of location Longitude of location Period in seconds for which the location will be updated, should be between 60 and 86400 For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified Sends the message silently. Users will receive a notification with no sound Protects the contents of sent messages from forwarding and saving If the message is a reply, ID of the original message Pass true, if the message should be sent even if the specified replied-to message is not found Additional interface options. An inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user A cancellation token that can be used by other objects or threads to receive notice of cancellation On success, the sent is returned. Use this method to edit live location messages. A location can be edited until its expires or editing is explicitly disabled by a call to . An instance of Unique identifier for the target chat or username of the target channel (in the format @channelusername) Identifier of the message to edit Latitude of new location Longitude of new location The radius of uncertainty for the location, measured in meters; 0-1500 Direction in which the user is moving, in degrees. Must be between 1 and 360 if specified Maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified Additional interface options. An inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user A cancellation token that can be used by other objects or threads to receive notice of cancellation On success the edited is returned. Use this method to edit live location messages. A location can be edited until its expires or editing is explicitly disabled by a call to . An instance of Identifier of the inline message Latitude of new location Longitude of new location The radius of uncertainty for the location, measured in meters; 0-1500 Direction in which the user is moving, in degrees. Must be between 1 and 360 if specified Maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified Additional interface options. An inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user A cancellation token that can be used by other objects or threads to receive notice of cancellation Use this method to stop updating a live location message before expires. An instance of Unique identifier for the target chat or username of the target channel (in the format @channelusername) Identifier of the sent message Additional interface options. An inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user A cancellation token that can be used by other objects or threads to receive notice of cancellation On success the sent is returned. Use this method to stop updating a live location message before expires. An instance of Identifier of the inline message Additional interface options. An inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user A cancellation token that can be used by other objects or threads to receive notice of cancellation Use this method to send information about a venue. An instance of Unique identifier for the target chat or username of the target channel (in the format @channelusername) Latitude of the venue Longitude of the venue Name of the venue Address of the venue Foursquare identifier of the venue Foursquare type of the venue, if known. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.) Google Places identifier of the venue Google Places type of the venue. (See supported types) Sends the message silently. Users will receive a notification with no sound Protects the contents of sent messages from forwarding and saving If the message is a reply, ID of the original message Pass true, if the message should be sent even if the specified replied-to message is not found Additional interface options. An inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user A cancellation token that can be used by other objects or threads to receive notice of cancellation On success, the sent is returned. Use this method to send phone contacts. An instance of Unique identifier for the target chat or username of the target channel (in the format @channelusername) Contact's phone number Contact's first name Contact's last name Additional data about the contact in the form of a vCard, 0-2048 bytes Sends the message silently. Users will receive a notification with no sound Protects the contents of sent messages from forwarding and saving If the message is a reply, ID of the original message Pass true, if the message should be sent even if the specified replied-to message is not found Additional interface options. An inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user A cancellation token that can be used by other objects or threads to receive notice of cancellation On success, the sent is returned. Use this method to send a native poll. An instance of Unique identifier for the target chat or username of the target channel (in the format @channelusername) Poll question, 1-300 characters A list of answer options, 2-10 strings 1-100 characters each true, if the poll needs to be anonymous, defaults to true Poll type, or , defaults to true, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to false 0-based identifier of the correct answer option, required for polls in quiz mode Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters with at most 2 line feeds after entities parsing Mode for parsing entities in the explanation. See formatting options for more details List of special entities that appear in the poll explanation, which can be specified instead of Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with Point in time when the poll will be automatically closed. Must be at least 5 and no more than 600 seconds in the future. Can't be used together with Pass true, if the poll needs to be immediately closed. This can be useful for poll preview Sends the message silently. Users will receive a notification with no sound Protects the contents of sent messages from forwarding and saving If the message is a reply, ID of the original message Pass true, if the message should be sent even if the specified replied-to message is not found Additional interface options. An inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user A cancellation token that can be used by other objects or threads to receive notice of cancellation On success, the sent is returned. Use this method to send an animated emoji that will display a random value. An instance of Unique identifier for the target chat or username of the target channel (in the format @channelusername) Emoji on which the dice throw animation is based. Currently, must be one of , , , , or . Dice can have values 1-6 for , and , values 1-5 for and , and values 1-64 for . Defauts to Sends the message silently. Users will receive a notification with no sound Protects the contents of sent messages from forwarding and saving If the message is a reply, ID of the original message Pass true, if the message should be sent even if the specified replied-to message is not found Additional interface options. An inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user A cancellation token that can be used by other objects or threads to receive notice of cancellation On success, the sent is returned. 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). 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 with = . 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. An instance of Unique identifier for the target chat or username of the target channel (in the format @channelusername) Type of action to broadcast. Choose one, depending on what the user is about to receive: for text messages, for photos, or for videos, or for voice notes, for general files, for location data, or for video notes A cancellation token that can be used by other objects or threads to receive notice of cancellation Use this method to get a list of profile pictures for a user. An instance of Unique identifier of the target user Sequential number of the first photo to be returned. By default, all photos are returned Limits the number of photos to be retrieved. Values between 1-100 are accepted. Defaults to 100 A cancellation token that can be used by other objects or threads to receive notice of cancellation Returns a object Use this method to get basic info about a file and prepare it for downloading. For the moment, bots can download files of up to 20MB in size. 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 again. You can use or methods to download the file An instance of File identifier to get info about A cancellation token that can be used by other objects or threads to receive notice of cancellation On success, a object is returned. Use this method to get basic info about a file download it. For the moment, bots can download files of up to 20MB in size. An instance of File identifier to get info about Destination stream to write file to A cancellation token that can be used by other objects or threads to receive notice of cancellation On success, a object is returned. 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 admin rights. An instance of Unique identifier for the target chat or username of the target channel (in the format @channelusername) Unique identifier of the target user Date when the user will be unbanned. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever. Applied for supergroups and channels only Pass true to delete all messages from the chat for the user that is being removed. If false, the user will be able to see messages in the group that were sent before the user was removed. Always true for supergroups and channels A cancellation token that can be used by other objects or threads to receive notice of cancellation 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 admin rights. An instance of Unique identifier for the target group or username of the target supergroup or channel (in the format @channelusername) Unique identifier of the target user Date when the user will be unbanned. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever. Applied for supergroups and channels only Pass true to delete all messages from the chat for the user that is being removed. If false, the user will be able to see messages in the group that were sent before the user was removed. Always true for supergroups and channels A cancellation token that can be used by other objects or threads to receive notice of cancellation 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 An instance of Unique identifier for the target group or username of the target supergroup or channel (in the format @username) Unique identifier of the target user Do nothing if the user is not banned A cancellation token that can be used by other objects or threads to receive notice of cancellation 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 admin rights. Pass true for all permissions to lift restrictions from a user. An instance of Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) Unique identifier of the target user New user permissions Date when restrictions will be lifted for the user, unix time. If user is restricted for more than 366 days or less than 30 seconds from the current time, they are considered to be restricted forever. A cancellation token that can be used by other objects or threads to receive notice of cancellation 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 admin rights. Pass false for all boolean parameters to demote a user. An instance of Unique identifier for the target chat or username of the target channel (in the format @channelusername) Unique identifier of the target user Pass true, if the administrator's presence in the chat is hidden Pass true, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege Pass true, if the administrator can create channel posts, channels only Pass true, if the administrator can edit messages of other users, channels only Pass true, if the administrator can delete messages of other users Pass true, if the administrator can manage voice chats, supergroups only Pass true, if the administrator can restrict, ban or unban chat members Pass 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 him) Pass true, if the administrator can change chat title, photo and other settings Pass true, if the administrator can invite new users to the chat Pass true, if the administrator can pin messages, supergroups only A cancellation token that can be used by other objects or threads to receive notice of cancellation Use this method to set a custom title for an administrator in a supergroup promoted by the bot. An instance of Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) Unique identifier of the target user New custom title for the administrator; 0-16 characters, emoji are not allowed A cancellation token that can be used by other objects or threads to receive notice of cancellation Use this method to ban a channel chat in a supergroup or a channel. The owner of the chat will not be able to send messages and join live streams on behalf of the chat, unless it is unbanned first. The bot must be an administrator in the supergroup or channel for this to work and must have the appropriate administrator rights. Returns true on success. An instance of Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) Unique identifier of the target sender chat A cancellation token that can be used by other objects or threads to receive notice of cancellation 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. An instance of Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) Unique identifier of the target sender chat A cancellation token that can be used by other objects or threads to receive notice of cancellation 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 admin rights An instance of Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) New default chat permissions A cancellation token that can be used by other objects or threads to receive notice of cancellation 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 admin rights An instance of Unique identifier for the target chat or username of the target channel (in the format @channelusername) A cancellation token that can be used by other objects or threads to receive notice of cancellation 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 admin rights. The link can be revoked using the method An instance of Unique identifier for the target chat or username of the target channel (in the format @channelusername) Invite link name; 0-32 characters Point in time when the link will expire Maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999 Set to true, if users joining the chat via the link need to be approved by chat administrators. If true, can't be specified A cancellation token that can be used by other objects or threads to receive notice of cancellation Returns the new invite link as object. 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 admin rights An instance of Unique identifier for the target chat or username of the target channel (in the format @channelusername) The invite link to edit Invite link name; 0-32 characters Point in time when the link will expire Maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999 Set to true, if users joining the chat via the link need to be approved by chat administrators. If true, can't be specified A cancellation token that can be used by other objects or threads to receive notice of cancellation Returns the edited invite link as a object. 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 admin rights An instance of Unique identifier for the target chat or username of the target channel (in the format @channelusername) The invite link to revoke A cancellation token that can be used by other objects or threads to receive notice of cancellation Returns the revoked invite link as object. 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 administrator right. Returns true on success. An instance of Unique identifier for the target chat or username of the target channel (in the format @channelusername) Unique identifier of the target user A cancellation token that can be used by other objects or threads to receive notice of cancellation 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 administrator right. Returns true on success. An instance of Unique identifier for the target chat or username of the target channel (in the format @channelusername) Unique identifier of the target user A cancellation token that can be used by other objects or threads to receive notice of cancellation 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 admin rights An instance of Unique identifier for the target chat or username of the target channel (in the format @channelusername) New chat photo, uploaded using multipart/form-data A cancellation token that can be used by other objects or threads to receive notice of cancellation 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 admin rights An instance of Unique identifier for the target chat or username of the target channel (in the format @channelusername) A cancellation token that can be used by other objects or threads to receive notice of cancellation 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 admin rights An instance of Unique identifier for the target chat or username of the target channel (in the format @channelusername) New chat title, 1-255 characters A cancellation token that can be used by other objects or threads to receive notice of cancellation 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 admin rights An instance of Unique identifier for the target chat or username of the target channel (in the format @channelusername) New chat Description, 0-255 characters A cancellation token that can be used by other objects or threads to receive notice of cancellation 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 '' admin right in a supergroup or '' admin right in a channel An instance of Unique identifier for the target chat or username of the target channel (in the format @channelusername) Identifier of a message to pin Pass true, if it is not necessary to send a notification to all chat members about the new pinned message. Notifications are always disabled in channels and private chats A cancellation token that can be used by other objects or threads to receive notice of cancellation 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 '' admin right in a supergroup or '' admin right in a channel An instance of Unique identifier for the target chat or username of the target channel (in the format @channelusername) Identifier of a message to unpin. If not specified, the most recent pinned message (by sending date) will be unpinned A cancellation token that can be used by other objects or threads to receive notice of cancellation 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 '' admin right in a supergroup or '' admin right in a channel An instance of Unique identifier for the target chat or username of the target channel (in the format @channelusername) A cancellation token that can be used by other objects or threads to receive notice of cancellation Use this method for your bot to leave a group, supergroup or channel. An instance of Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername) A cancellation token that can be used by other objects or threads to receive notice of cancellation 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.) An instance of Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername) A cancellation token that can be used by other objects or threads to receive notice of cancellation Returns a object on success. Use this method to get a list of administrators in a chat. An instance of Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername) A cancellation token that can be used by other objects or threads to receive notice of cancellation On success, returns an Array of objects that contains information about all chat administrators except other bots. If the chat is a group or a supergroup and no administrators were appointed, only the creator will be returned Use this method to get the number of members in a chat. An instance of Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername) A cancellation token that can be used by other objects or threads to receive notice of cancellation Returns on success.. Use this method to get the number of members in a chat. An instance of Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername) A cancellation token that can be used by other objects or threads to receive notice of cancellation Returns on success.. Use this method to get information about a member of a chat. An instance of Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername) Unique identifier of the target user A cancellation token that can be used by other objects or threads to receive notice of cancellation Returns a object on success. 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 admin rights. Use the field optionally returned in requests to check if the bot can use this method. An instance of Unique identifier for the target chat or username of the target channel (in the format @channelusername) Name of the sticker set to be set as the group sticker set A cancellation token that can be used by other objects or threads to receive notice of cancellation 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 admin rights. Use the field optionally returned in requests to check if the bot can use this method An instance of Unique identifier for the target chat or username of the target channel (in the format @channelusername) A cancellation token that can be used by other objects or threads to receive notice of cancellation 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 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 An instance of Unique identifier for the query to be answered Text of the notification. If not specified, nothing will be shown to the user, 0-200 characters If true, an alert will be shown by the client instead of a notification at the top of the chat screen. Defaults to false URL that will be opened by the user's client. If you have created a Game and accepted the conditions via @Botfather, specify the URL that opens your game — note that this will only work if the query comes from a callback_game button Otherwise, you may use links like t.me/your_bot?start=XXXX that open your bot with a parameter The maximum amount of time in seconds that the result of the callback query may be cached client-side. Telegram apps will support caching starting in version 3.14 A cancellation token that can be used by other objects or threads to receive notice of cancellation 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 object is returned. An instance of Unique identifier for the query to be answered An object describing the message to be sent A cancellation token that can be used by other objects or threads to receive notice of cancellation Use this method to change the list of the bot’s commands. See for more details about bot commands An instance of A list of bot commands to be set as the list of the bot’s commands. At most 100 commands can be specified An object, describing scope of users for which the commands are relevant. Defaults to . A two-letter ISO 639-1 language code. If empty, commands will be applied to all users from the given , for whose language there are no dedicated commands A cancellation token that can be used by other objects or threads to receive notice of cancellation Use this method to delete the list of the bot’s commands for the given and user language. After deletion, higher level commands will be shown to affected users An instance of An object, describing scope of users for which the commands are relevant. Defaults to . A two-letter ISO 639-1 language code. If empty, commands will be applied to all users from the given , for whose language there are no dedicated commands A cancellation token that can be used by other objects or threads to receive notice of cancellation Use this method to get the current list of the bot’s commands for the given and user language An instance of An object, describing scope of users. Defaults to . A two-letter ISO 639-1 language code or an empty string A cancellation token that can be used by other objects or threads to receive notice of cancellation Returns Array of on success. If commands aren't set, an empty list is returned Use this method to change the bot’s menu button in a private chat, or the default menu button. An instance of Unique identifier for the target private chat. If not specified, default bot’s menu button will be changed An object for the new bot’s menu button. Defaults to A cancellation token that can be used by other objects or threads to receive notice of cancellation Use this method to get the current value of the bot’s menu button in a private chat, or the default menu button. An instance of Unique identifier for the target private chat. If not specified, default bot’s menu button will be returned A cancellation token that can be used by other objects or threads to receive notice of cancellation set for the given chat id or a default one 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 free to modify the list before adding the bot. An instance of An object describing new default administrator rights. If not specified, the default administrator rights will be cleared. Pass true to change the default administrator rights of the bot in channels. Otherwise, the default administrator rights of the bot for groups and supergroups will be changed. A cancellation token that can be used by other objects or threads to receive notice of cancellation Use this method to get the current default administrator rights of the bot. An instance of Pass true to change the default administrator rights of the bot in channels. Otherwise, the default administrator rights of the bot for groups and supergroups will be changed. A cancellation token that can be used by other objects or threads to receive notice of cancellation Default or channel Use this method to edit text and game messages. An instance of Unique identifier for the target chat or username of the target channel (in the format @channelusername) Identifier of the message to edit New text of the message, 1-4096 characters after entities parsing Mode for parsing entities in the new caption. See formatting options for more details List of special entities that appear in message text, which can be specified instead of Disables link previews for links in this message Additional interface options. An inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user A cancellation token that can be used by other objects or threads to receive notice of cancellation On success the edited is returned. Use this method to edit text and game messages. An instance of Identifier of the inline message New text of the message, 1-4096 characters after entities parsing Mode for parsing entities in the new caption. See formatting options for more details List of special entities that appear in message text, which can be specified instead of Disables link previews for links in this message Additional interface options. An inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user A cancellation token that can be used by other objects or threads to receive notice of cancellation Use this method to edit captions of messages. An instance of Unique identifier for the target chat or username of the target channel (in the format @channelusername) dentifier of the message to edit New caption of the message, 0-1024 characters after entities parsing Mode for parsing entities in the new caption. See formatting options for more details List of special entities that appear in the caption, which can be specified instead of Additional interface options. An inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user A cancellation token that can be used by other objects or threads to receive notice of cancellation On success the edited is returned. Use this method to edit captions of messages. An instance of Identifier of the inline message New caption of the message, 0-1024 characters after entities parsing Mode for parsing entities in the new caption. See formatting options for more details List of special entities that appear in the caption, which can be specified instead of Additional interface options. An inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user A cancellation token that can be used by other objects or threads to receive notice of cancellation Use this method to edit animation, audio, document, photo, or video messages. If a message is part of a message album, then it can be edited only to an audio for audio albums, only to a document for document albums and to a photo or a video otherwise. Use a previously uploaded file via its or specify a URL An instance of Unique identifier for the target chat or username of the target channel (in the format @channelusername) Identifier of the message to edit A new media content of the message Additional interface options. An inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user A cancellation token that can be used by other objects or threads to receive notice of cancellation On success the edited is returned. Use this method to edit animation, audio, document, photo, or video messages. If a message is part of a message album, then it can be edited only to an audio for audio albums, only to a document for document albums and to a photo or a video otherwise. Use a previously uploaded file via its or specify a URL An instance of Identifier of the inline message A new media content of the message Additional interface options. An inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user A cancellation token that can be used by other objects or threads to receive notice of cancellation Use this method to edit only the reply markup of messages. An instance of Unique identifier for the target chat or username of the target channel (in the format @channelusername) Identifier of the message to edit Additional interface options. An inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user A cancellation token that can be used by other objects or threads to receive notice of cancellation On success the edited is returned. Use this method to edit only the reply markup of messages. An instance of Identifier of the inline message Additional interface options. An inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user A cancellation token that can be used by other objects or threads to receive notice of cancellation Use this method to stop a poll which was sent by the bot. An instance of Unique identifier for the target chat or username of the target channel (in the format @channelusername) Identifier of the original message with the poll Additional interface options. An inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user A cancellation token that can be used by other objects or threads to receive notice of cancellation On success, the stopped with the final results is returned. Use this method to delete a message, including service messages, with the following limitations: A message can only be deleted if it was sent less than 48 hours ago A dice message in a private chat can only be deleted if it was sent more than 24 hours ago Bots can delete outgoing messages in private chats, groups, and supergroups Bots can delete incoming messages in private chats Bots granted can_post_messages permissions can delete outgoing messages in channels If the bot is an administrator of a group, it can delete any message there If the bot has can_delete_messages permission in a supergroup or a channel, it can delete any message there An instance of Unique identifier for the target chat or username of the target channel (in the format @channelusername) Identifier of the message to delete A cancellation token that can be used by other objects or threads to receive notice of cancellation Use this method to send static .WEBP or animated .TGS stickers. An instance of Unique identifier for the target chat or username of the target channel (in the format @channelusername) Sticker to send. Pass a as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP file from the Internet, or upload a new one using multipart/form-data Sends the message silently. Users will receive a notification with no sound Protects the contents of sent messages from forwarding and saving If the message is a reply, ID of the original message Pass true, if the message should be sent even if the specified replied-to message is not found Additional interface options. An inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user A cancellation token that can be used by other objects or threads to receive notice of cancellation On success, the sent is returned. Use this method to get a sticker set. An instance of Name of the sticker set A cancellation token that can be used by other objects or threads to receive notice of cancellation On success, a object is returned. Use this method to upload a .PNG file with a sticker for later use in , , , , and methods (can be used multiple times). An instance of User identifier of sticker file owner PNG image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px A cancellation token that can be used by other objects or threads to receive notice of cancellation Returns the uploaded on success. Use this method to create a new static sticker set owned by a user. The bot will be able to edit the sticker set thus created. An instance of User identifier of created sticker set owner Short name of sticker set, to be used in t.me/addstickers/ URLs (e.g., animals). Can contain only english letters, digits and underscores. Must begin with a letter, can't contain consecutive underscores and must end in "_by_<bot username>". <bot_username> is case insensitive. 1-64 characters Sticker set title, 1-64 characters PNG image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. Pass a as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data One or more emoji corresponding to the sticker Pass true, if a set of mask stickers should be created An object for position where the mask should be placed on faces A cancellation token that can be used by other objects or threads to receive notice of cancellation Use this method to create a new animated sticker set owned by a user. The bot will be able to edit the sticker set thus created. An instance of User identifier of created sticker set owner Short name of sticker set, to be used in t.me/addstickers/ URLs (e.g., animals). Can contain only english letters, digits and underscores. Must begin with a letter, can't contain consecutive underscores and must end in "_by_<bot username>". <bot_username> is case insensitive. 1-64 characters Sticker set title, 1-64 characters TGS animation with the sticker, uploaded using multipart/form-data. See for technical requirements One or more emoji corresponding to the sticker Pass true, if a set of mask stickers should be created An object for position where the mask should be placed on faces A cancellation token that can be used by other objects or threads to receive notice of cancellation Use this method to create a new animated sticker set owned by a user. The bot will be able to edit the sticker set thus created. An instance of User identifier of created sticker set owner Short name of sticker set, to be used in t.me/addstickers/ URLs (e.g., animals). Can contain only english letters, digits and underscores. Must begin with a letter, can't contain consecutive underscores and must end in "_by_<bot username>". <bot_username> is case insensitive. 1-64 characters Sticker set title, 1-64 characters WEBM video with the sticker, uploaded using multipart/form-data. See for technical requirements One or more emoji corresponding to the sticker Pass true, if a set of mask stickers should be created An object for position where the mask should be placed on faces A cancellation token that can be used by other objects or threads to receive notice of cancellation Use this method to add a new static sticker to a set created by the bot. Static sticker sets can have up to 120 stickers. An instance of User identifier of sticker set owner Sticker set name PNG image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. Pass a as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data One or more emoji corresponding to the sticker An object for position where the mask should be placed on faces A cancellation token that can be used by other objects or threads to receive notice of cancellation Use this method to add a new video sticker to a set created by the bot. Video stickers can be added to video sticker sets and only to them. Video sticker sets can have up to 50 stickers An instance of User identifier of sticker set owner Sticker set name TGS animation with the sticker, uploaded using multipart/form-data. See for technical requirements One or more emoji corresponding to the sticker An object for position where the mask should be placed on faces A cancellation token that can be used by other objects or threads to receive notice of cancellation Use this method to add a new animated sticker to a set created by the bot. Animated stickers can be added to animated sticker sets and only to them. Animated sticker sets can have up to 50 stickers An instance of User identifier of sticker set owner Sticker set name TGS animation with the sticker, uploaded using multipart/form-data. See for technical requirements One or more emoji corresponding to the sticker An object for position where the mask should be placed on faces A cancellation token that can be used by other objects or threads to receive notice of cancellation Use this method to move a sticker in a set created by the bot to a specific position. An instance of File identifier of the sticker New sticker position in the set, zero-based A cancellation token that can be used by other objects or threads to receive notice of cancellation Use this method to delete a sticker from a set created by the bot. An instance of File identifier of the sticker A cancellation token that can be used by other objects or threads to receive notice of cancellation Use this method to set the thumbnail of a sticker set. Animated thumbnails can be set for animated sticker sets only. An instance of Sticker set name User identifier of the sticker set owner A PNG image with the thumbnail, must be up to 128 kilobytes in size and have width and height exactly 100px, or a TGS animation with the thumbnail up to 32 kilobytes in size; see for animated sticker technical requirements. Pass a as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. Animated sticker set thumbnail can't be uploaded via HTTP URL A cancellation token that can be used by other objects or threads to receive notice of cancellation Use this method to send answers to an inline query. No more than 50 results per query are allowed. An instance of Unique identifier for the answered query An array of results for the inline query The maximum amount of time in seconds that the result of the inline query may be cached on the server. Defaults to 300 Pass true, if results may be cached on the server side only for the user that sent the query. By default, results may be returned to any user who sends the same query Pass the offset that a client should send in the next query with the same text to receive more results. Pass an empty string if there are no more results or if you don't support pagination. Offset length can't exceed 64 bytes If passed, clients will display a button with specified text that switches the user to a private chat with the bot and sends the bot a start message with the parameter Deep-linking parameter for the /start message sent to the bot when user presses the switch button. 1-64 characters, only A-Z, a-z, 0-9, _ and - are allowed Example: An inline bot that sends YouTube videos can ask the user to connect the bot to their YouTube account to adapt search results accordingly. To do this, it displays a 'Connect your YouTube account' button above the results, or even before showing any. The user presses the button, switches to a private chat with the bot and, in doing so, passes a start parameter that instructs the bot to return an oauth link. Once done, the bot can offer a button so that the user can easily return to the chat where they wanted to use the bot’s inline capabilities A cancellation token that can be used by other objects or threads to receive notice of cancellation Use this method to send invoices. An instance of Unique identifier for the target chat or username of the target channel (in the format @channelusername) Product name, 1-32 characters Product description, 1-255 characters Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes Payments provider token, obtained via @Botfather Three-letter ISO 4217 currency code, see more on currencies Price breakdown, a list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.) The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass = 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). Defaults to 0 An array of suggested amounts of tips in the smallest units of the currency (integer, not float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed Unique deep-linking parameter. If left empty, forwarded copies of the sent message will have a Pay button, allowing multiple users to pay directly from the forwarded message, using the same invoice. If non-empty, forwarded copies of the sent message will have a URL button with a deep link to the bot (instead of a Pay button), with the value used as the start parameter A JSON-serialized data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provide URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service. People like it better when they see what they are paying for Photo size Photo width Photo height Pass true, if you require the user's full name to complete the order Pass true, if you require the user's phone number to complete the order Pass true, if you require the user's email to complete the order Pass true, if you require the user's shipping address to complete the order Pass true, if user's phone number should be sent to provider Pass true, if user's email address should be sent to provider Pass true, if the final price depends on the shipping method Sends the message silently. Users will receive a notification with no sound Protects the contents of sent messages from forwarding and saving If the message is a reply, ID of the original message Pass true, if the message should be sent even if the specified replied-to message is not found Additional interface options. An inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user A cancellation token that can be used by other objects or threads to receive notice of cancellation On success, the sent is returned. If you sent an invoice requesting a shipping address and the parameter isFlexible" was specified, the Bot API will send an with a field to the bot. Use this method to reply to shipping queries An instance of Unique identifier for the query to be answered Required if ok is true. An array of available shipping options A cancellation token that can be used by other objects or threads to receive notice of cancellation If you sent an invoice requesting a shipping address and the parameter isFlexible" was specified, the Bot API will send an with a field to the bot. Use this method to indicate failed shipping query An instance of Unique identifier for the query to be answered Required if is false. Error message in human readable form that explains why it is impossible to complete the order (e.g. "Sorry, delivery to your desired address is unavailable'). Telegram will display this message to the user A cancellation token that can be used by other objects or threads to receive notice of cancellation Once the user has confirmed their payment and shipping details, the Bot API sends the final confirmation in the form of an with the field . Use this method to respond to such pre-checkout queries. Note: The Bot API must receive an answer within 10 seconds after the pre-checkout query was sent. An instance of Unique identifier for the query to be answered A cancellation token that can be used by other objects or threads to receive notice of cancellation Once the user has confirmed their payment and shipping details, the Bot API sends the final confirmation in the form of an with the field . Use this method to respond to indicate failed pre-checkout query An instance of Unique identifier for the query to be answered Required if is false. Error message in human readable form that explains the reason for failure to proceed with the checkout (e.g. "Sorry, somebody just bought the last of our amazing black T-shirts while you were busy filling out your payment details. Please choose a different color or garment!"). Telegram will display this message to the user A cancellation token that can be used by other objects or threads to receive notice of cancellation Use this method to send a game. An instance of Unique identifier for the target chat Short name of the game, serves as the unique identifier for the game. Set up your games via @Botfather Sends the message silently. Users will receive a notification with no sound Protects the contents of sent messages from forwarding and saving If the message is a reply, ID of the original message Pass true, if the message should be sent even if the specified replied-to message is not found Additional interface options. An inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user A cancellation token that can be used by other objects or threads to receive notice of cancellation On success, the sent is returned. Use this method to set the score of the specified user in a game. An instance of User identifier New score, must be non-negative Unique identifier for the target chat Identifier of the sent message Pass true, if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters Pass true, if the game message should not be automatically edited to include the current scoreboard A cancellation token that can be used by other objects or threads to receive notice of cancellation On success returns the edited . Returns an error, if the new score is not greater than the user's current score in the chat and is false Use this method to set the score of the specified user in a game. An instance of User identifier New score, must be non-negative Identifier of the inline message. Pass true, if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters Pass true, if the game message should not be automatically edited to include the current scoreboard A cancellation token that can be used by other objects or threads to receive notice of cancellation Returns an error, if the new score is not greater than the user's current score in the chat and is false 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. This method will currently return scores for the target user, plus two of their closest neighbors on each side. Will also return the top three users if the user and his neighbors are not among them. Please note that this behavior is subject to change. An instance of Target user id Unique identifier for the target chat Identifier of the sent message A cancellation token that can be used by other objects or threads to receive notice of cancellation On success, returns an Array of objects. 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. This method will currently return scores for the target user, plus two of their closest neighbors on each side. Will also return the top three users if the user and his neighbors are not among them. Please note that this behavior is subject to change. An instance of User identifier Identifier of the inline message A cancellation token that can be used by other objects or threads to receive notice of cancellation On success, returns an Array of objects. Starts receiving s on the ThreadPool, invoking for each. This method does not block. GetUpdates will be called AFTER the returns The used for processing s The used for making GetUpdates calls Options used to configure getUpdates request The with which you can stop receiving Starts receiving s on the ThreadPool, invoking for each. This method does not block. GetUpdates will be called AFTER the returns The used for making GetUpdates calls Delegate used for processing s Delegate used for processing polling errors Options used to configure getUpdates request The with which you can stop receiving Starts receiving s on the ThreadPool, invoking for each. This method does not block. GetUpdates will be called AFTER the returns The used for making GetUpdates calls Delegate used for processing s Delegate used for processing polling errors Options used to configure getUpdates request The with which you can stop receiving Starts receiving s on the ThreadPool, invoking for each. This method does not block. GetUpdates will be called AFTER the returns The used for making GetUpdates calls The used for processing s Options used to configure getUpdates request The with which you can stop receiving Starts receiving s on the ThreadPool, invoking for each. This method will block if awaited. GetUpdates will be called AFTER the returns The used for processing s The used for making GetUpdates calls Options used to configure getUpdates request The with which you can stop receiving A that will be completed when cancellation will be requested through Starts receiving s on the ThreadPool, invoking for each. This method will block if awaited. GetUpdates will be called AFTER the returns The used for making GetUpdates calls Delegate used for processing s Delegate used for processing polling errors Options used to configure getUpdates requests The with which you can stop receiving A that will be completed when cancellation will be requested through Starts receiving s on the ThreadPool, invoking for each. This method will block if awaited. GetUpdates will be called AFTER the returns The used for making GetUpdates calls Delegate used for processing s Delegate used for processing polling errors Options used to configure getUpdates requests The with which you can stop receiving A that will be completed when cancellation will be requested through Starts receiving s on the ThreadPool, invoking for each. This method will block if awaited. GetUpdates will be called AFTER the returns The used for making GetUpdates calls The used for processing s Options used to configure getUpdates requests The with which you can stop receiving A that will be completed when cancellation will be requested through This class is used to provide configuration for API token Used to change base url to your private bot api server URL. It looks like http://localhost:8081. Path, query and fragment will be omitted if present. Indicates that test environment will be used Unique identifier for the bot from bot token. For example, for the bot token "1234567:4TT8bAc8GHUspu3ERYn-KGcvsvGB9u_n4ddy", the bot id is "1234567". Token format is not public API so this property is optional and may stop working in the future if Telegram changes it's token format. Indicates that local bot server will be used Contains base url for downloading files Contains base url for making requests Create a new instance. API token Used to change base url to your private bot api server URL. It looks like http://localhost:8081. Path, query and fragment will be omitted if present. Thrown if format is invalid Thrown if format is invalid This object represents an animation file (GIF or H.264/MPEG-4 AVC video without sound). Video width as defined by sender Video height as defined by sender Duration of the video in seconds as defined by sender Optional. Animation thumbnail as defined by sender Optional. Original animation filename as defined by sender Optional. MIME type of the file as defined by sender Represents bot API response Expected type of operation result Gets a value indicating whether the request was successful. Gets the error message. Gets the error code. Contains information about why a request was unsuccessful. Gets the result object. Initializes an instance of Indicating whether the request was successful Result object Error code Error message Information about why a request was unsuccessful This object represents an audio file to be treated as music by the Telegram clients. 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. Original filename as defined by sender Optional. MIME type of the file as defined by sender Optional. Thumbnail of the album cover to which the music file belongs This object represents a bot command Text of the command, 1-32 characters. Can contain only lowercase English letters, digits and underscores. Description of the command, 3-256 characters. This object represents the scope to which bot commands are applied Scope type Create a default instance Create a instance for all private chats Create a instance for all group chats Create a instance for all chat administrators Create a instance for a specific Unique identifier for the target or username of the target supergroup Create a instance for a specific member in a specific Unique identifier for the target or username of the target supergroup Represents the scope of bot commands, covering a specific member of a group or supergroup chat. Unique identifier for the target or username of the target supergroup Unique identifier of the target user Unique identifier for the target or username of the target supergroup (in the format @supergroupusername) Unique identifier for the target or username of the target supergroup (in the format @supergroupusername) Unique identifier for the target or username of the target supergroup (in the format @supergroupusername) Unique identifier of the target user 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. If the button that originated the query was attached to a message sent by the bot, the field will be present. If the button was attached to a message sent via the bot (in inline mode), the field will be present. Exactly one of the fields data or will be present. NOTE: After the user presses a callback button, Telegram clients will display a progress bar until you call . It is, therefore, necessary to react by calling even if no notification to the user is needed (e.g., without specifying any of the optional parameters). Unique identifier for this query Sender Optional. Description 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 Optional. Identifier of the message sent via the bot in inline mode, that originated the query Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in games. Optional. Data associated with the callback button. Be aware that a bad client can send arbitrary data in this field. Optional. Short name of a to be returned, serves as the unique identifier for the game. Indicates if the User requests a Game This object represents a chat. Unique identifier for this chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier. Type of chat, can be either “private”, “group”, “supergroup” or “channel” Optional. Title, for supergroups, channels and group chats Optional. Username, for private chats, supergroups and channels if available Optional. First name of the other party in a private chat Optional. Last name of the other party in a private chat Optional. Chat photo. Returned only in . Optional. Bio of the other party in a private chat. Returned only in . Optional. true, if privacy settings of the other party in the private chat allows to use tg://user?id=<user_id> links only in chats with the user. Returned only in . Optional. Description, for groups, supergroups and channel chats. Returned only in . Optional. Primary invite link, for groups, supergroups and channel chats. Returned only in . Optional. The most recent pinned message (by sending date). Returned only in . Optional. Default chat member permissions, for groups and supergroups. Returned only in . Optional. For supergroups, the minimum allowed delay between consecutive messages sent by each unpriviledged user. Returned only in . Optional. The time after which all messages sent to the chat will be automatically deleted; in seconds. Returned only in . Optional. true, if messages from the chat can't be forwarded to other chats. Returned only in . Optional. For supergroups, name of group sticker set. Returned only in . Optional. True, if the bot can change the group sticker set. Returned only in . Optional. Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. This identifier 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. Returned only in . Optional. For supergroups, the location to which the supergroup is connected. Returned only in . Represents the rights of an administrator in a chat. true, if the user's presence in the chat is hidden true, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege true, if the administrator can delete messages of other users true, if the administrator can manage video chats true, if the administrator can restrict, ban or unban chat members true, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user) true, if the user is allowed to change the chat title, photo and other settings true, if the user is allowed to invite new users to the chat Optional. true, if the administrator can post in the channel; channels only Optional. true, if the administrator can edit messages of other users and can pin messages; channels only Optional. true, if the user is allowed to pin messages; groups and supergroups only Represents a ChatId Unique identifier for the chat Username of the supergroup or channel (in the format @channelusername) Create a using unique identifier for the chat Unique identifier for the chat Create a using unique identifier for the chat or username of the supergroup or channel (in the format @channelusername) Unique identifier for the chat or username of the supergroup or channel (in the format @channelusername) Thrown when string value isn`t number and doesn't start with @ Thrown when string value is null Determines whether the specified object is equal to the current object. The object to compare with the current object. true if the specified object is equal to the current object; otherwise, false. Gets the hash code of this object A hash code for the current object. Create a string out of a The as string Create a using unique identifier for the chat Unique identifier for the chat Create a using unique identifier for the chat or username of the supergroup or channel (in the format @channelusername) Unique identifier for the chat or username of the supergroup or channel (in the format @channelusername) Thrown when string value isn`t number and doesn't start with @ Thrown when string value is null Create a string out of a The The ChatId Convert a Chat Object to a Compares two ChatId objects Compares two ChatId objects Represents an invite link for a chat. The invite link. If the link was created by another chat administrator, then the second part of the link will be replaced with “…”. Creator of the link true, if users joining the chat via the link need to be approved by chat administrators true, if the link is primary true, if the link is revoked Optional. Invite link name Optional. Point in time when the link will expire or has been expired Optional. Maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999 Optional. Number of pending join requests created using this link Represents a join request sent to a chat. Chat to which the request was sent User that sent the join request Date the request was sent Optional. Bio of the user Optional. Chat invite link that was used by the user to send the join request Represents a location to which a chat is connected. The location to which the supergroup is connected. Can't be a live location. Location address; 1-64 characters, as defined by the chat owner This object contains information about one member of the chat. The member's status in the chat. Information about the user Represents a that owns the chat and has all administrator privileges Custom title for this user True, if the user's presence in the chat is hidden Represents a that has some additional privileges true, if the bot is allowed to edit administrator privileges of that user Custom title for this user true, if the user's presence in the chat is hidden true, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege true, if the administrator can post in the channel, channels only true, if the administrator can edit messages of other users, channels only true, if the administrator can delete messages of other users true, if the administrator can manage video chats true, if the administrator can manage video chats true, if the administrator can restrict, ban or unban chat members 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) true, if the administrator can change the chat title, photo and other settings true, if the administrator can invite new users to the chat true, if the administrator can pin messages, supergroups only Represents a that has no additional privileges or restrictions. Represents a that is under certain restrictions in the chat. Supergroups only. true, if the user is a member of the chat at the moment of the request true, if the user can change the chat title, photo and other settings true, if the user can invite new users to the chat true, if the user can pin messages, supergroups only true, if the user can send text messages, contacts, locations and venues true, if the user can send audios, documents, photos, videos, video notes and voice notes, implies true, if the user is allowed to send polls true, if the user can send animations, games, stickers and use inline bots, implies true, if user may add web page previews to his messages, implies Date when restrictions will be lifted for this user, UTC time Represents a that isn't currently a member of the chat, but may join it themselves Represents a that was banned in the chat and can't return to the chat or view chat messages Date when restrictions will be lifted for this user, UTC time This object represents changes in the status of a chat member. Chat the user belongs to Performer of the action, which resulted in the change Date the change was done Previous information about the chat member New information about the chat member Optional. Chat invite link, which was used by the user to join the chat; for joining by invite link events only. Describes actions that a non-administrator user is allowed to take in a chat. Optional. True, if the user is allowed to send text messages, contacts, locations and venues Optional. True, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes, implies Optional. True, if the user is allowed to send polls, implies Optional. True, if the user is allowed to send animations, games, stickers and use inline bots, implies Optional. True, if the user is allowed to add web page previews to their messages, implies Optional. True, if the user is allowed to change the chat title, photo and other settings. Ignored in public supergroups Optional. True, if the user is allowed to invite new users to the chat Optional. True, if the user is allowed to pin messages. Ignored in public supergroups Collection of fileIds of profile pictures of a chat. File identifier of small (160x160) chat photo. This FileId can be used only for photo download and only for as long as the photo is not changed. Unique file identifier of small (160x160) chat photo, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file. File identifier of big (640x640) chat photo. This FileId can be used only for photo download and only for as long as the photo is not changed. Unique file identifier of big (640x640) chat photo, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file. This object represents a result of an that was chosen by the and sent to their chat partner. The unique identifier for the result that was chosen. The user that chose the result. Optional. Sender location, only for bots that require user location 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. The query that was used to obtain the result. 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 Optional. Additional data about the contact in the form of a vCard This object represents a dice with random value Emoji on which the dice throw animation is based Value of the dice, 1-6 for (“🎲”), (“🎯”) and ("🎳"), 1-5 for (“🏀”) and ("⚽"), and values 1-64 for ("🎰"). Defaults to (“🎲”) This object represents a general file (as opposed to photos, voice messages and audio files). Optional. Document thumbnail as defined by sender Optional. Original filename as defined by sender Optional. MIME type of the file as defined by sender Scope type Represents the default of bot commands. Default commands are used if no commands with a narrower are specified for the user. Represents the of bot commands, covering all private chats. Represents the of bot commands, covering all group and supergroup chats. Represents the of bot commands, covering all group and supergroup chat administrators. Represents the of bot commands, covering a specific . Represents the of bot commands, covering all administrators of a specific group or supergroup . Represents the of bot commands, covering a specific member of a group or supergroup . Type of action to broadcast Typing Uploading a Recording a Uploading a Recording a Uploading a Uploading a Finding a Recording a Uploading a Choosing a ChatMember status Creator of the Administrator of the Normal member of the A who left the A who was kicked from the A who is restricted in the Type of the , from which the inline query was sent Normal one to one Normal group chat A channel A supergroup “sender” for a private chat with the inline query sender Emoji on which the dice throw animation is based This enum is used only in the library APIs and is not present in types that are coming from Telegram servers for compatibility reasons Dice. Resulting value is 1-6 Darts. Resulting value is 1-6 Basketball. Resulting value is 1-5 Football. Resulting value is 1-5 Slot machine. Resulting value is 1-64 Bowling. Result value is 1-6 Type of a FileStream FileId File Url Type of the input media Photo Video Animation Audio Document The part of the face relative to which the mask should be placed. The forehead The eyes The mouth The chin Type of the Describes that no specific value for the menu button was set. Represents a menu button, which opens the bot’s list of commands. Represents a menu button, which launches a Web App. Type of a A mentioned A searchable Hashtag A Bot command An url An email Bold text Italic text Monowidth string Monowidth block Clickable text urls Mentions for a without Phone number A cashtag (e.g. $EUR, $USD) - $ followed by the short currency code Underlined text Strikethrough text Spoiler message The type of a The is unknown The contains text The contains a The contains an The contains a The contains a The contains a The contains a The contains a The contains a The contains a The contains a The contains a The contains a The contains a The contains a The contains a The contains a The contains a The contains a The contains a The contains a The contains a The contains a The contains a The contains non-default The contains non-default The contains The contains The contains The contains The contains The contains The contains The contains The contains Text parsing mode The Bot API supports basic formatting for messages. You can use bold and italic text, as well as inline links and pre-formatted code in your bots' messages. Telegram clients will render them accordingly. You can use either markdown-style or HTML-style formatting. Markdown-formatted A This is a legacy mode, retained for backward compatibility HTML-formatted MarkdownV2-formatted type This enum is used only in the library APIs and is not present in types that are coming from Telegram servers for compatibility reasons Regular poll Quiz The type of an Update Type is unknown The contains a . The contains an . The contains a . The contains a The contains an edited The contains a channel post The contains an edited channel post The contains an The contains an The contains an The contains an The contains an The contains an The contains an This object represents a file ready to be downloaded. The file can be downloaded via . 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 . Optional. File path. Use to get the file. This object represents a file ready to be downloaded. The file can be downloaded via . 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 . Identifier for this file, which can be used to download or reuse the file Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file. Optional. File size This object represents a game. Use BotFather to create and edit games, their short names will act as unique identifiers. Title of the game. Description of the game. Photo that will be displayed in the game message in chats. 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 , or manually edited using . 0-4096 characters. Optional. Special entities that appear in text, such as usernames, URLs, bot commands, etc. 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. Position in high score table for the game. User Score This object represents an incoming inline query. When the user sends an empty query, your bot could return some default or trending results. Unique identifier for this query Sender Text of the query (up to 256 characters) Offset of the results to be returned, can be controlled by the bot Optional. Type of the chat, from which the inline query was sent. Can be either for a private chat with the inline query sender, , , , or . The chat type should be always known for requests sent from official clients and most third-party clients, unless the request was sent from a secret chat Optional. Sender location, only for bots that request user location Content of the message to be sent instead of the result Caption of the result to be sent, 0-1024 characters after entities parsing Mode for parsing entities in the result caption. See formatting options for more details. List of special entities that appear in the caption, which can be specified instead of Location latitude in degrees Location longitude in degrees Thumbnail width Thumbnail height Url of the thumbnail for the result Base Class for inline results send in response to an Type of the result Unique identifier for this result, 1-64 Bytes Optional. Inline keyboard attached to the message Initializes a new inline query result Unique identifier for this result, 1-64 Bytes Represents a link to an article or web page. Type of the result, must be article Title of the result Content of the message to be sent Optional. URL of the result. Optional. Pass true, if you don't want the URL to be shown in the message. Optional. Short description of the result. Initializes a new object Unique identifier of this result Title of the result Content of the message to be sent Represents a link to an MP3 audio file. By default, this audio file will be sent by the user. Alternatively, you can use to send a message with the specified content instead of the audio. Type of the result, must be audio A valid URL for the audio file Title Optional. Performer Optional. Audio duration in seconds Initializes a new inline query result Unique identifier of this result A valid URL for the audio file Title of the result 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 to send a message with the specified content instead of the audio. Type of the result, must be audio A valid file identifier for the audio file Initializes a new inline query result Unique identifier of this result A valid file identifier for the audio file 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 to send a message with the specified content instead of the file. Type of the result, must be document Title for the result A valid file identifier for the file Optional. Short description of the result Initializes a new inline query result Unique identifier of this result A valid file identifier for the file Title of the result 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 to send a message with specified content instead of the animation. Type of the result, must be gif A valid file identifier for the GIF file Optional. Title for the result Initializes a new inline query result Unique identifier of this result A valid file identifier for the GIF file 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 to send a message with the specified content instead of the animation. Type of the result, must be mpeg4_gif A valid file identifier for the MP4 file Optional. Title for the result Initializes a new inline query result Unique identifier of this result A valid file identifier for the MP4 file 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 to send a message with the specified content instead of the photo. Type of the result, must be photo A valid file identifier of the photo Optional. Title for the result Optional. Short description of the result Initializes a new inline query result Unique identifier of this result A valid file identifier of the photo 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 to send a message with the specified content instead of the sticker. Type of the result, must be sticker A valid file identifier of the sticker Initializes a new inline query result Unique identifier of this result A valid file identifier of the sticker 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 to send a message with the specified content instead of the video. Type of the result, must be video A valid file identifier for the video file Title for the result Optional. Short description of the result Initializes a new inline query result Unique identifier of this result A valid file identifier for the video file Title of the result 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 to send a message with the specified content instead of the voice message. Type of the result, must be voice A valid file identifier for the voice message Voice message title Initializes a new inline query result Unique identifier of this result A valid file identifier for the voice message Title of the result Represents a contact with a phone number. By default, this contact will be sent by the user. Alternatively, you can use to send a message with the specified content instead of the contact. Type of the result, must be contact Contact's phone number Contact's first name Optional. Contact's last name Optional. Additional data about the contact in the form of a vCard, 0-2048 bytes Initializes a new inline query result Unique identifier of this result Contact's phone number Contact's first name Represents a link to a file. By default, this file will be sent by the user with an optional caption. Alternatively, you can use to send a message with the specified content instead of the file. Currently, only .PDF and .ZIP files can be sent using this method. Type of the result, must be document Title for the result A valid URL for the file Mime type of the content of the file, either “application/pdf” or “application/zip” Optional. Short description of the result Initializes a new inline query result Unique identifier of this result A valid URL for the file Title of the result Mime type of the content of the file, either “application/pdf” or “application/zip” Represents a . Type of the result, must be game Short name of the game Initializes a new inline query result Unique identifier of this result Short name of the game 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 to send a message with the specified content instead of the animation. Type of the result, must be gif A valid URL for the GIF file. File size must not exceed 1MB Optional. Width of the GIF. Optional. Height of the GIF. Optional. Duration of the GIF. URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result Optional. MIME type of the thumbnail, must be one of “image/jpeg”, “image/gif”, or “video/mp4”. Defaults to “image/jpeg” Optional. Title for the result Initializes a new inline query result Unique identifier of this result Width of the GIF Url of the thumbnail for the result. Represents a location on a map. By default, the location will be sent by the user. Alternatively, you can use to send a message with the specified content instead of the location. Type of the result, must be location Location title Optional. The radius of uncertainty for the location, measured in meters; 0-1500 Optional. Period in seconds for which the location can be updated, should be between 60 and 86400. Optional. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified. Optional. For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified. Initializes a new inline query result Unique identifier of this result Latitude of the location in degrees Longitude of the location in degrees Title of the result 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 to send a message with the specified content instead of the animation. Type of the result, must be mpeg4_gif A valid URL for the MP4 file. File size must not exceed 1MB Optional. Video width Optional. Video height Optional. Video duration URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result Optional. MIME type of the thumbnail, must be one of “image/jpeg”, “image/gif”, or “video/mp4”. Defaults to “image/jpeg” Optional. Title for the result Initializes a new inline query result Unique identifier of this result A valid URL for the MP4 file. File size must not exceed 1MB. Url of the thumbnail for the result. Represents a link to a photo. By default, this photo will be sent by the user with optional caption. Alternatively, you can use to send a message with the specified content instead of the photo. Type of the result, must be photo A valid URL of the photo. Photo must be in jpeg format. Photo size must not exceed 5MB Optional. Width of the photo Optional. Height of the photo Optional. Title for the result Optional. Short description of the result Initializes a new inline query representing a link to a photo Unique identifier of this result A valid URL of the photo. Photo size must not exceed 5MB. Optional. Url of the thumbnail for the result. Type of the InlineQueryResult /// /// Represents a venue. By default, the venue will be sent by the user. Alternatively, you can use to send a message with the specified content instead of the venue. Type of the result, must be venue Title of the venue Address of the venue Optional. Foursquare identifier of the venue if known Optional. Foursquare type of the venue. (For example, "arts_entertainment/default", "arts_entertainment/aquarium" or "food/icecream".) Google Places identifier of the venue Google Places type of the venue. Initializes a new inline query result Unique identifier of this result Latitude of the location in degrees Longitude of the location in degrees Title of the result Address of the venue 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 to send a message with the specified content instead of the video. If an message contains an embedded video (e.g., YouTube), you must replace its content using . Type of the result, must be video A valid URL for the embedded video player or video file Mime type of the content of video url, “text/html” or “video/mp4” URL of the thumbnail (jpeg only) for the video Title for the result Optional. Video width Optional. Video height Optional. Video duration in seconds Optional. Short description of the result Optional. Content of the message to be sent instead of the video. This field is required if is used to send an HTML-page as a result (e.g., a YouTube video). Initializes a new inline query result Unique identifier of this result A valid URL for the embedded video player Url of the thumbnail for the result Title of the result Content of the message to be sent instead of the video. This field is required if is used to send an HTML-page as a result (e.g., a YouTube video). 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 to send a message with the specified content instead of the the voice message. Type of the result, must be voice A valid URL for the voice recording Recording title Optional. Recording duration in seconds Initializes a new inline query result Unique identifier of this result A valid URL for the voice recording Title of the result Represents the content of a contact message to be sent as the result of an inline query. Contact's phone number Contact's first name Optional. Contact's last name Optional. Additional data about the contact in the form of a vCard, 0-2048 bytes Initializes a new input contact message content The phone number of the contact The first name of the contact Represents the content of an invoice message to be sent as the result of an inline query. Product name, 1-32 characters Product description, 1-255 characters Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes. Payment provider token, obtained via @Botfather Three-letter ISO 4217 currency code, see more on currencies Price breakdown, a list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.) Optional. The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_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). Defaults to 0 Optional. An array of suggested amounts of tip in the smallest units of the currency (integer, not float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed . Optional. A JSON-serialized object for data about the invoice, which will be shared with the payment provider. A detailed description of the required fields should be provided by the payment provider. Optional. URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service. People like it better when they see what they are paying for. Optional. Photo size Optional. Photo width Optional. Photo height Optional. Pass True, if you require the user's full name to complete the order Optional. Pass True, if you require the user's phone number to complete the order Optional. Pass True, if you require the user's email address to complete the order Optional. Pass True, if you require the user's shipping address to complete the order Optional. Pass True, if user's phone number should be sent to provider Optional. Pass True, if user's email address should be sent to provider Optional. Pass True, if the final price depends on the shipping method Initializes with title, description, payload, providerToken, currency and an array of Product name, 1-32 characters Product description, 1-255 characters Bot-defined invoice payload, 1-128 bytes Payments provider token, obtained via BotFather Three-letter ISO 4217 currency code Price breakdown, a list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.) Represents the content of a location message to be sent as the result of an inline query. Latitude of the location in degrees Longitude of the location in degrees Optional. The radius of uncertainty for the location, measured in meters; 0-1500 Optional. Period in seconds for which the location can be updated, should be between 60 and 86400. Optional. The direction in which user is moving, in degrees; 1-360. For active live locations only. Optional. Maximum distance for proximity alerts about approaching another chat member, in meters. For sent live locations only. Initializes a new input location message content The latitude of the location The longitude of the location This object represents the content of a message to be sent as a result of an inline query. Represents the content of a text message to be sent as the result of an inline query. Text of the message to be sent, 1-4096 characters Optional. Mode for parsing entities in the message text. See formatting options for more details. Optional. List of special entities that appear in message text, which can be specified instead of Optional. Disables link previews for links in the sent message Initializes a new input text message content The text of the message Represents the content of a message to be sent as the result of an inline query. Latitude of the venue in degrees Longitude of the venue in degrees Name of the venue Address of the venue Optional. Foursquare identifier of the venue, if known Optional. Foursquare type of the venue. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.) Google Places identifier of the venue Google Places type of the venue. Initializes a new inline query result The name of the venue The address of the venue The latitude of the venue The longitude of the venue A marker for input media types that can be used in sendMediaGroup method. 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 Type of file to send A marker interface for input media content Type of the media Media to send Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing Optional. Mode for parsing entities in the photo caption. See formatting options for more details. Optional. List of special entities that appear in the caption, which can be specified instead of Indicates that an has a thumbnail. Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Used for sending files to Telegram File content to upload Name of a file to upload using multipart/form-data Constructs an with a given Constructs an from a and a file name A containing a file to send A name of the file Constructs an from a A containing a file to send Used for sending files to Telegram HTTP URL for Telegram to get a file from the Internet Constructs an from a and a file name A containing a file to send A name of the file Constructs an from a string containing a uri or file id A containing a url or file_id Constructs an from a A pointing to a file Constructs an from a A containing a file to send Constructs an from a string containing a uri or file id A containing a url or file_id Used for sending files to Telegram Id of a file that exists on Telegram servers Constructs an with a Constructs an from a and a file name A containing a file to send A name of the file Constructs an with a A file identifier Constructs an from a A containing a file to send Constructs an with a A file identifier Media to send in request that could be a file_id, HTTP url, or a file Initializes media with a file to send File content to upload Name of the file to send Initializes an instance of with either a file_id or a HTTP URL file_id to send a file that exists on the Telegram servers or an HTTP URL for Telegram to get a file from the Internet Initializes an instance of with either a file_id or a HTTP URL file_id to send a file that exists on the Telegram servers or an HTTP URL for Telegram to get a file from the Internet Represents an animation file (GIF or H.264/MPEG-4 AVC video without sound) to be sent. Optional. Animation width Optional. Animation height Optional. Animation duration Initializes a new animation media to send with an File to send Represents an audio file to be treated as music to be sent. Optional. Duration of the audio in seconds Optional. Performer of the audio Optional. Title of the audio Initializes a new audio media to send with an File to send This object represents the content of a media message to be sent Type of the media File to send Optional. Caption of the photo to be sent, 0-1024 characters Optional. List of special entities that appear in the caption, which can be specified instead of Change, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in a caption Initialize an object File to send Represents a general file to be sent Optional. Disables automatic server-side content type detection for files uploaded using multipart/form-data. Always true, if the document is sent as part of an album. Initializes a new document media to send with an File to send Represents a photo to be sent Initializes a new photo media to send with an File to send Represents a video to be sent Optional. Video width Optional. Video height Optional. Video duration Optional. Pass True, if the uploaded video is suitable for streaming Initializes a new video media to send with an File to send This object represents a point on the map. Longitude as defined by sender Latitude as defined by sender Optional. The radius of uncertainty for the location, measured in meters; 0-1500 Optional. Time relative to the message sending date, during which the location can be updated, in seconds. For active live locations only. Optional. The direction in which user is moving, in degrees; 1-360. For active live locations only. Optional. Maximum distance for proximity alerts about approaching another chat member, in meters. For sent live locations only. 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. 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. Optional. New text of the button in forwarded messages 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. 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. The part of the face relative to which the mask should be placed. 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. 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. Mask scaling coefficient. For example, 2.0 means double size. This object describes the bot’s menu button in a private chat. It should be one of: MenuButtonCommands MenuButtonWebApp MenuButtonDefault 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. Type of the button Represents a menu button, which opens the bot’s list of commands. Represents a menu button, which launches a Web App. Text on the button Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method . Describes that no specific value for the menu button was set. This object represents a message. Unique message identifier inside this chat Optional. Sender, empty for messages sent to channels Optional. Sender of the message, sent on behalf of a chat. The channel itself for channel messages. The supergroup itself for messages from anonymous group administrators. The linked channel for messages automatically forwarded to the discussion group Date the message was sent Conversation the message belongs to Optional. For forwarded messages, sender of the original message Optional. For messages forwarded from channels or from anonymous administrators, information about the original sender chat Optional. For messages forwarded from channels, identifier of the original message in the channel Optional. For messages forwarded from channels, signature of the post author if present 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 Optional. true, if the message is a channel post that was automatically forwarded to the connected discussion group Optional. For replies, the original message. Note that the object in this field will not contain further fields even if it itself is a reply. Optional. Bot through which the message was sent Optional. Date the message was last edited Optional. true, if messages from the chat can't be forwarded to other chats. Returned only in . Optional. The unique identifier of a media message group this message belongs to Optional. Signature of the post author for messages in channels, or the custom title of an anonymous group administrator Optional. For text messages, the actual text of the message, 0-4096 characters Optional. For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text Gets the entity values. The entity contents. Optional. Message is an animation, information about the animation. For backward compatibility, when this field is set, the field will also be set Optional. Message is an audio file, information about the file Optional. Message is a general file, information about the file 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 video note, information about the video message Optional. Message is a voice message, information about the file Optional. Caption for the animation, audio, document, photo, video or voice, 0-1024 characters Optional. For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption Gets the caption entity values. The caption entity contents. Optional. Message is a shared contact, information about the contact Optional. Message is a dice with random value Optional. Message is a game, information about the game Optional. Message is a native poll, information about the poll Optional. Message is a venue, information about the venue. For backward compatibility, when this field is set, the field will also be set Optional. Message is a shared location, information about the location 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. A member was removed from the group, information about them (this member may be the bot itself) Optional. A chat title was changed to this value Optional. A chat photo was change to this value Optional. Service message: the chat photo was deleted Optional. Service message: the group has been created Optional. Service message: the supergroup has been created. This field can't be received in a message coming through updates, because bot can't be a member of a supergroup when it is created. It can only be found in if someone replies to a very first message in a directly created supergroup. Optional. Service message: the channel has been created. This field can't be received in a message coming through updates, because bot can't be a member of a channel when it is created. It can only be found in if someone replies to a very first message in a channel. Optional. Service message: auto-delete timer settings changed in the chat Optional. The group has been migrated to a supergroup with the specified identifier Optional. The supergroup has been migrated from a group with the specified identifier Optional. Specified message was pinned. Note that the Message object in this field will not contain further fields even if it is itself a reply. Optional. Message is an invoice for a payment, information about the invoice Optional. Message is a service message about a successful payment, information about the payment Optional. The domain name of the website on which the user has logged in Optional. Telegram Passport data Optional. Service message. A user in the chat triggered another user's proximity alert while sharing Live Location Optional. Service message: video chat scheduled Optional. Service message: video chat started Optional. Service message: video chat ended Optional. Service message: new participants invited to a video chat Optional. Service message: data sent by a Web App Optional. Inline keyboard attached to the message. buttons are represented as ordinary url buttons. Gets the of the The of the This object represents a service message about a change in auto-delete timer settings. New auto-delete time for messages in the chat This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc. Type of the entity Offset in UTF-16 code units to the start of the entity Length of the entity in UTF-16 code units Optional. For only, url that will be opened after user taps on the text Optional. For only, the mentioned user Optional. For only, the programming language of the entity text This object represents a messageId. Message identifier in the chat specified in Contains data required for decrypting and authenticating . See the Telegram Passport Documentation for a complete description of the data decryption and authentication processes. Base64-encoded encrypted JSON-serialized data with unique user's payload, data hashes and secrets required for decryption and authentication. Base64-encoded data hash for data authentication. Base64-encoded secret, encrypted with the bot’s public RSA key, required for data decryption. Contains information about documents or other Telegram Passport elements shared with the bot by the user. Element type. One of Optional. Base64-encoded encrypted Telegram Passport element data provided by the user, available for , , , , and types. Can be decrypted and verified using the accompanying . Optional. User's verified phone number, available only for type. Optional. User's verified email address, available only for type. Optional. Array of encrypted files with documents provided by the user, available for , , , and types. Files can be decrypted and verified using the accompanying . Optional. Encrypted file with the front side of the document, provided by the user. Available for , , and . The file can be decrypted and verified using the accompanying . Optional. Encrypted file with the reverse side of the document, provided by the user. Available for and . The file can be decrypted and verified using the accompanying . Optional. Encrypted file with the selfie of the user holding a document, provided by the user; available for , , and . The file can be decrypted and verified using the accompanying . Optional. Array of encrypted files with translated versions of documents provided by the user. Available if requested for , , , , , , , and types. Files can be decrypted and verified using the accompanying . Base64-encoded element hash for using in PassportElementErrorUnspecified Personal details Passport Driver licence Identity card Internal passport Address Utility bill Bank statement Rental agreement Passport registration Temporary registration Phone number Email Contains information about Telegram Passport data shared with the bot by the user. Array with information about documents and other Telegram Passport elements that was shared with the bot. Encrypted credentials required to decrypt the data. 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. DateTime when the file was uploaded This object contains basic information about an invoice. Product name Product description Unique bot deep-linking parameter that can be used to generate this invoice Three-letter ISO 4217 currency code 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 a portion of the price for goods or services. Portion label 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). Initializes an instance of Portion label Price of the product This object represents information about an order. Optional. User name Optional. User's phone number Optional. User email Optional. User shipping address This object contains information about an incoming pre-checkout query. Unique query identifier User who sent the query Three-letter ISO 4217 currency code 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). Bot specified invoice payload Optional. Identifier of the shipping option chosen by the user Optional. Order info provided by the user This object represents a shipping address. ISO 3166-1 alpha-2 country code State, if applicable City First line for the address Second line for the address Address post code This object represents one shipping option. Shipping option identifier Option title List of price portions This object contains information about an incoming shipping query. Unique query identifier User who sent the query Bot specified invoice payload User specified shipping address This object contains basic information about a successful payment. Three-letter ISO 4217 currency code 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). Bot specified invoice payload Optional. Identifier of the shipping option chosen by the user Optional. Order info provided by the user Telegram payment identifier Provider payment identifier This object represents one size of a photo or a file / sticker thumbnail. A missing thumbnail for a file (or sticker) is presented as an empty object. Photo width Photo height This object contains information about a poll. Unique poll identifier Poll question, 1-300 characters List of poll options Total number of users that voted in the poll True, if the poll is closed True, if the poll is anonymous Poll type, currently can be “regular” or “quiz” True, if the poll allows multiple answers Optional. 0-based identifier of the correct answer option. Available only for polls in the quiz mode, which are closed, or was sent (not forwarded) by the bot or to the private chat with the bot. Optional. Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters Optional. Special entities like usernames, URLs, bot commands, etc. that appear in the Optional. Amount of time in seconds the poll will be active after creation Optional. Point in time when the poll will be automatically closed This object represents an answer of a user in a non-anonymous poll. Unique poll identifier The user, who changed the answer to the poll 0-based identifiers of answer options, chosen by the user. May be empty if the user retracted their vote. This object contains information about one answer option in a poll. Option text, 1-100 characters Number of users that voted for this option Represents the content of a service message, sent whenever a user in the chat triggers a proximity alert set by another user. User that triggered the alert User that set the alert The distance between the users Upon receiving a 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. Shows reply interface to the user, as if they manually selected the bot’s message and tapped 'Reply' Optional. The placeholder to be shown in the input field when the reply is active; 1-64 characters Marker interface for a regular or inline button of the reply keyboard Text of the button. If none of the optional fields are used, it will be sent as a message when the button is pressed This object represents one button of an inline keyboard. Optional. HTTP or tg:// url to be opened when button is pressed Optional. An HTTP URL used to automatically authorize the user. Can be used as a replacement for the Telegram Login Widget. Optional. Data to be sent in a callback query to the bot when button is pressed, 1-64 bytes Optional. Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the request . Available only in private chats between a user and the bot. 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. Note: 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 SwitchPm… actions – in this case the user will be automatically returned to the chat they switched from, skipping the chat selection screen. 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. 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. Optional. Specify True, to send a Pay button. NOTE: This type of button must always be the first button in the first row. Instantiates new Inline Keyboard object Label text on the button Creates an inline keyboard button that opens a HTTP url when pressed Label text on the button HTTP or tg:// url to be opened when button is pressed Creates an inline keyboard button that opens a HTTP url to automatically authorize the user Label text on the button An HTTP URL used to automatically authorize the user. Can be used as a replacement for the Telegram Login Widget. Creates an inline keyboard button that sends to bot when pressed Text and data of the button to be sent in a callback query to the bot when button is pressed, 1-64 bytes Creates an inline keyboard button that sends to bot when pressed Label text on the button Data to be sent in a callback query to the bot when button is pressed, 1-64 bytes Creates an inline keyboard button. 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. Label text on the button 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. Creates an inline keyboard button. Pressing the button will insert the bot’s username and the specified inline query in the current chat’s input field. Label text on the button 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. Creates an inline keyboard button. Pressing the button will launch the game. Label text on the button Description of the game that will be launched when the user presses the button. Creates an inline keyboard button for a PayButton Label text on the button Generate an inline keyboard button to request a web app Button's text Web app information Performs an implicit conversion from to with callback data Label text and callback data of the button The result of the conversion. This object represents an inline keyboard that appears right next to the it belongs to. Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will display unsupported message. Array of rows, each represented by an Array of . Initializes a new instance of the class with only one keyboard button Keyboard button Initializes a new instance of the class with a one-row keyboard The inline keyboard row Initializes a new instance of the class. The inline keyboard. Generate an empty inline keyboard markup Empty inline keyboard markup Generate an inline keyboard markup with one button Inline keyboard button Generate an inline keyboard markup with one button Text of the button Generate an inline keyboard markup from multiple buttons Keyboard buttons Generate an inline keyboard markup from multiple buttons on 1 row Keyboard buttons A marker interface for reply markups that define how a can reply to the sent This object represents one button of the reply keyboard. For simple text buttons can be used instead of this object to specify text of the button. Note: and options will only work in Telegram versions released after 9 April, 2016. Older clients will display unsupported message. Note: option will only work in Telegram versions released after 23 January, 2020. Older clients will display unsupported message. Note: option will only work in Telegram versions released after 16 April, 2022. Older clients will display unsupported message. Optional. If true, the user's phone number will be sent as a contact when the button is pressed. Available in private chats only Optional. If true, the user's current location will be sent when the button is pressed. Available in private chats only Optional. If specified, the user will be asked to create a poll and send it to the bot when the button is pressed. Available in private chats only Optional. If specified, the described Web App will be launched when the button is pressed. The Web App will be able to send a “web_app_data” service message. Available in private chats only. Initializes a new instance of the class. Label text on the button Generate a keyboard button to request for contact Button's text Keyboard button Generate a keyboard button to request for location Button's text Keyboard button Generate a keyboard button to request a poll Button's text Poll's type Keyboard button Generate a keyboard button to request a web app Button's text Web app information Generate a keyboard button from text Button's text Keyboard button This object represents type of a poll, which is allowed to be created and sent when the corresponding button is pressed. Optional. If quiz is passed, the user will be allowed to create only polls in the quiz mode. If regular is passed, only regular polls will be allowed. Otherwise, the user will be allowed to create a poll of any type. Represents a custom keyboard with reply options 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. The keyboard will still be available, but clients will automatically display the usual letter-keyboard in the chat – the user can press a special button in the input field to see the custom keyboard again. Defaults to false. Optional. The placeholder to be shown in the input field when the keyboard is active; 1-64 characters Initializes a new instance of with one button Button on keyboard Initializes a new instance of The keyboard row. Initializes a new instance of the class. The keyboard. Generates a reply keyboard markup with one button Button's text Generates a reply keyboard markup with multiple buttons on one row Texts of buttons Generates a reply keyboard markup with multiple buttons Texts of buttons 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 ). 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 '' in ) Defines how clients display a reply interface to the Optional. Use this parameter if you want to show the keyboard to specific users only. Targets: users that are @mentioned in the of the object; if the bot’s message is a reply (has ), sender of the original message. 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. Contains information about why a request was unsuccessful. The group has been migrated to a supergroup with the specified identifier. In case of exceeding flood control, the number of seconds left to wait before the request can be repeated. Contains information about an inline message sent by a Web App on behalf of a user. Optional. Identifier of the sent inline message. Available only if there is an inline keyboard attached to the message. This object represents a sticker. Sticker width Sticker height true, if the sticker is animated true, if the sticker is a video sticker Optional. Sticker thumbnail in the .WEBP or .JPG format Optional. Emoji associated with the sticker Optional. Name of the sticker set to which the sticker belongs Optional. For mask stickers, the position where the mask should be placed This object represents a sticker set. Sticker set name Sticker set title True, if the sticker set contains animated stickers true, if the sticker set contains video stickers True, if the sticker set contains masks List of all set stickers Optional. Sticker set thumbnail in the .WEBP or .TGS format This object represents an incoming update. Only 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. If there are no new updates for at least a week, then identifier of the next update will be chosen randomly instead of sequentially. 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 Optional. New incoming channel post of any kind — text, photo, sticker, etc. Optional. New version of a channel post that is known to the bot and was edited Optional. New incoming inline query Optional. The result of a inline query that was chosen by a user and sent to their chat partner Optional. New incoming callback query Optional. New incoming shipping query. Only for invoices with flexible price Optional. New incoming pre-checkout query. Contains full information about checkout Optional. New poll state. Bots receive only updates about stopped polls and polls, which are sent by the bot Optional. A user changed their answer in a non-anonymous poll. Bots receive new votes only in polls that were sent by the bot itself. Optional. The bot’s chat member status was updated in a chat. For private chats, this update is received only when the bot is blocked or unblocked by the user. Optional. A chat member's status was updated in a chat. The bot must be an administrator in the chat and must explicitly specify “” in the list of allowed_updates to receive these updates. Optional. A request to join the chat has been sent. The bot must have the administrator right in the chat to receive these updates. Gets the update type. The update type. This object represents a Telegram user or bot. Unique identifier for this user or bot 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 Optional. IETF language tag of the user's language Optional. True, if the bot can be invited to groups. Returned only in Optional. True, if privacy mode is disabled for the bot. Returned only in Optional. True, if the bot supports inline queries. Returned only in 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. Venue location Name of the venue Address of the venue Optional. Foursquare identifier of the venue Optional. Foursquare type of the venue. (For example, "arts_entertainment/default", "arts_entertainment/aquarium" or "food/icecream".) Optional. Google Places identifier of the venue Optional. Google Places type of the venue. (See supported types.) This object represents a video 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. Original filename as defined by sender Optional. Mime type of a file as defined by sender This object represents a service message about a video chat ended in the chat. Video chat duration; in seconds This object represents a service message about new members invited to a video chat. Optional. New members that were invited to the voice chat This object represents a service message about a video chat scheduled in the chat. Point in time when the voice chat is supposed to be started by a chat administrator This object represents a service message about a video chat started in the chat. Currently holds no information. This object represents a video message (available in Telegram apps as of v.4.0). Video width and height (diameter of the video message) as defined by sender Duration of the video in seconds as defined by sender Optional. Video thumbnail This object represents a voice note. Duration of the audio in seconds as defined by sender Optional. MIME type of the file as defined by sender This object represents a service message about a voice chat ended in the chat. Voice chat duration; in seconds This object represents a service message about new members invited to a voice chat. Optional. New members that were invited to the voice chat This object represents a service message about a voice chat scheduled in the chat. Point in time when the voice chat is supposed to be started by a chat administrator This object represents a service message about a voice chat started in the chat. Currently holds no information. Contains data sent from a Web App to the bot. The data. Be aware that a bad client can send arbitrary data in this field. Text of the web_app keyboard button, from which the Web App was opened. Be aware that a bad client can send arbitrary data in this field. Contains information about a Web App An HTTPS URL of a Web App to be opened with additional data as specified in Initializing Web Apps 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. Currently used webhook IP address Optional. 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 Optional. Unix time of the most recent error that happened when trying to synchronize available updates with Telegram datacenters Optional. Maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery Optional. A list of update types the bot is subscribed to. Defaults to all update types except