<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="https://core.telegram.org/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>Supported explanations for <ahref="https://telegram.org/blog/400-million#better-quizzes">Quizzes 2.0</a>. Add explanations by specifying the parameters <em>explanation</em> and <em>explanation_parse_mode</em> in the method <ahref="#sendpoll">sendPoll</a>.</li>
<li>Added the fields <em>explanation</em> and <em>explanation_entities</em> to the <ahref="#poll">Poll</a> object.</li>
<li>Supported timed polls that automatically close at a certain date and time. Set up by specifying the parameter <em>open_period</em> or <em>close_date</em> in the method <ahref="#sendpoll">sendPoll</a>.</li>
<li>Added the fields <em>open_period</em> and <em>close_date</em> to the <ahref="#poll">Poll</a> object.</li>
<li>Supported the new <ahref="https://telegram.org/blog/400-million#bullseye">darts</a> animation for the dice mini-game. Choose between the default dice animation and darts animation by specifying the parameter <em>emoji</em> in the method <ahref="#senddice">sendDice</a>.</li>
<li>Added the field <em>emoji</em> to the <ahref="#dice">Dice</a> object.</li>
<li>Added the method <ahref="#senddice">sendDice</a> for sending a dice message, which will have a random value from 1 to 6. (Yes, we're aware of the <em>“proper”</em> singular of <em>die</em>. But it's awkward, and we decided to help it change. One dice at a time!)</li>
<li>Added the field <ahref="#dice">dice</a> to the <ahref="#message">Message</a> object.</li>
<li>Added the method <ahref="#getmycommands">getMyCommands</a> for getting the current list of the bot's commands.</li>
<li>Added the method <ahref="#setmycommands">setMyCommands</a> for changing the list of the bot's commands through the Bot API instead of <ahref="https://t.me/botfather">@BotFather</a>.</li>
<li>Added the ability to create animated sticker sets by specifying the parameter <em>tgs_sticker</em> instead of <em>png_sticker</em> in the method <ahref="#createnewstickerset">createNewStickerSet</a>.</li>
<li>Added the ability to add animated stickers to sets created by the bot by specifying the parameter <em>tgs_sticker</em> instead of <em>png_sticker</em> in the method <ahref="#addstickertoset">addStickerToSet</a>.</li>
<li>Added the field <em>thumb</em> to the <ahref="#stickerset">StickerSet</a> object.</li>
<li>Added the ability to change thumbnails of sticker sets created by the bot using the method <ahref="#setstickersetthumb">setStickerSetThumb</a>.</li>
<li>Added the ability to send non-anonymous, multiple answer, and quiz-style polls: added the parameters <em>is_anonymous</em>, <em>type</em>, <em>allows_multiple_answers</em>, <em>correct_option_id</em>, <em>is_closed</em> options to the method <ahref="#sendpoll">sendPoll</a>.</li>
<li>Added the object <ahref="#keyboardbuttonpolltype">KeyboardButtonPollType</a> and the field <em>request_poll</em> to the object <ahref="#keyboardbutton">KeyboardButton</a>.</li>
<li>Added updates about changes of user answers in non-anonymous polls, represented by the object <ahref="#pollanswer">PollAnswer</a> and the field <em>poll_answer</em> in the <ahref="#update">Update</a> object. </li>
<li>Added the fields <em>total_voter_count</em>, <em>is_anonymous</em>, <em>type</em>, <em>allows_multiple_answers</em>, <em>correct_option_id</em> to the <ahref="#poll">Poll</a> object.</li>
<li>Bots can now send polls to private chats.</li>
<li>Added more information about the bot in response to the <ahref="#getme">getMe</a> request: added the fields <em>can_join_groups</em>, <em>can_read_all_group_messages</em> and <em>supports_inline_queries</em> to the <ahref="#user">User</a> object.</li>
<li>Added the optional field <em>language</em> to the <ahref="#messageentity">MessageEntity</a> object.</li>
<li>Added support for two new <ahref="#messageentity">MessageEntity</a> types, <em>underline</em> and <em>strikethrough</em>.</li>
<li>Added support for nested <ahref="#messageentity">MessageEntity</a> objects. Entities can now contain other entities. If two entities have common characters then one of them is fully contained inside the other.</li>
<li>Added support for nested entities and the new tags <code><u>/<ins></code> (for underlined text) and <code><s>/<strike>/<del></code> (for strikethrough text) in parse mode HTML.</li>
<li>Added a new parse mode, <ahref="#markdownv2-style">MarkdownV2</a>, which supports nested entities and two new entities <code>__</code> (for underlined text) and <code>~</code> (for strikethrough text). Parse mode <ahref="#markdown-style">Markdown</a> remains unchanged for backward compatibility.</li>
<li>Added the field <em>file_unique_id</em> to the objects <ahref="#animation">Animation</a>, <ahref="#audio">Audio</a>, <ahref="#document">Document</a>, <ahref="#passportfile">PassportFile</a>, <ahref="#photosize">PhotoSize</a>, <ahref="#sticker">Sticker</a>, <ahref="#video">Video</a>, <ahref="#videonote">VideoNote</a>, <ahref="#voice">Voice</a>, <ahref="#file">File</a> and the fields <em>small_file_unique_id</em> and <em>big_file_unique_id</em> to the object <ahref="#chatphoto">ChatPhoto</a>. The new fields contain a unique file identifier, which is supposed to be the same over time and for different bots, but can't be used to download or reuse the file.</li>
<li>Added the field <em>custom_title</em> to the <ahref="#chatmember">ChatMember</a> object.</li>
<li>Added the new method <ahref="#setchatadministratorcustomtitle">setChatAdministratorCustomTitle</a> to manage the custom titles of administrators promoted by the bot.</li>
<li>Added the field <em>slow_mode_delay</em> to the <ahref="#chat">Chat</a> object.</li>
<h3><aclass="anchor"name="authorizing-your-bot"href="#authorizing-your-bot"><iclass="anchor-icon"></i></a>Authorizing your bot</h3>
<p>Each bot is given a unique authentication token <ahref="/bots#6-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="https://core.telegram.org/bots#6-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>
<li>application/json (except for uploading files)</li>
<li>multipart/form-data (use to upload files)</li>
</ul>
<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 true, 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>
<ul>
<li>All methods in the Bot API are case-insensitive.</li>
<li>All queries must be made using UTF-8.</li>
</ul>
<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>
<blockquote>
<p>Please see our <ahref="/bots/faq#how-can-i-make-requests-in-response-to-updates">FAQ</a> for examples.</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>Regardless of which option you choose, you will receive JSON-serialized <ahref="#update">Update</a> objects as a result.</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>
<tableclass="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>update_id</td>
<td>Integer</td>
<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>
</tr>
<tr>
<td>message</td>
<td><ahref="#message">Message</a></td>
<td><em>Optional</em>. New incoming message of any kind — text, photo, sticker, etc.</td>
</tr>
<tr>
<td>edited_message</td>
<td><ahref="#message">Message</a></td>
<td><em>Optional</em>. New version of a message that is known to the bot and was edited</td>
</tr>
<tr>
<td>channel_post</td>
<td><ahref="#message">Message</a></td>
<td><em>Optional</em>. New incoming channel post of any kind — text, photo, sticker, etc.</td>
</tr>
<tr>
<td>edited_channel_post</td>
<td><ahref="#message">Message</a></td>
<td><em>Optional</em>. New version of a channel post that is known to the bot and was edited</td>
</tr>
<tr>
<td>inline_query</td>
<td><ahref="#inlinequery">InlineQuery</a></td>
<td><em>Optional</em>. New incoming <ahref="#inline-mode">inline</a> query</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="#poll_answer">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>
<p>Use this method to receive incoming updates using long polling (<ahref="https://en.wikipedia.org/wiki/Push_technology#Long_polling">wiki</a>). An Array of <ahref="#update">Update</a> objects is returned.</p>
<tableclass="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>offset</td>
<td>Integer</td>
<td>Optional</td>
<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>
</tr>
<tr>
<td>allowed_updates</td>
<td>Array of String</td>
<td>Optional</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 updates regardless of type (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>
</tr>
</tbody>
</table>
<blockquote>
<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 request comes from Telegram, we recommend using a secret path in the URL, e.g. <code>https://www.example.com/<token></code>. Since nobody else knows your bot's token, you can be pretty sure it's us.</p>
<tableclass="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>url</td>
<td>String</td>
<td>Yes</td>
<td>HTTPS url to send updates to. Use an empty string to remove webhook integration</td>
</tr>
<tr>
<td>certificate</td>
<td><ahref="#inputfile">InputFile</a></td>
<td>Optional</td>
<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>max_connections</td>
<td>Integer</td>
<td>Optional</td>
<td>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>
</tr>
<tr>
<td>allowed_updates</td>
<td>Array of String</td>
<td>Optional</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 updates regardless of type (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 setWebhook, so unwanted updates may be received for a short period of time.</td>
</tr>
</tbody>
</table>
<blockquote>
<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><strong>NEW!</strong> If you're having any trouble setting up webhooks, please check out this <ahref="/bots/webhooks">amazing guide to Webhooks</a>.</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. Requires no parameters.</p>
<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>
<p>Contains information about the current status of a webhook.</p>
<tableclass="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>url</td>
<td>String</td>
<td>Webhook URL, may be empty if webhook is not set up</td>
</tr>
<tr>
<td>has_custom_certificate</td>
<td>Boolean</td>
<td>True, 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>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>
</tr>
<tr>
<td>max_connections</td>
<td>Integer</td>
<td><em>Optional</em>. Maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery</td>
</tr>
<tr>
<td>allowed_updates</td>
<td>Array of String</td>
<td><em>Optional</em>. A list of update types the bot is subscribed to. Defaults to all update types</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</td>
</tr>
<tr>
<td>is_bot</td>
<td>Boolean</td>
<td>True, if this user is a bot</td>
</tr>
<tr>
<td>first_name</td>
<td>String</td>
<td>User's or bot's first name</td>
</tr>
<tr>
<td>last_name</td>
<td>String</td>
<td><em>Optional</em>. User's or bot's last name</td>
</tr>
<tr>
<td>username</td>
<td>String</td>
<td><em>Optional</em>. User's or bot's username</td>
</tr>
<tr>
<td>language_code</td>
<td>String</td>
<td><em>Optional</em>. <ahref="https://en.wikipedia.org/wiki/IETF_language_tag">IETF language tag</a> of the user's language</td>
</tr>
<tr>
<td>can_join_groups</td>
<td>Boolean</td>
<td><em>Optional</em>. True, if the bot can be invited to groups. Returned only in <ahref="#getme">getMe</a>.</td>
</tr>
<tr>
<td>can_read_all_group_messages</td>
<td>Boolean</td>
<td><em>Optional</em>. True, if <ahref="https://core.telegram.org/bots#privacy-mode">privacy mode</a> is disabled for the bot. Returned only in <ahref="#getme">getMe</a>.</td>
</tr>
<tr>
<td>supports_inline_queries</td>
<td>Boolean</td>
<td><em>Optional</em>. True, if the bot supports inline queries. Returned only in <ahref="#getme">getMe</a>.</td>
<td>Unique identifier for this chat. This number may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier.</td>
</tr>
<tr>
<td>type</td>
<td>String</td>
<td>Type of chat, can be either “private”, “group”, “supergroup” or “channel”</td>
</tr>
<tr>
<td>title</td>
<td>String</td>
<td><em>Optional</em>. Title, for supergroups, channels and group chats</td>
</tr>
<tr>
<td>username</td>
<td>String</td>
<td><em>Optional</em>. Username, for private chats, supergroups and channels if available</td>
</tr>
<tr>
<td>first_name</td>
<td>String</td>
<td><em>Optional</em>. First name of the other party in a private chat</td>
</tr>
<tr>
<td>last_name</td>
<td>String</td>
<td><em>Optional</em>. Last name of the other party in a private chat</td>
</tr>
<tr>
<td>photo</td>
<td><ahref="#chatphoto">ChatPhoto</a></td>
<td><em>Optional</em>. Chat photo. Returned only in <ahref="#getchat">getChat</a>.</td>
</tr>
<tr>
<td>description</td>
<td>String</td>
<td><em>Optional</em>. Description, for groups, supergroups and channel chats. Returned only in <ahref="#getchat">getChat</a>.</td>
</tr>
<tr>
<td>invite_link</td>
<td>String</td>
<td><em>Optional</em>. Chat invite link, for groups, supergroups and channel chats. Each administrator in a chat generates their own invite links, so the bot must first generate the link using <ahref="#exportchatinvitelink">exportChatInviteLink</a>. Returned only in <ahref="#getchat">getChat</a>.</td>
</tr>
<tr>
<td>pinned_message</td>
<td><ahref="#message">Message</a></td>
<td><em>Optional</em>. Pinned message, for groups, supergroups and channels. 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. Returned only in <ahref="#getchat">getChat</a>.</td>
</tr>
<tr>
<td>sticker_set_name</td>
<td>String</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>Boolean</td>
<td><em>Optional</em>. True, if the bot can change the group sticker set. Returned only in <ahref="#getchat">getChat</a>.</td>
<td>Unique message identifier inside this chat</td>
</tr>
<tr>
<td>from</td>
<td><ahref="#user">User</a></td>
<td><em>Optional</em>. Sender, empty for messages sent to channels</td>
</tr>
<tr>
<td>date</td>
<td>Integer</td>
<td>Date the message was sent in Unix time</td>
</tr>
<tr>
<td>chat</td>
<td><ahref="#chat">Chat</a></td>
<td>Conversation the message belongs to</td>
</tr>
<tr>
<td>forward_from</td>
<td><ahref="#user">User</a></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, information about the original channel</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 messages forwarded from channels, signature of the post author if present</td>
</tr>
<tr>
<td>forward_sender_name</td>
<td>String</td>
<td><em>Optional</em>. Sender's name for messages forwarded from users who disallow adding a link to their account in forwarded messages</td>
</tr>
<tr>
<td>forward_date</td>
<td>Integer</td>
<td><em>Optional</em>. For forwarded messages, date the original message was sent in Unix time</td>
</tr>
<tr>
<td>reply_to_message</td>
<td><ahref="#message">Message</a></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>edit_date</td>
<td>Integer</td>
<td><em>Optional</em>. Date the message was last edited in Unix time</td>
</tr>
<tr>
<td>media_group_id</td>
<td>String</td>
<td><em>Optional</em>. The unique identifier of a media message group this message belongs to</td>
</tr>
<tr>
<td>author_signature</td>
<td>String</td>
<td><em>Optional</em>. Signature of the post author for messages in channels</td>
</tr>
<tr>
<td>text</td>
<td>String</td>
<td><em>Optional</em>. For text messages, the actual UTF-8 text of the message, 0-4096 characters</td>
</tr>
<tr>
<td>entities</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>
</tr>
<tr>
<td>caption</td>
<td>String</td>
<td><em>Optional</em>. Caption for the animation, audio, document, photo, video or voice, 0-1024 characters</td>
</tr>
<tr>
<td>caption_entities</td>
<td>Array of <ahref="#messageentity">MessageEntity</a></td>
<td><em>Optional</em>. For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption</td>
</tr>
<tr>
<td>contact</td>
<td><ahref="#contact">Contact</a></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 from 1 to 6</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>
</tr>
<tr>
<td>supergroup_chat_created</td>
<td>True</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>
</tr>
<tr>
<td>channel_chat_created</td>
<td>True</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>
</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 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.</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 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.</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>
</tr>
<tr>
<td>connected_website</td>
<td>String</td>
<td><em>Optional</em>. The domain name of the website on which the user has logged in. <ahref="/widgets/login">More about Telegram Login »</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>
<p>This object represents one size of a photo or a <ahref="#document">file</a> / <ahref="#sticker">sticker</a> thumbnail.</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>
</tr>
<tr>
<td>file_unique_id</td>
<td>String</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>
<p>This object represents an animation file (GIF or H.264/MPEG-4 AVC video without sound).</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>
</tr>
<tr>
<td>file_unique_id</td>
<td>String</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>
</tr>
<tr>
<td>width</td>
<td>Integer</td>
<td>Video width as defined by sender</td>
</tr>
<tr>
<td>height</td>
<td>Integer</td>
<td>Video height as defined by sender</td>
</tr>
<tr>
<td>duration</td>
<td>Integer</td>
<td>Duration of the video in seconds as defined by sender</td>
</tr>
<tr>
<td>thumb</td>
<td><ahref="#photosize">PhotoSize</a></td>
<td><em>Optional</em>. Animation thumbnail as defined by sender</td>
</tr>
<tr>
<td>file_name</td>
<td>String</td>
<td><em>Optional</em>. Original animation filename as defined by sender</td>
</tr>
<tr>
<td>mime_type</td>
<td>String</td>
<td><em>Optional</em>. MIME type of the file as defined by sender</td>
<p>This object represents an audio file to be treated as music by the Telegram clients.</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>
</tr>
<tr>
<td>file_unique_id</td>
<td>String</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>
</tr>
<tr>
<td>duration</td>
<td>Integer</td>
<td>Duration of the audio in seconds as defined by sender</td>
</tr>
<tr>
<td>performer</td>
<td>String</td>
<td><em>Optional</em>. Performer of the audio as defined by sender or by audio tags</td>
</tr>
<tr>
<td>title</td>
<td>String</td>
<td><em>Optional</em>. Title of the audio as defined by sender or by audio tags</td>
</tr>
<tr>
<td>mime_type</td>
<td>String</td>
<td><em>Optional</em>. MIME type of the file as defined by sender</td>
</tr>
<tr>
<td>file_size</td>
<td>Integer</td>
<td><em>Optional</em>. File size</td>
</tr>
<tr>
<td>thumb</td>
<td><ahref="#photosize">PhotoSize</a></td>
<td><em>Optional</em>. Thumbnail of the album cover to which the music file belongs</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>
</tr>
<tr>
<td>file_unique_id</td>
<td>String</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>
</tr>
<tr>
<td>thumb</td>
<td><ahref="#photosize">PhotoSize</a></td>
<td><em>Optional</em>. Document thumbnail as defined by sender</td>
</tr>
<tr>
<td>file_name</td>
<td>String</td>
<td><em>Optional</em>. Original filename as defined by sender</td>
</tr>
<tr>
<td>mime_type</td>
<td>String</td>
<td><em>Optional</em>. MIME type of the file as defined by sender</td>
<td>Identifier for this file, which can be used to download or reuse the file</td>
</tr>
<tr>
<td>file_unique_id</td>
<td>String</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>
</tr>
<tr>
<td>width</td>
<td>Integer</td>
<td>Video width as defined by sender</td>
</tr>
<tr>
<td>height</td>
<td>Integer</td>
<td>Video height as defined by sender</td>
</tr>
<tr>
<td>duration</td>
<td>Integer</td>
<td>Duration of the video in seconds as defined by sender</td>
</tr>
<tr>
<td>thumb</td>
<td><ahref="#photosize">PhotoSize</a></td>
<td><em>Optional</em>. Video thumbnail</td>
</tr>
<tr>
<td>mime_type</td>
<td>String</td>
<td><em>Optional</em>. Mime type of a file as defined by sender</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>
</tr>
<tr>
<td>file_unique_id</td>
<td>String</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>
</tr>
<tr>
<td>length</td>
<td>Integer</td>
<td>Video width and height (diameter of the video message) as defined by sender</td>
</tr>
<tr>
<td>duration</td>
<td>Integer</td>
<td>Duration of the video in seconds as defined by sender</td>
<td>Identifier for this file, which can be used to download or reuse the file</td>
</tr>
<tr>
<td>file_unique_id</td>
<td>String</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>
</tr>
<tr>
<td>duration</td>
<td>Integer</td>
<td>Duration of the audio in seconds as defined by sender</td>
</tr>
<tr>
<td>mime_type</td>
<td>String</td>
<td><em>Optional</em>. MIME type of the file as defined by sender</td>
<p>This object represents a dice with a random value from 1 to 6 for currently supported base emoji. (Yes, we're aware of the <em>“proper”</em> singular of <em>die</em>. But it's awkward, and we decided to help it change. One dice at a time!)</p>
<tableclass="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>emoji</td>
<td>String</td>
<td>Emoji on which the dice throw animation is based</td>
</tr>
<tr>
<td>value</td>
<td>Integer</td>
<td>Value of the dice, 1-6 for currently supported base emoji</td>
<p>This object contains information about a poll.</p>
<tableclass="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>id</td>
<td>String</td>
<td>Unique poll identifier</td>
</tr>
<tr>
<td>question</td>
<td>String</td>
<td>Poll question, 1-255 characters</td>
</tr>
<tr>
<td>options</td>
<td>Array of <ahref="#polloption">PollOption</a></td>
<td>List of poll options</td>
</tr>
<tr>
<td>total_voter_count</td>
<td>Integer</td>
<td>Total number of users that voted in the poll</td>
</tr>
<tr>
<td>is_closed</td>
<td>Boolean</td>
<td>True, if the poll is closed</td>
</tr>
<tr>
<td>is_anonymous</td>
<td>Boolean</td>
<td>True, if the poll is anonymous</td>
</tr>
<tr>
<td>type</td>
<td>String</td>
<td>Poll type, currently can be “regular” or “quiz”</td>
</tr>
<tr>
<td>allows_multiple_answers</td>
<td>Boolean</td>
<td>True, 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>. Foursquare identifier of the venue</td>
</tr>
<tr>
<td>foursquare_type</td>
<td>String</td>
<td><em>Optional</em>. Foursquare type of the venue. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.)</td>
<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>
<blockquote>
<p>Maximum file size to download is 20 MB</p>
</blockquote>
<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>
</tr>
<tr>
<td>file_unique_id</td>
<td>String</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>
</tr>
<tr>
<td>file_size</td>
<td>Integer</td>
<td><em>Optional</em>. File size, if known</td>
</tr>
<tr>
<td>file_path</td>
<td>String</td>
<td><em>Optional</em>. File path. Use <code>https://api.telegram.org/file/bot<token>/<file_path></code> to get the file.</td>
<p>This object represents a <ahref="https://core.telegram.org/bots#keyboards">custom keyboard</a> with reply options (see <ahref="https://core.telegram.org/bots#keyboards">Introduction to bots</a> for details and examples).</p>
<tableclass="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>keyboard</td>
<td>Array of Array of <ahref="#keyboardbutton">KeyboardButton</a></td>
<td>Array of button rows, each represented by an Array of <ahref="#keyboardbutton">KeyboardButton</a> objects</td>
</tr>
<tr>
<td>resize_keyboard</td>
<td>Boolean</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>
</tr>
<tr>
<td>one_time_keyboard</td>
<td>Boolean</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>
</tr>
<tr>
<td>selective</td>
<td>Boolean</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 text of the button. Optional fields <em>request_contact</em>, <em>request_location</em>, and <em>request_poll</em> are mutually exclusive.</p>
<tableclass="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>text</td>
<td>String</td>
<td>Text of the button. If none of the optional fields are used, it will be sent as a message when the button is pressed</td>
</tr>
<tr>
<td>request_contact</td>
<td>Boolean</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>
</tr>
<tr>
<td>request_location</td>
<td>Boolean</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>
</tbody>
</table>
<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>.</p>
<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>
</tr>
<tr>
<td>selective</td>
<td>Boolean</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>
<p>This object represents an <ahref="https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating">inline keyboard</a> that appears right next to the message it belongs to.</p>
<tableclass="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>inline_keyboard</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>
<p>This object represents one button of an inline keyboard. You <strong>must</strong> use exactly one of the optional fields.</p>
<tableclass="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>text</td>
<td>String</td>
<td>Label text on the button</td>
</tr>
<tr>
<td>url</td>
<td>String</td>
<td><em>Optional</em>. HTTP or tg:// url to be opened when button is pressed</td>
</tr>
<tr>
<td>login_url</td>
<td><ahref="#loginurl">LoginUrl</a></td>
<td><em>Optional</em>. An HTTP URL used to automatically authorize the user. Can be used as a replacement for the <ahref="https://core.telegram.org/widgets/login">Telegram Login Widget</a>.</td>
</tr>
<tr>
<td>callback_data</td>
<td>String</td>
<td><em>Optional</em>. Data to be sent in a <ahref="#callbackquery">callback query</a> to the bot when button is pressed, 1-64 bytes</td>
</tr>
<tr>
<td>switch_inline_query</td>
<td>String</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. Can 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>
</tr>
<tr>
<td>switch_inline_query_current_chat</td>
<td>String</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. Can 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>
</tr>
<tr>
<td>callback_game</td>
<td><ahref="#callbackgame">CallbackGame</a></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 True, 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.</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="https://core.telegram.org/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 HTTP URL to be opened with user authorization data added to the query string when the button is pressed. If the user refuses to provide authorization data, the original URL without information about the user will be opened. The data added is the same as described in <ahref="https://core.telegram.org/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="https://core.telegram.org/widgets/login#checking-authorization">Checking authorization</a>.</td>
</tr>
<tr>
<td>forward_text</td>
<td>String</td>
<td><em>Optional</em>. New text of the button in forwarded messages.</td>
</tr>
<tr>
<td>bot_username</td>
<td>String</td>
<td><em>Optional</em>. Username of a bot, which will be used for user authorization. See <ahref="https://core.telegram.org/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="https://core.telegram.org/widgets/login#linking-your-domain-to-the-bot">Linking your domain to the bot</a> for more details.</td>
</tr>
<tr>
<td>request_write_access</td>
<td>Boolean</td>
<td><em>Optional</em>. Pass True to request the permission for your bot to send messages to the user.</td>
<p>This object represents an incoming callback query from a callback button in an <ahref="/bots#inline-keyboards-and-on-the-fly-updating">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>
<tableclass="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>id</td>
<td>String</td>
<td>Unique identifier for this query</td>
</tr>
<tr>
<td>from</td>
<td><ahref="#user">User</a></td>
<td>Sender</td>
</tr>
<tr>
<td>message</td>
<td><ahref="#message">Message</a></td>
<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>
</tr>
<tr>
<td>data</td>
<td>String</td>
<td><em>Optional</em>. Data associated with the callback button. Be aware that a bad client can send arbitrary data in this field.</td>
</tr>
<tr>
<td>game_short_name</td>
<td>String</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#privacy-mode">privacy mode</a>.</p>
<tableclass="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>force_reply</td>
<td>True</td>
<td>Shows reply interface to the user, as if they manually selected the bot's message and tapped 'Reply'</td>
</tr>
<tr>
<td>selective</td>
<td>Boolean</td>
<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>
</tr>
</tbody>
</table>
<blockquote>
<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>
</ul>
<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>
</tr>
<tr>
<td>small_file_unique_id</td>
<td>String</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>
</tr>
<tr>
<td>big_file_id</td>
<td>String</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>
</tr>
<tr>
<td>big_file_unique_id</td>
<td>String</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>
<p>This object contains information about one member of a chat.</p>
<tableclass="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>user</td>
<td><ahref="#user">User</a></td>
<td>Information about the user</td>
</tr>
<tr>
<td>status</td>
<td>String</td>
<td>The member's status in the chat. Can be “creator”, “administrator”, “member”, “restricted”, “left” or “kicked”</td>
</tr>
<tr>
<td>custom_title</td>
<td>String</td>
<td><em>Optional</em>. Owner and administrators only. Custom title for this user</td>
</tr>
<tr>
<td>until_date</td>
<td>Integer</td>
<td><em>Optional</em>. Restricted and kicked only. Date when restrictions will be lifted for this user; unix time</td>
</tr>
<tr>
<td>can_be_edited</td>
<td>Boolean</td>
<td><em>Optional</em>. Administrators only. True, if the bot is allowed to edit administrator privileges of that user</td>
</tr>
<tr>
<td>can_post_messages</td>
<td>Boolean</td>
<td><em>Optional</em>. Administrators only. True, if the administrator can post in the channel; channels only</td>
</tr>
<tr>
<td>can_edit_messages</td>
<td>Boolean</td>
<td><em>Optional</em>. Administrators only. True, if the administrator can edit messages of other users and can pin messages; channels only</td>
</tr>
<tr>
<td>can_delete_messages</td>
<td>Boolean</td>
<td><em>Optional</em>. Administrators only. True, if the administrator can delete messages of other users</td>
</tr>
<tr>
<td>can_restrict_members</td>
<td>Boolean</td>
<td><em>Optional</em>. Administrators only. True, if the administrator can restrict, ban or unban chat members</td>
</tr>
<tr>
<td>can_promote_members</td>
<td>Boolean</td>
<td><em>Optional</em>. Administrators only. True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user)</td>
</tr>
<tr>
<td>can_change_info</td>
<td>Boolean</td>
<td><em>Optional</em>. Administrators and restricted only. True, if the user is allowed to change the chat title, photo and other settings</td>
</tr>
<tr>
<td>can_invite_users</td>
<td>Boolean</td>
<td><em>Optional</em>. Administrators and restricted only. True, if the user is allowed to invite new users to the chat</td>
</tr>
<tr>
<td>can_pin_messages</td>
<td>Boolean</td>
<td><em>Optional</em>. Administrators and restricted only. True, if the user is allowed to pin messages; groups and supergroups only</td>
</tr>
<tr>
<td>is_member</td>
<td>Boolean</td>
<td><em>Optional</em>. Restricted only. True, if the user is a member of the chat at the moment of the request</td>
</tr>
<tr>
<td>can_send_messages</td>
<td>Boolean</td>
<td><em>Optional</em>. Restricted only. True, if the user is allowed to send text messages, contacts, locations and venues</td>
</tr>
<tr>
<td>can_send_media_messages</td>
<td>Boolean</td>
<td><em>Optional</em>. Restricted only. True, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes</td>
</tr>
<tr>
<td>can_send_polls</td>
<td>Boolean</td>
<td><em>Optional</em>. Restricted only. True, if the user is allowed to send polls</td>
</tr>
<tr>
<td>can_send_other_messages</td>
<td>Boolean</td>
<td><em>Optional</em>. Restricted only. True, if the user is allowed to send animations, games, stickers and use inline bots</td>
</tr>
<tr>
<td>can_add_web_page_previews</td>
<td>Boolean</td>
<td><em>Optional</em>. Restricted only. True, if the user is allowed to add web page previews to their messages</td>
<p>Describes actions that a non-administrator user is allowed to take in a chat.</p>
<tableclass="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>can_send_messages</td>
<td>Boolean</td>
<td><em>Optional</em>. True, if the user is allowed to send text messages, contacts, locations and venues</td>
</tr>
<tr>
<td>can_send_media_messages</td>
<td>Boolean</td>
<td><em>Optional</em>. True, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes, implies can_send_messages</td>
</tr>
<tr>
<td>can_send_polls</td>
<td>Boolean</td>
<td><em>Optional</em>. True, if the user is allowed to send polls, implies can_send_messages</td>
</tr>
<tr>
<td>can_send_other_messages</td>
<td>Boolean</td>
<td><em>Optional</em>. True, if the user is allowed to send animations, games, stickers and use inline bots, implies can_send_media_messages</td>
</tr>
<tr>
<td>can_add_web_page_previews</td>
<td>Boolean</td>
<td><em>Optional</em>. True, if the user is allowed to add web page previews to their messages, implies can_send_media_messages</td>
</tr>
<tr>
<td>can_change_info</td>
<td>Boolean</td>
<td><em>Optional</em>. True, if the user is allowed to change the chat title, photo and other settings. Ignored in public supergroups</td>
</tr>
<tr>
<td>can_invite_users</td>
<td>Boolean</td>
<td><em>Optional</em>. True, if the user is allowed to invite new users to the chat</td>
</tr>
<tr>
<td>can_pin_messages</td>
<td>Boolean</td>
<td><em>Optional</em>. True, if the user is allowed to pin messages. Ignored in public supergroups</td>
<p>Contains information about why a request was unsuccessful.</p>
<tableclass="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<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 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.</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>Type of the result, must be <em>photo</em></td>
</tr>
<tr>
<td>media</td>
<td>String</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 info on Sending Files »</a></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>
<td>Type of the result, must be <em>video</em></td>
</tr>
<tr>
<td>media</td>
<td>String</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 info on Sending Files »</a></td>
</tr>
<tr>
<td>thumb</td>
<td><ahref="#inputfile">InputFile</a> or String</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 info on Sending Files »</a></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>width</td>
<td>Integer</td>
<td><em>Optional</em>. Video width</td>
</tr>
<tr>
<td>height</td>
<td>Integer</td>
<td><em>Optional</em>. Video height</td>
</tr>
<tr>
<td>duration</td>
<td>Integer</td>
<td><em>Optional</em>. Video duration</td>
</tr>
<tr>
<td>supports_streaming</td>
<td>Boolean</td>
<td><em>Optional</em>. Pass <em>True</em>, if the uploaded video is suitable for streaming</td>
<p>Represents an animation file (GIF or H.264/MPEG-4 AVC video without sound) to be sent.</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>animation</em></td>
</tr>
<tr>
<td>media</td>
<td>String</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 info on Sending Files »</a></td>
</tr>
<tr>
<td>thumb</td>
<td><ahref="#inputfile">InputFile</a> or String</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 info on Sending Files »</a></td>
</tr>
<tr>
<td>caption</td>
<td>String</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>
<p>Represents an audio file to be treated as music to be sent.</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>media</td>
<td>String</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 info on Sending Files »</a></td>
</tr>
<tr>
<td>thumb</td>
<td><ahref="#inputfile">InputFile</a> or String</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 info on Sending Files »</a></td>
</tr>
<tr>
<td>caption</td>
<td>String</td>
<td><em>Optional</em>. Caption of the audio 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 audio caption. See <ahref="#formatting-options">formatting options</a> for more details.</td>
</tr>
<tr>
<td>duration</td>
<td>Integer</td>
<td><em>Optional</em>. Duration of the audio in seconds</td>
</tr>
<tr>
<td>performer</td>
<td>String</td>
<td><em>Optional</em>. Performer of the audio</td>
<td>Type of the result, must be <em>document</em></td>
</tr>
<tr>
<td>media</td>
<td>String</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 info on Sending Files »</a></td>
</tr>
<tr>
<td>thumb</td>
<td><ahref="#inputfile">InputFile</a> or String</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 info on Sending Files »</a></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>
<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>
<p> There are three ways to send files (photos, stickers, audio, media, etc.):</p>
<ol>
<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>
</ol>
<p><strong>Sending by file_id</strong></p>
<ul>
<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>It is not possible to resend thumbnails.</li>
<li>Resending a photo by <strong>file_id</strong> will send all of its <ahref="#photosize">sizes</a>.</li>
<li><strong>file_id</strong> is unique for each individual bot and <strong>can't</strong> be transferred from one bot to another.</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>
<li>Other configurations may work but we can't guarantee that they will.</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 auth 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 send text messages. 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>
</tr>
<tr>
<td>text</td>
<td>String</td>
<td>Yes</td>
<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>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>reply_to_message_id</td>
<td>Integer</td>
<td>Optional</td>
<td>If the message is a reply, ID of the original message</td>
</tr>
<tr>
<td>reply_markup</td>
<td><ahref="#inlinekeyboardmarkup">InlineKeyboardMarkup</a> or <ahref="#replykeyboardmarkup">ReplyKeyboardMarkup</a> or <ahref="#replykeyboardremove">ReplyKeyboardRemove</a> or <ahref="#forcereply">ForceReply</a></td>
<td>Optional</td>
<td>Additional interface options. A JSON-serialized object for an <ahref="https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating">inline keyboard</a>, <ahref="https://core.telegram.org/bots#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 and strikethrough text, as well as inline links and pre-formatted code in your bots' messages. Telegram clients will render them accordingly. You can use either markdown-style or HTML-style formatting.</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 has common characters then one of them is fully contained inside another.<br>- <em>bold</em>, <em>italic</em>, <em>underline</em> and <em>strikethrough</em> entities can contain and to be contained in 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. For example, they will not work, when used in an inline keyboard button or in a message text.</li>
<li>These mentions are only guaranteed to work if the user has contacted the bot in the past, has sent a callback query to the bot via inline button or is a member in the group where he was mentioned.</li>
[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>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.</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>
<p>Please note:</p>
<ul>
<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>
<li>Programming language can't be specified for standalone <code>code</code> tags.</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>To escape characters '_', '*', '`', '[' outside of an entity, prepend the characters '\' before them.</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. 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>
</tr>
<tr>
<td>from_chat_id</td>
<td>Integer or String</td>
<td>Yes</td>
<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>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 send photos. 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>
</tr>
<tr>
<td>photo</td>
<td><ahref="#inputfile">InputFile</a> or String</td>
<td>Yes</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. <ahref="#sending-files">More info on Sending Files »</a></td>
</tr>
<tr>
<td>caption</td>
<td>String</td>
<td>Optional</td>
<td>Photo caption (may also be used when resending photos 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 photo caption. See <ahref="#formatting-options">formatting options</a> for more details.</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>reply_to_message_id</td>
<td>Integer</td>
<td>Optional</td>
<td>If the message is a reply, ID of the original message</td>
</tr>
<tr>
<td>reply_markup</td>
<td><ahref="#inlinekeyboardmarkup">InlineKeyboardMarkup</a> or <ahref="#replykeyboardmarkup">ReplyKeyboardMarkup</a> or <ahref="#replykeyboardremove">ReplyKeyboardRemove</a> or <ahref="#forcereply">ForceReply</a></td>
<td>Optional</td>
<td>Additional interface options. A JSON-serialized object for an <ahref="https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating">inline keyboard</a>, <ahref="https://core.telegram.org/bots#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>
</tr>
<tr>
<td>audio</td>
<td><ahref="#inputfile">InputFile</a> or String</td>
<td>Yes</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 info on Sending Files »</a></td>
</tr>
<tr>
<td>caption</td>
<td>String</td>
<td>Optional</td>
<td>Audio 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 audio caption. See <ahref="#formatting-options">formatting options</a> for more details.</td>
</tr>
<tr>
<td>duration</td>
<td>Integer</td>
<td>Optional</td>
<td>Duration of the audio in seconds</td>
</tr>
<tr>
<td>performer</td>
<td>String</td>
<td>Optional</td>
<td>Performer</td>
</tr>
<tr>
<td>title</td>
<td>String</td>
<td>Optional</td>
<td>Track name</td>
</tr>
<tr>
<td>thumb</td>
<td><ahref="#inputfile">InputFile</a> or String</td>
<td>Optional</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 info on Sending Files »</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>reply_to_message_id</td>
<td>Integer</td>
<td>Optional</td>
<td>If the message is a reply, ID of the original message</td>
</tr>
<tr>
<td>reply_markup</td>
<td><ahref="#inlinekeyboardmarkup">InlineKeyboardMarkup</a> or <ahref="#replykeyboardmarkup">ReplyKeyboardMarkup</a> or <ahref="#replykeyboardremove">ReplyKeyboardRemove</a> or <ahref="#forcereply">ForceReply</a></td>
<td>Optional</td>
<td>Additional interface options. A JSON-serialized object for an <ahref="https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating">inline keyboard</a>, <ahref="https://core.telegram.org/bots#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>
</tr>
<tr>
<td>document</td>
<td><ahref="#inputfile">InputFile</a> or String</td>
<td>Yes</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 info on Sending Files »</a></td>
</tr>
<tr>
<td>thumb</td>
<td><ahref="#inputfile">InputFile</a> or String</td>
<td>Optional</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 info on Sending Files »</a></td>
</tr>
<tr>
<td>caption</td>
<td>String</td>
<td>Optional</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>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>reply_to_message_id</td>
<td>Integer</td>
<td>Optional</td>
<td>If the message is a reply, ID of the original message</td>
</tr>
<tr>
<td>reply_markup</td>
<td><ahref="#inlinekeyboardmarkup">InlineKeyboardMarkup</a> or <ahref="#replykeyboardmarkup">ReplyKeyboardMarkup</a> or <ahref="#replykeyboardremove">ReplyKeyboardRemove</a> or <ahref="#forcereply">ForceReply</a></td>
<td>Optional</td>
<td>Additional interface options. A JSON-serialized object for an <ahref="https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating">inline keyboard</a>, <ahref="https://core.telegram.org/bots#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 mp4 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>
<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>video</td>
<td><ahref="#inputfile">InputFile</a> or String</td>
<td>Yes</td>
<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 info on Sending Files »</a></td>
</tr>
<tr>
<td>duration</td>
<td>Integer</td>
<td>Optional</td>
<td>Duration of sent video in seconds</td>
</tr>
<tr>
<td>width</td>
<td>Integer</td>
<td>Optional</td>
<td>Video width</td>
</tr>
<tr>
<td>height</td>
<td>Integer</td>
<td>Optional</td>
<td>Video height</td>
</tr>
<tr>
<td>thumb</td>
<td><ahref="#inputfile">InputFile</a> or String</td>
<td>Optional</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 info on Sending Files »</a></td>
</tr>
<tr>
<td>caption</td>
<td>String</td>
<td>Optional</td>
<td>Video caption (may also be used when resending videos 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 video caption. See <ahref="#formatting-options">formatting options</a> for more details.</td>
</tr>
<tr>
<td>supports_streaming</td>
<td>Boolean</td>
<td>Optional</td>
<td>Pass <em>True</em>, if the uploaded video is suitable for streaming</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>reply_to_message_id</td>
<td>Integer</td>
<td>Optional</td>
<td>If the message is a reply, ID of the original message</td>
</tr>
<tr>
<td>reply_markup</td>
<td><ahref="#inlinekeyboardmarkup">InlineKeyboardMarkup</a> or <ahref="#replykeyboardmarkup">ReplyKeyboardMarkup</a> or <ahref="#replykeyboardremove">ReplyKeyboardRemove</a> or <ahref="#forcereply">ForceReply</a></td>
<td>Optional</td>
<td>Additional interface options. A JSON-serialized object for an <ahref="https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating">inline keyboard</a>, <ahref="https://core.telegram.org/bots#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>
</tr>
<tr>
<td>animation</td>
<td><ahref="#inputfile">InputFile</a> or String</td>
<td>Yes</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 info on Sending Files »</a></td>
</tr>
<tr>
<td>duration</td>
<td>Integer</td>
<td>Optional</td>
<td>Duration of sent animation in seconds</td>
</tr>
<tr>
<td>width</td>
<td>Integer</td>
<td>Optional</td>
<td>Animation width</td>
</tr>
<tr>
<td>height</td>
<td>Integer</td>
<td>Optional</td>
<td>Animation height</td>
</tr>
<tr>
<td>thumb</td>
<td><ahref="#inputfile">InputFile</a> or String</td>
<td>Optional</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 info on Sending Files »</a></td>
</tr>
<tr>
<td>caption</td>
<td>String</td>
<td>Optional</td>
<td>Animation caption (may also be used when resending animation 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 animation caption. See <ahref="#formatting-options">formatting options</a> for more details.</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>reply_to_message_id</td>
<td>Integer</td>
<td>Optional</td>
<td>If the message is a reply, ID of the original message</td>
</tr>
<tr>
<td>reply_markup</td>
<td><ahref="#inlinekeyboardmarkup">InlineKeyboardMarkup</a> or <ahref="#replykeyboardmarkup">ReplyKeyboardMarkup</a> or <ahref="#replykeyboardremove">ReplyKeyboardRemove</a> or <ahref="#forcereply">ForceReply</a></td>
<td>Optional</td>
<td>Additional interface options. A JSON-serialized object for an <ahref="https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating">inline keyboard</a>, <ahref="https://core.telegram.org/bots#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>
</tr>
<tr>
<td>voice</td>
<td><ahref="#inputfile">InputFile</a> or String</td>
<td>Yes</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 info on Sending Files »</a></td>
</tr>
<tr>
<td>caption</td>
<td>String</td>
<td>Optional</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>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>reply_to_message_id</td>
<td>Integer</td>
<td>Optional</td>
<td>If the message is a reply, ID of the original message</td>
</tr>
<tr>
<td>reply_markup</td>
<td><ahref="#inlinekeyboardmarkup">InlineKeyboardMarkup</a> or <ahref="#replykeyboardmarkup">ReplyKeyboardMarkup</a> or <ahref="#replykeyboardremove">ReplyKeyboardRemove</a> or <ahref="#forcereply">ForceReply</a></td>
<td>Optional</td>
<td>Additional interface options. A JSON-serialized object for an <ahref="https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating">inline keyboard</a>, <ahref="https://core.telegram.org/bots#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 mp4 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>
<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>video_note</td>
<td><ahref="#inputfile">InputFile</a> or String</td>
<td>Yes</td>
<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 info on Sending Files »</a>. Sending video notes by a URL is currently unsupported</td>
</tr>
<tr>
<td>duration</td>
<td>Integer</td>
<td>Optional</td>
<td>Duration of sent video in seconds</td>
</tr>
<tr>
<td>length</td>
<td>Integer</td>
<td>Optional</td>
<td>Video width and height, i.e. diameter of the video message</td>
</tr>
<tr>
<td>thumb</td>
<td><ahref="#inputfile">InputFile</a> or String</td>
<td>Optional</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 info on Sending Files »</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>reply_to_message_id</td>
<td>Integer</td>
<td>Optional</td>
<td>If the message is a reply, ID of the original message</td>
</tr>
<tr>
<td>reply_markup</td>
<td><ahref="#inlinekeyboardmarkup">InlineKeyboardMarkup</a> or <ahref="#replykeyboardmarkup">ReplyKeyboardMarkup</a> or <ahref="#replykeyboardremove">ReplyKeyboardRemove</a> or <ahref="#forcereply">ForceReply</a></td>
<td>Optional</td>
<td>Additional interface options. A JSON-serialized object for an <ahref="https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating">inline keyboard</a>, <ahref="https://core.telegram.org/bots#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 or videos as an album. On success, an array of the sent <ahref="#message">Messages</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>
</tr>
<tr>
<td>media</td>
<td>Array of <ahref="#inputmediaphoto">InputMediaPhoto</a> and <ahref="#inputmediavideo">InputMediaVideo</a></td>
<td>Yes</td>
<td>A JSON-serialized array describing photos and videos to be sent, must include 2-10 items</td>
</tr>
<tr>
<td>disable_notification</td>
<td>Boolean</td>
<td>Optional</td>
<td>Sends the 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>reply_to_message_id</td>
<td>Integer</td>
<td>Optional</td>
<td>If the messages are a reply, ID of the original message</td>
<p>Use this method to send point on the map. 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>
</tr>
<tr>
<td>latitude</td>
<td>Float number</td>
<td>Yes</td>
<td>Latitude of the location</td>
</tr>
<tr>
<td>longitude</td>
<td>Float number</td>
<td>Yes</td>
<td>Longitude of the location</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>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>reply_to_message_id</td>
<td>Integer</td>
<td>Optional</td>
<td>If the message is a reply, ID of the original message</td>
</tr>
<tr>
<td>reply_markup</td>
<td><ahref="#inlinekeyboardmarkup">InlineKeyboardMarkup</a> or <ahref="#replykeyboardmarkup">ReplyKeyboardMarkup</a> or <ahref="#replykeyboardremove">ReplyKeyboardRemove</a> or <ahref="#forcereply">ForceReply</a></td>
<td>Optional</td>
<td>Additional interface options. A JSON-serialized object for an <ahref="https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating">inline keyboard</a>, <ahref="https://core.telegram.org/bots#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 was sent by the bot, 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 stop updating a live location message before <em>live_period</em> expires. On success, if the message was sent by the bot, the sent <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>
<p>Use this method to send information about a venue. 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>
</tr>
<tr>
<td>latitude</td>
<td>Float number</td>
<td>Yes</td>
<td>Latitude of the venue</td>
</tr>
<tr>
<td>longitude</td>
<td>Float number</td>
<td>Yes</td>
<td>Longitude of the venue</td>
</tr>
<tr>
<td>title</td>
<td>String</td>
<td>Yes</td>
<td>Name of the venue</td>
</tr>
<tr>
<td>address</td>
<td>String</td>
<td>Yes</td>
<td>Address of the venue</td>
</tr>
<tr>
<td>foursquare_id</td>
<td>String</td>
<td>Optional</td>
<td>Foursquare identifier of the venue</td>
</tr>
<tr>
<td>foursquare_type</td>
<td>String</td>
<td>Optional</td>
<td>Foursquare type of the venue, if known. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.)</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>reply_to_message_id</td>
<td>Integer</td>
<td>Optional</td>
<td>If the message is a reply, ID of the original message</td>
</tr>
<tr>
<td>reply_markup</td>
<td><ahref="#inlinekeyboardmarkup">InlineKeyboardMarkup</a> or <ahref="#replykeyboardmarkup">ReplyKeyboardMarkup</a> or <ahref="#replykeyboardremove">ReplyKeyboardRemove</a> or <ahref="#forcereply">ForceReply</a></td>
<td>Optional</td>
<td>Additional interface options. A JSON-serialized object for an <ahref="https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating">inline keyboard</a>, <ahref="https://core.telegram.org/bots#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 phone contacts. 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>
</tr>
<tr>
<td>phone_number</td>
<td>String</td>
<td>Yes</td>
<td>Contact's phone number</td>
</tr>
<tr>
<td>first_name</td>
<td>String</td>
<td>Yes</td>
<td>Contact's first name</td>
</tr>
<tr>
<td>last_name</td>
<td>String</td>
<td>Optional</td>
<td>Contact's last name</td>
</tr>
<tr>
<td>vcard</td>
<td>String</td>
<td>Optional</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>reply_to_message_id</td>
<td>Integer</td>
<td>Optional</td>
<td>If the message is a reply, ID of the original message</td>
</tr>
<tr>
<td>reply_markup</td>
<td><ahref="#inlinekeyboardmarkup">InlineKeyboardMarkup</a> or <ahref="#replykeyboardmarkup">ReplyKeyboardMarkup</a> or <ahref="#replykeyboardremove">ReplyKeyboardRemove</a> or <ahref="#forcereply">ForceReply</a></td>
<td>Optional</td>
<td>Additional interface options. A JSON-serialized object for an <ahref="https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating">inline keyboard</a>, <ahref="https://core.telegram.org/bots#keyboards">custom reply keyboard</a>, instructions to remove keyboard or to force a reply from the user.</td>
<p>Use this method to send a native poll. 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>
</tr>
<tr>
<td>question</td>
<td>String</td>
<td>Yes</td>
<td>Poll question, 1-255 characters</td>
</tr>
<tr>
<td>options</td>
<td>Array of String</td>
<td>Yes</td>
<td>A JSON-serialized list of answer options, 2-10 strings 1-100 characters each</td>
</tr>
<tr>
<td>is_anonymous</td>
<td>Boolean</td>
<td>Optional</td>
<td>True, if the poll needs to be anonymous, defaults to <em>True</em></td>
</tr>
<tr>
<td>type</td>
<td>String</td>
<td>Optional</td>
<td>Poll type, “quiz” or “regular”, defaults to “regular”</td>
</tr>
<tr>
<td>allows_multiple_answers</td>
<td>Boolean</td>
<td>Optional</td>
<td>True, 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>open_period</td>
<td>Integer</td>
<td>Optional</td>
<td>Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with <em>close_date</em>.</td>
</tr>
<tr>
<td>close_date</td>
<td>Integer</td>
<td>Optional</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>
</tr>
<tr>
<td>is_closed</td>
<td>Boolean</td>
<td>Optional</td>
<td>Pass <em>True</em>, if the poll needs to be immediately closed. This can be useful for poll preview.</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>reply_to_message_id</td>
<td>Integer</td>
<td>Optional</td>
<td>If the message is a reply, ID of the original message</td>
</tr>
<tr>
<td>reply_markup</td>
<td><ahref="#inlinekeyboardmarkup">InlineKeyboardMarkup</a> or <ahref="#replykeyboardmarkup">ReplyKeyboardMarkup</a> or <ahref="#replykeyboardremove">ReplyKeyboardRemove</a> or <ahref="#forcereply">ForceReply</a></td>
<td>Optional</td>
<td>Additional interface options. A JSON-serialized object for an <ahref="https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating">inline keyboard</a>, <ahref="https://core.telegram.org/bots#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 dice, which will have a random value from 1 to 6. On success, the sent <ahref="#message">Message</a> is returned. (Yes, we're aware of the <em>“proper”</em> singular of <em>die</em>. But it's awkward, and we decided to help it change. One dice at a time!)</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>emoji</td>
<td>String</td>
<td>Optional</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="🎲"/>” or “<imgclass="emoji"src="//telegram.org/img/emoji/40/F09F8EAF.png"width="20"height="20"alt="🎯"/>”. Defauts to “<imgclass="emoji"src="//telegram.org/img/emoji/40/F09F8EB2.png"width="20"height="20"alt="🎲"/>”</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>reply_to_message_id</td>
<td>Integer</td>
<td>Optional</td>
<td>If the message is a reply, ID of the original message</td>
</tr>
<tr>
<td>reply_markup</td>
<td><ahref="#inlinekeyboardmarkup">InlineKeyboardMarkup</a> or <ahref="#replykeyboardmarkup">ReplyKeyboardMarkup</a> or <ahref="#replykeyboardremove">ReplyKeyboardRemove</a> or <ahref="#forcereply">ForceReply</a></td>
<td>Optional</td>
<td>Additional interface options. A JSON-serialized object for an <ahref="https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating">inline keyboard</a>, <ahref="https://core.telegram.org/bots#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>
<blockquote>
<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>
</blockquote>
<p>We only recommend using this method when a response from the bot will take a <strong>noticeable</strong> amount of time to arrive.</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>action</td>
<td>String</td>
<td>Yes</td>
<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_audio</em> or <em>upload_audio</em> for <ahref="#sendaudio">audio files</a>, <em>upload_document</em> for <ahref="#senddocument">general files</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 info about a file and prepare it for downloading. For the moment, bots can download files of up to 20MB in size. On success, a <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>
<tableclass="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>file_id</td>
<td>String</td>
<td>Yes</td>
<td>File identifier to get info about</td>
</tr>
</tbody>
</table>
<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 kick a user from a group, a supergroup or a channel. In the case of supergroups and channels, the user will not be able to return to the group 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 admin 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</td>
<p>Use this method to unban a previously kicked 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. 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>@username</code>)</td>
<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 admin 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>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 admin 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>
</tr>
<tr>
<td>user_id</td>
<td>Integer</td>
<td>Yes</td>
<td>Unique identifier of the target user</td>
</tr>
<tr>
<td>can_change_info</td>
<td>Boolean</td>
<td>Optional</td>
<td>Pass True, if the administrator can change chat title, photo and other settings</td>
</tr>
<tr>
<td>can_post_messages</td>
<td>Boolean</td>
<td>Optional</td>
<td>Pass True, if the administrator can create channel posts, channels only</td>
</tr>
<tr>
<td>can_edit_messages</td>
<td>Boolean</td>
<td>Optional</td>
<td>Pass True, if the administrator can edit messages of other users and can pin messages, channels only</td>
</tr>
<tr>
<td>can_delete_messages</td>
<td>Boolean</td>
<td>Optional</td>
<td>Pass True, if the administrator can delete messages of other users</td>
</tr>
<tr>
<td>can_invite_users</td>
<td>Boolean</td>
<td>Optional</td>
<td>Pass True, if the administrator can invite new users to the chat</td>
</tr>
<tr>
<td>can_restrict_members</td>
<td>Boolean</td>
<td>Optional</td>
<td>Pass True, if the administrator can restrict, ban or unban chat members</td>
</tr>
<tr>
<td>can_pin_messages</td>
<td>Boolean</td>
<td>Optional</td>
<td>Pass True, if the administrator can pin messages, supergroups only</td>
</tr>
<tr>
<td>can_promote_members</td>
<td>Boolean</td>
<td>Optional</td>
<td>Pass True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by him)</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> admin 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 generate a new invite link for a chat; any previously generated link is revoked. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns the new invite link as <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>
</tr>
</tbody>
</table>
<blockquote>
<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> — after this the link will become available to the bot via the <ahref="#getchat">getChat</a> method. If your bot needs to generate a new invite link replacing its previous one, use <ahref="#exportchatinvitelink">exportChatInviteLink</a> again.</p>
<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 admin 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>photo</td>
<td><ahref="#inputfile">InputFile</a></td>
<td>Yes</td>
<td>New chat photo, uploaded using multipart/form-data</td>
<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 admin 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 change the title of a chat. Titles can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns <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 change the description of a group, a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns <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 pin a message in a group, a supergroup, or a channel. The bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' admin right in the supergroup or 'can_edit_messages' admin right in the channel. 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>message_id</td>
<td>Integer</td>
<td>Yes</td>
<td>Identifier of a message to pin</td>
</tr>
<tr>
<td>disable_notification</td>
<td>Boolean</td>
<td>Optional</td>
<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.</td>
<p>Use this method to unpin a message in a group, a supergroup, or a channel. The bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' admin right in the supergroup or 'can_edit_messages' admin right in the channel. 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 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. On success, returns an Array of <ahref="#chatmember">ChatMember</a> objects that contains information about all chat administrators except other bots. If the chat is a group or a supergroup and no administrators were appointed, only the creator will be returned.</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 set a new group sticker set for a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Use the field <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 admin 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 send answers to callback queries sent from <ahref="/bots#inline-keyboards-and-on-the-fly-updating">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>
<blockquote>
<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>
</blockquote>
<tableclass="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>callback_query_id</td>
<td>String</td>
<td>Yes</td>
<td>Unique identifier for the query to be answered</td>
</tr>
<tr>
<td>text</td>
<td>String</td>
<td>Optional</td>
<td>Text of the notification. If not specified, nothing will be shown to the user, 0-200 characters</td>
</tr>
<tr>
<td>show_alert</td>
<td>Boolean</td>
<td>Optional</td>
<td>If <em>true</em>, an alert will be shown by the client instead of a notification at the top of the chat screen. Defaults to <em>false</em>.</td>
</tr>
<tr>
<td>url</td>
<td>String</td>
<td>Optional</td>
<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>
</tr>
<tr>
<td>cache_time</td>
<td>Integer</td>
<td>Optional</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 get the current list of the bot's commands. Requires no parameters. Returns Array of <ahref="#botcommand">BotCommand</a> on success.</p>
<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#inline-keyboards-and-on-the-fly-updating">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#inline-keyboards-and-on-the-fly-updating">inline keyboards</a>.</p>
<p>Use this method to edit text and <ahref="#games">game</a> messages. On success, if edited message is sent by the bot, 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>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 edited message is sent by the bot, 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>
<p>Use this method to edit animation, audio, document, photo, or video messages. If a message is a part of a message album, then it can be edited only to a photo or a video. Otherwise, message type can be changed arbitrarily. When inline message is edited, new file can't be uploaded. Use previously uploaded file via its file_id or specify a URL. On success, if the edited message was sent by the bot, 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>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 edited message is sent by the bot, 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>
<td>A JSON-serialized object for a new message <ahref="https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating">inline keyboard</a>.</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>- 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>
<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>Identifier for this file, which can be used to download or reuse the file</td>
</tr>
<tr>
<td>file_unique_id</td>
<td>String</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>
</tr>
<tr>
<td>width</td>
<td>Integer</td>
<td>Sticker width</td>
</tr>
<tr>
<td>height</td>
<td>Integer</td>
<td>Sticker height</td>
</tr>
<tr>
<td>is_animated</td>
<td>Boolean</td>
<td><em>True</em>, if the sticker is <ahref="https://telegram.org/blog/animated-stickers">animated</a></td>
</tr>
<tr>
<td>thumb</td>
<td><ahref="#photosize">PhotoSize</a></td>
<td><em>Optional</em>. Sticker thumbnail in the .WEBP or .JPG format</td>
</tr>
<tr>
<td>emoji</td>
<td>String</td>
<td><em>Optional</em>. Emoji associated with the sticker</td>
</tr>
<tr>
<td>set_name</td>
<td>String</td>
<td><em>Optional</em>. Name of the sticker set to which the sticker belongs</td>
</tr>
<tr>
<td>mask_position</td>
<td><ahref="#maskposition">MaskPosition</a></td>
<td><em>Optional</em>. For mask stickers, the position where the mask should be placed</td>
<p>This object describes the position on faces where a mask should be placed by default.</p>
<tableclass="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>point</td>
<td>String</td>
<td>The part of the face relative to which the mask should be placed. One of “forehead”, “eyes”, “mouth”, or “chin”.</td>
</tr>
<tr>
<td>x_shift</td>
<td>Float number</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 or <ahref="https://telegram.org/blog/animated-stickers">animated</a> .TGS 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>
</tr>
<tr>
<td>sticker</td>
<td><ahref="#inputfile">InputFile</a> or String</td>
<td>Yes</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 info on Sending Files »</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>reply_to_message_id</td>
<td>Integer</td>
<td>Optional</td>
<td>If the message is a reply, ID of the original message</td>
</tr>
<tr>
<td>reply_markup</td>
<td><ahref="#inlinekeyboardmarkup">InlineKeyboardMarkup</a> or <ahref="#replykeyboardmarkup">ReplyKeyboardMarkup</a> or <ahref="#replykeyboardremove">ReplyKeyboardRemove</a> or <ahref="#forcereply">ForceReply</a></td>
<td>Optional</td>
<td>Additional interface options. A JSON-serialized object for an <ahref="https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating">inline keyboard</a>, <ahref="https://core.telegram.org/bots#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>
<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 file owner</td>
</tr>
<tr>
<td>png_sticker</td>
<td><ahref="#inputfile">InputFile</a></td>
<td>Yes</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. <ahref="#sending-files">More info 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> or <em>tgs_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>
</tr>
<tr>
<td>name</td>
<td>String</td>
<td>Yes</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 <em>“_by_<bot username>”</em>. <em><bot_username></em> is case insensitive. 1-64 characters.</td>
</tr>
<tr>
<td>title</td>
<td>String</td>
<td>Yes</td>
<td>Sticker set title, 1-64 characters</td>
</tr>
<tr>
<td>png_sticker</td>
<td><ahref="#inputfile">InputFile</a> or String</td>
<td>Optional</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 info on Sending Files »</a></td>
</tr>
<tr>
<td>tgs_sticker</td>
<td><ahref="#inputfile">InputFile</a></td>
<td>Optional</td>
<td><strong>TGS</strong> animation with the sticker, uploaded using multipart/form-data. See <ahref="https://core.telegram.org/animated_stickers#technical-requirements"><ahref="https://core.telegram.org/animated_stickers#technical-requirements">https://core.telegram.org/animated_stickers#technical-requirements</a></a> for technical requirements</td>
</tr>
<tr>
<td>emojis</td>
<td>String</td>
<td>Yes</td>
<td>One or more emoji corresponding to the sticker</td>
</tr>
<tr>
<td>contains_masks</td>
<td>Boolean</td>
<td>Optional</td>
<td>Pass <em>True</em>, if a set of mask stickers should be created</td>
</tr>
<tr>
<td>mask_position</td>
<td><ahref="#maskposition">MaskPosition</a></td>
<td>Optional</td>
<td>A JSON-serialized object for position where the mask should be placed on faces</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> or <em>tgs_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>Optional</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 info on Sending Files »</a></td>
</tr>
<tr>
<td>tgs_sticker</td>
<td><ahref="#inputfile">InputFile</a></td>
<td>Optional</td>
<td><strong>TGS</strong> animation with the sticker, uploaded using multipart/form-data. See <ahref="https://core.telegram.org/animated_stickers#technical-requirements"><ahref="https://core.telegram.org/animated_stickers#technical-requirements">https://core.telegram.org/animated_stickers#technical-requirements</a></a> for technical requirements</td>
</tr>
<tr>
<td>emojis</td>
<td>String</td>
<td>Yes</td>
<td>One or more emoji corresponding to the sticker</td>
</tr>
<tr>
<td>mask_position</td>
<td><ahref="#maskposition">MaskPosition</a></td>
<td>Optional</td>
<td>A JSON-serialized object for position where the mask should be placed on faces</td>
<p>Use this method to set the thumbnail of a sticker set. Animated thumbnails can be set for animated 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>Optional</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="https://core.telegram.org/animated_stickers#technical-requirements"><ahref="https://core.telegram.org/animated_stickers#technical-requirements">https://core.telegram.org/animated_stickers#technical-requirements</a></a> for animated 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 info on Sending Files »</a>. Animated sticker set thumbnail 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>
<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>
<tableclass="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>inline_query_id</td>
<td>String</td>
<td>Yes</td>
<td>Unique identifier for the answered query</td>
</tr>
<tr>
<td>results</td>
<td>Array of <ahref="#inlinequeryresult">InlineQueryResult</a></td>
<td>Yes</td>
<td>A JSON-serialized array of results for the inline query</td>
</tr>
<tr>
<td>cache_time</td>
<td>Integer</td>
<td>Optional</td>
<td>The maximum amount of time in seconds that the result of the inline query may be cached on the server. Defaults to 300.</td>
</tr>
<tr>
<td>is_personal</td>
<td>Boolean</td>
<td>Optional</td>
<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>
</tr>
<tr>
<td>next_offset</td>
<td>String</td>
<td>Optional</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>
</tr>
<tr>
<td>switch_pm_text</td>
<td>String</td>
<td>Optional</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>
</tr>
<tr>
<td>switch_pm_parameter</td>
<td>String</td>
<td>Optional</td>
<td><ahref="/bots#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>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>
<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</td>
</tr>
<tr>
<td>thumb_url</td>
<td>String</td>
<td>URL of the static thumbnail for the result (jpeg or gif)</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>
<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>
</tr>
<tr>
<td>mpeg4_url</td>
<td>String</td>
<td>A valid URL for the MP4 file. File size must not exceed 1MB</td>
</tr>
<tr>
<td>mpeg4_width</td>
<td>Integer</td>
<td><em>Optional</em>. Video width</td>
</tr>
<tr>
<td>mpeg4_height</td>
<td>Integer</td>
<td><em>Optional</em>. Video height</td>
</tr>
<tr>
<td>mpeg4_duration</td>
<td>Integer</td>
<td><em>Optional</em>. Video duration</td>
</tr>
<tr>
<td>thumb_url</td>
<td>String</td>
<td>URL of the static thumbnail (jpeg or gif) for the result</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 MPEG-4 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>
<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>
</tr>
<tr>
<td>mime_type</td>
<td>String</td>
<td>Mime type of the content of video url, “text/html” or “video/mp4”</td>
</tr>
<tr>
<td>thumb_url</td>
<td>String</td>
<td>URL of the thumbnail (jpeg only) for the video</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 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>video_width</td>
<td>Integer</td>
<td><em>Optional</em>. Video width</td>
</tr>
<tr>
<td>video_height</td>
<td>Integer</td>
<td><em>Optional</em>. Video height</td>
</tr>
<tr>
<td>video_duration</td>
<td>Integer</td>
<td><em>Optional</em>. Video duration in seconds</td>
</tr>
<tr>
<td>description</td>
<td>String</td>
<td><em>Optional</em>. Short description of the result</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>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>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>document_url</td>
<td>String</td>
<td>A valid URL for the file</td>
</tr>
<tr>
<td>mime_type</td>
<td>String</td>
<td>Mime type of the content of the file, either “application/pdf” or “application/zip”</td>
</tr>
<tr>
<td>description</td>
<td>String</td>
<td><em>Optional</em>. Short description of the result</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>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>
<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>
</tr>
<tr>
<td>foursquare_type</td>
<td>String</td>
<td><em>Optional</em>. Foursquare type of the venue, if known. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.)</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>
</tr>
<tr>
<td>phone_number</td>
<td>String</td>
<td>Contact's phone number</td>
</tr>
<tr>
<td>first_name</td>
<td>String</td>
<td>Contact's first name</td>
</tr>
<tr>
<td>last_name</td>
<td>String</td>
<td><em>Optional</em>. Contact's last name</td>
</tr>
<tr>
<td>vcard</td>
<td>String</td>
<td><em>Optional</em>. Additional data about the contact in the form of a <ahref="https://en.wikipedia.org/wiki/VCard">vCard</a>, 0-2048 bytes</td>
<td><em>Optional</em>. <ahref="/bots#inline-keyboards-and-on-the-fly-updating">Inline keyboard</a> attached to the message</td>
</tr>
</tbody>
</table>
<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>
<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>
<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>
</tr>
<tr>
<td>mpeg4_file_id</td>
<td>String</td>
<td>A valid file identifier for the MP4 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 MPEG-4 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>
<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>
<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>
<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>
<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>
<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 4 types:</p>
<p>Represents the <ahref="#inputmessagecontent">content</a> of a venue 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 venue in degrees</td>
</tr>
<tr>
<td>longitude</td>
<td>Float</td>
<td>Longitude of the venue in degrees</td>
</tr>
<tr>
<td>title</td>
<td>String</td>
<td>Name 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>
</tr>
<tr>
<td>foursquare_type</td>
<td>String</td>
<td><em>Optional</em>. Foursquare type of the venue, if known. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.)</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>
</tr>
</tbody>
</table>
<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>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>
<p>Use this method to send invoices. 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</td>
<td>Yes</td>
<td>Unique identifier for the target private chat</td>
</tr>
<tr>
<td>title</td>
<td>String</td>
<td>Yes</td>
<td>Product name, 1-32 characters</td>
</tr>
<tr>
<td>description</td>
<td>String</td>
<td>Yes</td>
<td>Product description, 1-255 characters</td>
</tr>
<tr>
<td>payload</td>
<td>String</td>
<td>Yes</td>
<td>Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.</td>
</tr>
<tr>
<td>provider_token</td>
<td>String</td>
<td>Yes</td>
<td>Payments provider token, obtained via <ahref="https://t.me/botfather">Botfather</a></td>
</tr>
<tr>
<td>start_parameter</td>
<td>String</td>
<td>Yes</td>
<td>Unique deep-linking parameter that can be used to generate this invoice when used as a start parameter</td>
</tr>
<tr>
<td>currency</td>
<td>String</td>
<td>Yes</td>
<td>Three-letter ISO 4217 currency code, see <ahref="/bots/payments#supported-currencies">more on currencies</a></td>
</tr>
<tr>
<td>prices</td>
<td>Array of <ahref="#labeledprice">LabeledPrice</a></td>
<td>Yes</td>
<td>Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)</td>
</tr>
<tr>
<td>provider_data</td>
<td>String</td>
<td>Optional</td>
<td>JSON-encoded 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. People like it better when they see what they are paying for.</td>
</tr>
<tr>
<td>photo_size</td>
<td>Integer</td>
<td>Optional</td>
<td>Photo size</td>
</tr>
<tr>
<td>photo_width</td>
<td>Integer</td>
<td>Optional</td>
<td>Photo width</td>
</tr>
<tr>
<td>photo_height</td>
<td>Integer</td>
<td>Optional</td>
<td>Photo height</td>
</tr>
<tr>
<td>need_name</td>
<td>Boolean</td>
<td>Optional</td>
<td>Pass <em>True</em>, if you require the user's full name to complete the order</td>
</tr>
<tr>
<td>need_phone_number</td>
<td>Boolean</td>
<td>Optional</td>
<td>Pass <em>True</em>, if you require the user's phone number to complete the order</td>
</tr>
<tr>
<td>need_email</td>
<td>Boolean</td>
<td>Optional</td>
<td>Pass <em>True</em>, if you require the user's email address to complete the order</td>
</tr>
<tr>
<td>need_shipping_address</td>
<td>Boolean</td>
<td>Optional</td>
<td>Pass <em>True</em>, if you require the user's shipping address to complete the order</td>
</tr>
<tr>
<td>send_phone_number_to_provider</td>
<td>Boolean</td>
<td>Optional</td>
<td>Pass <em>True</em>, if user's phone number should be sent to provider</td>
</tr>
<tr>
<td>send_email_to_provider</td>
<td>Boolean</td>
<td>Optional</td>
<td>Pass <em>True</em>, if user's email address should be sent to provider</td>
</tr>
<tr>
<td>is_flexible</td>
<td>Boolean</td>
<td>Optional</td>
<td>Pass <em>True</em>, if the final price depends on the shipping method</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>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="https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating">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>
<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, True 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>
</tr>
<tr>
<td>ok</td>
<td>Boolean</td>
<td>Yes</td>
<td>Specify True if delivery to the specified address is possible and False if there are any problems (for example, if delivery to the specified address is not possible)</td>
</tr>
<tr>
<td>shipping_options</td>
<td>Array of <ahref="#shippingoption">ShippingOption</a></td>
<td>Optional</td>
<td>Required if <em>ok</em> is True. A JSON-serialized array of available shipping options.</td>
</tr>
<tr>
<td>error_message</td>
<td>String</td>
<td>Optional</td>
<td>Required if <em>ok</em> is False. Error message in human readable form that explains why it is impossible to complete the order (e.g. "Sorry, delivery to your desired address is unavailable'). Telegram will display this message to the user.</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, True 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>
</tr>
<tr>
<td>error_message</td>
<td>String</td>
<td>Optional</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>
<p>This object represents a portion of the price for goods or services.</p>
<tableclass="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>label</td>
<td>String</td>
<td>Portion label</td>
</tr>
<tr>
<td>amount</td>
<td>Integer</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="https://core.telegram.org/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>This object contains basic information about an invoice.</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>Product name</td>
</tr>
<tr>
<td>description</td>
<td>String</td>
<td>Product description</td>
</tr>
<tr>
<td>start_parameter</td>
<td>String</td>
<td>Unique bot deep-linking parameter that can be used to generate this invoice</td>
</tr>
<tr>
<td>currency</td>
<td>String</td>
<td>Three-letter ISO 4217 <ahref="/bots/payments#supported-currencies">currency</a> code</td>
</tr>
<tr>
<td>total_amount</td>
<td>Integer</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="https://core.telegram.org/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>This object contains basic information about a successful payment.</p>
<tableclass="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>currency</td>
<td>String</td>
<td>Three-letter ISO 4217 <ahref="/bots/payments#supported-currencies">currency</a> code</td>
</tr>
<tr>
<td>total_amount</td>
<td>Integer</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="https://core.telegram.org/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>
</tr>
<tr>
<td>invoice_payload</td>
<td>String</td>
<td>Bot specified invoice payload</td>
</tr>
<tr>
<td>shipping_option_id</td>
<td>String</td>
<td><em>Optional</em>. Identifier of the shipping option chosen by the user</td>
</tr>
<tr>
<td>order_info</td>
<td><ahref="#orderinfo">OrderInfo</a></td>
<td><em>Optional</em>. Order info provided by the user</td>
<p>This object contains information about an incoming pre-checkout query.</p>
<tableclass="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>id</td>
<td>String</td>
<td>Unique query identifier</td>
</tr>
<tr>
<td>from</td>
<td><ahref="#user">User</a></td>
<td>User who sent the query</td>
</tr>
<tr>
<td>currency</td>
<td>String</td>
<td>Three-letter ISO 4217 <ahref="/bots/payments#supported-currencies">currency</a> code</td>
</tr>
<tr>
<td>total_amount</td>
<td>Integer</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="https://core.telegram.org/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>
</tr>
<tr>
<td>invoice_payload</td>
<td>String</td>
<td>Bot specified invoice payload</td>
</tr>
<tr>
<td>shipping_option_id</td>
<td>String</td>
<td><em>Optional</em>. Identifier of the shipping option chosen by the user</td>
</tr>
<tr>
<td>order_info</td>
<td><ahref="#orderinfo">OrderInfo</a></td>
<td><em>Optional</em>. Order info provided by the user</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>
<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>
</tr>
<tr>
<td>file_unique_id</td>
<td>String</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>
<p>Contains information about documents or other Telegram Passport elements shared with the bot by the user.</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>Element type. One of “personal_details”, “passport”, “driver_license”, “identity_card”, “internal_passport”, “address”, “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration”, “temporary_registration”, “phone_number”, “email”.</td>
</tr>
<tr>
<td>data</td>
<td>String</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>
</tr>
<tr>
<td>phone_number</td>
<td>String</td>
<td><em>Optional</em>. User's verified phone number, available only for “phone_number” type</td>
</tr>
<tr>
<td>email</td>
<td>String</td>
<td><em>Optional</em>. User's verified email address, available only for “email” type</td>
</tr>
<tr>
<td>files</td>
<td>Array of <ahref="#passportfile">PassportFile</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>
</tr>
<tr>
<td>front_side</td>
<td><ahref="#passportfile">PassportFile</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>
</tr>
<tr>
<td>reverse_side</td>
<td><ahref="#passportfile">PassportFile</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>
</tr>
<tr>
<td>selfie</td>
<td><ahref="#passportfile">PassportFile</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>
</tr>
<tr>
<td>translation</td>
<td>Array of <ahref="#passportfile">PassportFile</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>
</tr>
<tr>
<td>hash</td>
<td>String</td>
<td>Base64-encoded element hash for using in <ahref="#passportelementerrorunspecified">PassportElementErrorUnspecified</a></td>
<p>Contains data required for decrypting and authenticating <ahref="#encryptedpassportelement">EncryptedPassportElement</a>. See the <ahref="https://core.telegram.org/passport#receiving-information">Telegram Passport Documentation</a> for a complete description of the data decryption and authentication processes.</p>
<tableclass="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>data</td>
<td>String</td>
<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>
</tr>
<tr>
<td>hash</td>
<td>String</td>
<td>Base64-encoded data hash for data authentication</td>
</tr>
<tr>
<td>secret</td>
<td>String</td>
<td>Base64-encoded secret, encrypted with the bot's public RSA key, required for data decryption</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>
<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</td>
</tr>
<tr>
<td>errors</td>
<td>Array of <ahref="#passportelementerror">PassportElementError</a></td>
<td>Yes</td>
<td>A JSON-serialized array describing the errors</td>
<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>
<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>data</em></td>
</tr>
<tr>
<td>type</td>
<td>String</td>
<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>
</tr>
<tr>
<td>field_name</td>
<td>String</td>
<td>Name of the data field which has the error</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>
</tr>
<tr>
<td>type</td>
<td>String</td>
<td>The section of the user's Telegram Passport which has the issue, one of “passport”, “driver_license”, “identity_card”, “internal_passport”</td>
</tr>
<tr>
<td>file_hash</td>
<td>String</td>
<td>Base64-encoded hash of the file with the front side of the document</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>
</tr>
<tr>
<td>type</td>
<td>String</td>
<td>The section of the user's Telegram Passport which has the issue, one of “driver_license”, “identity_card”</td>
</tr>
<tr>
<td>file_hash</td>
<td>String</td>
<td>Base64-encoded hash of the file with the reverse side of the document</td>
<p>Represents an issue with the selfie with a document. The error is considered resolved when the file with the selfie 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>selfie</em></td>
</tr>
<tr>
<td>type</td>
<td>String</td>
<td>The section of the user's Telegram Passport which has the issue, one of “passport”, “driver_license”, “identity_card”, “internal_passport”</td>
</tr>
<tr>
<td>file_hash</td>
<td>String</td>
<td>Base64-encoded hash of the file with the selfie</td>
<p>Represents an issue with a document scan. The error is considered resolved when the file with the document scan 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>file</em></td>
</tr>
<tr>
<td>type</td>
<td>String</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 a list of scans. The error is considered resolved when the list of files containing the scans 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>files</em></td>
</tr>
<tr>
<td>type</td>
<td>String</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>
</tr>
<tr>
<td>type</td>
<td>String</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>
</tr>
<tr>
<td>type</td>
<td>String</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>
<p>Use this method to send a game. 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</td>
<td>Yes</td>
<td>Unique identifier for the target chat</td>
</tr>
<tr>
<td>game_short_name</td>
<td>String</td>
<td>Yes</td>
<td>Short name of the game, serves as the unique identifier for the game. Set up your games via <ahref="https://t.me/botfather">Botfather</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>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="https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating">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. On success, if the message was sent by the bot, returns the edited <ahref="#message">Message</a>, otherwise returns <em>True</em>. 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>
<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</td>
</tr>
<tr>
<td>score</td>
<td>Integer</td>
<td>Yes</td>
<td>New score, must be non-negative</td>
</tr>
<tr>
<td>force</td>
<td>Boolean</td>
<td>Optional</td>
<td>Pass True, if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters</td>
</tr>
<tr>
<td>disable_edit_message</td>
<td>Boolean</td>
<td>Optional</td>
<td>Pass True, if the game message should not be automatically edited to include the current scoreboard</td>
</tr>
<tr>
<td>chat_id</td>
<td>Integer</td>
<td>Optional</td>
<td>Required if <em>inline_message_id</em> is not specified. Unique identifier for the target chat</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 sent message</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 get data for high score tables. Will return the score of the specified user and several of their neighbors in a game. On success, returns an <em>Array</em> of <ahref="#gamehighscore">GameHighScore</a> objects.</p>
<blockquote>
<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 his neighbors are not among them. Please note that this behavior is subject to change.</p>
</blockquote>
<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>Target user id</td>
</tr>
<tr>
<td>chat_id</td>
<td>Integer</td>
<td>Optional</td>
<td>Required if <em>inline_message_id</em> is not specified. Unique identifier for the target chat</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 sent message</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>This object represents one row of the high scores table for a game.</p>
<tableclass="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>position</td>
<td>Integer</td>
<td>Position in high score table for the game</td>
</tr>
<tr>
<td>user</td>
<td><ahref="#user">User</a></td>
<td>User</td>
</tr>
<tr>
<td>score</td>
<td>Integer</td>
<td>Score</td>
</tr>
</tbody>
</table>
<hr>
<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>
</div>
</div>
</div>
</div>
<divclass="footer_wrap">
<divclass="footer_columns_wrap footer_desktop">
<divclass="footer_column footer_column_telegram">
<h5>Telegram</h5>
<divclass="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.