<p>The Bot API is an HTTP-based interface created for developers keen on building bots for Telegram.<br>To learn how to create and set up a bot, please consult our <ahref="/bots"><strong>Introduction to Bots</strong></a> and <ahref="/bots/faq"><strong>Bot FAQ</strong></a>.</p>
<p>Subscribe to <ahref="https://t.me/botnews">@BotNews</a> to be the first to know about the latest updates and join the discussion in <ahref="https://t.me/bottalk">@BotTalk</a></p>
<li>Added <ahref="https://telegram.org/blog/profile-pics-emoji-translations#chat-selection-for-bots">requests for users and chats</a> and support for <ahref="https://telegram.org/blog/profile-pics-emoji-translations#granular-media-permissions">granular media permissions</a>.</li>
<li>Added the class <ahref="#keyboardbuttonrequestuser">KeyboardButtonRequestUser</a> and the field <em>request_user</em> to the class <ahref="#keyboardbutton">KeyboardButton</a>.</li>
<li>Added the class <ahref="#keyboardbuttonrequestchat">KeyboardButtonRequestChat</a> and the field <em>request_chat</em> to the class <ahref="#keyboardbutton">KeyboardButton</a>.</li>
<li>Added the classes <ahref="#usershared">UserShared</a>, <ahref="#chatshared">ChatShared</a> and the fields <em>user_shared</em>, and <em>chat_shared</em> to the class <ahref="#message">Message</a>.</li>
<li>Replaced the fields <em>can_send_media_messages</em> in the classes <ahref="#chatmemberrestricted">ChatMemberRestricted</a> and <ahref="#chatpermissions">ChatPermissions</a> with separate fields <em>can_send_audios</em>, <em>can_send_documents</em>, <em>can_send_photos</em>, <em>can_send_videos</em>, <em>can_send_video_notes</em>, and <em>can_send_voice_notes</em> for different media types.</li>
<li>Added the parameter <em>use_independent_chat_permissions</em> to the methods <ahref="#restrictchatmember">restrictChatMember</a> and <ahref="#chatpermissions">setChatPermissions</a>.</li>
<li>Added the field <em>user_chat_id</em> to the class <ahref="#chatjoinrequest">ChatJoinRequest</a>.</li>
<li>Added the field <em>is_persistent</em> to the class <ahref="#replykeyboardmarkup">ReplyKeyboardMarkup</a>, allowing to control when the keyboard is shown.</li>
<li>Added the parameter <em>has_spoiler</em> to the methods <ahref="#sendphoto">sendPhoto</a>, <ahref="#sendvideo">sendVideo</a>, and <ahref="#sendanimation">sendAnimation</a>.</li>
<li>Added the field <em>has_spoiler</em> to the classes <ahref="#inputmediaphoto">InputMediaPhoto</a>, <ahref="#inputmediavideo">InputMediaVideo</a>, and <ahref="#inputmediaanimation">InputMediaAnimation</a>.</li>
<li>Added the field <em>has_media_spoiler</em> to the class <ahref="#message">Message</a>.</li>
<li>The parameters <em>name</em> and <em>icon_custom_emoji_id</em> of the method <ahref="#editforumtopic">editForumTopic</a> are now optional. If they are omitted, the existing values are kept.</li>
<li>Added the classes <ahref="#forumtopicedited">ForumTopicEdited</a>, <ahref="#generalforumtopichidden">GeneralForumTopicHidden</a>, <ahref="#generalforumtopicunhidden">GeneralForumTopicUnhidden</a>, and <ahref="#writeaccessallowed">WriteAccessAllowed</a> and the fields <em>forum_topic_edited</em>, <em>general_forum_topic_hidden</em>, <em>general_forum_topic_unhidden</em>, and <em>write_access_allowed</em> to the class <ahref="#message">Message</a>.</li>
<li>Added the methods <ahref="#editgeneralforumtopic">editGeneralForumTopic</a>, <ahref="#closegeneralforumtopic">closeGeneralForumTopic</a>, <ahref="#reopengeneralforumtopic">reopenGeneralForumTopic</a>, <ahref="#hidegeneralforumtopic">hideGeneralForumTopic</a>, <ahref="#unhidegeneralforumtopic">unhideGeneralForumTopic</a> for managing the General topic in forums.</li>
<li>Added the parameter <em>message_thread_id</em> to the method <ahref="#sendchataction">sendChatAction</a> for sending chat actions to a specific message thread or a forum topic.</li>
<li>Added the field <em>has_hidden_members</em> to the class <ahref="#chat">Chat</a>. Note that the method <ahref="#getchatmember">getChatMember</a> is only guaranteed to work if the bot is an administrator in the chat.</li>
<li>Added the field <em>has_aggressive_anti_spam_enabled</em> to the class <ahref="#chat">Chat</a>.</li>
<li>Added Web App events <em>qrTextReceived</em> and <em>clipboardTextReceived</em>.</li>
<li>Added the field <em>platform</em> to the class <ahref="/bots/webapps#initializing-web-apps">WebApp</a>.</li>
<li>Added the methods <em>showScanQrPopup</em>, <em>closeScanQrPopup</em>, and <em>readTextFromClipboard</em> to the class <ahref="/bots/webapps#initializing-web-apps">WebApp</a>.</li>
<li>Added the parameter <em>options</em> to the method <em>openLink</em> of the class <ahref="/bots/webapps#initializing-web-apps">WebApp</a>.</li>
<li>Added support for <ahref="https://telegram.org/blog/topics-in-groups-collectible-usernames#topics-in-groups">Topics in Groups</a>.</li>
<li>Added the field <em>is_forum</em> to the class <ahref="#chat">Chat</a>.</li>
<li>Added the fields <em>is_topic_message</em> and <em>message_thread_id</em> to the class <ahref="#message">Message</a> to allow detection of messages belonging to a forum topic and their message thread identifier.</li>
<li>Added the classes <ahref="#forumtopiccreated">ForumTopicCreated</a>, <ahref="#forumtopicclosed">ForumTopicClosed</a>, and <ahref="#forumtopicreopened">ForumTopicReopened</a> and the fields <em>forum_topic_created</em>, <em>forum_topic_closed</em>, and <em>forum_topic_reopened</em> to the class <ahref="#message">Message</a>. Note that service messages about forum topic creation can't be deleted with the <ahref="#deletemessage">deleteMessage</a> method.</li>
<li>Added the field <em>can_manage_topics</em> to the classes <ahref="#chatadministratorrights">ChatAdministratorRights</a>, <ahref="#chatpermissions">ChatPermissions</a>, <ahref="#chatmemberadministrator">ChatMemberAdministrator</a>, and <ahref="#chatmemberrestricted">ChatMemberRestricted</a>.</li>
<li>Added the parameter <em>can_manage_topics</em> to the method <ahref="#promotechatmember">promoteChatMember</a>.</li>
<li>Added the methods <ahref="#createforumtopic">createForumTopic</a>, <ahref="#editforumtopic">editForumTopic</a>, <ahref="#closeforumtopic">closeForumTopic</a>, <ahref="#reopenforumtopic">reopenForumTopic</a>, <ahref="#deleteforumtopic">deleteForumTopic</a>, <ahref="#unpinallforumtopicmessages">unpinAllForumTopicMessages</a>, and <ahref="#getforumtopiciconstickers">getForumTopicIconStickers</a> for forum topic management.</li>
<li>Added the parameter <em>message_thread_id</em> to the methods <ahref="#sendmessage">sendMessage</a>, <ahref="#sendphoto">sendPhoto</a>, <ahref="#sendvideo">sendVideo</a>, <ahref="#sendanimation">sendAnimation</a>, <ahref="#sendaudio">sendAudio</a>, <ahref="#senddocument">sendDocument</a>, <ahref="#sendsticker">sendSticker</a>, <ahref="#sendvideonote">sendVideoNote</a>, <ahref="#sendvoice">sendVoice</a>, <ahref="#sendlocation">sendLocation</a>, <ahref="#sendvenue">sendVenue</a>, <ahref="#sendcontact">sendContact</a>, <ahref="#sendpoll">sendPoll</a>, <ahref="#senddice">sendDice</a>, <ahref="#sendinvoice">sendInvoice</a>, <ahref="#sendgame">sendGame</a>, <ahref="#sendmediagroup">sendMediaGroup</a>, <ahref="#copymessage">copyMessage</a>, <ahref="#forwardmessage">forwardMessage</a> to support sending of messages to a forum topic.</li>
<li>Added support for <ahref="https://telegram.org/blog/topics-in-groups-collectible-usernames#collectible-usernames">Multiple Usernames</a> via the field <em>active_usernames</em> in the class <ahref="#chat">Chat</a>.</li>
<li>Added the field <em>emoji_status_custom_emoji_id</em> to the class <ahref="#chat">Chat</a>.</li>
<li>Added the <ahref="#messageentity">MessageEntity</a> type “custom_emoji”.</li>
<li>Added the field <em>custom_emoji_id</em> to the class <ahref="#messageentity">MessageEntity</a> for “custom_emoji” entities.</li>
<li>Added the method <ahref="#getcustomemojistickers">getCustomEmojiStickers</a>.</li>
<li>Added the fields <em>type</em> and <em>custom_emoji_id</em> to the class <ahref="#sticker">Sticker</a>.</li>
<li>Added the field <em>sticker_type</em> to the class <ahref="#stickerset">StickerSet</a>, describing the type of stickers in the set.</li>
<li>The field <em>contains_masks</em> has been removed from the documentation of the class <ahref="#stickerset">StickerSet</a>. The field is still returned in the object for backward compatibility, but new bots should use the field <em>sticker_type</em> instead.</li>
<li>Added the parameter <em>sticker_type</em> to the method <ahref="#createnewstickerset">createNewStickerSet</a>.</li>
<li>The parameter <em>contains_masks</em> has been removed from the documentation of the method <ahref="#createnewstickerset">createNewStickerSet</a>. The parameter will still work for backward compatibility, but new bots should use the parameter <em>sticker_type</em> instead.</li>
</ul>
<p><strong>Web App Improvements</strong></p>
<ul>
<li>Added the field <em>isClosingConfirmationEnabled</em> and the methods <em>enableClosingConfirmation</em>, <em>disableClosingConfirmation</em>, <em>showPopup</em>, <em>showAlert</em>, <em>showConfirm</em> to the class <ahref="/bots/webapps#initializing-web-apps">WebApp</a>.</li>
<li>Added the field <em>is_premium</em> to the class <ahref="/bots/webapps#webappuser">WebAppUser</a>.</li>
<li>Added the event <em>popupClosed</em>.</li>
</ul>
<p><strong>Other Changes</strong></p>
<ul>
<li>Added the field <em>has_restricted_voice_and_video_messages</em> to the class <ahref="#chat">Chat</a> to support the <ahref="https://telegram.org/blog/custom-emoji#privacy-settings-for-voice-messages">new setting</a>.</li>
<p>Each bot is given a unique authentication token <ahref="/bots/features#botfather">when it is created</a>. The token looks something like <code>123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11</code>, but we'll use simply <strong><token></strong> in this document instead. You can learn about obtaining tokens and generating new ones in <ahref="/bots/features#botfather">this document</a>.</p>
<p>All queries to the Telegram Bot API must be served over HTTPS and need to be presented in this form: <code>https://api.telegram.org/bot<token>/METHOD_NAME</code>. Like this for example:</p>
<p>The response contains a JSON object, which always has a Boolean field 'ok' and may have an optional String field 'description' with a human-readable description of the result. If 'ok' equals <em>True</em>, the request was successful and the result of the query can be found in the 'result' field. In case of an unsuccessful request, 'ok' equals false and the error is explained in the 'description'. An Integer 'error_code' field is also returned, but its contents are subject to change in the future. Some errors may also have an optional field 'parameters' of the type <ahref="#responseparameters">ResponseParameters</a>, which can help to automatically handle the error.</p>
<h4><aclass="anchor"name="making-requests-when-getting-updates"href="#making-requests-when-getting-updates"><iclass="anchor-icon"></i></a>Making requests when getting updates</h4>
<p>If you're using <ahref="#getting-updates"><strong>webhooks</strong></a>, you can perform a request to the Bot API while sending an answer to the webhook. Use either <em>application/json</em> or <em>application/x-www-form-urlencoded</em> or <em>multipart/form-data</em> response content type for passing parameters. Specify the method to be invoked in the <em>method</em> parameter of the request. It's not possible to know that such a request was successful or get its result.</p>
<h3><aclass="anchor"name="using-a-local-bot-api-server"href="#using-a-local-bot-api-server"><iclass="anchor-icon"></i></a>Using a Local Bot API Server</h3>
<p>The Bot API server source code is available at <ahref="https://github.com/tdlib/telegram-bot-api">telegram-bot-api</a>. You can run it locally and send the requests to your own server instead of <code>https://api.telegram.org</code>. If you switch to a local Bot API server, your bot will be able to:</p>
<ul>
<li>Download files without a size limit.</li>
<li>Upload files up to 2000 MB.</li>
<li>Upload files using their local path and <ahref="https://en.wikipedia.org/wiki/File_URI_scheme">the file URI scheme</a>.</li>
<li>Use an HTTP URL for the webhook.</li>
<li>Use any local IP address for the webhook.</li>
<li>Use any port for the webhook.</li>
<li>Set <em>max_webhook_connections</em> up to 100000.</li>
<li>Receive the absolute local path as a value of the <em>file_path</em> field without the need to download the file after a <ahref="#getfile">getFile</a> request.</li>
<h4><aclass="anchor"name="do-i-need-a-local-bot-api-server"href="#do-i-need-a-local-bot-api-server"><iclass="anchor-icon"></i></a>Do I need a Local Bot API Server</h4>
<p>The majority of bots will be OK with the default configuration, running on our servers. But if you feel that you need one of <ahref="#using-a-local-bot-api-server">these features</a>, you're welcome to switch to your own at any time.</p>
<p>There are two mutually exclusive ways of receiving updates for your bot - the <ahref="#getupdates">getUpdates</a> method on one hand and <ahref="#setwebhook">webhooks</a> on the other. Incoming updates are stored on the server until the bot receives them either way, but they will not be kept longer than 24 hours.</p>
<p>This <ahref="#available-types">object</a> represents an incoming update.<br>At most <strong>one</strong> of the optional parameters can be present in any given update.</p>
<td>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 <ahref="#setwebhook">webhooks</a>, 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.</td>
<td><em>Optional</em>. The result of an <ahref="#inline-mode">inline</a> query that was chosen by a user and sent to their chat partner. Please see our documentation on the <ahref="/bots/inline#collecting-feedback">feedback collecting</a> for details on how to enable these updates for your bot.</td>
<td><em>Optional</em>. New incoming pre-checkout query. Contains full information about checkout</td>
</tr>
<tr>
<td>poll</td>
<td><ahref="#poll">Poll</a></td>
<td><em>Optional</em>. New poll state. Bots receive only updates about stopped polls and polls, which are sent by the bot</td>
</tr>
<tr>
<td>poll_answer</td>
<td><ahref="#pollanswer">PollAnswer</a></td>
<td><em>Optional</em>. A user changed their answer in a non-anonymous poll. Bots receive new votes only in polls that were sent by the bot itself.</td>
<td><em>Optional</em>. 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.</td>
<td><em>Optional</em>. A chat member's status was updated in a chat. The bot must be an administrator in the chat and must explicitly specify “chat_member” in the list of <em>allowed_updates</em> to receive these updates.</td>
<td><em>Optional</em>. A request to join the chat has been sent. The bot must have the <em>can_invite_users</em> administrator right in the chat to receive these updates.</td>
<p>Use this method to receive incoming updates using long polling (<ahref="https://en.wikipedia.org/wiki/Push_technology#Long_polling">wiki</a>). Returns an Array of <ahref="#update">Update</a> objects.</p>
<td>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 <ahref="#getupdates">getUpdates</a> is called with an <em>offset</em> higher than its <em>update_id</em>. The negative offset can be specified to retrieve updates starting from <em>-offset</em> update from the end of the updates queue. All previous updates will forgotten.</td>
</tr>
<tr>
<td>limit</td>
<td>Integer</td>
<td>Optional</td>
<td>Limits the number of updates to be retrieved. Values between 1-100 are accepted. Defaults to 100.</td>
</tr>
<tr>
<td>timeout</td>
<td>Integer</td>
<td>Optional</td>
<td>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.</td>
<td>A JSON-serialized list of the update types you want your bot to receive. For example, specify [“message”, “edited_channel_post”, “callback_query”] to only receive updates of these types. See <ahref="#update">Update</a> for a complete list of available update types. Specify an empty list to receive all update types except <em>chat_member</em> (default). If not specified, the previous setting will be used.<br><br>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.</td>
<p><strong>Notes</strong><br><strong>1.</strong> This method will not work if an outgoing webhook is set up.<br><strong>2.</strong> In order to avoid getting duplicate updates, recalculate <em>offset</em> after each server response.</p>
<p>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 <ahref="#update">Update</a>. In case of an unsuccessful request, we will give up after a reasonable amount of attempts. Returns <em>True</em> on success.</p>
<p>If you'd like to make sure that the webhook was set by you, you can specify secret data in the parameter <em>secret_token</em>. If specified, the request will contain a header “X-Telegram-Bot-Api-Secret-Token” with the secret token as content.</p>
<td>Upload your public key certificate so that the root certificate in use can be checked. See our <ahref="/bots/self-signed">self-signed guide</a> for details.</td>
</tr>
<tr>
<td>ip_address</td>
<td>String</td>
<td>Optional</td>
<td>The fixed IP address which will be used to send webhook requests instead of the IP address resolved through DNS</td>
<td>The maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery, 1-100. Defaults to <em>40</em>. Use lower values to limit the load on your bot's server, and higher values to increase your bot's throughput.</td>
<td>A JSON-serialized list of the update types you want your bot to receive. For example, specify [“message”, “edited_channel_post”, “callback_query”] to only receive updates of these types. See <ahref="#update">Update</a> for a complete list of available update types. Specify an empty list to receive all update types except <em>chat_member</em> (default). If not specified, the previous setting will be used.<br>Please note that this parameter doesn't affect updates created before the call to the setWebhook, so unwanted updates may be received for a short period of time.</td>
<td>A secret token to be sent in a header “X-Telegram-Bot-Api-Secret-Token” in every webhook request, 1-256 characters. Only characters <code>A-Z</code>, <code>a-z</code>, <code>0-9</code>, <code>_</code> and <code>-</code> are allowed. The header is useful to ensure that the request comes from a webhook set by you.</td>
<p><strong>Notes</strong><br><strong>1.</strong> You will not be able to receive updates using <ahref="#getupdates">getUpdates</a> for as long as an outgoing webhook is set up.<br><strong>2.</strong> To use a self-signed certificate, you need to upload your <ahref="/bots/self-signed">public key certificate</a> using <em>certificate</em> parameter. Please upload as InputFile, sending a String will not work.<br><strong>3.</strong> Ports currently supported <em>for webhooks</em>: <strong>443, 80, 88, 8443</strong>.</p>
<p>Use this method to remove webhook integration if you decide to switch back to <ahref="#getupdates">getUpdates</a>. Returns <em>True</em> on success.</p>
<tableclass="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>drop_pending_updates</td>
<td>Boolean</td>
<td>Optional</td>
<td>Pass <em>True</em> to drop all pending updates</td>
<p>Use this method to get current webhook status. Requires no parameters. On success, returns a <ahref="#webhookinfo">WebhookInfo</a> object. If the bot is using <ahref="#getupdates">getUpdates</a>, will return an object with the <em>url</em> field empty.</p>
<td>Webhook URL, may be empty if webhook is not set up</td>
</tr>
<tr>
<td>has_custom_certificate</td>
<td>Boolean</td>
<td><em>True</em>, if a custom certificate was provided for webhook certificate checks</td>
</tr>
<tr>
<td>pending_update_count</td>
<td>Integer</td>
<td>Number of updates awaiting delivery</td>
</tr>
<tr>
<td>ip_address</td>
<td>String</td>
<td><em>Optional</em>. Currently used webhook IP address</td>
</tr>
<tr>
<td>last_error_date</td>
<td>Integer</td>
<td><em>Optional</em>. Unix time for the most recent error that happened when trying to deliver an update via webhook</td>
</tr>
<tr>
<td>last_error_message</td>
<td>String</td>
<td><em>Optional</em>. Error message in human-readable format for the most recent error that happened when trying to deliver an update via webhook</td>
<p>This object represents a Telegram user or bot.</p>
<tableclass="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>id</td>
<td>Integer</td>
<td>Unique identifier for this user or bot. 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 64-bit integer or double-precision float type are safe for storing this identifier.</td>
<td><em>Optional</em>. <em>True</em>, if <ahref="/bots/features#privacy-mode">privacy mode</a> is disabled for the bot. Returned only in <ahref="#getme">getMe</a>.</td>
<td>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.</td>
<td><em>Optional</em>. <em>True</em>, if the supergroup chat is a forum (has <ahref="https://telegram.org/blog/topics-in-groups-collectible-usernames#topics-in-groups">topics</a> enabled)</td>
<td><em>Optional</em>. If non-empty, the list of all <ahref="https://telegram.org/blog/topics-in-groups-collectible-usernames#collectible-usernames">active chat usernames</a>; for private chats, supergroups and channels. Returned only in <ahref="#getchat">getChat</a>.</td>
</tr>
<tr>
<td>emoji_status_custom_emoji_id</td>
<td>String</td>
<td><em>Optional</em>. Custom emoji identifier of emoji status of the other party in a private chat. Returned only in <ahref="#getchat">getChat</a>.</td>
<td><em>Optional</em>. <em>True</em>, if privacy settings of the other party in the private chat allows to use <code>tg://user?id=<user_id></code> links only in chats with the user. Returned only in <ahref="#getchat">getChat</a>.</td>
<td><em>Optional</em>. <em>True</em>, if the privacy settings of the other party restrict sending voice and video note messages in the private chat. Returned only in <ahref="#getchat">getChat</a>.</td>
<td><em>Optional</em>. <em>True</em>, if users need to join the supergroup before they can send messages. Returned only in <ahref="#getchat">getChat</a>.</td>
</tr>
<tr>
<td>join_by_request</td>
<td>True</td>
<td><em>Optional</em>. <em>True</em>, if all users directly joining the supergroup need to be approved by supergroup administrators. Returned only in <ahref="#getchat">getChat</a>.</td>
<td><em>Optional</em>. Default chat member permissions, for groups and supergroups. Returned only in <ahref="#getchat">getChat</a>.</td>
</tr>
<tr>
<td>slow_mode_delay</td>
<td>Integer</td>
<td><em>Optional</em>. For supergroups, the minimum allowed delay between consecutive messages sent by each unpriviledged user; in seconds. Returned only in <ahref="#getchat">getChat</a>.</td>
</tr>
<tr>
<td>message_auto_delete_time</td>
<td>Integer</td>
<td><em>Optional</em>. The time after which all messages sent to the chat will be automatically deleted; in seconds. Returned only in <ahref="#getchat">getChat</a>.</td>
<td><em>Optional</em>. <em>True</em>, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators. Returned only in <ahref="#getchat">getChat</a>.</td>
</tr>
<tr>
<td>has_hidden_members</td>
<td>True</td>
<td><em>Optional</em>. <em>True</em>, if non-administrators can only get the list of bots and administrators in the chat. Returned only in <ahref="#getchat">getChat</a>.</td>
<td><em>Optional</em>. <em>True</em>, if messages from the chat can't be forwarded to other chats. Returned only in <ahref="#getchat">getChat</a>.</td>
<td><em>Optional</em>. For supergroups, name of group sticker set. Returned only in <ahref="#getchat">getChat</a>.</td>
</tr>
<tr>
<td>can_set_sticker_set</td>
<td>True</td>
<td><em>Optional</em>. <em>True</em>, if the bot can change the group sticker set. Returned only in <ahref="#getchat">getChat</a>.</td>
</tr>
<tr>
<td>linked_chat_id</td>
<td>Integer</td>
<td><em>Optional</em>. 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 <ahref="#getchat">getChat</a>.</td>
</tr>
<tr>
<td>location</td>
<td><ahref="#chatlocation">ChatLocation</a></td>
<td><em>Optional</em>. For supergroups, the location to which the supergroup is connected. Returned only in <ahref="#getchat">getChat</a>.</td>
<td><em>Optional</em>. Sender of the message; empty for messages sent to channels. For backward compatibility, the field contains a fake sender user in non-channel chats, if the message was sent on behalf of a chat.</td>
<td><em>Optional</em>. Sender of the message, sent on behalf of a chat. For example, the channel itself for channel posts, the supergroup itself for messages from anonymous group administrators, the linked channel for messages automatically forwarded to the discussion group. For backward compatibility, the field <em>from</em> contains a fake sender user in non-channel chats, if the message was sent on behalf of a chat.</td>
<td><em>Optional</em>. For forwarded messages, sender of the original message</td>
</tr>
<tr>
<td>forward_from_chat</td>
<td><ahref="#chat">Chat</a></td>
<td><em>Optional</em>. For messages forwarded from channels or from anonymous administrators, information about the original sender chat</td>
</tr>
<tr>
<td>forward_from_message_id</td>
<td>Integer</td>
<td><em>Optional</em>. For messages forwarded from channels, identifier of the original message in the channel</td>
</tr>
<tr>
<td>forward_signature</td>
<td>String</td>
<td><em>Optional</em>. For forwarded messages that were originally sent in channels or by an anonymous chat administrator, signature of the message sender if present</td>
<td><em>Optional</em>. For replies, the original message. Note that the Message object in this field will not contain further <em>reply_to_message</em> fields even if it itself is a reply.</td>
</tr>
<tr>
<td>via_bot</td>
<td><ahref="#user">User</a></td>
<td><em>Optional</em>. Bot through which the message was sent</td>
</tr>
<tr>
<td>edit_date</td>
<td>Integer</td>
<td><em>Optional</em>. Date the message was last edited in Unix time</td>
<td>Array of <ahref="#messageentity">MessageEntity</a></td>
<td><em>Optional</em>. For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text</td>
</tr>
<tr>
<td>animation</td>
<td><ahref="#animation">Animation</a></td>
<td><em>Optional</em>. Message is an animation, information about the animation. For backward compatibility, when this field is set, the <em>document</em> field will also be set</td>
</tr>
<tr>
<td>audio</td>
<td><ahref="#audio">Audio</a></td>
<td><em>Optional</em>. Message is an audio file, information about the file</td>
</tr>
<tr>
<td>document</td>
<td><ahref="#document">Document</a></td>
<td><em>Optional</em>. Message is a general file, information about the file</td>
</tr>
<tr>
<td>photo</td>
<td>Array of <ahref="#photosize">PhotoSize</a></td>
<td><em>Optional</em>. Message is a photo, available sizes of the photo</td>
</tr>
<tr>
<td>sticker</td>
<td><ahref="#sticker">Sticker</a></td>
<td><em>Optional</em>. Message is a sticker, information about the sticker</td>
</tr>
<tr>
<td>video</td>
<td><ahref="#video">Video</a></td>
<td><em>Optional</em>. Message is a video, information about the video</td>
</tr>
<tr>
<td>video_note</td>
<td><ahref="#videonote">VideoNote</a></td>
<td><em>Optional</em>. Message is a <ahref="https://telegram.org/blog/video-messages-and-telescope">video note</a>, information about the video message</td>
</tr>
<tr>
<td>voice</td>
<td><ahref="#voice">Voice</a></td>
<td><em>Optional</em>. Message is a voice message, information about the file</td>
<td><em>Optional</em>. Message is a shared contact, information about the contact</td>
</tr>
<tr>
<td>dice</td>
<td><ahref="#dice">Dice</a></td>
<td><em>Optional</em>. Message is a dice with random value</td>
</tr>
<tr>
<td>game</td>
<td><ahref="#game">Game</a></td>
<td><em>Optional</em>. Message is a game, information about the game. <ahref="#games">More about games »</a></td>
</tr>
<tr>
<td>poll</td>
<td><ahref="#poll">Poll</a></td>
<td><em>Optional</em>. Message is a native poll, information about the poll</td>
</tr>
<tr>
<td>venue</td>
<td><ahref="#venue">Venue</a></td>
<td><em>Optional</em>. Message is a venue, information about the venue. For backward compatibility, when this field is set, the <em>location</em> field will also be set</td>
</tr>
<tr>
<td>location</td>
<td><ahref="#location">Location</a></td>
<td><em>Optional</em>. Message is a shared location, information about the location</td>
</tr>
<tr>
<td>new_chat_members</td>
<td>Array of <ahref="#user">User</a></td>
<td><em>Optional</em>. New members that were added to the group or supergroup and information about them (the bot itself may be one of these members)</td>
</tr>
<tr>
<td>left_chat_member</td>
<td><ahref="#user">User</a></td>
<td><em>Optional</em>. A member was removed from the group, information about them (this member may be the bot itself)</td>
</tr>
<tr>
<td>new_chat_title</td>
<td>String</td>
<td><em>Optional</em>. A chat title was changed to this value</td>
</tr>
<tr>
<td>new_chat_photo</td>
<td>Array of <ahref="#photosize">PhotoSize</a></td>
<td><em>Optional</em>. A chat photo was change to this value</td>
</tr>
<tr>
<td>delete_chat_photo</td>
<td>True</td>
<td><em>Optional</em>. Service message: the chat photo was deleted</td>
</tr>
<tr>
<td>group_chat_created</td>
<td>True</td>
<td><em>Optional</em>. Service message: the group has been created</td>
<td><em>Optional</em>. 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 reply_to_message if someone replies to a very first message in a directly created supergroup.</td>
<td><em>Optional</em>. 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 reply_to_message if someone replies to a very first message in a channel.</td>
<td><em>Optional</em>. Service message: auto-delete timer settings changed in the chat</td>
</tr>
<tr>
<td>migrate_to_chat_id</td>
<td>Integer</td>
<td><em>Optional</em>. The group has been migrated to a supergroup with the specified identifier. 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.</td>
</tr>
<tr>
<td>migrate_from_chat_id</td>
<td>Integer</td>
<td><em>Optional</em>. The supergroup has been migrated from a group with the specified identifier. 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.</td>
</tr>
<tr>
<td>pinned_message</td>
<td><ahref="#message">Message</a></td>
<td><em>Optional</em>. Specified message was pinned. Note that the Message object in this field will not contain further <em>reply_to_message</em> fields even if it is itself a reply.</td>
</tr>
<tr>
<td>invoice</td>
<td><ahref="#invoice">Invoice</a></td>
<td><em>Optional</em>. Message is an invoice for a <ahref="#payments">payment</a>, information about the invoice. <ahref="#payments">More about payments »</a></td>
<td><em>Optional</em>. Message is a service message about a successful payment, information about the payment. <ahref="#payments">More about payments »</a></td>
<td><em>Optional</em>. Inline keyboard attached to the message. <code>login_url</code> buttons are represented as ordinary <code>url</code> buttons.</td>
<td><em>Optional</em>. For “custom_emoji” only, unique identifier of the custom emoji. Use <ahref="#getcustomemojistickers">getCustomEmojiStickers</a> to get full information about the sticker</td>
<td>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.</td>
<td>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.</td>
<td><em>Optional</em>. File size in bytes. It can be bigger than 2^31 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 value.</td>
<td>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.</td>
<td><em>Optional</em>. File size in bytes. It can be bigger than 2^31 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 value.</td>
<p>This object represents a general file (as opposed to <ahref="#photosize">photos</a>, <ahref="#voice">voice messages</a> and <ahref="#audio">audio files</a>).</p>
<tableclass="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>file_id</td>
<td>String</td>
<td>Identifier for this file, which can be used to download or reuse the file</td>
<td>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.</td>
<td><em>Optional</em>. File size in bytes. It can be bigger than 2^31 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 value.</td>
<td>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.</td>
<td><em>Optional</em>. File size in bytes. It can be bigger than 2^31 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 value.</td>
<p>This object represents a <ahref="https://telegram.org/blog/video-messages-and-telescope">video message</a> (available in Telegram apps as of <ahref="https://telegram.org/blog/video-messages-and-telescope">v.4.0</a>).</p>
<tableclass="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>file_id</td>
<td>String</td>
<td>Identifier for this file, which can be used to download or reuse the file</td>
<td>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.</td>
<td>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.</td>
<td><em>Optional</em>. File size in bytes. It can be bigger than 2^31 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 value.</td>
<td><em>Optional</em>. Contact's user identifier in Telegram. 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 64-bit integer or double-precision float type are safe for storing this identifier.</td>
<td>Value of the dice, 1-6 for “<imgclass="emoji"src="//telegram.org/img/emoji/40/F09F8EB2.png"width="20"height="20"alt="🎲"/>”, “<imgclass="emoji"src="//telegram.org/img/emoji/40/F09F8EAF.png"width="20"height="20"alt="🎯"/>” and “<imgclass="emoji"src="//telegram.org/img/emoji/40/F09F8EB3.png"width="20"height="20"alt="🎳"/>” base emoji, 1-5 for “<imgclass="emoji"src="//telegram.org/img/emoji/40/F09F8F80.png"width="20"height="20"alt="🏀"/>” and “<imgclass="emoji"src="//telegram.org/img/emoji/40/E29ABD.png"width="20"height="20"alt="⚽"/>” base emoji, 1-64 for “<imgclass="emoji"src="//telegram.org/img/emoji/40/F09F8EB0.png"width="20"height="20"alt="🎰"/>” base emoji</td>
<td><em>True</em>, if the poll allows multiple answers</td>
</tr>
<tr>
<td>correct_option_id</td>
<td>Integer</td>
<td><em>Optional</em>. 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.</td>
</tr>
<tr>
<td>explanation</td>
<td>String</td>
<td><em>Optional</em>. 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</td>
</tr>
<tr>
<td>explanation_entities</td>
<td>Array of <ahref="#messageentity">MessageEntity</a></td>
<td><em>Optional</em>. Special entities like usernames, URLs, bot commands, etc. that appear in the <em>explanation</em></td>
</tr>
<tr>
<td>open_period</td>
<td>Integer</td>
<td><em>Optional</em>. Amount of time in seconds the poll will be active after creation</td>
</tr>
<tr>
<td>close_date</td>
<td>Integer</td>
<td><em>Optional</em>. Point in time (Unix timestamp) when the poll will be automatically closed</td>
<td><em>Optional</em>. The radius of uncertainty for the location, measured in meters; 0-1500</td>
</tr>
<tr>
<td>live_period</td>
<td>Integer</td>
<td><em>Optional</em>. Time relative to the message sending date, during which the location can be updated; in seconds. For active live locations only.</td>
</tr>
<tr>
<td>heading</td>
<td>Integer</td>
<td><em>Optional</em>. The direction in which user is moving, in degrees; 1-360. For active live locations only.</td>
<td><em>Optional</em>. Foursquare type of the venue. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.)</td>
<td><em>Optional</em>. Google Places identifier of the venue</td>
</tr>
<tr>
<td>google_place_type</td>
<td>String</td>
<td><em>Optional</em>. Google Places type of the venue. (See <ahref="https://developers.google.com/places/web-service/supported_types">supported types</a>.)</td>
<td>Text of the <em>web_app</em> keyboard button from which the Web App was opened. Be aware that a bad client can send arbitrary data in this field.</td>
<p>This object contains information about the user whose identifier was shared with the bot using a <ahref="#keyboardbuttonrequestuser">KeyboardButtonRequestUser</a> button.</p>
<tableclass="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>request_id</td>
<td>Integer</td>
<td>Identifier of the request</td>
</tr>
<tr>
<td>user_id</td>
<td>Integer</td>
<td>Identifier of the shared user. 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 64-bit integer or double-precision float type are safe for storing this identifier. The bot may not have access to the user and could be unable to use this identifier, unless the user is already known to the bot by some other means.</td>
<p>This object contains information about the chat whose identifier was shared with the bot using a <ahref="#keyboardbuttonrequestchat">KeyboardButtonRequestChat</a> button.</p>
<tableclass="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>request_id</td>
<td>Integer</td>
<td>Identifier of the request</td>
</tr>
<tr>
<td>chat_id</td>
<td>Integer</td>
<td>Identifier of the shared 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 64-bit integer or double-precision float type are safe for storing this identifier. The bot may not have access to the chat and could be unable to use this identifier, unless the chat is already known to the bot by some other means.</td>
<p>This object represents a service message about a user allowing a bot added to the attachment menu to write messages. Currently holds no information.</p>
<p>This object represents a file ready to be downloaded. The file can be downloaded via the link <code>https://api.telegram.org/file/bot<token>/<file_path></code>. 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 <ahref="#getfile">getFile</a>.</p>
<td>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.</td>
<td><em>Optional</em>. File size in bytes. It can be bigger than 2^31 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 value.</td>
<td>An HTTPS URL of a Web App to be opened with additional data as specified in <ahref="/bots/webapps#initializing-web-apps">Initializing Web Apps</a></td>
<p>This object represents a <ahref="/bots/features#keyboards">custom keyboard</a> with reply options (see <ahref="/bots/features#keyboards">Introduction to bots</a> for details and examples).</p>
<td><em>Optional</em>. Requests clients to always show the keyboard when the regular keyboard is hidden. Defaults to <em>false</em>, in which case the custom keyboard can be hidden and opened with a keyboard icon.</td>
<td><em>Optional</em>. 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 <em>false</em>, in which case the custom keyboard is always of the same height as the app's standard keyboard.</td>
<td><em>Optional</em>. 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 <em>false</em>.</td>
<td><em>Optional</em>. Use this parameter if you want to show the keyboard to specific users only. Targets: 1) users that are @mentioned in the <em>text</em> of the <ahref="#message">Message</a> object; 2) if the bot's message is a reply (has <em>reply_to_message_id</em>), sender of the original message.<br><br><em>Example:</em> 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.</td>
<p>This object represents one button of the reply keyboard. For simple text buttons, <em>String</em> can be used instead of this object to specify the button text. The optional fields <em>web_app</em>, <em>request_user</em>, <em>request_chat</em>, <em>request_contact</em>, <em>request_location</em>, and <em>request_poll</em> are mutually exclusive.</p>
<td><em>Optional.</em> If specified, pressing the button will open a list of suitable users. Tapping on any user will send their identifier to the bot in a “user_shared” service message. Available in private chats only.</td>
<td><em>Optional.</em> If specified, pressing the button will open a list of suitable chats. Tapping on a chat will send its identifier to the bot in a “chat_shared” service message. Available in private chats only.</td>
<td><em>Optional</em>. If <em>True</em>, the user's phone number will be sent as a contact when the button is pressed. Available in private chats only.</td>
<td><em>Optional</em>. If <em>True</em>, the user's current location will be sent when the button is pressed. Available in private chats only.</td>
<td><em>Optional</em>. 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.</td>
</tr>
<tr>
<td>web_app</td>
<td><ahref="#webappinfo">WebAppInfo</a></td>
<td><em>Optional</em>. If specified, the described <ahref="/bots/webapps">Web App</a> 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.</td>
<p><strong>Note:</strong><em>request_contact</em> and <em>request_location</em> options will only work in Telegram versions released after 9 April, 2016. Older clients will display <em>unsupported message</em>.<br><strong>Note:</strong><em>request_poll</em> option will only work in Telegram versions released after 23 January, 2020. Older clients will display <em>unsupported message</em>.<br><strong>Note:</strong><em>web_app</em> option will only work in Telegram versions released after 16 April, 2022. Older clients will display <em>unsupported message</em>.<br><strong>Note:</strong><em>request_user</em> and <em>request_chat</em> options will only work in Telegram versions released after 3 February, 2023. Older clients will display <em>unsupported message</em>.</p>
<p>This object defines the criteria used to request a suitable user. The identifier of the selected user will be shared with the bot when the corresponding button is pressed.</p>
<tableclass="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>request_id</td>
<td>Integer</td>
<td>Signed 32-bit identifier of the request</td>
</tr>
<tr>
<td>user_is_bot</td>
<td>Boolean</td>
<td><em>Optional</em>. Pass <em>True</em> to request a bot, pass <em>False</em> to request a regular user. If not specified, no additional restrictions are applied.</td>
</tr>
<tr>
<td>user_is_premium</td>
<td>Boolean</td>
<td><em>Optional</em>. Pass <em>True</em> to request a premium user, pass <em>False</em> to request a non-premium user. If not specified, no additional restrictions are applied.</td>
<p>This object defines the criteria used to request a suitable chat. The identifier of the selected chat will be shared with the bot when the corresponding button is pressed.</p>
<tableclass="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>request_id</td>
<td>Integer</td>
<td>Signed 32-bit identifier of the request</td>
</tr>
<tr>
<td>chat_is_channel</td>
<td>Boolean</td>
<td>Pass <em>True</em> to request a channel chat, pass <em>False</em> to request a group or a supergroup chat.</td>
</tr>
<tr>
<td>chat_is_forum</td>
<td>Boolean</td>
<td><em>Optional</em>. Pass <em>True</em> to request a forum supergroup, pass <em>False</em> to request a non-forum chat. If not specified, no additional restrictions are applied.</td>
</tr>
<tr>
<td>chat_has_username</td>
<td>Boolean</td>
<td><em>Optional</em>. Pass <em>True</em> to request a supergroup or a channel with a username, pass <em>False</em> to request a chat without a username. If not specified, no additional restrictions are applied.</td>
</tr>
<tr>
<td>chat_is_created</td>
<td>Boolean</td>
<td><em>Optional</em>. Pass <em>True</em> to request a chat owned by the user. Otherwise, no additional restrictions are applied.</td>
<td><em>Optional</em>. A JSON-serialized object listing the required administrator rights of the user in the chat. If not specified, no additional restrictions are applied.</td>
<td><em>Optional</em>. A JSON-serialized object listing the required administrator rights of the bot in the chat. The rights must be a subset of <em>user_administrator_rights</em>. If not specified, no additional restrictions are applied.</td>
</tr>
<tr>
<td>bot_is_member</td>
<td>Boolean</td>
<td><em>Optional</em>. Pass <em>True</em> to request a chat with the bot as a member. Otherwise, no additional restrictions are applied.</td>
<p>This object represents type of a poll, which is allowed to be created and sent when the corresponding button is pressed.</p>
<tableclass="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>type</td>
<td>String</td>
<td><em>Optional</em>. If <em>quiz</em> is passed, the user will be allowed to create only polls in the quiz mode. If <em>regular</em> is passed, only regular polls will be allowed. Otherwise, the user will be allowed to create a poll of any type.</td>
<p>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 <ahref="#replykeyboardmarkup">ReplyKeyboardMarkup</a>).</p>
<tableclass="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>remove_keyboard</td>
<td>True</td>
<td>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 <em>one_time_keyboard</em> in <ahref="#replykeyboardmarkup">ReplyKeyboardMarkup</a>)</td>
<td><em>Optional</em>. Use this parameter if you want to remove the keyboard for specific users only. Targets: 1) users that are @mentioned in the <em>text</em> of the <ahref="#message">Message</a> object; 2) if the bot's message is a reply (has <em>reply_to_message_id</em>), sender of the original message.<br><br><em>Example:</em> A user votes in a poll, bot returns confirmation message in reply to the vote and removes the keyboard for that user, while still showing the keyboard with poll options to users who haven't voted yet.</td>
<td>Array of Array of <ahref="#inlinekeyboardbutton">InlineKeyboardButton</a></td>
<td>Array of button rows, each represented by an Array of <ahref="#inlinekeyboardbutton">InlineKeyboardButton</a> objects</td>
</tr>
</tbody>
</table>
<p><strong>Note:</strong> This will only work in Telegram versions released after 9 April, 2016. Older clients will display <em>unsupported message</em>.</p>
<td><em>Optional</em>. HTTP or tg:// URL to be opened when the button is pressed. Links <code>tg://user?id=<user_id></code> can be used to mention a user by their ID without using a username, if this is allowed by their privacy settings.</td>
<td><em>Optional</em>. Description of the <ahref="/bots/webapps">Web App</a> 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 <ahref="#answerwebappquery">answerWebAppQuery</a>. Available only in private chats between a user and the bot.</td>
<td><em>Optional</em>. An HTTPS URL used to automatically authorize the user. Can be used as a replacement for the <ahref="/widgets/login">Telegram Login Widget</a>.</td>
<td><em>Optional</em>. 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. May be empty, in which case just the bot's username will be inserted.<br><br><strong>Note:</strong> This offers an easy way for users to start using your bot in <ahref="/bots/inline">inline mode</a> when they are currently in a private chat with it. Especially useful when combined with <ahref="#answerinlinequery"><em>switch_pm…</em></a> actions - in this case the user will be automatically returned to the chat they switched from, skipping the chat selection screen.</td>
<td><em>Optional</em>. If set, pressing the button will insert the bot's username and the specified inline query in the current chat's input field. May be empty, in which case only the bot's username will be inserted.<br><br>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.</td>
<td><em>Optional</em>. Description of the game that will be launched when the user presses the button.<br><br><strong>NOTE:</strong> This type of button <strong>must</strong> always be the first button in the first row.</td>
</tr>
<tr>
<td>pay</td>
<td>Boolean</td>
<td><em>Optional</em>. Specify <em>True</em>, to send a <ahref="#payments">Pay button</a>.<br><br><strong>NOTE:</strong> This type of button <strong>must</strong> always be the first button in the first row and can only be used in invoice messages.</td>
<p>This object represents a parameter of the inline keyboard button used to automatically authorize a user. Serves as a great replacement for the <ahref="/widgets/login">Telegram Login Widget</a> 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:</p>
<p>Telegram apps support these buttons as of <ahref="https://telegram.org/blog/privacy-discussions-web-bots#meet-seamless-web-bots">version 5.7</a>.</p>
<td>An HTTPS 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 <ahref="/widgets/login#receiving-authorization-data">Receiving authorization data</a>.<br><br><strong>NOTE:</strong> You <strong>must</strong> always check the hash of the received data to verify the authentication and the integrity of the data as described in <ahref="/widgets/login#checking-authorization">Checking authorization</a>.</td>
<td><em>Optional</em>. Username of a bot, which will be used for user authorization. See <ahref="/widgets/login#setting-up-a-bot">Setting up a bot</a> for more details. If not specified, the current bot's username will be assumed. The <em>url</em>'s domain must be the same as the domain linked with the bot. See <ahref="/widgets/login#linking-your-domain-to-the-bot">Linking your domain to the bot</a> for more details.</td>
<p>This object represents an incoming callback query from a callback button in an <ahref="/bots/features#inline-keyboards">inline keyboard</a>. If the button that originated the query was attached to a message sent by the bot, the field <em>message</em> will be present. If the button was attached to a message sent via the bot (in <ahref="#inline-mode">inline mode</a>), the field <em>inline_message_id</em> will be present. Exactly one of the fields <em>data</em> or <em>game_short_name</em> will be present.</p>
<td><em>Optional</em>. Message with the callback button that originated the query. Note that message content and message date will not be available if the message is too old</td>
</tr>
<tr>
<td>inline_message_id</td>
<td>String</td>
<td><em>Optional</em>. Identifier of the message sent via the bot in inline mode, that originated the query.</td>
</tr>
<tr>
<td>chat_instance</td>
<td>String</td>
<td>Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in <ahref="#games">games</a>.</td>
<td><em>Optional</em>. Data associated with the callback button. Be aware that the message originated the query can contain no callback buttons with this data.</td>
<td><em>Optional</em>. Short name of a <ahref="#games">Game</a> to be returned, serves as the unique identifier for the game</td>
</tr>
</tbody>
</table>
<blockquote>
<p><strong>NOTE:</strong> After the user presses a callback button, Telegram clients will display a progress bar until you call <ahref="#answercallbackquery">answerCallbackQuery</a>. It is, therefore, necessary to react by calling <ahref="#answercallbackquery">answerCallbackQuery</a> even if no notification to the user is needed (e.g., without specifying any of the optional parameters).</p>
<p>Upon receiving a message with this object, Telegram clients will display a reply interface to the user (act as if the user has selected the bot's message and tapped 'Reply'). This can be extremely useful if you want to create user-friendly step-by-step interfaces without having to sacrifice <ahref="/bots/features#privacy-mode">privacy mode</a>.</p>
<td><em>Optional</em>. Use this parameter if you want to force reply from specific users only. Targets: 1) users that are @mentioned in the <em>text</em> of the <ahref="#message">Message</a> object; 2) if the bot's message is a reply (has <em>reply_to_message_id</em>), sender of the original message.</td>
<p><strong>Example:</strong> A <ahref="https://t.me/PollBot">poll bot</a> for groups runs in privacy mode (only receives commands, replies to its messages and mentions). There could be two ways to create a new poll:</p>
<ul>
<li>Explain the user how to send a command with parameters (e.g. /newpoll question answer1 answer2). May be appealing for hardcore users but lacks modern day polish.</li>
<li>Guide the user through a step-by-step process. 'Please send me your question', 'Cool, now let's add the first answer option', 'Great. Keep adding answer options, then send /done when you're ready'.</li>
<p>The last option is definitely more attractive. And if you use <ahref="#forcereply">ForceReply</a> in your bot's questions, it will receive the user's answers even if it only receives replies, commands and mentions - without any extra work for the user.</p>
<td>File identifier of small (160x160) chat photo. This file_id can be used only for photo download and only for as long as the photo is not changed.</td>
<td>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.</td>
<td>File identifier of big (640x640) chat photo. This file_id can be used only for photo download and only for as long as the photo is not changed.</td>
<td>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.</td>
<td><em>Optional</em>. The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999</td>
<p>Represents the rights of an administrator in a chat.</p>
<tableclass="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>is_anonymous</td>
<td>Boolean</td>
<td><em>True</em>, if the user's presence in the chat is hidden</td>
</tr>
<tr>
<td>can_manage_chat</td>
<td>Boolean</td>
<td><em>True</em>, 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</td>
</tr>
<tr>
<td>can_delete_messages</td>
<td>Boolean</td>
<td><em>True</em>, if the administrator can delete messages of other users</td>
</tr>
<tr>
<td>can_manage_video_chats</td>
<td>Boolean</td>
<td><em>True</em>, if the administrator can manage video chats</td>
</tr>
<tr>
<td>can_restrict_members</td>
<td>Boolean</td>
<td><em>True</em>, if the administrator can restrict, ban or unban chat members</td>
<td><em>True</em>, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by the user)</td>
<td><em>True</em>, 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</td>
</tr>
<tr>
<td>can_delete_messages</td>
<td>Boolean</td>
<td><em>True</em>, if the administrator can delete messages of other users</td>
<td><em>True</em>, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by the user)</td>
<td>Identifier of a private chat with the user who sent the join request. 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 64-bit integer or double-precision float type are safe for storing this identifier. The bot can use this identifier for 24 hours to send messages until the join request is processed, assuming no other administrator contacted the user.</td>
<h4><aclass="anchor"name="determining-list-of-commands"href="#determining-list-of-commands"><iclass="anchor-icon"></i></a>Determining list of commands</h4>
<p>The following algorithm is used to determine the list of commands for a particular user viewing the bot menu. The first list of commands which is set is returned:</p>
<p><strong>Commands in the chat with the bot</strong></p>
<p>Represents the default <ahref="#botcommandscope">scope</a> of bot commands. Default commands are used if no commands with a <ahref="#determining-list-of-commands">narrower scope</a> are specified for the user.</p>
<p>If a menu button other than <ahref="#menubuttondefault">MenuButtonDefault</a> 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.</p>
<p>Represents a menu button, which launches a <ahref="/bots/webapps">Web App</a>.</p>
<tableclass="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>type</td>
<td>String</td>
<td>Type of the button, must be <em>web_app</em></td>
</tr>
<tr>
<td>text</td>
<td>String</td>
<td>Text on the button</td>
</tr>
<tr>
<td>web_app</td>
<td><ahref="#webappinfo">WebAppInfo</a></td>
<td>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 <ahref="#answerwebappquery">answerWebAppQuery</a>.</td>
<td><em>Optional</em>. The group has been migrated to a supergroup with the specified identifier. 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.</td>
</tr>
<tr>
<td>retry_after</td>
<td>Integer</td>
<td><em>Optional</em>. In case of exceeding flood control, the number of seconds left to wait before the request can be repeated</td>
<td>File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. <ahref="#sending-files">More information on Sending Files »</a></td>
<td>File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. <ahref="#sending-files">More information on Sending Files »</a></td>
<td><em>Optional</em>. 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>. <ahref="#sending-files">More information on Sending Files »</a></td>
<td>File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. <ahref="#sending-files">More information on Sending Files »</a></td>
<td><em>Optional</em>. 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>. <ahref="#sending-files">More information on Sending Files »</a></td>
<td><em>Optional</em>. Caption of the animation to be sent, 0-1024 characters after entities parsing</td>
</tr>
<tr>
<td>parse_mode</td>
<td>String</td>
<td><em>Optional</em>. Mode for parsing entities in the animation caption. See <ahref="#formatting-options">formatting options</a> for more details.</td>
</tr>
<tr>
<td>caption_entities</td>
<td>Array of <ahref="#messageentity">MessageEntity</a></td>
<td><em>Optional</em>. List of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em></td>
</tr>
<tr>
<td>width</td>
<td>Integer</td>
<td><em>Optional</em>. Animation width</td>
</tr>
<tr>
<td>height</td>
<td>Integer</td>
<td><em>Optional</em>. Animation height</td>
</tr>
<tr>
<td>duration</td>
<td>Integer</td>
<td><em>Optional</em>. Animation duration in seconds</td>
<td>File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. <ahref="#sending-files">More information on Sending Files »</a></td>
<td><em>Optional</em>. 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>. <ahref="#sending-files">More information on Sending Files »</a></td>
<td>File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. <ahref="#sending-files">More information on Sending Files »</a></td>
<td><em>Optional</em>. 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>. <ahref="#sending-files">More information on Sending Files »</a></td>
<td><em>Optional</em>. Caption of the document to be sent, 0-1024 characters after entities parsing</td>
</tr>
<tr>
<td>parse_mode</td>
<td>String</td>
<td><em>Optional</em>. Mode for parsing entities in the document caption. See <ahref="#formatting-options">formatting options</a> for more details.</td>
</tr>
<tr>
<td>caption_entities</td>
<td>Array of <ahref="#messageentity">MessageEntity</a></td>
<td><em>Optional</em>. List of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em></td>
</tr>
<tr>
<td>disable_content_type_detection</td>
<td>Boolean</td>
<td><em>Optional</em>. Disables automatic server-side content type detection for files uploaded using multipart/form-data. Always <em>True</em>, if the document is sent as part of an album.</td>
<p>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.</p>
<li>If the file is already stored somewhere on the Telegram servers, you don't need to reupload it: each file object has a <strong>file_id</strong> field, simply pass this <strong>file_id</strong> as a parameter instead of uploading. There are <strong>no limits</strong> for files sent this way.</li>
<li>Provide Telegram with an HTTP URL for the file to be sent. Telegram will download and send the file. 5 MB max size for photos and 20 MB max for other types of content.</li>
<li>Post the file using multipart/form-data in the usual way that files are uploaded via the browser. 10 MB max size for photos, 50 MB for other files.</li>
<li>It is not possible to change the file type when resending by <strong>file_id</strong>. I.e. a <ahref="#video">video</a> can't be <ahref="#sendphoto">sent as a photo</a>, a <ahref="#photosize">photo</a> can't be <ahref="#senddocument">sent as a document</a>, etc.</li>
<li><strong>file_id</strong> uniquely identifies a file, but a file can have different valid <strong>file_id</strong>s even for the same bot.</li>
</ul>
<p><strong>Sending by URL</strong></p>
<ul>
<li>When sending by URL the target file must have the correct MIME type (e.g., audio/mpeg for <ahref="#sendaudio">sendAudio</a>, etc.).</li>
<li>In <ahref="#senddocument">sendDocument</a>, sending by URL will currently only work for <strong>GIF</strong>, <strong>PDF</strong> and <strong>ZIP</strong> files.</li>
<li>To use <ahref="#sendvoice">sendVoice</a>, the file must have the type audio/ogg and be no more than 1MB in size. 1-20MB voice notes will be sent as files.</li>
<p>All methods in the Bot API are case-insensitive. We support <strong>GET</strong> and <strong>POST</strong> HTTP methods. Use either <ahref="https://en.wikipedia.org/wiki/Query_string">URL query string</a> or <em>application/json</em> or <em>application/x-www-form-urlencoded</em> or <em>multipart/form-data</em> for passing parameters in Bot API requests.<br>On successful call, a JSON-object containing the result will be returned.</p>
<p>A simple method for testing your bot's authentication token. Requires no parameters. Returns basic information about the bot in form of a <ahref="#user">User</a> object.</p>
<p>Use this method to log out from the cloud Bot API server before launching the bot locally. You <strong>must</strong> 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 <em>True</em> on success. Requires no parameters.</p>
<p>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 <em>True</em> on success. Requires no parameters.</p>
<td>Text of the message to be sent, 1-4096 characters after entities parsing</td>
</tr>
<tr>
<td>parse_mode</td>
<td>String</td>
<td>Optional</td>
<td>Mode for parsing entities in the message text. See <ahref="#formatting-options">formatting options</a> for more details.</td>
</tr>
<tr>
<td>entities</td>
<td>Array of <ahref="#messageentity">MessageEntity</a></td>
<td>Optional</td>
<td>A JSON-serialized list of special entities that appear in message text, which can be specified instead of <em>parse_mode</em></td>
</tr>
<tr>
<td>disable_web_page_preview</td>
<td>Boolean</td>
<td>Optional</td>
<td>Disables link previews for links in this message</td>
</tr>
<tr>
<td>disable_notification</td>
<td>Boolean</td>
<td>Optional</td>
<td>Sends the message <ahref="https://telegram.org/blog/channels-2-0#silent-messages">silently</a>. Users will receive a notification with no sound.</td>
</tr>
<tr>
<td>protect_content</td>
<td>Boolean</td>
<td>Optional</td>
<td>Protects the contents of the sent message from forwarding and saving</td>
</tr>
<tr>
<td>reply_to_message_id</td>
<td>Integer</td>
<td>Optional</td>
<td>If the message is a reply, ID of the original message</td>
<td><ahref="#inlinekeyboardmarkup">InlineKeyboardMarkup</a> or <ahref="#replykeyboardmarkup">ReplyKeyboardMarkup</a> or <ahref="#replykeyboardremove">ReplyKeyboardRemove</a> or <ahref="#forcereply">ForceReply</a></td>
<td>Additional interface options. A JSON-serialized object for an <ahref="/bots/features#inline-keyboards">inline keyboard</a>, <ahref="/bots/features#keyboards">custom reply keyboard</a>, instructions to remove reply keyboard or to force a reply from the user.</td>
<p>The Bot API supports basic formatting for messages. You can use bold, italic, underlined, strikethrough, and spoiler text, as well as inline links and pre-formatted code in your bots' messages. Telegram clients will render them accordingly. You can specify text entities directly, or use markdown-style or HTML-style formatting.</p>
<p>Note that Telegram clients will display an <strong>alert</strong> to the user before opening an inline link ('Open this link?' together with the full URL).</p>
<p>Message entities can be nested, providing following restrictions are met:<br>- If two entities have common characters, then one of them is fully contained inside another.<br>- <em>bold</em>, <em>italic</em>, <em>underline</em>, <em>strikethrough</em>, and <em>spoiler</em> entities can contain and can be part of any other entities, except <em>pre</em> and <em>code</em>.<br>- All other entities can't contain each other.</p>
<p>Links <code>tg://user?id=<user_id></code> can be used to mention a user by their ID without using a username. Please note:</p>
<ul>
<li>These links will work <strong>only</strong> if they are used inside an inline link or in an inline keyboard button. For example, they will not work, when used in a message text.</li>
<li>Unless the user is a member of the chat where they were mentioned, these mentions are only guaranteed to work if the user has contacted the bot in private in the past or has sent a callback query to the bot via an inline button and doesn't have Forwarded Messages privacy enabled for the bot.</li>
<li>Any character with code between 1 and 126 inclusively can be escaped anywhere with a preceding '\' character, in which case it is treated as an ordinary character and not a part of the markup. This implies that '\' character usually must be escaped with a preceding '\' character.</li>
<li>Inside <code>pre</code> and <code>code</code> entities, all '`' and '\' characters must be escaped with a preceding '\' character.</li>
<li>Inside <code>(...)</code> part of inline link definition, all ')' and '\' must be escaped with a preceding '\' character.</li>
<li>In all other places characters '_', '*', '[', ']', '(', ')', '~', '`', '>', '#', '+', '-', '=', '|', '{', '}', '.', '!' must be escaped with the preceding character '\'.</li>
<li>In case of ambiguity between <code>italic</code> and <code>underline</code> entities <code>__</code> is always greadily treated from left to right as beginning or end of <code>underline</code> entity, so instead of <code>___italic underline___</code> use <code>___italic underline_\r__</code>, where <code>\r</code> is a character with code 13, which will be ignored.</li>
<pre><code class="language-python">pre-formatted fixed-width code block written in the Python programming language</code></pre></code></pre>
<li>Only the tags mentioned above are currently supported.</li>
<li>All <code><</code>, <code>></code> and <code>&</code> symbols that are not a part of a tag or an HTML entity must be replaced with the corresponding HTML entities (<code><</code> with <code>&lt;</code>, <code>></code> with <code>&gt;</code> and <code>&</code> with <code>&amp;</code>).</li>
<li>All numerical HTML entities are supported.</li>
<li>The API currently supports only the following named HTML entities: <code>&lt;</code>, <code>&gt;</code>, <code>&amp;</code> and <code>&quot;</code>.</li>
<li>Use nested <code>pre</code> and <code>code</code> tags, to define programming language for <code>pre</code> entity.</li>
<p>This is a legacy mode, retained for backward compatibility. To use this mode, pass <em>Markdown</em> in the <em>parse_mode</em> field. Use the following syntax in your message:</p>
<pre><code>*bold text*
_italic text_
[inline URL](http://www.example.com/)
[inline mention of a user](tg://user?id=123456789)
`inline fixed-width code`
```
pre-formatted fixed-width code block
```
```python
pre-formatted fixed-width code block written in the Python programming language
```</code></pre>
<p>Please note:</p>
<ul>
<li>Entities must not be nested, use parse mode <ahref="#markdownv2-style">MarkdownV2</a> instead.</li>
<li>There is no way to specify underline and strikethrough entities, use parse mode <ahref="#markdownv2-style">MarkdownV2</a> instead.</li>
<li>Escaping inside entities is not allowed, so entity must be closed first and reopened again: use <code>_snake_\__case_</code> for italic <code>snake_case</code> and <code>*2*\**2=4*</code> for bold <code>2*2=4</code>.</li>
<p>Use this method to forward messages of any kind. Service messages can't be forwarded. On success, the sent <ahref="#message">Message</a> is returned.</p>
<td>Unique identifier for the chat where the original message was sent (or channel username in the format <code>@channelusername</code>)</td>
</tr>
<tr>
<td>disable_notification</td>
<td>Boolean</td>
<td>Optional</td>
<td>Sends the message <ahref="https://telegram.org/blog/channels-2-0#silent-messages">silently</a>. Users will receive a notification with no sound.</td>
</tr>
<tr>
<td>protect_content</td>
<td>Boolean</td>
<td>Optional</td>
<td>Protects the contents of the forwarded message from forwarding and saving</td>
</tr>
<tr>
<td>message_id</td>
<td>Integer</td>
<td>Yes</td>
<td>Message identifier in the chat specified in <em>from_chat_id</em></td>
<p>Use this method to copy messages of any kind. Service messages and invoice messages can't be copied. A quiz <ahref="#poll">poll</a> can be copied only if the value of the field <em>correct_option_id</em> is known to the bot. The method is analogous to the method <ahref="#forwardmessage">forwardMessage</a>, but the copied message doesn't have a link to the original message. Returns the <ahref="#messageid">MessageId</a> of the sent message on success.</p>
<td>Unique identifier for the chat where the original message was sent (or channel username in the format <code>@channelusername</code>)</td>
</tr>
<tr>
<td>message_id</td>
<td>Integer</td>
<td>Yes</td>
<td>Message identifier in the chat specified in <em>from_chat_id</em></td>
</tr>
<tr>
<td>caption</td>
<td>String</td>
<td>Optional</td>
<td>New caption for media, 0-1024 characters after entities parsing. If not specified, the original caption is kept</td>
</tr>
<tr>
<td>parse_mode</td>
<td>String</td>
<td>Optional</td>
<td>Mode for parsing entities in the new caption. See <ahref="#formatting-options">formatting options</a> for more details.</td>
</tr>
<tr>
<td>caption_entities</td>
<td>Array of <ahref="#messageentity">MessageEntity</a></td>
<td>Optional</td>
<td>A JSON-serialized list of special entities that appear in the new caption, which can be specified instead of <em>parse_mode</em></td>
</tr>
<tr>
<td>disable_notification</td>
<td>Boolean</td>
<td>Optional</td>
<td>Sends the message <ahref="https://telegram.org/blog/channels-2-0#silent-messages">silently</a>. Users will receive a notification with no sound.</td>
</tr>
<tr>
<td>protect_content</td>
<td>Boolean</td>
<td>Optional</td>
<td>Protects the contents of the sent message from forwarding and saving</td>
</tr>
<tr>
<td>reply_to_message_id</td>
<td>Integer</td>
<td>Optional</td>
<td>If the message is a reply, ID of the original message</td>
<td><ahref="#inlinekeyboardmarkup">InlineKeyboardMarkup</a> or <ahref="#replykeyboardmarkup">ReplyKeyboardMarkup</a> or <ahref="#replykeyboardremove">ReplyKeyboardRemove</a> or <ahref="#forcereply">ForceReply</a></td>
<td>Additional interface options. A JSON-serialized object for an <ahref="/bots/features#inline-keyboards">inline keyboard</a>, <ahref="/bots/features#keyboards">custom reply keyboard</a>, instructions to remove reply keyboard or to force a reply from the user.</td>
<td>Photo to send. Pass a file_id 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. <ahref="#sending-files">More information on Sending Files »</a></td>
<td>Sends the message <ahref="https://telegram.org/blog/channels-2-0#silent-messages">silently</a>. Users will receive a notification with no sound.</td>
</tr>
<tr>
<td>protect_content</td>
<td>Boolean</td>
<td>Optional</td>
<td>Protects the contents of the sent message from forwarding and saving</td>
</tr>
<tr>
<td>reply_to_message_id</td>
<td>Integer</td>
<td>Optional</td>
<td>If the message is a reply, ID of the original message</td>
<td><ahref="#inlinekeyboardmarkup">InlineKeyboardMarkup</a> or <ahref="#replykeyboardmarkup">ReplyKeyboardMarkup</a> or <ahref="#replykeyboardremove">ReplyKeyboardRemove</a> or <ahref="#forcereply">ForceReply</a></td>
<td>Additional interface options. A JSON-serialized object for an <ahref="/bots/features#inline-keyboards">inline keyboard</a>, <ahref="/bots/features#keyboards">custom reply keyboard</a>, instructions to remove reply keyboard or to force a reply from the user.</td>
<p>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 <ahref="#message">Message</a> is returned. Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future.</p>
<p>For sending voice messages, use the <ahref="#sendvoice">sendVoice</a> method instead.</p>
<tableclass="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>chat_id</td>
<td>Integer or String</td>
<td>Yes</td>
<td>Unique identifier for the target chat or username of the target channel (in the format <code>@channelusername</code>)</td>
<td>Audio file to send. Pass a file_id 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. <ahref="#sending-files">More information on Sending Files »</a></td>
<td>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>. <ahref="#sending-files">More information on Sending Files »</a></td>
<td>Sends the message <ahref="https://telegram.org/blog/channels-2-0#silent-messages">silently</a>. Users will receive a notification with no sound.</td>
</tr>
<tr>
<td>protect_content</td>
<td>Boolean</td>
<td>Optional</td>
<td>Protects the contents of the sent message from forwarding and saving</td>
</tr>
<tr>
<td>reply_to_message_id</td>
<td>Integer</td>
<td>Optional</td>
<td>If the message is a reply, ID of the original message</td>
<td><ahref="#inlinekeyboardmarkup">InlineKeyboardMarkup</a> or <ahref="#replykeyboardmarkup">ReplyKeyboardMarkup</a> or <ahref="#replykeyboardremove">ReplyKeyboardRemove</a> or <ahref="#forcereply">ForceReply</a></td>
<td>Additional interface options. A JSON-serialized object for an <ahref="/bots/features#inline-keyboards">inline keyboard</a>, <ahref="/bots/features#keyboards">custom reply keyboard</a>, instructions to remove reply keyboard or to force a reply from the user.</td>
<p>Use this method to send general files. On success, the sent <ahref="#message">Message</a> 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.</p>
<tableclass="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>chat_id</td>
<td>Integer or String</td>
<td>Yes</td>
<td>Unique identifier for the target chat or username of the target channel (in the format <code>@channelusername</code>)</td>
<td>File to send. Pass a file_id 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. <ahref="#sending-files">More information on Sending Files »</a></td>
<td>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>. <ahref="#sending-files">More information on Sending Files »</a></td>
<td>Document caption (may also be used when resending documents by <em>file_id</em>), 0-1024 characters after entities parsing</td>
</tr>
<tr>
<td>parse_mode</td>
<td>String</td>
<td>Optional</td>
<td>Mode for parsing entities in the document caption. See <ahref="#formatting-options">formatting options</a> for more details.</td>
</tr>
<tr>
<td>caption_entities</td>
<td>Array of <ahref="#messageentity">MessageEntity</a></td>
<td>Optional</td>
<td>A JSON-serialized list of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em></td>
</tr>
<tr>
<td>disable_content_type_detection</td>
<td>Boolean</td>
<td>Optional</td>
<td>Disables automatic server-side content type detection for files uploaded using multipart/form-data</td>
</tr>
<tr>
<td>disable_notification</td>
<td>Boolean</td>
<td>Optional</td>
<td>Sends the message <ahref="https://telegram.org/blog/channels-2-0#silent-messages">silently</a>. Users will receive a notification with no sound.</td>
</tr>
<tr>
<td>protect_content</td>
<td>Boolean</td>
<td>Optional</td>
<td>Protects the contents of the sent message from forwarding and saving</td>
</tr>
<tr>
<td>reply_to_message_id</td>
<td>Integer</td>
<td>Optional</td>
<td>If the message is a reply, ID of the original message</td>
<td><ahref="#inlinekeyboardmarkup">InlineKeyboardMarkup</a> or <ahref="#replykeyboardmarkup">ReplyKeyboardMarkup</a> or <ahref="#replykeyboardremove">ReplyKeyboardRemove</a> or <ahref="#forcereply">ForceReply</a></td>
<td>Additional interface options. A JSON-serialized object for an <ahref="/bots/features#inline-keyboards">inline keyboard</a>, <ahref="/bots/features#keyboards">custom reply keyboard</a>, instructions to remove reply keyboard or to force a reply from the user.</td>
<p>Use this method to send video files, Telegram clients support MPEG4 videos (other formats may be sent as <ahref="#document">Document</a>). On success, the sent <ahref="#message">Message</a> is returned. Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future.</p>
<td>Video to send. Pass a file_id 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. <ahref="#sending-files">More information on Sending Files »</a></td>
<td>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>. <ahref="#sending-files">More information on Sending Files »</a></td>
<td>Sends the message <ahref="https://telegram.org/blog/channels-2-0#silent-messages">silently</a>. Users will receive a notification with no sound.</td>
</tr>
<tr>
<td>protect_content</td>
<td>Boolean</td>
<td>Optional</td>
<td>Protects the contents of the sent message from forwarding and saving</td>
</tr>
<tr>
<td>reply_to_message_id</td>
<td>Integer</td>
<td>Optional</td>
<td>If the message is a reply, ID of the original message</td>
<td><ahref="#inlinekeyboardmarkup">InlineKeyboardMarkup</a> or <ahref="#replykeyboardmarkup">ReplyKeyboardMarkup</a> or <ahref="#replykeyboardremove">ReplyKeyboardRemove</a> or <ahref="#forcereply">ForceReply</a></td>
<td>Additional interface options. A JSON-serialized object for an <ahref="/bots/features#inline-keyboards">inline keyboard</a>, <ahref="/bots/features#keyboards">custom reply keyboard</a>, instructions to remove reply keyboard or to force a reply from the user.</td>
<p>Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound). On success, the sent <ahref="#message">Message</a> is returned. Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future.</p>
<tableclass="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>chat_id</td>
<td>Integer or String</td>
<td>Yes</td>
<td>Unique identifier for the target chat or username of the target channel (in the format <code>@channelusername</code>)</td>
<td>Animation to send. Pass a file_id 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. <ahref="#sending-files">More information on Sending Files »</a></td>
<td>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>. <ahref="#sending-files">More information on Sending Files »</a></td>
<td>Sends the message <ahref="https://telegram.org/blog/channels-2-0#silent-messages">silently</a>. Users will receive a notification with no sound.</td>
</tr>
<tr>
<td>protect_content</td>
<td>Boolean</td>
<td>Optional</td>
<td>Protects the contents of the sent message from forwarding and saving</td>
</tr>
<tr>
<td>reply_to_message_id</td>
<td>Integer</td>
<td>Optional</td>
<td>If the message is a reply, ID of the original message</td>
<td><ahref="#inlinekeyboardmarkup">InlineKeyboardMarkup</a> or <ahref="#replykeyboardmarkup">ReplyKeyboardMarkup</a> or <ahref="#replykeyboardremove">ReplyKeyboardRemove</a> or <ahref="#forcereply">ForceReply</a></td>
<td>Additional interface options. A JSON-serialized object for an <ahref="/bots/features#inline-keyboards">inline keyboard</a>, <ahref="/bots/features#keyboards">custom reply keyboard</a>, instructions to remove reply keyboard or to force a reply from the user.</td>
<p>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 <ahref="#audio">Audio</a> or <ahref="#document">Document</a>). On success, the sent <ahref="#message">Message</a> is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future.</p>
<tableclass="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>chat_id</td>
<td>Integer or String</td>
<td>Yes</td>
<td>Unique identifier for the target chat or username of the target channel (in the format <code>@channelusername</code>)</td>
<td>Audio file to send. Pass a file_id 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. <ahref="#sending-files">More information on Sending Files »</a></td>
<td>Voice message caption, 0-1024 characters after entities parsing</td>
</tr>
<tr>
<td>parse_mode</td>
<td>String</td>
<td>Optional</td>
<td>Mode for parsing entities in the voice message caption. See <ahref="#formatting-options">formatting options</a> for more details.</td>
</tr>
<tr>
<td>caption_entities</td>
<td>Array of <ahref="#messageentity">MessageEntity</a></td>
<td>Optional</td>
<td>A JSON-serialized list of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em></td>
</tr>
<tr>
<td>duration</td>
<td>Integer</td>
<td>Optional</td>
<td>Duration of the voice message in seconds</td>
</tr>
<tr>
<td>disable_notification</td>
<td>Boolean</td>
<td>Optional</td>
<td>Sends the message <ahref="https://telegram.org/blog/channels-2-0#silent-messages">silently</a>. Users will receive a notification with no sound.</td>
</tr>
<tr>
<td>protect_content</td>
<td>Boolean</td>
<td>Optional</td>
<td>Protects the contents of the sent message from forwarding and saving</td>
</tr>
<tr>
<td>reply_to_message_id</td>
<td>Integer</td>
<td>Optional</td>
<td>If the message is a reply, ID of the original message</td>
<td><ahref="#inlinekeyboardmarkup">InlineKeyboardMarkup</a> or <ahref="#replykeyboardmarkup">ReplyKeyboardMarkup</a> or <ahref="#replykeyboardremove">ReplyKeyboardRemove</a> or <ahref="#forcereply">ForceReply</a></td>
<td>Additional interface options. A JSON-serialized object for an <ahref="/bots/features#inline-keyboards">inline keyboard</a>, <ahref="/bots/features#keyboards">custom reply keyboard</a>, instructions to remove reply keyboard or to force a reply from the user.</td>
<p>As of <ahref="https://telegram.org/blog/video-messages-and-telescope">v.4.0</a>, Telegram clients support rounded square MPEG4 videos of up to 1 minute long. Use this method to send video messages. On success, the sent <ahref="#message">Message</a> is returned.</p>
<td>Video note to send. Pass a file_id as String to send a video note that exists on the Telegram servers (recommended) or upload a new video using multipart/form-data. <ahref="#sending-files">More information on Sending Files »</a>. Sending video notes by a URL is currently unsupported</td>
<td>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>. <ahref="#sending-files">More information on Sending Files »</a></td>
<td>Sends the message <ahref="https://telegram.org/blog/channels-2-0#silent-messages">silently</a>. Users will receive a notification with no sound.</td>
</tr>
<tr>
<td>protect_content</td>
<td>Boolean</td>
<td>Optional</td>
<td>Protects the contents of the sent message from forwarding and saving</td>
</tr>
<tr>
<td>reply_to_message_id</td>
<td>Integer</td>
<td>Optional</td>
<td>If the message is a reply, ID of the original message</td>
<td><ahref="#inlinekeyboardmarkup">InlineKeyboardMarkup</a> or <ahref="#replykeyboardmarkup">ReplyKeyboardMarkup</a> or <ahref="#replykeyboardremove">ReplyKeyboardRemove</a> or <ahref="#forcereply">ForceReply</a></td>
<td>Additional interface options. A JSON-serialized object for an <ahref="/bots/features#inline-keyboards">inline keyboard</a>, <ahref="/bots/features#keyboards">custom reply keyboard</a>, instructions to remove reply keyboard or to force a reply from the user.</td>
<p>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 <ahref="#message">Messages</a> that were sent is returned.</p>
<tableclass="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>chat_id</td>
<td>Integer or String</td>
<td>Yes</td>
<td>Unique identifier for the target chat or username of the target channel (in the format <code>@channelusername</code>)</td>
<td>Array of <ahref="#inputmediaaudio">InputMediaAudio</a>, <ahref="#inputmediadocument">InputMediaDocument</a>, <ahref="#inputmediaphoto">InputMediaPhoto</a> and <ahref="#inputmediavideo">InputMediaVideo</a></td>
<td>Yes</td>
<td>A JSON-serialized array describing messages to be sent, must include 2-10 items</td>
</tr>
<tr>
<td>disable_notification</td>
<td>Boolean</td>
<td>Optional</td>
<td>Sends messages <ahref="https://telegram.org/blog/channels-2-0#silent-messages">silently</a>. Users will receive a notification with no sound.</td>
</tr>
<tr>
<td>protect_content</td>
<td>Boolean</td>
<td>Optional</td>
<td>Protects the contents of the sent messages from forwarding and saving</td>
</tr>
<tr>
<td>reply_to_message_id</td>
<td>Integer</td>
<td>Optional</td>
<td>If the messages are a reply, ID of the original message</td>
<td>The radius of uncertainty for the location, measured in meters; 0-1500</td>
</tr>
<tr>
<td>live_period</td>
<td>Integer</td>
<td>Optional</td>
<td>Period in seconds for which the location will be updated (see <ahref="https://telegram.org/blog/live-locations">Live Locations</a>, should be between 60 and 86400.</td>
</tr>
<tr>
<td>heading</td>
<td>Integer</td>
<td>Optional</td>
<td>For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.</td>
</tr>
<tr>
<td>proximity_alert_radius</td>
<td>Integer</td>
<td>Optional</td>
<td>For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.</td>
</tr>
<tr>
<td>disable_notification</td>
<td>Boolean</td>
<td>Optional</td>
<td>Sends the message <ahref="https://telegram.org/blog/channels-2-0#silent-messages">silently</a>. Users will receive a notification with no sound.</td>
</tr>
<tr>
<td>protect_content</td>
<td>Boolean</td>
<td>Optional</td>
<td>Protects the contents of the sent message from forwarding and saving</td>
</tr>
<tr>
<td>reply_to_message_id</td>
<td>Integer</td>
<td>Optional</td>
<td>If the message is a reply, ID of the original message</td>
<td><ahref="#inlinekeyboardmarkup">InlineKeyboardMarkup</a> or <ahref="#replykeyboardmarkup">ReplyKeyboardMarkup</a> or <ahref="#replykeyboardremove">ReplyKeyboardRemove</a> or <ahref="#forcereply">ForceReply</a></td>
<td>Additional interface options. A JSON-serialized object for an <ahref="/bots/features#inline-keyboards">inline keyboard</a>, <ahref="/bots/features#keyboards">custom reply keyboard</a>, instructions to remove reply keyboard or to force a reply from the user.</td>
<p>Use this method to edit live location messages. A location can be edited until its <em>live_period</em> expires or editing is explicitly disabled by a call to <ahref="#stopmessagelivelocation">stopMessageLiveLocation</a>. On success, if the edited message is not an inline message, the edited <ahref="#message">Message</a> is returned, otherwise <em>True</em> is returned.</p>
<tableclass="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>chat_id</td>
<td>Integer or String</td>
<td>Optional</td>
<td>Required if <em>inline_message_id</em> is not specified. Unique identifier for the target chat or username of the target channel (in the format <code>@channelusername</code>)</td>
</tr>
<tr>
<td>message_id</td>
<td>Integer</td>
<td>Optional</td>
<td>Required if <em>inline_message_id</em> is not specified. Identifier of the message to edit</td>
</tr>
<tr>
<td>inline_message_id</td>
<td>String</td>
<td>Optional</td>
<td>Required if <em>chat_id</em> and <em>message_id</em> are not specified. Identifier of the inline message</td>
</tr>
<tr>
<td>latitude</td>
<td>Float number</td>
<td>Yes</td>
<td>Latitude of new location</td>
</tr>
<tr>
<td>longitude</td>
<td>Float number</td>
<td>Yes</td>
<td>Longitude of new location</td>
</tr>
<tr>
<td>horizontal_accuracy</td>
<td>Float number</td>
<td>Optional</td>
<td>The radius of uncertainty for the location, measured in meters; 0-1500</td>
</tr>
<tr>
<td>heading</td>
<td>Integer</td>
<td>Optional</td>
<td>Direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.</td>
<p>Use this method to stop updating a live location message before <em>live_period</em> expires. On success, if the message is not an inline message, the edited <ahref="#message">Message</a> is returned, otherwise <em>True</em> is returned.</p>
<tableclass="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>chat_id</td>
<td>Integer or String</td>
<td>Optional</td>
<td>Required if <em>inline_message_id</em> is not specified. Unique identifier for the target chat or username of the target channel (in the format <code>@channelusername</code>)</td>
</tr>
<tr>
<td>message_id</td>
<td>Integer</td>
<td>Optional</td>
<td>Required if <em>inline_message_id</em> is not specified. Identifier of the message with live location to stop</td>
</tr>
<tr>
<td>inline_message_id</td>
<td>String</td>
<td>Optional</td>
<td>Required if <em>chat_id</em> and <em>message_id</em> are not specified. Identifier of the inline message</td>
<td>Google Places type of the venue. (See <ahref="https://developers.google.com/places/web-service/supported_types">supported types</a>.)</td>
</tr>
<tr>
<td>disable_notification</td>
<td>Boolean</td>
<td>Optional</td>
<td>Sends the message <ahref="https://telegram.org/blog/channels-2-0#silent-messages">silently</a>. Users will receive a notification with no sound.</td>
</tr>
<tr>
<td>protect_content</td>
<td>Boolean</td>
<td>Optional</td>
<td>Protects the contents of the sent message from forwarding and saving</td>
</tr>
<tr>
<td>reply_to_message_id</td>
<td>Integer</td>
<td>Optional</td>
<td>If the message is a reply, ID of the original message</td>
<td><ahref="#inlinekeyboardmarkup">InlineKeyboardMarkup</a> or <ahref="#replykeyboardmarkup">ReplyKeyboardMarkup</a> or <ahref="#replykeyboardremove">ReplyKeyboardRemove</a> or <ahref="#forcereply">ForceReply</a></td>
<td>Additional interface options. A JSON-serialized object for an <ahref="/bots/features#inline-keyboards">inline keyboard</a>, <ahref="/bots/features#keyboards">custom reply keyboard</a>, instructions to remove reply keyboard or to force a reply from the user.</td>
<td>Additional data about the contact in the form of a <ahref="https://en.wikipedia.org/wiki/VCard">vCard</a>, 0-2048 bytes</td>
</tr>
<tr>
<td>disable_notification</td>
<td>Boolean</td>
<td>Optional</td>
<td>Sends the message <ahref="https://telegram.org/blog/channels-2-0#silent-messages">silently</a>. Users will receive a notification with no sound.</td>
</tr>
<tr>
<td>protect_content</td>
<td>Boolean</td>
<td>Optional</td>
<td>Protects the contents of the sent message from forwarding and saving</td>
</tr>
<tr>
<td>reply_to_message_id</td>
<td>Integer</td>
<td>Optional</td>
<td>If the message is a reply, ID of the original message</td>
<td><ahref="#inlinekeyboardmarkup">InlineKeyboardMarkup</a> or <ahref="#replykeyboardmarkup">ReplyKeyboardMarkup</a> or <ahref="#replykeyboardremove">ReplyKeyboardRemove</a> or <ahref="#forcereply">ForceReply</a></td>
<td>Additional interface options. A JSON-serialized object for an <ahref="/bots/features#inline-keyboards">inline keyboard</a>, <ahref="/bots/features#keyboards">custom reply keyboard</a>, instructions to remove reply keyboard or to force a reply from the user.</td>
<td><em>True</em>, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to <em>False</em></td>
</tr>
<tr>
<td>correct_option_id</td>
<td>Integer</td>
<td>Optional</td>
<td>0-based identifier of the correct answer option, required for polls in quiz mode</td>
</tr>
<tr>
<td>explanation</td>
<td>String</td>
<td>Optional</td>
<td>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</td>
</tr>
<tr>
<td>explanation_parse_mode</td>
<td>String</td>
<td>Optional</td>
<td>Mode for parsing entities in the explanation. See <ahref="#formatting-options">formatting options</a> for more details.</td>
</tr>
<tr>
<td>explanation_entities</td>
<td>Array of <ahref="#messageentity">MessageEntity</a></td>
<td>Optional</td>
<td>A JSON-serialized list of special entities that appear in the poll explanation, which can be specified instead of <em>parse_mode</em></td>
<td>Point in time (Unix timestamp) 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 <em>open_period</em>.</td>
<td>Sends the message <ahref="https://telegram.org/blog/channels-2-0#silent-messages">silently</a>. Users will receive a notification with no sound.</td>
</tr>
<tr>
<td>protect_content</td>
<td>Boolean</td>
<td>Optional</td>
<td>Protects the contents of the sent message from forwarding and saving</td>
</tr>
<tr>
<td>reply_to_message_id</td>
<td>Integer</td>
<td>Optional</td>
<td>If the message is a reply, ID of the original message</td>
<td><ahref="#inlinekeyboardmarkup">InlineKeyboardMarkup</a> or <ahref="#replykeyboardmarkup">ReplyKeyboardMarkup</a> or <ahref="#replykeyboardremove">ReplyKeyboardRemove</a> or <ahref="#forcereply">ForceReply</a></td>
<td>Additional interface options. A JSON-serialized object for an <ahref="/bots/features#inline-keyboards">inline keyboard</a>, <ahref="/bots/features#keyboards">custom reply keyboard</a>, instructions to remove reply keyboard or to force a reply from the user.</td>
<td>Emoji on which the dice throw animation is based. Currently, must be one of “<imgclass="emoji"src="//telegram.org/img/emoji/40/F09F8EB2.png"width="20"height="20"alt="🎲"/>”, “<imgclass="emoji"src="//telegram.org/img/emoji/40/F09F8EAF.png"width="20"height="20"alt="🎯"/>”, “<imgclass="emoji"src="//telegram.org/img/emoji/40/F09F8F80.png"width="20"height="20"alt="🏀"/>”, “<imgclass="emoji"src="//telegram.org/img/emoji/40/E29ABD.png"width="20"height="20"alt="⚽"/>”, “<imgclass="emoji"src="//telegram.org/img/emoji/40/F09F8EB3.png"width="20"height="20"alt="🎳"/>”, or “<imgclass="emoji"src="//telegram.org/img/emoji/40/F09F8EB0.png"width="20"height="20"alt="🎰"/>”. Dice can have values 1-6 for “<imgclass="emoji"src="//telegram.org/img/emoji/40/F09F8EB2.png"width="20"height="20"alt="🎲"/>”, “<imgclass="emoji"src="//telegram.org/img/emoji/40/F09F8EAF.png"width="20"height="20"alt="🎯"/>” and “<imgclass="emoji"src="//telegram.org/img/emoji/40/F09F8EB3.png"width="20"height="20"alt="🎳"/>”, values 1-5 for “<imgclass="emoji"src="//telegram.org/img/emoji/40/F09F8F80.png"width="20"height="20"alt="🏀"/>” and “<imgclass="emoji"src="//telegram.org/img/emoji/40/E29ABD.png"width="20"height="20"alt="⚽"/>”, and values 1-64 for “<imgclass="emoji"src="//telegram.org/img/emoji/40/F09F8EB0.png"width="20"height="20"alt="🎰"/>”. Defaults to “<imgclass="emoji"src="//telegram.org/img/emoji/40/F09F8EB2.png"width="20"height="20"alt="🎲"/>”</td>
<td>Sends the message <ahref="https://telegram.org/blog/channels-2-0#silent-messages">silently</a>. Users will receive a notification with no sound.</td>
</tr>
<tr>
<td>protect_content</td>
<td>Boolean</td>
<td>Optional</td>
<td>Protects the contents of the sent message from forwarding</td>
</tr>
<tr>
<td>reply_to_message_id</td>
<td>Integer</td>
<td>Optional</td>
<td>If the message is a reply, ID of the original message</td>
<td><ahref="#inlinekeyboardmarkup">InlineKeyboardMarkup</a> or <ahref="#replykeyboardmarkup">ReplyKeyboardMarkup</a> or <ahref="#replykeyboardremove">ReplyKeyboardRemove</a> or <ahref="#forcereply">ForceReply</a></td>
<td>Additional interface options. A JSON-serialized object for an <ahref="/bots/features#inline-keyboards">inline keyboard</a>, <ahref="/bots/features#keyboards">custom reply keyboard</a>, instructions to remove reply keyboard or to force a reply from the user.</td>
<p>Use this method when you need to tell the user that something is happening on the bot's side. The status is set for 5 seconds or less (when a message arrives from your bot, Telegram clients clear its typing status). Returns <em>True</em> on success.</p>
<p>Example: The <ahref="https://t.me/imagebot">ImageBot</a> 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 <ahref="#sendchataction">sendChatAction</a> with <em>action</em> = <em>upload_photo</em>. The user will see a “sending photo” status for the bot.</p>
<td>Type of action to broadcast. Choose one, depending on what the user is about to receive: <em>typing</em> for <ahref="#sendmessage">text messages</a>, <em>upload_photo</em> for <ahref="#sendphoto">photos</a>, <em>record_video</em> or <em>upload_video</em> for <ahref="#sendvideo">videos</a>, <em>record_voice</em> or <em>upload_voice</em> for <ahref="#sendvoice">voice notes</a>, <em>upload_document</em> for <ahref="#senddocument">general files</a>, <em>choose_sticker</em> for <ahref="#sendsticker">stickers</a>, <em>find_location</em> for <ahref="#sendlocation">location data</a>, <em>record_video_note</em> or <em>upload_video_note</em> for <ahref="#sendvideonote">video notes</a>.</td>
<p>Use this method to get basic information about a file and prepare it for downloading. For the moment, bots can download files of up to 20MB in size. On success, a <ahref="#file">File</a> object is returned. The file can then be downloaded via the link <code>https://api.telegram.org/file/bot<token>/<file_path></code>, where <code><file_path></code> 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 <ahref="#getfile">getFile</a> again.</p>
<p><strong>Note:</strong> This function may not preserve the original file name and MIME type. You should save the file's MIME type and name (if available) when the File object is received.</p>
<p>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 <ahref="#unbanchatmember">unbanned</a> first. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns <em>True</em> on success.</p>
<tableclass="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>chat_id</td>
<td>Integer or String</td>
<td>Yes</td>
<td>Unique identifier for the target group or username of the target supergroup or channel (in the format <code>@channelusername</code>)</td>
</tr>
<tr>
<td>user_id</td>
<td>Integer</td>
<td>Yes</td>
<td>Unique identifier of the target user</td>
</tr>
<tr>
<td>until_date</td>
<td>Integer</td>
<td>Optional</td>
<td>Date when the user will be unbanned, unix time. 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.</td>
</tr>
<tr>
<td>revoke_messages</td>
<td>Boolean</td>
<td>Optional</td>
<td>Pass <em>True</em> to delete all messages from the chat for the user that is being removed. If <em>False</em>, the user will be able to see messages in the group that were sent before the user was removed. Always <em>True</em> for supergroups and channels.</td>
<p>Use this method to unban a previously banned user in a supergroup or channel. The user will <strong>not</strong> 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 <strong>removed</strong> from the chat. If you don't want this, use the parameter <em>only_if_banned</em>. Returns <em>True</em> on success.</p>
<p>Use this method to restrict a user in a supergroup. The bot must be an administrator in the supergroup for this to work and must have the appropriate administrator rights. Pass <em>True</em> for all permissions to lift restrictions from a user. Returns <em>True</em> on success.</p>
<tableclass="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>chat_id</td>
<td>Integer or String</td>
<td>Yes</td>
<td>Unique identifier for the target chat or username of the target supergroup (in the format <code>@supergroupusername</code>)</td>
<td>Pass <em>True</em> if chat permissions are set independently. Otherwise, the <em>can_send_other_messages</em> and <em>can_add_web_page_previews</em> permissions will imply the <em>can_send_messages</em>, <em>can_send_audios</em>, <em>can_send_documents</em>, <em>can_send_photos</em>, <em>can_send_videos</em>, <em>can_send_video_notes</em>, and <em>can_send_voice_notes</em> permissions; the <em>can_send_polls</em> permission will imply the <em>can_send_messages</em> permission.</td>
<td>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</td>
<p>Use this method to promote or demote a user in a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Pass <em>False</em> for all boolean parameters to demote a user. Returns <em>True</em> on success.</p>
<tableclass="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>chat_id</td>
<td>Integer or String</td>
<td>Yes</td>
<td>Unique identifier for the target chat or username of the target channel (in the format <code>@channelusername</code>)</td>
<td>Pass <em>True</em> 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</td>
<td>Pass <em>True</em> if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by him)</td>
<p>Use this method to ban a channel chat in a supergroup or a channel. Until the chat is <ahref="#unbanchatsenderchat">unbanned</a>, the owner of the banned chat won't be able to send messages on behalf of <strong>any of their channels</strong>. The bot must be an administrator in the supergroup or channel for this to work and must have the appropriate administrator rights. Returns <em>True</em> on success.</p>
<p>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 <em>True</em> on success.</p>
<tableclass="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>chat_id</td>
<td>Integer or String</td>
<td>Yes</td>
<td>Unique identifier for the target chat or username of the target channel (in the format <code>@channelusername</code>)</td>
</tr>
<tr>
<td>sender_chat_id</td>
<td>Integer</td>
<td>Yes</td>
<td>Unique identifier of the target sender chat</td>
<p>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 <em>can_restrict_members</em> administrator rights. Returns <em>True</em> on success.</p>
<tableclass="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>chat_id</td>
<td>Integer or String</td>
<td>Yes</td>
<td>Unique identifier for the target chat or username of the target supergroup (in the format <code>@supergroupusername</code>)</td>
<td>Pass <em>True</em> if chat permissions are set independently. Otherwise, the <em>can_send_other_messages</em> and <em>can_add_web_page_previews</em> permissions will imply the <em>can_send_messages</em>, <em>can_send_audios</em>, <em>can_send_documents</em>, <em>can_send_photos</em>, <em>can_send_videos</em>, <em>can_send_video_notes</em>, and <em>can_send_voice_notes</em> permissions; the <em>can_send_polls</em> permission will imply the <em>can_send_messages</em> permission.</td>
<p>Use this method to generate a new primary invite link for a chat; any previously generated primary link is revoked. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the new invite link as <em>String</em> on success.</p>
<tableclass="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>chat_id</td>
<td>Integer or String</td>
<td>Yes</td>
<td>Unique identifier for the target chat or username of the target channel (in the format <code>@channelusername</code>)</td>
<p>Note: Each administrator in a chat generates their own invite links. Bots can't use invite links generated by other administrators. If you want your bot to work with invite links, it will need to generate its own link using <ahref="#exportchatinvitelink">exportChatInviteLink</a> or by calling the <ahref="#getchat">getChat</a> method. If your bot needs to generate a new primary invite link replacing its previous one, use <ahref="#exportchatinvitelink">exportChatInviteLink</a> again.</p>
<p>Use this method to create an additional invite link for a chat. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. The link can be revoked using the method <ahref="#revokechatinvitelink">revokeChatInviteLink</a>. Returns the new invite link as <ahref="#chatinvitelink">ChatInviteLink</a> object.</p>
<tableclass="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>chat_id</td>
<td>Integer or String</td>
<td>Yes</td>
<td>Unique identifier for the target chat or username of the target channel (in the format <code>@channelusername</code>)</td>
</tr>
<tr>
<td>name</td>
<td>String</td>
<td>Optional</td>
<td>Invite link name; 0-32 characters</td>
</tr>
<tr>
<td>expire_date</td>
<td>Integer</td>
<td>Optional</td>
<td>Point in time (Unix timestamp) when the link will expire</td>
<td><em>True</em>, if users joining the chat via the link need to be approved by chat administrators. If <em>True</em>, <em>member_limit</em> can't be specified</td>
<p>Use this method to edit a non-primary invite link created by the bot. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the edited invite link as a <ahref="#chatinvitelink">ChatInviteLink</a> object.</p>
<tableclass="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>chat_id</td>
<td>Integer or String</td>
<td>Yes</td>
<td>Unique identifier for the target chat or username of the target channel (in the format <code>@channelusername</code>)</td>
</tr>
<tr>
<td>invite_link</td>
<td>String</td>
<td>Yes</td>
<td>The invite link to edit</td>
</tr>
<tr>
<td>name</td>
<td>String</td>
<td>Optional</td>
<td>Invite link name; 0-32 characters</td>
</tr>
<tr>
<td>expire_date</td>
<td>Integer</td>
<td>Optional</td>
<td>Point in time (Unix timestamp) when the link will expire</td>
<td><em>True</em>, if users joining the chat via the link need to be approved by chat administrators. If <em>True</em>, <em>member_limit</em> can't be specified</td>
<p>Use this method to revoke an invite link created by the bot. If the primary link is revoked, a new link is automatically generated. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the revoked invite link as <ahref="#chatinvitelink">ChatInviteLink</a> object.</p>
<tableclass="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>chat_id</td>
<td>Integer or String</td>
<td>Yes</td>
<td>Unique identifier of the target chat or username of the target channel (in the format <code>@channelusername</code>)</td>
<p>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 <em>can_invite_users</em> administrator right. Returns <em>True</em> on success.</p>
<tableclass="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>chat_id</td>
<td>Integer or String</td>
<td>Yes</td>
<td>Unique identifier for the target chat or username of the target channel (in the format <code>@channelusername</code>)</td>
<p>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 <em>can_invite_users</em> administrator right. Returns <em>True</em> on success.</p>
<tableclass="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>chat_id</td>
<td>Integer or String</td>
<td>Yes</td>
<td>Unique identifier for the target chat or username of the target channel (in the format <code>@channelusername</code>)</td>
<p>Use this method to set a new profile photo for the chat. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns <em>True</em> on success.</p>
<p>Use this method to delete a chat photo. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns <em>True</em> on success.</p>
<p>Use this method to change the title of a chat. Titles can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns <em>True</em> on success.</p>
<p>Use this method to change the description of a group, a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns <em>True</em> on success.</p>
<tableclass="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>chat_id</td>
<td>Integer or String</td>
<td>Yes</td>
<td>Unique identifier for the target chat or username of the target channel (in the format <code>@channelusername</code>)</td>
<p>Use this method to add a message to the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns <em>True</em> on success.</p>
<td>Pass <em>True</em> 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.</td>
<p>Use this method to remove a message from the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns <em>True</em> on success.</p>
<p>Use this method to clear the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns <em>True</em> on success.</p>
<p>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 <ahref="#chat">Chat</a> object on success.</p>
<tableclass="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>chat_id</td>
<td>Integer or String</td>
<td>Yes</td>
<td>Unique identifier for the target chat or username of the target supergroup or channel (in the format <code>@channelusername</code>)</td>
<p>Use this method to get a list of administrators in a chat, which aren't bots. Returns an Array of <ahref="#chatmember">ChatMember</a> objects.</p>
<p>Use this method to get information about a member of a chat. The method is guaranteed to work for other users, only if the bot is an administrator in the chat. Returns a <ahref="#chatmember">ChatMember</a> object on success.</p>
<p>Use this method to set a new group sticker set for a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Use the field <em>can_set_sticker_set</em> optionally returned in <ahref="#getchat">getChat</a> requests to check if the bot can use this method. Returns <em>True</em> on success.</p>
<tableclass="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>chat_id</td>
<td>Integer or String</td>
<td>Yes</td>
<td>Unique identifier for the target chat or username of the target supergroup (in the format <code>@supergroupusername</code>)</td>
</tr>
<tr>
<td>sticker_set_name</td>
<td>String</td>
<td>Yes</td>
<td>Name of the sticker set to be set as the group sticker set</td>
<p>Use this method to delete a group sticker set from a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Use the field <em>can_set_sticker_set</em> optionally returned in <ahref="#getchat">getChat</a> requests to check if the bot can use this method. Returns <em>True</em> on success.</p>
<tableclass="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>chat_id</td>
<td>Integer or String</td>
<td>Yes</td>
<td>Unique identifier for the target chat or username of the target supergroup (in the format <code>@supergroupusername</code>)</td>
<p>Use this method to get custom emoji stickers, which can be used as a forum topic icon by any user. Requires no parameters. Returns an Array of <ahref="#sticker">Sticker</a> objects.</p>
<p>Use this method to create a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the <em>can_manage_topics</em> administrator rights. Returns information about the created topic as a <ahref="#forumtopic">ForumTopic</a> object.</p>
<tableclass="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>chat_id</td>
<td>Integer or String</td>
<td>Yes</td>
<td>Unique identifier for the target chat or username of the target supergroup (in the format <code>@supergroupusername</code>)</td>
<td>Color of the topic icon in RGB format. Currently, must be one of 7322096 (0x6FB9F0), 16766590 (0xFFD67E), 13338331 (0xCB86DB), 9367192 (0x8EEE98), 16749490 (0xFF93B2), or 16478047 (0xFB6F5F)</td>
<td>Unique identifier of the custom emoji shown as the topic icon. Use <ahref="#getforumtopiciconstickers">getForumTopicIconStickers</a> to get all allowed custom emoji identifiers.</td>
<p>Use this method to edit name and icon of a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have <em>can_manage_topics</em> administrator rights, unless it is the creator of the topic. Returns <em>True</em> on success.</p>
<tableclass="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>chat_id</td>
<td>Integer or String</td>
<td>Yes</td>
<td>Unique identifier for the target chat or username of the target supergroup (in the format <code>@supergroupusername</code>)</td>
</tr>
<tr>
<td>message_thread_id</td>
<td>Integer</td>
<td>Yes</td>
<td>Unique identifier for the target message thread of the forum topic</td>
<td>New unique identifier of the custom emoji shown as the topic icon. Use <ahref="#getforumtopiciconstickers">getForumTopicIconStickers</a> to get all allowed custom emoji identifiers. Pass an empty string to remove the icon. If not specified, the current icon will be kept</td>
<p>Use this method to close an open topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the <em>can_manage_topics</em> administrator rights, unless it is the creator of the topic. Returns <em>True</em> on success.</p>
<tableclass="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>chat_id</td>
<td>Integer or String</td>
<td>Yes</td>
<td>Unique identifier for the target chat or username of the target supergroup (in the format <code>@supergroupusername</code>)</td>
</tr>
<tr>
<td>message_thread_id</td>
<td>Integer</td>
<td>Yes</td>
<td>Unique identifier for the target message thread of the forum topic</td>
<p>Use this method to reopen a closed topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the <em>can_manage_topics</em> administrator rights, unless it is the creator of the topic. Returns <em>True</em> on success.</p>
<tableclass="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>chat_id</td>
<td>Integer or String</td>
<td>Yes</td>
<td>Unique identifier for the target chat or username of the target supergroup (in the format <code>@supergroupusername</code>)</td>
</tr>
<tr>
<td>message_thread_id</td>
<td>Integer</td>
<td>Yes</td>
<td>Unique identifier for the target message thread of the forum topic</td>
<p>Use this method to delete a forum topic along with all its messages in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the <em>can_delete_messages</em> administrator rights. Returns <em>True</em> on success.</p>
<tableclass="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>chat_id</td>
<td>Integer or String</td>
<td>Yes</td>
<td>Unique identifier for the target chat or username of the target supergroup (in the format <code>@supergroupusername</code>)</td>
</tr>
<tr>
<td>message_thread_id</td>
<td>Integer</td>
<td>Yes</td>
<td>Unique identifier for the target message thread of the forum topic</td>
<p>Use this method to clear the list of pinned messages in a forum topic. The bot must be an administrator in the chat for this to work and must have the <em>can_pin_messages</em> administrator right in the supergroup. Returns <em>True</em> on success.</p>
<tableclass="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>chat_id</td>
<td>Integer or String</td>
<td>Yes</td>
<td>Unique identifier for the target chat or username of the target supergroup (in the format <code>@supergroupusername</code>)</td>
</tr>
<tr>
<td>message_thread_id</td>
<td>Integer</td>
<td>Yes</td>
<td>Unique identifier for the target message thread of the forum topic</td>
<p>Use this method to edit the name of the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have <em>can_manage_topics</em> administrator rights. Returns <em>True</em> on success.</p>
<tableclass="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>chat_id</td>
<td>Integer or String</td>
<td>Yes</td>
<td>Unique identifier for the target chat or username of the target supergroup (in the format <code>@supergroupusername</code>)</td>
<p>Use this method to close an open 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the <em>can_manage_topics</em> administrator rights. Returns <em>True</em> on success.</p>
<tableclass="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>chat_id</td>
<td>Integer or String</td>
<td>Yes</td>
<td>Unique identifier for the target chat or username of the target supergroup (in the format <code>@supergroupusername</code>)</td>
<p>Use this method to reopen a closed 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the <em>can_manage_topics</em> administrator rights. The topic will be automatically unhidden if it was hidden. Returns <em>True</em> on success.</p>
<tableclass="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>chat_id</td>
<td>Integer or String</td>
<td>Yes</td>
<td>Unique identifier for the target chat or username of the target supergroup (in the format <code>@supergroupusername</code>)</td>
<p>Use this method to hide the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the <em>can_manage_topics</em> administrator rights. The topic will be automatically closed if it was open. Returns <em>True</em> on success.</p>
<tableclass="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>chat_id</td>
<td>Integer or String</td>
<td>Yes</td>
<td>Unique identifier for the target chat or username of the target supergroup (in the format <code>@supergroupusername</code>)</td>
<p>Use this method to unhide the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the <em>can_manage_topics</em> administrator rights. Returns <em>True</em> on success.</p>
<tableclass="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>chat_id</td>
<td>Integer or String</td>
<td>Yes</td>
<td>Unique identifier for the target chat or username of the target supergroup (in the format <code>@supergroupusername</code>)</td>
<p>Use this method to send answers to callback queries sent from <ahref="/bots/features#inline-keyboards">inline keyboards</a>. The answer will be displayed to the user as a notification at the top of the chat screen or as an alert. On success, <em>True</em> is returned.</p>
<p>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 <ahref="https://t.me/botfather">@BotFather</a> and accept the terms. Otherwise, you may use links like <code>t.me/your_bot?start=XXXX</code> that open your bot with a parameter.</p>
<td>URL that will be opened by the user's client. If you have created a <ahref="#game">Game</a> and accepted the conditions via <ahref="https://t.me/botfather">@BotFather</a>, specify the URL that opens your game - note that this will only work if the query comes from a <ahref="#inlinekeyboardbutton"><em>callback_game</em></a> button.<br><br>Otherwise, you may use links like <code>t.me/your_bot?start=XXXX</code> that open your bot with a parameter.</td>
<td>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.</td>
<p>Use this method to change the list of the bot's commands. See <ahref="/bots/features#commands">this manual</a> for more details about bot commands. Returns <em>True</em> on success.</p>
<td>A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to <ahref="#botcommandscopedefault">BotCommandScopeDefault</a>.</td>
</tr>
<tr>
<td>language_code</td>
<td>String</td>
<td>Optional</td>
<td>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</td>
<p>Use this method to delete the list of the bot's commands for the given scope and user language. After deletion, <ahref="#determining-list-of-commands">higher level commands</a> will be shown to affected users. Returns <em>True</em> on success.</p>
<td>A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to <ahref="#botcommandscopedefault">BotCommandScopeDefault</a>.</td>
</tr>
<tr>
<td>language_code</td>
<td>String</td>
<td>Optional</td>
<td>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</td>
<p>Use this method to get the current list of the bot's commands for the given scope and user language. Returns an Array of <ahref="#botcommand">BotCommand</a> objects. If commands aren't set, an empty list is returned.</p>
<p>Use this method to get the current value of the bot's menu button in a private chat, or the default menu button. Returns <ahref="#menubutton">MenuButton</a> on success.</p>
<tableclass="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>chat_id</td>
<td>Integer</td>
<td>Optional</td>
<td>Unique identifier for the target private chat. If not specified, default bot's menu button will be returned</td>
<p>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 <em>True</em> on success.</p>
<td>A JSON-serialized object describing new default administrator rights. If not specified, the default administrator rights will be cleared.</td>
</tr>
<tr>
<td>for_channels</td>
<td>Boolean</td>
<td>Optional</td>
<td>Pass <em>True</em> 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.</td>
<p>Use this method to get the current default administrator rights of the bot. Returns <ahref="#chatadministratorrights">ChatAdministratorRights</a> on success.</p>
<tableclass="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>for_channels</td>
<td>Boolean</td>
<td>Optional</td>
<td>Pass <em>True</em> to get default administrator rights of the bot in channels. Otherwise, default administrator rights of the bot for groups and supergroups will be returned.</td>
<p>The following methods allow you to change an existing message in the message history instead of sending a new one with a result of an action. This is most useful for messages with <ahref="/bots/features#inline-keyboards">inline keyboards</a> using callback queries, but can also help reduce clutter in conversations with regular chat bots.</p>
<p>Please note, that it is currently only possible to edit messages without <em>reply_markup</em> or with <ahref="/bots/features#inline-keyboards">inline keyboards</a>.</p>
<p>Use this method to edit text and <ahref="#games">game</a> messages. On success, if the edited message is not an inline message, the edited <ahref="#message">Message</a> is returned, otherwise <em>True</em> is returned.</p>
<tableclass="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>chat_id</td>
<td>Integer or String</td>
<td>Optional</td>
<td>Required if <em>inline_message_id</em> is not specified. Unique identifier for the target chat or username of the target channel (in the format <code>@channelusername</code>)</td>
</tr>
<tr>
<td>message_id</td>
<td>Integer</td>
<td>Optional</td>
<td>Required if <em>inline_message_id</em> is not specified. Identifier of the message to edit</td>
</tr>
<tr>
<td>inline_message_id</td>
<td>String</td>
<td>Optional</td>
<td>Required if <em>chat_id</em> and <em>message_id</em> are not specified. Identifier of the inline message</td>
</tr>
<tr>
<td>text</td>
<td>String</td>
<td>Yes</td>
<td>New text of the message, 1-4096 characters after entities parsing</td>
</tr>
<tr>
<td>parse_mode</td>
<td>String</td>
<td>Optional</td>
<td>Mode for parsing entities in the message text. See <ahref="#formatting-options">formatting options</a> for more details.</td>
</tr>
<tr>
<td>entities</td>
<td>Array of <ahref="#messageentity">MessageEntity</a></td>
<td>Optional</td>
<td>A JSON-serialized list of special entities that appear in message text, which can be specified instead of <em>parse_mode</em></td>
</tr>
<tr>
<td>disable_web_page_preview</td>
<td>Boolean</td>
<td>Optional</td>
<td>Disables link previews for links in this message</td>
<p>Use this method to edit captions of messages. On success, if the edited message is not an inline message, the edited <ahref="#message">Message</a> is returned, otherwise <em>True</em> is returned.</p>
<tableclass="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>chat_id</td>
<td>Integer or String</td>
<td>Optional</td>
<td>Required if <em>inline_message_id</em> is not specified. Unique identifier for the target chat or username of the target channel (in the format <code>@channelusername</code>)</td>
</tr>
<tr>
<td>message_id</td>
<td>Integer</td>
<td>Optional</td>
<td>Required if <em>inline_message_id</em> is not specified. Identifier of the message to edit</td>
</tr>
<tr>
<td>inline_message_id</td>
<td>String</td>
<td>Optional</td>
<td>Required if <em>chat_id</em> and <em>message_id</em> are not specified. Identifier of the inline message</td>
</tr>
<tr>
<td>caption</td>
<td>String</td>
<td>Optional</td>
<td>New caption of the message, 0-1024 characters after entities parsing</td>
</tr>
<tr>
<td>parse_mode</td>
<td>String</td>
<td>Optional</td>
<td>Mode for parsing entities in the message caption. See <ahref="#formatting-options">formatting options</a> for more details.</td>
</tr>
<tr>
<td>caption_entities</td>
<td>Array of <ahref="#messageentity">MessageEntity</a></td>
<td>Optional</td>
<td>A JSON-serialized list of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em></td>
<p>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. When an inline message is edited, a new file can't be uploaded; use a previously uploaded file via its file_id or specify a URL. On success, if the edited message is not an inline message, the edited <ahref="#message">Message</a> is returned, otherwise <em>True</em> is returned.</p>
<td>Required if <em>inline_message_id</em> is not specified. Unique identifier for the target chat or username of the target channel (in the format <code>@channelusername</code>)</td>
</tr>
<tr>
<td>message_id</td>
<td>Integer</td>
<td>Optional</td>
<td>Required if <em>inline_message_id</em> is not specified. Identifier of the message to edit</td>
</tr>
<tr>
<td>inline_message_id</td>
<td>String</td>
<td>Optional</td>
<td>Required if <em>chat_id</em> and <em>message_id</em> are not specified. Identifier of the inline message</td>
</tr>
<tr>
<td>media</td>
<td><ahref="#inputmedia">InputMedia</a></td>
<td>Yes</td>
<td>A JSON-serialized object for a new media content of the message</td>
<p>Use this method to edit only the reply markup of messages. On success, if the edited message is not an inline message, the edited <ahref="#message">Message</a> is returned, otherwise <em>True</em> is returned.</p>
<tableclass="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>chat_id</td>
<td>Integer or String</td>
<td>Optional</td>
<td>Required if <em>inline_message_id</em> is not specified. Unique identifier for the target chat or username of the target channel (in the format <code>@channelusername</code>)</td>
</tr>
<tr>
<td>message_id</td>
<td>Integer</td>
<td>Optional</td>
<td>Required if <em>inline_message_id</em> is not specified. Identifier of the message to edit</td>
</tr>
<tr>
<td>inline_message_id</td>
<td>String</td>
<td>Optional</td>
<td>Required if <em>chat_id</em> and <em>message_id</em> are not specified. Identifier of the inline message</td>
<p>Use this method to delete a message, including service messages, with the following limitations:<br>- A message can only be deleted if it was sent less than 48 hours ago.<br>- Service messages about a supergroup, channel, or forum topic creation can't be deleted.<br>- A dice message in a private chat can only be deleted if it was sent more than 24 hours ago.<br>- Bots can delete outgoing messages in private chats, groups, and supergroups.<br>- Bots can delete incoming messages in private chats.<br>- Bots granted <em>can_post_messages</em> permissions can delete outgoing messages in channels.<br>- If the bot is an administrator of a group, it can delete any message there.<br>- If the bot has <em>can_delete_messages</em> permission in a supergroup or a channel, it can delete any message there.<br>Returns <em>True</em> on success.</p>
<td>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.</td>
<td>Type of the sticker, currently one of “regular”, “mask”, “custom_emoji”. The type of the sticker is independent from its format, which is determined by the fields <em>is_animated</em> and <em>is_video</em>.</td>
<td>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.</td>
</tr>
<tr>
<td>y_shift</td>
<td>Float number</td>
<td>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.</td>
</tr>
<tr>
<td>scale</td>
<td>Float number</td>
<td>Mask scaling coefficient. For example, 2.0 means double size.</td>
<p>Use this method to send static .WEBP, <ahref="https://telegram.org/blog/animated-stickers">animated</a> .TGS, or <ahref="https://telegram.org/blog/video-stickers-better-reactions">video</a> .WEBM stickers. On success, the sent <ahref="#message">Message</a> is returned.</p>
<tableclass="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>chat_id</td>
<td>Integer or String</td>
<td>Yes</td>
<td>Unique identifier for the target chat or username of the target channel (in the format <code>@channelusername</code>)</td>
<td>Sticker to send. Pass a file_id 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. <ahref="#sending-files">More information on Sending Files »</a></td>
<td>Sends the message <ahref="https://telegram.org/blog/channels-2-0#silent-messages">silently</a>. Users will receive a notification with no sound.</td>
</tr>
<tr>
<td>protect_content</td>
<td>Boolean</td>
<td>Optional</td>
<td>Protects the contents of the sent message from forwarding and saving</td>
</tr>
<tr>
<td>reply_to_message_id</td>
<td>Integer</td>
<td>Optional</td>
<td>If the message is a reply, ID of the original message</td>
<td><ahref="#inlinekeyboardmarkup">InlineKeyboardMarkup</a> or <ahref="#replykeyboardmarkup">ReplyKeyboardMarkup</a> or <ahref="#replykeyboardremove">ReplyKeyboardRemove</a> or <ahref="#forcereply">ForceReply</a></td>
<td>Additional interface options. A JSON-serialized object for an <ahref="/bots/features#inline-keyboards">inline keyboard</a>, <ahref="/bots/features#keyboards">custom reply keyboard</a>, instructions to remove reply keyboard or to force a reply from the user.</td>
<p>Use this method to upload a .PNG file with a sticker for later use in <em>createNewStickerSet</em> and <em>addStickerToSet</em> methods (can be used multiple times). Returns the uploaded <ahref="#file">File</a> on success.</p>
<td><strong>PNG</strong> 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. <ahref="#sending-files">More information on Sending Files »</a></td>
<p>Use this method to create a new sticker set owned by a user. The bot will be able to edit the sticker set thus created. You <strong>must</strong> use exactly one of the fields <em>png_sticker</em>, <em>tgs_sticker</em>, or <em>webm_sticker</em>. Returns <em>True</em> on success.</p>
<tableclass="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>user_id</td>
<td>Integer</td>
<td>Yes</td>
<td>User identifier of created sticker set owner</td>
<td>Short name of sticker set, to be used in <code>t.me/addstickers/</code> URLs (e.g., <em>animals</em>). Can contain only English letters, digits and underscores. Must begin with a letter, can't contain consecutive underscores and must end in <code>"_by_<bot_username>"</code>. <code><bot_username></code> is case insensitive. 1-64 characters.</td>
<td><strong>PNG</strong> 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 <em>file_id</em> 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. <ahref="#sending-files">More information on Sending Files »</a></td>
<td><strong>TGS</strong> animation with the sticker, uploaded using multipart/form-data. See <ahref="/stickers#animated-sticker-requirements"><ahref="https://core.telegram.org/stickers#animated-sticker-requirements">https://core.telegram.org/stickers#animated-sticker-requirements</a></a> for technical requirements</td>
<td><strong>WEBM</strong> video with the sticker, uploaded using multipart/form-data. See <ahref="/stickers#video-sticker-requirements"><ahref="https://core.telegram.org/stickers#video-sticker-requirements">https://core.telegram.org/stickers#video-sticker-requirements</a></a> for technical requirements</td>
<td>Type of stickers in the set, pass “regular” or “mask”. Custom emoji sticker sets can't be created via the Bot API at the moment. By default, a regular sticker set is created.</td>
<p>Use this method to add a new sticker to a set created by the bot. You <strong>must</strong> use exactly one of the fields <em>png_sticker</em>, <em>tgs_sticker</em>, or <em>webm_sticker</em>. Animated stickers can be added to animated sticker sets and only to them. Animated sticker sets can have up to 50 stickers. Static sticker sets can have up to 120 stickers. Returns <em>True</em> on success.</p>
<tableclass="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>user_id</td>
<td>Integer</td>
<td>Yes</td>
<td>User identifier of sticker set owner</td>
</tr>
<tr>
<td>name</td>
<td>String</td>
<td>Yes</td>
<td>Sticker set name</td>
</tr>
<tr>
<td>png_sticker</td>
<td><ahref="#inputfile">InputFile</a> or String</td>
<td><strong>PNG</strong> 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 <em>file_id</em> 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. <ahref="#sending-files">More information on Sending Files »</a></td>
<td><strong>TGS</strong> animation with the sticker, uploaded using multipart/form-data. See <ahref="/stickers#animated-sticker-requirements"><ahref="https://core.telegram.org/stickers#animated-sticker-requirements">https://core.telegram.org/stickers#animated-sticker-requirements</a></a> for technical requirements</td>
<td><strong>WEBM</strong> video with the sticker, uploaded using multipart/form-data. See <ahref="/stickers#video-sticker-requirements"><ahref="https://core.telegram.org/stickers#video-sticker-requirements">https://core.telegram.org/stickers#video-sticker-requirements</a></a> for technical requirements</td>
<p>Use this method to set the thumbnail of a sticker set. Animated thumbnails can be set for animated sticker sets only. Video thumbnails can be set only for video sticker sets only. Returns <em>True</em> on success.</p>
<tableclass="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>name</td>
<td>String</td>
<td>Yes</td>
<td>Sticker set name</td>
</tr>
<tr>
<td>user_id</td>
<td>Integer</td>
<td>Yes</td>
<td>User identifier of the sticker set owner</td>
</tr>
<tr>
<td>thumb</td>
<td><ahref="#inputfile">InputFile</a> or String</td>
<td>A <strong>PNG</strong> image with the thumbnail, must be up to 128 kilobytes in size and have width and height exactly 100px, or a <strong>TGS</strong> animation with the thumbnail up to 32 kilobytes in size; see <ahref="/stickers#animated-sticker-requirements"><ahref="https://core.telegram.org/stickers#animated-sticker-requirements">https://core.telegram.org/stickers#animated-sticker-requirements</a></a> for animated sticker technical requirements, or a <strong>WEBM</strong> video with the thumbnail up to 32 kilobytes in size; see <ahref="/stickers#video-sticker-requirements"><ahref="https://core.telegram.org/stickers#video-sticker-requirements">https://core.telegram.org/stickers#video-sticker-requirements</a></a> for video sticker technical requirements. Pass a <em>file_id</em> 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. <ahref="#sending-files">More information on Sending Files »</a>. Animated sticker set thumbnails can't be uploaded via HTTP URL.</td>
<p>The following methods and objects allow your bot to work in <ahref="/bots/inline">inline mode</a>.<br>Please see our <ahref="/bots/inline">Introduction to Inline bots</a> for more details.</p>
<p>To enable this option, send the <code>/setinline</code> command to <ahref="https://t.me/botfather">@BotFather</a> and provide the placeholder text that the user will see in the input field after typing your bot's name.</p>
<td><em>Optional</em>. Type of the chat from which the inline query was sent. Can be either “sender” for a private chat with the inline query sender, “private”, “group”, “supergroup”, or “channel”. 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</td>
<p>Use this method to send answers to an inline query. On success, <em>True</em> is returned.<br>No more than <strong>50</strong> results per query are allowed.</p>
<td>Pass <em>True</em> 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</td>
<td>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.</td>
<td>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 <em>switch_pm_parameter</em></td>
<td><ahref="/bots/features#deep-linking">Deep-linking</a> parameter for the /start message sent to the bot when user presses the switch button. 1-64 characters, only <code>A-Z</code>, <code>a-z</code>, <code>0-9</code>, <code>_</code> and <code>-</code> are allowed.<br><br><em>Example:</em> 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 <ahref="#inlinekeyboardmarkup"><em>switch_inline</em></a> button so that the user can easily return to the chat where they wanted to use the bot's inline capabilities.</td>
<p><strong>Note:</strong> All URLs passed in inline query results will be available to end users and therefore must be assumed to be <strong>public</strong>.</p>
<p>Represents a link to a photo. By default, this photo will be sent by the user with optional caption. Alternatively, you can use <em>input_message_content</em> to send a message with the specified content instead of the photo.</p>
<tableclass="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>type</td>
<td>String</td>
<td>Type of the result, must be <em>photo</em></td>
</tr>
<tr>
<td>id</td>
<td>String</td>
<td>Unique identifier for this result, 1-64 bytes</td>
</tr>
<tr>
<td>photo_url</td>
<td>String</td>
<td>A valid URL of the photo. Photo must be in <strong>JPEG</strong> format. Photo size must not exceed 5MB</td>
</tr>
<tr>
<td>thumb_url</td>
<td>String</td>
<td>URL of the thumbnail for the photo</td>
</tr>
<tr>
<td>photo_width</td>
<td>Integer</td>
<td><em>Optional</em>. Width of the photo</td>
</tr>
<tr>
<td>photo_height</td>
<td>Integer</td>
<td><em>Optional</em>. Height of the photo</td>
</tr>
<tr>
<td>title</td>
<td>String</td>
<td><em>Optional</em>. Title for the result</td>
</tr>
<tr>
<td>description</td>
<td>String</td>
<td><em>Optional</em>. Short description of the result</td>
</tr>
<tr>
<td>caption</td>
<td>String</td>
<td><em>Optional</em>. Caption of the photo to be sent, 0-1024 characters after entities parsing</td>
</tr>
<tr>
<td>parse_mode</td>
<td>String</td>
<td><em>Optional</em>. Mode for parsing entities in the photo caption. See <ahref="#formatting-options">formatting options</a> for more details.</td>
</tr>
<tr>
<td>caption_entities</td>
<td>Array of <ahref="#messageentity">MessageEntity</a></td>
<td><em>Optional</em>. List of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em></td>
<p>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 <em>input_message_content</em> to send a message with the specified content instead of the animation.</p>
<tableclass="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>type</td>
<td>String</td>
<td>Type of the result, must be <em>gif</em></td>
</tr>
<tr>
<td>id</td>
<td>String</td>
<td>Unique identifier for this result, 1-64 bytes</td>
</tr>
<tr>
<td>gif_url</td>
<td>String</td>
<td>A valid URL for the GIF file. File size must not exceed 1MB</td>
</tr>
<tr>
<td>gif_width</td>
<td>Integer</td>
<td><em>Optional</em>. Width of the GIF</td>
</tr>
<tr>
<td>gif_height</td>
<td>Integer</td>
<td><em>Optional</em>. Height of the GIF</td>
</tr>
<tr>
<td>gif_duration</td>
<td>Integer</td>
<td><em>Optional</em>. Duration of the GIF in seconds</td>
</tr>
<tr>
<td>thumb_url</td>
<td>String</td>
<td>URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result</td>
<p>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 <em>input_message_content</em> to send a message with the specified content instead of the animation.</p>
<tableclass="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>type</td>
<td>String</td>
<td>Type of the result, must be <em>mpeg4_gif</em></td>
</tr>
<tr>
<td>id</td>
<td>String</td>
<td>Unique identifier for this result, 1-64 bytes</td>
<p>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 <em>input_message_content</em> to send a message with the specified content instead of the video.</p>
<blockquote>
<p>If an InlineQueryResultVideo message contains an embedded video (e.g., YouTube), you <strong>must</strong> replace its content using <em>input_message_content</em>.</p>
</blockquote>
<tableclass="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>type</td>
<td>String</td>
<td>Type of the result, must be <em>video</em></td>
</tr>
<tr>
<td>id</td>
<td>String</td>
<td>Unique identifier for this result, 1-64 bytes</td>
</tr>
<tr>
<td>video_url</td>
<td>String</td>
<td>A valid URL for the embedded video player or video file</td>
<td><em>Optional</em>. Content of the message to be sent instead of the video. This field is <strong>required</strong> if InlineQueryResultVideo is used to send an HTML-page as a result (e.g., a YouTube video).</td>
<p>Represents a link to an MP3 audio file. By default, this audio file will be sent by the user. Alternatively, you can use <em>input_message_content</em> to send a message with the specified content instead of the audio.</p>
<tableclass="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>type</td>
<td>String</td>
<td>Type of the result, must be <em>audio</em></td>
</tr>
<tr>
<td>id</td>
<td>String</td>
<td>Unique identifier for this result, 1-64 bytes</td>
</tr>
<tr>
<td>audio_url</td>
<td>String</td>
<td>A valid URL for the audio file</td>
</tr>
<tr>
<td>title</td>
<td>String</td>
<td>Title</td>
</tr>
<tr>
<td>caption</td>
<td>String</td>
<td><em>Optional</em>. Caption, 0-1024 characters after entities parsing</td>
</tr>
<tr>
<td>parse_mode</td>
<td>String</td>
<td><em>Optional</em>. Mode for parsing entities in the audio caption. See <ahref="#formatting-options">formatting options</a> for more details.</td>
</tr>
<tr>
<td>caption_entities</td>
<td>Array of <ahref="#messageentity">MessageEntity</a></td>
<td><em>Optional</em>. List of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em></td>
</tr>
<tr>
<td>performer</td>
<td>String</td>
<td><em>Optional</em>. Performer</td>
</tr>
<tr>
<td>audio_duration</td>
<td>Integer</td>
<td><em>Optional</em>. Audio duration in seconds</td>
<p>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 <em>input_message_content</em> to send a message with the specified content instead of the the voice message.</p>
<tableclass="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>type</td>
<td>String</td>
<td>Type of the result, must be <em>voice</em></td>
</tr>
<tr>
<td>id</td>
<td>String</td>
<td>Unique identifier for this result, 1-64 bytes</td>
</tr>
<tr>
<td>voice_url</td>
<td>String</td>
<td>A valid URL for the voice recording</td>
</tr>
<tr>
<td>title</td>
<td>String</td>
<td>Recording title</td>
</tr>
<tr>
<td>caption</td>
<td>String</td>
<td><em>Optional</em>. Caption, 0-1024 characters after entities parsing</td>
</tr>
<tr>
<td>parse_mode</td>
<td>String</td>
<td><em>Optional</em>. Mode for parsing entities in the voice message caption. See <ahref="#formatting-options">formatting options</a> for more details.</td>
</tr>
<tr>
<td>caption_entities</td>
<td>Array of <ahref="#messageentity">MessageEntity</a></td>
<td><em>Optional</em>. List of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em></td>
</tr>
<tr>
<td>voice_duration</td>
<td>Integer</td>
<td><em>Optional</em>. Recording duration in seconds</td>
<p>Represents a link to a file. By default, this file will be sent by the user with an optional caption. Alternatively, you can use <em>input_message_content</em> to send a message with the specified content instead of the file. Currently, only <strong>.PDF</strong> and <strong>.ZIP</strong> files can be sent using this method.</p>
<tableclass="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>type</td>
<td>String</td>
<td>Type of the result, must be <em>document</em></td>
</tr>
<tr>
<td>id</td>
<td>String</td>
<td>Unique identifier for this result, 1-64 bytes</td>
</tr>
<tr>
<td>title</td>
<td>String</td>
<td>Title for the result</td>
</tr>
<tr>
<td>caption</td>
<td>String</td>
<td><em>Optional</em>. Caption of the document to be sent, 0-1024 characters after entities parsing</td>
</tr>
<tr>
<td>parse_mode</td>
<td>String</td>
<td><em>Optional</em>. Mode for parsing entities in the document caption. See <ahref="#formatting-options">formatting options</a> for more details.</td>
</tr>
<tr>
<td>caption_entities</td>
<td>Array of <ahref="#messageentity">MessageEntity</a></td>
<td><em>Optional</em>. List of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em></td>
<p>Represents a location on a map. By default, the location will be sent by the user. Alternatively, you can use <em>input_message_content</em> to send a message with the specified content instead of the location.</p>
<tableclass="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>type</td>
<td>String</td>
<td>Type of the result, must be <em>location</em></td>
</tr>
<tr>
<td>id</td>
<td>String</td>
<td>Unique identifier for this result, 1-64 Bytes</td>
</tr>
<tr>
<td>latitude</td>
<td>Float number</td>
<td>Location latitude in degrees</td>
</tr>
<tr>
<td>longitude</td>
<td>Float number</td>
<td>Location longitude in degrees</td>
</tr>
<tr>
<td>title</td>
<td>String</td>
<td>Location title</td>
</tr>
<tr>
<td>horizontal_accuracy</td>
<td>Float number</td>
<td><em>Optional</em>. The radius of uncertainty for the location, measured in meters; 0-1500</td>
</tr>
<tr>
<td>live_period</td>
<td>Integer</td>
<td><em>Optional</em>. Period in seconds for which the location can be updated, should be between 60 and 86400.</td>
</tr>
<tr>
<td>heading</td>
<td>Integer</td>
<td><em>Optional</em>. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.</td>
</tr>
<tr>
<td>proximity_alert_radius</td>
<td>Integer</td>
<td><em>Optional</em>. For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.</td>
<p>Represents a venue. By default, the venue will be sent by the user. Alternatively, you can use <em>input_message_content</em> to send a message with the specified content instead of the venue.</p>
<tableclass="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>type</td>
<td>String</td>
<td>Type of the result, must be <em>venue</em></td>
</tr>
<tr>
<td>id</td>
<td>String</td>
<td>Unique identifier for this result, 1-64 Bytes</td>
</tr>
<tr>
<td>latitude</td>
<td>Float</td>
<td>Latitude of the venue location in degrees</td>
</tr>
<tr>
<td>longitude</td>
<td>Float</td>
<td>Longitude of the venue location in degrees</td>
</tr>
<tr>
<td>title</td>
<td>String</td>
<td>Title of the venue</td>
</tr>
<tr>
<td>address</td>
<td>String</td>
<td>Address of the venue</td>
</tr>
<tr>
<td>foursquare_id</td>
<td>String</td>
<td><em>Optional</em>. Foursquare identifier of the venue if known</td>
<td><em>Optional</em>. Foursquare type of the venue, if known. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.)</td>
<td><em>Optional</em>. Google Places identifier of the venue</td>
</tr>
<tr>
<td>google_place_type</td>
<td>String</td>
<td><em>Optional</em>. Google Places type of the venue. (See <ahref="https://developers.google.com/places/web-service/supported_types">supported types</a>.)</td>
<p>Represents a contact with a phone number. By default, this contact will be sent by the user. Alternatively, you can use <em>input_message_content</em> to send a message with the specified content instead of the contact.</p>
<tableclass="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>type</td>
<td>String</td>
<td>Type of the result, must be <em>contact</em></td>
</tr>
<tr>
<td>id</td>
<td>String</td>
<td>Unique identifier for this result, 1-64 Bytes</td>
<p><strong>Note:</strong> This will only work in Telegram versions released after October 1, 2016. Older clients will not display any inline results if a game result is among them.</p>
<p>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 <em>input_message_content</em> to send a message with the specified content instead of the photo.</p>
<tableclass="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>type</td>
<td>String</td>
<td>Type of the result, must be <em>photo</em></td>
</tr>
<tr>
<td>id</td>
<td>String</td>
<td>Unique identifier for this result, 1-64 bytes</td>
</tr>
<tr>
<td>photo_file_id</td>
<td>String</td>
<td>A valid file identifier of the photo</td>
</tr>
<tr>
<td>title</td>
<td>String</td>
<td><em>Optional</em>. Title for the result</td>
</tr>
<tr>
<td>description</td>
<td>String</td>
<td><em>Optional</em>. Short description of the result</td>
</tr>
<tr>
<td>caption</td>
<td>String</td>
<td><em>Optional</em>. Caption of the photo to be sent, 0-1024 characters after entities parsing</td>
</tr>
<tr>
<td>parse_mode</td>
<td>String</td>
<td><em>Optional</em>. Mode for parsing entities in the photo caption. See <ahref="#formatting-options">formatting options</a> for more details.</td>
</tr>
<tr>
<td>caption_entities</td>
<td>Array of <ahref="#messageentity">MessageEntity</a></td>
<td><em>Optional</em>. List of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em></td>
<p>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 <em>input_message_content</em> to send a message with specified content instead of the animation.</p>
<tableclass="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>type</td>
<td>String</td>
<td>Type of the result, must be <em>gif</em></td>
</tr>
<tr>
<td>id</td>
<td>String</td>
<td>Unique identifier for this result, 1-64 bytes</td>
</tr>
<tr>
<td>gif_file_id</td>
<td>String</td>
<td>A valid file identifier for the GIF file</td>
</tr>
<tr>
<td>title</td>
<td>String</td>
<td><em>Optional</em>. Title for the result</td>
</tr>
<tr>
<td>caption</td>
<td>String</td>
<td><em>Optional</em>. Caption of the GIF file to be sent, 0-1024 characters after entities parsing</td>
</tr>
<tr>
<td>parse_mode</td>
<td>String</td>
<td><em>Optional</em>. Mode for parsing entities in the caption. See <ahref="#formatting-options">formatting options</a> for more details.</td>
</tr>
<tr>
<td>caption_entities</td>
<td>Array of <ahref="#messageentity">MessageEntity</a></td>
<td><em>Optional</em>. List of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em></td>
<p>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 <em>input_message_content</em> to send a message with the specified content instead of the animation.</p>
<tableclass="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>type</td>
<td>String</td>
<td>Type of the result, must be <em>mpeg4_gif</em></td>
</tr>
<tr>
<td>id</td>
<td>String</td>
<td>Unique identifier for this result, 1-64 bytes</td>
<p>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 <em>input_message_content</em> to send a message with the specified content instead of the sticker.</p>
<tableclass="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>type</td>
<td>String</td>
<td>Type of the result, must be <em>sticker</em></td>
</tr>
<tr>
<td>id</td>
<td>String</td>
<td>Unique identifier for this result, 1-64 bytes</td>
<td><em>Optional</em>. Content of the message to be sent instead of the sticker</td>
</tr>
</tbody>
</table>
<p><strong>Note:</strong> This will only work in Telegram versions released after 9 April, 2016 for static stickers and after 06 July, 2019 for <ahref="https://telegram.org/blog/animated-stickers">animated stickers</a>. Older clients will ignore them.</p>
<p>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 <em>input_message_content</em> to send a message with the specified content instead of the file.</p>
<tableclass="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>type</td>
<td>String</td>
<td>Type of the result, must be <em>document</em></td>
</tr>
<tr>
<td>id</td>
<td>String</td>
<td>Unique identifier for this result, 1-64 bytes</td>
</tr>
<tr>
<td>title</td>
<td>String</td>
<td>Title for the result</td>
</tr>
<tr>
<td>document_file_id</td>
<td>String</td>
<td>A valid file identifier for the file</td>
</tr>
<tr>
<td>description</td>
<td>String</td>
<td><em>Optional</em>. Short description of the result</td>
</tr>
<tr>
<td>caption</td>
<td>String</td>
<td><em>Optional</em>. Caption of the document to be sent, 0-1024 characters after entities parsing</td>
</tr>
<tr>
<td>parse_mode</td>
<td>String</td>
<td><em>Optional</em>. Mode for parsing entities in the document caption. See <ahref="#formatting-options">formatting options</a> for more details.</td>
</tr>
<tr>
<td>caption_entities</td>
<td>Array of <ahref="#messageentity">MessageEntity</a></td>
<td><em>Optional</em>. List of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em></td>
<p>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 <em>input_message_content</em> to send a message with the specified content instead of the video.</p>
<tableclass="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>type</td>
<td>String</td>
<td>Type of the result, must be <em>video</em></td>
</tr>
<tr>
<td>id</td>
<td>String</td>
<td>Unique identifier for this result, 1-64 bytes</td>
</tr>
<tr>
<td>video_file_id</td>
<td>String</td>
<td>A valid file identifier for the video file</td>
</tr>
<tr>
<td>title</td>
<td>String</td>
<td>Title for the result</td>
</tr>
<tr>
<td>description</td>
<td>String</td>
<td><em>Optional</em>. Short description of the result</td>
</tr>
<tr>
<td>caption</td>
<td>String</td>
<td><em>Optional</em>. Caption of the video to be sent, 0-1024 characters after entities parsing</td>
</tr>
<tr>
<td>parse_mode</td>
<td>String</td>
<td><em>Optional</em>. Mode for parsing entities in the video caption. See <ahref="#formatting-options">formatting options</a> for more details.</td>
</tr>
<tr>
<td>caption_entities</td>
<td>Array of <ahref="#messageentity">MessageEntity</a></td>
<td><em>Optional</em>. List of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em></td>
<p>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 <em>input_message_content</em> to send a message with the specified content instead of the voice message.</p>
<tableclass="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>type</td>
<td>String</td>
<td>Type of the result, must be <em>voice</em></td>
</tr>
<tr>
<td>id</td>
<td>String</td>
<td>Unique identifier for this result, 1-64 bytes</td>
</tr>
<tr>
<td>voice_file_id</td>
<td>String</td>
<td>A valid file identifier for the voice message</td>
</tr>
<tr>
<td>title</td>
<td>String</td>
<td>Voice message title</td>
</tr>
<tr>
<td>caption</td>
<td>String</td>
<td><em>Optional</em>. Caption, 0-1024 characters after entities parsing</td>
</tr>
<tr>
<td>parse_mode</td>
<td>String</td>
<td><em>Optional</em>. Mode for parsing entities in the voice message caption. See <ahref="#formatting-options">formatting options</a> for more details.</td>
</tr>
<tr>
<td>caption_entities</td>
<td>Array of <ahref="#messageentity">MessageEntity</a></td>
<td><em>Optional</em>. List of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em></td>
<p>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 <em>input_message_content</em> to send a message with the specified content instead of the audio.</p>
<tableclass="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>type</td>
<td>String</td>
<td>Type of the result, must be <em>audio</em></td>
</tr>
<tr>
<td>id</td>
<td>String</td>
<td>Unique identifier for this result, 1-64 bytes</td>
</tr>
<tr>
<td>audio_file_id</td>
<td>String</td>
<td>A valid file identifier for the audio file</td>
</tr>
<tr>
<td>caption</td>
<td>String</td>
<td><em>Optional</em>. Caption, 0-1024 characters after entities parsing</td>
</tr>
<tr>
<td>parse_mode</td>
<td>String</td>
<td><em>Optional</em>. Mode for parsing entities in the audio caption. See <ahref="#formatting-options">formatting options</a> for more details.</td>
</tr>
<tr>
<td>caption_entities</td>
<td>Array of <ahref="#messageentity">MessageEntity</a></td>
<td><em>Optional</em>. List of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em></td>
<p>This object represents the content of a message to be sent as a result of an inline query. Telegram clients currently support the following 5 types:</p>
<p>Represents the <ahref="#inputmessagecontent">content</a> of a location message to be sent as the result of an inline query.</p>
<tableclass="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>latitude</td>
<td>Float</td>
<td>Latitude of the location in degrees</td>
</tr>
<tr>
<td>longitude</td>
<td>Float</td>
<td>Longitude of the location in degrees</td>
</tr>
<tr>
<td>horizontal_accuracy</td>
<td>Float number</td>
<td><em>Optional</em>. The radius of uncertainty for the location, measured in meters; 0-1500</td>
</tr>
<tr>
<td>live_period</td>
<td>Integer</td>
<td><em>Optional</em>. Period in seconds for which the location can be updated, should be between 60 and 86400.</td>
</tr>
<tr>
<td>heading</td>
<td>Integer</td>
<td><em>Optional</em>. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.</td>
</tr>
<tr>
<td>proximity_alert_radius</td>
<td>Integer</td>
<td><em>Optional</em>. For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.</td>
<td><em>Optional</em>. Foursquare type of the venue, if known. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.)</td>
<td><em>Optional</em>. Google Places identifier of the venue</td>
</tr>
<tr>
<td>google_place_type</td>
<td>String</td>
<td><em>Optional</em>. Google Places type of the venue. (See <ahref="https://developers.google.com/places/web-service/supported_types">supported types</a>.)</td>
<td><em>Optional</em>. The maximum accepted amount for tips in the <em>smallest units</em> of the currency (integer, <strong>not</strong> float/double). For example, for a maximum tip of <code>US$ 1.45</code> pass <code>max_tip_amount = 145</code>. See the <em>exp</em> parameter in <ahref="/bots/payments/currencies.json">currencies.json</a>, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0</td>
<td><em>Optional</em>. A JSON-serialized array of suggested amounts of tip in the <em>smallest units</em> of the currency (integer, <strong>not</strong> 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 <em>max_tip_amount</em>.</td>
</tr>
<tr>
<td>provider_data</td>
<td>String</td>
<td><em>Optional</em>. 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.</td>
<p>Represents a <ahref="#inlinequeryresult">result</a> of an inline query that was chosen by the user and sent to their chat partner.</p>
<tableclass="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>result_id</td>
<td>String</td>
<td>The unique identifier for the result that was chosen</td>
</tr>
<tr>
<td>from</td>
<td><ahref="#user">User</a></td>
<td>The user that chose the result</td>
</tr>
<tr>
<td>location</td>
<td><ahref="#location">Location</a></td>
<td><em>Optional</em>. Sender location, only for bots that require user location</td>
</tr>
<tr>
<td>inline_message_id</td>
<td>String</td>
<td><em>Optional</em>. Identifier of the sent inline message. Available only if there is an <ahref="#inlinekeyboardmarkup">inline keyboard</a> attached to the message. Will be also received in <ahref="#callbackquery">callback queries</a> and can be used to <ahref="#updating-messages">edit</a> the message.</td>
</tr>
<tr>
<td>query</td>
<td>String</td>
<td>The query that was used to obtain the result</td>
<p><strong>Note:</strong> It is necessary to enable <ahref="/bots/inline#collecting-feedback">inline feedback</a> via <ahref="https://t.me/botfather">@BotFather</a> in order to receive these objects in updates.</p>
<p>Use this method to set the result of an interaction with a <ahref="/bots/webapps">Web App</a> and send a corresponding message on behalf of the user to the chat from which the query originated. On success, a <ahref="#sentwebappmessage">SentWebAppMessage</a> object is returned.</p>
<tableclass="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>web_app_query_id</td>
<td>String</td>
<td>Yes</td>
<td>Unique identifier for the query to be answered</td>
<td><em>Optional</em>. Identifier of the sent inline message. Available only if there is an <ahref="#inlinekeyboardmarkup">inline keyboard</a> attached to the message.</td>
<p>Your bot can accept payments from Telegram users. Please see the <ahref="/bots/payments">introduction to payments</a> for more details on the process and how to set up payments for your bot. Please note that users will need Telegram v.4.0 or higher to use payments (released on May 18, 2017).</p>
<td>The maximum accepted amount for tips in the <em>smallest units</em> of the currency (integer, <strong>not</strong> float/double). For example, for a maximum tip of <code>US$ 1.45</code> pass <code>max_tip_amount = 145</code>. See the <em>exp</em> parameter in <ahref="/bots/payments/currencies.json">currencies.json</a>, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0</td>
<td>A JSON-serialized array of suggested amounts of tips in the <em>smallest units</em> of the currency (integer, <strong>not</strong> 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 <em>max_tip_amount</em>.</td>
</tr>
<tr>
<td>start_parameter</td>
<td>String</td>
<td>Optional</td>
<td>Unique deep-linking parameter. If left empty, <strong>forwarded copies</strong> of the sent message will have a <em>Pay</em> 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 <em>URL</em> button with a deep link to the bot (instead of a <em>Pay</em> button), with the value used as the start parameter</td>
<td>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.</td>
<td>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.</td>
<td>Sends the message <ahref="https://telegram.org/blog/channels-2-0#silent-messages">silently</a>. Users will receive a notification with no sound.</td>
</tr>
<tr>
<td>protect_content</td>
<td>Boolean</td>
<td>Optional</td>
<td>Protects the contents of the sent message from forwarding and saving</td>
</tr>
<tr>
<td>reply_to_message_id</td>
<td>Integer</td>
<td>Optional</td>
<td>If the message is a reply, ID of the original message</td>
<td>A JSON-serialized object for an <ahref="/bots/features#inline-keyboards">inline keyboard</a>. If empty, one 'Pay <code>total price</code>' button will be shown. If not empty, the first button must be a Pay button.</td>
<td>The maximum accepted amount for tips in the <em>smallest units</em> of the currency (integer, <strong>not</strong> float/double). For example, for a maximum tip of <code>US$ 1.45</code> pass <code>max_tip_amount = 145</code>. See the <em>exp</em> parameter in <ahref="/bots/payments/currencies.json">currencies.json</a>, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0</td>
<td>A JSON-serialized array of suggested amounts of tips in the <em>smallest units</em> of the currency (integer, <strong>not</strong> 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 <em>max_tip_amount</em>.</td>
</tr>
<tr>
<td>provider_data</td>
<td>String</td>
<td>Optional</td>
<td>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.</td>
</tr>
<tr>
<td>photo_url</td>
<td>String</td>
<td>Optional</td>
<td>URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service.</td>
<p>If you sent an invoice requesting a shipping address and the parameter <em>is_flexible</em> was specified, the Bot API will send an <ahref="#update">Update</a> with a <em>shipping_query</em> field to the bot. Use this method to reply to shipping queries. On success, <em>True</em> is returned.</p>
<tableclass="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>shipping_query_id</td>
<td>String</td>
<td>Yes</td>
<td>Unique identifier for the query to be answered</td>
<td>Pass <em>True</em> if delivery to the specified address is possible and <em>False</em> if there are any problems (for example, if delivery to the specified address is not possible)</td>
<td>Required if <em>ok</em> is <em>False</em>. 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.</td>
<p>Once the user has confirmed their payment and shipping details, the Bot API sends the final confirmation in the form of an <ahref="#update">Update</a> with the field <em>pre_checkout_query</em>. Use this method to respond to such pre-checkout queries. On success, <em>True</em> is returned. <strong>Note:</strong> The Bot API must receive an answer within 10 seconds after the pre-checkout query was sent.</p>
<tableclass="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>pre_checkout_query_id</td>
<td>String</td>
<td>Yes</td>
<td>Unique identifier for the query to be answered</td>
</tr>
<tr>
<td>ok</td>
<td>Boolean</td>
<td>Yes</td>
<td>Specify <em>True</em> if everything is alright (goods are available, etc.) and the bot is ready to proceed with the order. Use <em>False</em> if there are any problems.</td>
<td>Required if <em>ok</em> is <em>False</em>. 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.</td>
<td>Price of the product in the <em>smallest units</em> of the <ahref="/bots/payments#supported-currencies">currency</a> (integer, <strong>not</strong> float/double). For example, for a price of <code>US$ 1.45</code> pass <code>amount = 145</code>. See the <em>exp</em> parameter in <ahref="/bots/payments/currencies.json">currencies.json</a>, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).</td>
<td>Total price in the <em>smallest units</em> of the currency (integer, <strong>not</strong> float/double). For example, for a price of <code>US$ 1.45</code> pass <code>amount = 145</code>. See the <em>exp</em> parameter in <ahref="/bots/payments/currencies.json">currencies.json</a>, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).</td>
<td>Total price in the <em>smallest units</em> of the currency (integer, <strong>not</strong> float/double). For example, for a price of <code>US$ 1.45</code> pass <code>amount = 145</code>. See the <em>exp</em> parameter in <ahref="/bots/payments/currencies.json">currencies.json</a>, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).</td>
<td>Total price in the <em>smallest units</em> of the currency (integer, <strong>not</strong> float/double). For example, for a price of <code>US$ 1.45</code> pass <code>amount = 145</code>. See the <em>exp</em> parameter in <ahref="/bots/payments/currencies.json">currencies.json</a>, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).</td>
<p><strong>Telegram Passport</strong> is a unified authorization method for services that require personal identification. Users can upload their documents once, then instantly share their data with services that require real-world ID (finance, ICOs, etc.). Please see the <ahref="/passport">manual</a> for details.</p>
<p>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.</p>
<td>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.</td>
<td><em>Optional</em>. Base64-encoded encrypted Telegram Passport element data provided by the user, available for “personal_details”, “passport”, “driver_license”, “identity_card”, “internal_passport” and “address” types. Can be decrypted and verified using the accompanying <ahref="#encryptedcredentials">EncryptedCredentials</a>.</td>
<td><em>Optional</em>. Array of encrypted files with documents provided by the user, available for “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration” and “temporary_registration” types. Files can be decrypted and verified using the accompanying <ahref="#encryptedcredentials">EncryptedCredentials</a>.</td>
<td><em>Optional</em>. Encrypted file with the front side of the document, provided by the user. Available for “passport”, “driver_license”, “identity_card” and “internal_passport”. The file can be decrypted and verified using the accompanying <ahref="#encryptedcredentials">EncryptedCredentials</a>.</td>
<td><em>Optional</em>. Encrypted file with the reverse side of the document, provided by the user. Available for “driver_license” and “identity_card”. The file can be decrypted and verified using the accompanying <ahref="#encryptedcredentials">EncryptedCredentials</a>.</td>
<td><em>Optional</em>. Encrypted file with the selfie of the user holding a document, provided by the user; available for “passport”, “driver_license”, “identity_card” and “internal_passport”. The file can be decrypted and verified using the accompanying <ahref="#encryptedcredentials">EncryptedCredentials</a>.</td>
<td><em>Optional</em>. Array of encrypted files with translated versions of documents provided by the user. Available if requested for “passport”, “driver_license”, “identity_card”, “internal_passport”, “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration” and “temporary_registration” types. Files can be decrypted and verified using the accompanying <ahref="#encryptedcredentials">EncryptedCredentials</a>.</td>
<p>Describes data required for decrypting and authenticating <ahref="#encryptedpassportelement">EncryptedPassportElement</a>. See the <ahref="/passport#receiving-information">Telegram Passport Documentation</a> for a complete description of the data decryption and authentication processes.</p>
<td>Base64-encoded encrypted JSON-serialized data with unique user's payload, data hashes and secrets required for <ahref="#encryptedpassportelement">EncryptedPassportElement</a> decryption and authentication</td>
<p>Informs a user that some of the Telegram Passport elements they provided contains errors. The user will not be able to re-submit their Passport to you until the errors are fixed (the contents of the field for which you returned the error must change). Returns <em>True</em> on success.</p>
<p>Use this if the data submitted by the user doesn't satisfy the standards your service requires for any reason. For example, if a birthday date seems invalid, a submitted document is blurry, a scan shows evidence of tampering, etc. Supply some details in the error message to make sure the user knows how to correct the issues.</p>
<p>Represents an issue in one of the data fields that was provided by the user. The error is considered resolved when the field's value changes.</p>
<td>The section of the user's Telegram Passport which has the error, one of “personal_details”, “passport”, “driver_license”, “identity_card”, “internal_passport”, “address”</td>
<p>Represents an issue with the front side of a document. The error is considered resolved when the file with the front side of the document changes.</p>
<tableclass="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>source</td>
<td>String</td>
<td>Error source, must be <em>front_side</em></td>
<td>The section of the user's Telegram Passport which has the issue, one of “passport”, “driver_license”, “identity_card”, “internal_passport”</td>
<p>Represents an issue with the reverse side of a document. The error is considered resolved when the file with reverse side of the document changes.</p>
<tableclass="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>source</td>
<td>String</td>
<td>Error source, must be <em>reverse_side</em></td>
<td>The section of the user's Telegram Passport which has the issue, one of “passport”, “driver_license”, “identity_card”, “internal_passport”</td>
<td>The section of the user's Telegram Passport which has the issue, one of “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration”, “temporary_registration”</td>
<td>The section of the user's Telegram Passport which has the issue, one of “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration”, “temporary_registration”</td>
<p>Represents an issue with one of the files that constitute the translation of a document. The error is considered resolved when the file changes.</p>
<tableclass="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>source</td>
<td>String</td>
<td>Error source, must be <em>translation_file</em></td>
<td>Type of element of the user's Telegram Passport which has the issue, one of “passport”, “driver_license”, “identity_card”, “internal_passport”, “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration”, “temporary_registration”</td>
<p>Represents an issue with the translated version of a document. The error is considered resolved when a file with the document translation change.</p>
<tableclass="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>source</td>
<td>String</td>
<td>Error source, must be <em>translation_files</em></td>
<td>Type of element of the user's Telegram Passport which has the issue, one of “passport”, “driver_license”, “identity_card”, “internal_passport”, “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration”, “temporary_registration”</td>
<p>Your bot can offer users <strong>HTML5 games</strong> to play solo or to compete against each other in groups and one-on-one chats. Create games via <ahref="https://t.me/botfather">@BotFather</a> using the <em>/newgame</em> command. Please note that this kind of power requires responsibility: you will need to accept the terms for each game that your bots will be offering.</p>
<ul>
<li>Games are a new type of content on Telegram, represented by the <ahref="#game">Game</a> and <ahref="#inlinequeryresultgame">InlineQueryResultGame</a> objects.</li>
<li>Once you've created a game via <ahref="https://t.me/botfather">BotFather</a>, you can send games to chats as regular messages using the <ahref="#sendgame">sendGame</a> method, or use <ahref="#inline-mode">inline mode</a> with <ahref="#inlinequeryresultgame">InlineQueryResultGame</a>.</li>
<li>If you send the game message without any buttons, it will automatically have a 'Play <em>GameName</em>' button. When this button is pressed, your bot gets a <ahref="#callbackquery">CallbackQuery</a> with the <em>game_short_name</em> of the requested game. You provide the correct URL for this particular user and the app opens the game in the in-app browser.</li>
<li>You can manually add multiple buttons to your game message. Please note that the first button in the first row <strong>must always</strong> launch the game, using the field <em>callback_game</em> in <ahref="#inlinekeyboardbutton">InlineKeyboardButton</a>. You can add extra buttons according to taste: e.g., for a description of the rules, or to open the game's official community.</li>
<li>To make your game more attractive, you can upload a GIF animation that demostrates the game to the users via <ahref="https://t.me/botfather">BotFather</a> (see <ahref="https://t.me/gamebot?game=lumberjack">Lumberjack</a> for example).</li>
<li>A game message will also display high scores for the current chat. Use <ahref="#setgamescore">setGameScore</a> to post high scores to the chat with the game, add the <em>edit_message</em> parameter to automatically update the message with the current scoreboard.</li>
<li>Use <ahref="#getgamehighscores">getGameHighScores</a> to get data for in-game high score tables.</li>
<li>You can also add an extra <ahref="/bots/games#sharing-your-game-to-telegram-chats">sharing button</a> for users to share their best score to different chats.</li>
<li>For examples of what can be done using this new stuff, check the <ahref="https://t.me/gamebot">@gamebot</a> and <ahref="https://t.me/gamee">@gamee</a> bots.</li>
<td>Sends the message <ahref="https://telegram.org/blog/channels-2-0#silent-messages">silently</a>. Users will receive a notification with no sound.</td>
</tr>
<tr>
<td>protect_content</td>
<td>Boolean</td>
<td>Optional</td>
<td>Protects the contents of the sent message from forwarding and saving</td>
</tr>
<tr>
<td>reply_to_message_id</td>
<td>Integer</td>
<td>Optional</td>
<td>If the message is a reply, ID of the original message</td>
<td>A JSON-serialized object for an <ahref="/bots/features#inline-keyboards">inline keyboard</a>. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game.</td>
<p>This object represents a game. Use BotFather to create and edit games, their short names will act as unique identifiers.</p>
<tableclass="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>title</td>
<td>String</td>
<td>Title of the game</td>
</tr>
<tr>
<td>description</td>
<td>String</td>
<td>Description of the game</td>
</tr>
<tr>
<td>photo</td>
<td>Array of <ahref="#photosize">PhotoSize</a></td>
<td>Photo that will be displayed in the game message in chats.</td>
</tr>
<tr>
<td>text</td>
<td>String</td>
<td><em>Optional</em>. 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 <ahref="#setgamescore">setGameScore</a>, or manually edited using <ahref="#editmessagetext">editMessageText</a>. 0-4096 characters.</td>
</tr>
<tr>
<td>text_entities</td>
<td>Array of <ahref="#messageentity">MessageEntity</a></td>
<td><em>Optional</em>. Special entities that appear in <em>text</em>, such as usernames, URLs, bot commands, etc.</td>
</tr>
<tr>
<td>animation</td>
<td><ahref="#animation">Animation</a></td>
<td><em>Optional</em>. Animation that will be displayed in the game message in chats. Upload via <ahref="https://t.me/botfather">BotFather</a></td>
<p>Use this method to set the score of the specified user in a game message. On success, if the message is not an inline message, the <ahref="#message">Message</a> is returned, otherwise <em>True</em> is returned. Returns an error, if the new score is not greater than the user's current score in the chat and <em>force</em> is <em>False</em>.</p>
<p>Use this method to get data for high score tables. Will return the score of the specified user and several of their neighbors in a game. Returns an Array of <ahref="#gamehighscore">GameHighScore</a> objects.</p>
<p>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 their neighbors are not among them. Please note that this behavior is subject to change.</p>
<p>And that's about all we've got for now.<br>If you've got any questions, please check out our <ahref="/bots/faq"><strong>Bot FAQ »</strong></a></p>