telegram-crawler/data/web/core.telegram.org/bots/api.html
2024-08-19 19:36:22 +00:00

14459 lines
523 KiB
HTML

<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>Telegram Bot API</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="The Bot API is an HTTP-based interface created for developers keen on building bots for Telegram.
To learn how to create…">
<meta property="og:title" content="Telegram Bot API">
<meta property="og:image" content="30f729d4f304e41659">
<meta property="og:description" content="The Bot API is an HTTP-based interface created for developers keen on building bots for Telegram.
To learn how to create…">
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/img/favicon-16x16.png">
<link rel="alternate icon" href="/img/favicon.ico" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?240" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class=""><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class=""><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/bots" >Telegram Bots</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/bots/api" >Telegram Bot API</a></li></ul></div>
<h1 id="dev_page_title">Telegram Bot API</h1>
<div id="dev_page_content"><!-- scroll_nav -->
<blockquote>
<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 <a href="/bots"><strong>Introduction to Bots</strong></a> and <a href="/bots/faq"><strong>Bot FAQ</strong></a>.</p>
</blockquote>
<h3><a class="anchor" name="recent-changes" href="#recent-changes"><i class="anchor-icon"></i></a>Recent changes</h3>
<blockquote>
<p>Subscribe to <a href="https://t.me/botnews">@BotNews</a> to be the first to know about the latest updates and join the discussion in <a href="https://t.me/bottalk">@BotTalk</a></p>
</blockquote>
<h4><a class="anchor" name="august-14-2024" href="#august-14-2024"><i class="anchor-icon"></i></a>August 14, 2024</h4>
<p><strong>Bot API 7.9</strong></p>
<ul>
<li>Added support for <a href="https://telegram.org/blog/superchannels-star-reactions-subscriptions#super-channels">Super Channels</a>, allowing received channel messages to have users or other channels as their senders.</li>
<li>Added the ability to send paid media to any chat.</li>
<li>Added the parameter <em>business_connection_id</em> to the method <a href="#sendpaidmedia">sendPaidMedia</a>, allowing bots to send paid media on behalf of a business account.</li>
<li>Added the field <em>paid_media</em> to the class <a href="#transactionpartneruser">TransactionPartnerUser</a> for transactions involving paid media.</li>
<li>Added the fields <em>subscription_period</em> and <em>subscription_price</em> to the class <a href="#chatinvitelink">ChatInviteLink</a>.</li>
<li>Added the method <a href="#createchatsubscriptioninvitelink">createChatSubscriptionInviteLink</a>, allowing bots to create subscription invite links.</li>
<li>Added the method <a href="#editchatsubscriptioninvitelink">editChatSubscriptionInviteLink</a>, allowing bots to edit the <em>name</em> of subscription invite links.</li>
<li>Added the field <em>until_date</em> to the class <a href="#chatmembermember">ChatMemberMember</a> for members with an active subscription.</li>
<li>Added support for paid reactions and the class <a href="#reactiontypepaid">ReactionTypePaid</a>.</li>
</ul>
<h4><a class="anchor" name="july-31-2024" href="#july-31-2024"><i class="anchor-icon"></i></a>July 31, 2024</h4>
<p><strong>Bot API 7.8</strong></p>
<ul>
<li>Added the option for bots to set a <a href="/bots/webapps#launching-the-main-mini-app">Main Mini App</a>, which can be previewed and launched directly from a button in the bot&#39;s profile or a link.</li>
<li>Added the method <em>shareToStory</em> to the class <a href="/bots/webapps#initializing-mini-apps">WebApp</a>.</li>
<li>Added the field <em>has_main_web_app</em> to the class <a href="#user">User</a>, which is returned in the response to <a href="#getme">getMe</a>.</li>
<li>Added the parameter <em>business_connection_id</em> to the methods <a href="#pinchatmessage">pinChatMessage</a> and <a href="#unpinchatmessage">unpinChatMessage</a>, allowing bots to manage pinned messages on behalf of a business account.</li>
</ul>
<h4><a class="anchor" name="july-7-2024" href="#july-7-2024"><i class="anchor-icon"></i></a>July 7, 2024</h4>
<p><strong>Bot API 7.7</strong></p>
<ul>
<li>Added the class <a href="#refundedpayment">RefundedPayment</a>, containing information about a refunded payment.</li>
<li>Added the field <em>refunded_payment</em> to the class <a href="#message">Message</a>, describing a service message about a refunded payment.</li>
<li>Added the field <em>isVerticalSwipesEnabled</em> and the methods <em>enableVerticalSwipes</em>, <em>disableVerticalSwipes</em> to the class <a href="/bots/webapps#initializing-mini-apps">WebApp</a>.</li>
<li>Added the <a href="/bots/webapps#events-available-for-mini-apps">event</a> <em>scanQrPopupClosed</em> for Mini Apps.</li>
</ul>
<h4><a class="anchor" name="july-1-2024" href="#july-1-2024"><i class="anchor-icon"></i></a>July 1, 2024</h4>
<p><strong>Bot API 7.6</strong></p>
<ul>
<li>Added the classes <a href="#paidmedia">PaidMedia</a>, <a href="#paidmediainfo">PaidMediaInfo</a>, <a href="#paidmediapreview">PaidMediaPreview</a>, <a href="#paidmediaphoto">PaidMediaPhoto</a> and <a href="#paidmediavideo">PaidMediaVideo</a>, containing information about paid media.</li>
<li>Added the method <a href="#sendpaidmedia">sendPaidMedia</a> and the classes <a href="#inputpaidmedia">InputPaidMedia</a>, <a href="#inputpaidmediaphoto">InputPaidMediaPhoto</a> and <a href="#inputpaidmediavideo">InputPaidMediaVideo</a>, to support sending paid media.</li>
<li>Documented that the methods <a href="#copymessage">copyMessage</a> and <a href="#copymessages">copyMessages</a> cannot be used to copy paid media.</li>
<li>Added the field <em>can_send_paid_media</em> to the class <a href="#chatfullinfo">ChatFullInfo</a>.</li>
<li>Added the field <em>paid_media</em> to the classes <a href="#message">Message</a> and <a href="#externalreplyinfo">ExternalReplyInfo</a>.</li>
<li>Added the class <a href="#transactionpartnertelegramads">TransactionPartnerTelegramAds</a>, containing information about Telegram Star transactions involving the Telegram Ads Platform.</li>
<li>Added the field <em>invoice_payload</em> to the class <a href="#transactionpartneruser">TransactionPartnerUser</a>, containing the bot-specified invoice payload.</li>
<li>Changed the default opening mode for <a href="/bots/webapps#direct-link-mini-apps">Direct Link Mini Apps</a>.</li>
<li>Added support for launching Web Apps via <code>t.me</code> link in the class <a href="#menubuttonwebapp">MenuButtonWebApp</a>.</li>
<li>Added the field <em>section_separator_color</em> to the class <a href="/bots/webapps#themeparams">ThemeParams</a>.</li>
</ul>
<h4><a class="anchor" name="june-18-2024" href="#june-18-2024"><i class="anchor-icon"></i></a>June 18, 2024</h4>
<p><strong>Bot API 7.5</strong></p>
<ul>
<li>Added the classes <a href="#startransactions">StarTransactions</a>, <a href="#startransaction">StarTransaction</a>, <a href="#transactionpartner">TransactionPartner</a> and <a href="#revenuewithdrawalstate">RevenueWithdrawalState</a>, containing information about Telegram Star transactions involving the bot.</li>
<li>Added the method <a href="#getstartransactions">getStarTransactions</a> that can be used to get the list of all Telegram Star transactions for the bot.</li>
<li>Added support for <em>callback</em> buttons in <a href="#inlinekeyboardmarkup">InlineKeyboardMarkup</a> for messages sent on behalf of a business account.</li>
<li>Added support for callback queries originating from a message sent on behalf of a business account.</li>
<li>Added the parameter <em>business_connection_id</em> to the methods <a href="#editmessagetext">editMessageText</a>, <a href="#editmessagemedia">editMessageMedia</a>, <a href="#editmessagecaption">editMessageCaption</a>, <a href="#editmessagelivelocation">editMessageLiveLocation</a>, <a href="#stopmessagelivelocation">stopMessageLiveLocation</a> and <a href="#editmessagereplymarkup">editMessageReplyMarkup</a>, allowing the bot to edit business messages.</li>
<li>Added the parameter <em>business_connection_id</em> to the method <a href="#stoppoll">stopPoll</a>, allowing the bot to stop polls it sent on behalf of a business account.</li>
</ul>
<p><strong><a href="/bots/api-changelog">See earlier changes »</a></strong></p>
<h3><a class="anchor" name="authorizing-your-bot" href="#authorizing-your-bot"><i class="anchor-icon"></i></a>Authorizing your bot</h3>
<p>Each bot is given a unique authentication token <a href="/bots/features#botfather">when it is created</a>. The token looks something like <code>123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11</code>, but we&#39;ll use simply <strong>&lt;token&gt;</strong> in this document instead. You can learn about obtaining tokens and generating new ones in <a href="/bots/features#botfather">this document</a>.</p>
<h3><a class="anchor" name="making-requests" href="#making-requests"><i class="anchor-icon"></i></a>Making requests</h3>
<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&lt;token&gt;/METHOD_NAME</code>. Like this for example:</p>
<pre><code>https://api.telegram.org/bot123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11/getMe</code></pre>
<p>We support <strong>GET</strong> and <strong>POST</strong> HTTP methods. We support four ways of passing parameters in Bot API requests:</p>
<ul>
<li><a href="https://en.wikipedia.org/wiki/Query_string">URL query string</a></li>
<li>application/x-www-form-urlencoded</li>
<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 &#39;ok&#39; and may have an optional String field &#39;description&#39; with a human-readable description of the result. If &#39;ok&#39; equals <em>True</em>, the request was successful and the result of the query can be found in the &#39;result&#39; field. In case of an unsuccessful request, &#39;ok&#39; equals false and the error is explained in the &#39;description&#39;. An Integer &#39;error_code&#39; field is also returned, but its contents are subject to change in the future. Some errors may also have an optional field &#39;parameters&#39; of the type <a href="#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><a class="anchor" name="making-requests-when-getting-updates" href="#making-requests-when-getting-updates"><i class="anchor-icon"></i></a>Making requests when getting updates</h4>
<p>If you&#39;re using <a href="#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&#39;s not possible to know that such a request was successful or get its result.</p>
<blockquote>
<p>Please see our <a href="/bots/faq#how-can-i-make-requests-in-response-to-updates">FAQ</a> for examples.</p>
</blockquote>
<h3><a class="anchor" name="using-a-local-bot-api-server" href="#using-a-local-bot-api-server"><i class="anchor-icon"></i></a>Using a Local Bot API Server</h3>
<p>The Bot API server source code is available at <a href="https://github.com/tdlib/telegram-bot-api">telegram-bot-api</a>. You can run it locally and send the requests to your own server instead of <code>https://api.telegram.org</code>. If you switch to a local Bot API server, your bot will be able to:</p>
<ul>
<li>Download files without a size limit.</li>
<li>Upload files up to 2000 MB.</li>
<li>Upload files using their local path and <a href="https://en.wikipedia.org/wiki/File_URI_scheme">the file URI scheme</a>.</li>
<li>Use an HTTP URL for the webhook.</li>
<li>Use any local IP address for the webhook.</li>
<li>Use any port for the webhook.</li>
<li>Set <em>max_webhook_connections</em> up to 100000.</li>
<li>Receive the absolute local path as a value of the <em>file_path</em> field without the need to download the file after a <a href="#getfile">getFile</a> request.</li>
</ul>
<h4><a class="anchor" name="do-i-need-a-local-bot-api-server" href="#do-i-need-a-local-bot-api-server"><i class="anchor-icon"></i></a>Do I need a Local Bot API Server</h4>
<p>The majority of bots will be OK with the default configuration, running on our servers. But if you feel that you need one of <a href="#using-a-local-bot-api-server">these features</a>, you&#39;re welcome to switch to your own at any time.</p>
<h3><a class="anchor" name="getting-updates" href="#getting-updates"><i class="anchor-icon"></i></a>Getting updates</h3>
<p>There are two mutually exclusive ways of receiving updates for your bot - the <a href="#getupdates">getUpdates</a> method on one hand and <a href="#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 <a href="#update">Update</a> objects as a result.</p>
<h4><a class="anchor" name="update" href="#update"><i class="anchor-icon"></i></a>Update</h4>
<p>This <a href="#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>
<table class="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&#39;s unique identifier. Update identifiers start from a certain positive number and increase sequentially. This identifier becomes especially handy if you&#39;re using <a href="#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><a href="#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><a href="#message">Message</a></td>
<td><em>Optional</em>. New version of a message that is known to the bot and was edited. This update may at times be triggered by changes to message fields that are either unavailable or not actively used by your bot.</td>
</tr>
<tr>
<td>channel_post</td>
<td><a href="#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><a href="#message">Message</a></td>
<td><em>Optional</em>. New version of a channel post that is known to the bot and was edited. This update may at times be triggered by changes to message fields that are either unavailable or not actively used by your bot.</td>
</tr>
<tr>
<td>business_connection</td>
<td><a href="#businessconnection">BusinessConnection</a></td>
<td><em>Optional</em>. The bot was connected to or disconnected from a business account, or a user edited an existing connection with the bot</td>
</tr>
<tr>
<td>business_message</td>
<td><a href="#message">Message</a></td>
<td><em>Optional</em>. New message from a connected business account</td>
</tr>
<tr>
<td>edited_business_message</td>
<td><a href="#message">Message</a></td>
<td><em>Optional</em>. New version of a message from a connected business account</td>
</tr>
<tr>
<td>deleted_business_messages</td>
<td><a href="#businessmessagesdeleted">BusinessMessagesDeleted</a></td>
<td><em>Optional</em>. Messages were deleted from a connected business account</td>
</tr>
<tr>
<td>message_reaction</td>
<td><a href="#messagereactionupdated">MessageReactionUpdated</a></td>
<td><em>Optional</em>. A reaction to a message was changed by a user. The bot must be an administrator in the chat and must explicitly specify <code>&quot;message_reaction&quot;</code> in the list of <em>allowed_updates</em> to receive these updates. The update isn&#39;t received for reactions set by bots.</td>
</tr>
<tr>
<td>message_reaction_count</td>
<td><a href="#messagereactioncountupdated">MessageReactionCountUpdated</a></td>
<td><em>Optional</em>. Reactions to a message with anonymous reactions were changed. The bot must be an administrator in the chat and must explicitly specify <code>&quot;message_reaction_count&quot;</code> in the list of <em>allowed_updates</em> to receive these updates. The updates are grouped and can be sent with delay up to a few minutes.</td>
</tr>
<tr>
<td>inline_query</td>
<td><a href="#inlinequery">InlineQuery</a></td>
<td><em>Optional</em>. New incoming <a href="#inline-mode">inline</a> query</td>
</tr>
<tr>
<td>chosen_inline_result</td>
<td><a href="#choseninlineresult">ChosenInlineResult</a></td>
<td><em>Optional</em>. The result of an <a href="#inline-mode">inline</a> query that was chosen by a user and sent to their chat partner. Please see our documentation on the <a href="/bots/inline#collecting-feedback">feedback collecting</a> for details on how to enable these updates for your bot.</td>
</tr>
<tr>
<td>callback_query</td>
<td><a href="#callbackquery">CallbackQuery</a></td>
<td><em>Optional</em>. New incoming callback query</td>
</tr>
<tr>
<td>shipping_query</td>
<td><a href="#shippingquery">ShippingQuery</a></td>
<td><em>Optional</em>. New incoming shipping query. Only for invoices with flexible price</td>
</tr>
<tr>
<td>pre_checkout_query</td>
<td><a href="#precheckoutquery">PreCheckoutQuery</a></td>
<td><em>Optional</em>. New incoming pre-checkout query. Contains full information about checkout</td>
</tr>
<tr>
<td>poll</td>
<td><a href="#poll">Poll</a></td>
<td><em>Optional</em>. New poll state. Bots receive only updates about manually stopped polls and polls, which are sent by the bot</td>
</tr>
<tr>
<td>poll_answer</td>
<td><a href="#pollanswer">PollAnswer</a></td>
<td><em>Optional</em>. A user changed their answer in a non-anonymous poll. Bots receive new votes only in polls that were sent by the bot itself.</td>
</tr>
<tr>
<td>my_chat_member</td>
<td><a href="#chatmemberupdated">ChatMemberUpdated</a></td>
<td><em>Optional</em>. The bot&#39;s chat member status was updated in a chat. For private chats, this update is received only when the bot is blocked or unblocked by the user.</td>
</tr>
<tr>
<td>chat_member</td>
<td><a href="#chatmemberupdated">ChatMemberUpdated</a></td>
<td><em>Optional</em>. A chat member&#39;s status was updated in a chat. The bot must be an administrator in the chat and must explicitly specify <code>&quot;chat_member&quot;</code> in the list of <em>allowed_updates</em> to receive these updates.</td>
</tr>
<tr>
<td>chat_join_request</td>
<td><a href="#chatjoinrequest">ChatJoinRequest</a></td>
<td><em>Optional</em>. A request to join the chat has been sent. The bot must have the <em>can_invite_users</em> administrator right in the chat to receive these updates.</td>
</tr>
<tr>
<td>chat_boost</td>
<td><a href="#chatboostupdated">ChatBoostUpdated</a></td>
<td><em>Optional</em>. A chat boost was added or changed. The bot must be an administrator in the chat to receive these updates.</td>
</tr>
<tr>
<td>removed_chat_boost</td>
<td><a href="#chatboostremoved">ChatBoostRemoved</a></td>
<td><em>Optional</em>. A boost was removed from a chat. The bot must be an administrator in the chat to receive these updates.</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="getupdates" href="#getupdates"><i class="anchor-icon"></i></a>getUpdates</h4>
<p>Use this method to receive incoming updates using long polling (<a href="https://en.wikipedia.org/wiki/Push_technology#Long_polling">wiki</a>). Returns an Array of <a href="#update">Update</a> objects.</p>
<table class="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 <a href="#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 be 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 <code>[&quot;message&quot;, &quot;edited_channel_post&quot;, &quot;callback_query&quot;]</code> to only receive updates of these types. See <a href="#update">Update</a> for a complete list of available update types. Specify an empty list to receive all update types except <em>chat_member</em>, <em>message_reaction</em>, and <em>message_reaction_count</em> (default). If not specified, the previous setting will be used.<br><br>Please note that this parameter doesn&#39;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>
</blockquote>
<h4><a class="anchor" name="setwebhook" href="#setwebhook"><i class="anchor-icon"></i></a>setWebhook</h4>
<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 <a href="#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&#39;d like to make sure that the webhook was set by you, you can specify secret data in the parameter <em>secret_token</em>. If specified, the request will contain a header “X-Telegram-Bot-Api-Secret-Token” with the secret token as content.</p>
<table class="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><a href="#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 <a href="/bots/self-signed">self-signed guide</a> for details.</td>
</tr>
<tr>
<td>ip_address</td>
<td>String</td>
<td>Optional</td>
<td>The fixed IP address which will be used to send webhook requests instead of the IP address resolved through DNS</td>
</tr>
<tr>
<td>max_connections</td>
<td>Integer</td>
<td>Optional</td>
<td>The maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery, 1-100. Defaults to <em>40</em>. Use lower values to limit the load on your bot&#39;s server, and higher values to increase your bot&#39;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 <code>[&quot;message&quot;, &quot;edited_channel_post&quot;, &quot;callback_query&quot;]</code> to only receive updates of these types. See <a href="#update">Update</a> for a complete list of available update types. Specify an empty list to receive all update types except <em>chat_member</em>, <em>message_reaction</em>, and <em>message_reaction_count</em> (default). If not specified, the previous setting will be used.<br>Please note that this parameter doesn&#39;t affect updates created before the call to the setWebhook, so unwanted updates may be received for a short period of time.</td>
</tr>
<tr>
<td>drop_pending_updates</td>
<td>Boolean</td>
<td>Optional</td>
<td>Pass <em>True</em> to drop all pending updates</td>
</tr>
<tr>
<td>secret_token</td>
<td>String</td>
<td>Optional</td>
<td>A secret token to be sent in a header “X-Telegram-Bot-Api-Secret-Token” in every webhook request, 1-256 characters. Only characters <code>A-Z</code>, <code>a-z</code>, <code>0-9</code>, <code>_</code> and <code>-</code> are allowed. The header is useful to ensure that the request comes from a webhook set by you.</td>
</tr>
</tbody>
</table>
<blockquote>
<p><strong>Notes</strong><br><strong>1.</strong> You will not be able to receive updates using <a href="#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 <a href="/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>If you&#39;re having any trouble setting up webhooks, please check out this <a href="/bots/webhooks">amazing guide to webhooks</a>.</p>
</blockquote>
<h4><a class="anchor" name="deletewebhook" href="#deletewebhook"><i class="anchor-icon"></i></a>deleteWebhook</h4>
<p>Use this method to remove webhook integration if you decide to switch back to <a href="#getupdates">getUpdates</a>. Returns <em>True</em> on success.</p>
<table class="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>drop_pending_updates</td>
<td>Boolean</td>
<td>Optional</td>
<td>Pass <em>True</em> to drop all pending updates</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="getwebhookinfo" href="#getwebhookinfo"><i class="anchor-icon"></i></a>getWebhookInfo</h4>
<p>Use this method to get current webhook status. Requires no parameters. On success, returns a <a href="#webhookinfo">WebhookInfo</a> object. If the bot is using <a href="#getupdates">getUpdates</a>, will return an object with the <em>url</em> field empty.</p>
<h4><a class="anchor" name="webhookinfo" href="#webhookinfo"><i class="anchor-icon"></i></a>WebhookInfo</h4>
<p>Describes the current status of a webhook.</p>
<table class="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><em>True</em>, if a custom certificate was provided for webhook certificate checks</td>
</tr>
<tr>
<td>pending_update_count</td>
<td>Integer</td>
<td>Number of updates awaiting delivery</td>
</tr>
<tr>
<td>ip_address</td>
<td>String</td>
<td><em>Optional</em>. Currently used webhook IP address</td>
</tr>
<tr>
<td>last_error_date</td>
<td>Integer</td>
<td><em>Optional</em>. Unix time for the most recent error that happened when trying to deliver an update via webhook</td>
</tr>
<tr>
<td>last_error_message</td>
<td>String</td>
<td><em>Optional</em>. Error message in human-readable format for the most recent error that happened when trying to deliver an update via webhook</td>
</tr>
<tr>
<td>last_synchronization_error_date</td>
<td>Integer</td>
<td><em>Optional</em>. Unix time of the most recent error that happened when trying to synchronize available updates with Telegram datacenters</td>
</tr>
<tr>
<td>max_connections</td>
<td>Integer</td>
<td><em>Optional</em>. The 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 except <em>chat_member</em></td>
</tr>
</tbody>
</table>
<h3><a class="anchor" name="available-types" href="#available-types"><i class="anchor-icon"></i></a>Available types</h3>
<p>All types used in the Bot API responses are represented as JSON-objects.</p>
<p>It is safe to use 32-bit signed integers for storing all <strong>Integer</strong> fields unless otherwise noted.</p>
<blockquote>
<p><strong>Optional</strong> fields may be not returned when irrelevant.</p>
</blockquote>
<h4><a class="anchor" name="user" href="#user"><i class="anchor-icon"></i></a>User</h4>
<p>This object represents a Telegram user or bot.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>id</td>
<td>Integer</td>
<td>Unique identifier for this user or bot. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.</td>
</tr>
<tr>
<td>is_bot</td>
<td>Boolean</td>
<td><em>True</em>, if this user is a bot</td>
</tr>
<tr>
<td>first_name</td>
<td>String</td>
<td>User&#39;s or bot&#39;s first name</td>
</tr>
<tr>
<td>last_name</td>
<td>String</td>
<td><em>Optional</em>. User&#39;s or bot&#39;s last name</td>
</tr>
<tr>
<td>username</td>
<td>String</td>
<td><em>Optional</em>. User&#39;s or bot&#39;s username</td>
</tr>
<tr>
<td>language_code</td>
<td>String</td>
<td><em>Optional</em>. <a href="https://en.wikipedia.org/wiki/IETF_language_tag">IETF language tag</a> of the user&#39;s language</td>
</tr>
<tr>
<td>is_premium</td>
<td>True</td>
<td><em>Optional</em>. <em>True</em>, if this user is a Telegram Premium user</td>
</tr>
<tr>
<td>added_to_attachment_menu</td>
<td>True</td>
<td><em>Optional</em>. <em>True</em>, if this user added the bot to the attachment menu</td>
</tr>
<tr>
<td>can_join_groups</td>
<td>Boolean</td>
<td><em>Optional</em>. <em>True</em>, if the bot can be invited to groups. Returned only in <a href="#getme">getMe</a>.</td>
</tr>
<tr>
<td>can_read_all_group_messages</td>
<td>Boolean</td>
<td><em>Optional</em>. <em>True</em>, if <a href="/bots/features#privacy-mode">privacy mode</a> is disabled for the bot. Returned only in <a href="#getme">getMe</a>.</td>
</tr>
<tr>
<td>supports_inline_queries</td>
<td>Boolean</td>
<td><em>Optional</em>. <em>True</em>, if the bot supports inline queries. Returned only in <a href="#getme">getMe</a>.</td>
</tr>
<tr>
<td>can_connect_to_business</td>
<td>Boolean</td>
<td><em>Optional</em>. <em>True</em>, if the bot can be connected to a Telegram Business account to receive its messages. Returned only in <a href="#getme">getMe</a>.</td>
</tr>
<tr>
<td>has_main_web_app</td>
<td>Boolean</td>
<td><em>Optional</em>. <em>True</em>, if the bot has a main Web App. Returned only in <a href="#getme">getMe</a>.</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="chat" href="#chat"><i class="anchor-icon"></i></a>Chat</h4>
<p>This object represents a chat.</p>
<table class="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 chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.</td>
</tr>
<tr>
<td>type</td>
<td>String</td>
<td>Type of the 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>is_forum</td>
<td>True</td>
<td><em>Optional</em>. <em>True</em>, if the supergroup chat is a forum (has <a href="https://telegram.org/blog/topics-in-groups-collectible-usernames#topics-in-groups">topics</a> enabled)</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="chatfullinfo" href="#chatfullinfo"><i class="anchor-icon"></i></a>ChatFullInfo</h4>
<p>This object contains full information about a chat.</p>
<table class="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 chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.</td>
</tr>
<tr>
<td>type</td>
<td>String</td>
<td>Type of the 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>is_forum</td>
<td>True</td>
<td><em>Optional</em>. <em>True</em>, if the supergroup chat is a forum (has <a href="https://telegram.org/blog/topics-in-groups-collectible-usernames#topics-in-groups">topics</a> enabled)</td>
</tr>
<tr>
<td>accent_color_id</td>
<td>Integer</td>
<td>Identifier of the accent color for the chat name and backgrounds of the chat photo, reply header, and link preview. See <a href="#accent-colors">accent colors</a> for more details.</td>
</tr>
<tr>
<td>max_reaction_count</td>
<td>Integer</td>
<td>The maximum number of reactions that can be set on a message in the chat</td>
</tr>
<tr>
<td>photo</td>
<td><a href="#chatphoto">ChatPhoto</a></td>
<td><em>Optional</em>. Chat photo</td>
</tr>
<tr>
<td>active_usernames</td>
<td>Array of String</td>
<td><em>Optional</em>. If non-empty, the list of all <a href="https://telegram.org/blog/topics-in-groups-collectible-usernames#collectible-usernames">active chat usernames</a>; for private chats, supergroups and channels</td>
</tr>
<tr>
<td>birthdate</td>
<td><a href="#birthdate">Birthdate</a></td>
<td><em>Optional</em>. For private chats, the date of birth of the user</td>
</tr>
<tr>
<td>business_intro</td>
<td><a href="#businessintro">BusinessIntro</a></td>
<td><em>Optional</em>. For private chats with business accounts, the intro of the business</td>
</tr>
<tr>
<td>business_location</td>
<td><a href="#businesslocation">BusinessLocation</a></td>
<td><em>Optional</em>. For private chats with business accounts, the location of the business</td>
</tr>
<tr>
<td>business_opening_hours</td>
<td><a href="#businessopeninghours">BusinessOpeningHours</a></td>
<td><em>Optional</em>. For private chats with business accounts, the opening hours of the business</td>
</tr>
<tr>
<td>personal_chat</td>
<td><a href="#chat">Chat</a></td>
<td><em>Optional</em>. For private chats, the personal channel of the user</td>
</tr>
<tr>
<td>available_reactions</td>
<td>Array of <a href="#reactiontype">ReactionType</a></td>
<td><em>Optional</em>. List of available reactions allowed in the chat. If omitted, then all <a href="#reactiontypeemoji">emoji reactions</a> are allowed.</td>
</tr>
<tr>
<td>background_custom_emoji_id</td>
<td>String</td>
<td><em>Optional</em>. Custom emoji identifier of the emoji chosen by the chat for the reply header and link preview background</td>
</tr>
<tr>
<td>profile_accent_color_id</td>
<td>Integer</td>
<td><em>Optional</em>. Identifier of the accent color for the chat&#39;s profile background. See <a href="#profile-accent-colors">profile accent colors</a> for more details.</td>
</tr>
<tr>
<td>profile_background_custom_emoji_id</td>
<td>String</td>
<td><em>Optional</em>. Custom emoji identifier of the emoji chosen by the chat for its profile background</td>
</tr>
<tr>
<td>emoji_status_custom_emoji_id</td>
<td>String</td>
<td><em>Optional</em>. Custom emoji identifier of the emoji status of the chat or the other party in a private chat</td>
</tr>
<tr>
<td>emoji_status_expiration_date</td>
<td>Integer</td>
<td><em>Optional</em>. Expiration date of the emoji status of the chat or the other party in a private chat, in Unix time, if any</td>
</tr>
<tr>
<td>bio</td>
<td>String</td>
<td><em>Optional</em>. Bio of the other party in a private chat</td>
</tr>
<tr>
<td>has_private_forwards</td>
<td>True</td>
<td><em>Optional</em>. <em>True</em>, if privacy settings of the other party in the private chat allows to use <code>tg://user?id=&lt;user_id&gt;</code> links only in chats with the user</td>
</tr>
<tr>
<td>has_restricted_voice_and_video_messages</td>
<td>True</td>
<td><em>Optional</em>. <em>True</em>, if the privacy settings of the other party restrict sending voice and video note messages in the private chat</td>
</tr>
<tr>
<td>join_to_send_messages</td>
<td>True</td>
<td><em>Optional</em>. <em>True</em>, if users need to join the supergroup before they can send messages</td>
</tr>
<tr>
<td>join_by_request</td>
<td>True</td>
<td><em>Optional</em>. <em>True</em>, if all users directly joining the supergroup without using an invite link need to be approved by supergroup administrators</td>
</tr>
<tr>
<td>description</td>
<td>String</td>
<td><em>Optional</em>. Description, for groups, supergroups and channel chats</td>
</tr>
<tr>
<td>invite_link</td>
<td>String</td>
<td><em>Optional</em>. Primary invite link, for groups, supergroups and channel chats</td>
</tr>
<tr>
<td>pinned_message</td>
<td><a href="#message">Message</a></td>
<td><em>Optional</em>. The most recent pinned message (by sending date)</td>
</tr>
<tr>
<td>permissions</td>
<td><a href="#chatpermissions">ChatPermissions</a></td>
<td><em>Optional</em>. Default chat member permissions, for groups and supergroups</td>
</tr>
<tr>
<td>can_send_paid_media</td>
<td>True</td>
<td><em>Optional</em>. <em>True</em>, if paid media messages can be sent or forwarded to the channel chat. The field is available only for channel chats.</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 unprivileged user; in seconds</td>
</tr>
<tr>
<td>unrestrict_boost_count</td>
<td>Integer</td>
<td><em>Optional</em>. For supergroups, the minimum number of boosts that a non-administrator user needs to add in order to ignore slow mode and chat permissions</td>
</tr>
<tr>
<td>message_auto_delete_time</td>
<td>Integer</td>
<td><em>Optional</em>. The time after which all messages sent to the chat will be automatically deleted; in seconds</td>
</tr>
<tr>
<td>has_aggressive_anti_spam_enabled</td>
<td>True</td>
<td><em>Optional</em>. <em>True</em>, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators.</td>
</tr>
<tr>
<td>has_hidden_members</td>
<td>True</td>
<td><em>Optional</em>. <em>True</em>, if non-administrators can only get the list of bots and administrators in the chat</td>
</tr>
<tr>
<td>has_protected_content</td>
<td>True</td>
<td><em>Optional</em>. <em>True</em>, if messages from the chat can&#39;t be forwarded to other chats</td>
</tr>
<tr>
<td>has_visible_history</td>
<td>True</td>
<td><em>Optional</em>. <em>True</em>, if new chat members will have access to old messages; available only to chat administrators</td>
</tr>
<tr>
<td>sticker_set_name</td>
<td>String</td>
<td><em>Optional</em>. For supergroups, name of the group sticker set</td>
</tr>
<tr>
<td>can_set_sticker_set</td>
<td>True</td>
<td><em>Optional</em>. <em>True</em>, if the bot can change the group sticker set</td>
</tr>
<tr>
<td>custom_emoji_sticker_set_name</td>
<td>String</td>
<td><em>Optional</em>. For supergroups, the name of the group&#39;s custom emoji sticker set. Custom emoji from this set can be used by all users and bots in the group.</td>
</tr>
<tr>
<td>linked_chat_id</td>
<td>Integer</td>
<td><em>Optional</em>. Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. This identifier may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier.</td>
</tr>
<tr>
<td>location</td>
<td><a href="#chatlocation">ChatLocation</a></td>
<td><em>Optional</em>. For supergroups, the location to which the supergroup is connected</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="message" href="#message"><i class="anchor-icon"></i></a>Message</h4>
<p>This object represents a message.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>message_id</td>
<td>Integer</td>
<td>Unique message identifier inside this chat</td>
</tr>
<tr>
<td>message_thread_id</td>
<td>Integer</td>
<td><em>Optional</em>. Unique identifier of a message thread to which the message belongs; for supergroups only</td>
</tr>
<tr>
<td>from</td>
<td><a href="#user">User</a></td>
<td><em>Optional</em>. Sender of the message; may be empty for messages sent to channels. For backward compatibility, if the message was sent on behalf of a chat, the field contains a fake sender user in non-channel chats</td>
</tr>
<tr>
<td>sender_chat</td>
<td><a href="#chat">Chat</a></td>
<td><em>Optional</em>. Sender of the message when sent on behalf of a chat. For example, the supergroup itself for messages sent by its anonymous administrators or a linked channel for messages automatically forwarded to the channel&#39;s discussion group. For backward compatibility, if the message was sent on behalf of a chat, the field <em>from</em> contains a fake sender user in non-channel chats.</td>
</tr>
<tr>
<td>sender_boost_count</td>
<td>Integer</td>
<td><em>Optional</em>. If the sender of the message boosted the chat, the number of boosts added by the user</td>
</tr>
<tr>
<td>sender_business_bot</td>
<td><a href="#user">User</a></td>
<td><em>Optional</em>. The bot that actually sent the message on behalf of the business account. Available only for outgoing messages sent on behalf of the connected business account.</td>
</tr>
<tr>
<td>date</td>
<td>Integer</td>
<td>Date the message was sent in Unix time. It is always a positive number, representing a valid date.</td>
</tr>
<tr>
<td>business_connection_id</td>
<td>String</td>
<td><em>Optional</em>. Unique identifier of the business connection from which the message was received. If non-empty, the message belongs to a chat of the corresponding business account that is independent from any potential bot chat which might share the same identifier.</td>
</tr>
<tr>
<td>chat</td>
<td><a href="#chat">Chat</a></td>
<td>Chat the message belongs to</td>
</tr>
<tr>
<td>forward_origin</td>
<td><a href="#messageorigin">MessageOrigin</a></td>
<td><em>Optional</em>. Information about the original message for forwarded messages</td>
</tr>
<tr>
<td>is_topic_message</td>
<td>True</td>
<td><em>Optional</em>. <em>True</em>, if the message is sent to a forum topic</td>
</tr>
<tr>
<td>is_automatic_forward</td>
<td>True</td>
<td><em>Optional</em>. <em>True</em>, if the message is a channel post that was automatically forwarded to the connected discussion group</td>
</tr>
<tr>
<td>reply_to_message</td>
<td><a href="#message">Message</a></td>
<td><em>Optional</em>. For replies in the same chat and message thread, 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>external_reply</td>
<td><a href="#externalreplyinfo">ExternalReplyInfo</a></td>
<td><em>Optional</em>. Information about the message that is being replied to, which may come from another chat or forum topic</td>
</tr>
<tr>
<td>quote</td>
<td><a href="#textquote">TextQuote</a></td>
<td><em>Optional</em>. For replies that quote part of the original message, the quoted part of the message</td>
</tr>
<tr>
<td>reply_to_story</td>
<td><a href="#story">Story</a></td>
<td><em>Optional</em>. For replies to a story, the original story</td>
</tr>
<tr>
<td>via_bot</td>
<td><a href="#user">User</a></td>
<td><em>Optional</em>. Bot through which the message was sent</td>
</tr>
<tr>
<td>edit_date</td>
<td>Integer</td>
<td><em>Optional</em>. Date the message was last edited in Unix time</td>
</tr>
<tr>
<td>has_protected_content</td>
<td>True</td>
<td><em>Optional</em>. <em>True</em>, if the message can&#39;t be forwarded</td>
</tr>
<tr>
<td>is_from_offline</td>
<td>True</td>
<td><em>Optional</em>. True, if the message was sent by an implicit action, for example, as an away or a greeting business message, or as a scheduled message</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, or the custom title of an anonymous group administrator</td>
</tr>
<tr>
<td>text</td>
<td>String</td>
<td><em>Optional</em>. For text messages, the actual UTF-8 text of the message</td>
</tr>
<tr>
<td>entities</td>
<td>Array of <a href="#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>link_preview_options</td>
<td><a href="#linkpreviewoptions">LinkPreviewOptions</a></td>
<td><em>Optional</em>. Options used for link preview generation for the message, if it is a text message and link preview options were changed</td>
</tr>
<tr>
<td>effect_id</td>
<td>String</td>
<td><em>Optional</em>. Unique identifier of the message effect added to the message</td>
</tr>
<tr>
<td>animation</td>
<td><a href="#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><a href="#audio">Audio</a></td>
<td><em>Optional</em>. Message is an audio file, information about the file</td>
</tr>
<tr>
<td>document</td>
<td><a href="#document">Document</a></td>
<td><em>Optional</em>. Message is a general file, information about the file</td>
</tr>
<tr>
<td>paid_media</td>
<td><a href="#paidmediainfo">PaidMediaInfo</a></td>
<td><em>Optional</em>. Message contains paid media; information about the paid media</td>
</tr>
<tr>
<td>photo</td>
<td>Array of <a href="#photosize">PhotoSize</a></td>
<td><em>Optional</em>. Message is a photo, available sizes of the photo</td>
</tr>
<tr>
<td>sticker</td>
<td><a href="#sticker">Sticker</a></td>
<td><em>Optional</em>. Message is a sticker, information about the sticker</td>
</tr>
<tr>
<td>story</td>
<td><a href="#story">Story</a></td>
<td><em>Optional</em>. Message is a forwarded story</td>
</tr>
<tr>
<td>video</td>
<td><a href="#video">Video</a></td>
<td><em>Optional</em>. Message is a video, information about the video</td>
</tr>
<tr>
<td>video_note</td>
<td><a href="#videonote">VideoNote</a></td>
<td><em>Optional</em>. Message is a <a href="https://telegram.org/blog/video-messages-and-telescope">video note</a>, information about the video message</td>
</tr>
<tr>
<td>voice</td>
<td><a href="#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, paid media, photo, video or voice</td>
</tr>
<tr>
<td>caption_entities</td>
<td>Array of <a href="#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>show_caption_above_media</td>
<td>True</td>
<td><em>Optional</em>. True, if the caption must be shown above the message media</td>
</tr>
<tr>
<td>has_media_spoiler</td>
<td>True</td>
<td><em>Optional</em>. <em>True</em>, if the message media is covered by a spoiler animation</td>
</tr>
<tr>
<td>contact</td>
<td><a href="#contact">Contact</a></td>
<td><em>Optional</em>. Message is a shared contact, information about the contact</td>
</tr>
<tr>
<td>dice</td>
<td><a href="#dice">Dice</a></td>
<td><em>Optional</em>. Message is a dice with random value</td>
</tr>
<tr>
<td>game</td>
<td><a href="#game">Game</a></td>
<td><em>Optional</em>. Message is a game, information about the game. <a href="#games">More about games »</a></td>
</tr>
<tr>
<td>poll</td>
<td><a href="#poll">Poll</a></td>
<td><em>Optional</em>. Message is a native poll, information about the poll</td>
</tr>
<tr>
<td>venue</td>
<td><a href="#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><a href="#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 <a href="#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><a href="#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 <a href="#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&#39;t be received in a message coming through updates, because bot can&#39;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&#39;t be received in a message coming through updates, because bot can&#39;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>message_auto_delete_timer_changed</td>
<td><a href="#messageautodeletetimerchanged">MessageAutoDeleteTimerChanged</a></td>
<td><em>Optional</em>. Service message: auto-delete timer settings changed in the chat</td>
</tr>
<tr>
<td>migrate_to_chat_id</td>
<td>Integer</td>
<td><em>Optional</em>. The group has been migrated to a supergroup with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.</td>
</tr>
<tr>
<td>migrate_from_chat_id</td>
<td>Integer</td>
<td><em>Optional</em>. The supergroup has been migrated from a group with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.</td>
</tr>
<tr>
<td>pinned_message</td>
<td><a href="#maybeinaccessiblemessage">MaybeInaccessibleMessage</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 itself is a reply.</td>
</tr>
<tr>
<td>invoice</td>
<td><a href="#invoice">Invoice</a></td>
<td><em>Optional</em>. Message is an invoice for a <a href="#payments">payment</a>, information about the invoice. <a href="#payments">More about payments »</a></td>
</tr>
<tr>
<td>successful_payment</td>
<td><a href="#successfulpayment">SuccessfulPayment</a></td>
<td><em>Optional</em>. Message is a service message about a successful payment, information about the payment. <a href="#payments">More about payments »</a></td>
</tr>
<tr>
<td>refunded_payment</td>
<td><a href="#refundedpayment">RefundedPayment</a></td>
<td><em>Optional</em>. Message is a service message about a refunded payment, information about the payment. <a href="#payments">More about payments »</a></td>
</tr>
<tr>
<td>users_shared</td>
<td><a href="#usersshared">UsersShared</a></td>
<td><em>Optional</em>. Service message: users were shared with the bot</td>
</tr>
<tr>
<td>chat_shared</td>
<td><a href="#chatshared">ChatShared</a></td>
<td><em>Optional</em>. Service message: a chat was shared with the bot</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. <a href="/widgets/login">More about Telegram Login »</a></td>
</tr>
<tr>
<td>write_access_allowed</td>
<td><a href="#writeaccessallowed">WriteAccessAllowed</a></td>
<td><em>Optional</em>. Service message: the user allowed the bot to write messages after adding it to the attachment or side menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method <a href="/bots/webapps#initializing-mini-apps">requestWriteAccess</a></td>
</tr>
<tr>
<td>passport_data</td>
<td><a href="#passportdata">PassportData</a></td>
<td><em>Optional</em>. Telegram Passport data</td>
</tr>
<tr>
<td>proximity_alert_triggered</td>
<td><a href="#proximityalerttriggered">ProximityAlertTriggered</a></td>
<td><em>Optional</em>. Service message. A user in the chat triggered another user&#39;s proximity alert while sharing Live Location.</td>
</tr>
<tr>
<td>boost_added</td>
<td><a href="#chatboostadded">ChatBoostAdded</a></td>
<td><em>Optional</em>. Service message: user boosted the chat</td>
</tr>
<tr>
<td>chat_background_set</td>
<td><a href="#chatbackground">ChatBackground</a></td>
<td><em>Optional</em>. Service message: chat background set</td>
</tr>
<tr>
<td>forum_topic_created</td>
<td><a href="#forumtopiccreated">ForumTopicCreated</a></td>
<td><em>Optional</em>. Service message: forum topic created</td>
</tr>
<tr>
<td>forum_topic_edited</td>
<td><a href="#forumtopicedited">ForumTopicEdited</a></td>
<td><em>Optional</em>. Service message: forum topic edited</td>
</tr>
<tr>
<td>forum_topic_closed</td>
<td><a href="#forumtopicclosed">ForumTopicClosed</a></td>
<td><em>Optional</em>. Service message: forum topic closed</td>
</tr>
<tr>
<td>forum_topic_reopened</td>
<td><a href="#forumtopicreopened">ForumTopicReopened</a></td>
<td><em>Optional</em>. Service message: forum topic reopened</td>
</tr>
<tr>
<td>general_forum_topic_hidden</td>
<td><a href="#generalforumtopichidden">GeneralForumTopicHidden</a></td>
<td><em>Optional</em>. Service message: the &#39;General&#39; forum topic hidden</td>
</tr>
<tr>
<td>general_forum_topic_unhidden</td>
<td><a href="#generalforumtopicunhidden">GeneralForumTopicUnhidden</a></td>
<td><em>Optional</em>. Service message: the &#39;General&#39; forum topic unhidden</td>
</tr>
<tr>
<td>giveaway_created</td>
<td><a href="#giveawaycreated">GiveawayCreated</a></td>
<td><em>Optional</em>. Service message: a scheduled giveaway was created</td>
</tr>
<tr>
<td>giveaway</td>
<td><a href="#giveaway">Giveaway</a></td>
<td><em>Optional</em>. The message is a scheduled giveaway message</td>
</tr>
<tr>
<td>giveaway_winners</td>
<td><a href="#giveawaywinners">GiveawayWinners</a></td>
<td><em>Optional</em>. A giveaway with public winners was completed</td>
</tr>
<tr>
<td>giveaway_completed</td>
<td><a href="#giveawaycompleted">GiveawayCompleted</a></td>
<td><em>Optional</em>. Service message: a giveaway without public winners was completed</td>
</tr>
<tr>
<td>video_chat_scheduled</td>
<td><a href="#videochatscheduled">VideoChatScheduled</a></td>
<td><em>Optional</em>. Service message: video chat scheduled</td>
</tr>
<tr>
<td>video_chat_started</td>
<td><a href="#videochatstarted">VideoChatStarted</a></td>
<td><em>Optional</em>. Service message: video chat started</td>
</tr>
<tr>
<td>video_chat_ended</td>
<td><a href="#videochatended">VideoChatEnded</a></td>
<td><em>Optional</em>. Service message: video chat ended</td>
</tr>
<tr>
<td>video_chat_participants_invited</td>
<td><a href="#videochatparticipantsinvited">VideoChatParticipantsInvited</a></td>
<td><em>Optional</em>. Service message: new participants invited to a video chat</td>
</tr>
<tr>
<td>web_app_data</td>
<td><a href="#webappdata">WebAppData</a></td>
<td><em>Optional</em>. Service message: data sent by a Web App</td>
</tr>
<tr>
<td>reply_markup</td>
<td><a href="#inlinekeyboardmarkup">InlineKeyboardMarkup</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>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="messageid" href="#messageid"><i class="anchor-icon"></i></a>MessageId</h4>
<p>This object represents a unique message identifier.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>message_id</td>
<td>Integer</td>
<td>Unique message identifier</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="inaccessiblemessage" href="#inaccessiblemessage"><i class="anchor-icon"></i></a>InaccessibleMessage</h4>
<p>This object describes a message that was deleted or is otherwise inaccessible to the bot.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>chat</td>
<td><a href="#chat">Chat</a></td>
<td>Chat the message belonged to</td>
</tr>
<tr>
<td>message_id</td>
<td>Integer</td>
<td>Unique message identifier inside the chat</td>
</tr>
<tr>
<td>date</td>
<td>Integer</td>
<td>Always 0. The field can be used to differentiate regular and inaccessible messages.</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="maybeinaccessiblemessage" href="#maybeinaccessiblemessage"><i class="anchor-icon"></i></a>MaybeInaccessibleMessage</h4>
<p>This object describes a message that can be inaccessible to the bot. It can be one of</p>
<ul>
<li><a href="#message">Message</a></li>
<li><a href="#inaccessiblemessage">InaccessibleMessage</a></li>
</ul>
<h4><a class="anchor" name="messageentity" href="#messageentity"><i class="anchor-icon"></i></a>MessageEntity</h4>
<p>This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc.</p>
<table class="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 entity. Currently, can be “mention” (<code>@username</code>), “hashtag” (<code>#hashtag</code>), “cashtag” (<code>$USD</code>), “bot_command” (<code>/start@jobs_bot</code>), “url” (<code>https://telegram.org</code>), “email” (<code>do-not-reply@telegram.org</code>), “phone_number” (<code>+1-212-555-0123</code>), “bold” (<strong>bold text</strong>), “italic” (<em>italic text</em>), “underline” (underlined text), “strikethrough” (strikethrough text), “spoiler” (spoiler message), “blockquote” (block quotation), “expandable_blockquote” (collapsed-by-default block quotation), “code” (monowidth string), “pre” (monowidth block), “text_link” (for clickable text URLs), “text_mention” (for users <a href="https://telegram.org/blog/edit#new-mentions">without usernames</a>), “custom_emoji” (for inline custom emoji stickers)</td>
</tr>
<tr>
<td>offset</td>
<td>Integer</td>
<td>Offset in <a href="/api/entities#entity-length">UTF-16 code units</a> to the start of the entity</td>
</tr>
<tr>
<td>length</td>
<td>Integer</td>
<td>Length of the entity in <a href="/api/entities#entity-length">UTF-16 code units</a></td>
</tr>
<tr>
<td>url</td>
<td>String</td>
<td><em>Optional</em>. For “text_link” only, URL that will be opened after user taps on the text</td>
</tr>
<tr>
<td>user</td>
<td><a href="#user">User</a></td>
<td><em>Optional</em>. For “text_mention” only, the mentioned user</td>
</tr>
<tr>
<td>language</td>
<td>String</td>
<td><em>Optional</em>. For “pre” only, the programming language of the entity text</td>
</tr>
<tr>
<td>custom_emoji_id</td>
<td>String</td>
<td><em>Optional</em>. For “custom_emoji” only, unique identifier of the custom emoji. Use <a href="#getcustomemojistickers">getCustomEmojiStickers</a> to get full information about the sticker</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="textquote" href="#textquote"><i class="anchor-icon"></i></a>TextQuote</h4>
<p>This object contains information about the quoted part of a message that is replied to by the given message.</p>
<table class="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 quoted part of a message that is replied to by the given message</td>
</tr>
<tr>
<td>entities</td>
<td>Array of <a href="#messageentity">MessageEntity</a></td>
<td><em>Optional</em>. Special entities that appear in the quote. Currently, only <em>bold</em>, <em>italic</em>, <em>underline</em>, <em>strikethrough</em>, <em>spoiler</em>, and <em>custom_emoji</em> entities are kept in quotes.</td>
</tr>
<tr>
<td>position</td>
<td>Integer</td>
<td>Approximate quote position in the original message in UTF-16 code units as specified by the sender</td>
</tr>
<tr>
<td>is_manual</td>
<td>True</td>
<td><em>Optional</em>. True, if the quote was chosen manually by the message sender. Otherwise, the quote was added automatically by the server.</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="externalreplyinfo" href="#externalreplyinfo"><i class="anchor-icon"></i></a>ExternalReplyInfo</h4>
<p>This object contains information about a message that is being replied to, which may come from another chat or forum topic.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>origin</td>
<td><a href="#messageorigin">MessageOrigin</a></td>
<td>Origin of the message replied to by the given message</td>
</tr>
<tr>
<td>chat</td>
<td><a href="#chat">Chat</a></td>
<td><em>Optional</em>. Chat the original message belongs to. Available only if the chat is a supergroup or a channel.</td>
</tr>
<tr>
<td>message_id</td>
<td>Integer</td>
<td><em>Optional</em>. Unique message identifier inside the original chat. Available only if the original chat is a supergroup or a channel.</td>
</tr>
<tr>
<td>link_preview_options</td>
<td><a href="#linkpreviewoptions">LinkPreviewOptions</a></td>
<td><em>Optional</em>. Options used for link preview generation for the original message, if it is a text message</td>
</tr>
<tr>
<td>animation</td>
<td><a href="#animation">Animation</a></td>
<td><em>Optional</em>. Message is an animation, information about the animation</td>
</tr>
<tr>
<td>audio</td>
<td><a href="#audio">Audio</a></td>
<td><em>Optional</em>. Message is an audio file, information about the file</td>
</tr>
<tr>
<td>document</td>
<td><a href="#document">Document</a></td>
<td><em>Optional</em>. Message is a general file, information about the file</td>
</tr>
<tr>
<td>paid_media</td>
<td><a href="#paidmediainfo">PaidMediaInfo</a></td>
<td><em>Optional</em>. Message contains paid media; information about the paid media</td>
</tr>
<tr>
<td>photo</td>
<td>Array of <a href="#photosize">PhotoSize</a></td>
<td><em>Optional</em>. Message is a photo, available sizes of the photo</td>
</tr>
<tr>
<td>sticker</td>
<td><a href="#sticker">Sticker</a></td>
<td><em>Optional</em>. Message is a sticker, information about the sticker</td>
</tr>
<tr>
<td>story</td>
<td><a href="#story">Story</a></td>
<td><em>Optional</em>. Message is a forwarded story</td>
</tr>
<tr>
<td>video</td>
<td><a href="#video">Video</a></td>
<td><em>Optional</em>. Message is a video, information about the video</td>
</tr>
<tr>
<td>video_note</td>
<td><a href="#videonote">VideoNote</a></td>
<td><em>Optional</em>. Message is a <a href="https://telegram.org/blog/video-messages-and-telescope">video note</a>, information about the video message</td>
</tr>
<tr>
<td>voice</td>
<td><a href="#voice">Voice</a></td>
<td><em>Optional</em>. Message is a voice message, information about the file</td>
</tr>
<tr>
<td>has_media_spoiler</td>
<td>True</td>
<td><em>Optional</em>. <em>True</em>, if the message media is covered by a spoiler animation</td>
</tr>
<tr>
<td>contact</td>
<td><a href="#contact">Contact</a></td>
<td><em>Optional</em>. Message is a shared contact, information about the contact</td>
</tr>
<tr>
<td>dice</td>
<td><a href="#dice">Dice</a></td>
<td><em>Optional</em>. Message is a dice with random value</td>
</tr>
<tr>
<td>game</td>
<td><a href="#game">Game</a></td>
<td><em>Optional</em>. Message is a game, information about the game. <a href="#games">More about games »</a></td>
</tr>
<tr>
<td>giveaway</td>
<td><a href="#giveaway">Giveaway</a></td>
<td><em>Optional</em>. Message is a scheduled giveaway, information about the giveaway</td>
</tr>
<tr>
<td>giveaway_winners</td>
<td><a href="#giveawaywinners">GiveawayWinners</a></td>
<td><em>Optional</em>. A giveaway with public winners was completed</td>
</tr>
<tr>
<td>invoice</td>
<td><a href="#invoice">Invoice</a></td>
<td><em>Optional</em>. Message is an invoice for a <a href="#payments">payment</a>, information about the invoice. <a href="#payments">More about payments »</a></td>
</tr>
<tr>
<td>location</td>
<td><a href="#location">Location</a></td>
<td><em>Optional</em>. Message is a shared location, information about the location</td>
</tr>
<tr>
<td>poll</td>
<td><a href="#poll">Poll</a></td>
<td><em>Optional</em>. Message is a native poll, information about the poll</td>
</tr>
<tr>
<td>venue</td>
<td><a href="#venue">Venue</a></td>
<td><em>Optional</em>. Message is a venue, information about the venue</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="replyparameters" href="#replyparameters"><i class="anchor-icon"></i></a>ReplyParameters</h4>
<p>Describes reply parameters for the message that is being sent.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>message_id</td>
<td>Integer</td>
<td>Identifier of the message that will be replied to in the current chat, or in the chat <em>chat_id</em> if it is specified</td>
</tr>
<tr>
<td>chat_id</td>
<td>Integer or String</td>
<td><em>Optional</em>. If the message to be replied to is from a different chat, unique identifier for the chat or username of the channel (in the format <code>@channelusername</code>). Not supported for messages sent on behalf of a business account.</td>
</tr>
<tr>
<td>allow_sending_without_reply</td>
<td>Boolean</td>
<td><em>Optional</em>. Pass <em>True</em> if the message should be sent even if the specified message to be replied to is not found. Always <em>False</em> for replies in another chat or forum topic. Always <em>True</em> for messages sent on behalf of a business account.</td>
</tr>
<tr>
<td>quote</td>
<td>String</td>
<td><em>Optional</em>. Quoted part of the message to be replied to; 0-1024 characters after entities parsing. The quote must be an exact substring of the message to be replied to, including <em>bold</em>, <em>italic</em>, <em>underline</em>, <em>strikethrough</em>, <em>spoiler</em>, and <em>custom_emoji</em> entities. The message will fail to send if the quote isn&#39;t found in the original message.</td>
</tr>
<tr>
<td>quote_parse_mode</td>
<td>String</td>
<td><em>Optional</em>. Mode for parsing entities in the quote. See <a href="#formatting-options">formatting options</a> for more details.</td>
</tr>
<tr>
<td>quote_entities</td>
<td>Array of <a href="#messageentity">MessageEntity</a></td>
<td><em>Optional</em>. A JSON-serialized list of special entities that appear in the quote. It can be specified instead of <em>quote_parse_mode</em>.</td>
</tr>
<tr>
<td>quote_position</td>
<td>Integer</td>
<td><em>Optional</em>. Position of the quote in the original message in UTF-16 code units</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="messageorigin" href="#messageorigin"><i class="anchor-icon"></i></a>MessageOrigin</h4>
<p>This object describes the origin of a message. It can be one of</p>
<ul>
<li><a href="#messageoriginuser">MessageOriginUser</a></li>
<li><a href="#messageoriginhiddenuser">MessageOriginHiddenUser</a></li>
<li><a href="#messageoriginchat">MessageOriginChat</a></li>
<li><a href="#messageoriginchannel">MessageOriginChannel</a></li>
</ul>
<h4><a class="anchor" name="messageoriginuser" href="#messageoriginuser"><i class="anchor-icon"></i></a>MessageOriginUser</h4>
<p>The message was originally sent by a known user.</p>
<table class="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 message origin, always “user”</td>
</tr>
<tr>
<td>date</td>
<td>Integer</td>
<td>Date the message was sent originally in Unix time</td>
</tr>
<tr>
<td>sender_user</td>
<td><a href="#user">User</a></td>
<td>User that sent the message originally</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="messageoriginhiddenuser" href="#messageoriginhiddenuser"><i class="anchor-icon"></i></a>MessageOriginHiddenUser</h4>
<p>The message was originally sent by an unknown user.</p>
<table class="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 message origin, always “hidden_user”</td>
</tr>
<tr>
<td>date</td>
<td>Integer</td>
<td>Date the message was sent originally in Unix time</td>
</tr>
<tr>
<td>sender_user_name</td>
<td>String</td>
<td>Name of the user that sent the message originally</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="messageoriginchat" href="#messageoriginchat"><i class="anchor-icon"></i></a>MessageOriginChat</h4>
<p>The message was originally sent on behalf of a chat to a group chat.</p>
<table class="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 message origin, always “chat”</td>
</tr>
<tr>
<td>date</td>
<td>Integer</td>
<td>Date the message was sent originally in Unix time</td>
</tr>
<tr>
<td>sender_chat</td>
<td><a href="#chat">Chat</a></td>
<td>Chat that sent the message originally</td>
</tr>
<tr>
<td>author_signature</td>
<td>String</td>
<td><em>Optional</em>. For messages originally sent by an anonymous chat administrator, original message author signature</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="messageoriginchannel" href="#messageoriginchannel"><i class="anchor-icon"></i></a>MessageOriginChannel</h4>
<p>The message was originally sent to a channel chat.</p>
<table class="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 message origin, always “channel”</td>
</tr>
<tr>
<td>date</td>
<td>Integer</td>
<td>Date the message was sent originally in Unix time</td>
</tr>
<tr>
<td>chat</td>
<td><a href="#chat">Chat</a></td>
<td>Channel chat to which the message was originally sent</td>
</tr>
<tr>
<td>message_id</td>
<td>Integer</td>
<td>Unique message identifier inside the chat</td>
</tr>
<tr>
<td>author_signature</td>
<td>String</td>
<td><em>Optional</em>. Signature of the original post author</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="photosize" href="#photosize"><i class="anchor-icon"></i></a>PhotoSize</h4>
<p>This object represents one size of a photo or a <a href="#document">file</a> / <a href="#sticker">sticker</a> thumbnail.</p>
<table class="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&#39;t be used to download or reuse the file.</td>
</tr>
<tr>
<td>width</td>
<td>Integer</td>
<td>Photo width</td>
</tr>
<tr>
<td>height</td>
<td>Integer</td>
<td>Photo height</td>
</tr>
<tr>
<td>file_size</td>
<td>Integer</td>
<td><em>Optional</em>. File size in bytes</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="animation" href="#animation"><i class="anchor-icon"></i></a>Animation</h4>
<p>This object represents an animation file (GIF or H.264/MPEG-4 AVC video without sound).</p>
<table class="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&#39;t be used to download or reuse the file.</td>
</tr>
<tr>
<td>width</td>
<td>Integer</td>
<td>Video width as defined by the sender</td>
</tr>
<tr>
<td>height</td>
<td>Integer</td>
<td>Video height as defined by the sender</td>
</tr>
<tr>
<td>duration</td>
<td>Integer</td>
<td>Duration of the video in seconds as defined by the sender</td>
</tr>
<tr>
<td>thumbnail</td>
<td><a href="#photosize">PhotoSize</a></td>
<td><em>Optional</em>. Animation thumbnail as defined by the sender</td>
</tr>
<tr>
<td>file_name</td>
<td>String</td>
<td><em>Optional</em>. Original animation filename as defined by the sender</td>
</tr>
<tr>
<td>mime_type</td>
<td>String</td>
<td><em>Optional</em>. MIME type of the file as defined by the sender</td>
</tr>
<tr>
<td>file_size</td>
<td>Integer</td>
<td><em>Optional</em>. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="audio" href="#audio"><i class="anchor-icon"></i></a>Audio</h4>
<p>This object represents an audio file to be treated as music by the Telegram clients.</p>
<table class="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&#39;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 the sender</td>
</tr>
<tr>
<td>performer</td>
<td>String</td>
<td><em>Optional</em>. Performer of the audio as defined by the 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 the sender or by audio tags</td>
</tr>
<tr>
<td>file_name</td>
<td>String</td>
<td><em>Optional</em>. Original filename as defined by the sender</td>
</tr>
<tr>
<td>mime_type</td>
<td>String</td>
<td><em>Optional</em>. MIME type of the file as defined by the sender</td>
</tr>
<tr>
<td>file_size</td>
<td>Integer</td>
<td><em>Optional</em>. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.</td>
</tr>
<tr>
<td>thumbnail</td>
<td><a href="#photosize">PhotoSize</a></td>
<td><em>Optional</em>. Thumbnail of the album cover to which the music file belongs</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="document" href="#document"><i class="anchor-icon"></i></a>Document</h4>
<p>This object represents a general file (as opposed to <a href="#photosize">photos</a>, <a href="#voice">voice messages</a> and <a href="#audio">audio files</a>).</p>
<table class="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&#39;t be used to download or reuse the file.</td>
</tr>
<tr>
<td>thumbnail</td>
<td><a href="#photosize">PhotoSize</a></td>
<td><em>Optional</em>. Document thumbnail as defined by the sender</td>
</tr>
<tr>
<td>file_name</td>
<td>String</td>
<td><em>Optional</em>. Original filename as defined by the sender</td>
</tr>
<tr>
<td>mime_type</td>
<td>String</td>
<td><em>Optional</em>. MIME type of the file as defined by the sender</td>
</tr>
<tr>
<td>file_size</td>
<td>Integer</td>
<td><em>Optional</em>. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="story" href="#story"><i class="anchor-icon"></i></a>Story</h4>
<p>This object represents a story.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>chat</td>
<td><a href="#chat">Chat</a></td>
<td>Chat that posted the story</td>
</tr>
<tr>
<td>id</td>
<td>Integer</td>
<td>Unique identifier for the story in the chat</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="video" href="#video"><i class="anchor-icon"></i></a>Video</h4>
<p>This object represents a video file.</p>
<table class="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&#39;t be used to download or reuse the file.</td>
</tr>
<tr>
<td>width</td>
<td>Integer</td>
<td>Video width as defined by the sender</td>
</tr>
<tr>
<td>height</td>
<td>Integer</td>
<td>Video height as defined by the sender</td>
</tr>
<tr>
<td>duration</td>
<td>Integer</td>
<td>Duration of the video in seconds as defined by the sender</td>
</tr>
<tr>
<td>thumbnail</td>
<td><a href="#photosize">PhotoSize</a></td>
<td><em>Optional</em>. Video thumbnail</td>
</tr>
<tr>
<td>file_name</td>
<td>String</td>
<td><em>Optional</em>. Original filename as defined by the sender</td>
</tr>
<tr>
<td>mime_type</td>
<td>String</td>
<td><em>Optional</em>. MIME type of the file as defined by the sender</td>
</tr>
<tr>
<td>file_size</td>
<td>Integer</td>
<td><em>Optional</em>. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="videonote" href="#videonote"><i class="anchor-icon"></i></a>VideoNote</h4>
<p>This object represents a <a href="https://telegram.org/blog/video-messages-and-telescope">video message</a> (available in Telegram apps as of <a href="https://telegram.org/blog/video-messages-and-telescope">v.4.0</a>).</p>
<table class="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&#39;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 the sender</td>
</tr>
<tr>
<td>duration</td>
<td>Integer</td>
<td>Duration of the video in seconds as defined by the sender</td>
</tr>
<tr>
<td>thumbnail</td>
<td><a href="#photosize">PhotoSize</a></td>
<td><em>Optional</em>. Video thumbnail</td>
</tr>
<tr>
<td>file_size</td>
<td>Integer</td>
<td><em>Optional</em>. File size in bytes</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="voice" href="#voice"><i class="anchor-icon"></i></a>Voice</h4>
<p>This object represents a voice note.</p>
<table class="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&#39;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 the sender</td>
</tr>
<tr>
<td>mime_type</td>
<td>String</td>
<td><em>Optional</em>. MIME type of the file as defined by the sender</td>
</tr>
<tr>
<td>file_size</td>
<td>Integer</td>
<td><em>Optional</em>. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="paidmediainfo" href="#paidmediainfo"><i class="anchor-icon"></i></a>PaidMediaInfo</h4>
<p>Describes the paid media added to a message.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>star_count</td>
<td>Integer</td>
<td>The number of Telegram Stars that must be paid to buy access to the media</td>
</tr>
<tr>
<td>paid_media</td>
<td>Array of <a href="#paidmedia">PaidMedia</a></td>
<td>Information about the paid media</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="paidmedia" href="#paidmedia"><i class="anchor-icon"></i></a>PaidMedia</h4>
<p>This object describes paid media. Currently, it can be one of</p>
<ul>
<li><a href="#paidmediapreview">PaidMediaPreview</a></li>
<li><a href="#paidmediaphoto">PaidMediaPhoto</a></li>
<li><a href="#paidmediavideo">PaidMediaVideo</a></li>
</ul>
<h4><a class="anchor" name="paidmediapreview" href="#paidmediapreview"><i class="anchor-icon"></i></a>PaidMediaPreview</h4>
<p>The paid media isn&#39;t available before the payment.</p>
<table class="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 paid media, always “preview”</td>
</tr>
<tr>
<td>width</td>
<td>Integer</td>
<td><em>Optional</em>. Media width as defined by the sender</td>
</tr>
<tr>
<td>height</td>
<td>Integer</td>
<td><em>Optional</em>. Media height as defined by the sender</td>
</tr>
<tr>
<td>duration</td>
<td>Integer</td>
<td><em>Optional</em>. Duration of the media in seconds as defined by the sender</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="paidmediaphoto" href="#paidmediaphoto"><i class="anchor-icon"></i></a>PaidMediaPhoto</h4>
<p>The paid media is a photo.</p>
<table class="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 paid media, always “photo”</td>
</tr>
<tr>
<td>photo</td>
<td>Array of <a href="#photosize">PhotoSize</a></td>
<td>The photo</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="paidmediavideo" href="#paidmediavideo"><i class="anchor-icon"></i></a>PaidMediaVideo</h4>
<p>The paid media is a video.</p>
<table class="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 paid media, always “video”</td>
</tr>
<tr>
<td>video</td>
<td><a href="#video">Video</a></td>
<td>The video</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="contact" href="#contact"><i class="anchor-icon"></i></a>Contact</h4>
<p>This object represents a phone contact.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>phone_number</td>
<td>String</td>
<td>Contact&#39;s phone number</td>
</tr>
<tr>
<td>first_name</td>
<td>String</td>
<td>Contact&#39;s first name</td>
</tr>
<tr>
<td>last_name</td>
<td>String</td>
<td><em>Optional</em>. Contact&#39;s last name</td>
</tr>
<tr>
<td>user_id</td>
<td>Integer</td>
<td><em>Optional</em>. Contact&#39;s user identifier in Telegram. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.</td>
</tr>
<tr>
<td>vcard</td>
<td>String</td>
<td><em>Optional</em>. Additional data about the contact in the form of a <a href="https://en.wikipedia.org/wiki/VCard">vCard</a></td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="dice" href="#dice"><i class="anchor-icon"></i></a>Dice</h4>
<p>This object represents an animated emoji that displays a random value.</p>
<table class="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 “<img class="emoji" src="//telegram.org/img/emoji/40/F09F8EB2.png" width="20" height="20" alt="🎲" />”, “<img class="emoji" src="//telegram.org/img/emoji/40/F09F8EAF.png" width="20" height="20" alt="🎯" />” and “<img class="emoji" src="//telegram.org/img/emoji/40/F09F8EB3.png" width="20" height="20" alt="🎳" />” base emoji, 1-5 for “<img class="emoji" src="//telegram.org/img/emoji/40/F09F8F80.png" width="20" height="20" alt="🏀" />” and “<img class="emoji" src="//telegram.org/img/emoji/40/E29ABD.png" width="20" height="20" alt="⚽" />” base emoji, 1-64 for “<img class="emoji" src="//telegram.org/img/emoji/40/F09F8EB0.png" width="20" height="20" alt="🎰" />” base emoji</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="polloption" href="#polloption"><i class="anchor-icon"></i></a>PollOption</h4>
<p>This object contains information about one answer option in a poll.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>text</td>
<td>String</td>
<td>Option text, 1-100 characters</td>
</tr>
<tr>
<td>text_entities</td>
<td>Array of <a href="#messageentity">MessageEntity</a></td>
<td><em>Optional</em>. Special entities that appear in the option <em>text</em>. Currently, only custom emoji entities are allowed in poll option texts</td>
</tr>
<tr>
<td>voter_count</td>
<td>Integer</td>
<td>Number of users that voted for this option</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="inputpolloption" href="#inputpolloption"><i class="anchor-icon"></i></a>InputPollOption</h4>
<p>This object contains information about one answer option in a poll to be sent.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>text</td>
<td>String</td>
<td>Option text, 1-100 characters</td>
</tr>
<tr>
<td>text_parse_mode</td>
<td>String</td>
<td><em>Optional</em>. Mode for parsing entities in the text. See <a href="#formatting-options">formatting options</a> for more details. Currently, only custom emoji entities are allowed</td>
</tr>
<tr>
<td>text_entities</td>
<td>Array of <a href="#messageentity">MessageEntity</a></td>
<td><em>Optional</em>. A JSON-serialized list of special entities that appear in the poll option text. It can be specified instead of <em>text_parse_mode</em></td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="pollanswer" href="#pollanswer"><i class="anchor-icon"></i></a>PollAnswer</h4>
<p>This object represents an answer of a user in a non-anonymous poll.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>poll_id</td>
<td>String</td>
<td>Unique poll identifier</td>
</tr>
<tr>
<td>voter_chat</td>
<td><a href="#chat">Chat</a></td>
<td><em>Optional</em>. The chat that changed the answer to the poll, if the voter is anonymous</td>
</tr>
<tr>
<td>user</td>
<td><a href="#user">User</a></td>
<td><em>Optional</em>. The user that changed the answer to the poll, if the voter isn&#39;t anonymous</td>
</tr>
<tr>
<td>option_ids</td>
<td>Array of Integer</td>
<td>0-based identifiers of chosen answer options. May be empty if the vote was retracted.</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="poll" href="#poll"><i class="anchor-icon"></i></a>Poll</h4>
<p>This object contains information about a poll.</p>
<table class="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-300 characters</td>
</tr>
<tr>
<td>question_entities</td>
<td>Array of <a href="#messageentity">MessageEntity</a></td>
<td><em>Optional</em>. Special entities that appear in the <em>question</em>. Currently, only custom emoji entities are allowed in poll questions</td>
</tr>
<tr>
<td>options</td>
<td>Array of <a href="#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><em>True</em>, if the poll is closed</td>
</tr>
<tr>
<td>is_anonymous</td>
<td>Boolean</td>
<td><em>True</em>, 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><em>True</em>, if the poll allows multiple answers</td>
</tr>
<tr>
<td>correct_option_id</td>
<td>Integer</td>
<td><em>Optional</em>. 0-based identifier of the correct answer option. Available only for polls in the quiz mode, which are closed, or was sent (not forwarded) by the bot or to the private chat with the bot.</td>
</tr>
<tr>
<td>explanation</td>
<td>String</td>
<td><em>Optional</em>. Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters</td>
</tr>
<tr>
<td>explanation_entities</td>
<td>Array of <a href="#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>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="location" href="#location"><i class="anchor-icon"></i></a>Location</h4>
<p>This object represents a point on the map.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>latitude</td>
<td>Float</td>
<td>Latitude as defined by the sender</td>
</tr>
<tr>
<td>longitude</td>
<td>Float</td>
<td>Longitude as defined by the sender</td>
</tr>
<tr>
<td>horizontal_accuracy</td>
<td>Float</td>
<td><em>Optional</em>. The radius of uncertainty for the location, measured in meters; 0-1500</td>
</tr>
<tr>
<td>live_period</td>
<td>Integer</td>
<td><em>Optional</em>. Time relative to the message sending date, during which the location can be updated; in seconds. For active live locations only.</td>
</tr>
<tr>
<td>heading</td>
<td>Integer</td>
<td><em>Optional</em>. The direction in which user is moving, in degrees; 1-360. For active live locations only.</td>
</tr>
<tr>
<td>proximity_alert_radius</td>
<td>Integer</td>
<td><em>Optional</em>. The maximum distance for proximity alerts about approaching another chat member, in meters. For sent live locations only.</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="venue" href="#venue"><i class="anchor-icon"></i></a>Venue</h4>
<p>This object represents a venue.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>location</td>
<td><a href="#location">Location</a></td>
<td>Venue location. Can&#39;t be a live location</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</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>
</tr>
<tr>
<td>google_place_id</td>
<td>String</td>
<td><em>Optional</em>. Google Places identifier of the venue</td>
</tr>
<tr>
<td>google_place_type</td>
<td>String</td>
<td><em>Optional</em>. Google Places type of the venue. (See <a href="https://developers.google.com/places/web-service/supported_types">supported types</a>.)</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="webappdata" href="#webappdata"><i class="anchor-icon"></i></a>WebAppData</h4>
<p>Describes data sent from a <a href="/bots/webapps">Web App</a> to the bot.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>data</td>
<td>String</td>
<td>The data. Be aware that a bad client can send arbitrary data in this field.</td>
</tr>
<tr>
<td>button_text</td>
<td>String</td>
<td>Text of the <em>web_app</em> keyboard button from which the Web App was opened. Be aware that a bad client can send arbitrary data in this field.</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="proximityalerttriggered" href="#proximityalerttriggered"><i class="anchor-icon"></i></a>ProximityAlertTriggered</h4>
<p>This object represents the content of a service message, sent whenever a user in the chat triggers a proximity alert set by another user.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>traveler</td>
<td><a href="#user">User</a></td>
<td>User that triggered the alert</td>
</tr>
<tr>
<td>watcher</td>
<td><a href="#user">User</a></td>
<td>User that set the alert</td>
</tr>
<tr>
<td>distance</td>
<td>Integer</td>
<td>The distance between the users</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="messageautodeletetimerchanged" href="#messageautodeletetimerchanged"><i class="anchor-icon"></i></a>MessageAutoDeleteTimerChanged</h4>
<p>This object represents a service message about a change in auto-delete timer settings.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>message_auto_delete_time</td>
<td>Integer</td>
<td>New auto-delete time for messages in the chat; in seconds</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="chatboostadded" href="#chatboostadded"><i class="anchor-icon"></i></a>ChatBoostAdded</h4>
<p>This object represents a service message about a user boosting a chat.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>boost_count</td>
<td>Integer</td>
<td>Number of boosts added by the user</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="backgroundfill" href="#backgroundfill"><i class="anchor-icon"></i></a>BackgroundFill</h4>
<p>This object describes the way a background is filled based on the selected colors. Currently, it can be one of</p>
<ul>
<li><a href="#backgroundfillsolid">BackgroundFillSolid</a></li>
<li><a href="#backgroundfillgradient">BackgroundFillGradient</a></li>
<li><a href="#backgroundfillfreeformgradient">BackgroundFillFreeformGradient</a></li>
</ul>
<h4><a class="anchor" name="backgroundfillsolid" href="#backgroundfillsolid"><i class="anchor-icon"></i></a>BackgroundFillSolid</h4>
<p>The background is filled using the selected color.</p>
<table class="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 background fill, always “solid”</td>
</tr>
<tr>
<td>color</td>
<td>Integer</td>
<td>The color of the background fill in the RGB24 format</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="backgroundfillgradient" href="#backgroundfillgradient"><i class="anchor-icon"></i></a>BackgroundFillGradient</h4>
<p>The background is a gradient fill.</p>
<table class="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 background fill, always “gradient”</td>
</tr>
<tr>
<td>top_color</td>
<td>Integer</td>
<td>Top color of the gradient in the RGB24 format</td>
</tr>
<tr>
<td>bottom_color</td>
<td>Integer</td>
<td>Bottom color of the gradient in the RGB24 format</td>
</tr>
<tr>
<td>rotation_angle</td>
<td>Integer</td>
<td>Clockwise rotation angle of the background fill in degrees; 0-359</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="backgroundfillfreeformgradient" href="#backgroundfillfreeformgradient"><i class="anchor-icon"></i></a>BackgroundFillFreeformGradient</h4>
<p>The background is a freeform gradient that rotates after every message in the chat.</p>
<table class="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 background fill, always “freeform_gradient”</td>
</tr>
<tr>
<td>colors</td>
<td>Array of Integer</td>
<td>A list of the 3 or 4 base colors that are used to generate the freeform gradient in the RGB24 format</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="backgroundtype" href="#backgroundtype"><i class="anchor-icon"></i></a>BackgroundType</h4>
<p>This object describes the type of a background. Currently, it can be one of</p>
<ul>
<li><a href="#backgroundtypefill">BackgroundTypeFill</a></li>
<li><a href="#backgroundtypewallpaper">BackgroundTypeWallpaper</a></li>
<li><a href="#backgroundtypepattern">BackgroundTypePattern</a></li>
<li><a href="#backgroundtypechattheme">BackgroundTypeChatTheme</a></li>
</ul>
<h4><a class="anchor" name="backgroundtypefill" href="#backgroundtypefill"><i class="anchor-icon"></i></a>BackgroundTypeFill</h4>
<p>The background is automatically filled based on the selected colors.</p>
<table class="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 background, always “fill”</td>
</tr>
<tr>
<td>fill</td>
<td><a href="#backgroundfill">BackgroundFill</a></td>
<td>The background fill</td>
</tr>
<tr>
<td>dark_theme_dimming</td>
<td>Integer</td>
<td>Dimming of the background in dark themes, as a percentage; 0-100</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="backgroundtypewallpaper" href="#backgroundtypewallpaper"><i class="anchor-icon"></i></a>BackgroundTypeWallpaper</h4>
<p>The background is a wallpaper in the JPEG format.</p>
<table class="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 background, always “wallpaper”</td>
</tr>
<tr>
<td>document</td>
<td><a href="#document">Document</a></td>
<td>Document with the wallpaper</td>
</tr>
<tr>
<td>dark_theme_dimming</td>
<td>Integer</td>
<td>Dimming of the background in dark themes, as a percentage; 0-100</td>
</tr>
<tr>
<td>is_blurred</td>
<td>True</td>
<td><em>Optional</em>. <em>True</em>, if the wallpaper is downscaled to fit in a 450x450 square and then box-blurred with radius 12</td>
</tr>
<tr>
<td>is_moving</td>
<td>True</td>
<td><em>Optional</em>. <em>True</em>, if the background moves slightly when the device is tilted</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="backgroundtypepattern" href="#backgroundtypepattern"><i class="anchor-icon"></i></a>BackgroundTypePattern</h4>
<p>The background is a PNG or TGV (gzipped subset of SVG with MIME type “application/x-tgwallpattern”) pattern to be combined with the background fill chosen by the user.</p>
<table class="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 background, always “pattern”</td>
</tr>
<tr>
<td>document</td>
<td><a href="#document">Document</a></td>
<td>Document with the pattern</td>
</tr>
<tr>
<td>fill</td>
<td><a href="#backgroundfill">BackgroundFill</a></td>
<td>The background fill that is combined with the pattern</td>
</tr>
<tr>
<td>intensity</td>
<td>Integer</td>
<td>Intensity of the pattern when it is shown above the filled background; 0-100</td>
</tr>
<tr>
<td>is_inverted</td>
<td>True</td>
<td><em>Optional</em>. <em>True</em>, if the background fill must be applied only to the pattern itself. All other pixels are black in this case. For dark themes only</td>
</tr>
<tr>
<td>is_moving</td>
<td>True</td>
<td><em>Optional</em>. <em>True</em>, if the background moves slightly when the device is tilted</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="backgroundtypechattheme" href="#backgroundtypechattheme"><i class="anchor-icon"></i></a>BackgroundTypeChatTheme</h4>
<p>The background is taken directly from a built-in chat theme.</p>
<table class="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 background, always “chat_theme”</td>
</tr>
<tr>
<td>theme_name</td>
<td>String</td>
<td>Name of the chat theme, which is usually an emoji</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="chatbackground" href="#chatbackground"><i class="anchor-icon"></i></a>ChatBackground</h4>
<p>This object represents a chat background.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>type</td>
<td><a href="#backgroundtype">BackgroundType</a></td>
<td>Type of the background</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="forumtopiccreated" href="#forumtopiccreated"><i class="anchor-icon"></i></a>ForumTopicCreated</h4>
<p>This object represents a service message about a new forum topic created in the chat.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>name</td>
<td>String</td>
<td>Name of the topic</td>
</tr>
<tr>
<td>icon_color</td>
<td>Integer</td>
<td>Color of the topic icon in RGB format</td>
</tr>
<tr>
<td>icon_custom_emoji_id</td>
<td>String</td>
<td><em>Optional</em>. Unique identifier of the custom emoji shown as the topic icon</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="forumtopicclosed" href="#forumtopicclosed"><i class="anchor-icon"></i></a>ForumTopicClosed</h4>
<p>This object represents a service message about a forum topic closed in the chat. Currently holds no information.</p>
<h4><a class="anchor" name="forumtopicedited" href="#forumtopicedited"><i class="anchor-icon"></i></a>ForumTopicEdited</h4>
<p>This object represents a service message about an edited forum topic.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>name</td>
<td>String</td>
<td><em>Optional</em>. New name of the topic, if it was edited</td>
</tr>
<tr>
<td>icon_custom_emoji_id</td>
<td>String</td>
<td><em>Optional</em>. New identifier of the custom emoji shown as the topic icon, if it was edited; an empty string if the icon was removed</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="forumtopicreopened" href="#forumtopicreopened"><i class="anchor-icon"></i></a>ForumTopicReopened</h4>
<p>This object represents a service message about a forum topic reopened in the chat. Currently holds no information.</p>
<h4><a class="anchor" name="generalforumtopichidden" href="#generalforumtopichidden"><i class="anchor-icon"></i></a>GeneralForumTopicHidden</h4>
<p>This object represents a service message about General forum topic hidden in the chat. Currently holds no information.</p>
<h4><a class="anchor" name="generalforumtopicunhidden" href="#generalforumtopicunhidden"><i class="anchor-icon"></i></a>GeneralForumTopicUnhidden</h4>
<p>This object represents a service message about General forum topic unhidden in the chat. Currently holds no information.</p>
<h4><a class="anchor" name="shareduser" href="#shareduser"><i class="anchor-icon"></i></a>SharedUser</h4>
<p>This object contains information about a user that was shared with the bot using a <a href="#keyboardbuttonrequestusers">KeyboardButtonRequestUsers</a> button.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>user_id</td>
<td>Integer</td>
<td>Identifier of the shared user. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so 64-bit integers or double-precision float types are safe for storing these identifiers. The bot may not have access to the user and could be unable to use this identifier, unless the user is already known to the bot by some other means.</td>
</tr>
<tr>
<td>first_name</td>
<td>String</td>
<td><em>Optional</em>. First name of the user, if the name was requested by the bot</td>
</tr>
<tr>
<td>last_name</td>
<td>String</td>
<td><em>Optional</em>. Last name of the user, if the name was requested by the bot</td>
</tr>
<tr>
<td>username</td>
<td>String</td>
<td><em>Optional</em>. Username of the user, if the username was requested by the bot</td>
</tr>
<tr>
<td>photo</td>
<td>Array of <a href="#photosize">PhotoSize</a></td>
<td><em>Optional</em>. Available sizes of the chat photo, if the photo was requested by the bot</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="usersshared" href="#usersshared"><i class="anchor-icon"></i></a>UsersShared</h4>
<p>This object contains information about the users whose identifiers were shared with the bot using a <a href="#keyboardbuttonrequestusers">KeyboardButtonRequestUsers</a> button.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>request_id</td>
<td>Integer</td>
<td>Identifier of the request</td>
</tr>
<tr>
<td>users</td>
<td>Array of <a href="#shareduser">SharedUser</a></td>
<td>Information about users shared with the bot.</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="chatshared" href="#chatshared"><i class="anchor-icon"></i></a>ChatShared</h4>
<p>This object contains information about a chat that was shared with the bot using a <a href="#keyboardbuttonrequestchat">KeyboardButtonRequestChat</a> button.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>request_id</td>
<td>Integer</td>
<td>Identifier of the request</td>
</tr>
<tr>
<td>chat_id</td>
<td>Integer</td>
<td>Identifier of the shared chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot may not have access to the chat and could be unable to use this identifier, unless the chat is already known to the bot by some other means.</td>
</tr>
<tr>
<td>title</td>
<td>String</td>
<td><em>Optional</em>. Title of the chat, if the title was requested by the bot.</td>
</tr>
<tr>
<td>username</td>
<td>String</td>
<td><em>Optional</em>. Username of the chat, if the username was requested by the bot and available.</td>
</tr>
<tr>
<td>photo</td>
<td>Array of <a href="#photosize">PhotoSize</a></td>
<td><em>Optional</em>. Available sizes of the chat photo, if the photo was requested by the bot</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="writeaccessallowed" href="#writeaccessallowed"><i class="anchor-icon"></i></a>WriteAccessAllowed</h4>
<p>This object represents a service message about a user allowing a bot to write messages after adding it to the attachment menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method <a href="/bots/webapps#initializing-mini-apps">requestWriteAccess</a>.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>from_request</td>
<td>Boolean</td>
<td><em>Optional</em>. True, if the access was granted after the user accepted an explicit request from a Web App sent by the method <a href="/bots/webapps#initializing-mini-apps">requestWriteAccess</a></td>
</tr>
<tr>
<td>web_app_name</td>
<td>String</td>
<td><em>Optional</em>. Name of the Web App, if the access was granted when the Web App was launched from a link</td>
</tr>
<tr>
<td>from_attachment_menu</td>
<td>Boolean</td>
<td><em>Optional</em>. True, if the access was granted when the bot was added to the attachment or side menu</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="videochatscheduled" href="#videochatscheduled"><i class="anchor-icon"></i></a>VideoChatScheduled</h4>
<p>This object represents a service message about a video chat scheduled in the chat.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>start_date</td>
<td>Integer</td>
<td>Point in time (Unix timestamp) when the video chat is supposed to be started by a chat administrator</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="videochatstarted" href="#videochatstarted"><i class="anchor-icon"></i></a>VideoChatStarted</h4>
<p>This object represents a service message about a video chat started in the chat. Currently holds no information.</p>
<h4><a class="anchor" name="videochatended" href="#videochatended"><i class="anchor-icon"></i></a>VideoChatEnded</h4>
<p>This object represents a service message about a video chat ended in the chat.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>duration</td>
<td>Integer</td>
<td>Video chat duration in seconds</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="videochatparticipantsinvited" href="#videochatparticipantsinvited"><i class="anchor-icon"></i></a>VideoChatParticipantsInvited</h4>
<p>This object represents a service message about new members invited to a video chat.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>users</td>
<td>Array of <a href="#user">User</a></td>
<td>New members that were invited to the video chat</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="giveawaycreated" href="#giveawaycreated"><i class="anchor-icon"></i></a>GiveawayCreated</h4>
<p>This object represents a service message about the creation of a scheduled giveaway. Currently holds no information.</p>
<h4><a class="anchor" name="giveaway" href="#giveaway"><i class="anchor-icon"></i></a>Giveaway</h4>
<p>This object represents a message about a scheduled giveaway.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>chats</td>
<td>Array of <a href="#chat">Chat</a></td>
<td>The list of chats which the user must join to participate in the giveaway</td>
</tr>
<tr>
<td>winners_selection_date</td>
<td>Integer</td>
<td>Point in time (Unix timestamp) when winners of the giveaway will be selected</td>
</tr>
<tr>
<td>winner_count</td>
<td>Integer</td>
<td>The number of users which are supposed to be selected as winners of the giveaway</td>
</tr>
<tr>
<td>only_new_members</td>
<td>True</td>
<td><em>Optional</em>. <em>True</em>, if only users who join the chats after the giveaway started should be eligible to win</td>
</tr>
<tr>
<td>has_public_winners</td>
<td>True</td>
<td><em>Optional</em>. <em>True</em>, if the list of giveaway winners will be visible to everyone</td>
</tr>
<tr>
<td>prize_description</td>
<td>String</td>
<td><em>Optional</em>. Description of additional giveaway prize</td>
</tr>
<tr>
<td>country_codes</td>
<td>Array of String</td>
<td><em>Optional</em>. A list of two-letter <a href="https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2">ISO 3166-1 alpha-2</a> country codes indicating the countries from which eligible users for the giveaway must come. If empty, then all users can participate in the giveaway. Users with a phone number that was bought on Fragment can always participate in giveaways.</td>
</tr>
<tr>
<td>premium_subscription_month_count</td>
<td>Integer</td>
<td><em>Optional</em>. The number of months the Telegram Premium subscription won from the giveaway will be active for</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="giveawaywinners" href="#giveawaywinners"><i class="anchor-icon"></i></a>GiveawayWinners</h4>
<p>This object represents a message about the completion of a giveaway with public winners.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>chat</td>
<td><a href="#chat">Chat</a></td>
<td>The chat that created the giveaway</td>
</tr>
<tr>
<td>giveaway_message_id</td>
<td>Integer</td>
<td>Identifier of the message with the giveaway in the chat</td>
</tr>
<tr>
<td>winners_selection_date</td>
<td>Integer</td>
<td>Point in time (Unix timestamp) when winners of the giveaway were selected</td>
</tr>
<tr>
<td>winner_count</td>
<td>Integer</td>
<td>Total number of winners in the giveaway</td>
</tr>
<tr>
<td>winners</td>
<td>Array of <a href="#user">User</a></td>
<td>List of up to 100 winners of the giveaway</td>
</tr>
<tr>
<td>additional_chat_count</td>
<td>Integer</td>
<td><em>Optional</em>. The number of other chats the user had to join in order to be eligible for the giveaway</td>
</tr>
<tr>
<td>premium_subscription_month_count</td>
<td>Integer</td>
<td><em>Optional</em>. The number of months the Telegram Premium subscription won from the giveaway will be active for</td>
</tr>
<tr>
<td>unclaimed_prize_count</td>
<td>Integer</td>
<td><em>Optional</em>. Number of undistributed prizes</td>
</tr>
<tr>
<td>only_new_members</td>
<td>True</td>
<td><em>Optional</em>. <em>True</em>, if only users who had joined the chats after the giveaway started were eligible to win</td>
</tr>
<tr>
<td>was_refunded</td>
<td>True</td>
<td><em>Optional</em>. <em>True</em>, if the giveaway was canceled because the payment for it was refunded</td>
</tr>
<tr>
<td>prize_description</td>
<td>String</td>
<td><em>Optional</em>. Description of additional giveaway prize</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="giveawaycompleted" href="#giveawaycompleted"><i class="anchor-icon"></i></a>GiveawayCompleted</h4>
<p>This object represents a service message about the completion of a giveaway without public winners.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>winner_count</td>
<td>Integer</td>
<td>Number of winners in the giveaway</td>
</tr>
<tr>
<td>unclaimed_prize_count</td>
<td>Integer</td>
<td><em>Optional</em>. Number of undistributed prizes</td>
</tr>
<tr>
<td>giveaway_message</td>
<td><a href="#message">Message</a></td>
<td><em>Optional</em>. Message with the giveaway that was completed, if it wasn&#39;t deleted</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="linkpreviewoptions" href="#linkpreviewoptions"><i class="anchor-icon"></i></a>LinkPreviewOptions</h4>
<p>Describes the options used for link preview generation.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>is_disabled</td>
<td>Boolean</td>
<td><em>Optional</em>. <em>True</em>, if the link preview is disabled</td>
</tr>
<tr>
<td>url</td>
<td>String</td>
<td><em>Optional</em>. URL to use for the link preview. If empty, then the first URL found in the message text will be used</td>
</tr>
<tr>
<td>prefer_small_media</td>
<td>Boolean</td>
<td><em>Optional</em>. <em>True</em>, if the media in the link preview is supposed to be shrunk; ignored if the URL isn&#39;t explicitly specified or media size change isn&#39;t supported for the preview</td>
</tr>
<tr>
<td>prefer_large_media</td>
<td>Boolean</td>
<td><em>Optional</em>. <em>True</em>, if the media in the link preview is supposed to be enlarged; ignored if the URL isn&#39;t explicitly specified or media size change isn&#39;t supported for the preview</td>
</tr>
<tr>
<td>show_above_text</td>
<td>Boolean</td>
<td><em>Optional</em>. <em>True</em>, if the link preview must be shown above the message text; otherwise, the link preview will be shown below the message text</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="userprofilephotos" href="#userprofilephotos"><i class="anchor-icon"></i></a>UserProfilePhotos</h4>
<p>This object represent a user&#39;s profile pictures.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>total_count</td>
<td>Integer</td>
<td>Total number of profile pictures the target user has</td>
</tr>
<tr>
<td>photos</td>
<td>Array of Array of <a href="#photosize">PhotoSize</a></td>
<td>Requested profile pictures (in up to 4 sizes each)</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="file" href="#file"><i class="anchor-icon"></i></a>File</h4>
<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&lt;token&gt;/&lt;file_path&gt;</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 <a href="#getfile">getFile</a>.</p>
<blockquote>
<p>The maximum file size to download is 20 MB</p>
</blockquote>
<table class="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&#39;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 in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.</td>
</tr>
<tr>
<td>file_path</td>
<td>String</td>
<td><em>Optional</em>. File path. Use <code>https://api.telegram.org/file/bot&lt;token&gt;/&lt;file_path&gt;</code> to get the file.</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="webappinfo" href="#webappinfo"><i class="anchor-icon"></i></a>WebAppInfo</h4>
<p>Describes a <a href="/bots/webapps">Web App</a>.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>url</td>
<td>String</td>
<td>An HTTPS URL of a Web App to be opened with additional data as specified in <a href="/bots/webapps#initializing-mini-apps">Initializing Web Apps</a></td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="replykeyboardmarkup" href="#replykeyboardmarkup"><i class="anchor-icon"></i></a>ReplyKeyboardMarkup</h4>
<p>This object represents a <a href="/bots/features#keyboards">custom keyboard</a> with reply options (see <a href="/bots/features#keyboards">Introduction to bots</a> for details and examples). Not supported in channels and for messages sent on behalf of a Telegram Business account.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>keyboard</td>
<td>Array of Array of <a href="#keyboardbutton">KeyboardButton</a></td>
<td>Array of button rows, each represented by an Array of <a href="#keyboardbutton">KeyboardButton</a> objects</td>
</tr>
<tr>
<td>is_persistent</td>
<td>Boolean</td>
<td><em>Optional</em>. Requests clients to always show the keyboard when the regular keyboard is hidden. Defaults to <em>false</em>, in which case the custom keyboard can be hidden and opened with a keyboard icon.</td>
</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&#39;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&#39;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>input_field_placeholder</td>
<td>String</td>
<td><em>Optional</em>. The placeholder to be shown in the input field when the keyboard is active; 1-64 characters</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 <a href="#message">Message</a> object; 2) if the bot&#39;s message is a reply to a message in the same chat and forum topic, sender of the original message.<br><br><em>Example:</em> A user requests to change the bot&#39;s language, bot replies to the request with a keyboard to select the new language. Other users in the group don&#39;t see the keyboard.</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="keyboardbutton" href="#keyboardbutton"><i class="anchor-icon"></i></a>KeyboardButton</h4>
<p>This object represents one button of the reply keyboard. At most one of the optional fields must be used to specify type of the button. For simple text buttons, <em>String</em> can be used instead of this object to specify the button text.</p>
<table class="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_users</td>
<td><a href="#keyboardbuttonrequestusers">KeyboardButtonRequestUsers</a></td>
<td><em>Optional.</em> If specified, pressing the button will open a list of suitable users. Identifiers of selected users will be sent to the bot in a “users_shared” service message. Available in private chats only.</td>
</tr>
<tr>
<td>request_chat</td>
<td><a href="#keyboardbuttonrequestchat">KeyboardButtonRequestChat</a></td>
<td><em>Optional.</em> If specified, pressing the button will open a list of suitable chats. Tapping on a chat will send its identifier to the bot in a “chat_shared” service message. Available in private chats only.</td>
</tr>
<tr>
<td>request_contact</td>
<td>Boolean</td>
<td><em>Optional</em>. If <em>True</em>, the user&#39;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&#39;s current location will be sent when the button is pressed. Available in private chats only.</td>
</tr>
<tr>
<td>request_poll</td>
<td><a href="#keyboardbuttonpolltype">KeyboardButtonPollType</a></td>
<td><em>Optional</em>. If specified, the user will be asked to create a poll and send it to the bot when the button is pressed. Available in private chats only.</td>
</tr>
<tr>
<td>web_app</td>
<td><a href="#webappinfo">WebAppInfo</a></td>
<td><em>Optional</em>. If specified, the described <a href="/bots/webapps">Web App</a> will be launched when the button is pressed. The Web App will be able to send a “web_app_data” service message. Available in private chats only.</td>
</tr>
</tbody>
</table>
<p><strong>Note:</strong> <em>request_users</em> and <em>request_chat</em> options will only work in Telegram versions released after 3 February, 2023. Older clients will display <em>unsupported message</em>.</p>
<h4><a class="anchor" name="keyboardbuttonrequestusers" href="#keyboardbuttonrequestusers"><i class="anchor-icon"></i></a>KeyboardButtonRequestUsers</h4>
<p>This object defines the criteria used to request suitable users. Information about the selected users will be shared with the bot when the corresponding button is pressed. <a href="/bots/features#chat-and-user-selection">More about requesting users »</a></p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>request_id</td>
<td>Integer</td>
<td>Signed 32-bit identifier of the request that will be received back in the <a href="#usersshared">UsersShared</a> object. Must be unique within the message</td>
</tr>
<tr>
<td>user_is_bot</td>
<td>Boolean</td>
<td><em>Optional</em>. Pass <em>True</em> to request bots, pass <em>False</em> to request regular users. If not specified, no additional restrictions are applied.</td>
</tr>
<tr>
<td>user_is_premium</td>
<td>Boolean</td>
<td><em>Optional</em>. Pass <em>True</em> to request premium users, pass <em>False</em> to request non-premium users. If not specified, no additional restrictions are applied.</td>
</tr>
<tr>
<td>max_quantity</td>
<td>Integer</td>
<td><em>Optional</em>. The maximum number of users to be selected; 1-10. Defaults to 1.</td>
</tr>
<tr>
<td>request_name</td>
<td>Boolean</td>
<td><em>Optional</em>. Pass <em>True</em> to request the users&#39; first and last names</td>
</tr>
<tr>
<td>request_username</td>
<td>Boolean</td>
<td><em>Optional</em>. Pass <em>True</em> to request the users&#39; usernames</td>
</tr>
<tr>
<td>request_photo</td>
<td>Boolean</td>
<td><em>Optional</em>. Pass <em>True</em> to request the users&#39; photos</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="keyboardbuttonrequestchat" href="#keyboardbuttonrequestchat"><i class="anchor-icon"></i></a>KeyboardButtonRequestChat</h4>
<p>This object defines the criteria used to request a suitable chat. Information about the selected chat will be shared with the bot when the corresponding button is pressed. The bot will be granted requested rights in the chat if appropriate. <a href="/bots/features#chat-and-user-selection">More about requesting chats »</a>.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>request_id</td>
<td>Integer</td>
<td>Signed 32-bit identifier of the request, which will be received back in the <a href="#chatshared">ChatShared</a> object. Must be unique within the message</td>
</tr>
<tr>
<td>chat_is_channel</td>
<td>Boolean</td>
<td>Pass <em>True</em> to request a channel chat, pass <em>False</em> to request a group or a supergroup chat.</td>
</tr>
<tr>
<td>chat_is_forum</td>
<td>Boolean</td>
<td><em>Optional</em>. Pass <em>True</em> to request a forum supergroup, pass <em>False</em> to request a non-forum chat. If not specified, no additional restrictions are applied.</td>
</tr>
<tr>
<td>chat_has_username</td>
<td>Boolean</td>
<td><em>Optional</em>. Pass <em>True</em> to request a supergroup or a channel with a username, pass <em>False</em> to request a chat without a username. If not specified, no additional restrictions are applied.</td>
</tr>
<tr>
<td>chat_is_created</td>
<td>Boolean</td>
<td><em>Optional</em>. Pass <em>True</em> to request a chat owned by the user. Otherwise, no additional restrictions are applied.</td>
</tr>
<tr>
<td>user_administrator_rights</td>
<td><a href="#chatadministratorrights">ChatAdministratorRights</a></td>
<td><em>Optional</em>. A JSON-serialized object listing the required administrator rights of the user in the chat. The rights must be a superset of <em>bot_administrator_rights</em>. If not specified, no additional restrictions are applied.</td>
</tr>
<tr>
<td>bot_administrator_rights</td>
<td><a href="#chatadministratorrights">ChatAdministratorRights</a></td>
<td><em>Optional</em>. A JSON-serialized object listing the required administrator rights of the bot in the chat. The rights must be a subset of <em>user_administrator_rights</em>. If not specified, no additional restrictions are applied.</td>
</tr>
<tr>
<td>bot_is_member</td>
<td>Boolean</td>
<td><em>Optional</em>. Pass <em>True</em> to request a chat with the bot as a member. Otherwise, no additional restrictions are applied.</td>
</tr>
<tr>
<td>request_title</td>
<td>Boolean</td>
<td><em>Optional</em>. Pass <em>True</em> to request the chat&#39;s title</td>
</tr>
<tr>
<td>request_username</td>
<td>Boolean</td>
<td><em>Optional</em>. Pass <em>True</em> to request the chat&#39;s username</td>
</tr>
<tr>
<td>request_photo</td>
<td>Boolean</td>
<td><em>Optional</em>. Pass <em>True</em> to request the chat&#39;s photo</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="keyboardbuttonpolltype" href="#keyboardbuttonpolltype"><i class="anchor-icon"></i></a>KeyboardButtonPollType</h4>
<p>This object represents type of a poll, which is allowed to be created and sent when the corresponding button is pressed.</p>
<table class="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>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="replykeyboardremove" href="#replykeyboardremove"><i class="anchor-icon"></i></a>ReplyKeyboardRemove</h4>
<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 <a href="#replykeyboardmarkup">ReplyKeyboardMarkup</a>). Not supported in channels and for messages sent on behalf of a Telegram Business account.</p>
<table class="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 <a href="#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 <a href="#message">Message</a> object; 2) if the bot&#39;s message is a reply to a message in the same chat and forum topic, 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&#39;t voted yet.</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="inlinekeyboardmarkup" href="#inlinekeyboardmarkup"><i class="anchor-icon"></i></a>InlineKeyboardMarkup</h4>
<p>This object represents an <a href="/bots/features#inline-keyboards">inline keyboard</a> that appears right next to the message it belongs to.</p>
<table class="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 <a href="#inlinekeyboardbutton">InlineKeyboardButton</a></td>
<td>Array of button rows, each represented by an Array of <a href="#inlinekeyboardbutton">InlineKeyboardButton</a> objects</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="inlinekeyboardbutton" href="#inlinekeyboardbutton"><i class="anchor-icon"></i></a>InlineKeyboardButton</h4>
<p>This object represents one button of an inline keyboard. Exactly one of the optional fields must be used to specify type of the button.</p>
<table class="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 the button is pressed. Links <code>tg://user?id=&lt;user_id&gt;</code> can be used to mention a user by their identifier without using a username, if this is allowed by their privacy settings.</td>
</tr>
<tr>
<td>callback_data</td>
<td>String</td>
<td><em>Optional</em>. Data to be sent in a <a href="#callbackquery">callback query</a> to the bot when the button is pressed, 1-64 bytes</td>
</tr>
<tr>
<td>web_app</td>
<td><a href="#webappinfo">WebAppInfo</a></td>
<td><em>Optional</em>. Description of the <a href="/bots/webapps">Web App</a> that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method <a href="#answerwebappquery">answerWebAppQuery</a>. Available only in private chats between a user and the bot. Not supported for messages sent on behalf of a Telegram Business account.</td>
</tr>
<tr>
<td>login_url</td>
<td><a href="#loginurl">LoginUrl</a></td>
<td><em>Optional</em>. An HTTPS URL used to automatically authorize the user. Can be used as a replacement for the <a href="/widgets/login">Telegram Login Widget</a>.</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&#39;s username and the specified inline query in the input field. May be empty, in which case just the bot&#39;s username will be inserted. Not supported for messages sent on behalf of a Telegram Business account.</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&#39;s username and the specified inline query in the current chat&#39;s input field. May be empty, in which case only the bot&#39;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. Not supported in channels and for messages sent on behalf of a Telegram Business account.</td>
</tr>
<tr>
<td>switch_inline_query_chosen_chat</td>
<td><a href="#switchinlinequerychosenchat">SwitchInlineQueryChosenChat</a></td>
<td><em>Optional</em>. If set, pressing the button will prompt the user to select one of their chats of the specified type, open that chat and insert the bot&#39;s username and the specified inline query in the input field. Not supported for messages sent on behalf of a Telegram Business account.</td>
</tr>
<tr>
<td>callback_game</td>
<td><a href="#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 <em>True</em>, to send a <a href="#payments">Pay button</a>. Substrings “<img class="emoji" src="//telegram.org/img/emoji/40/E2AD90.png" width="20" height="20" alt="⭐" />” and “XTR” in the buttons&#39;s text will be replaced with a Telegram Star icon.<br><br><strong>NOTE:</strong> This type of button <strong>must</strong> always be the first button in the first row and can only be used in invoice messages.</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="loginurl" href="#loginurl"><i class="anchor-icon"></i></a>LoginUrl</h4>
<p>This object represents a parameter of the inline keyboard button used to automatically authorize a user. Serves as a great replacement for the <a href="/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>
<div class="blog_image_wrap">
<a href="/file/811140015/1734/8VZFkwWXalM.97872/6127fa62d8a0bf2b3c" target="_blank"><img src="/file/811140909/1631/20k1Z53eiyY.23995/c541e89b74253623d9" title="TITLE" alt="TITLE" srcset="/file/811140015/1734/8VZFkwWXalM.97872/6127fa62d8a0bf2b3c , 2x" /></a>
</div>
<p>Telegram apps support these buttons as of <a href="https://telegram.org/blog/privacy-discussions-web-bots#meet-seamless-web-bots">version 5.7</a>.</p>
<blockquote>
<p>Sample bot: <a href="https://t.me/discussbot">@discussbot</a></p>
</blockquote>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>url</td>
<td>String</td>
<td>An HTTPS URL to be opened with user authorization data added to the query string when the button is pressed. If the user refuses to provide authorization data, the original URL without information about the user will be opened. The data added is the same as described in <a href="/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 <a href="/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 <a href="/widgets/login#setting-up-a-bot">Setting up a bot</a> for more details. If not specified, the current bot&#39;s username will be assumed. The <em>url</em>&#39;s domain must be the same as the domain linked with the bot. See <a href="/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 <em>True</em> to request the permission for your bot to send messages to the user.</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="switchinlinequerychosenchat" href="#switchinlinequerychosenchat"><i class="anchor-icon"></i></a>SwitchInlineQueryChosenChat</h4>
<p>This object represents an inline button that switches the current user to inline mode in a chosen chat, with an optional default inline query.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>query</td>
<td>String</td>
<td><em>Optional</em>. The default inline query to be inserted in the input field. If left empty, only the bot&#39;s username will be inserted</td>
</tr>
<tr>
<td>allow_user_chats</td>
<td>Boolean</td>
<td><em>Optional</em>. True, if private chats with users can be chosen</td>
</tr>
<tr>
<td>allow_bot_chats</td>
<td>Boolean</td>
<td><em>Optional</em>. True, if private chats with bots can be chosen</td>
</tr>
<tr>
<td>allow_group_chats</td>
<td>Boolean</td>
<td><em>Optional</em>. True, if group and supergroup chats can be chosen</td>
</tr>
<tr>
<td>allow_channel_chats</td>
<td>Boolean</td>
<td><em>Optional</em>. True, if channel chats can be chosen</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="callbackquery" href="#callbackquery"><i class="anchor-icon"></i></a>CallbackQuery</h4>
<p>This object represents an incoming callback query from a callback button in an <a href="/bots/features#inline-keyboards">inline keyboard</a>. If the button that originated the query was attached to a message sent by the bot, the field <em>message</em> will be present. If the button was attached to a message sent via the bot (in <a href="#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>
<table class="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><a href="#user">User</a></td>
<td>Sender</td>
</tr>
<tr>
<td>message</td>
<td><a href="#maybeinaccessiblemessage">MaybeInaccessibleMessage</a></td>
<td><em>Optional</em>. Message sent by the bot with the callback button that originated the query</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 <a href="#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 the message originated the query can contain no callback buttons with this data.</td>
</tr>
<tr>
<td>game_short_name</td>
<td>String</td>
<td><em>Optional</em>. Short name of a <a href="#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 <a href="#answercallbackquery">answerCallbackQuery</a>. It is, therefore, necessary to react by calling <a href="#answercallbackquery">answerCallbackQuery</a> even if no notification to the user is needed (e.g., without specifying any of the optional parameters).</p>
</blockquote>
<h4><a class="anchor" name="forcereply" href="#forcereply"><i class="anchor-icon"></i></a>ForceReply</h4>
<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&#39;s message and tapped &#39;Reply&#39;). This can be extremely useful if you want to create user-friendly step-by-step interfaces without having to sacrifice <a href="/bots/features#privacy-mode">privacy mode</a>. Not supported in channels and for messages sent on behalf of a Telegram Business account.</p>
<table class="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&#39;s message and tapped &#39;Reply&#39;</td>
</tr>
<tr>
<td>input_field_placeholder</td>
<td>String</td>
<td><em>Optional</em>. The placeholder to be shown in the input field when the reply is active; 1-64 characters</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 <a href="#message">Message</a> object; 2) if the bot&#39;s message is a reply to a message in the same chat and forum topic, sender of the original message.</td>
</tr>
</tbody>
</table>
<blockquote>
<p><strong>Example:</strong> A <a href="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. &#39;Please send me your question&#39;, &#39;Cool, now let&#39;s add the first answer option&#39;, &#39;Great. Keep adding answer options, then send /done when you&#39;re ready&#39;.</li>
</ul>
<p>The last option is definitely more attractive. And if you use <a href="#forcereply">ForceReply</a> in your bot&#39;s questions, it will receive the user&#39;s answers even if it only receives replies, commands and mentions - without any extra work for the user.</p>
</blockquote>
<h4><a class="anchor" name="chatphoto" href="#chatphoto"><i class="anchor-icon"></i></a>ChatPhoto</h4>
<p>This object represents a chat photo.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>small_file_id</td>
<td>String</td>
<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&#39;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&#39;t be used to download or reuse the file.</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="chatinvitelink" href="#chatinvitelink"><i class="anchor-icon"></i></a>ChatInviteLink</h4>
<p>Represents an invite link for a chat.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>invite_link</td>
<td>String</td>
<td>The invite link. If the link was created by another chat administrator, then the second part of the link will be replaced with “…”.</td>
</tr>
<tr>
<td>creator</td>
<td><a href="#user">User</a></td>
<td>Creator of the link</td>
</tr>
<tr>
<td>creates_join_request</td>
<td>Boolean</td>
<td><em>True</em>, if users joining the chat via the link need to be approved by chat administrators</td>
</tr>
<tr>
<td>is_primary</td>
<td>Boolean</td>
<td><em>True</em>, if the link is primary</td>
</tr>
<tr>
<td>is_revoked</td>
<td>Boolean</td>
<td><em>True</em>, if the link is revoked</td>
</tr>
<tr>
<td>name</td>
<td>String</td>
<td><em>Optional</em>. Invite link name</td>
</tr>
<tr>
<td>expire_date</td>
<td>Integer</td>
<td><em>Optional</em>. Point in time (Unix timestamp) when the link will expire or has been expired</td>
</tr>
<tr>
<td>member_limit</td>
<td>Integer</td>
<td><em>Optional</em>. The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999</td>
</tr>
<tr>
<td>pending_join_request_count</td>
<td>Integer</td>
<td><em>Optional</em>. Number of pending join requests created using this link</td>
</tr>
<tr>
<td>subscription_period</td>
<td>Integer</td>
<td><em>Optional</em>. The number of seconds the subscription will be active for before the next payment</td>
</tr>
<tr>
<td>subscription_price</td>
<td>Integer</td>
<td><em>Optional</em>. The amount of Telegram Stars a user must pay initially and after each subsequent subscription period to be a member of the chat using the link</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="chatadministratorrights" href="#chatadministratorrights"><i class="anchor-icon"></i></a>ChatAdministratorRights</h4>
<p>Represents the rights of an administrator in a chat.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>is_anonymous</td>
<td>Boolean</td>
<td><em>True</em>, if the user&#39;s presence in the chat is hidden</td>
</tr>
<tr>
<td>can_manage_chat</td>
<td>Boolean</td>
<td><em>True</em>, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.</td>
</tr>
<tr>
<td>can_delete_messages</td>
<td>Boolean</td>
<td><em>True</em>, if the administrator can delete messages of other users</td>
</tr>
<tr>
<td>can_manage_video_chats</td>
<td>Boolean</td>
<td><em>True</em>, if the administrator can manage video chats</td>
</tr>
<tr>
<td>can_restrict_members</td>
<td>Boolean</td>
<td><em>True</em>, if the administrator can restrict, ban or unban chat members, or access supergroup statistics</td>
</tr>
<tr>
<td>can_promote_members</td>
<td>Boolean</td>
<td><em>True</em>, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by the user)</td>
</tr>
<tr>
<td>can_change_info</td>
<td>Boolean</td>
<td><em>True</em>, 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>True</em>, if the user is allowed to invite new users to the chat</td>
</tr>
<tr>
<td>can_post_stories</td>
<td>Boolean</td>
<td><em>True</em>, if the administrator can post stories to the chat</td>
</tr>
<tr>
<td>can_edit_stories</td>
<td>Boolean</td>
<td><em>True</em>, if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat&#39;s story archive</td>
</tr>
<tr>
<td>can_delete_stories</td>
<td>Boolean</td>
<td><em>True</em>, if the administrator can delete stories posted by other users</td>
</tr>
<tr>
<td>can_post_messages</td>
<td>Boolean</td>
<td><em>Optional</em>. <em>True</em>, if the administrator can post messages in the channel, or access channel statistics; for channels only</td>
</tr>
<tr>
<td>can_edit_messages</td>
<td>Boolean</td>
<td><em>Optional</em>. <em>True</em>, if the administrator can edit messages of other users and can pin messages; for channels only</td>
</tr>
<tr>
<td>can_pin_messages</td>
<td>Boolean</td>
<td><em>Optional</em>. <em>True</em>, if the user is allowed to pin messages; for groups and supergroups only</td>
</tr>
<tr>
<td>can_manage_topics</td>
<td>Boolean</td>
<td><em>Optional</em>. <em>True</em>, if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="chatmemberupdated" href="#chatmemberupdated"><i class="anchor-icon"></i></a>ChatMemberUpdated</h4>
<p>This object represents changes in the status of a chat member.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>chat</td>
<td><a href="#chat">Chat</a></td>
<td>Chat the user belongs to</td>
</tr>
<tr>
<td>from</td>
<td><a href="#user">User</a></td>
<td>Performer of the action, which resulted in the change</td>
</tr>
<tr>
<td>date</td>
<td>Integer</td>
<td>Date the change was done in Unix time</td>
</tr>
<tr>
<td>old_chat_member</td>
<td><a href="#chatmember">ChatMember</a></td>
<td>Previous information about the chat member</td>
</tr>
<tr>
<td>new_chat_member</td>
<td><a href="#chatmember">ChatMember</a></td>
<td>New information about the chat member</td>
</tr>
<tr>
<td>invite_link</td>
<td><a href="#chatinvitelink">ChatInviteLink</a></td>
<td><em>Optional</em>. Chat invite link, which was used by the user to join the chat; for joining by invite link events only.</td>
</tr>
<tr>
<td>via_join_request</td>
<td>Boolean</td>
<td><em>Optional</em>. True, if the user joined the chat after sending a direct join request without using an invite link and being approved by an administrator</td>
</tr>
<tr>
<td>via_chat_folder_invite_link</td>
<td>Boolean</td>
<td><em>Optional</em>. True, if the user joined the chat via a chat folder invite link</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="chatmember" href="#chatmember"><i class="anchor-icon"></i></a>ChatMember</h4>
<p>This object contains information about one member of a chat. Currently, the following 6 types of chat members are supported:</p>
<ul>
<li><a href="#chatmemberowner">ChatMemberOwner</a></li>
<li><a href="#chatmemberadministrator">ChatMemberAdministrator</a></li>
<li><a href="#chatmembermember">ChatMemberMember</a></li>
<li><a href="#chatmemberrestricted">ChatMemberRestricted</a></li>
<li><a href="#chatmemberleft">ChatMemberLeft</a></li>
<li><a href="#chatmemberbanned">ChatMemberBanned</a></li>
</ul>
<h4><a class="anchor" name="chatmemberowner" href="#chatmemberowner"><i class="anchor-icon"></i></a>ChatMemberOwner</h4>
<p>Represents a <a href="#chatmember">chat member</a> that owns the chat and has all administrator privileges.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>status</td>
<td>String</td>
<td>The member&#39;s status in the chat, always “creator”</td>
</tr>
<tr>
<td>user</td>
<td><a href="#user">User</a></td>
<td>Information about the user</td>
</tr>
<tr>
<td>is_anonymous</td>
<td>Boolean</td>
<td><em>True</em>, if the user&#39;s presence in the chat is hidden</td>
</tr>
<tr>
<td>custom_title</td>
<td>String</td>
<td><em>Optional</em>. Custom title for this user</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="chatmemberadministrator" href="#chatmemberadministrator"><i class="anchor-icon"></i></a>ChatMemberAdministrator</h4>
<p>Represents a <a href="#chatmember">chat member</a> that has some additional privileges.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>status</td>
<td>String</td>
<td>The member&#39;s status in the chat, always “administrator”</td>
</tr>
<tr>
<td>user</td>
<td><a href="#user">User</a></td>
<td>Information about the user</td>
</tr>
<tr>
<td>can_be_edited</td>
<td>Boolean</td>
<td><em>True</em>, if the bot is allowed to edit administrator privileges of that user</td>
</tr>
<tr>
<td>is_anonymous</td>
<td>Boolean</td>
<td><em>True</em>, if the user&#39;s presence in the chat is hidden</td>
</tr>
<tr>
<td>can_manage_chat</td>
<td>Boolean</td>
<td><em>True</em>, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.</td>
</tr>
<tr>
<td>can_delete_messages</td>
<td>Boolean</td>
<td><em>True</em>, if the administrator can delete messages of other users</td>
</tr>
<tr>
<td>can_manage_video_chats</td>
<td>Boolean</td>
<td><em>True</em>, if the administrator can manage video chats</td>
</tr>
<tr>
<td>can_restrict_members</td>
<td>Boolean</td>
<td><em>True</em>, if the administrator can restrict, ban or unban chat members, or access supergroup statistics</td>
</tr>
<tr>
<td>can_promote_members</td>
<td>Boolean</td>
<td><em>True</em>, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by the user)</td>
</tr>
<tr>
<td>can_change_info</td>
<td>Boolean</td>
<td><em>True</em>, 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>True</em>, if the user is allowed to invite new users to the chat</td>
</tr>
<tr>
<td>can_post_stories</td>
<td>Boolean</td>
<td><em>True</em>, if the administrator can post stories to the chat</td>
</tr>
<tr>
<td>can_edit_stories</td>
<td>Boolean</td>
<td><em>True</em>, if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat&#39;s story archive</td>
</tr>
<tr>
<td>can_delete_stories</td>
<td>Boolean</td>
<td><em>True</em>, if the administrator can delete stories posted by other users</td>
</tr>
<tr>
<td>can_post_messages</td>
<td>Boolean</td>
<td><em>Optional</em>. <em>True</em>, if the administrator can post messages in the channel, or access channel statistics; for channels only</td>
</tr>
<tr>
<td>can_edit_messages</td>
<td>Boolean</td>
<td><em>Optional</em>. <em>True</em>, if the administrator can edit messages of other users and can pin messages; for channels only</td>
</tr>
<tr>
<td>can_pin_messages</td>
<td>Boolean</td>
<td><em>Optional</em>. <em>True</em>, if the user is allowed to pin messages; for groups and supergroups only</td>
</tr>
<tr>
<td>can_manage_topics</td>
<td>Boolean</td>
<td><em>Optional</em>. <em>True</em>, if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only</td>
</tr>
<tr>
<td>custom_title</td>
<td>String</td>
<td><em>Optional</em>. Custom title for this user</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="chatmembermember" href="#chatmembermember"><i class="anchor-icon"></i></a>ChatMemberMember</h4>
<p>Represents a <a href="#chatmember">chat member</a> that has no additional privileges or restrictions.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>status</td>
<td>String</td>
<td>The member&#39;s status in the chat, always “member”</td>
</tr>
<tr>
<td>user</td>
<td><a href="#user">User</a></td>
<td>Information about the user</td>
</tr>
<tr>
<td>until_date</td>
<td>Integer</td>
<td><em>Optional</em>. Date when the user&#39;s subscription will expire; Unix time</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="chatmemberrestricted" href="#chatmemberrestricted"><i class="anchor-icon"></i></a>ChatMemberRestricted</h4>
<p>Represents a <a href="#chatmember">chat member</a> that is under certain restrictions in the chat. Supergroups only.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>status</td>
<td>String</td>
<td>The member&#39;s status in the chat, always “restricted”</td>
</tr>
<tr>
<td>user</td>
<td><a href="#user">User</a></td>
<td>Information about the user</td>
</tr>
<tr>
<td>is_member</td>
<td>Boolean</td>
<td><em>True</em>, 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>True</em>, if the user is allowed to send text messages, contacts, giveaways, giveaway winners, invoices, locations and venues</td>
</tr>
<tr>
<td>can_send_audios</td>
<td>Boolean</td>
<td><em>True</em>, if the user is allowed to send audios</td>
</tr>
<tr>
<td>can_send_documents</td>
<td>Boolean</td>
<td><em>True</em>, if the user is allowed to send documents</td>
</tr>
<tr>
<td>can_send_photos</td>
<td>Boolean</td>
<td><em>True</em>, if the user is allowed to send photos</td>
</tr>
<tr>
<td>can_send_videos</td>
<td>Boolean</td>
<td><em>True</em>, if the user is allowed to send videos</td>
</tr>
<tr>
<td>can_send_video_notes</td>
<td>Boolean</td>
<td><em>True</em>, if the user is allowed to send video notes</td>
</tr>
<tr>
<td>can_send_voice_notes</td>
<td>Boolean</td>
<td><em>True</em>, if the user is allowed to send voice notes</td>
</tr>
<tr>
<td>can_send_polls</td>
<td>Boolean</td>
<td><em>True</em>, if the user is allowed to send polls</td>
</tr>
<tr>
<td>can_send_other_messages</td>
<td>Boolean</td>
<td><em>True</em>, 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>True</em>, if the user is allowed to add web page previews to their messages</td>
</tr>
<tr>
<td>can_change_info</td>
<td>Boolean</td>
<td><em>True</em>, 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>True</em>, 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>True</em>, if the user is allowed to pin messages</td>
</tr>
<tr>
<td>can_manage_topics</td>
<td>Boolean</td>
<td><em>True</em>, if the user is allowed to create forum topics</td>
</tr>
<tr>
<td>until_date</td>
<td>Integer</td>
<td>Date when restrictions will be lifted for this user; Unix time. If 0, then the user is restricted forever</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="chatmemberleft" href="#chatmemberleft"><i class="anchor-icon"></i></a>ChatMemberLeft</h4>
<p>Represents a <a href="#chatmember">chat member</a> that isn&#39;t currently a member of the chat, but may join it themselves.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>status</td>
<td>String</td>
<td>The member&#39;s status in the chat, always “left”</td>
</tr>
<tr>
<td>user</td>
<td><a href="#user">User</a></td>
<td>Information about the user</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="chatmemberbanned" href="#chatmemberbanned"><i class="anchor-icon"></i></a>ChatMemberBanned</h4>
<p>Represents a <a href="#chatmember">chat member</a> that was banned in the chat and can&#39;t return to the chat or view chat messages.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>status</td>
<td>String</td>
<td>The member&#39;s status in the chat, always “kicked”</td>
</tr>
<tr>
<td>user</td>
<td><a href="#user">User</a></td>
<td>Information about the user</td>
</tr>
<tr>
<td>until_date</td>
<td>Integer</td>
<td>Date when restrictions will be lifted for this user; Unix time. If 0, then the user is banned forever</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="chatjoinrequest" href="#chatjoinrequest"><i class="anchor-icon"></i></a>ChatJoinRequest</h4>
<p>Represents a join request sent to a chat.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>chat</td>
<td><a href="#chat">Chat</a></td>
<td>Chat to which the request was sent</td>
</tr>
<tr>
<td>from</td>
<td><a href="#user">User</a></td>
<td>User that sent the join request</td>
</tr>
<tr>
<td>user_chat_id</td>
<td>Integer</td>
<td>Identifier of a private chat with the user who sent the join request. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot can use this identifier for 5 minutes to send messages until the join request is processed, assuming no other administrator contacted the user.</td>
</tr>
<tr>
<td>date</td>
<td>Integer</td>
<td>Date the request was sent in Unix time</td>
</tr>
<tr>
<td>bio</td>
<td>String</td>
<td><em>Optional</em>. Bio of the user.</td>
</tr>
<tr>
<td>invite_link</td>
<td><a href="#chatinvitelink">ChatInviteLink</a></td>
<td><em>Optional</em>. Chat invite link that was used by the user to send the join request</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="chatpermissions" href="#chatpermissions"><i class="anchor-icon"></i></a>ChatPermissions</h4>
<p>Describes actions that a non-administrator user is allowed to take in a chat.</p>
<table class="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>. <em>True</em>, if the user is allowed to send text messages, contacts, giveaways, giveaway winners, invoices, locations and venues</td>
</tr>
<tr>
<td>can_send_audios</td>
<td>Boolean</td>
<td><em>Optional</em>. <em>True</em>, if the user is allowed to send audios</td>
</tr>
<tr>
<td>can_send_documents</td>
<td>Boolean</td>
<td><em>Optional</em>. <em>True</em>, if the user is allowed to send documents</td>
</tr>
<tr>
<td>can_send_photos</td>
<td>Boolean</td>
<td><em>Optional</em>. <em>True</em>, if the user is allowed to send photos</td>
</tr>
<tr>
<td>can_send_videos</td>
<td>Boolean</td>
<td><em>Optional</em>. <em>True</em>, if the user is allowed to send videos</td>
</tr>
<tr>
<td>can_send_video_notes</td>
<td>Boolean</td>
<td><em>Optional</em>. <em>True</em>, if the user is allowed to send video notes</td>
</tr>
<tr>
<td>can_send_voice_notes</td>
<td>Boolean</td>
<td><em>Optional</em>. <em>True</em>, if the user is allowed to send voice notes</td>
</tr>
<tr>
<td>can_send_polls</td>
<td>Boolean</td>
<td><em>Optional</em>. <em>True</em>, if the user is allowed to send polls</td>
</tr>
<tr>
<td>can_send_other_messages</td>
<td>Boolean</td>
<td><em>Optional</em>. <em>True</em>, 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>. <em>True</em>, if the user is allowed to add web page previews to their messages</td>
</tr>
<tr>
<td>can_change_info</td>
<td>Boolean</td>
<td><em>Optional</em>. <em>True</em>, 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>. <em>True</em>, 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>. <em>True</em>, if the user is allowed to pin messages. Ignored in public supergroups</td>
</tr>
<tr>
<td>can_manage_topics</td>
<td>Boolean</td>
<td><em>Optional</em>. <em>True</em>, if the user is allowed to create forum topics. If omitted defaults to the value of can_pin_messages</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="birthdate" href="#birthdate"><i class="anchor-icon"></i></a>Birthdate</h4>
<p>Describes the birthdate of a user.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>day</td>
<td>Integer</td>
<td>Day of the user&#39;s birth; 1-31</td>
</tr>
<tr>
<td>month</td>
<td>Integer</td>
<td>Month of the user&#39;s birth; 1-12</td>
</tr>
<tr>
<td>year</td>
<td>Integer</td>
<td><em>Optional</em>. Year of the user&#39;s birth</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="businessintro" href="#businessintro"><i class="anchor-icon"></i></a>BusinessIntro</h4>
<p>Contains information about the start page settings of a Telegram Business account.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>title</td>
<td>String</td>
<td><em>Optional</em>. Title text of the business intro</td>
</tr>
<tr>
<td>message</td>
<td>String</td>
<td><em>Optional</em>. Message text of the business intro</td>
</tr>
<tr>
<td>sticker</td>
<td><a href="#sticker">Sticker</a></td>
<td><em>Optional</em>. Sticker of the business intro</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="businesslocation" href="#businesslocation"><i class="anchor-icon"></i></a>BusinessLocation</h4>
<p>Contains information about the location of a Telegram Business account.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>address</td>
<td>String</td>
<td>Address of the business</td>
</tr>
<tr>
<td>location</td>
<td><a href="#location">Location</a></td>
<td><em>Optional</em>. Location of the business</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="businessopeninghoursinterval" href="#businessopeninghoursinterval"><i class="anchor-icon"></i></a>BusinessOpeningHoursInterval</h4>
<p>Describes an interval of time during which a business is open.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>opening_minute</td>
<td>Integer</td>
<td>The minute&#39;s sequence number in a week, starting on Monday, marking the start of the time interval during which the business is open; 0 - 7 * 24 * 60</td>
</tr>
<tr>
<td>closing_minute</td>
<td>Integer</td>
<td>The minute&#39;s sequence number in a week, starting on Monday, marking the end of the time interval during which the business is open; 0 - 8 * 24 * 60</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="businessopeninghours" href="#businessopeninghours"><i class="anchor-icon"></i></a>BusinessOpeningHours</h4>
<p>Describes the opening hours of a business.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>time_zone_name</td>
<td>String</td>
<td>Unique name of the time zone for which the opening hours are defined</td>
</tr>
<tr>
<td>opening_hours</td>
<td>Array of <a href="#businessopeninghoursinterval">BusinessOpeningHoursInterval</a></td>
<td>List of time intervals describing business opening hours</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="chatlocation" href="#chatlocation"><i class="anchor-icon"></i></a>ChatLocation</h4>
<p>Represents a location to which a chat is connected.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>location</td>
<td><a href="#location">Location</a></td>
<td>The location to which the supergroup is connected. Can&#39;t be a live location.</td>
</tr>
<tr>
<td>address</td>
<td>String</td>
<td>Location address; 1-64 characters, as defined by the chat owner</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="reactiontype" href="#reactiontype"><i class="anchor-icon"></i></a>ReactionType</h4>
<p>This object describes the type of a reaction. Currently, it can be one of</p>
<ul>
<li><a href="#reactiontypeemoji">ReactionTypeEmoji</a></li>
<li><a href="#reactiontypecustomemoji">ReactionTypeCustomEmoji</a></li>
<li><a href="#reactiontypepaid">ReactionTypePaid</a></li>
</ul>
<h4><a class="anchor" name="reactiontypeemoji" href="#reactiontypeemoji"><i class="anchor-icon"></i></a>ReactionTypeEmoji</h4>
<p>The reaction is based on an emoji.</p>
<table class="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 reaction, always “emoji”</td>
</tr>
<tr>
<td>emoji</td>
<td>String</td>
<td>Reaction emoji. Currently, it can be one of &quot;<img class="emoji" src="//telegram.org/img/emoji/40/F09F918D.png" width="20" height="20" alt="👍" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/F09F918E.png" width="20" height="20" alt="👎" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/E29DA4.png" width="20" height="20" alt="❤" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/F09F94A5.png" width="20" height="20" alt="🔥" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/F09FA5B0.png" width="20" height="20" alt="🥰" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/F09F918F.png" width="20" height="20" alt="👏" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/F09F9881.png" width="20" height="20" alt="😁" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/F09FA494.png" width="20" height="20" alt="🤔" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/F09FA4AF.png" width="20" height="20" alt="🤯" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/F09F98B1.png" width="20" height="20" alt="😱" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/F09FA4AC.png" width="20" height="20" alt="🤬" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/F09F98A2.png" width="20" height="20" alt="😢" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/F09F8E89.png" width="20" height="20" alt="🎉" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/F09FA4A9.png" width="20" height="20" alt="🤩" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/F09FA4AE.png" width="20" height="20" alt="🤮" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/F09F92A9.png" width="20" height="20" alt="💩" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/F09F998F.png" width="20" height="20" alt="🙏" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/F09F918C.png" width="20" height="20" alt="👌" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/F09F958A.png" width="20" height="20" alt="🕊" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/F09FA4A1.png" width="20" height="20" alt="🤡" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/F09FA5B1.png" width="20" height="20" alt="🥱" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/F09FA5B4.png" width="20" height="20" alt="🥴" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/F09F988D.png" width="20" height="20" alt="😍" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/F09F90B3.png" width="20" height="20" alt="🐳" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/E29DA4E2808DF09F94A5.png" width="20" height="20" alt="❤‍🔥" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/F09F8C9A.png" width="20" height="20" alt="🌚" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/F09F8CAD.png" width="20" height="20" alt="🌭" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/F09F92AF.png" width="20" height="20" alt="💯" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/F09FA4A3.png" width="20" height="20" alt="🤣" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/E29AA1.png" width="20" height="20" alt="⚡" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/F09F8D8C.png" width="20" height="20" alt="🍌" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/F09F8F86.png" width="20" height="20" alt="🏆" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/F09F9294.png" width="20" height="20" alt="💔" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/F09FA4A8.png" width="20" height="20" alt="🤨" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/F09F9890.png" width="20" height="20" alt="😐" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/F09F8D93.png" width="20" height="20" alt="🍓" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/F09F8DBE.png" width="20" height="20" alt="🍾" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/F09F928B.png" width="20" height="20" alt="💋" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/F09F9695.png" width="20" height="20" alt="🖕" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/F09F9888.png" width="20" height="20" alt="😈" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/F09F98B4.png" width="20" height="20" alt="😴" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/F09F98AD.png" width="20" height="20" alt="😭" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/F09FA493.png" width="20" height="20" alt="🤓" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/F09F91BB.png" width="20" height="20" alt="👻" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/F09F91A8E2808DF09F92BB.png" width="20" height="20" alt="👨‍💻" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/F09F9180.png" width="20" height="20" alt="👀" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/F09F8E83.png" width="20" height="20" alt="🎃" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/F09F9988.png" width="20" height="20" alt="🙈" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/F09F9887.png" width="20" height="20" alt="😇" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/F09F98A8.png" width="20" height="20" alt="😨" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/F09FA49D.png" width="20" height="20" alt="🤝" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/E29C8D.png" width="20" height="20" alt="✍" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/F09FA497.png" width="20" height="20" alt="🤗" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/F09FABA1.png" width="20" height="20" alt="🫡" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/F09F8E85.png" width="20" height="20" alt="🎅" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/F09F8E84.png" width="20" height="20" alt="🎄" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/E29883.png" width="20" height="20" alt="☃" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/F09F9285.png" width="20" height="20" alt="💅" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/F09FA4AA.png" width="20" height="20" alt="🤪" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/F09F97BF.png" width="20" height="20" alt="🗿" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/F09F8692.png" width="20" height="20" alt="🆒" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/F09F9298.png" width="20" height="20" alt="💘" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/F09F9989.png" width="20" height="20" alt="🙉" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/F09FA684.png" width="20" height="20" alt="🦄" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/F09F9898.png" width="20" height="20" alt="😘" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/F09F928A.png" width="20" height="20" alt="💊" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/F09F998A.png" width="20" height="20" alt="🙊" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/F09F988E.png" width="20" height="20" alt="😎" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/F09F91BE.png" width="20" height="20" alt="👾" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/F09FA4B7E2808DE29982.png" width="20" height="20" alt="🤷‍♂" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/F09FA4B7.png" width="20" height="20" alt="🤷" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/F09FA4B7E2808DE29980.png" width="20" height="20" alt="🤷‍♀" />&quot;, &quot;<img class="emoji" src="//telegram.org/img/emoji/40/F09F98A1.png" width="20" height="20" alt="😡" />&quot;</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="reactiontypecustomemoji" href="#reactiontypecustomemoji"><i class="anchor-icon"></i></a>ReactionTypeCustomEmoji</h4>
<p>The reaction is based on a custom emoji.</p>
<table class="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 reaction, always “custom_emoji”</td>
</tr>
<tr>
<td>custom_emoji_id</td>
<td>String</td>
<td>Custom emoji identifier</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="reactiontypepaid" href="#reactiontypepaid"><i class="anchor-icon"></i></a>ReactionTypePaid</h4>
<p>The reaction is paid.</p>
<table class="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 reaction, always “paid”</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="reactioncount" href="#reactioncount"><i class="anchor-icon"></i></a>ReactionCount</h4>
<p>Represents a reaction added to a message along with the number of times it was added.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>type</td>
<td><a href="#reactiontype">ReactionType</a></td>
<td>Type of the reaction</td>
</tr>
<tr>
<td>total_count</td>
<td>Integer</td>
<td>Number of times the reaction was added</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="messagereactionupdated" href="#messagereactionupdated"><i class="anchor-icon"></i></a>MessageReactionUpdated</h4>
<p>This object represents a change of a reaction on a message performed by a user.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>chat</td>
<td><a href="#chat">Chat</a></td>
<td>The chat containing the message the user reacted to</td>
</tr>
<tr>
<td>message_id</td>
<td>Integer</td>
<td>Unique identifier of the message inside the chat</td>
</tr>
<tr>
<td>user</td>
<td><a href="#user">User</a></td>
<td><em>Optional</em>. The user that changed the reaction, if the user isn&#39;t anonymous</td>
</tr>
<tr>
<td>actor_chat</td>
<td><a href="#chat">Chat</a></td>
<td><em>Optional</em>. The chat on behalf of which the reaction was changed, if the user is anonymous</td>
</tr>
<tr>
<td>date</td>
<td>Integer</td>
<td>Date of the change in Unix time</td>
</tr>
<tr>
<td>old_reaction</td>
<td>Array of <a href="#reactiontype">ReactionType</a></td>
<td>Previous list of reaction types that were set by the user</td>
</tr>
<tr>
<td>new_reaction</td>
<td>Array of <a href="#reactiontype">ReactionType</a></td>
<td>New list of reaction types that have been set by the user</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="messagereactioncountupdated" href="#messagereactioncountupdated"><i class="anchor-icon"></i></a>MessageReactionCountUpdated</h4>
<p>This object represents reaction changes on a message with anonymous reactions.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>chat</td>
<td><a href="#chat">Chat</a></td>
<td>The chat containing the message</td>
</tr>
<tr>
<td>message_id</td>
<td>Integer</td>
<td>Unique message identifier inside the chat</td>
</tr>
<tr>
<td>date</td>
<td>Integer</td>
<td>Date of the change in Unix time</td>
</tr>
<tr>
<td>reactions</td>
<td>Array of <a href="#reactioncount">ReactionCount</a></td>
<td>List of reactions that are present on the message</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="forumtopic" href="#forumtopic"><i class="anchor-icon"></i></a>ForumTopic</h4>
<p>This object represents a forum topic.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>message_thread_id</td>
<td>Integer</td>
<td>Unique identifier of the forum topic</td>
</tr>
<tr>
<td>name</td>
<td>String</td>
<td>Name of the topic</td>
</tr>
<tr>
<td>icon_color</td>
<td>Integer</td>
<td>Color of the topic icon in RGB format</td>
</tr>
<tr>
<td>icon_custom_emoji_id</td>
<td>String</td>
<td><em>Optional</em>. Unique identifier of the custom emoji shown as the topic icon</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="botcommand" href="#botcommand"><i class="anchor-icon"></i></a>BotCommand</h4>
<p>This object represents a bot command.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>command</td>
<td>String</td>
<td>Text of the command; 1-32 characters. Can contain only lowercase English letters, digits and underscores.</td>
</tr>
<tr>
<td>description</td>
<td>String</td>
<td>Description of the command; 1-256 characters.</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="botcommandscope" href="#botcommandscope"><i class="anchor-icon"></i></a>BotCommandScope</h4>
<p>This object represents the scope to which bot commands are applied. Currently, the following 7 scopes are supported:</p>
<ul>
<li><a href="#botcommandscopedefault">BotCommandScopeDefault</a></li>
<li><a href="#botcommandscopeallprivatechats">BotCommandScopeAllPrivateChats</a></li>
<li><a href="#botcommandscopeallgroupchats">BotCommandScopeAllGroupChats</a></li>
<li><a href="#botcommandscopeallchatadministrators">BotCommandScopeAllChatAdministrators</a></li>
<li><a href="#botcommandscopechat">BotCommandScopeChat</a></li>
<li><a href="#botcommandscopechatadministrators">BotCommandScopeChatAdministrators</a></li>
<li><a href="#botcommandscopechatmember">BotCommandScopeChatMember</a></li>
</ul>
<h4><a class="anchor" name="determining-list-of-commands" href="#determining-list-of-commands"><i class="anchor-icon"></i></a>Determining list of commands</h4>
<p>The following algorithm is used to determine the list of commands for a particular user viewing the bot menu. The first list of commands which is set is returned:</p>
<p><strong>Commands in the chat with the bot</strong></p>
<ul>
<li>botCommandScopeChat + language_code</li>
<li>botCommandScopeChat</li>
<li>botCommandScopeAllPrivateChats + language_code</li>
<li>botCommandScopeAllPrivateChats</li>
<li>botCommandScopeDefault + language_code</li>
<li>botCommandScopeDefault</li>
</ul>
<p><strong>Commands in group and supergroup chats</strong></p>
<ul>
<li>botCommandScopeChatMember + language_code</li>
<li>botCommandScopeChatMember</li>
<li>botCommandScopeChatAdministrators + language_code (administrators only)</li>
<li>botCommandScopeChatAdministrators (administrators only)</li>
<li>botCommandScopeChat + language_code</li>
<li>botCommandScopeChat</li>
<li>botCommandScopeAllChatAdministrators + language_code (administrators only)</li>
<li>botCommandScopeAllChatAdministrators (administrators only)</li>
<li>botCommandScopeAllGroupChats + language_code</li>
<li>botCommandScopeAllGroupChats</li>
<li>botCommandScopeDefault + language_code</li>
<li>botCommandScopeDefault</li>
</ul>
<h4><a class="anchor" name="botcommandscopedefault" href="#botcommandscopedefault"><i class="anchor-icon"></i></a>BotCommandScopeDefault</h4>
<p>Represents the default <a href="#botcommandscope">scope</a> of bot commands. Default commands are used if no commands with a <a href="#determining-list-of-commands">narrower scope</a> are specified for the user.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>type</td>
<td>String</td>
<td>Scope type, must be <em>default</em></td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="botcommandscopeallprivatechats" href="#botcommandscopeallprivatechats"><i class="anchor-icon"></i></a>BotCommandScopeAllPrivateChats</h4>
<p>Represents the <a href="#botcommandscope">scope</a> of bot commands, covering all private chats.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>type</td>
<td>String</td>
<td>Scope type, must be <em>all_private_chats</em></td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="botcommandscopeallgroupchats" href="#botcommandscopeallgroupchats"><i class="anchor-icon"></i></a>BotCommandScopeAllGroupChats</h4>
<p>Represents the <a href="#botcommandscope">scope</a> of bot commands, covering all group and supergroup chats.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>type</td>
<td>String</td>
<td>Scope type, must be <em>all_group_chats</em></td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="botcommandscopeallchatadministrators" href="#botcommandscopeallchatadministrators"><i class="anchor-icon"></i></a>BotCommandScopeAllChatAdministrators</h4>
<p>Represents the <a href="#botcommandscope">scope</a> of bot commands, covering all group and supergroup chat administrators.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>type</td>
<td>String</td>
<td>Scope type, must be <em>all_chat_administrators</em></td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="botcommandscopechat" href="#botcommandscopechat"><i class="anchor-icon"></i></a>BotCommandScopeChat</h4>
<p>Represents the <a href="#botcommandscope">scope</a> of bot commands, covering a specific chat.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>type</td>
<td>String</td>
<td>Scope type, must be <em>chat</em></td>
</tr>
<tr>
<td>chat_id</td>
<td>Integer or String</td>
<td>Unique identifier for the target chat or username of the target supergroup (in the format <code>@supergroupusername</code>)</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="botcommandscopechatadministrators" href="#botcommandscopechatadministrators"><i class="anchor-icon"></i></a>BotCommandScopeChatAdministrators</h4>
<p>Represents the <a href="#botcommandscope">scope</a> of bot commands, covering all administrators of a specific group or supergroup chat.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>type</td>
<td>String</td>
<td>Scope type, must be <em>chat_administrators</em></td>
</tr>
<tr>
<td>chat_id</td>
<td>Integer or String</td>
<td>Unique identifier for the target chat or username of the target supergroup (in the format <code>@supergroupusername</code>)</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="botcommandscopechatmember" href="#botcommandscopechatmember"><i class="anchor-icon"></i></a>BotCommandScopeChatMember</h4>
<p>Represents the <a href="#botcommandscope">scope</a> of bot commands, covering a specific member of a group or supergroup chat.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>type</td>
<td>String</td>
<td>Scope type, must be <em>chat_member</em></td>
</tr>
<tr>
<td>chat_id</td>
<td>Integer or String</td>
<td>Unique identifier for the target chat or username of the target supergroup (in the format <code>@supergroupusername</code>)</td>
</tr>
<tr>
<td>user_id</td>
<td>Integer</td>
<td>Unique identifier of the target user</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="botname" href="#botname"><i class="anchor-icon"></i></a>BotName</h4>
<p>This object represents the bot&#39;s name.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>name</td>
<td>String</td>
<td>The bot&#39;s name</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="botdescription" href="#botdescription"><i class="anchor-icon"></i></a>BotDescription</h4>
<p>This object represents the bot&#39;s description.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>description</td>
<td>String</td>
<td>The bot&#39;s description</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="botshortdescription" href="#botshortdescription"><i class="anchor-icon"></i></a>BotShortDescription</h4>
<p>This object represents the bot&#39;s short description.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>short_description</td>
<td>String</td>
<td>The bot&#39;s short description</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="menubutton" href="#menubutton"><i class="anchor-icon"></i></a>MenuButton</h4>
<p>This object describes the bot&#39;s menu button in a private chat. It should be one of</p>
<ul>
<li><a href="#menubuttoncommands">MenuButtonCommands</a></li>
<li><a href="#menubuttonwebapp">MenuButtonWebApp</a></li>
<li><a href="#menubuttondefault">MenuButtonDefault</a></li>
</ul>
<p>If a menu button other than <a href="#menubuttondefault">MenuButtonDefault</a> is set for a private chat, then it is applied in the chat. Otherwise the default menu button is applied. By default, the menu button opens the list of bot commands.</p>
<h4><a class="anchor" name="menubuttoncommands" href="#menubuttoncommands"><i class="anchor-icon"></i></a>MenuButtonCommands</h4>
<p>Represents a menu button, which opens the bot&#39;s list of commands.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>type</td>
<td>String</td>
<td>Type of the button, must be <em>commands</em></td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="menubuttonwebapp" href="#menubuttonwebapp"><i class="anchor-icon"></i></a>MenuButtonWebApp</h4>
<p>Represents a menu button, which launches a <a href="/bots/webapps">Web App</a>.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>type</td>
<td>String</td>
<td>Type of the button, must be <em>web_app</em></td>
</tr>
<tr>
<td>text</td>
<td>String</td>
<td>Text on the button</td>
</tr>
<tr>
<td>web_app</td>
<td><a href="#webappinfo">WebAppInfo</a></td>
<td>Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method <a href="#answerwebappquery">answerWebAppQuery</a>. Alternatively, a <code>t.me</code> link to a Web App of the bot can be specified in the object instead of the Web App&#39;s URL, in which case the Web App will be opened as if the user pressed the link.</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="menubuttondefault" href="#menubuttondefault"><i class="anchor-icon"></i></a>MenuButtonDefault</h4>
<p>Describes that no specific value for the menu button was set.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>type</td>
<td>String</td>
<td>Type of the button, must be <em>default</em></td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="chatboostsource" href="#chatboostsource"><i class="anchor-icon"></i></a>ChatBoostSource</h4>
<p>This object describes the source of a chat boost. It can be one of</p>
<ul>
<li><a href="#chatboostsourcepremium">ChatBoostSourcePremium</a></li>
<li><a href="#chatboostsourcegiftcode">ChatBoostSourceGiftCode</a></li>
<li><a href="#chatboostsourcegiveaway">ChatBoostSourceGiveaway</a></li>
</ul>
<h4><a class="anchor" name="chatboostsourcepremium" href="#chatboostsourcepremium"><i class="anchor-icon"></i></a>ChatBoostSourcePremium</h4>
<p>The boost was obtained by subscribing to Telegram Premium or by gifting a Telegram Premium subscription to another user.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>source</td>
<td>String</td>
<td>Source of the boost, always “premium”</td>
</tr>
<tr>
<td>user</td>
<td><a href="#user">User</a></td>
<td>User that boosted the chat</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="chatboostsourcegiftcode" href="#chatboostsourcegiftcode"><i class="anchor-icon"></i></a>ChatBoostSourceGiftCode</h4>
<p>The boost was obtained by the creation of Telegram Premium gift codes to boost a chat. Each such code boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>source</td>
<td>String</td>
<td>Source of the boost, always “gift_code”</td>
</tr>
<tr>
<td>user</td>
<td><a href="#user">User</a></td>
<td>User for which the gift code was created</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="chatboostsourcegiveaway" href="#chatboostsourcegiveaway"><i class="anchor-icon"></i></a>ChatBoostSourceGiveaway</h4>
<p>The boost was obtained by the creation of a Telegram Premium giveaway. This boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>source</td>
<td>String</td>
<td>Source of the boost, always “giveaway”</td>
</tr>
<tr>
<td>giveaway_message_id</td>
<td>Integer</td>
<td>Identifier of a message in the chat with the giveaway; the message could have been deleted already. May be 0 if the message isn&#39;t sent yet.</td>
</tr>
<tr>
<td>user</td>
<td><a href="#user">User</a></td>
<td><em>Optional</em>. User that won the prize in the giveaway if any</td>
</tr>
<tr>
<td>is_unclaimed</td>
<td>True</td>
<td><em>Optional</em>. True, if the giveaway was completed, but there was no user to win the prize</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="chatboost" href="#chatboost"><i class="anchor-icon"></i></a>ChatBoost</h4>
<p>This object contains information about a chat boost.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>boost_id</td>
<td>String</td>
<td>Unique identifier of the boost</td>
</tr>
<tr>
<td>add_date</td>
<td>Integer</td>
<td>Point in time (Unix timestamp) when the chat was boosted</td>
</tr>
<tr>
<td>expiration_date</td>
<td>Integer</td>
<td>Point in time (Unix timestamp) when the boost will automatically expire, unless the booster&#39;s Telegram Premium subscription is prolonged</td>
</tr>
<tr>
<td>source</td>
<td><a href="#chatboostsource">ChatBoostSource</a></td>
<td>Source of the added boost</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="chatboostupdated" href="#chatboostupdated"><i class="anchor-icon"></i></a>ChatBoostUpdated</h4>
<p>This object represents a boost added to a chat or changed.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>chat</td>
<td><a href="#chat">Chat</a></td>
<td>Chat which was boosted</td>
</tr>
<tr>
<td>boost</td>
<td><a href="#chatboost">ChatBoost</a></td>
<td>Information about the chat boost</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="chatboostremoved" href="#chatboostremoved"><i class="anchor-icon"></i></a>ChatBoostRemoved</h4>
<p>This object represents a boost removed from a chat.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>chat</td>
<td><a href="#chat">Chat</a></td>
<td>Chat which was boosted</td>
</tr>
<tr>
<td>boost_id</td>
<td>String</td>
<td>Unique identifier of the boost</td>
</tr>
<tr>
<td>remove_date</td>
<td>Integer</td>
<td>Point in time (Unix timestamp) when the boost was removed</td>
</tr>
<tr>
<td>source</td>
<td><a href="#chatboostsource">ChatBoostSource</a></td>
<td>Source of the removed boost</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="userchatboosts" href="#userchatboosts"><i class="anchor-icon"></i></a>UserChatBoosts</h4>
<p>This object represents a list of boosts added to a chat by a user.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>boosts</td>
<td>Array of <a href="#chatboost">ChatBoost</a></td>
<td>The list of boosts added to the chat by the user</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="businessconnection" href="#businessconnection"><i class="anchor-icon"></i></a>BusinessConnection</h4>
<p>Describes the connection of the bot with a business account.</p>
<table class="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 of the business connection</td>
</tr>
<tr>
<td>user</td>
<td><a href="#user">User</a></td>
<td>Business account user that created the business connection</td>
</tr>
<tr>
<td>user_chat_id</td>
<td>Integer</td>
<td>Identifier of a private chat with the user who created the business connection. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.</td>
</tr>
<tr>
<td>date</td>
<td>Integer</td>
<td>Date the connection was established in Unix time</td>
</tr>
<tr>
<td>can_reply</td>
<td>Boolean</td>
<td>True, if the bot can act on behalf of the business account in chats that were active in the last 24 hours</td>
</tr>
<tr>
<td>is_enabled</td>
<td>Boolean</td>
<td>True, if the connection is active</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="businessmessagesdeleted" href="#businessmessagesdeleted"><i class="anchor-icon"></i></a>BusinessMessagesDeleted</h4>
<p>This object is received when messages are deleted from a connected business account.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>business_connection_id</td>
<td>String</td>
<td>Unique identifier of the business connection</td>
</tr>
<tr>
<td>chat</td>
<td><a href="#chat">Chat</a></td>
<td>Information about a chat in the business account. The bot may not have access to the chat or the corresponding user.</td>
</tr>
<tr>
<td>message_ids</td>
<td>Array of Integer</td>
<td>The list of identifiers of deleted messages in the chat of the business account</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="responseparameters" href="#responseparameters"><i class="anchor-icon"></i></a>ResponseParameters</h4>
<p>Describes why a request was unsuccessful.</p>
<table class="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 have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.</td>
</tr>
<tr>
<td>retry_after</td>
<td>Integer</td>
<td><em>Optional</em>. In case of exceeding flood control, the number of seconds left to wait before the request can be repeated</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="inputmedia" href="#inputmedia"><i class="anchor-icon"></i></a>InputMedia</h4>
<p>This object represents the content of a media message to be sent. It should be one of</p>
<ul>
<li><a href="#inputmediaanimation">InputMediaAnimation</a></li>
<li><a href="#inputmediadocument">InputMediaDocument</a></li>
<li><a href="#inputmediaaudio">InputMediaAudio</a></li>
<li><a href="#inputmediaphoto">InputMediaPhoto</a></li>
<li><a href="#inputmediavideo">InputMediaVideo</a></li>
</ul>
<h4><a class="anchor" name="inputmediaphoto" href="#inputmediaphoto"><i class="anchor-icon"></i></a>InputMediaPhoto</h4>
<p>Represents a photo to be sent.</p>
<table class="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>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://&lt;file_attach_name&gt;” to upload a new one using multipart/form-data under &lt;file_attach_name&gt; name. <a href="#sending-files">More information 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 <a href="#formatting-options">formatting options</a> for more details.</td>
</tr>
<tr>
<td>caption_entities</td>
<td>Array of <a href="#messageentity">MessageEntity</a></td>
<td><em>Optional</em>. List of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em></td>
</tr>
<tr>
<td>show_caption_above_media</td>
<td>Boolean</td>
<td><em>Optional</em>. Pass <em>True</em>, if the caption must be shown above the message media</td>
</tr>
<tr>
<td>has_spoiler</td>
<td>Boolean</td>
<td><em>Optional</em>. Pass <em>True</em> if the photo needs to be covered with a spoiler animation</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="inputmediavideo" href="#inputmediavideo"><i class="anchor-icon"></i></a>InputMediaVideo</h4>
<p>Represents a video to be sent.</p>
<table class="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>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://&lt;file_attach_name&gt;” to upload a new one using multipart/form-data under &lt;file_attach_name&gt; name. <a href="#sending-files">More information on Sending Files »</a></td>
</tr>
<tr>
<td>thumbnail</td>
<td><a href="#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&#39;s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can&#39;t be reused and can be only uploaded as a new file, so you can pass “attach://&lt;file_attach_name&gt;” if the thumbnail was uploaded using multipart/form-data under &lt;file_attach_name&gt;. <a href="#sending-files">More information 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 <a href="#formatting-options">formatting options</a> for more details.</td>
</tr>
<tr>
<td>caption_entities</td>
<td>Array of <a href="#messageentity">MessageEntity</a></td>
<td><em>Optional</em>. List of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em></td>
</tr>
<tr>
<td>show_caption_above_media</td>
<td>Boolean</td>
<td><em>Optional</em>. Pass <em>True</em>, if the caption must be shown above the message media</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 in seconds</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>
</tr>
<tr>
<td>has_spoiler</td>
<td>Boolean</td>
<td><em>Optional</em>. Pass <em>True</em> if the video needs to be covered with a spoiler animation</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="inputmediaanimation" href="#inputmediaanimation"><i class="anchor-icon"></i></a>InputMediaAnimation</h4>
<p>Represents an animation file (GIF or H.264/MPEG-4 AVC video without sound) to be sent.</p>
<table class="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://&lt;file_attach_name&gt;” to upload a new one using multipart/form-data under &lt;file_attach_name&gt; name. <a href="#sending-files">More information on Sending Files »</a></td>
</tr>
<tr>
<td>thumbnail</td>
<td><a href="#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&#39;s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can&#39;t be reused and can be only uploaded as a new file, so you can pass “attach://&lt;file_attach_name&gt;” if the thumbnail was uploaded using multipart/form-data under &lt;file_attach_name&gt;. <a href="#sending-files">More information 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 <a href="#formatting-options">formatting options</a> for more details.</td>
</tr>
<tr>
<td>caption_entities</td>
<td>Array of <a href="#messageentity">MessageEntity</a></td>
<td><em>Optional</em>. List of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em></td>
</tr>
<tr>
<td>show_caption_above_media</td>
<td>Boolean</td>
<td><em>Optional</em>. Pass <em>True</em>, if the caption must be shown above the message media</td>
</tr>
<tr>
<td>width</td>
<td>Integer</td>
<td><em>Optional</em>. Animation width</td>
</tr>
<tr>
<td>height</td>
<td>Integer</td>
<td><em>Optional</em>. Animation height</td>
</tr>
<tr>
<td>duration</td>
<td>Integer</td>
<td><em>Optional</em>. Animation duration in seconds</td>
</tr>
<tr>
<td>has_spoiler</td>
<td>Boolean</td>
<td><em>Optional</em>. Pass <em>True</em> if the animation needs to be covered with a spoiler animation</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="inputmediaaudio" href="#inputmediaaudio"><i class="anchor-icon"></i></a>InputMediaAudio</h4>
<p>Represents an audio file to be treated as music to be sent.</p>
<table class="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://&lt;file_attach_name&gt;” to upload a new one using multipart/form-data under &lt;file_attach_name&gt; name. <a href="#sending-files">More information on Sending Files »</a></td>
</tr>
<tr>
<td>thumbnail</td>
<td><a href="#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&#39;s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can&#39;t be reused and can be only uploaded as a new file, so you can pass “attach://&lt;file_attach_name&gt;” if the thumbnail was uploaded using multipart/form-data under &lt;file_attach_name&gt;. <a href="#sending-files">More information 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 <a href="#formatting-options">formatting options</a> for more details.</td>
</tr>
<tr>
<td>caption_entities</td>
<td>Array of <a href="#messageentity">MessageEntity</a></td>
<td><em>Optional</em>. List of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em></td>
</tr>
<tr>
<td>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>
</tr>
<tr>
<td>title</td>
<td>String</td>
<td><em>Optional</em>. Title of the audio</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="inputmediadocument" href="#inputmediadocument"><i class="anchor-icon"></i></a>InputMediaDocument</h4>
<p>Represents a general file to be sent.</p>
<table class="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>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://&lt;file_attach_name&gt;” to upload a new one using multipart/form-data under &lt;file_attach_name&gt; name. <a href="#sending-files">More information on Sending Files »</a></td>
</tr>
<tr>
<td>thumbnail</td>
<td><a href="#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&#39;s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can&#39;t be reused and can be only uploaded as a new file, so you can pass “attach://&lt;file_attach_name&gt;” if the thumbnail was uploaded using multipart/form-data under &lt;file_attach_name&gt;. <a href="#sending-files">More information 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 <a href="#formatting-options">formatting options</a> for more details.</td>
</tr>
<tr>
<td>caption_entities</td>
<td>Array of <a href="#messageentity">MessageEntity</a></td>
<td><em>Optional</em>. List of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em></td>
</tr>
<tr>
<td>disable_content_type_detection</td>
<td>Boolean</td>
<td><em>Optional</em>. Disables automatic server-side content type detection for files uploaded using multipart/form-data. Always <em>True</em>, if the document is sent as part of an album.</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="inputfile" href="#inputfile"><i class="anchor-icon"></i></a>InputFile</h4>
<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>
<h4><a class="anchor" name="inputpaidmedia" href="#inputpaidmedia"><i class="anchor-icon"></i></a>InputPaidMedia</h4>
<p>This object describes the paid media to be sent. Currently, it can be one of</p>
<ul>
<li><a href="#inputpaidmediaphoto">InputPaidMediaPhoto</a></li>
<li><a href="#inputpaidmediavideo">InputPaidMediaVideo</a></li>
</ul>
<h4><a class="anchor" name="inputpaidmediaphoto" href="#inputpaidmediaphoto"><i class="anchor-icon"></i></a>InputPaidMediaPhoto</h4>
<p>The paid media to send is a photo.</p>
<table class="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 media, 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://&lt;file_attach_name&gt;” to upload a new one using multipart/form-data under &lt;file_attach_name&gt; name. <a href="#sending-files">More information on Sending Files »</a></td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="inputpaidmediavideo" href="#inputpaidmediavideo"><i class="anchor-icon"></i></a>InputPaidMediaVideo</h4>
<p>The paid media to send is a video.</p>
<table class="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 media, 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://&lt;file_attach_name&gt;” to upload a new one using multipart/form-data under &lt;file_attach_name&gt; name. <a href="#sending-files">More information on Sending Files »</a></td>
</tr>
<tr>
<td>thumbnail</td>
<td><a href="#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&#39;s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can&#39;t be reused and can be only uploaded as a new file, so you can pass “attach://&lt;file_attach_name&gt;” if the thumbnail was uploaded using multipart/form-data under &lt;file_attach_name&gt;. <a href="#sending-files">More information on Sending Files »</a></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 in seconds</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>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="sending-files" href="#sending-files"><i class="anchor-icon"></i></a>Sending files</h4>
<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&#39;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 <a href="#video">video</a> can&#39;t be <a href="#sendphoto">sent as a photo</a>, a <a href="#photosize">photo</a> can&#39;t be <a href="#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 <a href="#photosize">sizes</a>.</li>
<li><strong>file_id</strong> is unique for each individual bot and <strong>can&#39;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 <a href="#sendaudio">sendAudio</a>, etc.).</li>
<li>In <a href="#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 <a href="#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&#39;t guarantee that they will.</li>
</ul>
<h4><a class="anchor" name="accent-colors" href="#accent-colors"><i class="anchor-icon"></i></a>Accent colors</h4>
<p>Colors with identifiers 0 (red), 1 (orange), 2 (purple/violet), 3 (green), 4 (cyan), 5 (blue), 6 (pink) can be customized by app themes. Additionally, the following colors in RGB format are currently in use. </p>
<p><table class="table table-hover table-bordered">
<thead>
<tr><th>Color identifier</th><th>Light colors</th><th>Dark colors</th></tr>
</thead>
<tbody>
<tr><td>7</td><td>E15052 F9AE63</td><td>FF9380 992F37</td></tr>
<tr><td>8</td><td>E0802B FAC534</td><td>ECB04E C35714</td></tr>
<tr><td>9</td><td>A05FF3 F48FFF</td><td>C697FF 5E31C8</td></tr>
<tr><td>10</td><td>27A910 A7DC57</td><td>A7EB6E 167E2D</td></tr>
<tr><td>11</td><td>27ACCE 82E8D6</td><td>40D8D0 045C7F</td></tr>
<tr><td>12</td><td>3391D4 7DD3F0</td><td>52BFFF 0B5494</td></tr>
<tr><td>13</td><td>DD4371 FFBE9F</td><td>FF86A6 8E366E</td></tr>
<tr><td>14</td><td>247BED F04856 FFFFFF</td><td>3FA2FE E5424F FFFFFF</td></tr>
<tr><td>15</td><td>D67722 1EA011 FFFFFF</td><td>FF905E 32A527 FFFFFF</td></tr>
<tr><td>16</td><td>179E42 E84A3F FFFFFF</td><td>66D364 D5444F FFFFFF</td></tr>
<tr><td>17</td><td>2894AF 6FC456 FFFFFF</td><td>22BCE2 3DA240 FFFFFF</td></tr>
<tr><td>18</td><td>0C9AB3 FFAD95 FFE6B5</td><td>22BCE2 FF9778 FFDA6B</td></tr>
<tr><td>19</td><td>7757D6 F79610 FFDE8E</td><td>9791FF F2731D FFDB59</td></tr>
<tr><td>20</td><td>1585CF F2AB1D FFFFFF</td><td>3DA6EB EEA51D FFFFFF</td></tr>
</tbody>
</table></p>
<h4><a class="anchor" name="profile-accent-colors" href="#profile-accent-colors"><i class="anchor-icon"></i></a>Profile accent colors</h4>
<p>Currently, the following colors in RGB format are in use for profile backgrounds. </p>
<p><table class="table table-hover table-bordered">
<thead>
<tr><th>Color identifier</th><th>Light colors</th><th>Dark colors</th></tr>
</thead>
<tbody>
<tr><td>0</td><td>BA5650</td><td>9C4540</td></tr>
<tr><td>1</td><td>C27C3E</td><td>945E2C</td></tr>
<tr><td>2</td><td>956AC8</td><td>715099</td></tr>
<tr><td>3</td><td>49A355</td><td>33713B</td></tr>
<tr><td>4</td><td>3E97AD</td><td>387E87</td></tr>
<tr><td>5</td><td>5A8FBB</td><td>477194</td></tr>
<tr><td>6</td><td>B85378</td><td>944763</td></tr>
<tr><td>7</td><td>7F8B95</td><td>435261</td></tr>
<tr><td>8</td><td>C9565D D97C57</td><td>994343 AC583E</td></tr>
<tr><td>9</td><td>CF7244 CC9433</td><td>8F552F A17232</td></tr>
<tr><td>10</td><td>9662D4 B966B6</td><td>634691 9250A2</td></tr>
<tr><td>11</td><td>3D9755 89A650</td><td>296A43 5F8F44</td></tr>
<tr><td>12</td><td>3D95BA 50AD98</td><td>306C7C 3E987E</td></tr>
<tr><td>13</td><td>538BC2 4DA8BD</td><td>38618C 458BA1</td></tr>
<tr><td>14</td><td>B04F74 D1666D</td><td>884160 A65259</td></tr>
<tr><td>15</td><td>637482 7B8A97</td><td>53606E 384654</td></tr>
</tbody>
</table></p>
<h4><a class="anchor" name="inline-mode-objects" href="#inline-mode-objects"><i class="anchor-icon"></i></a>Inline mode objects</h4>
<p>Objects and methods used in the inline mode are described in the <a href="#inline-mode">Inline mode section</a>.</p>
<h3><a class="anchor" name="available-methods" href="#available-methods"><i class="anchor-icon"></i></a>Available methods</h3>
<blockquote>
<p>All methods in the Bot API are case-insensitive. We support <strong>GET</strong> and <strong>POST</strong> HTTP methods. Use either <a href="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>
</blockquote>
<h4><a class="anchor" name="getme" href="#getme"><i class="anchor-icon"></i></a>getMe</h4>
<p>A simple method for testing your bot&#39;s authentication token. Requires no parameters. Returns basic information about the bot in form of a <a href="#user">User</a> object.</p>
<h4><a class="anchor" name="logout" href="#logout"><i class="anchor-icon"></i></a>logOut</h4>
<p>Use this method to log out from the cloud Bot API server before launching the bot locally. You <strong>must</strong> log out the bot before running it locally, otherwise there is no guarantee that the bot will receive updates. After a successful call, you can immediately log in on a local server, but will not be able to log in back to the cloud Bot API server for 10 minutes. Returns <em>True</em> on success. Requires no parameters.</p>
<h4><a class="anchor" name="close" href="#close"><i class="anchor-icon"></i></a>close</h4>
<p>Use this method to close the bot instance before moving it from one local server to another. You need to delete the webhook before calling this method to ensure that the bot isn&#39;t launched again after server restart. The method will return error 429 in the first 10 minutes after the bot is launched. Returns <em>True</em> on success. Requires no parameters.</p>
<h4><a class="anchor" name="sendmessage" href="#sendmessage"><i class="anchor-icon"></i></a>sendMessage</h4>
<p>Use this method to send text messages. On success, the sent <a href="#message">Message</a> is returned.</p>
<table class="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>business_connection_id</td>
<td>String</td>
<td>Optional</td>
<td>Unique identifier of the business connection on behalf of which the message will be sent</td>
</tr>
<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_thread_id</td>
<td>Integer</td>
<td>Optional</td>
<td>Unique identifier for the target message thread (topic) of the forum; for forum supergroups only</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 <a href="#formatting-options">formatting options</a> for more details.</td>
</tr>
<tr>
<td>entities</td>
<td>Array of <a href="#messageentity">MessageEntity</a></td>
<td>Optional</td>
<td>A JSON-serialized list of special entities that appear in message text, which can be specified instead of <em>parse_mode</em></td>
</tr>
<tr>
<td>link_preview_options</td>
<td><a href="#linkpreviewoptions">LinkPreviewOptions</a></td>
<td>Optional</td>
<td>Link preview generation options for the message</td>
</tr>
<tr>
<td>disable_notification</td>
<td>Boolean</td>
<td>Optional</td>
<td>Sends the message <a href="https://telegram.org/blog/channels-2-0#silent-messages">silently</a>. Users will receive a notification with no sound.</td>
</tr>
<tr>
<td>protect_content</td>
<td>Boolean</td>
<td>Optional</td>
<td>Protects the contents of the sent message from forwarding and saving</td>
</tr>
<tr>
<td>message_effect_id</td>
<td>String</td>
<td>Optional</td>
<td>Unique identifier of the message effect to be added to the message; for private chats only</td>
</tr>
<tr>
<td>reply_parameters</td>
<td><a href="#replyparameters">ReplyParameters</a></td>
<td>Optional</td>
<td>Description of the message to reply to</td>
</tr>
<tr>
<td>reply_markup</td>
<td><a href="#inlinekeyboardmarkup">InlineKeyboardMarkup</a> or <a href="#replykeyboardmarkup">ReplyKeyboardMarkup</a> or <a href="#replykeyboardremove">ReplyKeyboardRemove</a> or <a href="#forcereply">ForceReply</a></td>
<td>Optional</td>
<td>Additional interface options. A JSON-serialized object for an <a href="/bots/features#inline-keyboards">inline keyboard</a>, <a href="/bots/features#keyboards">custom reply keyboard</a>, instructions to remove a reply keyboard or to force a reply from the user</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="formatting-options" href="#formatting-options"><i class="anchor-icon"></i></a>Formatting options</h4>
<p>The Bot API supports basic formatting for messages. You can use bold, italic, underlined, strikethrough, spoiler text, block quotations as well as inline links and pre-formatted code in your bots&#39; messages. Telegram clients will render them accordingly. You can specify text entities directly, or use markdown-style or HTML-style formatting.</p>
<p>Note that Telegram clients will display an <strong>alert</strong> to the user before opening an inline link (&#39;Open this link?&#39; together with the full URL).</p>
<p>Message entities can be nested, providing following restrictions are met:<br>- If two entities have common characters, then one of them is fully contained inside another.<br>- <em>bold</em>, <em>italic</em>, <em>underline</em>, <em>strikethrough</em>, and <em>spoiler</em> entities can contain and can be part of any other entities, except <em>pre</em> and <em>code</em>.<br>- <em>blockquote</em> and <em>expandable_blockquote</em> entities can&#39;t be nested.<br>- All other entities can&#39;t contain each other.</p>
<p>Links <code>tg://user?id=&lt;user_id&gt;</code> can be used to mention a user by their identifier without using a username. Please note:</p>
<ul>
<li>These links will work <strong>only</strong> if they are used inside an inline link or in an inline keyboard button. For example, they will not work, when used in a message text.</li>
<li>Unless the user is a member of the chat where they were mentioned, these mentions are only guaranteed to work if the user has contacted the bot in private in the past or has sent a callback query to the bot via an inline button and doesn&#39;t have Forwarded Messages privacy enabled for the bot.</li>
</ul>
<p>You can find the list of programming and markup languages for which syntax highlighting is supported at <a href="https://github.com/TelegramMessenger/libprisma#supported-languages">libprisma#supported-languages</a>.</p>
<h6><a class="anchor" name="markdownv2-style" href="#markdownv2-style"><i class="anchor-icon"></i></a>MarkdownV2 style</h6>
<p>To use this mode, pass <em>MarkdownV2</em> in the <em>parse_mode</em> field. Use the following syntax in your message:</p>
<pre><code>*bold \*text*
_italic \*text_
__underline__
~strikethrough~
||spoiler||
*bold _italic bold ~italic bold strikethrough ||italic bold strikethrough spoiler||~ __underline italic bold___ bold*
[inline URL](http://www.example.com/)
[inline mention of a user](tg://user?id=123456789)
![<img class="emoji" src="//telegram.org/img/emoji/40/F09F918D.png" width="20" height="20" alt="👍" />](tg://emoji?id=5368324170671202286)
`inline fixed-width code`
```
pre-formatted fixed-width code block
```
```python
pre-formatted fixed-width code block written in the Python programming language
```
&gt;Block quotation started
&gt;Block quotation continued
&gt;Block quotation continued
&gt;Block quotation continued
&gt;The last line of the block quotation
**&gt;The expandable block quotation started right after the previous block quotation
&gt;It is separated from the previous block quotation by an empty bold entity
&gt;Expandable block quotation continued
&gt;Hidden by default part of the expandable block quotation started
&gt;Expandable block quotation continued
&gt;The last line of the expandable block quotation with the expandability mark||</code></pre>
<p>Please note:</p>
<ul>
<li>Any character with code between 1 and 126 inclusively can be escaped anywhere with a preceding &#39;\&#39; character, in which case it is treated as an ordinary character and not a part of the markup. This implies that &#39;\&#39; character usually must be escaped with a preceding &#39;\&#39; character.</li>
<li>Inside <code>pre</code> and <code>code</code> entities, all &#39;`&#39; and &#39;\&#39; characters must be escaped with a preceding &#39;\&#39; character.</li>
<li>Inside the <code>(...)</code> part of the inline link and custom emoji definition, all &#39;)&#39; and &#39;\&#39; must be escaped with a preceding &#39;\&#39; character.</li>
<li>In all other places characters &#39;_&#39;, &#39;*&#39;, &#39;[&#39;, &#39;]&#39;, &#39;(&#39;, &#39;)&#39;, &#39;~&#39;, &#39;`&#39;, &#39;&gt;&#39;, &#39;#&#39;, &#39;+&#39;, &#39;-&#39;, &#39;=&#39;, &#39;|&#39;, &#39;{&#39;, &#39;}&#39;, &#39;.&#39;, &#39;!&#39; must be escaped with the preceding character &#39;\&#39;.</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 an <code>underline</code> entity, so instead of <code>___italic underline___</code> use <code>___italic underline_**__</code>, adding an empty bold entity as a separator.</li>
<li>A valid emoji must be provided as an alternative value for the custom emoji. The emoji will be shown instead of the custom emoji in places where a custom emoji cannot be displayed (e.g., system notifications) or if the message is forwarded by a non-premium user. It is recommended to use the emoji from the <strong>emoji</strong> field of the custom emoji <a href="#sticker">sticker</a>.</li>
<li>Custom emoji entities can only be used by bots that purchased additional usernames on <a href="https://fragment.com">Fragment</a>.</li>
</ul>
<h6><a class="anchor" name="html-style" href="#html-style"><i class="anchor-icon"></i></a>HTML style</h6>
<p>To use this mode, pass <em>HTML</em> in the <em>parse_mode</em> field. The following tags are currently supported:</p>
<pre><code>&lt;b&gt;bold&lt;/b&gt;, &lt;strong&gt;bold&lt;/strong&gt;
&lt;i&gt;italic&lt;/i&gt;, &lt;em&gt;italic&lt;/em&gt;
&lt;u&gt;underline&lt;/u&gt;, &lt;ins&gt;underline&lt;/ins&gt;
&lt;s&gt;strikethrough&lt;/s&gt;, &lt;strike&gt;strikethrough&lt;/strike&gt;, &lt;del&gt;strikethrough&lt;/del&gt;
&lt;span class=&quot;tg-spoiler&quot;&gt;spoiler&lt;/span&gt;, &lt;tg-spoiler&gt;spoiler&lt;/tg-spoiler&gt;
&lt;b&gt;bold &lt;i&gt;italic bold &lt;s&gt;italic bold strikethrough &lt;span class=&quot;tg-spoiler&quot;&gt;italic bold strikethrough spoiler&lt;/span&gt;&lt;/s&gt; &lt;u&gt;underline italic bold&lt;/u&gt;&lt;/i&gt; bold&lt;/b&gt;
&lt;a href=&quot;http://www.example.com/&quot;&gt;inline URL&lt;/a&gt;
&lt;a href=&quot;tg://user?id=123456789&quot;&gt;inline mention of a user&lt;/a&gt;
&lt;tg-emoji emoji-id=&quot;5368324170671202286&quot;&gt;<img class="emoji" src="//telegram.org/img/emoji/40/F09F918D.png" width="20" height="20" alt="👍" />&lt;/tg-emoji&gt;
&lt;code&gt;inline fixed-width code&lt;/code&gt;
&lt;pre&gt;pre-formatted fixed-width code block&lt;/pre&gt;
&lt;pre&gt;&lt;code class=&quot;language-python&quot;&gt;pre-formatted fixed-width code block written in the Python programming language&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;Block quotation started\nBlock quotation continued\nThe last line of the block quotation&lt;/blockquote&gt;
&lt;blockquote expandable&gt;Expandable block quotation started\nExpandable block quotation continued\nExpandable block quotation continued\nHidden by default part of the block quotation started\nExpandable block quotation continued\nThe last line of the block quotation&lt;/blockquote&gt;</code></pre>
<p>Please note:</p>
<ul>
<li>Only the tags mentioned above are currently supported.</li>
<li>All <code>&lt;</code>, <code>&gt;</code> and <code>&amp;</code> symbols that are not a part of a tag or an HTML entity must be replaced with the corresponding HTML entities (<code>&lt;</code> with <code>&amp;lt;</code>, <code>&gt;</code> with <code>&amp;gt;</code> and <code>&amp;</code> with <code>&amp;amp;</code>).</li>
<li>All numerical HTML entities are supported.</li>
<li>The API currently supports only the following named HTML entities: <code>&amp;lt;</code>, <code>&amp;gt;</code>, <code>&amp;amp;</code> and <code>&amp;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&#39;t be specified for standalone <code>code</code> tags.</li>
<li>A valid emoji must be used as the content of the <code>tg-emoji</code> tag. The emoji will be shown instead of the custom emoji in places where a custom emoji cannot be displayed (e.g., system notifications) or if the message is forwarded by a non-premium user. It is recommended to use the emoji from the <strong>emoji</strong> field of the custom emoji <a href="#sticker">sticker</a>.</li>
<li>Custom emoji entities can only be used by bots that purchased additional usernames on <a href="https://fragment.com">Fragment</a>.</li>
</ul>
<h6><a class="anchor" name="markdown-style" href="#markdown-style"><i class="anchor-icon"></i></a>Markdown style</h6>
<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 <a href="#markdownv2-style">MarkdownV2</a> instead.</li>
<li>There is no way to specify “underline”, “strikethrough”, “spoiler”, “blockquote”, “expandable_blockquote” and “custom_emoji” entities, use parse mode <a href="#markdownv2-style">MarkdownV2</a> instead.</li>
<li>To escape characters &#39;_&#39;, &#39;*&#39;, &#39;`&#39;, &#39;[&#39; outside of an entity, prepend the characters &#39;\&#39; 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>
</ul>
<h4><a class="anchor" name="forwardmessage" href="#forwardmessage"><i class="anchor-icon"></i></a>forwardMessage</h4>
<p>Use this method to forward messages of any kind. Service messages and messages with protected content can&#39;t be forwarded. On success, the sent <a href="#message">Message</a> is returned.</p>
<table class="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_thread_id</td>
<td>Integer</td>
<td>Optional</td>
<td>Unique identifier for the target message thread (topic) of the forum; for forum supergroups only</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 <a href="https://telegram.org/blog/channels-2-0#silent-messages">silently</a>. Users will receive a notification with no sound.</td>
</tr>
<tr>
<td>protect_content</td>
<td>Boolean</td>
<td>Optional</td>
<td>Protects the contents of the forwarded message from forwarding and saving</td>
</tr>
<tr>
<td>message_id</td>
<td>Integer</td>
<td>Yes</td>
<td>Message identifier in the chat specified in <em>from_chat_id</em></td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="forwardmessages" href="#forwardmessages"><i class="anchor-icon"></i></a>forwardMessages</h4>
<p>Use this method to forward multiple messages of any kind. If some of the specified messages can&#39;t be found or forwarded, they are skipped. Service messages and messages with protected content can&#39;t be forwarded. Album grouping is kept for forwarded messages. On success, an array of <a href="#messageid">MessageId</a> of the sent messages is returned.</p>
<table class="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_thread_id</td>
<td>Integer</td>
<td>Optional</td>
<td>Unique identifier for the target message thread (topic) of the forum; for forum supergroups only</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 messages were sent (or channel username in the format <code>@channelusername</code>)</td>
</tr>
<tr>
<td>message_ids</td>
<td>Array of Integer</td>
<td>Yes</td>
<td>A JSON-serialized list of 1-100 identifiers of messages in the chat <em>from_chat_id</em> to forward. The identifiers must be specified in a strictly increasing order.</td>
</tr>
<tr>
<td>disable_notification</td>
<td>Boolean</td>
<td>Optional</td>
<td>Sends the messages <a href="https://telegram.org/blog/channels-2-0#silent-messages">silently</a>. Users will receive a notification with no sound.</td>
</tr>
<tr>
<td>protect_content</td>
<td>Boolean</td>
<td>Optional</td>
<td>Protects the contents of the forwarded messages from forwarding and saving</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="copymessage" href="#copymessage"><i class="anchor-icon"></i></a>copyMessage</h4>
<p>Use this method to copy messages of any kind. Service messages, paid media messages, giveaway messages, giveaway winners messages, and invoice messages can&#39;t be copied. A quiz <a href="#poll">poll</a> can be copied only if the value of the field <em>correct_option_id</em> is known to the bot. The method is analogous to the method <a href="#forwardmessage">forwardMessage</a>, but the copied message doesn&#39;t have a link to the original message. Returns the <a href="#messageid">MessageId</a> of the sent message on success.</p>
<table class="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_thread_id</td>
<td>Integer</td>
<td>Optional</td>
<td>Unique identifier for the target message thread (topic) of the forum; for forum supergroups only</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>message_id</td>
<td>Integer</td>
<td>Yes</td>
<td>Message identifier in the chat specified in <em>from_chat_id</em></td>
</tr>
<tr>
<td>caption</td>
<td>String</td>
<td>Optional</td>
<td>New caption for media, 0-1024 characters after entities parsing. If not specified, the original caption is kept</td>
</tr>
<tr>
<td>parse_mode</td>
<td>String</td>
<td>Optional</td>
<td>Mode for parsing entities in the new caption. See <a href="#formatting-options">formatting options</a> for more details.</td>
</tr>
<tr>
<td>caption_entities</td>
<td>Array of <a href="#messageentity">MessageEntity</a></td>
<td>Optional</td>
<td>A JSON-serialized list of special entities that appear in the new caption, which can be specified instead of <em>parse_mode</em></td>
</tr>
<tr>
<td>show_caption_above_media</td>
<td>Boolean</td>
<td>Optional</td>
<td>Pass <em>True</em>, if the caption must be shown above the message media. Ignored if a new caption isn&#39;t specified.</td>
</tr>
<tr>
<td>disable_notification</td>
<td>Boolean</td>
<td>Optional</td>
<td>Sends the message <a href="https://telegram.org/blog/channels-2-0#silent-messages">silently</a>. Users will receive a notification with no sound.</td>
</tr>
<tr>
<td>protect_content</td>
<td>Boolean</td>
<td>Optional</td>
<td>Protects the contents of the sent message from forwarding and saving</td>
</tr>
<tr>
<td>reply_parameters</td>
<td><a href="#replyparameters">ReplyParameters</a></td>
<td>Optional</td>
<td>Description of the message to reply to</td>
</tr>
<tr>
<td>reply_markup</td>
<td><a href="#inlinekeyboardmarkup">InlineKeyboardMarkup</a> or <a href="#replykeyboardmarkup">ReplyKeyboardMarkup</a> or <a href="#replykeyboardremove">ReplyKeyboardRemove</a> or <a href="#forcereply">ForceReply</a></td>
<td>Optional</td>
<td>Additional interface options. A JSON-serialized object for an <a href="/bots/features#inline-keyboards">inline keyboard</a>, <a href="/bots/features#keyboards">custom reply keyboard</a>, instructions to remove a reply keyboard or to force a reply from the user</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="copymessages" href="#copymessages"><i class="anchor-icon"></i></a>copyMessages</h4>
<p>Use this method to copy messages of any kind. If some of the specified messages can&#39;t be found or copied, they are skipped. Service messages, paid media messages, giveaway messages, giveaway winners messages, and invoice messages can&#39;t be copied. A quiz <a href="#poll">poll</a> can be copied only if the value of the field <em>correct_option_id</em> is known to the bot. The method is analogous to the method <a href="#forwardmessages">forwardMessages</a>, but the copied messages don&#39;t have a link to the original message. Album grouping is kept for copied messages. On success, an array of <a href="#messageid">MessageId</a> of the sent messages is returned.</p>
<table class="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_thread_id</td>
<td>Integer</td>
<td>Optional</td>
<td>Unique identifier for the target message thread (topic) of the forum; for forum supergroups only</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 messages were sent (or channel username in the format <code>@channelusername</code>)</td>
</tr>
<tr>
<td>message_ids</td>
<td>Array of Integer</td>
<td>Yes</td>
<td>A JSON-serialized list of 1-100 identifiers of messages in the chat <em>from_chat_id</em> to copy. The identifiers must be specified in a strictly increasing order.</td>
</tr>
<tr>
<td>disable_notification</td>
<td>Boolean</td>
<td>Optional</td>
<td>Sends the messages <a href="https://telegram.org/blog/channels-2-0#silent-messages">silently</a>. Users will receive a notification with no sound.</td>
</tr>
<tr>
<td>protect_content</td>
<td>Boolean</td>
<td>Optional</td>
<td>Protects the contents of the sent messages from forwarding and saving</td>
</tr>
<tr>
<td>remove_caption</td>
<td>Boolean</td>
<td>Optional</td>
<td>Pass <em>True</em> to copy the messages without their captions</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="sendphoto" href="#sendphoto"><i class="anchor-icon"></i></a>sendPhoto</h4>
<p>Use this method to send photos. On success, the sent <a href="#message">Message</a> is returned.</p>
<table class="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>business_connection_id</td>
<td>String</td>
<td>Optional</td>
<td>Unique identifier of the business connection on behalf of which the message will be sent</td>
</tr>
<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_thread_id</td>
<td>Integer</td>
<td>Optional</td>
<td>Unique identifier for the target message thread (topic) of the forum; for forum supergroups only</td>
</tr>
<tr>
<td>photo</td>
<td><a href="#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. The photo must be at most 10 MB in size. The photo&#39;s width and height must not exceed 10000 in total. Width and height ratio must be at most 20. <a href="#sending-files">More information 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 <a href="#formatting-options">formatting options</a> for more details.</td>
</tr>
<tr>
<td>caption_entities</td>
<td>Array of <a href="#messageentity">MessageEntity</a></td>
<td>Optional</td>
<td>A JSON-serialized list of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em></td>
</tr>
<tr>
<td>show_caption_above_media</td>
<td>Boolean</td>
<td>Optional</td>
<td>Pass <em>True</em>, if the caption must be shown above the message media</td>
</tr>
<tr>
<td>has_spoiler</td>
<td>Boolean</td>
<td>Optional</td>
<td>Pass <em>True</em> if the photo needs to be covered with a spoiler animation</td>
</tr>
<tr>
<td>disable_notification</td>
<td>Boolean</td>
<td>Optional</td>
<td>Sends the message <a href="https://telegram.org/blog/channels-2-0#silent-messages">silently</a>. Users will receive a notification with no sound.</td>
</tr>
<tr>
<td>protect_content</td>
<td>Boolean</td>
<td>Optional</td>
<td>Protects the contents of the sent message from forwarding and saving</td>
</tr>
<tr>
<td>message_effect_id</td>
<td>String</td>
<td>Optional</td>
<td>Unique identifier of the message effect to be added to the message; for private chats only</td>
</tr>
<tr>
<td>reply_parameters</td>
<td><a href="#replyparameters">ReplyParameters</a></td>
<td>Optional</td>
<td>Description of the message to reply to</td>
</tr>
<tr>
<td>reply_markup</td>
<td><a href="#inlinekeyboardmarkup">InlineKeyboardMarkup</a> or <a href="#replykeyboardmarkup">ReplyKeyboardMarkup</a> or <a href="#replykeyboardremove">ReplyKeyboardRemove</a> or <a href="#forcereply">ForceReply</a></td>
<td>Optional</td>
<td>Additional interface options. A JSON-serialized object for an <a href="/bots/features#inline-keyboards">inline keyboard</a>, <a href="/bots/features#keyboards">custom reply keyboard</a>, instructions to remove a reply keyboard or to force a reply from the user</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="sendaudio" href="#sendaudio"><i class="anchor-icon"></i></a>sendAudio</h4>
<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 <a href="#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 <a href="#sendvoice">sendVoice</a> method instead.</p>
<table class="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>business_connection_id</td>
<td>String</td>
<td>Optional</td>
<td>Unique identifier of the business connection on behalf of which the message will be sent</td>
</tr>
<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_thread_id</td>
<td>Integer</td>
<td>Optional</td>
<td>Unique identifier for the target message thread (topic) of the forum; for forum supergroups only</td>
</tr>
<tr>
<td>audio</td>
<td><a href="#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. <a href="#sending-files">More information 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 <a href="#formatting-options">formatting options</a> for more details.</td>
</tr>
<tr>
<td>caption_entities</td>
<td>Array of <a href="#messageentity">MessageEntity</a></td>
<td>Optional</td>
<td>A JSON-serialized list of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em></td>
</tr>
<tr>
<td>duration</td>
<td>Integer</td>
<td>Optional</td>
<td>Duration of the 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>thumbnail</td>
<td><a href="#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&#39;s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can&#39;t be reused and can be only uploaded as a new file, so you can pass “attach://&lt;file_attach_name&gt;” if the thumbnail was uploaded using multipart/form-data under &lt;file_attach_name&gt;. <a href="#sending-files">More information on Sending Files »</a></td>
</tr>
<tr>
<td>disable_notification</td>
<td>Boolean</td>
<td>Optional</td>
<td>Sends the message <a href="https://telegram.org/blog/channels-2-0#silent-messages">silently</a>. Users will receive a notification with no sound.</td>
</tr>
<tr>
<td>protect_content</td>
<td>Boolean</td>
<td>Optional</td>
<td>Protects the contents of the sent message from forwarding and saving</td>
</tr>
<tr>
<td>message_effect_id</td>
<td>String</td>
<td>Optional</td>
<td>Unique identifier of the message effect to be added to the message; for private chats only</td>
</tr>
<tr>
<td>reply_parameters</td>
<td><a href="#replyparameters">ReplyParameters</a></td>
<td>Optional</td>
<td>Description of the message to reply to</td>
</tr>
<tr>
<td>reply_markup</td>
<td><a href="#inlinekeyboardmarkup">InlineKeyboardMarkup</a> or <a href="#replykeyboardmarkup">ReplyKeyboardMarkup</a> or <a href="#replykeyboardremove">ReplyKeyboardRemove</a> or <a href="#forcereply">ForceReply</a></td>
<td>Optional</td>
<td>Additional interface options. A JSON-serialized object for an <a href="/bots/features#inline-keyboards">inline keyboard</a>, <a href="/bots/features#keyboards">custom reply keyboard</a>, instructions to remove a reply keyboard or to force a reply from the user</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="senddocument" href="#senddocument"><i class="anchor-icon"></i></a>sendDocument</h4>
<p>Use this method to send general files. On success, the sent <a href="#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>
<table class="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>business_connection_id</td>
<td>String</td>
<td>Optional</td>
<td>Unique identifier of the business connection on behalf of which the message will be sent</td>
</tr>
<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_thread_id</td>
<td>Integer</td>
<td>Optional</td>
<td>Unique identifier for the target message thread (topic) of the forum; for forum supergroups only</td>
</tr>
<tr>
<td>document</td>
<td><a href="#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. <a href="#sending-files">More information on Sending Files »</a></td>
</tr>
<tr>
<td>thumbnail</td>
<td><a href="#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&#39;s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can&#39;t be reused and can be only uploaded as a new file, so you can pass “attach://&lt;file_attach_name&gt;” if the thumbnail was uploaded using multipart/form-data under &lt;file_attach_name&gt;. <a href="#sending-files">More information 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 <a href="#formatting-options">formatting options</a> for more details.</td>
</tr>
<tr>
<td>caption_entities</td>
<td>Array of <a href="#messageentity">MessageEntity</a></td>
<td>Optional</td>
<td>A JSON-serialized list of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em></td>
</tr>
<tr>
<td>disable_content_type_detection</td>
<td>Boolean</td>
<td>Optional</td>
<td>Disables automatic server-side content type detection for files uploaded using multipart/form-data</td>
</tr>
<tr>
<td>disable_notification</td>
<td>Boolean</td>
<td>Optional</td>
<td>Sends the message <a href="https://telegram.org/blog/channels-2-0#silent-messages">silently</a>. Users will receive a notification with no sound.</td>
</tr>
<tr>
<td>protect_content</td>
<td>Boolean</td>
<td>Optional</td>
<td>Protects the contents of the sent message from forwarding and saving</td>
</tr>
<tr>
<td>message_effect_id</td>
<td>String</td>
<td>Optional</td>
<td>Unique identifier of the message effect to be added to the message; for private chats only</td>
</tr>
<tr>
<td>reply_parameters</td>
<td><a href="#replyparameters">ReplyParameters</a></td>
<td>Optional</td>
<td>Description of the message to reply to</td>
</tr>
<tr>
<td>reply_markup</td>
<td><a href="#inlinekeyboardmarkup">InlineKeyboardMarkup</a> or <a href="#replykeyboardmarkup">ReplyKeyboardMarkup</a> or <a href="#replykeyboardremove">ReplyKeyboardRemove</a> or <a href="#forcereply">ForceReply</a></td>
<td>Optional</td>
<td>Additional interface options. A JSON-serialized object for an <a href="/bots/features#inline-keyboards">inline keyboard</a>, <a href="/bots/features#keyboards">custom reply keyboard</a>, instructions to remove a reply keyboard or to force a reply from the user</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="sendvideo" href="#sendvideo"><i class="anchor-icon"></i></a>sendVideo</h4>
<p>Use this method to send video files, Telegram clients support MPEG4 videos (other formats may be sent as <a href="#document">Document</a>). On success, the sent <a href="#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>
<table class="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>business_connection_id</td>
<td>String</td>
<td>Optional</td>
<td>Unique identifier of the business connection on behalf of which the message will be sent</td>
</tr>
<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_thread_id</td>
<td>Integer</td>
<td>Optional</td>
<td>Unique identifier for the target message thread (topic) of the forum; for forum supergroups only</td>
</tr>
<tr>
<td>video</td>
<td><a href="#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. <a href="#sending-files">More information 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>thumbnail</td>
<td><a href="#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&#39;s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can&#39;t be reused and can be only uploaded as a new file, so you can pass “attach://&lt;file_attach_name&gt;” if the thumbnail was uploaded using multipart/form-data under &lt;file_attach_name&gt;. <a href="#sending-files">More information 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 <a href="#formatting-options">formatting options</a> for more details.</td>
</tr>
<tr>
<td>caption_entities</td>
<td>Array of <a href="#messageentity">MessageEntity</a></td>
<td>Optional</td>
<td>A JSON-serialized list of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em></td>
</tr>
<tr>
<td>show_caption_above_media</td>
<td>Boolean</td>
<td>Optional</td>
<td>Pass <em>True</em>, if the caption must be shown above the message media</td>
</tr>
<tr>
<td>has_spoiler</td>
<td>Boolean</td>
<td>Optional</td>
<td>Pass <em>True</em> if the video needs to be covered with a spoiler animation</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 <a href="https://telegram.org/blog/channels-2-0#silent-messages">silently</a>. Users will receive a notification with no sound.</td>
</tr>
<tr>
<td>protect_content</td>
<td>Boolean</td>
<td>Optional</td>
<td>Protects the contents of the sent message from forwarding and saving</td>
</tr>
<tr>
<td>message_effect_id</td>
<td>String</td>
<td>Optional</td>
<td>Unique identifier of the message effect to be added to the message; for private chats only</td>
</tr>
<tr>
<td>reply_parameters</td>
<td><a href="#replyparameters">ReplyParameters</a></td>
<td>Optional</td>
<td>Description of the message to reply to</td>
</tr>
<tr>
<td>reply_markup</td>
<td><a href="#inlinekeyboardmarkup">InlineKeyboardMarkup</a> or <a href="#replykeyboardmarkup">ReplyKeyboardMarkup</a> or <a href="#replykeyboardremove">ReplyKeyboardRemove</a> or <a href="#forcereply">ForceReply</a></td>
<td>Optional</td>
<td>Additional interface options. A JSON-serialized object for an <a href="/bots/features#inline-keyboards">inline keyboard</a>, <a href="/bots/features#keyboards">custom reply keyboard</a>, instructions to remove a reply keyboard or to force a reply from the user</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="sendanimation" href="#sendanimation"><i class="anchor-icon"></i></a>sendAnimation</h4>
<p>Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound). On success, the sent <a href="#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>
<table class="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>business_connection_id</td>
<td>String</td>
<td>Optional</td>
<td>Unique identifier of the business connection on behalf of which the message will be sent</td>
</tr>
<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_thread_id</td>
<td>Integer</td>
<td>Optional</td>
<td>Unique identifier for the target message thread (topic) of the forum; for forum supergroups only</td>
</tr>
<tr>
<td>animation</td>
<td><a href="#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. <a href="#sending-files">More information 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>thumbnail</td>
<td><a href="#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&#39;s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can&#39;t be reused and can be only uploaded as a new file, so you can pass “attach://&lt;file_attach_name&gt;” if the thumbnail was uploaded using multipart/form-data under &lt;file_attach_name&gt;. <a href="#sending-files">More information 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 <a href="#formatting-options">formatting options</a> for more details.</td>
</tr>
<tr>
<td>caption_entities</td>
<td>Array of <a href="#messageentity">MessageEntity</a></td>
<td>Optional</td>
<td>A JSON-serialized list of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em></td>
</tr>
<tr>
<td>show_caption_above_media</td>
<td>Boolean</td>
<td>Optional</td>
<td>Pass <em>True</em>, if the caption must be shown above the message media</td>
</tr>
<tr>
<td>has_spoiler</td>
<td>Boolean</td>
<td>Optional</td>
<td>Pass <em>True</em> if the animation needs to be covered with a spoiler animation</td>
</tr>
<tr>
<td>disable_notification</td>
<td>Boolean</td>
<td>Optional</td>
<td>Sends the message <a href="https://telegram.org/blog/channels-2-0#silent-messages">silently</a>. Users will receive a notification with no sound.</td>
</tr>
<tr>
<td>protect_content</td>
<td>Boolean</td>
<td>Optional</td>
<td>Protects the contents of the sent message from forwarding and saving</td>
</tr>
<tr>
<td>message_effect_id</td>
<td>String</td>
<td>Optional</td>
<td>Unique identifier of the message effect to be added to the message; for private chats only</td>
</tr>
<tr>
<td>reply_parameters</td>
<td><a href="#replyparameters">ReplyParameters</a></td>
<td>Optional</td>
<td>Description of the message to reply to</td>
</tr>
<tr>
<td>reply_markup</td>
<td><a href="#inlinekeyboardmarkup">InlineKeyboardMarkup</a> or <a href="#replykeyboardmarkup">ReplyKeyboardMarkup</a> or <a href="#replykeyboardremove">ReplyKeyboardRemove</a> or <a href="#forcereply">ForceReply</a></td>
<td>Optional</td>
<td>Additional interface options. A JSON-serialized object for an <a href="/bots/features#inline-keyboards">inline keyboard</a>, <a href="/bots/features#keyboards">custom reply keyboard</a>, instructions to remove a reply keyboard or to force a reply from the user</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="sendvoice" href="#sendvoice"><i class="anchor-icon"></i></a>sendVoice</h4>
<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, or in .MP3 format, or in .M4A format (other formats may be sent as <a href="#audio">Audio</a> or <a href="#document">Document</a>). On success, the sent <a href="#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>
<table class="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>business_connection_id</td>
<td>String</td>
<td>Optional</td>
<td>Unique identifier of the business connection on behalf of which the message will be sent</td>
</tr>
<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_thread_id</td>
<td>Integer</td>
<td>Optional</td>
<td>Unique identifier for the target message thread (topic) of the forum; for forum supergroups only</td>
</tr>
<tr>
<td>voice</td>
<td><a href="#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. <a href="#sending-files">More information 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 <a href="#formatting-options">formatting options</a> for more details.</td>
</tr>
<tr>
<td>caption_entities</td>
<td>Array of <a href="#messageentity">MessageEntity</a></td>
<td>Optional</td>
<td>A JSON-serialized list of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em></td>
</tr>
<tr>
<td>duration</td>
<td>Integer</td>
<td>Optional</td>
<td>Duration of the voice message in seconds</td>
</tr>
<tr>
<td>disable_notification</td>
<td>Boolean</td>
<td>Optional</td>
<td>Sends the message <a href="https://telegram.org/blog/channels-2-0#silent-messages">silently</a>. Users will receive a notification with no sound.</td>
</tr>
<tr>
<td>protect_content</td>
<td>Boolean</td>
<td>Optional</td>
<td>Protects the contents of the sent message from forwarding and saving</td>
</tr>
<tr>
<td>message_effect_id</td>
<td>String</td>
<td>Optional</td>
<td>Unique identifier of the message effect to be added to the message; for private chats only</td>
</tr>
<tr>
<td>reply_parameters</td>
<td><a href="#replyparameters">ReplyParameters</a></td>
<td>Optional</td>
<td>Description of the message to reply to</td>
</tr>
<tr>
<td>reply_markup</td>
<td><a href="#inlinekeyboardmarkup">InlineKeyboardMarkup</a> or <a href="#replykeyboardmarkup">ReplyKeyboardMarkup</a> or <a href="#replykeyboardremove">ReplyKeyboardRemove</a> or <a href="#forcereply">ForceReply</a></td>
<td>Optional</td>
<td>Additional interface options. A JSON-serialized object for an <a href="/bots/features#inline-keyboards">inline keyboard</a>, <a href="/bots/features#keyboards">custom reply keyboard</a>, instructions to remove a reply keyboard or to force a reply from the user</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="sendvideonote" href="#sendvideonote"><i class="anchor-icon"></i></a>sendVideoNote</h4>
<p>As of <a href="https://telegram.org/blog/video-messages-and-telescope">v.4.0</a>, Telegram clients support rounded square MPEG4 videos of up to 1 minute long. Use this method to send video messages. On success, the sent <a href="#message">Message</a> is returned.</p>
<table class="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>business_connection_id</td>
<td>String</td>
<td>Optional</td>
<td>Unique identifier of the business connection on behalf of which the message will be sent</td>
</tr>
<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_thread_id</td>
<td>Integer</td>
<td>Optional</td>
<td>Unique identifier for the target message thread (topic) of the forum; for forum supergroups only</td>
</tr>
<tr>
<td>video_note</td>
<td><a href="#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. <a href="#sending-files">More information 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>thumbnail</td>
<td><a href="#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&#39;s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can&#39;t be reused and can be only uploaded as a new file, so you can pass “attach://&lt;file_attach_name&gt;” if the thumbnail was uploaded using multipart/form-data under &lt;file_attach_name&gt;. <a href="#sending-files">More information on Sending Files »</a></td>
</tr>
<tr>
<td>disable_notification</td>
<td>Boolean</td>
<td>Optional</td>
<td>Sends the message <a href="https://telegram.org/blog/channels-2-0#silent-messages">silently</a>. Users will receive a notification with no sound.</td>
</tr>
<tr>
<td>protect_content</td>
<td>Boolean</td>
<td>Optional</td>
<td>Protects the contents of the sent message from forwarding and saving</td>
</tr>
<tr>
<td>message_effect_id</td>
<td>String</td>
<td>Optional</td>
<td>Unique identifier of the message effect to be added to the message; for private chats only</td>
</tr>
<tr>
<td>reply_parameters</td>
<td><a href="#replyparameters">ReplyParameters</a></td>
<td>Optional</td>
<td>Description of the message to reply to</td>
</tr>
<tr>
<td>reply_markup</td>
<td><a href="#inlinekeyboardmarkup">InlineKeyboardMarkup</a> or <a href="#replykeyboardmarkup">ReplyKeyboardMarkup</a> or <a href="#replykeyboardremove">ReplyKeyboardRemove</a> or <a href="#forcereply">ForceReply</a></td>
<td>Optional</td>
<td>Additional interface options. A JSON-serialized object for an <a href="/bots/features#inline-keyboards">inline keyboard</a>, <a href="/bots/features#keyboards">custom reply keyboard</a>, instructions to remove a reply keyboard or to force a reply from the user</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="sendpaidmedia" href="#sendpaidmedia"><i class="anchor-icon"></i></a>sendPaidMedia</h4>
<p>Use this method to send paid media. On success, the sent <a href="#message">Message</a> is returned.</p>
<table class="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>business_connection_id</td>
<td>String</td>
<td>Optional</td>
<td>Unique identifier of the business connection on behalf of which the message will be sent</td>
</tr>
<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>). If the chat is a channel, all Telegram Star proceeds from this media will be credited to the chat&#39;s balance. Otherwise, they will be credited to the bot&#39;s balance.</td>
</tr>
<tr>
<td>star_count</td>
<td>Integer</td>
<td>Yes</td>
<td>The number of Telegram Stars that must be paid to buy access to the media</td>
</tr>
<tr>
<td>media</td>
<td>Array of <a href="#inputpaidmedia">InputPaidMedia</a></td>
<td>Yes</td>
<td>A JSON-serialized array describing the media to be sent; up to 10 items</td>
</tr>
<tr>
<td>caption</td>
<td>String</td>
<td>Optional</td>
<td>Media 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 media caption. See <a href="#formatting-options">formatting options</a> for more details.</td>
</tr>
<tr>
<td>caption_entities</td>
<td>Array of <a href="#messageentity">MessageEntity</a></td>
<td>Optional</td>
<td>A JSON-serialized list of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em></td>
</tr>
<tr>
<td>show_caption_above_media</td>
<td>Boolean</td>
<td>Optional</td>
<td>Pass <em>True</em>, if the caption must be shown above the message media</td>
</tr>
<tr>
<td>disable_notification</td>
<td>Boolean</td>
<td>Optional</td>
<td>Sends the message <a href="https://telegram.org/blog/channels-2-0#silent-messages">silently</a>. Users will receive a notification with no sound.</td>
</tr>
<tr>
<td>protect_content</td>
<td>Boolean</td>
<td>Optional</td>
<td>Protects the contents of the sent message from forwarding and saving</td>
</tr>
<tr>
<td>reply_parameters</td>
<td><a href="#replyparameters">ReplyParameters</a></td>
<td>Optional</td>
<td>Description of the message to reply to</td>
</tr>
<tr>
<td>reply_markup</td>
<td><a href="#inlinekeyboardmarkup">InlineKeyboardMarkup</a> or <a href="#replykeyboardmarkup">ReplyKeyboardMarkup</a> or <a href="#replykeyboardremove">ReplyKeyboardRemove</a> or <a href="#forcereply">ForceReply</a></td>
<td>Optional</td>
<td>Additional interface options. A JSON-serialized object for an <a href="/bots/features#inline-keyboards">inline keyboard</a>, <a href="/bots/features#keyboards">custom reply keyboard</a>, instructions to remove a reply keyboard or to force a reply from the user</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="sendmediagroup" href="#sendmediagroup"><i class="anchor-icon"></i></a>sendMediaGroup</h4>
<p>Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of <a href="#message">Messages</a> that were sent is returned.</p>
<table class="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>business_connection_id</td>
<td>String</td>
<td>Optional</td>
<td>Unique identifier of the business connection on behalf of which the message will be sent</td>
</tr>
<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_thread_id</td>
<td>Integer</td>
<td>Optional</td>
<td>Unique identifier for the target message thread (topic) of the forum; for forum supergroups only</td>
</tr>
<tr>
<td>media</td>
<td>Array of <a href="#inputmediaaudio">InputMediaAudio</a>, <a href="#inputmediadocument">InputMediaDocument</a>, <a href="#inputmediaphoto">InputMediaPhoto</a> and <a href="#inputmediavideo">InputMediaVideo</a></td>
<td>Yes</td>
<td>A JSON-serialized array describing messages to be sent, must include 2-10 items</td>
</tr>
<tr>
<td>disable_notification</td>
<td>Boolean</td>
<td>Optional</td>
<td>Sends messages <a href="https://telegram.org/blog/channels-2-0#silent-messages">silently</a>. Users will receive a notification with no sound.</td>
</tr>
<tr>
<td>protect_content</td>
<td>Boolean</td>
<td>Optional</td>
<td>Protects the contents of the sent messages from forwarding and saving</td>
</tr>
<tr>
<td>message_effect_id</td>
<td>String</td>
<td>Optional</td>
<td>Unique identifier of the message effect to be added to the message; for private chats only</td>
</tr>
<tr>
<td>reply_parameters</td>
<td><a href="#replyparameters">ReplyParameters</a></td>
<td>Optional</td>
<td>Description of the message to reply to</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="sendlocation" href="#sendlocation"><i class="anchor-icon"></i></a>sendLocation</h4>
<p>Use this method to send point on the map. On success, the sent <a href="#message">Message</a> is returned.</p>
<table class="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>business_connection_id</td>
<td>String</td>
<td>Optional</td>
<td>Unique identifier of the business connection on behalf of which the message will be sent</td>
</tr>
<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_thread_id</td>
<td>Integer</td>
<td>Optional</td>
<td>Unique identifier for the target message thread (topic) of the forum; for forum supergroups only</td>
</tr>
<tr>
<td>latitude</td>
<td>Float</td>
<td>Yes</td>
<td>Latitude of the location</td>
</tr>
<tr>
<td>longitude</td>
<td>Float</td>
<td>Yes</td>
<td>Longitude of the location</td>
</tr>
<tr>
<td>horizontal_accuracy</td>
<td>Float</td>
<td>Optional</td>
<td>The radius of uncertainty for the location, measured in meters; 0-1500</td>
</tr>
<tr>
<td>live_period</td>
<td>Integer</td>
<td>Optional</td>
<td>Period in seconds during which the location will be updated (see <a href="https://telegram.org/blog/live-locations">Live Locations</a>, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely.</td>
</tr>
<tr>
<td>heading</td>
<td>Integer</td>
<td>Optional</td>
<td>For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.</td>
</tr>
<tr>
<td>proximity_alert_radius</td>
<td>Integer</td>
<td>Optional</td>
<td>For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.</td>
</tr>
<tr>
<td>disable_notification</td>
<td>Boolean</td>
<td>Optional</td>
<td>Sends the message <a href="https://telegram.org/blog/channels-2-0#silent-messages">silently</a>. Users will receive a notification with no sound.</td>
</tr>
<tr>
<td>protect_content</td>
<td>Boolean</td>
<td>Optional</td>
<td>Protects the contents of the sent message from forwarding and saving</td>
</tr>
<tr>
<td>message_effect_id</td>
<td>String</td>
<td>Optional</td>
<td>Unique identifier of the message effect to be added to the message; for private chats only</td>
</tr>
<tr>
<td>reply_parameters</td>
<td><a href="#replyparameters">ReplyParameters</a></td>
<td>Optional</td>
<td>Description of the message to reply to</td>
</tr>
<tr>
<td>reply_markup</td>
<td><a href="#inlinekeyboardmarkup">InlineKeyboardMarkup</a> or <a href="#replykeyboardmarkup">ReplyKeyboardMarkup</a> or <a href="#replykeyboardremove">ReplyKeyboardRemove</a> or <a href="#forcereply">ForceReply</a></td>
<td>Optional</td>
<td>Additional interface options. A JSON-serialized object for an <a href="/bots/features#inline-keyboards">inline keyboard</a>, <a href="/bots/features#keyboards">custom reply keyboard</a>, instructions to remove a reply keyboard or to force a reply from the user</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="sendvenue" href="#sendvenue"><i class="anchor-icon"></i></a>sendVenue</h4>
<p>Use this method to send information about a venue. On success, the sent <a href="#message">Message</a> is returned.</p>
<table class="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>business_connection_id</td>
<td>String</td>
<td>Optional</td>
<td>Unique identifier of the business connection on behalf of which the message will be sent</td>
</tr>
<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_thread_id</td>
<td>Integer</td>
<td>Optional</td>
<td>Unique identifier for the target message thread (topic) of the forum; for forum supergroups only</td>
</tr>
<tr>
<td>latitude</td>
<td>Float</td>
<td>Yes</td>
<td>Latitude of the venue</td>
</tr>
<tr>
<td>longitude</td>
<td>Float</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>google_place_id</td>
<td>String</td>
<td>Optional</td>
<td>Google Places identifier of the venue</td>
</tr>
<tr>
<td>google_place_type</td>
<td>String</td>
<td>Optional</td>
<td>Google Places type of the venue. (See <a href="https://developers.google.com/places/web-service/supported_types">supported types</a>.)</td>
</tr>
<tr>
<td>disable_notification</td>
<td>Boolean</td>
<td>Optional</td>
<td>Sends the message <a href="https://telegram.org/blog/channels-2-0#silent-messages">silently</a>. Users will receive a notification with no sound.</td>
</tr>
<tr>
<td>protect_content</td>
<td>Boolean</td>
<td>Optional</td>
<td>Protects the contents of the sent message from forwarding and saving</td>
</tr>
<tr>
<td>message_effect_id</td>
<td>String</td>
<td>Optional</td>
<td>Unique identifier of the message effect to be added to the message; for private chats only</td>
</tr>
<tr>
<td>reply_parameters</td>
<td><a href="#replyparameters">ReplyParameters</a></td>
<td>Optional</td>
<td>Description of the message to reply to</td>
</tr>
<tr>
<td>reply_markup</td>
<td><a href="#inlinekeyboardmarkup">InlineKeyboardMarkup</a> or <a href="#replykeyboardmarkup">ReplyKeyboardMarkup</a> or <a href="#replykeyboardremove">ReplyKeyboardRemove</a> or <a href="#forcereply">ForceReply</a></td>
<td>Optional</td>
<td>Additional interface options. A JSON-serialized object for an <a href="/bots/features#inline-keyboards">inline keyboard</a>, <a href="/bots/features#keyboards">custom reply keyboard</a>, instructions to remove a reply keyboard or to force a reply from the user</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="sendcontact" href="#sendcontact"><i class="anchor-icon"></i></a>sendContact</h4>
<p>Use this method to send phone contacts. On success, the sent <a href="#message">Message</a> is returned.</p>
<table class="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>business_connection_id</td>
<td>String</td>
<td>Optional</td>
<td>Unique identifier of the business connection on behalf of which the message will be sent</td>
</tr>
<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_thread_id</td>
<td>Integer</td>
<td>Optional</td>
<td>Unique identifier for the target message thread (topic) of the forum; for forum supergroups only</td>
</tr>
<tr>
<td>phone_number</td>
<td>String</td>
<td>Yes</td>
<td>Contact&#39;s phone number</td>
</tr>
<tr>
<td>first_name</td>
<td>String</td>
<td>Yes</td>
<td>Contact&#39;s first name</td>
</tr>
<tr>
<td>last_name</td>
<td>String</td>
<td>Optional</td>
<td>Contact&#39;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 <a href="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 <a href="https://telegram.org/blog/channels-2-0#silent-messages">silently</a>. Users will receive a notification with no sound.</td>
</tr>
<tr>
<td>protect_content</td>
<td>Boolean</td>
<td>Optional</td>
<td>Protects the contents of the sent message from forwarding and saving</td>
</tr>
<tr>
<td>message_effect_id</td>
<td>String</td>
<td>Optional</td>
<td>Unique identifier of the message effect to be added to the message; for private chats only</td>
</tr>
<tr>
<td>reply_parameters</td>
<td><a href="#replyparameters">ReplyParameters</a></td>
<td>Optional</td>
<td>Description of the message to reply to</td>
</tr>
<tr>
<td>reply_markup</td>
<td><a href="#inlinekeyboardmarkup">InlineKeyboardMarkup</a> or <a href="#replykeyboardmarkup">ReplyKeyboardMarkup</a> or <a href="#replykeyboardremove">ReplyKeyboardRemove</a> or <a href="#forcereply">ForceReply</a></td>
<td>Optional</td>
<td>Additional interface options. A JSON-serialized object for an <a href="/bots/features#inline-keyboards">inline keyboard</a>, <a href="/bots/features#keyboards">custom reply keyboard</a>, instructions to remove a reply keyboard or to force a reply from the user</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="sendpoll" href="#sendpoll"><i class="anchor-icon"></i></a>sendPoll</h4>
<p>Use this method to send a native poll. On success, the sent <a href="#message">Message</a> is returned.</p>
<table class="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>business_connection_id</td>
<td>String</td>
<td>Optional</td>
<td>Unique identifier of the business connection on behalf of which the message will be sent</td>
</tr>
<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_thread_id</td>
<td>Integer</td>
<td>Optional</td>
<td>Unique identifier for the target message thread (topic) of the forum; for forum supergroups only</td>
</tr>
<tr>
<td>question</td>
<td>String</td>
<td>Yes</td>
<td>Poll question, 1-300 characters</td>
</tr>
<tr>
<td>question_parse_mode</td>
<td>String</td>
<td>Optional</td>
<td>Mode for parsing entities in the question. See <a href="#formatting-options">formatting options</a> for more details. Currently, only custom emoji entities are allowed</td>
</tr>
<tr>
<td>question_entities</td>
<td>Array of <a href="#messageentity">MessageEntity</a></td>
<td>Optional</td>
<td>A JSON-serialized list of special entities that appear in the poll question. It can be specified instead of <em>question_parse_mode</em></td>
</tr>
<tr>
<td>options</td>
<td>Array of <a href="#inputpolloption">InputPollOption</a></td>
<td>Yes</td>
<td>A JSON-serialized list of 2-10 answer options</td>
</tr>
<tr>
<td>is_anonymous</td>
<td>Boolean</td>
<td>Optional</td>
<td><em>True</em>, 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><em>True</em>, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to <em>False</em></td>
</tr>
<tr>
<td>correct_option_id</td>
<td>Integer</td>
<td>Optional</td>
<td>0-based identifier of the correct answer option, required for polls in quiz mode</td>
</tr>
<tr>
<td>explanation</td>
<td>String</td>
<td>Optional</td>
<td>Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters with at most 2 line feeds after entities parsing</td>
</tr>
<tr>
<td>explanation_parse_mode</td>
<td>String</td>
<td>Optional</td>
<td>Mode for parsing entities in the explanation. See <a href="#formatting-options">formatting options</a> for more details.</td>
</tr>
<tr>
<td>explanation_entities</td>
<td>Array of <a href="#messageentity">MessageEntity</a></td>
<td>Optional</td>
<td>A JSON-serialized list of special entities that appear in the poll explanation. It can be specified instead of <em>explanation_parse_mode</em></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&#39;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&#39;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 <a href="https://telegram.org/blog/channels-2-0#silent-messages">silently</a>. Users will receive a notification with no sound.</td>
</tr>
<tr>
<td>protect_content</td>
<td>Boolean</td>
<td>Optional</td>
<td>Protects the contents of the sent message from forwarding and saving</td>
</tr>
<tr>
<td>message_effect_id</td>
<td>String</td>
<td>Optional</td>
<td>Unique identifier of the message effect to be added to the message; for private chats only</td>
</tr>
<tr>
<td>reply_parameters</td>
<td><a href="#replyparameters">ReplyParameters</a></td>
<td>Optional</td>
<td>Description of the message to reply to</td>
</tr>
<tr>
<td>reply_markup</td>
<td><a href="#inlinekeyboardmarkup">InlineKeyboardMarkup</a> or <a href="#replykeyboardmarkup">ReplyKeyboardMarkup</a> or <a href="#replykeyboardremove">ReplyKeyboardRemove</a> or <a href="#forcereply">ForceReply</a></td>
<td>Optional</td>
<td>Additional interface options. A JSON-serialized object for an <a href="/bots/features#inline-keyboards">inline keyboard</a>, <a href="/bots/features#keyboards">custom reply keyboard</a>, instructions to remove a reply keyboard or to force a reply from the user</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="senddice" href="#senddice"><i class="anchor-icon"></i></a>sendDice</h4>
<p>Use this method to send an animated emoji that will display a random value. On success, the sent <a href="#message">Message</a> is returned.</p>
<table class="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>business_connection_id</td>
<td>String</td>
<td>Optional</td>
<td>Unique identifier of the business connection on behalf of which the message will be sent</td>
</tr>
<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_thread_id</td>
<td>Integer</td>
<td>Optional</td>
<td>Unique identifier for the target message thread (topic) of the forum; for forum supergroups only</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 “<img class="emoji" src="//telegram.org/img/emoji/40/F09F8EB2.png" width="20" height="20" alt="🎲" />”, “<img class="emoji" src="//telegram.org/img/emoji/40/F09F8EAF.png" width="20" height="20" alt="🎯" />”, “<img class="emoji" src="//telegram.org/img/emoji/40/F09F8F80.png" width="20" height="20" alt="🏀" />”, “<img class="emoji" src="//telegram.org/img/emoji/40/E29ABD.png" width="20" height="20" alt="⚽" />”, “<img class="emoji" src="//telegram.org/img/emoji/40/F09F8EB3.png" width="20" height="20" alt="🎳" />”, or “<img class="emoji" src="//telegram.org/img/emoji/40/F09F8EB0.png" width="20" height="20" alt="🎰" />”. Dice can have values 1-6 for “<img class="emoji" src="//telegram.org/img/emoji/40/F09F8EB2.png" width="20" height="20" alt="🎲" />”, “<img class="emoji" src="//telegram.org/img/emoji/40/F09F8EAF.png" width="20" height="20" alt="🎯" />” and “<img class="emoji" src="//telegram.org/img/emoji/40/F09F8EB3.png" width="20" height="20" alt="🎳" />”, values 1-5 for “<img class="emoji" src="//telegram.org/img/emoji/40/F09F8F80.png" width="20" height="20" alt="🏀" />” and “<img class="emoji" src="//telegram.org/img/emoji/40/E29ABD.png" width="20" height="20" alt="⚽" />”, and values 1-64 for “<img class="emoji" src="//telegram.org/img/emoji/40/F09F8EB0.png" width="20" height="20" alt="🎰" />”. Defaults to “<img class="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 <a href="https://telegram.org/blog/channels-2-0#silent-messages">silently</a>. Users will receive a notification with no sound.</td>
</tr>
<tr>
<td>protect_content</td>
<td>Boolean</td>
<td>Optional</td>
<td>Protects the contents of the sent message from forwarding</td>
</tr>
<tr>
<td>message_effect_id</td>
<td>String</td>
<td>Optional</td>
<td>Unique identifier of the message effect to be added to the message; for private chats only</td>
</tr>
<tr>
<td>reply_parameters</td>
<td><a href="#replyparameters">ReplyParameters</a></td>
<td>Optional</td>
<td>Description of the message to reply to</td>
</tr>
<tr>
<td>reply_markup</td>
<td><a href="#inlinekeyboardmarkup">InlineKeyboardMarkup</a> or <a href="#replykeyboardmarkup">ReplyKeyboardMarkup</a> or <a href="#replykeyboardremove">ReplyKeyboardRemove</a> or <a href="#forcereply">ForceReply</a></td>
<td>Optional</td>
<td>Additional interface options. A JSON-serialized object for an <a href="/bots/features#inline-keyboards">inline keyboard</a>, <a href="/bots/features#keyboards">custom reply keyboard</a>, instructions to remove a reply keyboard or to force a reply from the user</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="sendchataction" href="#sendchataction"><i class="anchor-icon"></i></a>sendChatAction</h4>
<p>Use this method when you need to tell the user that something is happening on the bot&#39;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 <a href="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 <a href="#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>
<table class="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>business_connection_id</td>
<td>String</td>
<td>Optional</td>
<td>Unique identifier of the business connection on behalf of which the action will be sent</td>
</tr>
<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_thread_id</td>
<td>Integer</td>
<td>Optional</td>
<td>Unique identifier for the target message thread; for supergroups only</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 <a href="#sendmessage">text messages</a>, <em>upload_photo</em> for <a href="#sendphoto">photos</a>, <em>record_video</em> or <em>upload_video</em> for <a href="#sendvideo">videos</a>, <em>record_voice</em> or <em>upload_voice</em> for <a href="#sendvoice">voice notes</a>, <em>upload_document</em> for <a href="#senddocument">general files</a>, <em>choose_sticker</em> for <a href="#sendsticker">stickers</a>, <em>find_location</em> for <a href="#sendlocation">location data</a>, <em>record_video_note</em> or <em>upload_video_note</em> for <a href="#sendvideonote">video notes</a>.</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="setmessagereaction" href="#setmessagereaction"><i class="anchor-icon"></i></a>setMessageReaction</h4>
<p>Use this method to change the chosen reactions on a message. Service messages can&#39;t be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Bots can&#39;t use paid reactions. Returns <em>True</em> on success.</p>
<table class="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 the target message. If the message belongs to a media group, the reaction is set to the first non-deleted message in the group instead.</td>
</tr>
<tr>
<td>reaction</td>
<td>Array of <a href="#reactiontype">ReactionType</a></td>
<td>Optional</td>
<td>A JSON-serialized list of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators. Paid reactions can&#39;t be used by bots.</td>
</tr>
<tr>
<td>is_big</td>
<td>Boolean</td>
<td>Optional</td>
<td>Pass <em>True</em> to set the reaction with a big animation</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="getuserprofilephotos" href="#getuserprofilephotos"><i class="anchor-icon"></i></a>getUserProfilePhotos</h4>
<p>Use this method to get a list of profile pictures for a user. Returns a <a href="#userprofilephotos">UserProfilePhotos</a> object.</p>
<table class="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>Unique identifier of the target user</td>
</tr>
<tr>
<td>offset</td>
<td>Integer</td>
<td>Optional</td>
<td>Sequential number of the first photo to be returned. By default, all photos are returned.</td>
</tr>
<tr>
<td>limit</td>
<td>Integer</td>
<td>Optional</td>
<td>Limits the number of photos to be retrieved. Values between 1-100 are accepted. Defaults to 100.</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="getfile" href="#getfile"><i class="anchor-icon"></i></a>getFile</h4>
<p>Use this method to get basic information about a file and prepare it for downloading. For the moment, bots can download files of up to 20MB in size. On success, a <a href="#file">File</a> object is returned. The file can then be downloaded via the link <code>https://api.telegram.org/file/bot&lt;token&gt;/&lt;file_path&gt;</code>, where <code>&lt;file_path&gt;</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 <a href="#getfile">getFile</a> again.</p>
<table class="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 information 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&#39;s MIME type and name (if available) when the File object is received.</p>
<h4><a class="anchor" name="banchatmember" href="#banchatmember"><i class="anchor-icon"></i></a>banChatMember</h4>
<p>Use this method to ban a user in a group, a supergroup or a channel. In the case of supergroups and channels, the user will not be able to return to the chat on their own using invite links, etc., unless <a href="#unbanchatmember">unbanned</a> first. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns <em>True</em> on success.</p>
<table class="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>chat_id</td>
<td>Integer or String</td>
<td>Yes</td>
<td>Unique identifier for the target group or username of the target supergroup or channel (in the format <code>@channelusername</code>)</td>
</tr>
<tr>
<td>user_id</td>
<td>Integer</td>
<td>Yes</td>
<td>Unique identifier of the target user</td>
</tr>
<tr>
<td>until_date</td>
<td>Integer</td>
<td>Optional</td>
<td>Date when the user will be unbanned; Unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever. Applied for supergroups and channels only.</td>
</tr>
<tr>
<td>revoke_messages</td>
<td>Boolean</td>
<td>Optional</td>
<td>Pass <em>True</em> to delete all messages from the chat for the user that is being removed. If <em>False</em>, the user will be able to see messages in the group that were sent before the user was removed. Always <em>True</em> for supergroups and channels.</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="unbanchatmember" href="#unbanchatmember"><i class="anchor-icon"></i></a>unbanChatMember</h4>
<p>Use this method to unban a previously banned user in a supergroup or channel. The user will <strong>not</strong> return to the group or channel automatically, but will be able to join via link, etc. The bot must be an administrator for this to work. By default, this method guarantees that after the call the user is not a member of the chat, but will be able to join it. So if the user is a member of the chat they will also be <strong>removed</strong> from the chat. If you don&#39;t want this, use the parameter <em>only_if_banned</em>. Returns <em>True</em> on success.</p>
<table class="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>only_if_banned</td>
<td>Boolean</td>
<td>Optional</td>
<td>Do nothing if the user is not banned</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="restrictchatmember" href="#restrictchatmember"><i class="anchor-icon"></i></a>restrictChatMember</h4>
<p>Use this method to restrict a user in a supergroup. The bot must be an administrator in the supergroup for this to work and must have the appropriate administrator rights. Pass <em>True</em> for all permissions to lift restrictions from a user. Returns <em>True</em> on success.</p>
<table class="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>user_id</td>
<td>Integer</td>
<td>Yes</td>
<td>Unique identifier of the target user</td>
</tr>
<tr>
<td>permissions</td>
<td><a href="#chatpermissions">ChatPermissions</a></td>
<td>Yes</td>
<td>A JSON-serialized object for new user permissions</td>
</tr>
<tr>
<td>use_independent_chat_permissions</td>
<td>Boolean</td>
<td>Optional</td>
<td>Pass <em>True</em> if chat permissions are set independently. Otherwise, the <em>can_send_other_messages</em> and <em>can_add_web_page_previews</em> permissions will imply the <em>can_send_messages</em>, <em>can_send_audios</em>, <em>can_send_documents</em>, <em>can_send_photos</em>, <em>can_send_videos</em>, <em>can_send_video_notes</em>, and <em>can_send_voice_notes</em> permissions; the <em>can_send_polls</em> permission will imply the <em>can_send_messages</em> permission.</td>
</tr>
<tr>
<td>until_date</td>
<td>Integer</td>
<td>Optional</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>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="promotechatmember" href="#promotechatmember"><i class="anchor-icon"></i></a>promoteChatMember</h4>
<p>Use this method to promote or demote a user in a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Pass <em>False</em> for all boolean parameters to demote a user. Returns <em>True</em> on success.</p>
<table class="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>is_anonymous</td>
<td>Boolean</td>
<td>Optional</td>
<td>Pass <em>True</em> if the administrator&#39;s presence in the chat is hidden</td>
</tr>
<tr>
<td>can_manage_chat</td>
<td>Boolean</td>
<td>Optional</td>
<td>Pass <em>True</em> if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.</td>
</tr>
<tr>
<td>can_delete_messages</td>
<td>Boolean</td>
<td>Optional</td>
<td>Pass <em>True</em> if the administrator can delete messages of other users</td>
</tr>
<tr>
<td>can_manage_video_chats</td>
<td>Boolean</td>
<td>Optional</td>
<td>Pass <em>True</em> if the administrator can manage video chats</td>
</tr>
<tr>
<td>can_restrict_members</td>
<td>Boolean</td>
<td>Optional</td>
<td>Pass <em>True</em> if the administrator can restrict, ban or unban chat members, or access supergroup statistics</td>
</tr>
<tr>
<td>can_promote_members</td>
<td>Boolean</td>
<td>Optional</td>
<td>Pass <em>True</em> if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by him)</td>
</tr>
<tr>
<td>can_change_info</td>
<td>Boolean</td>
<td>Optional</td>
<td>Pass <em>True</em> if the administrator can change chat title, photo and other settings</td>
</tr>
<tr>
<td>can_invite_users</td>
<td>Boolean</td>
<td>Optional</td>
<td>Pass <em>True</em> if the administrator can invite new users to the chat</td>
</tr>
<tr>
<td>can_post_stories</td>
<td>Boolean</td>
<td>Optional</td>
<td>Pass <em>True</em> if the administrator can post stories to the chat</td>
</tr>
<tr>
<td>can_edit_stories</td>
<td>Boolean</td>
<td>Optional</td>
<td>Pass <em>True</em> if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat&#39;s story archive</td>
</tr>
<tr>
<td>can_delete_stories</td>
<td>Boolean</td>
<td>Optional</td>
<td>Pass <em>True</em> if the administrator can delete stories posted by other users</td>
</tr>
<tr>
<td>can_post_messages</td>
<td>Boolean</td>
<td>Optional</td>
<td>Pass <em>True</em> if the administrator can post messages in the channel, or access channel statistics; for channels only</td>
</tr>
<tr>
<td>can_edit_messages</td>
<td>Boolean</td>
<td>Optional</td>
<td>Pass <em>True</em> if the administrator can edit messages of other users and can pin messages; for channels only</td>
</tr>
<tr>
<td>can_pin_messages</td>
<td>Boolean</td>
<td>Optional</td>
<td>Pass <em>True</em> if the administrator can pin messages; for supergroups only</td>
</tr>
<tr>
<td>can_manage_topics</td>
<td>Boolean</td>
<td>Optional</td>
<td>Pass <em>True</em> if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="setchatadministratorcustomtitle" href="#setchatadministratorcustomtitle"><i class="anchor-icon"></i></a>setChatAdministratorCustomTitle</h4>
<p>Use this method to set a custom title for an administrator in a supergroup promoted by the bot. Returns <em>True</em> on success.</p>
<table class="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>user_id</td>
<td>Integer</td>
<td>Yes</td>
<td>Unique identifier of the target user</td>
</tr>
<tr>
<td>custom_title</td>
<td>String</td>
<td>Yes</td>
<td>New custom title for the administrator; 0-16 characters, emoji are not allowed</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="banchatsenderchat" href="#banchatsenderchat"><i class="anchor-icon"></i></a>banChatSenderChat</h4>
<p>Use this method to ban a channel chat in a supergroup or a channel. Until the chat is <a href="#unbanchatsenderchat">unbanned</a>, the owner of the banned chat won&#39;t be able to send messages on behalf of <strong>any of their channels</strong>. The bot must be an administrator in the supergroup or channel for this to work and must have the appropriate administrator rights. Returns <em>True</em> on success.</p>
<table class="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>chat_id</td>
<td>Integer or String</td>
<td>Yes</td>
<td>Unique identifier for the target chat or username of the target channel (in the format <code>@channelusername</code>)</td>
</tr>
<tr>
<td>sender_chat_id</td>
<td>Integer</td>
<td>Yes</td>
<td>Unique identifier of the target sender chat</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="unbanchatsenderchat" href="#unbanchatsenderchat"><i class="anchor-icon"></i></a>unbanChatSenderChat</h4>
<p>Use this method to unban a previously banned channel chat in a supergroup or channel. The bot must be an administrator for this to work and must have the appropriate administrator rights. Returns <em>True</em> on success.</p>
<table class="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>chat_id</td>
<td>Integer or String</td>
<td>Yes</td>
<td>Unique identifier for the target chat or username of the target channel (in the format <code>@channelusername</code>)</td>
</tr>
<tr>
<td>sender_chat_id</td>
<td>Integer</td>
<td>Yes</td>
<td>Unique identifier of the target sender chat</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="setchatpermissions" href="#setchatpermissions"><i class="anchor-icon"></i></a>setChatPermissions</h4>
<p>Use this method to set default chat permissions for all members. The bot must be an administrator in the group or a supergroup for this to work and must have the <em>can_restrict_members</em> administrator rights. Returns <em>True</em> on success.</p>
<table class="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>permissions</td>
<td><a href="#chatpermissions">ChatPermissions</a></td>
<td>Yes</td>
<td>A JSON-serialized object for new default chat permissions</td>
</tr>
<tr>
<td>use_independent_chat_permissions</td>
<td>Boolean</td>
<td>Optional</td>
<td>Pass <em>True</em> if chat permissions are set independently. Otherwise, the <em>can_send_other_messages</em> and <em>can_add_web_page_previews</em> permissions will imply the <em>can_send_messages</em>, <em>can_send_audios</em>, <em>can_send_documents</em>, <em>can_send_photos</em>, <em>can_send_videos</em>, <em>can_send_video_notes</em>, and <em>can_send_voice_notes</em> permissions; the <em>can_send_polls</em> permission will imply the <em>can_send_messages</em> permission.</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="exportchatinvitelink" href="#exportchatinvitelink"><i class="anchor-icon"></i></a>exportChatInviteLink</h4>
<p>Use this method to generate a new primary invite link for a chat; any previously generated primary link is revoked. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the new invite link as <em>String</em> on success.</p>
<table class="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&#39;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 <a href="#exportchatinvitelink">exportChatInviteLink</a> or by calling the <a href="#getchat">getChat</a> method. If your bot needs to generate a new primary invite link replacing its previous one, use <a href="#exportchatinvitelink">exportChatInviteLink</a> again.</p>
</blockquote>
<h4><a class="anchor" name="createchatinvitelink" href="#createchatinvitelink"><i class="anchor-icon"></i></a>createChatInviteLink</h4>
<p>Use this method to create an additional invite link for a chat. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. The link can be revoked using the method <a href="#revokechatinvitelink">revokeChatInviteLink</a>. Returns the new invite link as <a href="#chatinvitelink">ChatInviteLink</a> object.</p>
<table class="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>chat_id</td>
<td>Integer or String</td>
<td>Yes</td>
<td>Unique identifier for the target chat or username of the target channel (in the format <code>@channelusername</code>)</td>
</tr>
<tr>
<td>name</td>
<td>String</td>
<td>Optional</td>
<td>Invite link name; 0-32 characters</td>
</tr>
<tr>
<td>expire_date</td>
<td>Integer</td>
<td>Optional</td>
<td>Point in time (Unix timestamp) when the link will expire</td>
</tr>
<tr>
<td>member_limit</td>
<td>Integer</td>
<td>Optional</td>
<td>The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999</td>
</tr>
<tr>
<td>creates_join_request</td>
<td>Boolean</td>
<td>Optional</td>
<td><em>True</em>, if users joining the chat via the link need to be approved by chat administrators. If <em>True</em>, <em>member_limit</em> can&#39;t be specified</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="editchatinvitelink" href="#editchatinvitelink"><i class="anchor-icon"></i></a>editChatInviteLink</h4>
<p>Use this method to edit a non-primary invite link created by the bot. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the edited invite link as a <a href="#chatinvitelink">ChatInviteLink</a> object.</p>
<table class="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>chat_id</td>
<td>Integer or String</td>
<td>Yes</td>
<td>Unique identifier for the target chat or username of the target channel (in the format <code>@channelusername</code>)</td>
</tr>
<tr>
<td>invite_link</td>
<td>String</td>
<td>Yes</td>
<td>The invite link to edit</td>
</tr>
<tr>
<td>name</td>
<td>String</td>
<td>Optional</td>
<td>Invite link name; 0-32 characters</td>
</tr>
<tr>
<td>expire_date</td>
<td>Integer</td>
<td>Optional</td>
<td>Point in time (Unix timestamp) when the link will expire</td>
</tr>
<tr>
<td>member_limit</td>
<td>Integer</td>
<td>Optional</td>
<td>The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999</td>
</tr>
<tr>
<td>creates_join_request</td>
<td>Boolean</td>
<td>Optional</td>
<td><em>True</em>, if users joining the chat via the link need to be approved by chat administrators. If <em>True</em>, <em>member_limit</em> can&#39;t be specified</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="createchatsubscriptioninvitelink" href="#createchatsubscriptioninvitelink"><i class="anchor-icon"></i></a>createChatSubscriptionInviteLink</h4>
<p>Use this method to create a <a href="https://telegram.org/blog/superchannels-star-reactions-subscriptions#star-subscriptions">subscription invite link</a> for a channel chat. The bot must have the <em>can_invite_users</em> administrator rights. The link can be edited using the method <a href="#editchatsubscriptioninvitelink">editChatSubscriptionInviteLink</a> or revoked using the method <a href="#revokechatinvitelink">revokeChatInviteLink</a>. Returns the new invite link as a <a href="#chatinvitelink">ChatInviteLink</a> object.</p>
<table class="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 channel chat or username of the target channel (in the format <code>@channelusername</code>)</td>
</tr>
<tr>
<td>name</td>
<td>String</td>
<td>Optional</td>
<td>Invite link name; 0-32 characters</td>
</tr>
<tr>
<td>subscription_period</td>
<td>Integer</td>
<td>Yes</td>
<td>The number of seconds the subscription will be active for before the next payment. Currently, it must always be 2592000 (30 days).</td>
</tr>
<tr>
<td>subscription_price</td>
<td>Integer</td>
<td>Yes</td>
<td>The amount of Telegram Stars a user must pay initially and after each subsequent subscription period to be a member of the chat; 1-2500</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="editchatsubscriptioninvitelink" href="#editchatsubscriptioninvitelink"><i class="anchor-icon"></i></a>editChatSubscriptionInviteLink</h4>
<p>Use this method to edit a subscription invite link created by the bot. The bot must have the <em>can_invite_users</em> administrator rights. Returns the edited invite link as a <a href="#chatinvitelink">ChatInviteLink</a> object.</p>
<table class="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>chat_id</td>
<td>Integer or String</td>
<td>Yes</td>
<td>Unique identifier for the target chat or username of the target channel (in the format <code>@channelusername</code>)</td>
</tr>
<tr>
<td>invite_link</td>
<td>String</td>
<td>Yes</td>
<td>The invite link to edit</td>
</tr>
<tr>
<td>name</td>
<td>String</td>
<td>Optional</td>
<td>Invite link name; 0-32 characters</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="revokechatinvitelink" href="#revokechatinvitelink"><i class="anchor-icon"></i></a>revokeChatInviteLink</h4>
<p>Use this method to revoke an invite link created by the bot. If the primary link is revoked, a new link is automatically generated. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the revoked invite link as <a href="#chatinvitelink">ChatInviteLink</a> object.</p>
<table class="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>chat_id</td>
<td>Integer or String</td>
<td>Yes</td>
<td>Unique identifier of the target chat or username of the target channel (in the format <code>@channelusername</code>)</td>
</tr>
<tr>
<td>invite_link</td>
<td>String</td>
<td>Yes</td>
<td>The invite link to revoke</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="approvechatjoinrequest" href="#approvechatjoinrequest"><i class="anchor-icon"></i></a>approveChatJoinRequest</h4>
<p>Use this method to approve a chat join request. The bot must be an administrator in the chat for this to work and must have the <em>can_invite_users</em> administrator right. Returns <em>True</em> on success.</p>
<table class="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>
</tbody>
</table>
<h4><a class="anchor" name="declinechatjoinrequest" href="#declinechatjoinrequest"><i class="anchor-icon"></i></a>declineChatJoinRequest</h4>
<p>Use this method to decline a chat join request. The bot must be an administrator in the chat for this to work and must have the <em>can_invite_users</em> administrator right. Returns <em>True</em> on success.</p>
<table class="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>
</tbody>
</table>
<h4><a class="anchor" name="setchatphoto" href="#setchatphoto"><i class="anchor-icon"></i></a>setChatPhoto</h4>
<p>Use this method to set a new profile photo for the chat. Photos can&#39;t be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns <em>True</em> on success.</p>
<table class="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><a href="#inputfile">InputFile</a></td>
<td>Yes</td>
<td>New chat photo, uploaded using multipart/form-data</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="deletechatphoto" href="#deletechatphoto"><i class="anchor-icon"></i></a>deleteChatPhoto</h4>
<p>Use this method to delete a chat photo. Photos can&#39;t be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns <em>True</em> on success.</p>
<table class="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>
<h4><a class="anchor" name="setchattitle" href="#setchattitle"><i class="anchor-icon"></i></a>setChatTitle</h4>
<p>Use this method to change the title of a chat. Titles can&#39;t be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns <em>True</em> on success.</p>
<table class="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>title</td>
<td>String</td>
<td>Yes</td>
<td>New chat title, 1-128 characters</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="setchatdescription" href="#setchatdescription"><i class="anchor-icon"></i></a>setChatDescription</h4>
<p>Use this method to change the description of a group, a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns <em>True</em> on success.</p>
<table class="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>description</td>
<td>String</td>
<td>Optional</td>
<td>New chat description, 0-255 characters</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="pinchatmessage" href="#pinchatmessage"><i class="anchor-icon"></i></a>pinChatMessage</h4>
<p>Use this method to add a message to the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the &#39;can_pin_messages&#39; administrator right in a supergroup or &#39;can_edit_messages&#39; administrator right in a channel. Returns <em>True</em> on success.</p>
<table class="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>business_connection_id</td>
<td>String</td>
<td>Optional</td>
<td>Unique identifier of the business connection on behalf of which the message will be pinned</td>
</tr>
<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 and private chats.</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="unpinchatmessage" href="#unpinchatmessage"><i class="anchor-icon"></i></a>unpinChatMessage</h4>
<p>Use this method to remove a message from the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the &#39;can_pin_messages&#39; administrator right in a supergroup or &#39;can_edit_messages&#39; administrator right in a channel. Returns <em>True</em> on success.</p>
<table class="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>business_connection_id</td>
<td>String</td>
<td>Optional</td>
<td>Unique identifier of the business connection on behalf of which the message will be unpinned</td>
</tr>
<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>Optional</td>
<td>Identifier of the message to unpin. Required if <em>business_connection_id</em> is specified. If not specified, the most recent pinned message (by sending date) will be unpinned.</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="unpinallchatmessages" href="#unpinallchatmessages"><i class="anchor-icon"></i></a>unpinAllChatMessages</h4>
<p>Use this method to clear the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the &#39;can_pin_messages&#39; administrator right in a supergroup or &#39;can_edit_messages&#39; administrator right in a channel. Returns <em>True</em> on success.</p>
<table class="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>
<h4><a class="anchor" name="leavechat" href="#leavechat"><i class="anchor-icon"></i></a>leaveChat</h4>
<p>Use this method for your bot to leave a group, supergroup or channel. Returns <em>True</em> on success.</p>
<table class="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>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="getchat" href="#getchat"><i class="anchor-icon"></i></a>getChat</h4>
<p>Use this method to get up-to-date information about the chat. Returns a <a href="#chatfullinfo">ChatFullInfo</a> object on success.</p>
<table class="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>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="getchatadministrators" href="#getchatadministrators"><i class="anchor-icon"></i></a>getChatAdministrators</h4>
<p>Use this method to get a list of administrators in a chat, which aren&#39;t bots. Returns an Array of <a href="#chatmember">ChatMember</a> objects.</p>
<table class="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>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="getchatmembercount" href="#getchatmembercount"><i class="anchor-icon"></i></a>getChatMemberCount</h4>
<p>Use this method to get the number of members in a chat. Returns <em>Int</em> on success.</p>
<table class="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>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="getchatmember" href="#getchatmember"><i class="anchor-icon"></i></a>getChatMember</h4>
<p>Use this method to get information about a member of a chat. The method is only guaranteed to work for other users if the bot is an administrator in the chat. Returns a <a href="#chatmember">ChatMember</a> object on success.</p>
<table class="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>
</tr>
<tr>
<td>user_id</td>
<td>Integer</td>
<td>Yes</td>
<td>Unique identifier of the target user</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="setchatstickerset" href="#setchatstickerset"><i class="anchor-icon"></i></a>setChatStickerSet</h4>
<p>Use this method to set a new group sticker set for a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Use the field <em>can_set_sticker_set</em> optionally returned in <a href="#getchat">getChat</a> requests to check if the bot can use this method. Returns <em>True</em> on success.</p>
<table class="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>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="deletechatstickerset" href="#deletechatstickerset"><i class="anchor-icon"></i></a>deleteChatStickerSet</h4>
<p>Use this method to delete a group sticker set from a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Use the field <em>can_set_sticker_set</em> optionally returned in <a href="#getchat">getChat</a> requests to check if the bot can use this method. Returns <em>True</em> on success.</p>
<table class="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>
</tbody>
</table>
<h4><a class="anchor" name="getforumtopiciconstickers" href="#getforumtopiciconstickers"><i class="anchor-icon"></i></a>getForumTopicIconStickers</h4>
<p>Use this method to get custom emoji stickers, which can be used as a forum topic icon by any user. Requires no parameters. Returns an Array of <a href="#sticker">Sticker</a> objects.</p>
<h4><a class="anchor" name="createforumtopic" href="#createforumtopic"><i class="anchor-icon"></i></a>createForumTopic</h4>
<p>Use this method to create a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the <em>can_manage_topics</em> administrator rights. Returns information about the created topic as a <a href="#forumtopic">ForumTopic</a> object.</p>
<table class="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>name</td>
<td>String</td>
<td>Yes</td>
<td>Topic name, 1-128 characters</td>
</tr>
<tr>
<td>icon_color</td>
<td>Integer</td>
<td>Optional</td>
<td>Color of the topic icon in RGB format. Currently, must be one of 7322096 (0x6FB9F0), 16766590 (0xFFD67E), 13338331 (0xCB86DB), 9367192 (0x8EEE98), 16749490 (0xFF93B2), or 16478047 (0xFB6F5F)</td>
</tr>
<tr>
<td>icon_custom_emoji_id</td>
<td>String</td>
<td>Optional</td>
<td>Unique identifier of the custom emoji shown as the topic icon. Use <a href="#getforumtopiciconstickers">getForumTopicIconStickers</a> to get all allowed custom emoji identifiers.</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="editforumtopic" href="#editforumtopic"><i class="anchor-icon"></i></a>editForumTopic</h4>
<p>Use this method to edit name and icon of a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the <em>can_manage_topics</em> administrator rights, unless it is the creator of the topic. Returns <em>True</em> on success.</p>
<table class="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>chat_id</td>
<td>Integer or String</td>
<td>Yes</td>
<td>Unique identifier for the target chat or username of the target supergroup (in the format <code>@supergroupusername</code>)</td>
</tr>
<tr>
<td>message_thread_id</td>
<td>Integer</td>
<td>Yes</td>
<td>Unique identifier for the target message thread of the forum topic</td>
</tr>
<tr>
<td>name</td>
<td>String</td>
<td>Optional</td>
<td>New topic name, 0-128 characters. If not specified or empty, the current name of the topic will be kept</td>
</tr>
<tr>
<td>icon_custom_emoji_id</td>
<td>String</td>
<td>Optional</td>
<td>New unique identifier of the custom emoji shown as the topic icon. Use <a href="#getforumtopiciconstickers">getForumTopicIconStickers</a> to get all allowed custom emoji identifiers. Pass an empty string to remove the icon. If not specified, the current icon will be kept</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="closeforumtopic" href="#closeforumtopic"><i class="anchor-icon"></i></a>closeForumTopic</h4>
<p>Use this method to close an open topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the <em>can_manage_topics</em> administrator rights, unless it is the creator of the topic. Returns <em>True</em> on success.</p>
<table class="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>chat_id</td>
<td>Integer or String</td>
<td>Yes</td>
<td>Unique identifier for the target chat or username of the target supergroup (in the format <code>@supergroupusername</code>)</td>
</tr>
<tr>
<td>message_thread_id</td>
<td>Integer</td>
<td>Yes</td>
<td>Unique identifier for the target message thread of the forum topic</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="reopenforumtopic" href="#reopenforumtopic"><i class="anchor-icon"></i></a>reopenForumTopic</h4>
<p>Use this method to reopen a closed topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the <em>can_manage_topics</em> administrator rights, unless it is the creator of the topic. Returns <em>True</em> on success.</p>
<table class="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>chat_id</td>
<td>Integer or String</td>
<td>Yes</td>
<td>Unique identifier for the target chat or username of the target supergroup (in the format <code>@supergroupusername</code>)</td>
</tr>
<tr>
<td>message_thread_id</td>
<td>Integer</td>
<td>Yes</td>
<td>Unique identifier for the target message thread of the forum topic</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="deleteforumtopic" href="#deleteforumtopic"><i class="anchor-icon"></i></a>deleteForumTopic</h4>
<p>Use this method to delete a forum topic along with all its messages in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the <em>can_delete_messages</em> administrator rights. Returns <em>True</em> on success.</p>
<table class="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>chat_id</td>
<td>Integer or String</td>
<td>Yes</td>
<td>Unique identifier for the target chat or username of the target supergroup (in the format <code>@supergroupusername</code>)</td>
</tr>
<tr>
<td>message_thread_id</td>
<td>Integer</td>
<td>Yes</td>
<td>Unique identifier for the target message thread of the forum topic</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="unpinallforumtopicmessages" href="#unpinallforumtopicmessages"><i class="anchor-icon"></i></a>unpinAllForumTopicMessages</h4>
<p>Use this method to clear the list of pinned messages in a forum topic. The bot must be an administrator in the chat for this to work and must have the <em>can_pin_messages</em> administrator right in the supergroup. Returns <em>True</em> on success.</p>
<table class="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>chat_id</td>
<td>Integer or String</td>
<td>Yes</td>
<td>Unique identifier for the target chat or username of the target supergroup (in the format <code>@supergroupusername</code>)</td>
</tr>
<tr>
<td>message_thread_id</td>
<td>Integer</td>
<td>Yes</td>
<td>Unique identifier for the target message thread of the forum topic</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="editgeneralforumtopic" href="#editgeneralforumtopic"><i class="anchor-icon"></i></a>editGeneralForumTopic</h4>
<p>Use this method to edit the name of the &#39;General&#39; topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the <em>can_manage_topics</em> administrator rights. Returns <em>True</em> on success.</p>
<table class="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>name</td>
<td>String</td>
<td>Yes</td>
<td>New topic name, 1-128 characters</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="closegeneralforumtopic" href="#closegeneralforumtopic"><i class="anchor-icon"></i></a>closeGeneralForumTopic</h4>
<p>Use this method to close an open &#39;General&#39; topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the <em>can_manage_topics</em> administrator rights. Returns <em>True</em> on success.</p>
<table class="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>
</tbody>
</table>
<h4><a class="anchor" name="reopengeneralforumtopic" href="#reopengeneralforumtopic"><i class="anchor-icon"></i></a>reopenGeneralForumTopic</h4>
<p>Use this method to reopen a closed &#39;General&#39; topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the <em>can_manage_topics</em> administrator rights. The topic will be automatically unhidden if it was hidden. Returns <em>True</em> on success.</p>
<table class="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>
</tbody>
</table>
<h4><a class="anchor" name="hidegeneralforumtopic" href="#hidegeneralforumtopic"><i class="anchor-icon"></i></a>hideGeneralForumTopic</h4>
<p>Use this method to hide the &#39;General&#39; topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the <em>can_manage_topics</em> administrator rights. The topic will be automatically closed if it was open. Returns <em>True</em> on success.</p>
<table class="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>
</tbody>
</table>
<h4><a class="anchor" name="unhidegeneralforumtopic" href="#unhidegeneralforumtopic"><i class="anchor-icon"></i></a>unhideGeneralForumTopic</h4>
<p>Use this method to unhide the &#39;General&#39; topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the <em>can_manage_topics</em> administrator rights. Returns <em>True</em> on success.</p>
<table class="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>
</tbody>
</table>
<h4><a class="anchor" name="unpinallgeneralforumtopicmessages" href="#unpinallgeneralforumtopicmessages"><i class="anchor-icon"></i></a>unpinAllGeneralForumTopicMessages</h4>
<p>Use this method to clear the list of pinned messages in a General forum topic. The bot must be an administrator in the chat for this to work and must have the <em>can_pin_messages</em> administrator right in the supergroup. Returns <em>True</em> on success.</p>
<table class="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>
</tbody>
</table>
<h4><a class="anchor" name="answercallbackquery" href="#answercallbackquery"><i class="anchor-icon"></i></a>answerCallbackQuery</h4>
<p>Use this method to send answers to callback queries sent from <a href="/bots/features#inline-keyboards">inline keyboards</a>. The answer will be displayed to the user as a notification at the top of the chat screen or as an alert. On success, <em>True</em> is returned.</p>
<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 <a href="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>
<table class="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&#39;s client. If you have created a <a href="#game">Game</a> and accepted the conditions via <a href="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 <a href="#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>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="getuserchatboosts" href="#getuserchatboosts"><i class="anchor-icon"></i></a>getUserChatBoosts</h4>
<p>Use this method to get the list of boosts added to a chat by a user. Requires administrator rights in the chat. Returns a <a href="#userchatboosts">UserChatBoosts</a> object.</p>
<table class="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 chat or username of the 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>
</tbody>
</table>
<h4><a class="anchor" name="getbusinessconnection" href="#getbusinessconnection"><i class="anchor-icon"></i></a>getBusinessConnection</h4>
<p>Use this method to get information about the connection of the bot with a business account. Returns a <a href="#businessconnection">BusinessConnection</a> object on success.</p>
<table class="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>business_connection_id</td>
<td>String</td>
<td>Yes</td>
<td>Unique identifier of the business connection</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="setmycommands" href="#setmycommands"><i class="anchor-icon"></i></a>setMyCommands</h4>
<p>Use this method to change the list of the bot&#39;s commands. See <a href="/bots/features#commands">this manual</a> for more details about bot commands. Returns <em>True</em> on success.</p>
<table class="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>commands</td>
<td>Array of <a href="#botcommand">BotCommand</a></td>
<td>Yes</td>
<td>A JSON-serialized list of bot commands to be set as the list of the bot&#39;s commands. At most 100 commands can be specified.</td>
</tr>
<tr>
<td>scope</td>
<td><a href="#botcommandscope">BotCommandScope</a></td>
<td>Optional</td>
<td>A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to <a href="#botcommandscopedefault">BotCommandScopeDefault</a>.</td>
</tr>
<tr>
<td>language_code</td>
<td>String</td>
<td>Optional</td>
<td>A two-letter ISO 639-1 language code. If empty, commands will be applied to all users from the given scope, for whose language there are no dedicated commands</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="deletemycommands" href="#deletemycommands"><i class="anchor-icon"></i></a>deleteMyCommands</h4>
<p>Use this method to delete the list of the bot&#39;s commands for the given scope and user language. After deletion, <a href="#determining-list-of-commands">higher level commands</a> will be shown to affected users. Returns <em>True</em> on success.</p>
<table class="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>scope</td>
<td><a href="#botcommandscope">BotCommandScope</a></td>
<td>Optional</td>
<td>A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to <a href="#botcommandscopedefault">BotCommandScopeDefault</a>.</td>
</tr>
<tr>
<td>language_code</td>
<td>String</td>
<td>Optional</td>
<td>A two-letter ISO 639-1 language code. If empty, commands will be applied to all users from the given scope, for whose language there are no dedicated commands</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="getmycommands" href="#getmycommands"><i class="anchor-icon"></i></a>getMyCommands</h4>
<p>Use this method to get the current list of the bot&#39;s commands for the given scope and user language. Returns an Array of <a href="#botcommand">BotCommand</a> objects. If commands aren&#39;t set, an empty list is returned.</p>
<table class="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>scope</td>
<td><a href="#botcommandscope">BotCommandScope</a></td>
<td>Optional</td>
<td>A JSON-serialized object, describing scope of users. Defaults to <a href="#botcommandscopedefault">BotCommandScopeDefault</a>.</td>
</tr>
<tr>
<td>language_code</td>
<td>String</td>
<td>Optional</td>
<td>A two-letter ISO 639-1 language code or an empty string</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="setmyname" href="#setmyname"><i class="anchor-icon"></i></a>setMyName</h4>
<p>Use this method to change the bot&#39;s name. Returns <em>True</em> on success.</p>
<table class="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>Optional</td>
<td>New bot name; 0-64 characters. Pass an empty string to remove the dedicated name for the given language.</td>
</tr>
<tr>
<td>language_code</td>
<td>String</td>
<td>Optional</td>
<td>A two-letter ISO 639-1 language code. If empty, the name will be shown to all users for whose language there is no dedicated name.</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="getmyname" href="#getmyname"><i class="anchor-icon"></i></a>getMyName</h4>
<p>Use this method to get the current bot name for the given user language. Returns <a href="#botname">BotName</a> on success.</p>
<table class="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>language_code</td>
<td>String</td>
<td>Optional</td>
<td>A two-letter ISO 639-1 language code or an empty string</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="setmydescription" href="#setmydescription"><i class="anchor-icon"></i></a>setMyDescription</h4>
<p>Use this method to change the bot&#39;s description, which is shown in the chat with the bot if the chat is empty. Returns <em>True</em> on success.</p>
<table class="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>description</td>
<td>String</td>
<td>Optional</td>
<td>New bot description; 0-512 characters. Pass an empty string to remove the dedicated description for the given language.</td>
</tr>
<tr>
<td>language_code</td>
<td>String</td>
<td>Optional</td>
<td>A two-letter ISO 639-1 language code. If empty, the description will be applied to all users for whose language there is no dedicated description.</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="getmydescription" href="#getmydescription"><i class="anchor-icon"></i></a>getMyDescription</h4>
<p>Use this method to get the current bot description for the given user language. Returns <a href="#botdescription">BotDescription</a> on success.</p>
<table class="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>language_code</td>
<td>String</td>
<td>Optional</td>
<td>A two-letter ISO 639-1 language code or an empty string</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="setmyshortdescription" href="#setmyshortdescription"><i class="anchor-icon"></i></a>setMyShortDescription</h4>
<p>Use this method to change the bot&#39;s short description, which is shown on the bot&#39;s profile page and is sent together with the link when users share the bot. Returns <em>True</em> on success.</p>
<table class="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>short_description</td>
<td>String</td>
<td>Optional</td>
<td>New short description for the bot; 0-120 characters. Pass an empty string to remove the dedicated short description for the given language.</td>
</tr>
<tr>
<td>language_code</td>
<td>String</td>
<td>Optional</td>
<td>A two-letter ISO 639-1 language code. If empty, the short description will be applied to all users for whose language there is no dedicated short description.</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="getmyshortdescription" href="#getmyshortdescription"><i class="anchor-icon"></i></a>getMyShortDescription</h4>
<p>Use this method to get the current bot short description for the given user language. Returns <a href="#botshortdescription">BotShortDescription</a> on success.</p>
<table class="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>language_code</td>
<td>String</td>
<td>Optional</td>
<td>A two-letter ISO 639-1 language code or an empty string</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="setchatmenubutton" href="#setchatmenubutton"><i class="anchor-icon"></i></a>setChatMenuButton</h4>
<p>Use this method to change the bot&#39;s menu button in a private chat, or the default menu button. Returns <em>True</em> on success.</p>
<table class="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>chat_id</td>
<td>Integer</td>
<td>Optional</td>
<td>Unique identifier for the target private chat. If not specified, default bot&#39;s menu button will be changed</td>
</tr>
<tr>
<td>menu_button</td>
<td><a href="#menubutton">MenuButton</a></td>
<td>Optional</td>
<td>A JSON-serialized object for the bot&#39;s new menu button. Defaults to <a href="#menubuttondefault">MenuButtonDefault</a></td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="getchatmenubutton" href="#getchatmenubutton"><i class="anchor-icon"></i></a>getChatMenuButton</h4>
<p>Use this method to get the current value of the bot&#39;s menu button in a private chat, or the default menu button. Returns <a href="#menubutton">MenuButton</a> on success.</p>
<table class="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>chat_id</td>
<td>Integer</td>
<td>Optional</td>
<td>Unique identifier for the target private chat. If not specified, default bot&#39;s menu button will be returned</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="setmydefaultadministratorrights" href="#setmydefaultadministratorrights"><i class="anchor-icon"></i></a>setMyDefaultAdministratorRights</h4>
<p>Use this method to change the default administrator rights requested by the bot when it&#39;s added as an administrator to groups or channels. These rights will be suggested to users, but they are free to modify the list before adding the bot. Returns <em>True</em> on success.</p>
<table class="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>rights</td>
<td><a href="#chatadministratorrights">ChatAdministratorRights</a></td>
<td>Optional</td>
<td>A JSON-serialized object describing new default administrator rights. If not specified, the default administrator rights will be cleared.</td>
</tr>
<tr>
<td>for_channels</td>
<td>Boolean</td>
<td>Optional</td>
<td>Pass <em>True</em> to change the default administrator rights of the bot in channels. Otherwise, the default administrator rights of the bot for groups and supergroups will be changed.</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="getmydefaultadministratorrights" href="#getmydefaultadministratorrights"><i class="anchor-icon"></i></a>getMyDefaultAdministratorRights</h4>
<p>Use this method to get the current default administrator rights of the bot. Returns <a href="#chatadministratorrights">ChatAdministratorRights</a> on success.</p>
<table class="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>for_channels</td>
<td>Boolean</td>
<td>Optional</td>
<td>Pass <em>True</em> to get default administrator rights of the bot in channels. Otherwise, default administrator rights of the bot for groups and supergroups will be returned.</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="inline-mode-methods" href="#inline-mode-methods"><i class="anchor-icon"></i></a>Inline mode methods</h4>
<p>Methods and objects used in the inline mode are described in the <a href="#inline-mode">Inline mode section</a>.</p>
<h3><a class="anchor" name="updating-messages" href="#updating-messages"><i class="anchor-icon"></i></a>Updating messages</h3>
<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 <a href="/bots/features#inline-keyboards">inline keyboards</a> using callback queries, but can also help reduce clutter in conversations with regular chat bots.</p>
<p>Please note, that it is currently only possible to edit messages without <em>reply_markup</em> or with <a href="/bots/features#inline-keyboards">inline keyboards</a>.</p>
<h4><a class="anchor" name="editmessagetext" href="#editmessagetext"><i class="anchor-icon"></i></a>editMessageText</h4>
<p>Use this method to edit text and <a href="#games">game</a> messages. On success, if the edited message is not an inline message, the edited <a href="#message">Message</a> is returned, otherwise <em>True</em> is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within <strong>48 hours</strong> from the time they were sent.</p>
<table class="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>business_connection_id</td>
<td>String</td>
<td>Optional</td>
<td>Unique identifier of the business connection on behalf of which the message to be edited was sent</td>
</tr>
<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 <a href="#formatting-options">formatting options</a> for more details.</td>
</tr>
<tr>
<td>entities</td>
<td>Array of <a href="#messageentity">MessageEntity</a></td>
<td>Optional</td>
<td>A JSON-serialized list of special entities that appear in message text, which can be specified instead of <em>parse_mode</em></td>
</tr>
<tr>
<td>link_preview_options</td>
<td><a href="#linkpreviewoptions">LinkPreviewOptions</a></td>
<td>Optional</td>
<td>Link preview generation options for the message</td>
</tr>
<tr>
<td>reply_markup</td>
<td><a href="#inlinekeyboardmarkup">InlineKeyboardMarkup</a></td>
<td>Optional</td>
<td>A JSON-serialized object for an <a href="/bots/features#inline-keyboards">inline keyboard</a>.</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="editmessagecaption" href="#editmessagecaption"><i class="anchor-icon"></i></a>editMessageCaption</h4>
<p>Use this method to edit captions of messages. On success, if the edited message is not an inline message, the edited <a href="#message">Message</a> is returned, otherwise <em>True</em> is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within <strong>48 hours</strong> from the time they were sent.</p>
<table class="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>business_connection_id</td>
<td>String</td>
<td>Optional</td>
<td>Unique identifier of the business connection on behalf of which the message to be edited was sent</td>
</tr>
<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 <a href="#formatting-options">formatting options</a> for more details.</td>
</tr>
<tr>
<td>caption_entities</td>
<td>Array of <a href="#messageentity">MessageEntity</a></td>
<td>Optional</td>
<td>A JSON-serialized list of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em></td>
</tr>
<tr>
<td>show_caption_above_media</td>
<td>Boolean</td>
<td>Optional</td>
<td>Pass <em>True</em>, if the caption must be shown above the message media. Supported only for animation, photo and video messages.</td>
</tr>
<tr>
<td>reply_markup</td>
<td><a href="#inlinekeyboardmarkup">InlineKeyboardMarkup</a></td>
<td>Optional</td>
<td>A JSON-serialized object for an <a href="/bots/features#inline-keyboards">inline keyboard</a>.</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="editmessagemedia" href="#editmessagemedia"><i class="anchor-icon"></i></a>editMessageMedia</h4>
<p>Use this method to edit animation, audio, document, photo, or video messages. If a message is part of a message album, then it can be edited only to an audio for audio albums, only to a document for document albums and to a photo or a video otherwise. When an inline message is edited, a new file can&#39;t be uploaded; use a previously uploaded file via its file_id or specify a URL. On success, if the edited message is not an inline message, the edited <a href="#message">Message</a> is returned, otherwise <em>True</em> is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within <strong>48 hours</strong> from the time they were sent.</p>
<table class="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>business_connection_id</td>
<td>String</td>
<td>Optional</td>
<td>Unique identifier of the business connection on behalf of which the message to be edited was sent</td>
</tr>
<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><a href="#inputmedia">InputMedia</a></td>
<td>Yes</td>
<td>A JSON-serialized object for a new media content of the message</td>
</tr>
<tr>
<td>reply_markup</td>
<td><a href="#inlinekeyboardmarkup">InlineKeyboardMarkup</a></td>
<td>Optional</td>
<td>A JSON-serialized object for a new <a href="/bots/features#inline-keyboards">inline keyboard</a>.</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="editmessagelivelocation" href="#editmessagelivelocation"><i class="anchor-icon"></i></a>editMessageLiveLocation</h4>
<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 <a href="#stopmessagelivelocation">stopMessageLiveLocation</a>. On success, if the edited message is not an inline message, the edited <a href="#message">Message</a> is returned, otherwise <em>True</em> is returned.</p>
<table class="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>business_connection_id</td>
<td>String</td>
<td>Optional</td>
<td>Unique identifier of the business connection on behalf of which the message to be edited was sent</td>
</tr>
<tr>
<td>chat_id</td>
<td>Integer or String</td>
<td>Optional</td>
<td>Required if <em>inline_message_id</em> is not specified. Unique identifier for the target chat or username of the target channel (in the format <code>@channelusername</code>)</td>
</tr>
<tr>
<td>message_id</td>
<td>Integer</td>
<td>Optional</td>
<td>Required if <em>inline_message_id</em> is not specified. Identifier of the message to edit</td>
</tr>
<tr>
<td>inline_message_id</td>
<td>String</td>
<td>Optional</td>
<td>Required if <em>chat_id</em> and <em>message_id</em> are not specified. Identifier of the inline message</td>
</tr>
<tr>
<td>latitude</td>
<td>Float</td>
<td>Yes</td>
<td>Latitude of new location</td>
</tr>
<tr>
<td>longitude</td>
<td>Float</td>
<td>Yes</td>
<td>Longitude of new location</td>
</tr>
<tr>
<td>live_period</td>
<td>Integer</td>
<td>Optional</td>
<td>New period in seconds during which the location can be updated, starting from the message send date. If 0x7FFFFFFF is specified, then the location can be updated forever. Otherwise, the new value must not exceed the current <em>live_period</em> by more than a day, and the live location expiration date must remain within the next 90 days. If not specified, then <em>live_period</em> remains unchanged</td>
</tr>
<tr>
<td>horizontal_accuracy</td>
<td>Float</td>
<td>Optional</td>
<td>The radius of uncertainty for the location, measured in meters; 0-1500</td>
</tr>
<tr>
<td>heading</td>
<td>Integer</td>
<td>Optional</td>
<td>Direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.</td>
</tr>
<tr>
<td>proximity_alert_radius</td>
<td>Integer</td>
<td>Optional</td>
<td>The maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.</td>
</tr>
<tr>
<td>reply_markup</td>
<td><a href="#inlinekeyboardmarkup">InlineKeyboardMarkup</a></td>
<td>Optional</td>
<td>A JSON-serialized object for a new <a href="/bots/features#inline-keyboards">inline keyboard</a>.</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="stopmessagelivelocation" href="#stopmessagelivelocation"><i class="anchor-icon"></i></a>stopMessageLiveLocation</h4>
<p>Use this method to stop updating a live location message before <em>live_period</em> expires. On success, if the message is not an inline message, the edited <a href="#message">Message</a> is returned, otherwise <em>True</em> is returned.</p>
<table class="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>business_connection_id</td>
<td>String</td>
<td>Optional</td>
<td>Unique identifier of the business connection on behalf of which the message to be edited was sent</td>
</tr>
<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>
</tr>
<tr>
<td>reply_markup</td>
<td><a href="#inlinekeyboardmarkup">InlineKeyboardMarkup</a></td>
<td>Optional</td>
<td>A JSON-serialized object for a new <a href="/bots/features#inline-keyboards">inline keyboard</a>.</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="editmessagereplymarkup" href="#editmessagereplymarkup"><i class="anchor-icon"></i></a>editMessageReplyMarkup</h4>
<p>Use this method to edit only the reply markup of messages. On success, if the edited message is not an inline message, the edited <a href="#message">Message</a> is returned, otherwise <em>True</em> is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within <strong>48 hours</strong> from the time they were sent.</p>
<table class="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>business_connection_id</td>
<td>String</td>
<td>Optional</td>
<td>Unique identifier of the business connection on behalf of which the message to be edited was sent</td>
</tr>
<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>reply_markup</td>
<td><a href="#inlinekeyboardmarkup">InlineKeyboardMarkup</a></td>
<td>Optional</td>
<td>A JSON-serialized object for an <a href="/bots/features#inline-keyboards">inline keyboard</a>.</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="stoppoll" href="#stoppoll"><i class="anchor-icon"></i></a>stopPoll</h4>
<p>Use this method to stop a poll which was sent by the bot. On success, the stopped <a href="#poll">Poll</a> is returned.</p>
<table class="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>business_connection_id</td>
<td>String</td>
<td>Optional</td>
<td>Unique identifier of the business connection on behalf of which the message to be edited was sent</td>
</tr>
<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 the original message with the poll</td>
</tr>
<tr>
<td>reply_markup</td>
<td><a href="#inlinekeyboardmarkup">InlineKeyboardMarkup</a></td>
<td>Optional</td>
<td>A JSON-serialized object for a new message <a href="/bots/features#inline-keyboards">inline keyboard</a>.</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="deletemessage" href="#deletemessage"><i class="anchor-icon"></i></a>deleteMessage</h4>
<p>Use this method to delete a message, including service messages, with the following limitations:<br>- A message can only be deleted if it was sent less than 48 hours ago.<br>- Service messages about a supergroup, channel, or forum topic creation can&#39;t be deleted.<br>- A dice message in a private chat can only be deleted if it was sent more than 24 hours ago.<br>- Bots can delete outgoing messages in private chats, groups, and supergroups.<br>- Bots can delete incoming messages in private chats.<br>- Bots granted <em>can_post_messages</em> permissions can delete outgoing messages in channels.<br>- If the bot is an administrator of a group, it can delete any message there.<br>- If the bot has <em>can_delete_messages</em> permission in a supergroup or a channel, it can delete any message there.<br>Returns <em>True</em> on success.</p>
<table class="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 the message to delete</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="deletemessages" href="#deletemessages"><i class="anchor-icon"></i></a>deleteMessages</h4>
<p>Use this method to delete multiple messages simultaneously. If some of the specified messages can&#39;t be found, they are skipped. Returns <em>True</em> on success.</p>
<table class="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_ids</td>
<td>Array of Integer</td>
<td>Yes</td>
<td>A JSON-serialized list of 1-100 identifiers of messages to delete. See <a href="#deletemessage">deleteMessage</a> for limitations on which messages can be deleted</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" name="stickers" href="#stickers"><i class="anchor-icon"></i></a>Stickers</h3>
<p>The following methods and objects allow your bot to handle stickers and sticker sets.</p>
<h4><a class="anchor" name="sticker" href="#sticker"><i class="anchor-icon"></i></a>Sticker</h4>
<p>This object represents a sticker.</p>
<table class="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&#39;t be used to download or reuse the file.</td>
</tr>
<tr>
<td>type</td>
<td>String</td>
<td>Type of the sticker, currently one of “regular”, “mask”, “custom_emoji”. The type of the sticker is independent from its format, which is determined by the fields <em>is_animated</em> and <em>is_video</em>.</td>
</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 <a href="https://telegram.org/blog/animated-stickers">animated</a></td>
</tr>
<tr>
<td>is_video</td>
<td>Boolean</td>
<td><em>True</em>, if the sticker is a <a href="https://telegram.org/blog/video-stickers-better-reactions">video sticker</a></td>
</tr>
<tr>
<td>thumbnail</td>
<td><a href="#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>premium_animation</td>
<td><a href="#file">File</a></td>
<td><em>Optional</em>. For premium regular stickers, premium animation for the sticker</td>
</tr>
<tr>
<td>mask_position</td>
<td><a href="#maskposition">MaskPosition</a></td>
<td><em>Optional</em>. For mask stickers, the position where the mask should be placed</td>
</tr>
<tr>
<td>custom_emoji_id</td>
<td>String</td>
<td><em>Optional</em>. For custom emoji stickers, unique identifier of the custom emoji</td>
</tr>
<tr>
<td>needs_repainting</td>
<td>True</td>
<td><em>Optional</em>. <em>True</em>, if the sticker must be repainted to a text color in messages, the color of the Telegram Premium badge in emoji status, white color on chat photos, or another appropriate color in other places</td>
</tr>
<tr>
<td>file_size</td>
<td>Integer</td>
<td><em>Optional</em>. File size in bytes</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="stickerset" href="#stickerset"><i class="anchor-icon"></i></a>StickerSet</h4>
<p>This object represents a sticker set.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>name</td>
<td>String</td>
<td>Sticker set name</td>
</tr>
<tr>
<td>title</td>
<td>String</td>
<td>Sticker set title</td>
</tr>
<tr>
<td>sticker_type</td>
<td>String</td>
<td>Type of stickers in the set, currently one of “regular”, “mask”, “custom_emoji”</td>
</tr>
<tr>
<td>stickers</td>
<td>Array of <a href="#sticker">Sticker</a></td>
<td>List of all set stickers</td>
</tr>
<tr>
<td>thumbnail</td>
<td><a href="#photosize">PhotoSize</a></td>
<td><em>Optional</em>. Sticker set thumbnail in the .WEBP, .TGS, or .WEBM format</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="maskposition" href="#maskposition"><i class="anchor-icon"></i></a>MaskPosition</h4>
<p>This object describes the position on faces where a mask should be placed by default.</p>
<table class="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</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</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</td>
<td>Mask scaling coefficient. For example, 2.0 means double size.</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="inputsticker" href="#inputsticker"><i class="anchor-icon"></i></a>InputSticker</h4>
<p>This object describes a sticker to be added to a sticker set.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>sticker</td>
<td><a href="#inputfile">InputFile</a> or String</td>
<td>The added sticker. 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, upload a new one using multipart/form-data, or pass “attach://&lt;file_attach_name&gt;” to upload a new one using multipart/form-data under &lt;file_attach_name&gt; name. Animated and video stickers can&#39;t be uploaded via HTTP URL. <a href="#sending-files">More information on Sending Files »</a></td>
</tr>
<tr>
<td>format</td>
<td>String</td>
<td>Format of the added sticker, must be one of “static” for a <strong>.WEBP</strong> or <strong>.PNG</strong> image, “animated” for a <strong>.TGS</strong> animation, “video” for a <strong>WEBM</strong> video</td>
</tr>
<tr>
<td>emoji_list</td>
<td>Array of String</td>
<td>List of 1-20 emoji associated with the sticker</td>
</tr>
<tr>
<td>mask_position</td>
<td><a href="#maskposition">MaskPosition</a></td>
<td><em>Optional</em>. Position where the mask should be placed on faces. For “mask” stickers only.</td>
</tr>
<tr>
<td>keywords</td>
<td>Array of String</td>
<td><em>Optional</em>. List of 0-20 search keywords for the sticker with total length of up to 64 characters. For “regular” and “custom_emoji” stickers only.</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="sendsticker" href="#sendsticker"><i class="anchor-icon"></i></a>sendSticker</h4>
<p>Use this method to send static .WEBP, <a href="https://telegram.org/blog/animated-stickers">animated</a> .TGS, or <a href="https://telegram.org/blog/video-stickers-better-reactions">video</a> .WEBM stickers. On success, the sent <a href="#message">Message</a> is returned.</p>
<table class="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>business_connection_id</td>
<td>String</td>
<td>Optional</td>
<td>Unique identifier of the business connection on behalf of which the message will be sent</td>
</tr>
<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_thread_id</td>
<td>Integer</td>
<td>Optional</td>
<td>Unique identifier for the target message thread (topic) of the forum; for forum supergroups only</td>
</tr>
<tr>
<td>sticker</td>
<td><a href="#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 sticker from the Internet, or upload a new .WEBP, .TGS, or .WEBM sticker using multipart/form-data. <a href="#sending-files">More information on Sending Files »</a>. Video and animated stickers can&#39;t be sent via an HTTP URL.</td>
</tr>
<tr>
<td>emoji</td>
<td>String</td>
<td>Optional</td>
<td>Emoji associated with the sticker; only for just uploaded stickers</td>
</tr>
<tr>
<td>disable_notification</td>
<td>Boolean</td>
<td>Optional</td>
<td>Sends the message <a href="https://telegram.org/blog/channels-2-0#silent-messages">silently</a>. Users will receive a notification with no sound.</td>
</tr>
<tr>
<td>protect_content</td>
<td>Boolean</td>
<td>Optional</td>
<td>Protects the contents of the sent message from forwarding and saving</td>
</tr>
<tr>
<td>message_effect_id</td>
<td>String</td>
<td>Optional</td>
<td>Unique identifier of the message effect to be added to the message; for private chats only</td>
</tr>
<tr>
<td>reply_parameters</td>
<td><a href="#replyparameters">ReplyParameters</a></td>
<td>Optional</td>
<td>Description of the message to reply to</td>
</tr>
<tr>
<td>reply_markup</td>
<td><a href="#inlinekeyboardmarkup">InlineKeyboardMarkup</a> or <a href="#replykeyboardmarkup">ReplyKeyboardMarkup</a> or <a href="#replykeyboardremove">ReplyKeyboardRemove</a> or <a href="#forcereply">ForceReply</a></td>
<td>Optional</td>
<td>Additional interface options. A JSON-serialized object for an <a href="/bots/features#inline-keyboards">inline keyboard</a>, <a href="/bots/features#keyboards">custom reply keyboard</a>, instructions to remove a reply keyboard or to force a reply from the user</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="getstickerset" href="#getstickerset"><i class="anchor-icon"></i></a>getStickerSet</h4>
<p>Use this method to get a sticker set. On success, a <a href="#stickerset">StickerSet</a> object is returned.</p>
<table class="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>Name of the sticker set</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="getcustomemojistickers" href="#getcustomemojistickers"><i class="anchor-icon"></i></a>getCustomEmojiStickers</h4>
<p>Use this method to get information about custom emoji stickers by their identifiers. Returns an Array of <a href="#sticker">Sticker</a> objects.</p>
<table class="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>custom_emoji_ids</td>
<td>Array of String</td>
<td>Yes</td>
<td>A JSON-serialized list of custom emoji identifiers. At most 200 custom emoji identifiers can be specified.</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="uploadstickerfile" href="#uploadstickerfile"><i class="anchor-icon"></i></a>uploadStickerFile</h4>
<p>Use this method to upload a file with a sticker for later use in the <a href="#createnewstickerset">createNewStickerSet</a>, <a href="#addstickertoset">addStickerToSet</a>, or <a href="#replacestickerinset">replaceStickerInSet</a> methods (the file can be used multiple times). Returns the uploaded <a href="#file">File</a> on success.</p>
<table class="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>sticker</td>
<td><a href="#inputfile">InputFile</a></td>
<td>Yes</td>
<td>A file with the sticker in .WEBP, .PNG, .TGS, or .WEBM format. See <a href="/stickers"><a href="https://core.telegram.org/stickers">https://core.telegram.org/stickers</a></a> for technical requirements. <a href="#sending-files">More information on Sending Files »</a></td>
</tr>
<tr>
<td>sticker_format</td>
<td>String</td>
<td>Yes</td>
<td>Format of the sticker, must be one of “static”, “animated”, “video”</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="createnewstickerset" href="#createnewstickerset"><i class="anchor-icon"></i></a>createNewStickerSet</h4>
<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. Returns <em>True</em> on success.</p>
<table class="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&#39;t contain consecutive underscores and must end in <code>&quot;_by_&lt;bot_username&gt;&quot;</code>. <code>&lt;bot_username&gt;</code> 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>stickers</td>
<td>Array of <a href="#inputsticker">InputSticker</a></td>
<td>Yes</td>
<td>A JSON-serialized list of 1-50 initial stickers to be added to the sticker set</td>
</tr>
<tr>
<td>sticker_type</td>
<td>String</td>
<td>Optional</td>
<td>Type of stickers in the set, pass “regular”, “mask”, or “custom_emoji”. By default, a regular sticker set is created.</td>
</tr>
<tr>
<td>needs_repainting</td>
<td>Boolean</td>
<td>Optional</td>
<td>Pass <em>True</em> if stickers in the sticker set must be repainted to the color of text when used in messages, the accent color if used as emoji status, white on chat photos, or another appropriate color based on context; for custom emoji sticker sets only</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="addstickertoset" href="#addstickertoset"><i class="anchor-icon"></i></a>addStickerToSet</h4>
<p>Use this method to add a new sticker to a set created by the bot. Emoji sticker sets can have up to 200 stickers. Other sticker sets can have up to 120 stickers. Returns <em>True</em> on success.</p>
<table class="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>sticker</td>
<td><a href="#inputsticker">InputSticker</a></td>
<td>Yes</td>
<td>A JSON-serialized object with information about the added sticker. If exactly the same sticker had already been added to the set, then the set isn&#39;t changed.</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="setstickerpositioninset" href="#setstickerpositioninset"><i class="anchor-icon"></i></a>setStickerPositionInSet</h4>
<p>Use this method to move a sticker in a set created by the bot to a specific position. Returns <em>True</em> on success.</p>
<table class="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>sticker</td>
<td>String</td>
<td>Yes</td>
<td>File identifier of the sticker</td>
</tr>
<tr>
<td>position</td>
<td>Integer</td>
<td>Yes</td>
<td>New sticker position in the set, zero-based</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="deletestickerfromset" href="#deletestickerfromset"><i class="anchor-icon"></i></a>deleteStickerFromSet</h4>
<p>Use this method to delete a sticker from a set created by the bot. Returns <em>True</em> on success.</p>
<table class="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>sticker</td>
<td>String</td>
<td>Yes</td>
<td>File identifier of the sticker</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="replacestickerinset" href="#replacestickerinset"><i class="anchor-icon"></i></a>replaceStickerInSet</h4>
<p>Use this method to replace an existing sticker in a sticker set with a new one. The method is equivalent to calling <a href="#deletestickerfromset">deleteStickerFromSet</a>, then <a href="#addstickertoset">addStickerToSet</a>, then <a href="#setstickerpositioninset">setStickerPositionInSet</a>. Returns <em>True</em> on success.</p>
<table class="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 the sticker set owner</td>
</tr>
<tr>
<td>name</td>
<td>String</td>
<td>Yes</td>
<td>Sticker set name</td>
</tr>
<tr>
<td>old_sticker</td>
<td>String</td>
<td>Yes</td>
<td>File identifier of the replaced sticker</td>
</tr>
<tr>
<td>sticker</td>
<td><a href="#inputsticker">InputSticker</a></td>
<td>Yes</td>
<td>A JSON-serialized object with information about the added sticker. If exactly the same sticker had already been added to the set, then the set remains unchanged.</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="setstickeremojilist" href="#setstickeremojilist"><i class="anchor-icon"></i></a>setStickerEmojiList</h4>
<p>Use this method to change the list of emoji assigned to a regular or custom emoji sticker. The sticker must belong to a sticker set created by the bot. Returns <em>True</em> on success.</p>
<table class="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>sticker</td>
<td>String</td>
<td>Yes</td>
<td>File identifier of the sticker</td>
</tr>
<tr>
<td>emoji_list</td>
<td>Array of String</td>
<td>Yes</td>
<td>A JSON-serialized list of 1-20 emoji associated with the sticker</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="setstickerkeywords" href="#setstickerkeywords"><i class="anchor-icon"></i></a>setStickerKeywords</h4>
<p>Use this method to change search keywords assigned to a regular or custom emoji sticker. The sticker must belong to a sticker set created by the bot. Returns <em>True</em> on success.</p>
<table class="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>sticker</td>
<td>String</td>
<td>Yes</td>
<td>File identifier of the sticker</td>
</tr>
<tr>
<td>keywords</td>
<td>Array of String</td>
<td>Optional</td>
<td>A JSON-serialized list of 0-20 search keywords for the sticker with total length of up to 64 characters</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="setstickermaskposition" href="#setstickermaskposition"><i class="anchor-icon"></i></a>setStickerMaskPosition</h4>
<p>Use this method to change the <a href="#maskposition">mask position</a> of a mask sticker. The sticker must belong to a sticker set that was created by the bot. Returns <em>True</em> on success.</p>
<table class="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>sticker</td>
<td>String</td>
<td>Yes</td>
<td>File identifier of the sticker</td>
</tr>
<tr>
<td>mask_position</td>
<td><a href="#maskposition">MaskPosition</a></td>
<td>Optional</td>
<td>A JSON-serialized object with the position where the mask should be placed on faces. Omit the parameter to remove the mask position.</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="setstickersettitle" href="#setstickersettitle"><i class="anchor-icon"></i></a>setStickerSetTitle</h4>
<p>Use this method to set the title of a created sticker set. Returns <em>True</em> on success.</p>
<table class="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>title</td>
<td>String</td>
<td>Yes</td>
<td>Sticker set title, 1-64 characters</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="setstickersetthumbnail" href="#setstickersetthumbnail"><i class="anchor-icon"></i></a>setStickerSetThumbnail</h4>
<p>Use this method to set the thumbnail of a regular or mask sticker set. The format of the thumbnail file must match the format of the stickers in the set. Returns <em>True</em> on success.</p>
<table class="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>thumbnail</td>
<td><a href="#inputfile">InputFile</a> or String</td>
<td>Optional</td>
<td>A <strong>.WEBP</strong> or <strong>.PNG</strong> image with the thumbnail, must be up to 128 kilobytes in size and have a width and height of exactly 100px, or a <strong>.TGS</strong> animation with a thumbnail up to 32 kilobytes in size (see <a href="/stickers#animation-requirements"><a href="https://core.telegram.org/stickers#animation-requirements">https://core.telegram.org/stickers#animation-requirements</a></a> for animated sticker technical requirements), or a <strong>WEBM</strong> video with the thumbnail up to 32 kilobytes in size; see <a href="/stickers#video-requirements"><a href="https://core.telegram.org/stickers#video-requirements">https://core.telegram.org/stickers#video-requirements</a></a> for video sticker technical requirements. Pass a <em>file_id</em> as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. <a href="#sending-files">More information on Sending Files »</a>. Animated and video sticker set thumbnails can&#39;t be uploaded via HTTP URL. If omitted, then the thumbnail is dropped and the first sticker is used as the thumbnail.</td>
</tr>
<tr>
<td>format</td>
<td>String</td>
<td>Yes</td>
<td>Format of the thumbnail, must be one of “static” for a <strong>.WEBP</strong> or <strong>.PNG</strong> image, “animated” for a <strong>.TGS</strong> animation, or “video” for a <strong>WEBM</strong> video</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="setcustomemojistickersetthumbnail" href="#setcustomemojistickersetthumbnail"><i class="anchor-icon"></i></a>setCustomEmojiStickerSetThumbnail</h4>
<p>Use this method to set the thumbnail of a custom emoji sticker set. Returns <em>True</em> on success.</p>
<table class="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>custom_emoji_id</td>
<td>String</td>
<td>Optional</td>
<td>Custom emoji identifier of a sticker from the sticker set; pass an empty string to drop the thumbnail and use the first sticker as the thumbnail.</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="deletestickerset" href="#deletestickerset"><i class="anchor-icon"></i></a>deleteStickerSet</h4>
<p>Use this method to delete a sticker set that was created by the bot. Returns <em>True</em> on success.</p>
<table class="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>
</tbody>
</table>
<h3><a class="anchor" name="inline-mode" href="#inline-mode"><i class="anchor-icon"></i></a>Inline mode</h3>
<p>The following methods and objects allow your bot to work in <a href="/bots/inline">inline mode</a>.<br>Please see our <a href="/bots/inline">Introduction to Inline bots</a> for more details.</p>
<p>To enable this option, send the <code>/setinline</code> command to <a href="https://t.me/botfather">@BotFather</a> and provide the placeholder text that the user will see in the input field after typing your bot&#39;s name.</p>
<h4><a class="anchor" name="inlinequery" href="#inlinequery"><i class="anchor-icon"></i></a>InlineQuery</h4>
<p>This object represents an incoming inline query. When the user sends an empty query, your bot could return some default or trending results.</p>
<table class="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><a href="#user">User</a></td>
<td>Sender</td>
</tr>
<tr>
<td>query</td>
<td>String</td>
<td>Text of the query (up to 256 characters)</td>
</tr>
<tr>
<td>offset</td>
<td>String</td>
<td>Offset of the results to be returned, can be controlled by the bot</td>
</tr>
<tr>
<td>chat_type</td>
<td>String</td>
<td><em>Optional</em>. Type of the chat from which the inline query was sent. Can be either “sender” for a private chat with the inline query sender, “private”, “group”, “supergroup”, or “channel”. The chat type should be always known for requests sent from official clients and most third-party clients, unless the request was sent from a secret chat</td>
</tr>
<tr>
<td>location</td>
<td><a href="#location">Location</a></td>
<td><em>Optional</em>. Sender location, only for bots that request user location</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="answerinlinequery" href="#answerinlinequery"><i class="anchor-icon"></i></a>answerInlineQuery</h4>
<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>
<table class="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 <a href="#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&#39;t support pagination. Offset length can&#39;t exceed 64 bytes.</td>
</tr>
<tr>
<td>button</td>
<td><a href="#inlinequeryresultsbutton">InlineQueryResultsButton</a></td>
<td>Optional</td>
<td>A JSON-serialized object describing a button to be shown above inline query results</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="inlinequeryresultsbutton" href="#inlinequeryresultsbutton"><i class="anchor-icon"></i></a>InlineQueryResultsButton</h4>
<p>This object represents a button to be shown above inline query results. You <strong>must</strong> use exactly one of the optional fields.</p>
<table class="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>web_app</td>
<td><a href="#webappinfo">WebAppInfo</a></td>
<td><em>Optional</em>. Description of the <a href="/bots/webapps">Web App</a> that will be launched when the user presses the button. The Web App will be able to switch back to the inline mode using the method <a href="/bots/webapps#initializing-mini-apps">switchInlineQuery</a> inside the Web App.</td>
</tr>
<tr>
<td>start_parameter</td>
<td>String</td>
<td><em>Optional</em>. <a href="/bots/features#deep-linking">Deep-linking</a> parameter for the /start message sent to the bot when a user presses the 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 &#39;Connect your YouTube account&#39; 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 <a href="#inlinekeyboardmarkup"><em>switch_inline</em></a> button so that the user can easily return to the chat where they wanted to use the bot&#39;s inline capabilities.</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="inlinequeryresult" href="#inlinequeryresult"><i class="anchor-icon"></i></a>InlineQueryResult</h4>
<p>This object represents one result of an inline query. Telegram clients currently support results of the following 20 types:</p>
<ul>
<li><a href="#inlinequeryresultcachedaudio">InlineQueryResultCachedAudio</a></li>
<li><a href="#inlinequeryresultcacheddocument">InlineQueryResultCachedDocument</a></li>
<li><a href="#inlinequeryresultcachedgif">InlineQueryResultCachedGif</a></li>
<li><a href="#inlinequeryresultcachedmpeg4gif">InlineQueryResultCachedMpeg4Gif</a></li>
<li><a href="#inlinequeryresultcachedphoto">InlineQueryResultCachedPhoto</a></li>
<li><a href="#inlinequeryresultcachedsticker">InlineQueryResultCachedSticker</a></li>
<li><a href="#inlinequeryresultcachedvideo">InlineQueryResultCachedVideo</a></li>
<li><a href="#inlinequeryresultcachedvoice">InlineQueryResultCachedVoice</a></li>
<li><a href="#inlinequeryresultarticle">InlineQueryResultArticle</a></li>
<li><a href="#inlinequeryresultaudio">InlineQueryResultAudio</a></li>
<li><a href="#inlinequeryresultcontact">InlineQueryResultContact</a></li>
<li><a href="#inlinequeryresultgame">InlineQueryResultGame</a></li>
<li><a href="#inlinequeryresultdocument">InlineQueryResultDocument</a></li>
<li><a href="#inlinequeryresultgif">InlineQueryResultGif</a></li>
<li><a href="#inlinequeryresultlocation">InlineQueryResultLocation</a></li>
<li><a href="#inlinequeryresultmpeg4gif">InlineQueryResultMpeg4Gif</a></li>
<li><a href="#inlinequeryresultphoto">InlineQueryResultPhoto</a></li>
<li><a href="#inlinequeryresultvenue">InlineQueryResultVenue</a></li>
<li><a href="#inlinequeryresultvideo">InlineQueryResultVideo</a></li>
<li><a href="#inlinequeryresultvoice">InlineQueryResultVoice</a></li>
</ul>
<p><strong>Note:</strong> All URLs passed in inline query results will be available to end users and therefore must be assumed to be <strong>public</strong>.</p>
<h4><a class="anchor" name="inlinequeryresultarticle" href="#inlinequeryresultarticle"><i class="anchor-icon"></i></a>InlineQueryResultArticle</h4>
<p>Represents a link to an article or web page.</p>
<table class="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>article</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 of the result</td>
</tr>
<tr>
<td>input_message_content</td>
<td><a href="#inputmessagecontent">InputMessageContent</a></td>
<td>Content of the message to be sent</td>
</tr>
<tr>
<td>reply_markup</td>
<td><a href="#inlinekeyboardmarkup">InlineKeyboardMarkup</a></td>
<td><em>Optional</em>. <a href="/bots/features#inline-keyboards">Inline keyboard</a> attached to the message</td>
</tr>
<tr>
<td>url</td>
<td>String</td>
<td><em>Optional</em>. URL of the result</td>
</tr>
<tr>
<td>hide_url</td>
<td>Boolean</td>
<td><em>Optional</em>. Pass <em>True</em> if you don&#39;t want the URL to be shown in the message</td>
</tr>
<tr>
<td>description</td>
<td>String</td>
<td><em>Optional</em>. Short description of the result</td>
</tr>
<tr>
<td>thumbnail_url</td>
<td>String</td>
<td><em>Optional</em>. Url of the thumbnail for the result</td>
</tr>
<tr>
<td>thumbnail_width</td>
<td>Integer</td>
<td><em>Optional</em>. Thumbnail width</td>
</tr>
<tr>
<td>thumbnail_height</td>
<td>Integer</td>
<td><em>Optional</em>. Thumbnail height</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="inlinequeryresultphoto" href="#inlinequeryresultphoto"><i class="anchor-icon"></i></a>InlineQueryResultPhoto</h4>
<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>
<table class="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>thumbnail_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 <a href="#formatting-options">formatting options</a> for more details.</td>
</tr>
<tr>
<td>caption_entities</td>
<td>Array of <a href="#messageentity">MessageEntity</a></td>
<td><em>Optional</em>. List of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em></td>
</tr>
<tr>
<td>show_caption_above_media</td>
<td>Boolean</td>
<td><em>Optional</em>. Pass <em>True</em>, if the caption must be shown above the message media</td>
</tr>
<tr>
<td>reply_markup</td>
<td><a href="#inlinekeyboardmarkup">InlineKeyboardMarkup</a></td>
<td><em>Optional</em>. <a href="/bots/features#inline-keyboards">Inline keyboard</a> attached to the message</td>
</tr>
<tr>
<td>input_message_content</td>
<td><a href="#inputmessagecontent">InputMessageContent</a></td>
<td><em>Optional</em>. Content of the message to be sent instead of the photo</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="inlinequeryresultgif" href="#inlinequeryresultgif"><i class="anchor-icon"></i></a>InlineQueryResultGif</h4>
<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>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>type</td>
<td>String</td>
<td>Type of the result, must be <em>gif</em></td>
</tr>
<tr>
<td>id</td>
<td>String</td>
<td>Unique identifier for this result, 1-64 bytes</td>
</tr>
<tr>
<td>gif_url</td>
<td>String</td>
<td>A valid URL for the GIF file. File size must not exceed 1MB</td>
</tr>
<tr>
<td>gif_width</td>
<td>Integer</td>
<td><em>Optional</em>. Width of the GIF</td>
</tr>
<tr>
<td>gif_height</td>
<td>Integer</td>
<td><em>Optional</em>. Height of the GIF</td>
</tr>
<tr>
<td>gif_duration</td>
<td>Integer</td>
<td><em>Optional</em>. Duration of the GIF in seconds</td>
</tr>
<tr>
<td>thumbnail_url</td>
<td>String</td>
<td>URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result</td>
</tr>
<tr>
<td>thumbnail_mime_type</td>
<td>String</td>
<td><em>Optional</em>. MIME type of the thumbnail, must be one of “image/jpeg”, “image/gif”, or “video/mp4”. Defaults to “image/jpeg”</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 <a href="#formatting-options">formatting options</a> for more details.</td>
</tr>
<tr>
<td>caption_entities</td>
<td>Array of <a href="#messageentity">MessageEntity</a></td>
<td><em>Optional</em>. List of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em></td>
</tr>
<tr>
<td>show_caption_above_media</td>
<td>Boolean</td>
<td><em>Optional</em>. Pass <em>True</em>, if the caption must be shown above the message media</td>
</tr>
<tr>
<td>reply_markup</td>
<td><a href="#inlinekeyboardmarkup">InlineKeyboardMarkup</a></td>
<td><em>Optional</em>. <a href="/bots/features#inline-keyboards">Inline keyboard</a> attached to the message</td>
</tr>
<tr>
<td>input_message_content</td>
<td><a href="#inputmessagecontent">InputMessageContent</a></td>
<td><em>Optional</em>. Content of the message to be sent instead of the GIF animation</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="inlinequeryresultmpeg4gif" href="#inlinequeryresultmpeg4gif"><i class="anchor-icon"></i></a>InlineQueryResultMpeg4Gif</h4>
<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>
<table class="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 MPEG4 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 in seconds</td>
</tr>
<tr>
<td>thumbnail_url</td>
<td>String</td>
<td>URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result</td>
</tr>
<tr>
<td>thumbnail_mime_type</td>
<td>String</td>
<td><em>Optional</em>. MIME type of the thumbnail, must be one of “image/jpeg”, “image/gif”, or “video/mp4”. Defaults to “image/jpeg”</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 <a href="#formatting-options">formatting options</a> for more details.</td>
</tr>
<tr>
<td>caption_entities</td>
<td>Array of <a href="#messageentity">MessageEntity</a></td>
<td><em>Optional</em>. List of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em></td>
</tr>
<tr>
<td>show_caption_above_media</td>
<td>Boolean</td>
<td><em>Optional</em>. Pass <em>True</em>, if the caption must be shown above the message media</td>
</tr>
<tr>
<td>reply_markup</td>
<td><a href="#inlinekeyboardmarkup">InlineKeyboardMarkup</a></td>
<td><em>Optional</em>. <a href="/bots/features#inline-keyboards">Inline keyboard</a> attached to the message</td>
</tr>
<tr>
<td>input_message_content</td>
<td><a href="#inputmessagecontent">InputMessageContent</a></td>
<td><em>Optional</em>. Content of the message to be sent instead of the video animation</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="inlinequeryresultvideo" href="#inlinequeryresultvideo"><i class="anchor-icon"></i></a>InlineQueryResultVideo</h4>
<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>
<table class="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 the video URL, “text/html” or “video/mp4”</td>
</tr>
<tr>
<td>thumbnail_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 <a href="#formatting-options">formatting options</a> for more details.</td>
</tr>
<tr>
<td>caption_entities</td>
<td>Array of <a href="#messageentity">MessageEntity</a></td>
<td><em>Optional</em>. List of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em></td>
</tr>
<tr>
<td>show_caption_above_media</td>
<td>Boolean</td>
<td><em>Optional</em>. Pass <em>True</em>, if the caption must be shown above the message media</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>
</tr>
<tr>
<td>reply_markup</td>
<td><a href="#inlinekeyboardmarkup">InlineKeyboardMarkup</a></td>
<td><em>Optional</em>. <a href="/bots/features#inline-keyboards">Inline keyboard</a> attached to the message</td>
</tr>
<tr>
<td>input_message_content</td>
<td><a href="#inputmessagecontent">InputMessageContent</a></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>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="inlinequeryresultaudio" href="#inlinequeryresultaudio"><i class="anchor-icon"></i></a>InlineQueryResultAudio</h4>
<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>
<table class="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 <a href="#formatting-options">formatting options</a> for more details.</td>
</tr>
<tr>
<td>caption_entities</td>
<td>Array of <a href="#messageentity">MessageEntity</a></td>
<td><em>Optional</em>. List of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em></td>
</tr>
<tr>
<td>performer</td>
<td>String</td>
<td><em>Optional</em>. Performer</td>
</tr>
<tr>
<td>audio_duration</td>
<td>Integer</td>
<td><em>Optional</em>. Audio duration in seconds</td>
</tr>
<tr>
<td>reply_markup</td>
<td><a href="#inlinekeyboardmarkup">InlineKeyboardMarkup</a></td>
<td><em>Optional</em>. <a href="/bots/features#inline-keyboards">Inline keyboard</a> attached to the message</td>
</tr>
<tr>
<td>input_message_content</td>
<td><a href="#inputmessagecontent">InputMessageContent</a></td>
<td><em>Optional</em>. Content of the message to be sent instead of the audio</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="inlinequeryresultvoice" href="#inlinequeryresultvoice"><i class="anchor-icon"></i></a>InlineQueryResultVoice</h4>
<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>
<table class="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 <a href="#formatting-options">formatting options</a> for more details.</td>
</tr>
<tr>
<td>caption_entities</td>
<td>Array of <a href="#messageentity">MessageEntity</a></td>
<td><em>Optional</em>. List of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em></td>
</tr>
<tr>
<td>voice_duration</td>
<td>Integer</td>
<td><em>Optional</em>. Recording duration in seconds</td>
</tr>
<tr>
<td>reply_markup</td>
<td><a href="#inlinekeyboardmarkup">InlineKeyboardMarkup</a></td>
<td><em>Optional</em>. <a href="/bots/features#inline-keyboards">Inline keyboard</a> attached to the message</td>
</tr>
<tr>
<td>input_message_content</td>
<td><a href="#inputmessagecontent">InputMessageContent</a></td>
<td><em>Optional</em>. Content of the message to be sent instead of the voice recording</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="inlinequeryresultdocument" href="#inlinequeryresultdocument"><i class="anchor-icon"></i></a>InlineQueryResultDocument</h4>
<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>
<table class="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 <a href="#formatting-options">formatting options</a> for more details.</td>
</tr>
<tr>
<td>caption_entities</td>
<td>Array of <a href="#messageentity">MessageEntity</a></td>
<td><em>Optional</em>. List of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em></td>
</tr>
<tr>
<td>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>
</tr>
<tr>
<td>reply_markup</td>
<td><a href="#inlinekeyboardmarkup">InlineKeyboardMarkup</a></td>
<td><em>Optional</em>. Inline keyboard attached to the message</td>
</tr>
<tr>
<td>input_message_content</td>
<td><a href="#inputmessagecontent">InputMessageContent</a></td>
<td><em>Optional</em>. Content of the message to be sent instead of the file</td>
</tr>
<tr>
<td>thumbnail_url</td>
<td>String</td>
<td><em>Optional</em>. URL of the thumbnail (JPEG only) for the file</td>
</tr>
<tr>
<td>thumbnail_width</td>
<td>Integer</td>
<td><em>Optional</em>. Thumbnail width</td>
</tr>
<tr>
<td>thumbnail_height</td>
<td>Integer</td>
<td><em>Optional</em>. Thumbnail height</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="inlinequeryresultlocation" href="#inlinequeryresultlocation"><i class="anchor-icon"></i></a>InlineQueryResultLocation</h4>
<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>
<table class="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</td>
<td>Location latitude in degrees</td>
</tr>
<tr>
<td>longitude</td>
<td>Float</td>
<td>Location longitude in degrees</td>
</tr>
<tr>
<td>title</td>
<td>String</td>
<td>Location title</td>
</tr>
<tr>
<td>horizontal_accuracy</td>
<td>Float</td>
<td><em>Optional</em>. The radius of uncertainty for the location, measured in meters; 0-1500</td>
</tr>
<tr>
<td>live_period</td>
<td>Integer</td>
<td><em>Optional</em>. Period in seconds during which the location can be updated, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely.</td>
</tr>
<tr>
<td>heading</td>
<td>Integer</td>
<td><em>Optional</em>. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.</td>
</tr>
<tr>
<td>proximity_alert_radius</td>
<td>Integer</td>
<td><em>Optional</em>. For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.</td>
</tr>
<tr>
<td>reply_markup</td>
<td><a href="#inlinekeyboardmarkup">InlineKeyboardMarkup</a></td>
<td><em>Optional</em>. <a href="/bots/features#inline-keyboards">Inline keyboard</a> attached to the message</td>
</tr>
<tr>
<td>input_message_content</td>
<td><a href="#inputmessagecontent">InputMessageContent</a></td>
<td><em>Optional</em>. Content of the message to be sent instead of the location</td>
</tr>
<tr>
<td>thumbnail_url</td>
<td>String</td>
<td><em>Optional</em>. Url of the thumbnail for the result</td>
</tr>
<tr>
<td>thumbnail_width</td>
<td>Integer</td>
<td><em>Optional</em>. Thumbnail width</td>
</tr>
<tr>
<td>thumbnail_height</td>
<td>Integer</td>
<td><em>Optional</em>. Thumbnail height</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="inlinequeryresultvenue" href="#inlinequeryresultvenue"><i class="anchor-icon"></i></a>InlineQueryResultVenue</h4>
<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>
<table class="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>
</tr>
<tr>
<td>google_place_id</td>
<td>String</td>
<td><em>Optional</em>. Google Places identifier of the venue</td>
</tr>
<tr>
<td>google_place_type</td>
<td>String</td>
<td><em>Optional</em>. Google Places type of the venue. (See <a href="https://developers.google.com/places/web-service/supported_types">supported types</a>.)</td>
</tr>
<tr>
<td>reply_markup</td>
<td><a href="#inlinekeyboardmarkup">InlineKeyboardMarkup</a></td>
<td><em>Optional</em>. <a href="/bots/features#inline-keyboards">Inline keyboard</a> attached to the message</td>
</tr>
<tr>
<td>input_message_content</td>
<td><a href="#inputmessagecontent">InputMessageContent</a></td>
<td><em>Optional</em>. Content of the message to be sent instead of the venue</td>
</tr>
<tr>
<td>thumbnail_url</td>
<td>String</td>
<td><em>Optional</em>. Url of the thumbnail for the result</td>
</tr>
<tr>
<td>thumbnail_width</td>
<td>Integer</td>
<td><em>Optional</em>. Thumbnail width</td>
</tr>
<tr>
<td>thumbnail_height</td>
<td>Integer</td>
<td><em>Optional</em>. Thumbnail height</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="inlinequeryresultcontact" href="#inlinequeryresultcontact"><i class="anchor-icon"></i></a>InlineQueryResultContact</h4>
<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>
<table class="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&#39;s phone number</td>
</tr>
<tr>
<td>first_name</td>
<td>String</td>
<td>Contact&#39;s first name</td>
</tr>
<tr>
<td>last_name</td>
<td>String</td>
<td><em>Optional</em>. Contact&#39;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 <a href="https://en.wikipedia.org/wiki/VCard">vCard</a>, 0-2048 bytes</td>
</tr>
<tr>
<td>reply_markup</td>
<td><a href="#inlinekeyboardmarkup">InlineKeyboardMarkup</a></td>
<td><em>Optional</em>. <a href="/bots/features#inline-keyboards">Inline keyboard</a> attached to the message</td>
</tr>
<tr>
<td>input_message_content</td>
<td><a href="#inputmessagecontent">InputMessageContent</a></td>
<td><em>Optional</em>. Content of the message to be sent instead of the contact</td>
</tr>
<tr>
<td>thumbnail_url</td>
<td>String</td>
<td><em>Optional</em>. Url of the thumbnail for the result</td>
</tr>
<tr>
<td>thumbnail_width</td>
<td>Integer</td>
<td><em>Optional</em>. Thumbnail width</td>
</tr>
<tr>
<td>thumbnail_height</td>
<td>Integer</td>
<td><em>Optional</em>. Thumbnail height</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="inlinequeryresultgame" href="#inlinequeryresultgame"><i class="anchor-icon"></i></a>InlineQueryResultGame</h4>
<p>Represents a <a href="#games">Game</a>.</p>
<table class="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>game</em></td>
</tr>
<tr>
<td>id</td>
<td>String</td>
<td>Unique identifier for this result, 1-64 bytes</td>
</tr>
<tr>
<td>game_short_name</td>
<td>String</td>
<td>Short name of the game</td>
</tr>
<tr>
<td>reply_markup</td>
<td><a href="#inlinekeyboardmarkup">InlineKeyboardMarkup</a></td>
<td><em>Optional</em>. <a href="/bots/features#inline-keyboards">Inline keyboard</a> attached to the message</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="inlinequeryresultcachedphoto" href="#inlinequeryresultcachedphoto"><i class="anchor-icon"></i></a>InlineQueryResultCachedPhoto</h4>
<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>
<table class="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 <a href="#formatting-options">formatting options</a> for more details.</td>
</tr>
<tr>
<td>caption_entities</td>
<td>Array of <a href="#messageentity">MessageEntity</a></td>
<td><em>Optional</em>. List of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em></td>
</tr>
<tr>
<td>show_caption_above_media</td>
<td>Boolean</td>
<td><em>Optional</em>. Pass <em>True</em>, if the caption must be shown above the message media</td>
</tr>
<tr>
<td>reply_markup</td>
<td><a href="#inlinekeyboardmarkup">InlineKeyboardMarkup</a></td>
<td><em>Optional</em>. <a href="/bots/features#inline-keyboards">Inline keyboard</a> attached to the message</td>
</tr>
<tr>
<td>input_message_content</td>
<td><a href="#inputmessagecontent">InputMessageContent</a></td>
<td><em>Optional</em>. Content of the message to be sent instead of the photo</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="inlinequeryresultcachedgif" href="#inlinequeryresultcachedgif"><i class="anchor-icon"></i></a>InlineQueryResultCachedGif</h4>
<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>
<table class="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 <a href="#formatting-options">formatting options</a> for more details.</td>
</tr>
<tr>
<td>caption_entities</td>
<td>Array of <a href="#messageentity">MessageEntity</a></td>
<td><em>Optional</em>. List of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em></td>
</tr>
<tr>
<td>show_caption_above_media</td>
<td>Boolean</td>
<td><em>Optional</em>. Pass <em>True</em>, if the caption must be shown above the message media</td>
</tr>
<tr>
<td>reply_markup</td>
<td><a href="#inlinekeyboardmarkup">InlineKeyboardMarkup</a></td>
<td><em>Optional</em>. <a href="/bots/features#inline-keyboards">Inline keyboard</a> attached to the message</td>
</tr>
<tr>
<td>input_message_content</td>
<td><a href="#inputmessagecontent">InputMessageContent</a></td>
<td><em>Optional</em>. Content of the message to be sent instead of the GIF animation</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="inlinequeryresultcachedmpeg4gif" href="#inlinequeryresultcachedmpeg4gif"><i class="anchor-icon"></i></a>InlineQueryResultCachedMpeg4Gif</h4>
<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>
<table class="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 MPEG4 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 <a href="#formatting-options">formatting options</a> for more details.</td>
</tr>
<tr>
<td>caption_entities</td>
<td>Array of <a href="#messageentity">MessageEntity</a></td>
<td><em>Optional</em>. List of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em></td>
</tr>
<tr>
<td>show_caption_above_media</td>
<td>Boolean</td>
<td><em>Optional</em>. Pass <em>True</em>, if the caption must be shown above the message media</td>
</tr>
<tr>
<td>reply_markup</td>
<td><a href="#inlinekeyboardmarkup">InlineKeyboardMarkup</a></td>
<td><em>Optional</em>. <a href="/bots/features#inline-keyboards">Inline keyboard</a> attached to the message</td>
</tr>
<tr>
<td>input_message_content</td>
<td><a href="#inputmessagecontent">InputMessageContent</a></td>
<td><em>Optional</em>. Content of the message to be sent instead of the video animation</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="inlinequeryresultcachedsticker" href="#inlinequeryresultcachedsticker"><i class="anchor-icon"></i></a>InlineQueryResultCachedSticker</h4>
<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>
<table class="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>
</tr>
<tr>
<td>sticker_file_id</td>
<td>String</td>
<td>A valid file identifier of the sticker</td>
</tr>
<tr>
<td>reply_markup</td>
<td><a href="#inlinekeyboardmarkup">InlineKeyboardMarkup</a></td>
<td><em>Optional</em>. <a href="/bots/features#inline-keyboards">Inline keyboard</a> attached to the message</td>
</tr>
<tr>
<td>input_message_content</td>
<td><a href="#inputmessagecontent">InputMessageContent</a></td>
<td><em>Optional</em>. Content of the message to be sent instead of the sticker</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="inlinequeryresultcacheddocument" href="#inlinequeryresultcacheddocument"><i class="anchor-icon"></i></a>InlineQueryResultCachedDocument</h4>
<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>
<table class="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 <a href="#formatting-options">formatting options</a> for more details.</td>
</tr>
<tr>
<td>caption_entities</td>
<td>Array of <a href="#messageentity">MessageEntity</a></td>
<td><em>Optional</em>. List of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em></td>
</tr>
<tr>
<td>reply_markup</td>
<td><a href="#inlinekeyboardmarkup">InlineKeyboardMarkup</a></td>
<td><em>Optional</em>. <a href="/bots/features#inline-keyboards">Inline keyboard</a> attached to the message</td>
</tr>
<tr>
<td>input_message_content</td>
<td><a href="#inputmessagecontent">InputMessageContent</a></td>
<td><em>Optional</em>. Content of the message to be sent instead of the file</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="inlinequeryresultcachedvideo" href="#inlinequeryresultcachedvideo"><i class="anchor-icon"></i></a>InlineQueryResultCachedVideo</h4>
<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>
<table class="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 <a href="#formatting-options">formatting options</a> for more details.</td>
</tr>
<tr>
<td>caption_entities</td>
<td>Array of <a href="#messageentity">MessageEntity</a></td>
<td><em>Optional</em>. List of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em></td>
</tr>
<tr>
<td>show_caption_above_media</td>
<td>Boolean</td>
<td><em>Optional</em>. Pass <em>True</em>, if the caption must be shown above the message media</td>
</tr>
<tr>
<td>reply_markup</td>
<td><a href="#inlinekeyboardmarkup">InlineKeyboardMarkup</a></td>
<td><em>Optional</em>. <a href="/bots/features#inline-keyboards">Inline keyboard</a> attached to the message</td>
</tr>
<tr>
<td>input_message_content</td>
<td><a href="#inputmessagecontent">InputMessageContent</a></td>
<td><em>Optional</em>. Content of the message to be sent instead of the video</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="inlinequeryresultcachedvoice" href="#inlinequeryresultcachedvoice"><i class="anchor-icon"></i></a>InlineQueryResultCachedVoice</h4>
<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>
<table class="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 <a href="#formatting-options">formatting options</a> for more details.</td>
</tr>
<tr>
<td>caption_entities</td>
<td>Array of <a href="#messageentity">MessageEntity</a></td>
<td><em>Optional</em>. List of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em></td>
</tr>
<tr>
<td>reply_markup</td>
<td><a href="#inlinekeyboardmarkup">InlineKeyboardMarkup</a></td>
<td><em>Optional</em>. <a href="/bots/features#inline-keyboards">Inline keyboard</a> attached to the message</td>
</tr>
<tr>
<td>input_message_content</td>
<td><a href="#inputmessagecontent">InputMessageContent</a></td>
<td><em>Optional</em>. Content of the message to be sent instead of the voice message</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="inlinequeryresultcachedaudio" href="#inlinequeryresultcachedaudio"><i class="anchor-icon"></i></a>InlineQueryResultCachedAudio</h4>
<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>
<table class="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 <a href="#formatting-options">formatting options</a> for more details.</td>
</tr>
<tr>
<td>caption_entities</td>
<td>Array of <a href="#messageentity">MessageEntity</a></td>
<td><em>Optional</em>. List of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em></td>
</tr>
<tr>
<td>reply_markup</td>
<td><a href="#inlinekeyboardmarkup">InlineKeyboardMarkup</a></td>
<td><em>Optional</em>. <a href="/bots/features#inline-keyboards">Inline keyboard</a> attached to the message</td>
</tr>
<tr>
<td>input_message_content</td>
<td><a href="#inputmessagecontent">InputMessageContent</a></td>
<td><em>Optional</em>. Content of the message to be sent instead of the audio</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="inputmessagecontent" href="#inputmessagecontent"><i class="anchor-icon"></i></a>InputMessageContent</h4>
<p>This object represents the content of a message to be sent as a result of an inline query. Telegram clients currently support the following 5 types:</p>
<ul>
<li><a href="#inputtextmessagecontent">InputTextMessageContent</a></li>
<li><a href="#inputlocationmessagecontent">InputLocationMessageContent</a></li>
<li><a href="#inputvenuemessagecontent">InputVenueMessageContent</a></li>
<li><a href="#inputcontactmessagecontent">InputContactMessageContent</a></li>
<li><a href="#inputinvoicemessagecontent">InputInvoiceMessageContent</a></li>
</ul>
<h4><a class="anchor" name="inputtextmessagecontent" href="#inputtextmessagecontent"><i class="anchor-icon"></i></a>InputTextMessageContent</h4>
<p>Represents the <a href="#inputmessagecontent">content</a> of a text message to be sent as the result of an inline query.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>message_text</td>
<td>String</td>
<td>Text of the message to be sent, 1-4096 characters</td>
</tr>
<tr>
<td>parse_mode</td>
<td>String</td>
<td><em>Optional</em>. Mode for parsing entities in the message text. See <a href="#formatting-options">formatting options</a> for more details.</td>
</tr>
<tr>
<td>entities</td>
<td>Array of <a href="#messageentity">MessageEntity</a></td>
<td><em>Optional</em>. List of special entities that appear in message text, which can be specified instead of <em>parse_mode</em></td>
</tr>
<tr>
<td>link_preview_options</td>
<td><a href="#linkpreviewoptions">LinkPreviewOptions</a></td>
<td><em>Optional</em>. Link preview generation options for the message</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="inputlocationmessagecontent" href="#inputlocationmessagecontent"><i class="anchor-icon"></i></a>InputLocationMessageContent</h4>
<p>Represents the <a href="#inputmessagecontent">content</a> of a location message to be sent as the result of an inline query.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>latitude</td>
<td>Float</td>
<td>Latitude of the location in degrees</td>
</tr>
<tr>
<td>longitude</td>
<td>Float</td>
<td>Longitude of the location in degrees</td>
</tr>
<tr>
<td>horizontal_accuracy</td>
<td>Float</td>
<td><em>Optional</em>. The radius of uncertainty for the location, measured in meters; 0-1500</td>
</tr>
<tr>
<td>live_period</td>
<td>Integer</td>
<td><em>Optional</em>. Period in seconds during which the location can be updated, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely.</td>
</tr>
<tr>
<td>heading</td>
<td>Integer</td>
<td><em>Optional</em>. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.</td>
</tr>
<tr>
<td>proximity_alert_radius</td>
<td>Integer</td>
<td><em>Optional</em>. For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="inputvenuemessagecontent" href="#inputvenuemessagecontent"><i class="anchor-icon"></i></a>InputVenueMessageContent</h4>
<p>Represents the <a href="#inputmessagecontent">content</a> of a venue message to be sent as the result of an inline query.</p>
<table class="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>
</tr>
<tr>
<td>google_place_id</td>
<td>String</td>
<td><em>Optional</em>. Google Places identifier of the venue</td>
</tr>
<tr>
<td>google_place_type</td>
<td>String</td>
<td><em>Optional</em>. Google Places type of the venue. (See <a href="https://developers.google.com/places/web-service/supported_types">supported types</a>.)</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="inputcontactmessagecontent" href="#inputcontactmessagecontent"><i class="anchor-icon"></i></a>InputContactMessageContent</h4>
<p>Represents the <a href="#inputmessagecontent">content</a> of a contact message to be sent as the result of an inline query.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>phone_number</td>
<td>String</td>
<td>Contact&#39;s phone number</td>
</tr>
<tr>
<td>first_name</td>
<td>String</td>
<td>Contact&#39;s first name</td>
</tr>
<tr>
<td>last_name</td>
<td>String</td>
<td><em>Optional</em>. Contact&#39;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 <a href="https://en.wikipedia.org/wiki/VCard">vCard</a>, 0-2048 bytes</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="inputinvoicemessagecontent" href="#inputinvoicemessagecontent"><i class="anchor-icon"></i></a>InputInvoiceMessageContent</h4>
<p>Represents the <a href="#inputmessagecontent">content</a> of an invoice message to be sent as the result of an inline query.</p>
<table class="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, 1-32 characters</td>
</tr>
<tr>
<td>description</td>
<td>String</td>
<td>Product description, 1-255 characters</td>
</tr>
<tr>
<td>payload</td>
<td>String</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><em>Optional</em>. Payment provider token, obtained via <a href="https://t.me/botfather">@BotFather</a>. Pass an empty string for payments in <a href="https://t.me/BotNews/90">Telegram Stars</a>.</td>
</tr>
<tr>
<td>currency</td>
<td>String</td>
<td>Three-letter ISO 4217 currency code, see <a href="/bots/payments#supported-currencies">more on currencies</a>. Pass “XTR” for payments in <a href="https://t.me/BotNews/90">Telegram Stars</a>.</td>
</tr>
<tr>
<td>prices</td>
<td>Array of <a href="#labeledprice">LabeledPrice</a></td>
<td>Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in <a href="https://t.me/BotNews/90">Telegram Stars</a>.</td>
</tr>
<tr>
<td>max_tip_amount</td>
<td>Integer</td>
<td><em>Optional</em>. The maximum accepted amount for tips in the <em>smallest units</em> of the currency (integer, <strong>not</strong> float/double). For example, for a maximum tip of <code>US$ 1.45</code> pass <code>max_tip_amount = 145</code>. See the <em>exp</em> parameter in <a href="/bots/payments/currencies.json">currencies.json</a>, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0. Not supported for payments in <a href="https://t.me/BotNews/90">Telegram Stars</a>.</td>
</tr>
<tr>
<td>suggested_tip_amounts</td>
<td>Array of Integer</td>
<td><em>Optional</em>. A JSON-serialized array of suggested amounts of tip in the <em>smallest units</em> of the currency (integer, <strong>not</strong> float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed <em>max_tip_amount</em>.</td>
</tr>
<tr>
<td>provider_data</td>
<td>String</td>
<td><em>Optional</em>. A JSON-serialized object for data about the invoice, which will be shared with the payment provider. A detailed description of the required fields should be provided by the payment provider.</td>
</tr>
<tr>
<td>photo_url</td>
<td>String</td>
<td><em>Optional</em>. URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service.</td>
</tr>
<tr>
<td>photo_size</td>
<td>Integer</td>
<td><em>Optional</em>. Photo size in bytes</td>
</tr>
<tr>
<td>photo_width</td>
<td>Integer</td>
<td><em>Optional</em>. Photo width</td>
</tr>
<tr>
<td>photo_height</td>
<td>Integer</td>
<td><em>Optional</em>. Photo height</td>
</tr>
<tr>
<td>need_name</td>
<td>Boolean</td>
<td><em>Optional</em>. Pass <em>True</em> if you require the user&#39;s full name to complete the order. Ignored for payments in <a href="https://t.me/BotNews/90">Telegram Stars</a>.</td>
</tr>
<tr>
<td>need_phone_number</td>
<td>Boolean</td>
<td><em>Optional</em>. Pass <em>True</em> if you require the user&#39;s phone number to complete the order. Ignored for payments in <a href="https://t.me/BotNews/90">Telegram Stars</a>.</td>
</tr>
<tr>
<td>need_email</td>
<td>Boolean</td>
<td><em>Optional</em>. Pass <em>True</em> if you require the user&#39;s email address to complete the order. Ignored for payments in <a href="https://t.me/BotNews/90">Telegram Stars</a>.</td>
</tr>
<tr>
<td>need_shipping_address</td>
<td>Boolean</td>
<td><em>Optional</em>. Pass <em>True</em> if you require the user&#39;s shipping address to complete the order. Ignored for payments in <a href="https://t.me/BotNews/90">Telegram Stars</a>.</td>
</tr>
<tr>
<td>send_phone_number_to_provider</td>
<td>Boolean</td>
<td><em>Optional</em>. Pass <em>True</em> if the user&#39;s phone number should be sent to the provider. Ignored for payments in <a href="https://t.me/BotNews/90">Telegram Stars</a>.</td>
</tr>
<tr>
<td>send_email_to_provider</td>
<td>Boolean</td>
<td><em>Optional</em>. Pass <em>True</em> if the user&#39;s email address should be sent to the provider. Ignored for payments in <a href="https://t.me/BotNews/90">Telegram Stars</a>.</td>
</tr>
<tr>
<td>is_flexible</td>
<td>Boolean</td>
<td><em>Optional</em>. Pass <em>True</em> if the final price depends on the shipping method. Ignored for payments in <a href="https://t.me/BotNews/90">Telegram Stars</a>.</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="choseninlineresult" href="#choseninlineresult"><i class="anchor-icon"></i></a>ChosenInlineResult</h4>
<p>Represents a <a href="#inlinequeryresult">result</a> of an inline query that was chosen by the user and sent to their chat partner.</p>
<table class="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><a href="#user">User</a></td>
<td>The user that chose the result</td>
</tr>
<tr>
<td>location</td>
<td><a href="#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 <a href="#inlinekeyboardmarkup">inline keyboard</a> attached to the message. Will be also received in <a href="#callbackquery">callback queries</a> and can be used to <a href="#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 <a href="/bots/inline#collecting-feedback">inline feedback</a> via <a href="https://t.me/botfather">@BotFather</a> in order to receive these objects in updates.</p>
<h4><a class="anchor" name="answerwebappquery" href="#answerwebappquery"><i class="anchor-icon"></i></a>answerWebAppQuery</h4>
<p>Use this method to set the result of an interaction with a <a href="/bots/webapps">Web App</a> and send a corresponding message on behalf of the user to the chat from which the query originated. On success, a <a href="#sentwebappmessage">SentWebAppMessage</a> object is returned.</p>
<table class="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>web_app_query_id</td>
<td>String</td>
<td>Yes</td>
<td>Unique identifier for the query to be answered</td>
</tr>
<tr>
<td>result</td>
<td><a href="#inlinequeryresult">InlineQueryResult</a></td>
<td>Yes</td>
<td>A JSON-serialized object describing the message to be sent</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="sentwebappmessage" href="#sentwebappmessage"><i class="anchor-icon"></i></a>SentWebAppMessage</h4>
<p>Describes an inline message sent by a <a href="/bots/webapps">Web App</a> on behalf of a user.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<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 <a href="#inlinekeyboardmarkup">inline keyboard</a> attached to the message.</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" name="payments" href="#payments"><i class="anchor-icon"></i></a>Payments</h3>
<p>Your bot can accept payments from Telegram users. Please see the <a href="/bots/payments">introduction to payments</a> for more details on the process and how to set up payments for your bot.</p>
<h4><a class="anchor" name="sendinvoice" href="#sendinvoice"><i class="anchor-icon"></i></a>sendInvoice</h4>
<p>Use this method to send invoices. On success, the sent <a href="#message">Message</a> is returned.</p>
<table class="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_thread_id</td>
<td>Integer</td>
<td>Optional</td>
<td>Unique identifier for the target message thread (topic) of the forum; for forum supergroups only</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>Optional</td>
<td>Payment provider token, obtained via <a href="https://t.me/botfather">@BotFather</a>. Pass an empty string for payments in <a href="https://t.me/BotNews/90">Telegram Stars</a>.</td>
</tr>
<tr>
<td>currency</td>
<td>String</td>
<td>Yes</td>
<td>Three-letter ISO 4217 currency code, see <a href="/bots/payments#supported-currencies">more on currencies</a>. Pass “XTR” for payments in <a href="https://t.me/BotNews/90">Telegram Stars</a>.</td>
</tr>
<tr>
<td>prices</td>
<td>Array of <a href="#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.). Must contain exactly one item for payments in <a href="https://t.me/BotNews/90">Telegram Stars</a>.</td>
</tr>
<tr>
<td>max_tip_amount</td>
<td>Integer</td>
<td>Optional</td>
<td>The maximum accepted amount for tips in the <em>smallest units</em> of the currency (integer, <strong>not</strong> float/double). For example, for a maximum tip of <code>US$ 1.45</code> pass <code>max_tip_amount = 145</code>. See the <em>exp</em> parameter in <a href="/bots/payments/currencies.json">currencies.json</a>, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0. Not supported for payments in <a href="https://t.me/BotNews/90">Telegram Stars</a>.</td>
</tr>
<tr>
<td>suggested_tip_amounts</td>
<td>Array of Integer</td>
<td>Optional</td>
<td>A JSON-serialized array of suggested amounts of tips in the <em>smallest units</em> of the currency (integer, <strong>not</strong> float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed <em>max_tip_amount</em>.</td>
</tr>
<tr>
<td>start_parameter</td>
<td>String</td>
<td>Optional</td>
<td>Unique deep-linking parameter. If left empty, <strong>forwarded copies</strong> of the sent message will have a <em>Pay</em> button, allowing multiple users to pay directly from the forwarded message, using the same invoice. If non-empty, forwarded copies of the sent message will have a <em>URL</em> button with a deep link to the bot (instead of a <em>Pay</em> button), with the value used as the start parameter</td>
</tr>
<tr>
<td>provider_data</td>
<td>String</td>
<td>Optional</td>
<td>JSON-serialized data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider.</td>
</tr>
<tr>
<td>photo_url</td>
<td>String</td>
<td>Optional</td>
<td>URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service. 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 in bytes</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&#39;s full name to complete the order. Ignored for payments in <a href="https://t.me/BotNews/90">Telegram Stars</a>.</td>
</tr>
<tr>
<td>need_phone_number</td>
<td>Boolean</td>
<td>Optional</td>
<td>Pass <em>True</em> if you require the user&#39;s phone number to complete the order. Ignored for payments in <a href="https://t.me/BotNews/90">Telegram Stars</a>.</td>
</tr>
<tr>
<td>need_email</td>
<td>Boolean</td>
<td>Optional</td>
<td>Pass <em>True</em> if you require the user&#39;s email address to complete the order. Ignored for payments in <a href="https://t.me/BotNews/90">Telegram Stars</a>.</td>
</tr>
<tr>
<td>need_shipping_address</td>
<td>Boolean</td>
<td>Optional</td>
<td>Pass <em>True</em> if you require the user&#39;s shipping address to complete the order. Ignored for payments in <a href="https://t.me/BotNews/90">Telegram Stars</a>.</td>
</tr>
<tr>
<td>send_phone_number_to_provider</td>
<td>Boolean</td>
<td>Optional</td>
<td>Pass <em>True</em> if the user&#39;s phone number should be sent to the provider. Ignored for payments in <a href="https://t.me/BotNews/90">Telegram Stars</a>.</td>
</tr>
<tr>
<td>send_email_to_provider</td>
<td>Boolean</td>
<td>Optional</td>
<td>Pass <em>True</em> if the user&#39;s email address should be sent to the provider. Ignored for payments in <a href="https://t.me/BotNews/90">Telegram Stars</a>.</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. Ignored for payments in <a href="https://t.me/BotNews/90">Telegram Stars</a>.</td>
</tr>
<tr>
<td>disable_notification</td>
<td>Boolean</td>
<td>Optional</td>
<td>Sends the message <a href="https://telegram.org/blog/channels-2-0#silent-messages">silently</a>. Users will receive a notification with no sound.</td>
</tr>
<tr>
<td>protect_content</td>
<td>Boolean</td>
<td>Optional</td>
<td>Protects the contents of the sent message from forwarding and saving</td>
</tr>
<tr>
<td>message_effect_id</td>
<td>String</td>
<td>Optional</td>
<td>Unique identifier of the message effect to be added to the message; for private chats only</td>
</tr>
<tr>
<td>reply_parameters</td>
<td><a href="#replyparameters">ReplyParameters</a></td>
<td>Optional</td>
<td>Description of the message to reply to</td>
</tr>
<tr>
<td>reply_markup</td>
<td><a href="#inlinekeyboardmarkup">InlineKeyboardMarkup</a></td>
<td>Optional</td>
<td>A JSON-serialized object for an <a href="/bots/features#inline-keyboards">inline keyboard</a>. If empty, one &#39;Pay <code>total price</code>&#39; button will be shown. If not empty, the first button must be a Pay button.</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="createinvoicelink" href="#createinvoicelink"><i class="anchor-icon"></i></a>createInvoiceLink</h4>
<p>Use this method to create a link for an invoice. Returns the created invoice link as <em>String</em> on success.</p>
<table class="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<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>Optional</td>
<td>Payment provider token, obtained via <a href="https://t.me/botfather">@BotFather</a>. Pass an empty string for payments in <a href="https://t.me/BotNews/90">Telegram Stars</a>.</td>
</tr>
<tr>
<td>currency</td>
<td>String</td>
<td>Yes</td>
<td>Three-letter ISO 4217 currency code, see <a href="/bots/payments#supported-currencies">more on currencies</a>. Pass “XTR” for payments in <a href="https://t.me/BotNews/90">Telegram Stars</a>.</td>
</tr>
<tr>
<td>prices</td>
<td>Array of <a href="#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.). Must contain exactly one item for payments in <a href="https://t.me/BotNews/90">Telegram Stars</a>.</td>
</tr>
<tr>
<td>max_tip_amount</td>
<td>Integer</td>
<td>Optional</td>
<td>The maximum accepted amount for tips in the <em>smallest units</em> of the currency (integer, <strong>not</strong> float/double). For example, for a maximum tip of <code>US$ 1.45</code> pass <code>max_tip_amount = 145</code>. See the <em>exp</em> parameter in <a href="/bots/payments/currencies.json">currencies.json</a>, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0. Not supported for payments in <a href="https://t.me/BotNews/90">Telegram Stars</a>.</td>
</tr>
<tr>
<td>suggested_tip_amounts</td>
<td>Array of Integer</td>
<td>Optional</td>
<td>A JSON-serialized array of suggested amounts of tips in the <em>smallest units</em> of the currency (integer, <strong>not</strong> float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed <em>max_tip_amount</em>.</td>
</tr>
<tr>
<td>provider_data</td>
<td>String</td>
<td>Optional</td>
<td>JSON-serialized data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider.</td>
</tr>
<tr>
<td>photo_url</td>
<td>String</td>
<td>Optional</td>
<td>URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service.</td>
</tr>
<tr>
<td>photo_size</td>
<td>Integer</td>
<td>Optional</td>
<td>Photo size in bytes</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&#39;s full name to complete the order. Ignored for payments in <a href="https://t.me/BotNews/90">Telegram Stars</a>.</td>
</tr>
<tr>
<td>need_phone_number</td>
<td>Boolean</td>
<td>Optional</td>
<td>Pass <em>True</em> if you require the user&#39;s phone number to complete the order. Ignored for payments in <a href="https://t.me/BotNews/90">Telegram Stars</a>.</td>
</tr>
<tr>
<td>need_email</td>
<td>Boolean</td>
<td>Optional</td>
<td>Pass <em>True</em> if you require the user&#39;s email address to complete the order. Ignored for payments in <a href="https://t.me/BotNews/90">Telegram Stars</a>.</td>
</tr>
<tr>
<td>need_shipping_address</td>
<td>Boolean</td>
<td>Optional</td>
<td>Pass <em>True</em> if you require the user&#39;s shipping address to complete the order. Ignored for payments in <a href="https://t.me/BotNews/90">Telegram Stars</a>.</td>
</tr>
<tr>
<td>send_phone_number_to_provider</td>
<td>Boolean</td>
<td>Optional</td>
<td>Pass <em>True</em> if the user&#39;s phone number should be sent to the provider. Ignored for payments in <a href="https://t.me/BotNews/90">Telegram Stars</a>.</td>
</tr>
<tr>
<td>send_email_to_provider</td>
<td>Boolean</td>
<td>Optional</td>
<td>Pass <em>True</em> if the user&#39;s email address should be sent to the provider. Ignored for payments in <a href="https://t.me/BotNews/90">Telegram Stars</a>.</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. Ignored for payments in <a href="https://t.me/BotNews/90">Telegram Stars</a>.</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="answershippingquery" href="#answershippingquery"><i class="anchor-icon"></i></a>answerShippingQuery</h4>
<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 <a href="#update">Update</a> with a <em>shipping_query</em> field to the bot. Use this method to reply to shipping queries. On success, <em>True</em> is returned.</p>
<table class="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>Pass <em>True</em> if delivery to the specified address is possible and <em>False</em> if there are any problems (for example, if delivery to the specified address is not possible)</td>
</tr>
<tr>
<td>shipping_options</td>
<td>Array of <a href="#shippingoption">ShippingOption</a></td>
<td>Optional</td>
<td>Required if <em>ok</em> is <em>True</em>. 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 <em>False</em>. Error message in human readable form that explains why it is impossible to complete the order (e.g. &quot;Sorry, delivery to your desired address is unavailable&#39;). Telegram will display this message to the user.</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="answerprecheckoutquery" href="#answerprecheckoutquery"><i class="anchor-icon"></i></a>answerPreCheckoutQuery</h4>
<p>Once the user has confirmed their payment and shipping details, the Bot API sends the final confirmation in the form of an <a href="#update">Update</a> with the field <em>pre_checkout_query</em>. Use this method to respond to such pre-checkout queries. On success, <em>True</em> is returned. <strong>Note:</strong> The Bot API must receive an answer within 10 seconds after the pre-checkout query was sent.</p>
<table class="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. &quot;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!&quot;). Telegram will display this message to the user.</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="getstartransactions" href="#getstartransactions"><i class="anchor-icon"></i></a>getStarTransactions</h4>
<p>Returns the bot&#39;s Telegram Star transactions in chronological order. On success, returns a <a href="#startransactions">StarTransactions</a> object.</p>
<table class="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>Number of transactions to skip in the response</td>
</tr>
<tr>
<td>limit</td>
<td>Integer</td>
<td>Optional</td>
<td>The maximum number of transactions to be retrieved. Values between 1-100 are accepted. Defaults to 100.</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="refundstarpayment" href="#refundstarpayment"><i class="anchor-icon"></i></a>refundStarPayment</h4>
<p>Refunds a successful payment in <a href="https://t.me/BotNews/90">Telegram Stars</a>. Returns <em>True</em> on success.</p>
<table class="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>Identifier of the user whose payment will be refunded</td>
</tr>
<tr>
<td>telegram_payment_charge_id</td>
<td>String</td>
<td>Yes</td>
<td>Telegram payment identifier</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="labeledprice" href="#labeledprice"><i class="anchor-icon"></i></a>LabeledPrice</h4>
<p>This object represents a portion of the price for goods or services.</p>
<table class="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 <a href="/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 <a href="/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>
</tbody>
</table>
<h4><a class="anchor" name="invoice" href="#invoice"><i class="anchor-icon"></i></a>Invoice</h4>
<p>This object contains basic information about an invoice.</p>
<table class="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 <a href="/bots/payments#supported-currencies">currency</a> code, or “XTR” for payments in <a href="https://t.me/BotNews/90">Telegram Stars</a></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 <a href="/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>
</tbody>
</table>
<h4><a class="anchor" name="shippingaddress" href="#shippingaddress"><i class="anchor-icon"></i></a>ShippingAddress</h4>
<p>This object represents a shipping address.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>country_code</td>
<td>String</td>
<td>Two-letter <a href="https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2">ISO 3166-1 alpha-2</a> country code</td>
</tr>
<tr>
<td>state</td>
<td>String</td>
<td>State, if applicable</td>
</tr>
<tr>
<td>city</td>
<td>String</td>
<td>City</td>
</tr>
<tr>
<td>street_line1</td>
<td>String</td>
<td>First line for the address</td>
</tr>
<tr>
<td>street_line2</td>
<td>String</td>
<td>Second line for the address</td>
</tr>
<tr>
<td>post_code</td>
<td>String</td>
<td>Address post code</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="orderinfo" href="#orderinfo"><i class="anchor-icon"></i></a>OrderInfo</h4>
<p>This object represents information about an order.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>name</td>
<td>String</td>
<td><em>Optional</em>. User name</td>
</tr>
<tr>
<td>phone_number</td>
<td>String</td>
<td><em>Optional</em>. User&#39;s phone number</td>
</tr>
<tr>
<td>email</td>
<td>String</td>
<td><em>Optional</em>. User email</td>
</tr>
<tr>
<td>shipping_address</td>
<td><a href="#shippingaddress">ShippingAddress</a></td>
<td><em>Optional</em>. User shipping address</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="shippingoption" href="#shippingoption"><i class="anchor-icon"></i></a>ShippingOption</h4>
<p>This object represents one shipping option.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>id</td>
<td>String</td>
<td>Shipping option identifier</td>
</tr>
<tr>
<td>title</td>
<td>String</td>
<td>Option title</td>
</tr>
<tr>
<td>prices</td>
<td>Array of <a href="#labeledprice">LabeledPrice</a></td>
<td>List of price portions</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="successfulpayment" href="#successfulpayment"><i class="anchor-icon"></i></a>SuccessfulPayment</h4>
<p>This object contains basic information about a successful payment.</p>
<table class="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 <a href="/bots/payments#supported-currencies">currency</a> code, or “XTR” for payments in <a href="https://t.me/BotNews/90">Telegram Stars</a></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 <a href="/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><a href="#orderinfo">OrderInfo</a></td>
<td><em>Optional</em>. Order information provided by the user</td>
</tr>
<tr>
<td>telegram_payment_charge_id</td>
<td>String</td>
<td>Telegram payment identifier</td>
</tr>
<tr>
<td>provider_payment_charge_id</td>
<td>String</td>
<td>Provider payment identifier</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="refundedpayment" href="#refundedpayment"><i class="anchor-icon"></i></a>RefundedPayment</h4>
<p>This object contains basic information about a refunded payment.</p>
<table class="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 <a href="/bots/payments#supported-currencies">currency</a> code, or “XTR” for payments in <a href="https://t.me/BotNews/90">Telegram Stars</a>. Currently, always “XTR”</td>
</tr>
<tr>
<td>total_amount</td>
<td>Integer</td>
<td>Total refunded 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>, <code>total_amount = 145</code>. See the <em>exp</em> parameter in <a href="/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>telegram_payment_charge_id</td>
<td>String</td>
<td>Telegram payment identifier</td>
</tr>
<tr>
<td>provider_payment_charge_id</td>
<td>String</td>
<td><em>Optional</em>. Provider payment identifier</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="shippingquery" href="#shippingquery"><i class="anchor-icon"></i></a>ShippingQuery</h4>
<p>This object contains information about an incoming shipping query.</p>
<table class="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><a href="#user">User</a></td>
<td>User who sent the query</td>
</tr>
<tr>
<td>invoice_payload</td>
<td>String</td>
<td>Bot-specified invoice payload</td>
</tr>
<tr>
<td>shipping_address</td>
<td><a href="#shippingaddress">ShippingAddress</a></td>
<td>User specified shipping address</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="precheckoutquery" href="#precheckoutquery"><i class="anchor-icon"></i></a>PreCheckoutQuery</h4>
<p>This object contains information about an incoming pre-checkout query.</p>
<table class="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><a href="#user">User</a></td>
<td>User who sent the query</td>
</tr>
<tr>
<td>currency</td>
<td>String</td>
<td>Three-letter ISO 4217 <a href="/bots/payments#supported-currencies">currency</a> code, or “XTR” for payments in <a href="https://t.me/BotNews/90">Telegram Stars</a></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 <a href="/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><a href="#orderinfo">OrderInfo</a></td>
<td><em>Optional</em>. Order information provided by the user</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="revenuewithdrawalstate" href="#revenuewithdrawalstate"><i class="anchor-icon"></i></a>RevenueWithdrawalState</h4>
<p>This object describes the state of a revenue withdrawal operation. Currently, it can be one of</p>
<ul>
<li><a href="#revenuewithdrawalstatepending">RevenueWithdrawalStatePending</a></li>
<li><a href="#revenuewithdrawalstatesucceeded">RevenueWithdrawalStateSucceeded</a></li>
<li><a href="#revenuewithdrawalstatefailed">RevenueWithdrawalStateFailed</a></li>
</ul>
<h4><a class="anchor" name="revenuewithdrawalstatepending" href="#revenuewithdrawalstatepending"><i class="anchor-icon"></i></a>RevenueWithdrawalStatePending</h4>
<p>The withdrawal is in progress.</p>
<table class="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 state, always “pending”</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="revenuewithdrawalstatesucceeded" href="#revenuewithdrawalstatesucceeded"><i class="anchor-icon"></i></a>RevenueWithdrawalStateSucceeded</h4>
<p>The withdrawal succeeded.</p>
<table class="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 state, always “succeeded”</td>
</tr>
<tr>
<td>date</td>
<td>Integer</td>
<td>Date the withdrawal was completed in Unix time</td>
</tr>
<tr>
<td>url</td>
<td>String</td>
<td>An HTTPS URL that can be used to see transaction details</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="revenuewithdrawalstatefailed" href="#revenuewithdrawalstatefailed"><i class="anchor-icon"></i></a>RevenueWithdrawalStateFailed</h4>
<p>The withdrawal failed and the transaction was refunded.</p>
<table class="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 state, always “failed”</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="transactionpartner" href="#transactionpartner"><i class="anchor-icon"></i></a>TransactionPartner</h4>
<p>This object describes the source of a transaction, or its recipient for outgoing transactions. Currently, it can be one of</p>
<ul>
<li><a href="#transactionpartneruser">TransactionPartnerUser</a></li>
<li><a href="#transactionpartnerfragment">TransactionPartnerFragment</a></li>
<li><a href="#transactionpartnertelegramads">TransactionPartnerTelegramAds</a></li>
<li><a href="#transactionpartnerother">TransactionPartnerOther</a></li>
</ul>
<h4><a class="anchor" name="transactionpartneruser" href="#transactionpartneruser"><i class="anchor-icon"></i></a>TransactionPartnerUser</h4>
<p>Describes a transaction with a user.</p>
<table class="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 transaction partner, always “user”</td>
</tr>
<tr>
<td>user</td>
<td><a href="#user">User</a></td>
<td>Information about the user</td>
</tr>
<tr>
<td>invoice_payload</td>
<td>String</td>
<td><em>Optional</em>. Bot-specified invoice payload</td>
</tr>
<tr>
<td>paid_media</td>
<td>Array of <a href="#paidmedia">PaidMedia</a></td>
<td><em>Optional</em>. Information about the paid media bought by the user</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="transactionpartnerfragment" href="#transactionpartnerfragment"><i class="anchor-icon"></i></a>TransactionPartnerFragment</h4>
<p>Describes a withdrawal transaction with Fragment.</p>
<table class="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 transaction partner, always “fragment”</td>
</tr>
<tr>
<td>withdrawal_state</td>
<td><a href="#revenuewithdrawalstate">RevenueWithdrawalState</a></td>
<td><em>Optional</em>. State of the transaction if the transaction is outgoing</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="transactionpartnertelegramads" href="#transactionpartnertelegramads"><i class="anchor-icon"></i></a>TransactionPartnerTelegramAds</h4>
<p>Describes a withdrawal transaction to the Telegram Ads platform.</p>
<table class="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 transaction partner, always “telegram_ads”</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="transactionpartnerother" href="#transactionpartnerother"><i class="anchor-icon"></i></a>TransactionPartnerOther</h4>
<p>Describes a transaction with an unknown source or recipient.</p>
<table class="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 transaction partner, always “other”</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="startransaction" href="#startransaction"><i class="anchor-icon"></i></a>StarTransaction</h4>
<p>Describes a Telegram Star transaction.</p>
<table class="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 of the transaction. Coincides with the identifer of the original transaction for refund transactions. Coincides with <em>SuccessfulPayment.telegram_payment_charge_id</em> for successful incoming payments from users.</td>
</tr>
<tr>
<td>amount</td>
<td>Integer</td>
<td>Number of Telegram Stars transferred by the transaction</td>
</tr>
<tr>
<td>date</td>
<td>Integer</td>
<td>Date the transaction was created in Unix time</td>
</tr>
<tr>
<td>source</td>
<td><a href="#transactionpartner">TransactionPartner</a></td>
<td><em>Optional</em>. Source of an incoming transaction (e.g., a user purchasing goods or services, Fragment refunding a failed withdrawal). Only for incoming transactions</td>
</tr>
<tr>
<td>receiver</td>
<td><a href="#transactionpartner">TransactionPartner</a></td>
<td><em>Optional</em>. Receiver of an outgoing transaction (e.g., a user for a purchase refund, Fragment for a withdrawal). Only for outgoing transactions</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="startransactions" href="#startransactions"><i class="anchor-icon"></i></a>StarTransactions</h4>
<p>Contains a list of Telegram Star transactions.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>transactions</td>
<td>Array of <a href="#startransaction">StarTransaction</a></td>
<td>The list of transactions</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" name="telegram-passport" href="#telegram-passport"><i class="anchor-icon"></i></a>Telegram Passport</h3>
<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 <a href="/passport">manual</a> for details.</p>
<h4><a class="anchor" name="passportdata" href="#passportdata"><i class="anchor-icon"></i></a>PassportData</h4>
<p>Describes Telegram Passport data shared with the bot by the user.</p>
<table class="table">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>data</td>
<td>Array of <a href="#encryptedpassportelement">EncryptedPassportElement</a></td>
<td>Array with information about documents and other Telegram Passport elements that was shared with the bot</td>
</tr>
<tr>
<td>credentials</td>
<td><a href="#encryptedcredentials">EncryptedCredentials</a></td>
<td>Encrypted credentials required to decrypt the data</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="passportfile" href="#passportfile"><i class="anchor-icon"></i></a>PassportFile</h4>
<p>This object represents a file uploaded to Telegram Passport. Currently all Telegram Passport files are in JPEG format when decrypted and don&#39;t exceed 10MB.</p>
<table class="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&#39;t be used to download or reuse the file.</td>
</tr>
<tr>
<td>file_size</td>
<td>Integer</td>
<td>File size in bytes</td>
</tr>
<tr>
<td>file_date</td>
<td>Integer</td>
<td>Unix time when the file was uploaded</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="encryptedpassportelement" href="#encryptedpassportelement"><i class="anchor-icon"></i></a>EncryptedPassportElement</h4>
<p>Describes documents or other Telegram Passport elements shared with the bot by the user.</p>
<table class="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 only for “personal_details”, “passport”, “driver_license”, “identity_card”, “internal_passport” and “address” types. Can be decrypted and verified using the accompanying <a href="#encryptedcredentials">EncryptedCredentials</a>.</td>
</tr>
<tr>
<td>phone_number</td>
<td>String</td>
<td><em>Optional</em>. User&#39;s verified phone number; available only for “phone_number” type</td>
</tr>
<tr>
<td>email</td>
<td>String</td>
<td><em>Optional</em>. User&#39;s verified email address; available only for “email” type</td>
</tr>
<tr>
<td>files</td>
<td>Array of <a href="#passportfile">PassportFile</a></td>
<td><em>Optional</em>. Array of encrypted files with documents provided by the user; available only for “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration” and “temporary_registration” types. Files can be decrypted and verified using the accompanying <a href="#encryptedcredentials">EncryptedCredentials</a>.</td>
</tr>
<tr>
<td>front_side</td>
<td><a href="#passportfile">PassportFile</a></td>
<td><em>Optional</em>. Encrypted file with the front side of the document, provided by the user; available only for “passport”, “driver_license”, “identity_card” and “internal_passport”. The file can be decrypted and verified using the accompanying <a href="#encryptedcredentials">EncryptedCredentials</a>.</td>
</tr>
<tr>
<td>reverse_side</td>
<td><a href="#passportfile">PassportFile</a></td>
<td><em>Optional</em>. Encrypted file with the reverse side of the document, provided by the user; available only for “driver_license” and “identity_card”. The file can be decrypted and verified using the accompanying <a href="#encryptedcredentials">EncryptedCredentials</a>.</td>
</tr>
<tr>
<td>selfie</td>
<td><a href="#passportfile">PassportFile</a></td>
<td><em>Optional</em>. Encrypted file with the selfie of the user holding a document, provided by the user; available if requested for “passport”, “driver_license”, “identity_card” and “internal_passport”. The file can be decrypted and verified using the accompanying <a href="#encryptedcredentials">EncryptedCredentials</a>.</td>
</tr>
<tr>
<td>translation</td>
<td>Array of <a href="#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 <a href="#encryptedcredentials">EncryptedCredentials</a>.</td>
</tr>
<tr>
<td>hash</td>
<td>String</td>
<td>Base64-encoded element hash for using in <a href="#passportelementerrorunspecified">PassportElementErrorUnspecified</a></td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="encryptedcredentials" href="#encryptedcredentials"><i class="anchor-icon"></i></a>EncryptedCredentials</h4>
<p>Describes data required for decrypting and authenticating <a href="#encryptedpassportelement">EncryptedPassportElement</a>. See the <a href="/passport#receiving-information">Telegram Passport Documentation</a> for a complete description of the data decryption and authentication processes.</p>
<table class="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&#39;s payload, data hashes and secrets required for <a href="#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&#39;s public RSA key, required for data decryption</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="setpassportdataerrors" href="#setpassportdataerrors"><i class="anchor-icon"></i></a>setPassportDataErrors</h4>
<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&#39;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>
<table class="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 <a href="#passportelementerror">PassportElementError</a></td>
<td>Yes</td>
<td>A JSON-serialized array describing the errors</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="passportelementerror" href="#passportelementerror"><i class="anchor-icon"></i></a>PassportElementError</h4>
<p>This object represents an error in the Telegram Passport element which was submitted that should be resolved by the user. It should be one of:</p>
<ul>
<li><a href="#passportelementerrordatafield">PassportElementErrorDataField</a></li>
<li><a href="#passportelementerrorfrontside">PassportElementErrorFrontSide</a></li>
<li><a href="#passportelementerrorreverseside">PassportElementErrorReverseSide</a></li>
<li><a href="#passportelementerrorselfie">PassportElementErrorSelfie</a></li>
<li><a href="#passportelementerrorfile">PassportElementErrorFile</a></li>
<li><a href="#passportelementerrorfiles">PassportElementErrorFiles</a></li>
<li><a href="#passportelementerrortranslationfile">PassportElementErrorTranslationFile</a></li>
<li><a href="#passportelementerrortranslationfiles">PassportElementErrorTranslationFiles</a></li>
<li><a href="#passportelementerrorunspecified">PassportElementErrorUnspecified</a></li>
</ul>
<h4><a class="anchor" name="passportelementerrordatafield" href="#passportelementerrordatafield"><i class="anchor-icon"></i></a>PassportElementErrorDataField</h4>
<p>Represents an issue in one of the data fields that was provided by the user. The error is considered resolved when the field&#39;s value changes.</p>
<table class="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&#39;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>
</tr>
<tr>
<td>data_hash</td>
<td>String</td>
<td>Base64-encoded data hash</td>
</tr>
<tr>
<td>message</td>
<td>String</td>
<td>Error message</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="passportelementerrorfrontside" href="#passportelementerrorfrontside"><i class="anchor-icon"></i></a>PassportElementErrorFrontSide</h4>
<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>
<table class="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&#39;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>
</tr>
<tr>
<td>message</td>
<td>String</td>
<td>Error message</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="passportelementerrorreverseside" href="#passportelementerrorreverseside"><i class="anchor-icon"></i></a>PassportElementErrorReverseSide</h4>
<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>
<table class="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&#39;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>
</tr>
<tr>
<td>message</td>
<td>String</td>
<td>Error message</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="passportelementerrorselfie" href="#passportelementerrorselfie"><i class="anchor-icon"></i></a>PassportElementErrorSelfie</h4>
<p>Represents an issue with the selfie with a document. The error is considered resolved when the file with the selfie changes.</p>
<table class="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&#39;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>
</tr>
<tr>
<td>message</td>
<td>String</td>
<td>Error message</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="passportelementerrorfile" href="#passportelementerrorfile"><i class="anchor-icon"></i></a>PassportElementErrorFile</h4>
<p>Represents an issue with a document scan. The error is considered resolved when the file with the document scan changes.</p>
<table class="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&#39;s Telegram Passport which has the issue, one of “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration”, “temporary_registration”</td>
</tr>
<tr>
<td>file_hash</td>
<td>String</td>
<td>Base64-encoded file hash</td>
</tr>
<tr>
<td>message</td>
<td>String</td>
<td>Error message</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="passportelementerrorfiles" href="#passportelementerrorfiles"><i class="anchor-icon"></i></a>PassportElementErrorFiles</h4>
<p>Represents an issue with a list of scans. The error is considered resolved when the list of files containing the scans changes.</p>
<table class="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&#39;s Telegram Passport which has the issue, one of “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration”, “temporary_registration”</td>
</tr>
<tr>
<td>file_hashes</td>
<td>Array of String</td>
<td>List of base64-encoded file hashes</td>
</tr>
<tr>
<td>message</td>
<td>String</td>
<td>Error message</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="passportelementerrortranslationfile" href="#passportelementerrortranslationfile"><i class="anchor-icon"></i></a>PassportElementErrorTranslationFile</h4>
<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>
<table class="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&#39;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>
</tr>
<tr>
<td>file_hash</td>
<td>String</td>
<td>Base64-encoded file hash</td>
</tr>
<tr>
<td>message</td>
<td>String</td>
<td>Error message</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="passportelementerrortranslationfiles" href="#passportelementerrortranslationfiles"><i class="anchor-icon"></i></a>PassportElementErrorTranslationFiles</h4>
<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>
<table class="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&#39;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>
</tr>
<tr>
<td>file_hashes</td>
<td>Array of String</td>
<td>List of base64-encoded file hashes</td>
</tr>
<tr>
<td>message</td>
<td>String</td>
<td>Error message</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="passportelementerrorunspecified" href="#passportelementerrorunspecified"><i class="anchor-icon"></i></a>PassportElementErrorUnspecified</h4>
<p>Represents an issue in an unspecified place. The error is considered resolved when new data is added.</p>
<table class="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>unspecified</em></td>
</tr>
<tr>
<td>type</td>
<td>String</td>
<td>Type of element of the user&#39;s Telegram Passport which has the issue</td>
</tr>
<tr>
<td>element_hash</td>
<td>String</td>
<td>Base64-encoded element hash</td>
</tr>
<tr>
<td>message</td>
<td>String</td>
<td>Error message</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" name="games" href="#games"><i class="anchor-icon"></i></a>Games</h3>
<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 <a href="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 <a href="#game">Game</a> and <a href="#inlinequeryresultgame">InlineQueryResultGame</a> objects.</li>
<li>Once you&#39;ve created a game via <a href="https://t.me/botfather">BotFather</a>, you can send games to chats as regular messages using the <a href="#sendgame">sendGame</a> method, or use <a href="#inline-mode">inline mode</a> with <a href="#inlinequeryresultgame">InlineQueryResultGame</a>.</li>
<li>If you send the game message without any buttons, it will automatically have a &#39;Play <em>GameName</em>&#39; button. When this button is pressed, your bot gets a <a href="#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 <a href="#inlinekeyboardbutton">InlineKeyboardButton</a>. You can add extra buttons according to taste: e.g., for a description of the rules, or to open the game&#39;s official community.</li>
<li>To make your game more attractive, you can upload a GIF animation that demonstrates the game to the users via <a href="https://t.me/botfather">BotFather</a> (see <a href="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 <a href="#setgamescore">setGameScore</a> to post high scores to the chat with the game, add the <em>disable_edit_message</em> parameter to disable automatic update of the message with the current scoreboard.</li>
<li>Use <a href="#getgamehighscores">getGameHighScores</a> to get data for in-game high score tables.</li>
<li>You can also add an extra <a href="/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 <a href="https://t.me/gamebot">@gamebot</a> and <a href="https://t.me/gamee">@gamee</a> bots.</li>
</ul>
<h4><a class="anchor" name="sendgame" href="#sendgame"><i class="anchor-icon"></i></a>sendGame</h4>
<p>Use this method to send a game. On success, the sent <a href="#message">Message</a> is returned.</p>
<table class="table">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>business_connection_id</td>
<td>String</td>
<td>Optional</td>
<td>Unique identifier of the business connection on behalf of which the message will be sent</td>
</tr>
<tr>
<td>chat_id</td>
<td>Integer</td>
<td>Yes</td>
<td>Unique identifier for the target chat</td>
</tr>
<tr>
<td>message_thread_id</td>
<td>Integer</td>
<td>Optional</td>
<td>Unique identifier for the target message thread (topic) of the forum; for forum supergroups only</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 <a href="https://t.me/botfather">@BotFather</a>.</td>
</tr>
<tr>
<td>disable_notification</td>
<td>Boolean</td>
<td>Optional</td>
<td>Sends the message <a href="https://telegram.org/blog/channels-2-0#silent-messages">silently</a>. Users will receive a notification with no sound.</td>
</tr>
<tr>
<td>protect_content</td>
<td>Boolean</td>
<td>Optional</td>
<td>Protects the contents of the sent message from forwarding and saving</td>
</tr>
<tr>
<td>message_effect_id</td>
<td>String</td>
<td>Optional</td>
<td>Unique identifier of the message effect to be added to the message; for private chats only</td>
</tr>
<tr>
<td>reply_parameters</td>
<td><a href="#replyparameters">ReplyParameters</a></td>
<td>Optional</td>
<td>Description of the message to reply to</td>
</tr>
<tr>
<td>reply_markup</td>
<td><a href="#inlinekeyboardmarkup">InlineKeyboardMarkup</a></td>
<td>Optional</td>
<td>A JSON-serialized object for an <a href="/bots/features#inline-keyboards">inline keyboard</a>. If empty, one &#39;Play game_title&#39; button will be shown. If not empty, the first button must launch the game.</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="game" href="#game"><i class="anchor-icon"></i></a>Game</h4>
<p>This object represents a game. Use BotFather to create and edit games, their short names will act as unique identifiers.</p>
<table class="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 <a href="#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 <a href="#setgamescore">setGameScore</a>, or manually edited using <a href="#editmessagetext">editMessageText</a>. 0-4096 characters.</td>
</tr>
<tr>
<td>text_entities</td>
<td>Array of <a href="#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><a href="#animation">Animation</a></td>
<td><em>Optional</em>. Animation that will be displayed in the game message in chats. Upload via <a href="https://t.me/botfather">BotFather</a></td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="callbackgame" href="#callbackgame"><i class="anchor-icon"></i></a>CallbackGame</h4>
<p>A placeholder, currently holds no information. Use <a href="https://t.me/botfather">BotFather</a> to set up your game.</p>
<h4><a class="anchor" name="setgamescore" href="#setgamescore"><i class="anchor-icon"></i></a>setGameScore</h4>
<p>Use this method to set the score of the specified user in a game message. On success, if the message is not an inline message, the <a href="#message">Message</a> is returned, otherwise <em>True</em> is returned. Returns an error, if the new score is not greater than the user&#39;s current score in the chat and <em>force</em> is <em>False</em>.</p>
<table class="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 <em>True</em> 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 <em>True</em> 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>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="getgamehighscores" href="#getgamehighscores"><i class="anchor-icon"></i></a>getGameHighScores</h4>
<p>Use this method to get data for high score tables. Will return the score of the specified user and several of their neighbors in a game. Returns an Array of <a href="#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 their neighbors are not among them. Please note that this behavior is subject to change.</p>
</blockquote>
<table class="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>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="gamehighscore" href="#gamehighscore"><i class="anchor-icon"></i></a>GameHighScore</h4>
<p>This object represents one row of the high scores table for a game.</p>
<table class="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><a href="#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&#39;s about all we&#39;ve got for now.<br>If you&#39;ve got any questions, please check out our <a href="/bots/faq"><strong>Bot FAQ »</strong></a></p>
</div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/privacy">Privacy</a></li>
<li><a href="//telegram.org/press">Press</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/android">Android</a></li>
<li><a href="//telegram.org/dl/web">Mobile Web</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/press">Press</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?47"></script>
<script src="/js/jquery.min.js?1"></script>
<script src="/js/bootstrap.min.js?1"></script>
<script>window.initDevPageNav&&initDevPageNav();
backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>