Update content of files

This commit is contained in:
GitHub Action 2022-08-12 14:37:52 +00:00
parent 42f76fb1c5
commit 59f6f437b4
6 changed files with 405 additions and 221 deletions

View file

@ -57,6 +57,13 @@
</blockquote> </blockquote>
<hr> <hr>
<h3><a class="anchor" name="recent-changes" href="#recent-changes"><i class="anchor-icon"></i></a>Recent changes</h3> <h3><a class="anchor" name="recent-changes" href="#recent-changes"><i class="anchor-icon"></i></a>Recent changes</h3>
<h4><a class="anchor" name="august-12-2022" href="#august-12-2022"><i class="anchor-icon"></i></a>August 12, 2022</h4>
<p><strong>Bot API 6.2</strong></p>
<ul>
<li>Added the field <em>isClosingConfirmationEnabled</em> and the methods <em>enableClosingConfirmation</em>, <em>disableClosingConfirmation</em>, <em>showPopup</em>, <em>showAlert</em>, <em>showConfirm</em> to the class <a href="#initializing-web-apps">WebApp</a>.</li>
<li>Added the field <em>is_premium</em> to the class <a href="#webappuser">WebAppUser</a>.</li>
<li>Added the event <em>popupClosed</em>.</li>
</ul>
<h4><a class="anchor" name="june-20-2022" href="#june-20-2022"><i class="anchor-icon"></i></a>June 20, 2022</h4> <h4><a class="anchor" name="june-20-2022" href="#june-20-2022"><i class="anchor-icon"></i></a>June 20, 2022</h4>
<p><strong>Bot API 6.1</strong></p> <p><strong>Bot API 6.1</strong></p>
<ul> <ul>
@ -146,10 +153,10 @@
<blockquote> <blockquote>
<p><strong>TL;DR:</strong> Web App Bots can request to be added directly to a user&#39;s attachment menu, allowing them to be quickly launched from any chat. To try this mode, open this <a href="https://t.me/durgerkingbot?startattach">attachment menu link</a> for <em>@DurgerKingBot</em>, then use the <img class="icon" src="/file/464001085/2/E4hNXSNQimQ.2503/bf6ffcab3cb3afd43d" alt="Attach"> menu in <strong>any type of chat</strong>.</p> <p><strong>TL;DR:</strong> Web App Bots can request to be added directly to a user&#39;s attachment menu, allowing them to be quickly launched from any chat. To try this mode, open this <a href="https://t.me/durgerkingbot?startattach">attachment menu link</a> for <em>@DurgerKingBot</em>, then use the <img class="icon" src="/file/464001085/2/E4hNXSNQimQ.2503/bf6ffcab3cb3afd43d" alt="Attach"> menu in <strong>any type of chat</strong>.</p>
</blockquote> </blockquote>
<p>Web App Bots can request to be added directly to a user&#39;s attachment menu, allowing them to be quickly launched from <strong>any type of chat</strong>. <sup><mark>NEW</mark></sup> You can configure in which types of chats your web app can be started from the attachment menu (private, groups, supergroups or channels).</p> <p>Web App Bots can request to be added directly to a user&#39;s attachment menu, allowing them to be quickly launched from <strong>any type of chat</strong>. You can configure in which types of chats your web app can be started from the attachment menu (private, groups, supergroups or channels).</p>
<p>Attachment menu integration is currently only available for major advertisers on the <a href="https://promote.telegram.org/basics">Telegram Ad Platform</a>. However, <strong>all bots</strong> can use it in the <a href="#using-bots-in-the-test-environment">test server environment</a>.</p> <p>Attachment menu integration is currently only available for major advertisers on the <a href="https://promote.telegram.org/basics">Telegram Ad Platform</a>. However, <strong>all bots</strong> can use it in the <a href="#using-bots-in-the-test-environment">test server environment</a>.</p>
<p>To enable this feature for your bot, open <a href="https://t.me/botfather">@BotFather</a> <a href="#using-bots-in-the-test-environment">from an account on the test server</a> and send the <code>/setattach</code> command or go to <em>Bot Settings &gt; Configure Attachment Menu</em>. Then specify the URL that will be opened to launch the bot&#39;s Web App via its icon in the attachment menu.</p> <p>To enable this feature for your bot, open <a href="https://t.me/botfather">@BotFather</a> <a href="#using-bots-in-the-test-environment">from an account on the test server</a> and send the <code>/setattach</code> command or go to <em>Bot Settings &gt; Configure Attachment Menu</em>. Then specify the URL that will be opened to launch the bot&#39;s Web App via its icon in the attachment menu.</p>
<p><sup><mark>NEW</mark></sup> You can add a &#39;Settings&#39; item to the context menu of your Web App using <a href="https://t.me/botfather">@BotFather</a>. When users select this option from the menu, your bot will receive a <code>settingsButtonClicked</code> event.</p> <p>You can add a &#39;Settings&#39; item to the context menu of your Web App using <a href="https://t.me/botfather">@BotFather</a>. When users select this option from the menu, your bot will receive a <code>settingsButtonClicked</code> event.</p>
<p>In addition to the user&#39;s <a href="#color-schemes">theme settings</a>, the bot will receive basic user information (<code>ID</code>, <code>name</code>, <code>username</code>, <code>language_code</code>, <code>photo</code>), as well as public info about the chat partner (<code>ID</code>, <code>name</code>, <code>username</code>, <code>photo</code>) or the chat info (<code>ID</code>, <code>type</code>, <code>title</code>, <code>username</code>, <code>photo</code>) and a unique identifier for the web view session <strong>query_id</strong>, which allows messages of any type to be sent to the chat on behalf of the user that opened the bot.</p> <p>In addition to the user&#39;s <a href="#color-schemes">theme settings</a>, the bot will receive basic user information (<code>ID</code>, <code>name</code>, <code>username</code>, <code>language_code</code>, <code>photo</code>), as well as public info about the chat partner (<code>ID</code>, <code>name</code>, <code>username</code>, <code>photo</code>) or the chat info (<code>ID</code>, <code>type</code>, <code>title</code>, <code>username</code>, <code>photo</code>) and a unique identifier for the web view session <strong>query_id</strong>, which allows messages of any type to be sent to the chat on behalf of the user that opened the bot.</p>
<p>The bot can call the Bot API method <a href="/bots/api#answerwebappquery">answerWebAppQuery</a>, which sends an inline message from the user via the bot to the chat where it was launched and closes the Web App.</p> <p>The bot can call the Bot API method <a href="/bots/api#answerwebappquery">answerWebAppQuery</a>, which sends an inline message from the user via the bot to the chat where it was launched and closes the Web App.</p>
<blockquote> <blockquote>
@ -180,7 +187,7 @@
<td>An object with input data transferred to the Web App.<br><strong>WARNING:</strong> Data from this field should not be trusted. You should only use data from <em>initData</em> on the bot&#39;s server and only after it has been <a href="#validating-data-received-via-the-web-app">validated</a>.</td> <td>An object with input data transferred to the Web App.<br><strong>WARNING:</strong> Data from this field should not be trusted. You should only use data from <em>initData</em> on the bot&#39;s server and only after it has been <a href="#validating-data-received-via-the-web-app">validated</a>.</td>
</tr> </tr>
<tr> <tr>
<td>version <sup><mark>NEW</mark></sup></td> <td>version</td>
<td>String</td> <td>String</td>
<td>The version of the Bot API available in the user&#39;s Telegram app.</td> <td>The version of the Bot API available in the user&#39;s Telegram app.</td>
</tr> </tr>
@ -210,17 +217,22 @@
<td>The height of the visible area of the Web App in its last stable state. Also available in CSS as a variable <code>var(--tg-viewport-stable-height)</code>.<br><br>The application can display just the top part of the Web App, with its lower part remaining outside the screen area. From this position, the user can “pull” the Web App to its maximum height, while the bot can do the same by calling the <strong>expand()</strong> method. Unlike the value of <code>viewportHeight</code>, the value of <code>viewportStableHeight</code> does not change as the position of the Web App changes with user gestures or during animations. The value of <code>viewportStableHeight</code> will be updated after all gestures and animations are completed and the Web App reaches its final size.<br><br><em>Note the <a href="#events-available-for-web-apps">event</a> <code>viewportChanged</code> with the passed parameter <code>isStateStable=true</code>, which will allow you to track when the stable state of the height of the visible area changes.</em></td> <td>The height of the visible area of the Web App in its last stable state. Also available in CSS as a variable <code>var(--tg-viewport-stable-height)</code>.<br><br>The application can display just the top part of the Web App, with its lower part remaining outside the screen area. From this position, the user can “pull” the Web App to its maximum height, while the bot can do the same by calling the <strong>expand()</strong> method. Unlike the value of <code>viewportHeight</code>, the value of <code>viewportStableHeight</code> does not change as the position of the Web App changes with user gestures or during animations. The value of <code>viewportStableHeight</code> will be updated after all gestures and animations are completed and the Web App reaches its final size.<br><br><em>Note the <a href="#events-available-for-web-apps">event</a> <code>viewportChanged</code> with the passed parameter <code>isStateStable=true</code>, which will allow you to track when the stable state of the height of the visible area changes.</em></td>
</tr> </tr>
<tr> <tr>
<td>headerColor <sup><mark>NEW</mark></sup></td> <td>headerColor</td>
<td>String</td> <td>String</td>
<td>Current header color in the <code>#RRGGBB</code> format.</td> <td>Current header color in the <code>#RRGGBB</code> format.</td>
</tr> </tr>
<tr> <tr>
<td>backgroundColor <sup><mark>NEW</mark></sup></td> <td>backgroundColor</td>
<td>String</td> <td>String</td>
<td>Current background color in the <code>#RRGGBB</code> format.</td> <td>Current background color in the <code>#RRGGBB</code> format.</td>
</tr> </tr>
<tr> <tr>
<td>BackButton <sup><mark>NEW</mark></sup></td> <td>isClosingConfirmationEnabled <sup><mark>NEW</mark></sup></td>
<td>Boolean</td>
<td><em>True</em>, if the confirmation dialog is enabled while the user is trying to close the Web App. <em>False</em>, if the confirmation dialog is disabled.</td>
</tr>
<tr>
<td>BackButton</td>
<td><a href="#backbutton">BackButton</a></td> <td><a href="#backbutton">BackButton</a></td>
<td>An object for controlling the back button which can be displayed in the header of the Web App in the Telegram interface.</td> <td>An object for controlling the back button which can be displayed in the header of the Web App in the Telegram interface.</td>
</tr> </tr>
@ -230,26 +242,36 @@
<td>An object for controlling the main button, which is displayed at the bottom of the Web App in the Telegram interface.</td> <td>An object for controlling the main button, which is displayed at the bottom of the Web App in the Telegram interface.</td>
</tr> </tr>
<tr> <tr>
<td>HapticFeedback <sup><mark>NEW</mark></sup></td> <td>HapticFeedback</td>
<td><a href="#hapticfeedback">HapticFeedback</a></td> <td><a href="#hapticfeedback">HapticFeedback</a></td>
<td>An object for controlling haptic feedback.</td> <td>An object for controlling haptic feedback.</td>
</tr> </tr>
<tr> <tr>
<td>isVersionAtLeast(version) <sup><mark>NEW</mark></sup></td> <td>isVersionAtLeast(version)</td>
<td>Function</td> <td>Function</td>
<td>Returns true if the user&#39;s app supports a version of the Bot API that is equal to or higher than the version passed as the parameter.</td> <td>Returns true if the user&#39;s app supports a version of the Bot API that is equal to or higher than the version passed as the parameter.</td>
</tr> </tr>
<tr> <tr>
<td>setHeaderColor(color) <sup><mark>NEW</mark></sup></td> <td>setHeaderColor(color)</td>
<td>Function</td> <td>Function</td>
<td><mark>Bot API 6.1+</mark> A method that sets the app header color. You can only pass <em>Telegram.WebApp.themeParams.bg_color</em> or <em>Telegram.WebApp.themeParams.secondary_bg_color</em> as a color or you can use keywords <em>bg_color</em>, <em>secondary_bg_color</em> instead.</td> <td><mark>Bot API 6.1+</mark> A method that sets the app header color. You can only pass <em>Telegram.WebApp.themeParams.bg_color</em> or <em>Telegram.WebApp.themeParams.secondary_bg_color</em> as a color or you can use keywords <em>bg_color</em>, <em>secondary_bg_color</em> instead.</td>
</tr> </tr>
<tr> <tr>
<td>setBackgroundColor(color) <sup><mark>NEW</mark></sup></td> <td>setBackgroundColor(color)</td>
<td>Function</td> <td>Function</td>
<td><mark>Bot API 6.1+</mark> A method that sets the app background color in the <code>#RRGGBB</code> format or you can use keywords <em>bg_color</em>, <em>secondary_bg_color</em> instead.</td> <td><mark>Bot API 6.1+</mark> A method that sets the app background color in the <code>#RRGGBB</code> format or you can use keywords <em>bg_color</em>, <em>secondary_bg_color</em> instead.</td>
</tr> </tr>
<tr> <tr>
<td>enableClosingConfirmation() <sup><mark>NEW</mark></sup></td>
<td>Function</td>
<td><mark>Bot API 6.2+</mark> A method that enables a confirmation dialog while the user is trying to close the Web App.</td>
</tr>
<tr>
<td>disableClosingConfirmation() <sup><mark>NEW</mark></sup></td>
<td>Function</td>
<td><mark>Bot API 6.2+</mark> A method that disables the confirmation dialog while the user is trying to close the Web App.</td>
</tr>
<tr>
<td>onEvent(eventType, eventHandler)</td> <td>onEvent(eventType, eventHandler)</td>
<td>Function</td> <td>Function</td>
<td>A method that sets the app event handler. Check <a href="#events-available-for-web-apps">the list of available events</a>.</td> <td>A method that sets the app event handler. Check <a href="#events-available-for-web-apps">the list of available events</a>.</td>
@ -265,21 +287,36 @@
<td>A method used to send data to the bot. When this method is called, a service message is sent to the bot containing the data <em>data</em> of the length up to 4096 bytes, and the Web App is closed. See the field <em>web_app_data</em> in the class <a href="/bots/api#message">Message</a>.<br><br><em>This method is only available for Web Apps launched via a <a href="#keyboard-button-web-apps">Keyboard button</a>.</em></td> <td>A method used to send data to the bot. When this method is called, a service message is sent to the bot containing the data <em>data</em> of the length up to 4096 bytes, and the Web App is closed. See the field <em>web_app_data</em> in the class <a href="/bots/api#message">Message</a>.<br><br><em>This method is only available for Web Apps launched via a <a href="#keyboard-button-web-apps">Keyboard button</a>.</em></td>
</tr> </tr>
<tr> <tr>
<td>openLink(url) <sup><mark>NEW</mark></sup></td> <td>openLink(url)</td>
<td>Function</td> <td>Function</td>
<td>A method that opens a link in an external browser. The Web App will <em>not</em> be closed.<br><br><em>Note that this method can be called only in response to the user interaction with the Web App interface (e.g. click inside the Web App or on the main button)</em></td> <td>A method that opens a link in an external browser. The Web App will <em>not</em> be closed.<br><br><em>Note that this method can be called only in response to the user interaction with the Web App interface (e.g. click inside the Web App or on the main button)</em></td>
</tr> </tr>
<tr> <tr>
<td>openTelegramLink(url) <sup><mark>NEW</mark></sup></td> <td>openTelegramLink(url)</td>
<td>Function</td> <td>Function</td>
<td>A method that opens a telegram link inside Telegram app. The Web App <em>will</em> be closed.</td> <td>A method that opens a telegram link inside Telegram app. The Web App <em>will</em> be closed.</td>
</tr> </tr>
<tr> <tr>
<td>openInvoice(url[, callback]) <sup><mark>NEW</mark></sup></td> <td>openInvoice(url[, callback])</td>
<td>Function</td> <td>Function</td>
<td><mark>Bot API 6.1+</mark> A method that opens an invoice using the link <em>url</em>. The Web App will receive the <a href="#events-available-for-web-apps">event</a> <em>invoiceClosed</em> when the invoice is closed. If an optional <em>callback</em> parameter was passed, the <em>callback</em> function will be called and the invoice status will be passed as the first argument.</td> <td><mark>Bot API 6.1+</mark> A method that opens an invoice using the link <em>url</em>. The Web App will receive the <a href="#events-available-for-web-apps">event</a> <em>invoiceClosed</em> when the invoice is closed. If an optional <em>callback</em> parameter was passed, the <em>callback</em> function will be called and the invoice status will be passed as the first argument.</td>
</tr> </tr>
<tr> <tr>
<td>showPopup(params[, callback]) <sup><mark>NEW</mark></sup></td>
<td>Function</td>
<td><mark>Bot API 6.2+</mark> A method that shows a native popup described by the <em>params</em> argument of the type <a href="#popupparams">PopupParams</a>. The Web App will receive the <a href="#events-available-for-web-apps">event</a> <em>popupClosed</em> when the popup is closed. If an optional <em>callback</em> parameter was passed, the <em>callback</em> function will be called and the field <em>id</em> of the pressed button will be passed as the first argument.</td>
</tr>
<tr>
<td>showAlert(message[, callback]) <sup><mark>NEW</mark></sup></td>
<td>Function</td>
<td><mark>Bot API 6.2+</mark> A method that shows <em>message</em> in a simple alert with a &#39;Close&#39; button. If an optional <em>callback</em> parameter was passed, the <em>callback</em> function will be called when the popup is closed.</td>
</tr>
<tr>
<td>showConfirm(message[, callback]) <sup><mark>NEW</mark></sup></td>
<td>Function</td>
<td><mark>Bot API 6.2+</mark> A method that shows <em>message</em> in a simple confirmation window with &#39;OK&#39; and &#39;Cancel&#39; buttons. If an optional <em>callback</em> parameter was passed, the <em>callback</em> function will be called when the popup is closed and the first argument will be a boolean indicating whether the user pressed the &#39;OK&#39; button.</td>
</tr>
<tr>
<td>ready()</td> <td>ready()</td>
<td>Function</td> <td>Function</td>
<td>A method that informs the Telegram app that the Web App is ready to be displayed.<br>It is recommended to call this method as early as possible, as soon as all essential interface elements are loaded. Once this method is called, the loading placeholder is hidden and the Web App is shown.<br>If the method is not called, the placeholder will be hidden only when the page is fully loaded.</td> <td>A method that informs the Telegram app that the Web App is ready to be displayed.<br>It is recommended to call this method as early as possible, as soon as all essential interface elements are loaded. Once this method is called, the loading placeholder is hidden and the Web App is shown.<br>If the method is not called, the placeholder will be hidden only when the page is fully loaded.</td>
@ -338,7 +375,7 @@
<td><em>Optional</em>. Button text color in the <code>#RRGGBB</code> format.<br>Also available as the CSS variable <code>var(--tg-theme-button-text-color)</code>.</td> <td><em>Optional</em>. Button text color in the <code>#RRGGBB</code> format.<br>Also available as the CSS variable <code>var(--tg-theme-button-text-color)</code>.</td>
</tr> </tr>
<tr> <tr>
<td>secondary_bg_color <sup><mark>NEW</mark></sup></td> <td>secondary_bg_color</td>
<td>String</td> <td>String</td>
<td><em>Optional</em>. <mark>Bot API 6.1+</mark> Secondary background color in the <code>#RRGGBB</code> format.<br>Also available as the CSS variable <code>var(--tg-theme-secondary-bg-color)</code>.</td> <td><em>Optional</em>. <mark>Bot API 6.1+</mark> Secondary background color in the <code>#RRGGBB</code> format.<br>Also available as the CSS variable <code>var(--tg-theme-secondary-bg-color)</code>.</td>
</tr> </tr>
@ -348,8 +385,64 @@
<a href="/file/464001695/11185/DAwyUjA7LNA.215601/26f4c8ebf862ae860d" target="_blank"><img src="/file/464001695/11185/DAwyUjA7LNA.215601/26f4c8ebf862ae860d" title="WebViewColors explained" class="dev_page_image" /></a> <a href="/file/464001695/11185/DAwyUjA7LNA.215601/26f4c8ebf862ae860d" target="_blank"><img src="/file/464001695/11185/DAwyUjA7LNA.215601/26f4c8ebf862ae860d" title="WebViewColors explained" class="dev_page_image" /></a>
</div> </div>
<h4><a class="anchor" name="popupparams" href="#popupparams"><i class="anchor-icon"></i></a>PopupParams</h4>
<p><sup><mark>NEW</mark></sup> This object describes the native popup.</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>. The text to be displayed in the popup title, 0-64 characters.</td>
</tr>
<tr>
<td>message</td>
<td>String</td>
<td>The message to be displayed in the body of the popup, 1-256 characters.</td>
</tr>
<tr>
<td>buttons</td>
<td>Array of <a href="#popupbutton">PopupButton</a></td>
<td><em>Optional</em>. List of buttons to be displayed in the popup, 1-3 buttons. Set to <em>[{“type”:“close”}]</em> by default.</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="popupbutton" href="#popupbutton"><i class="anchor-icon"></i></a>PopupButton</h4>
<p><sup><mark>NEW</mark></sup> This object describes the native popup button.</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><em>Optional</em>. Identifier of the button, 0-64 characters. Set to empty string by default.<br>If the button is pressed, its <em>id</em> is returned in the callback and the <em>popupClosed</em> event.</td>
</tr>
<tr>
<td>type</td>
<td>String</td>
<td><em>Optional</em>. Type of the button. Set to <em>default</em> by default.<br>Can be one of these values:<br>- <em>default</em>, a button with the default style,<br>- <em>ok</em>, a button with the localized text “OK”,<br>- <em>close</em>, a button with the localized text “Close”,<br>- <em>cancel</em>, a button with the localized text “Cancel”,<br>- <em>destructive</em>, a button with a style that indicates a destructive action (e.g. “Remove”, “Delete”, etc.).</td>
</tr>
<tr>
<td>text</td>
<td>String</td>
<td><em>Optional</em>. The text to be displayed on the button, 0-64 characters. Required if <em>type</em> is <em>default</em> or <em>destructive</em>. Irrelevant for other types.</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="backbutton" href="#backbutton"><i class="anchor-icon"></i></a>BackButton</h4> <h4><a class="anchor" name="backbutton" href="#backbutton"><i class="anchor-icon"></i></a>BackButton</h4>
<p><sup><mark>NEW</mark></sup> This object controls the <strong>back</strong> button, which can be displayed in the header of the Web App in the Telegram interface.</p> <p>This object controls the <strong>back</strong> button, which can be displayed in the header of the Web App in the Telegram interface.</p>
<table class="table"> <table class="table">
<thead> <thead>
<tr> <tr>
@ -439,7 +532,7 @@
<td>A method that sets the button press event handler. An alias for <code>Telegram.WebApp.onEvent(&#39;mainButtonClicked&#39;, callback)</code></td> <td>A method that sets the button press event handler. An alias for <code>Telegram.WebApp.onEvent(&#39;mainButtonClicked&#39;, callback)</code></td>
</tr> </tr>
<tr> <tr>
<td>offClick(callback) <sup><mark>NEW</mark></sup></td> <td>offClick(callback)</td>
<td>Function</td> <td>Function</td>
<td>A method that removes the button press event handler. An alias for <code>Telegram.WebApp.offEvent(&#39;mainButtonClicked&#39;, callback)</code></td> <td>A method that removes the button press event handler. An alias for <code>Telegram.WebApp.offEvent(&#39;mainButtonClicked&#39;, callback)</code></td>
</tr> </tr>
@ -482,7 +575,7 @@
</table> </table>
<p>All these methods return the MainButton object so they can be chained.</p> <p>All these methods return the MainButton object so they can be chained.</p>
<h4><a class="anchor" name="hapticfeedback" href="#hapticfeedback"><i class="anchor-icon"></i></a>HapticFeedback</h4> <h4><a class="anchor" name="hapticfeedback" href="#hapticfeedback"><i class="anchor-icon"></i></a>HapticFeedback</h4>
<p><sup><mark>NEW</mark></sup> This object controls haptic feedback.</p> <p>This object controls haptic feedback.</p>
<table class="table"> <table class="table">
<thead> <thead>
<tr> <tr>
@ -537,7 +630,7 @@
<td><em>Optional.</em> An object containing data about the chat partner of the current user in the chat where the bot was launched via the attachment menu. Returned only for private chats and only for Web Apps launched via the attachment menu.</td> <td><em>Optional.</em> An object containing data about the chat partner of the current user in the chat where the bot was launched via the attachment menu. Returned only for private chats and only for Web Apps launched via the attachment menu.</td>
</tr> </tr>
<tr> <tr>
<td>chat <sup><mark>NEW</mark></sup></td> <td>chat</td>
<td><a href="#webappchat">WebAppChat</a></td> <td><a href="#webappchat">WebAppChat</a></td>
<td><em>Optional.</em> An object containing data about the chat where the bot was launched via the attachment menu. Returned for supergroups, channels and group chats only for Web Apps launched via the attachment menu.</td> <td><em>Optional.</em> An object containing data about the chat where the bot was launched via the attachment menu. Returned for supergroups, channels and group chats only for Web Apps launched via the attachment menu.</td>
</tr> </tr>
@ -547,7 +640,7 @@
<td><em>Optional.</em> The value of the <em>startattach</em> parameter, passed <a href="#adding-bots-to-the-attachment-menu">via link</a>. Only returned for Web Apps when launched from the attachment menu via link.<br><br>The value of the <code>start_param</code> parameter will also be passed in the GET-parameter <code>tgWebAppStartParam</code>, so the Web App can load the correct interface right away.</td> <td><em>Optional.</em> The value of the <em>startattach</em> parameter, passed <a href="#adding-bots-to-the-attachment-menu">via link</a>. Only returned for Web Apps when launched from the attachment menu via link.<br><br>The value of the <code>start_param</code> parameter will also be passed in the GET-parameter <code>tgWebAppStartParam</code>, so the Web App can load the correct interface right away.</td>
</tr> </tr>
<tr> <tr>
<td>can_send_after <sup><mark>NEW</mark></sup></td> <td>can_send_after</td>
<td>Integer</td> <td>Integer</td>
<td><em>Optional.</em> Time in seconds, after which a message can be sent via the <a href="/bots/api#answerwebappquery">answerWebAppQuery</a> method.</td> <td><em>Optional.</em> Time in seconds, after which a message can be sent via the <a href="/bots/api#answerwebappquery">answerWebAppQuery</a> method.</td>
</tr> </tr>
@ -605,6 +698,11 @@
<td><em>Optional</em>. <a href="https://en.wikipedia.org/wiki/IETF_language_tag">IETF language tag</a> of the user&#39;s language. Returns in <em>user</em> field only.</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. Returns in <em>user</em> field only.</td>
</tr> </tr>
<tr> <tr>
<td>is_premium <sup><mark>NEW</mark></sup></td>
<td>True</td>
<td><em>Optional</em>. <em>True</em>, if this user is a Telegram Premium user</td>
</tr>
<tr>
<td>photo_url</td> <td>photo_url</td>
<td>String</td> <td>String</td>
<td><em>Optional</em>. URL of the users profile photo. The photo can be in .jpeg or .svg formats. Only returned for Web Apps launched from the attachment menu.</td> <td><em>Optional</em>. URL of the users profile photo. The photo can be in .jpeg or .svg formats. Only returned for Web Apps launched from the attachment menu.</td>
@ -612,7 +710,7 @@
</tbody> </tbody>
</table> </table>
<h4><a class="anchor" name="webappchat" href="#webappchat"><i class="anchor-icon"></i></a>WebAppChat</h4> <h4><a class="anchor" name="webappchat" href="#webappchat"><i class="anchor-icon"></i></a>WebAppChat</h4>
<p><sup><mark>NEW</mark></sup> This object represents a chat.</p> <p>This object represents a chat.</p>
<table class="table"> <table class="table">
<thead> <thead>
<tr> <tr>
@ -684,17 +782,21 @@ if (hex(HMAC_SHA256(data_check_string, secret_key)) == hash) {
<td>Occurs when the <a href="#mainbutton">main button</a> is pressed.<br><em>eventHandler</em> receives no parameters.</td> <td>Occurs when the <a href="#mainbutton">main button</a> is pressed.<br><em>eventHandler</em> receives no parameters.</td>
</tr> </tr>
<tr> <tr>
<td><code>backButtonClicked</code> <sup><mark>NEW</mark></sup></td> <td><code>backButtonClicked</code></td>
<td><mark>Bot API 6.1+</mark> Occurrs when the <a href="#backbutton">back button</a> is pressed.<br><em>eventHandler</em> receives no parameters.</td> <td><mark>Bot API 6.1+</mark> Occurrs when the <a href="#backbutton">back button</a> is pressed.<br><em>eventHandler</em> receives no parameters.</td>
</tr> </tr>
<tr> <tr>
<td><code>settingsButtonClicked</code> <sup><mark>NEW</mark></sup></td> <td><code>settingsButtonClicked</code></td>
<td><mark>Bot API 6.1+</mark> Occurrs when the Settings item in context menu is pressed.<br><em>eventHandler</em> receives no parameters.</td> <td><mark>Bot API 6.1+</mark> Occurrs when the Settings item in context menu is pressed.<br><em>eventHandler</em> receives no parameters.</td>
</tr> </tr>
<tr> <tr>
<td><code>invoiceClosed</code> <sup><mark>NEW</mark></sup></td> <td><code>invoiceClosed</code></td>
<td><mark>Bot API 6.1+</mark> Occurrs when the opened invoice is closed.<br><em>eventHandler</em> receives an object with the two fields: <em>url</em> invoice link provided and <em>status</em> one of the invoice statuses:<br>- <strong>paid</strong> invoice was paid successfully,<br>- <strong>cancelled</strong> user closed this invoice without paying,<br>- <strong>failed</strong> user tried to pay, but the payment was failed,<br>- <strong>pending</strong> the payment is still processing. The bot will receive a service message about a <a href="https://core.telegram.org/bots/api#successfulpayment">successful payment</a> when the payment is successfully paid.</td> <td><mark>Bot API 6.1+</mark> Occurrs when the opened invoice is closed.<br><em>eventHandler</em> receives an object with the two fields: <em>url</em> invoice link provided and <em>status</em> one of the invoice statuses:<br>- <strong>paid</strong> invoice was paid successfully,<br>- <strong>cancelled</strong> user closed this invoice without paying,<br>- <strong>failed</strong> user tried to pay, but the payment was failed,<br>- <strong>pending</strong> the payment is still processing. The bot will receive a service message about a <a href="https://core.telegram.org/bots/api#successfulpayment">successful payment</a> when the payment is successfully paid.</td>
</tr> </tr>
<tr>
<td><code>popupClosed</code> <sup><mark>NEW</mark></sup></td>
<td><mark>Bot API 6.2+</mark> Occurrs when the opened popup is closed.<br><em>eventHandler</em> receives an object with the single field <em>button_id</em> the value of the field <em>id</em> of the pressed button. If no buttons were pressed, the field <em>button_id</em> will be <em>null</em>.</td>
</tr>
</tbody> </tbody>
</table> </table>
<h4><a class="anchor" name="adding-bots-to-the-attachment-menu" href="#adding-bots-to-the-attachment-menu"><i class="anchor-icon"></i></a>Adding Bots to the Attachment Menu</h4> <h4><a class="anchor" name="adding-bots-to-the-attachment-menu" href="#adding-bots-to-the-attachment-menu"><i class="anchor-icon"></i></a>Adding Bots to the Attachment Menu</h4>

View file

@ -134,7 +134,7 @@
<p>For more info about using the <a href="https://t.me/Stickers">@Stickers</a> bot, click <a href="#using-the-stickers-bot">here</a>.</p> <p>For more info about using the <a href="https://t.me/Stickers">@Stickers</a> bot, click <a href="#using-the-stickers-bot">here</a>.</p>
</blockquote> </blockquote>
<h3><a class="anchor" name="custom-emoji" href="#custom-emoji"><i class="anchor-icon"></i></a>Custom Emoji</h3> <h3><a class="anchor" name="custom-emoji" href="#custom-emoji"><i class="anchor-icon"></i></a>Custom Emoji</h3>
<p>As of version 8.9 released in July 2022, Telegram apps support <a href="https://telegram.org/blog/custom-emoji">custom emoji</a>.<br>Emoji use the same technology as stickers, making it very easy to convert your art to <strong>both formats</strong>. Check out the <a href="#video-requirements">video</a> and <a href="#image-requirements">image</a> sections for details on the different size requirements.<br>To upload them, use the <code>/newemojipack</code> command in <a href="https://t.me/stickers">@Stickers</a>. </p> <p>As of version 8.9 released in August 2022, Telegram apps support <a href="https://telegram.org/blog/custom-emoji">custom emoji</a>.<br>Emoji use the same technology as stickers, making it very easy to convert your art to <strong>both formats</strong>. Check out the <a href="#video-requirements">video</a> and <a href="#image-requirements">image</a> sections for details on the different size requirements.<br>To upload them, use the <code>/newemojipack</code> command in <a href="https://t.me/stickers">@Stickers</a>. </p>
<blockquote> <blockquote>
<p>Everyone can create new custom emoji, however, adding and using custom sets is currently an exclusive <a href="https://t.me/premium">feature</a> of <a href="https://telegram.org/blog/700-million-and-premium">Telegram Premium</a> users.</p> <p>Everyone can create new custom emoji, however, adding and using custom sets is currently an exclusive <a href="https://t.me/premium">feature</a> of <a href="https://telegram.org/blog/700-million-and-premium">Telegram Premium</a> users.</p>
</blockquote> </blockquote>

View file

@ -57,6 +57,13 @@
</blockquote> </blockquote>
<hr> <hr>
<h3><a class="anchor" name="recent-changes" href="#recent-changes"><i class="anchor-icon"></i></a>Recent changes</h3> <h3><a class="anchor" name="recent-changes" href="#recent-changes"><i class="anchor-icon"></i></a>Recent changes</h3>
<h4><a class="anchor" name="august-12-2022" href="#august-12-2022"><i class="anchor-icon"></i></a>August 12, 2022</h4>
<p><strong>Bot API 6.2</strong></p>
<ul>
<li>Added the field <em>isClosingConfirmationEnabled</em> and the methods <em>enableClosingConfirmation</em>, <em>disableClosingConfirmation</em>, <em>showPopup</em>, <em>showAlert</em>, <em>showConfirm</em> to the class <a href="#initializing-web-apps">WebApp</a>.</li>
<li>Added the field <em>is_premium</em> to the class <a href="#webappuser">WebAppUser</a>.</li>
<li>Added the event <em>popupClosed</em>.</li>
</ul>
<h4><a class="anchor" name="june-20-2022" href="#june-20-2022"><i class="anchor-icon"></i></a>June 20, 2022</h4> <h4><a class="anchor" name="june-20-2022" href="#june-20-2022"><i class="anchor-icon"></i></a>June 20, 2022</h4>
<p><strong>Bot API 6.1</strong></p> <p><strong>Bot API 6.1</strong></p>
<ul> <ul>
@ -146,10 +153,10 @@
<blockquote> <blockquote>
<p><strong>TL;DR:</strong> Web App Bots can request to be added directly to a user&#39;s attachment menu, allowing them to be quickly launched from any chat. To try this mode, open this <a href="https://t.me/durgerkingbot?startattach">attachment menu link</a> for <em>@DurgerKingBot</em>, then use the <img class="icon" src="/file/464001085/2/E4hNXSNQimQ.2503/bf6ffcab3cb3afd43d" alt="Attach"> menu in <strong>any type of chat</strong>.</p> <p><strong>TL;DR:</strong> Web App Bots can request to be added directly to a user&#39;s attachment menu, allowing them to be quickly launched from any chat. To try this mode, open this <a href="https://t.me/durgerkingbot?startattach">attachment menu link</a> for <em>@DurgerKingBot</em>, then use the <img class="icon" src="/file/464001085/2/E4hNXSNQimQ.2503/bf6ffcab3cb3afd43d" alt="Attach"> menu in <strong>any type of chat</strong>.</p>
</blockquote> </blockquote>
<p>Web App Bots can request to be added directly to a user&#39;s attachment menu, allowing them to be quickly launched from <strong>any type of chat</strong>. <sup><mark>NEW</mark></sup> You can configure in which types of chats your web app can be started from the attachment menu (private, groups, supergroups or channels).</p> <p>Web App Bots can request to be added directly to a user&#39;s attachment menu, allowing them to be quickly launched from <strong>any type of chat</strong>. You can configure in which types of chats your web app can be started from the attachment menu (private, groups, supergroups or channels).</p>
<p>Attachment menu integration is currently only available for major advertisers on the <a href="https://promote.telegram.org/basics">Telegram Ad Platform</a>. However, <strong>all bots</strong> can use it in the <a href="#using-bots-in-the-test-environment">test server environment</a>.</p> <p>Attachment menu integration is currently only available for major advertisers on the <a href="https://promote.telegram.org/basics">Telegram Ad Platform</a>. However, <strong>all bots</strong> can use it in the <a href="#using-bots-in-the-test-environment">test server environment</a>.</p>
<p>To enable this feature for your bot, open <a href="https://t.me/botfather">@BotFather</a> <a href="#using-bots-in-the-test-environment">from an account on the test server</a> and send the <code>/setattach</code> command or go to <em>Bot Settings &gt; Configure Attachment Menu</em>. Then specify the URL that will be opened to launch the bot&#39;s Web App via its icon in the attachment menu.</p> <p>To enable this feature for your bot, open <a href="https://t.me/botfather">@BotFather</a> <a href="#using-bots-in-the-test-environment">from an account on the test server</a> and send the <code>/setattach</code> command or go to <em>Bot Settings &gt; Configure Attachment Menu</em>. Then specify the URL that will be opened to launch the bot&#39;s Web App via its icon in the attachment menu.</p>
<p><sup><mark>NEW</mark></sup> You can add a &#39;Settings&#39; item to the context menu of your Web App using <a href="https://t.me/botfather">@BotFather</a>. When users select this option from the menu, your bot will receive a <code>settingsButtonClicked</code> event.</p> <p>You can add a &#39;Settings&#39; item to the context menu of your Web App using <a href="https://t.me/botfather">@BotFather</a>. When users select this option from the menu, your bot will receive a <code>settingsButtonClicked</code> event.</p>
<p>In addition to the user&#39;s <a href="#color-schemes">theme settings</a>, the bot will receive basic user information (<code>ID</code>, <code>name</code>, <code>username</code>, <code>language_code</code>, <code>photo</code>), as well as public info about the chat partner (<code>ID</code>, <code>name</code>, <code>username</code>, <code>photo</code>) or the chat info (<code>ID</code>, <code>type</code>, <code>title</code>, <code>username</code>, <code>photo</code>) and a unique identifier for the web view session <strong>query_id</strong>, which allows messages of any type to be sent to the chat on behalf of the user that opened the bot.</p> <p>In addition to the user&#39;s <a href="#color-schemes">theme settings</a>, the bot will receive basic user information (<code>ID</code>, <code>name</code>, <code>username</code>, <code>language_code</code>, <code>photo</code>), as well as public info about the chat partner (<code>ID</code>, <code>name</code>, <code>username</code>, <code>photo</code>) or the chat info (<code>ID</code>, <code>type</code>, <code>title</code>, <code>username</code>, <code>photo</code>) and a unique identifier for the web view session <strong>query_id</strong>, which allows messages of any type to be sent to the chat on behalf of the user that opened the bot.</p>
<p>The bot can call the Bot API method <a href="/bots/api#answerwebappquery">answerWebAppQuery</a>, which sends an inline message from the user via the bot to the chat where it was launched and closes the Web App.</p> <p>The bot can call the Bot API method <a href="/bots/api#answerwebappquery">answerWebAppQuery</a>, which sends an inline message from the user via the bot to the chat where it was launched and closes the Web App.</p>
<blockquote> <blockquote>
@ -180,7 +187,7 @@
<td>An object with input data transferred to the Web App.<br><strong>WARNING:</strong> Data from this field should not be trusted. You should only use data from <em>initData</em> on the bot&#39;s server and only after it has been <a href="#validating-data-received-via-the-web-app">validated</a>.</td> <td>An object with input data transferred to the Web App.<br><strong>WARNING:</strong> Data from this field should not be trusted. You should only use data from <em>initData</em> on the bot&#39;s server and only after it has been <a href="#validating-data-received-via-the-web-app">validated</a>.</td>
</tr> </tr>
<tr> <tr>
<td>version <sup><mark>NEW</mark></sup></td> <td>version</td>
<td>String</td> <td>String</td>
<td>The version of the Bot API available in the user&#39;s Telegram app.</td> <td>The version of the Bot API available in the user&#39;s Telegram app.</td>
</tr> </tr>
@ -210,17 +217,22 @@
<td>The height of the visible area of the Web App in its last stable state. Also available in CSS as a variable <code>var(--tg-viewport-stable-height)</code>.<br><br>The application can display just the top part of the Web App, with its lower part remaining outside the screen area. From this position, the user can “pull” the Web App to its maximum height, while the bot can do the same by calling the <strong>expand()</strong> method. Unlike the value of <code>viewportHeight</code>, the value of <code>viewportStableHeight</code> does not change as the position of the Web App changes with user gestures or during animations. The value of <code>viewportStableHeight</code> will be updated after all gestures and animations are completed and the Web App reaches its final size.<br><br><em>Note the <a href="#events-available-for-web-apps">event</a> <code>viewportChanged</code> with the passed parameter <code>isStateStable=true</code>, which will allow you to track when the stable state of the height of the visible area changes.</em></td> <td>The height of the visible area of the Web App in its last stable state. Also available in CSS as a variable <code>var(--tg-viewport-stable-height)</code>.<br><br>The application can display just the top part of the Web App, with its lower part remaining outside the screen area. From this position, the user can “pull” the Web App to its maximum height, while the bot can do the same by calling the <strong>expand()</strong> method. Unlike the value of <code>viewportHeight</code>, the value of <code>viewportStableHeight</code> does not change as the position of the Web App changes with user gestures or during animations. The value of <code>viewportStableHeight</code> will be updated after all gestures and animations are completed and the Web App reaches its final size.<br><br><em>Note the <a href="#events-available-for-web-apps">event</a> <code>viewportChanged</code> with the passed parameter <code>isStateStable=true</code>, which will allow you to track when the stable state of the height of the visible area changes.</em></td>
</tr> </tr>
<tr> <tr>
<td>headerColor <sup><mark>NEW</mark></sup></td> <td>headerColor</td>
<td>String</td> <td>String</td>
<td>Current header color in the <code>#RRGGBB</code> format.</td> <td>Current header color in the <code>#RRGGBB</code> format.</td>
</tr> </tr>
<tr> <tr>
<td>backgroundColor <sup><mark>NEW</mark></sup></td> <td>backgroundColor</td>
<td>String</td> <td>String</td>
<td>Current background color in the <code>#RRGGBB</code> format.</td> <td>Current background color in the <code>#RRGGBB</code> format.</td>
</tr> </tr>
<tr> <tr>
<td>BackButton <sup><mark>NEW</mark></sup></td> <td>isClosingConfirmationEnabled <sup><mark>NEW</mark></sup></td>
<td>Boolean</td>
<td><em>True</em>, if the confirmation dialog is enabled while the user is trying to close the Web App. <em>False</em>, if the confirmation dialog is disabled.</td>
</tr>
<tr>
<td>BackButton</td>
<td><a href="#backbutton">BackButton</a></td> <td><a href="#backbutton">BackButton</a></td>
<td>An object for controlling the back button which can be displayed in the header of the Web App in the Telegram interface.</td> <td>An object for controlling the back button which can be displayed in the header of the Web App in the Telegram interface.</td>
</tr> </tr>
@ -230,26 +242,36 @@
<td>An object for controlling the main button, which is displayed at the bottom of the Web App in the Telegram interface.</td> <td>An object for controlling the main button, which is displayed at the bottom of the Web App in the Telegram interface.</td>
</tr> </tr>
<tr> <tr>
<td>HapticFeedback <sup><mark>NEW</mark></sup></td> <td>HapticFeedback</td>
<td><a href="#hapticfeedback">HapticFeedback</a></td> <td><a href="#hapticfeedback">HapticFeedback</a></td>
<td>An object for controlling haptic feedback.</td> <td>An object for controlling haptic feedback.</td>
</tr> </tr>
<tr> <tr>
<td>isVersionAtLeast(version) <sup><mark>NEW</mark></sup></td> <td>isVersionAtLeast(version)</td>
<td>Function</td> <td>Function</td>
<td>Returns true if the user&#39;s app supports a version of the Bot API that is equal to or higher than the version passed as the parameter.</td> <td>Returns true if the user&#39;s app supports a version of the Bot API that is equal to or higher than the version passed as the parameter.</td>
</tr> </tr>
<tr> <tr>
<td>setHeaderColor(color) <sup><mark>NEW</mark></sup></td> <td>setHeaderColor(color)</td>
<td>Function</td> <td>Function</td>
<td><mark>Bot API 6.1+</mark> A method that sets the app header color. You can only pass <em>Telegram.WebApp.themeParams.bg_color</em> or <em>Telegram.WebApp.themeParams.secondary_bg_color</em> as a color or you can use keywords <em>bg_color</em>, <em>secondary_bg_color</em> instead.</td> <td><mark>Bot API 6.1+</mark> A method that sets the app header color. You can only pass <em>Telegram.WebApp.themeParams.bg_color</em> or <em>Telegram.WebApp.themeParams.secondary_bg_color</em> as a color or you can use keywords <em>bg_color</em>, <em>secondary_bg_color</em> instead.</td>
</tr> </tr>
<tr> <tr>
<td>setBackgroundColor(color) <sup><mark>NEW</mark></sup></td> <td>setBackgroundColor(color)</td>
<td>Function</td> <td>Function</td>
<td><mark>Bot API 6.1+</mark> A method that sets the app background color in the <code>#RRGGBB</code> format or you can use keywords <em>bg_color</em>, <em>secondary_bg_color</em> instead.</td> <td><mark>Bot API 6.1+</mark> A method that sets the app background color in the <code>#RRGGBB</code> format or you can use keywords <em>bg_color</em>, <em>secondary_bg_color</em> instead.</td>
</tr> </tr>
<tr> <tr>
<td>enableClosingConfirmation() <sup><mark>NEW</mark></sup></td>
<td>Function</td>
<td><mark>Bot API 6.2+</mark> A method that enables a confirmation dialog while the user is trying to close the Web App.</td>
</tr>
<tr>
<td>disableClosingConfirmation() <sup><mark>NEW</mark></sup></td>
<td>Function</td>
<td><mark>Bot API 6.2+</mark> A method that disables the confirmation dialog while the user is trying to close the Web App.</td>
</tr>
<tr>
<td>onEvent(eventType, eventHandler)</td> <td>onEvent(eventType, eventHandler)</td>
<td>Function</td> <td>Function</td>
<td>A method that sets the app event handler. Check <a href="#events-available-for-web-apps">the list of available events</a>.</td> <td>A method that sets the app event handler. Check <a href="#events-available-for-web-apps">the list of available events</a>.</td>
@ -265,21 +287,36 @@
<td>A method used to send data to the bot. When this method is called, a service message is sent to the bot containing the data <em>data</em> of the length up to 4096 bytes, and the Web App is closed. See the field <em>web_app_data</em> in the class <a href="/bots/api#message">Message</a>.<br><br><em>This method is only available for Web Apps launched via a <a href="#keyboard-button-web-apps">Keyboard button</a>.</em></td> <td>A method used to send data to the bot. When this method is called, a service message is sent to the bot containing the data <em>data</em> of the length up to 4096 bytes, and the Web App is closed. See the field <em>web_app_data</em> in the class <a href="/bots/api#message">Message</a>.<br><br><em>This method is only available for Web Apps launched via a <a href="#keyboard-button-web-apps">Keyboard button</a>.</em></td>
</tr> </tr>
<tr> <tr>
<td>openLink(url) <sup><mark>NEW</mark></sup></td> <td>openLink(url)</td>
<td>Function</td> <td>Function</td>
<td>A method that opens a link in an external browser. The Web App will <em>not</em> be closed.<br><br><em>Note that this method can be called only in response to the user interaction with the Web App interface (e.g. click inside the Web App or on the main button)</em></td> <td>A method that opens a link in an external browser. The Web App will <em>not</em> be closed.<br><br><em>Note that this method can be called only in response to the user interaction with the Web App interface (e.g. click inside the Web App or on the main button)</em></td>
</tr> </tr>
<tr> <tr>
<td>openTelegramLink(url) <sup><mark>NEW</mark></sup></td> <td>openTelegramLink(url)</td>
<td>Function</td> <td>Function</td>
<td>A method that opens a telegram link inside Telegram app. The Web App <em>will</em> be closed.</td> <td>A method that opens a telegram link inside Telegram app. The Web App <em>will</em> be closed.</td>
</tr> </tr>
<tr> <tr>
<td>openInvoice(url[, callback]) <sup><mark>NEW</mark></sup></td> <td>openInvoice(url[, callback])</td>
<td>Function</td> <td>Function</td>
<td><mark>Bot API 6.1+</mark> A method that opens an invoice using the link <em>url</em>. The Web App will receive the <a href="#events-available-for-web-apps">event</a> <em>invoiceClosed</em> when the invoice is closed. If an optional <em>callback</em> parameter was passed, the <em>callback</em> function will be called and the invoice status will be passed as the first argument.</td> <td><mark>Bot API 6.1+</mark> A method that opens an invoice using the link <em>url</em>. The Web App will receive the <a href="#events-available-for-web-apps">event</a> <em>invoiceClosed</em> when the invoice is closed. If an optional <em>callback</em> parameter was passed, the <em>callback</em> function will be called and the invoice status will be passed as the first argument.</td>
</tr> </tr>
<tr> <tr>
<td>showPopup(params[, callback]) <sup><mark>NEW</mark></sup></td>
<td>Function</td>
<td><mark>Bot API 6.2+</mark> A method that shows a native popup described by the <em>params</em> argument of the type <a href="#popupparams">PopupParams</a>. The Web App will receive the <a href="#events-available-for-web-apps">event</a> <em>popupClosed</em> when the popup is closed. If an optional <em>callback</em> parameter was passed, the <em>callback</em> function will be called and the field <em>id</em> of the pressed button will be passed as the first argument.</td>
</tr>
<tr>
<td>showAlert(message[, callback]) <sup><mark>NEW</mark></sup></td>
<td>Function</td>
<td><mark>Bot API 6.2+</mark> A method that shows <em>message</em> in a simple alert with a &#39;Close&#39; button. If an optional <em>callback</em> parameter was passed, the <em>callback</em> function will be called when the popup is closed.</td>
</tr>
<tr>
<td>showConfirm(message[, callback]) <sup><mark>NEW</mark></sup></td>
<td>Function</td>
<td><mark>Bot API 6.2+</mark> A method that shows <em>message</em> in a simple confirmation window with &#39;OK&#39; and &#39;Cancel&#39; buttons. If an optional <em>callback</em> parameter was passed, the <em>callback</em> function will be called when the popup is closed and the first argument will be a boolean indicating whether the user pressed the &#39;OK&#39; button.</td>
</tr>
<tr>
<td>ready()</td> <td>ready()</td>
<td>Function</td> <td>Function</td>
<td>A method that informs the Telegram app that the Web App is ready to be displayed.<br>It is recommended to call this method as early as possible, as soon as all essential interface elements are loaded. Once this method is called, the loading placeholder is hidden and the Web App is shown.<br>If the method is not called, the placeholder will be hidden only when the page is fully loaded.</td> <td>A method that informs the Telegram app that the Web App is ready to be displayed.<br>It is recommended to call this method as early as possible, as soon as all essential interface elements are loaded. Once this method is called, the loading placeholder is hidden and the Web App is shown.<br>If the method is not called, the placeholder will be hidden only when the page is fully loaded.</td>
@ -338,7 +375,7 @@
<td><em>Optional</em>. Button text color in the <code>#RRGGBB</code> format.<br>Also available as the CSS variable <code>var(--tg-theme-button-text-color)</code>.</td> <td><em>Optional</em>. Button text color in the <code>#RRGGBB</code> format.<br>Also available as the CSS variable <code>var(--tg-theme-button-text-color)</code>.</td>
</tr> </tr>
<tr> <tr>
<td>secondary_bg_color <sup><mark>NEW</mark></sup></td> <td>secondary_bg_color</td>
<td>String</td> <td>String</td>
<td><em>Optional</em>. <mark>Bot API 6.1+</mark> Secondary background color in the <code>#RRGGBB</code> format.<br>Also available as the CSS variable <code>var(--tg-theme-secondary-bg-color)</code>.</td> <td><em>Optional</em>. <mark>Bot API 6.1+</mark> Secondary background color in the <code>#RRGGBB</code> format.<br>Also available as the CSS variable <code>var(--tg-theme-secondary-bg-color)</code>.</td>
</tr> </tr>
@ -348,8 +385,64 @@
<a href="/file/464001695/11185/DAwyUjA7LNA.215601/26f4c8ebf862ae860d" target="_blank"><img src="/file/464001695/11185/DAwyUjA7LNA.215601/26f4c8ebf862ae860d" title="WebViewColors explained" class="dev_page_image" /></a> <a href="/file/464001695/11185/DAwyUjA7LNA.215601/26f4c8ebf862ae860d" target="_blank"><img src="/file/464001695/11185/DAwyUjA7LNA.215601/26f4c8ebf862ae860d" title="WebViewColors explained" class="dev_page_image" /></a>
</div> </div>
<h4><a class="anchor" name="popupparams" href="#popupparams"><i class="anchor-icon"></i></a>PopupParams</h4>
<p><sup><mark>NEW</mark></sup> This object describes the native popup.</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>. The text to be displayed in the popup title, 0-64 characters.</td>
</tr>
<tr>
<td>message</td>
<td>String</td>
<td>The message to be displayed in the body of the popup, 1-256 characters.</td>
</tr>
<tr>
<td>buttons</td>
<td>Array of <a href="#popupbutton">PopupButton</a></td>
<td><em>Optional</em>. List of buttons to be displayed in the popup, 1-3 buttons. Set to <em>[{“type”:“close”}]</em> by default.</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="popupbutton" href="#popupbutton"><i class="anchor-icon"></i></a>PopupButton</h4>
<p><sup><mark>NEW</mark></sup> This object describes the native popup button.</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><em>Optional</em>. Identifier of the button, 0-64 characters. Set to empty string by default.<br>If the button is pressed, its <em>id</em> is returned in the callback and the <em>popupClosed</em> event.</td>
</tr>
<tr>
<td>type</td>
<td>String</td>
<td><em>Optional</em>. Type of the button. Set to <em>default</em> by default.<br>Can be one of these values:<br>- <em>default</em>, a button with the default style,<br>- <em>ok</em>, a button with the localized text “OK”,<br>- <em>close</em>, a button with the localized text “Close”,<br>- <em>cancel</em>, a button with the localized text “Cancel”,<br>- <em>destructive</em>, a button with a style that indicates a destructive action (e.g. “Remove”, “Delete”, etc.).</td>
</tr>
<tr>
<td>text</td>
<td>String</td>
<td><em>Optional</em>. The text to be displayed on the button, 0-64 characters. Required if <em>type</em> is <em>default</em> or <em>destructive</em>. Irrelevant for other types.</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" name="backbutton" href="#backbutton"><i class="anchor-icon"></i></a>BackButton</h4> <h4><a class="anchor" name="backbutton" href="#backbutton"><i class="anchor-icon"></i></a>BackButton</h4>
<p><sup><mark>NEW</mark></sup> This object controls the <strong>back</strong> button, which can be displayed in the header of the Web App in the Telegram interface.</p> <p>This object controls the <strong>back</strong> button, which can be displayed in the header of the Web App in the Telegram interface.</p>
<table class="table"> <table class="table">
<thead> <thead>
<tr> <tr>
@ -439,7 +532,7 @@
<td>A method that sets the button press event handler. An alias for <code>Telegram.WebApp.onEvent(&#39;mainButtonClicked&#39;, callback)</code></td> <td>A method that sets the button press event handler. An alias for <code>Telegram.WebApp.onEvent(&#39;mainButtonClicked&#39;, callback)</code></td>
</tr> </tr>
<tr> <tr>
<td>offClick(callback) <sup><mark>NEW</mark></sup></td> <td>offClick(callback)</td>
<td>Function</td> <td>Function</td>
<td>A method that removes the button press event handler. An alias for <code>Telegram.WebApp.offEvent(&#39;mainButtonClicked&#39;, callback)</code></td> <td>A method that removes the button press event handler. An alias for <code>Telegram.WebApp.offEvent(&#39;mainButtonClicked&#39;, callback)</code></td>
</tr> </tr>
@ -482,7 +575,7 @@
</table> </table>
<p>All these methods return the MainButton object so they can be chained.</p> <p>All these methods return the MainButton object so they can be chained.</p>
<h4><a class="anchor" name="hapticfeedback" href="#hapticfeedback"><i class="anchor-icon"></i></a>HapticFeedback</h4> <h4><a class="anchor" name="hapticfeedback" href="#hapticfeedback"><i class="anchor-icon"></i></a>HapticFeedback</h4>
<p><sup><mark>NEW</mark></sup> This object controls haptic feedback.</p> <p>This object controls haptic feedback.</p>
<table class="table"> <table class="table">
<thead> <thead>
<tr> <tr>
@ -537,7 +630,7 @@
<td><em>Optional.</em> An object containing data about the chat partner of the current user in the chat where the bot was launched via the attachment menu. Returned only for private chats and only for Web Apps launched via the attachment menu.</td> <td><em>Optional.</em> An object containing data about the chat partner of the current user in the chat where the bot was launched via the attachment menu. Returned only for private chats and only for Web Apps launched via the attachment menu.</td>
</tr> </tr>
<tr> <tr>
<td>chat <sup><mark>NEW</mark></sup></td> <td>chat</td>
<td><a href="#webappchat">WebAppChat</a></td> <td><a href="#webappchat">WebAppChat</a></td>
<td><em>Optional.</em> An object containing data about the chat where the bot was launched via the attachment menu. Returned for supergroups, channels and group chats only for Web Apps launched via the attachment menu.</td> <td><em>Optional.</em> An object containing data about the chat where the bot was launched via the attachment menu. Returned for supergroups, channels and group chats only for Web Apps launched via the attachment menu.</td>
</tr> </tr>
@ -547,7 +640,7 @@
<td><em>Optional.</em> The value of the <em>startattach</em> parameter, passed <a href="#adding-bots-to-the-attachment-menu">via link</a>. Only returned for Web Apps when launched from the attachment menu via link.<br><br>The value of the <code>start_param</code> parameter will also be passed in the GET-parameter <code>tgWebAppStartParam</code>, so the Web App can load the correct interface right away.</td> <td><em>Optional.</em> The value of the <em>startattach</em> parameter, passed <a href="#adding-bots-to-the-attachment-menu">via link</a>. Only returned for Web Apps when launched from the attachment menu via link.<br><br>The value of the <code>start_param</code> parameter will also be passed in the GET-parameter <code>tgWebAppStartParam</code>, so the Web App can load the correct interface right away.</td>
</tr> </tr>
<tr> <tr>
<td>can_send_after <sup><mark>NEW</mark></sup></td> <td>can_send_after</td>
<td>Integer</td> <td>Integer</td>
<td><em>Optional.</em> Time in seconds, after which a message can be sent via the <a href="/bots/api#answerwebappquery">answerWebAppQuery</a> method.</td> <td><em>Optional.</em> Time in seconds, after which a message can be sent via the <a href="/bots/api#answerwebappquery">answerWebAppQuery</a> method.</td>
</tr> </tr>
@ -605,6 +698,11 @@
<td><em>Optional</em>. <a href="https://en.wikipedia.org/wiki/IETF_language_tag">IETF language tag</a> of the user&#39;s language. Returns in <em>user</em> field only.</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. Returns in <em>user</em> field only.</td>
</tr> </tr>
<tr> <tr>
<td>is_premium <sup><mark>NEW</mark></sup></td>
<td>True</td>
<td><em>Optional</em>. <em>True</em>, if this user is a Telegram Premium user</td>
</tr>
<tr>
<td>photo_url</td> <td>photo_url</td>
<td>String</td> <td>String</td>
<td><em>Optional</em>. URL of the users profile photo. The photo can be in .jpeg or .svg formats. Only returned for Web Apps launched from the attachment menu.</td> <td><em>Optional</em>. URL of the users profile photo. The photo can be in .jpeg or .svg formats. Only returned for Web Apps launched from the attachment menu.</td>
@ -612,7 +710,7 @@
</tbody> </tbody>
</table> </table>
<h4><a class="anchor" name="webappchat" href="#webappchat"><i class="anchor-icon"></i></a>WebAppChat</h4> <h4><a class="anchor" name="webappchat" href="#webappchat"><i class="anchor-icon"></i></a>WebAppChat</h4>
<p><sup><mark>NEW</mark></sup> This object represents a chat.</p> <p>This object represents a chat.</p>
<table class="table"> <table class="table">
<thead> <thead>
<tr> <tr>
@ -684,17 +782,21 @@ if (hex(HMAC_SHA256(data_check_string, secret_key)) == hash) {
<td>Occurs when the <a href="#mainbutton">main button</a> is pressed.<br><em>eventHandler</em> receives no parameters.</td> <td>Occurs when the <a href="#mainbutton">main button</a> is pressed.<br><em>eventHandler</em> receives no parameters.</td>
</tr> </tr>
<tr> <tr>
<td><code>backButtonClicked</code> <sup><mark>NEW</mark></sup></td> <td><code>backButtonClicked</code></td>
<td><mark>Bot API 6.1+</mark> Occurrs when the <a href="#backbutton">back button</a> is pressed.<br><em>eventHandler</em> receives no parameters.</td> <td><mark>Bot API 6.1+</mark> Occurrs when the <a href="#backbutton">back button</a> is pressed.<br><em>eventHandler</em> receives no parameters.</td>
</tr> </tr>
<tr> <tr>
<td><code>settingsButtonClicked</code> <sup><mark>NEW</mark></sup></td> <td><code>settingsButtonClicked</code></td>
<td><mark>Bot API 6.1+</mark> Occurrs when the Settings item in context menu is pressed.<br><em>eventHandler</em> receives no parameters.</td> <td><mark>Bot API 6.1+</mark> Occurrs when the Settings item in context menu is pressed.<br><em>eventHandler</em> receives no parameters.</td>
</tr> </tr>
<tr> <tr>
<td><code>invoiceClosed</code> <sup><mark>NEW</mark></sup></td> <td><code>invoiceClosed</code></td>
<td><mark>Bot API 6.1+</mark> Occurrs when the opened invoice is closed.<br><em>eventHandler</em> receives an object with the two fields: <em>url</em> invoice link provided and <em>status</em> one of the invoice statuses:<br>- <strong>paid</strong> invoice was paid successfully,<br>- <strong>cancelled</strong> user closed this invoice without paying,<br>- <strong>failed</strong> user tried to pay, but the payment was failed,<br>- <strong>pending</strong> the payment is still processing. The bot will receive a service message about a <a href="https://core.telegram.org/bots/api#successfulpayment">successful payment</a> when the payment is successfully paid.</td> <td><mark>Bot API 6.1+</mark> Occurrs when the opened invoice is closed.<br><em>eventHandler</em> receives an object with the two fields: <em>url</em> invoice link provided and <em>status</em> one of the invoice statuses:<br>- <strong>paid</strong> invoice was paid successfully,<br>- <strong>cancelled</strong> user closed this invoice without paying,<br>- <strong>failed</strong> user tried to pay, but the payment was failed,<br>- <strong>pending</strong> the payment is still processing. The bot will receive a service message about a <a href="https://core.telegram.org/bots/api#successfulpayment">successful payment</a> when the payment is successfully paid.</td>
</tr> </tr>
<tr>
<td><code>popupClosed</code> <sup><mark>NEW</mark></sup></td>
<td><mark>Bot API 6.2+</mark> Occurrs when the opened popup is closed.<br><em>eventHandler</em> receives an object with the single field <em>button_id</em> the value of the field <em>id</em> of the pressed button. If no buttons were pressed, the field <em>button_id</em> will be <em>null</em>.</td>
</tr>
</tbody> </tbody>
</table> </table>
<h4><a class="anchor" name="adding-bots-to-the-attachment-menu" href="#adding-bots-to-the-attachment-menu"><i class="anchor-icon"></i></a>Adding Bots to the Attachment Menu</h4> <h4><a class="anchor" name="adding-bots-to-the-attachment-menu" href="#adding-bots-to-the-attachment-menu"><i class="anchor-icon"></i></a>Adding Bots to the Attachment Menu</h4>

View file

@ -134,7 +134,7 @@
<p>For more info about using the <a href="https://t.me/Stickers">@Stickers</a> bot, click <a href="#using-the-stickers-bot">here</a>.</p> <p>For more info about using the <a href="https://t.me/Stickers">@Stickers</a> bot, click <a href="#using-the-stickers-bot">here</a>.</p>
</blockquote> </blockquote>
<h3><a class="anchor" name="custom-emoji" href="#custom-emoji"><i class="anchor-icon"></i></a>Custom Emoji</h3> <h3><a class="anchor" name="custom-emoji" href="#custom-emoji"><i class="anchor-icon"></i></a>Custom Emoji</h3>
<p>As of version 8.9 released in July 2022, Telegram apps support <a href="https://telegram.org/blog/custom-emoji">custom emoji</a>.<br>Emoji use the same technology as stickers, making it very easy to convert your art to <strong>both formats</strong>. Check out the <a href="#video-requirements">video</a> and <a href="#image-requirements">image</a> sections for details on the different size requirements.<br>To upload them, use the <code>/newemojipack</code> command in <a href="https://t.me/stickers">@Stickers</a>. </p> <p>As of version 8.9 released in August 2022, Telegram apps support <a href="https://telegram.org/blog/custom-emoji">custom emoji</a>.<br>Emoji use the same technology as stickers, making it very easy to convert your art to <strong>both formats</strong>. Check out the <a href="#video-requirements">video</a> and <a href="#image-requirements">image</a> sections for details on the different size requirements.<br>To upload them, use the <code>/newemojipack</code> command in <a href="https://t.me/stickers">@Stickers</a>. </p>
<blockquote> <blockquote>
<p>Everyone can create new custom emoji, however, adding and using custom sets is currently an exclusive <a href="https://t.me/premium">feature</a> of <a href="https://telegram.org/blog/700-million-and-premium">Telegram Premium</a> users.</p> <p>Everyone can create new custom emoji, however, adding and using custom sets is currently an exclusive <a href="https://t.me/premium">feature</a> of <a href="https://telegram.org/blog/700-million-and-premium">Telegram Premium</a> users.</p>
</blockquote> </blockquote>

View file

@ -134,7 +134,7 @@
<p>For more info about using the <a href="https://t.me/Stickers">@Stickers</a> bot, click <a href="#using-the-stickers-bot">here</a>.</p> <p>For more info about using the <a href="https://t.me/Stickers">@Stickers</a> bot, click <a href="#using-the-stickers-bot">here</a>.</p>
</blockquote> </blockquote>
<h3><a class="anchor" name="custom-emoji" href="#custom-emoji"><i class="anchor-icon"></i></a>Custom Emoji</h3> <h3><a class="anchor" name="custom-emoji" href="#custom-emoji"><i class="anchor-icon"></i></a>Custom Emoji</h3>
<p>As of version 8.9 released in July 2022, Telegram apps support <a href="https://telegram.org/blog/custom-emoji">custom emoji</a>.<br>Emoji use the same technology as stickers, making it very easy to convert your art to <strong>both formats</strong>. Check out the <a href="#video-requirements">video</a> and <a href="#image-requirements">image</a> sections for details on the different size requirements.<br>To upload them, use the <code>/newemojipack</code> command in <a href="https://t.me/stickers">@Stickers</a>. </p> <p>As of version 8.9 released in August 2022, Telegram apps support <a href="https://telegram.org/blog/custom-emoji">custom emoji</a>.<br>Emoji use the same technology as stickers, making it very easy to convert your art to <strong>both formats</strong>. Check out the <a href="#video-requirements">video</a> and <a href="#image-requirements">image</a> sections for details on the different size requirements.<br>To upload them, use the <code>/newemojipack</code> command in <a href="https://t.me/stickers">@Stickers</a>. </p>
<blockquote> <blockquote>
<p>Everyone can create new custom emoji, however, adding and using custom sets is currently an exclusive <a href="https://t.me/premium">feature</a> of <a href="https://telegram.org/blog/700-million-and-premium">Telegram Premium</a> users.</p> <p>Everyone can create new custom emoji, however, adding and using custom sets is currently an exclusive <a href="https://t.me/premium">feature</a> of <a href="https://telegram.org/blog/700-million-and-premium">Telegram Premium</a> users.</p>
</blockquote> </blockquote>

View file

@ -2,12 +2,13 @@
<html class=""> <html class="">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Telegram Messenger</title> <title>Telegram Premium FAQ</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="og:title" content="Telegram a new era of messaging"> <meta property="og:title" content="Telegram Premium FAQ">
<meta property="og:image" content="https://telegram.org/img/t_logo.png"> <meta property="og:image" content="">
<meta property="og:site_name" content="Telegram"> <meta property="og:site_name" content="Telegram">
<meta property="og:description" content="Fast. Secure. Powerful."> <meta property="og:description" content="This FAQ covers the main questions about Telegram Premium.
Check out our Premium Terms of Service for more information…">
<meta property="fb:app_id" content="254098051407226"> <meta property="fb:app_id" content="254098051407226">
<meta property="vk:app_id" content="3782569"> <meta property="vk:app_id" content="3782569">
@ -41,170 +42,153 @@
</div> </div>
</div> </div>
</div> </div>
<div class="container clearfix tl_page_container tl_main_page_container"> <div class="container clearfix tl_page_container ">
<div class="tl_page"> <div class="tl_page">
<div class="tl_main_wrap"> <div id="dev_page_content_wrap" class=" dev_faq_page">
<div class="tl_main_head"> <div class="dev_page_bread_crumbs"></div>
<div class="tl_main_side_blog"><div class="side_blog_wrap"> <h1 id="dev_page_title">Telegram Premium FAQ</h1>
<div class="side_blog">
<a href="/blog" class="side_blog_header">Recent News</a> <div id="dev_page_content"><blockquote>
<div class="side_blog_entries"> <p>This FAQ covers the main questions about Telegram Premium.<br>Check out our <a href="/tos#terms-of-service-for-telegram-premium">Premium Terms of Service</a> for more information, as well as our <a href="/faq">Basic FAQ</a> for general questions about Telegram.</p>
<a href="/blog/custom-emoji" class="side_blog_entry"> </blockquote>
<div class="side_blog_date">Aug 12</div> <h3><a class="anchor" name="telegram-premium" href="#telegram-premium"><i class="anchor-icon"></i></a><img class="icon" src="/file/464001305/110b0/-bpC5P3HJp4.6317/a2b79589744c739331" alt="Premium"> Telegram Premium</h3>
<div class="side_blog_title">Custom Animated Emoji, Gifting Telegram Premium, and More</div> <p><a href="#q-what-is-telegram-premium">General</a><br><a href="#features">Features</a><br><a href="#availability">Availability</a><br><a href="#payments">Payments</a><br><a href="#cancellation">Cancellation</a><br><a href="#privacy-and-data">Privacy and Data</a></p>
</a><a href="/blog/700-million-and-premium" class="side_blog_entry"> <h4><a class="anchor" name="q-what-is-telegram-premium" href="#q-what-is-telegram-premium"><i class="anchor-icon"></i></a>Q: What is Telegram Premium?</h4>
<div class="side_blog_date">Jun 21</div> <p>Telegram Premium is an optional subscription service that unlocks <strong>additional exclusive features</strong>, while helping support the development of the app. It is a part of Telegrams <strong>sustainable monetization</strong> driven by our users, rather than advertisers or shareholders. This way, Telegram can remain independent and prioritize its users first.</p>
<div class="side_blog_title">700 Million Users and Telegram Premium</div> <blockquote>
</a><a href="/blog/notifications-bots" class="side_blog_entry"> <p><a href="https://telegram.org/blog/700-million-and-premium">Read the Telegram Premium announcement on the Telegram Blog</a></p>
<div class="side_blog_date">Apr 16</div> </blockquote>
<div class="side_blog_title">Notification Sounds, Bot Revolution and More</div> <h4><a class="anchor" name="q-what-features-are-included" href="#q-what-features-are-included"><i class="anchor-icon"></i></a>Q: What features are included?</h4>
</a> <p>At the moment, all Premium users receive:</p>
</div> <ul>
</div> <li><a href="https://t.me/premium/3">Doubled Limits</a></li>
</div></div> <li><a href="https://t.me/premium/5">4 GB File Uploads</a></li>
<div class="tl_main_logo_wrap"> <li><a href="https://t.me/premium/7">Faster Download Speed</a></li>
<a href="/" class="tl_main_logo"> <li><a href="https://t.me/premium/8">Voice-to-Text Conversion</a></li>
<div class="tl_main_logo"></div> <li><a href="https://t.me/premium/16">Premium Stickers</a></li>
<svg alt="Telegram" class="tl_main_logo_title_image" height="72" viewBox="0 0 288 72" width="288" xmlns="http://www.w3.org/2000/svg"><path d="m57.015 16.258c5.18 0 9.181 1.652 12.006 4.957 2.824 3.305 4.236 7.98 4.236 14.027v3.446h-24.855c.257 3.14 1.306 5.625 3.146 7.453s4.154 2.742 6.943 2.742c3.914 0 7.102-1.582 9.563-4.746l4.605 4.394c-1.523 2.274-3.556 4.037-6.099 5.291s-5.397 1.881-8.561 1.881c-5.414 0-9.803-1.705-13.166-5.115s-5.045-7.951-5.045-13.623v-1.055c0-3.797.733-7.189 2.198-10.178 1.464-2.988 3.521-5.314 6.169-6.978 2.649-1.664 5.602-2.496 8.86-2.496zm-15.827-12.445v7.171h-15.961v44.016h-8.825v-44.016h-15.82v-7.171zm15.792 19.3c-2.344 0-4.237.821-5.678 2.461-1.441 1.641-2.361 3.926-2.76 6.856h16.278v-.633c-.188-2.859-.95-5.022-2.286-6.486-1.336-1.465-3.187-2.198-5.554-2.198zm30.292 31.887h-8.543v-54h8.543zm24.051.703c-5.414 0-9.803-1.705-13.166-5.115-3.364-3.41-5.045-7.951-5.045-13.623v-1.055c0-3.797.732-7.189 2.197-10.178 1.465-2.988 3.521-5.314 6.17-6.978 2.648-1.664 5.601-2.496 8.859-2.496 5.18 0 9.182 1.652 12.006 4.957s4.236 7.98 4.236 14.027v3.446h-24.855c.258 3.14 1.307 5.625 3.146 7.453 1.84 1.828 4.155 2.742 6.944 2.742 3.914 0 7.101-1.582 9.562-4.746l4.606 4.394c-1.524 2.274-3.557 4.037-6.1 5.291s-5.396 1.881-8.56 1.881zm-1.02-32.59c-2.344 0-4.236.821-5.678 2.461-1.441 1.641-2.361 3.926-2.759 6.856h16.277v-.633c-.188-2.859-.949-5.022-2.285-6.486-1.336-1.465-3.188-2.198-5.555-2.198zm20.41 12.586c0-5.906 1.389-10.623 4.166-14.15 2.778-3.528 6.463-5.291 11.057-5.291 4.336 0 7.746 1.512 10.23 4.535l.387-3.832h7.699v36.879c0 4.992-1.552 8.93-4.658 11.812-3.105 2.883-7.295 4.325-12.568 4.325-2.789 0-5.514-.581-8.174-1.741s-4.682-2.677-6.065-4.552l4.043-5.133c2.625 3.117 5.86 4.676 9.704 4.676 2.836 0 5.074-.768 6.714-2.303 1.641-1.535 2.461-3.791 2.461-6.768v-2.566c-2.461 2.742-5.742 4.113-9.843 4.113-4.454 0-8.092-1.769-10.916-5.308-2.825-3.54-4.237-8.438-4.237-14.696zm8.508.739c0 3.82.779 6.826 2.338 9.017s3.721 3.287 6.486 3.287c3.446 0 6-1.476 7.664-4.429v-16.735c-1.617-2.883-4.148-4.324-7.593-4.324-2.813 0-4.998 1.113-6.557 3.34-1.559 2.226-2.338 5.508-2.338 9.844zm52.719-11.672c-1.125-.188-2.285-.282-3.481-.282-3.914 0-6.55 1.5-7.91 4.5v26.016h-8.543v-38.039h8.156l.211 4.254c2.063-3.305 4.922-4.957 8.579-4.957 1.218 0 2.226.164 3.023.492zm26.07 30.234c-.375-.727-.703-1.91-.984-3.551-2.719 2.836-6.047 4.254-9.985 4.254-3.82 0-6.937-1.09-9.351-3.269-2.414-2.18-3.621-4.875-3.621-8.086 0-4.055 1.506-7.166 4.517-9.334 3.012-2.168 7.319-3.252 12.92-3.252h5.239v-2.496c0-1.969-.551-3.545-1.653-4.729-1.101-1.183-2.777-1.775-5.027-1.775-1.945 0-3.539.486-4.781 1.459-1.243.972-1.864 2.209-1.864 3.709h-8.543c0-2.086.692-4.037 2.075-5.854 1.382-1.816 3.263-3.24 5.642-4.271 2.379-1.032 5.033-1.547 7.963-1.547 4.453 0 8.004 1.119 10.652 3.357 2.649 2.239 4.008 5.385 4.078 9.44v17.156c0 3.422.481 6.152 1.442 8.191v.598zm-9.387-6.152c1.688 0 3.276-.41 4.764-1.231 1.488-.82 2.608-1.922 3.358-3.304v-7.172h-4.606c-3.164 0-5.543.55-7.137 1.652-1.593 1.102-2.39 2.66-2.39 4.676 0 1.64.545 2.947 1.634 3.92 1.09.972 2.549 1.459 4.377 1.459zm32.645-31.887.246 3.973c2.672-3.118 6.328-4.676 10.969-4.676 5.086 0 8.566 1.945 10.441 5.836 2.766-3.891 6.656-5.836 11.672-5.836 4.195 0 7.318 1.16 9.369 3.48 2.051 2.321 3.1 5.742 3.147 10.266v24.996h-8.543v-24.75c0-2.414-.528-4.184-1.582-5.309-1.055-1.125-2.801-1.687-5.239-1.687-1.945 0-3.533.521-4.763 1.564-1.231 1.043-2.092 2.409-2.584 4.096l.035 26.086h-8.543v-25.031c-.117-4.477-2.402-6.715-6.856-6.715-3.421 0-5.847 1.394-7.277 4.184v27.562h-8.543v-38.039z" fill="#4d4d4d"/></svg> <li><a href="https://t.me/premium/10">Unique Reactions</a></li>
</a> <li><a href="https://t.me/premium/11">Advanced Chat Management</a></li>
<p class="tl_main_logo_lead">a new era of messaging</p> <li><a href="https://t.me/premium/12">Animated Profile Pictures</a></li>
</div> <li><a href="https://t.me/premium/13">Profile Badges</a></li>
</div> <li><a href="https://t.me/premium/14">Premium App Icons</a></li>
<li><a href="https://t.me/premium/15">No Ads</a></li>
<div class="tl_main_download_mobile clearfix"> <li><a href="https://t.me/premium/132">Custom Emoji</a></li>
<a href="/android" class="tl_main_download_link tl_main_download_link_android" data-track="AppDownload/Android" onclick="trackDlClick(this, event)" onmouseover="mainDemoVideoHover(this, 1)" onmouseout="mainDemoVideoHover(this, 0)"> <li><a href="https://t.me/premium/133">Voice Message Privacy Settings</a></li>
<i class="icon icon-android "></i>Telegram for <b>Android</b> </ul>
<div class="tl_main_download_image__android"></div> <blockquote>
<video class="tl_main_video_player tl_main_video_player__android video__init_retina" muted="" vindex="1" preload="none" data-sources="/img/t_main_Android_demo.mp4,/img/t_main_Android_demo_2x.mp4"></video> <p>The <a href="https://t.me/premium/2"><strong>@Premium</strong></a> channel contains detailed descriptions of each feature, as well as a list of all Premium stickers.</p>
</a><a href="/dl/ios" class="tl_main_download_link tl_main_download_link_ios" target="_blank" data-track="AppDownload/iOS" onclick="trackDlClick(this, event)" onmouseover="mainDemoVideoHover(this, 1)" onmouseout="mainDemoVideoHover(this, 0)"> </blockquote>
<i class="icon icon-ios "></i>Telegram for <b>iPhone</b> / <b>iPad</b> <h4><a class="anchor" name="q-how-can-i-subscribe" href="#q-how-can-i-subscribe"><i class="anchor-icon"></i></a>Q: How can I subscribe?</h4>
<div class="tl_main_download_image__ios"></div> <p>Users can subscribe via the App Store, Google Play (Telegram Settings &gt; Telegram Premium) or <a href="https://t.me/premiumbot">@PremiumBot</a>. Subscribing via the bot gives users a <strong>discounted price</strong>, because the payments are not subject to fees from Apple or Google.</p>
<video class="tl_main_video_player tl_main_video_player__ios video__init_retina" muted="" vindex="1" preload="none" data-sources="/img/t_main_iOS_demo.mp4,/img/t_main_iOS_demo_2x.mp4"></video> <blockquote>
</a> <p><a href="https://t.me/premiumbot">@PremiumBot</a> is currently accessible from the direct versions of Telegram&#39;s <a href="https://telegram.org/android">Android</a>, <a href="desktop.telegram.org">Desktop</a> and <a href="macos.telegram.org">macOS</a> apps. </p>
<a href="//desktop.telegram.org/" class="tl_main_download_link tl_main_download_link_tdesktop" data-track="AppDownload/TDesktop" onclick="trackDlClick(this, event)"> </blockquote>
Telegram for <b>Windows / Mac / Linux</b> <h4><a class="anchor" name="q-is-telegram-still-free" href="#q-is-telegram-still-free"><i class="anchor-icon"></i></a>Q: Is Telegram still free?</h4>
</a> <p>Yes! All features that existed before <strong>Telegram Premium</strong> was introduced <strong>remain free to use</strong> including unlimited cloud storage, large groups and channels, voice and video calls, support for multiple devices and accounts, tens of thousands of stickers and <a href="https://t.me/TelegramTips">countless other features</a>. Moreover, future Telegram updates will continue to add new features for all users.</p>
<h4><a class="anchor" name="q-do-i-need-premium-to-interact-with-other-premium-users" href="#q-do-i-need-premium-to-interact-with-other-premium-users"><i class="anchor-icon"></i></a>Q: Do I need Premium to interact with other Premium users?</h4>
<a class="tl_main_download_more_btn" href="/apps">Browse more Telegram apps<i class="icon icon-arrow-more"></i></a> <p>There are no restrictions for non-Premium users. On the contrary, many premium features also <strong>benefit free users</strong>. For example, anyone can download 4 GB files uploaded by premium users, watch the animations of premium stickers, or tap to increase the count of exclusive reactions already added by premium users.</p>
<h3><a class="anchor" name="features" href="#features"><i class="anchor-icon"></i></a>Features</h3>
<blockquote>
<p>The full list of premium features is available on the <a href="https://t.me/premium/2"><strong>@Premium</strong></a> channel.</p>
</blockquote>
<h4><a class="anchor" name="q-will-users-receive-new-free-features-in-the-future" href="#q-will-users-receive-new-free-features-in-the-future"><i class="anchor-icon"></i></a>Q: Will users receive new free features in the future?</h4>
<p>Yes, users who do not subscribe will still continue to receive many new features. Telegram Premium allows us to offer all the resource-heavy features users have asked for over the years, while preserving free access to the most powerful messenger on the planet.</p>
<h4><a class="anchor" name="q-why-are-some-premium-features-not-available-in-some-apps" href="#q-why-are-some-premium-features-not-available-in-some-apps"><i class="anchor-icon"></i></a>Q: Why are some premium features not available in some apps?</h4>
<p>If you subscribe to Telegram Premium, your account gains access to all available premium features. Some clients may not immediately support one or several of these features to take full advantage of your subscription, consider using one of our <a href="https://telegram.org/apps">official apps</a>, such as Telegram for Android, iOS, Desktop and MacOS. </p>
<h4><a class="anchor" name="q-is-it-guaranteed-that-my-download-speed-will-increase-after-su" href="#q-is-it-guaranteed-that-my-download-speed-will-increase-after-su"><i class="anchor-icon"></i></a>Q: Is it guaranteed that my download speed will increase after subscribing?</h4>
<p>Subscribing lifts any media download speed limits from your account on Telegrams side. If your download speed does not increase, you may be facing other limits caused by your hardware, internet provider, etc.</p>
<blockquote>
<p>See our <a href="/tos#terms-of-service-for-telegram-premium">Terms of Service</a> for a more detailed explanation.</p>
</blockquote>
<h4><a class="anchor" name="q-can-i-turn-off-my-premium-badge" href="#q-can-i-turn-off-my-premium-badge"><i class="anchor-icon"></i></a>Q: Can I turn off my premium badge?</h4>
<p>The badge is currently visible next to the names of all Telegram Premium subscribers.</p>
<h4><a class="anchor" name="q-why-can-my-non-premium-friends-add-premium-reactions" href="#q-why-can-my-non-premium-friends-add-premium-reactions"><i class="anchor-icon"></i></a>Q: Why can my non-premium friends add premium reactions?</h4>
<p>Some premium features can be accessed by users who did not subscribe, provided that a subscriber uses them first. For example, if you subscribe and add a premium reaction to a message, your friends can add reactions of the same type to that message. This also applies to files: <strong>any user</strong> can download large 2+ GB files uploaded by premium users.</p>
<h4><a class="anchor" name="q-why-do-i-still-see-advertisements-in-channels" href="#q-why-do-i-still-see-advertisements-in-channels"><i class="anchor-icon"></i></a>Q: Why do I still see advertisements in channels?</h4>
<p>Official <a href="promote.telegram.org">Sponsored Messages</a> are minimalist, non-targeted advertisements that Telegram may show in some large, public one-to-many channels that have a high number of subscribers. These advertisements will be hidden for users that subscribe to Telegram Premium.</p>
<p>Channel admins may independently post promotional content via messages or media in their communities this is outside Telegrams control, and would still appear for Premium users.</p>
<blockquote>
<p>See our <a href="/tos#terms-of-service-for-telegram-premium">Terms of Service</a> for a detailed explanation.</p>
</blockquote>
<h3><a class="anchor" name="availability" href="#availability"><i class="anchor-icon"></i></a>Availability</h3>
<h4><a class="anchor" name="q-can-i-sign-up-from-any-app" href="#q-can-i-sign-up-from-any-app"><i class="anchor-icon"></i></a>Q: Can I sign up from any app?</h4>
<p>Yes, you can subscribe to Telegram Premium <strong>from any app</strong> or platform you prefer even if you dont use that particular device very often. Premium features sync across your entire account, and are available on all your devices.</p>
<blockquote>
<p>Subscribing via <a href="https://t.me/premiumbot">@PremiumBot</a> in <a href="#q-how-can-i-subscribe">Direct Apps</a> is cheaper than signing up via Google Play or the App Store.</p>
</blockquote>
<h4><a class="anchor" name="q-i-have-multiple-telegram-accounts-can-i-subscribe-with-all-of" href="#q-i-have-multiple-telegram-accounts-can-i-subscribe-with-all-of"><i class="anchor-icon"></i></a>Q: I have multiple Telegram accounts, can I subscribe with all of them under a single Google account/Apple ID?</h4>
<p>No. A single Google account/Apple ID only supports one ongoing subscription at any given time. For more accounts, you can use <a href="https://t.me/premiumbot">@PremiumBot</a> on a <a href="#q-can-i-sign-up-from-any-app">supported app</a> to buy additional subscriptions. </p>
<h4><a class="anchor" name="q-why-is-telegram-premium-not-available-in-my-country" href="#q-why-is-telegram-premium-not-available-in-my-country"><i class="anchor-icon"></i></a>Q: Why is Telegram Premium not available in my country?</h4>
<p>Its possible that local laws and regulations prevent people from accessing Telegram Premium in your country. Its also possible that your country isnt supported by the payment processors Telegram relies on. In either case, we continue to do our best to keep all Telegram services available for everyone.</p>
<h4><a class="anchor" name="q-why-is-premiumbot-not-working-for-me" href="#q-why-is-premiumbot-not-working-for-me"><i class="anchor-icon"></i></a>Q: Why is @PremiumBot not working for me?</h4>
<p>This is due to two possible reasons either Telegram Premium is <a href="#q-why-is-telegram-premium-not-available-in-my-country">not available</a> in your country, or your app was downloaded from the App Store or Google Play, and therefore does not support <a href="https://t.me/premiumbot">@PremiumBot</a>. </p>
<h4><a class="anchor" name="q-why-can-i-not-subscribe-from-the-app-i-am-using" href="#q-why-can-i-not-subscribe-from-the-app-i-am-using"><i class="anchor-icon"></i></a>Q: Why can I not subscribe from the app I am using?</h4>
<p>Telegram Premium features are currently supported by Telegram for <a href="https://telegram.org/android">Android</a>, <a href="https://telegram.org/dl/ios">iOS</a> and <a href="https://macos.telegram.org">macOS</a>, as well as <a href="https://desktop.telegram.org">Telegram Desktop</a> and <a href="https://web.telegram.org">Telegram Web</a>. Other clients, such as Telegram X or third-party apps may not support some Premium features at the moment.</p>
<h4><a class="anchor" name="q-will-the-subscription-apply-to-all-my-accounts" href="#q-will-the-subscription-apply-to-all-my-accounts"><i class="anchor-icon"></i></a>Q: Will the subscription apply to all my accounts?</h4>
<p>If you use several accounts, Premium applies only to your accounts that have a subscription however, those accounts will be able to use Premium features on <strong>any connected devices</strong>.</p>
<h4><a class="anchor" name="q-can-i-transfer-my-subscription-to-another-account" href="#q-can-i-transfer-my-subscription-to-another-account"><i class="anchor-icon"></i></a>Q: Can I transfer my subscription to another account?</h4>
<p>This is currently not possible, however, you can <strong>freely change the number</strong> associated with your account without losing your subscription.</p>
<h4><a class="anchor" name="q-can-i-buy-a-premium-subscription-for-my-groups-and-channels" href="#q-can-i-buy-a-premium-subscription-for-my-groups-and-channels"><i class="anchor-icon"></i></a>Q: Can I buy a premium subscription for my groups and channels?</h4>
<p>Premium features are currently tied to individual users, and can be utilized in any chat benefiting not only the Premium user, but also their <a href="#q-do-i-need-premium-to-interact-with-other-premium-users">contacts and subscribers</a>. That said, future developments for Telegram Premium could include community-focused options.</p>
<h4><a class="anchor" name="q-can-i-buy-a-premium-subscription-for-my-bots" href="#q-can-i-buy-a-premium-subscription-for-my-bots"><i class="anchor-icon"></i></a>Q: Can I buy a premium subscription for my bots?</h4>
<p>Premium bots are currently not supported. Telegram evolves quickly, be sure to follow <a href="telegram.org/blog">our blog</a> to find out if this feature becomes available in the future.</p>
<h3><a class="anchor" name="payments" href="#payments"><i class="anchor-icon"></i></a>Payments</h3>
<h4><a class="anchor" name="q-can-i-pay-in-my-local-currency" href="#q-can-i-pay-in-my-local-currency"><i class="anchor-icon"></i></a>Q: Can I pay in my local currency?</h4>
<p>When subscribing via <a href="t.me/PremiumBot">@PremiumBot</a>, the currency and price of your <strong>first month</strong> of Premium is based on the <strong>phone number</strong> of your Telegram account. After this initial payment, all <strong>future payments</strong> are calculated for the default currency of your <strong>payment method</strong>.</p>
<p>In order to qualify for localized pricing, your payment method must be issued by a financial institution in that country and have a local billing address.</p>
<p>If you subscribe via the <a href="#can-i-sign-up-from-any-app">Play Store</a> or <a href="#can-i-sign-up-from-any-app">App Store</a>, your currency will be based off your account with Google or Apple.</p>
<h4><a class="anchor" name="q-why-is-the-subscription-price-different-in-my-app-country" href="#q-why-is-the-subscription-price-different-in-my-app-country"><i class="anchor-icon"></i></a>Q: Why is the subscription price different in my app/country?</h4>
<p>We do our best to keep the cost of Telegram Premium as consistent as possible this may include slight variations to reflect local living standards and keep Telegram Premium <strong>obtainable for everyone</strong>. When you subscribe, the price you see may include store or third-party fees, local taxes and any other applicable fees that are outside of Telegrams control.</p>
<h4><a class="anchor" name="q-why-is-my-preferred-payment-method-not-available" href="#q-why-is-my-preferred-payment-method-not-available"><i class="anchor-icon"></i></a>Q: Why is my preferred payment method not available?</h4>
<p>Telegram works with payment providers and app stores to provide a wide range of supported payment methods. If your payment method is not available, you should consider trying all available <a href="#q-how-can-i-subscribe">subscription options</a>: the premium subscription will apply to all supported apps regardless of which one was used to subscribe.</p>
<h4><a class="anchor" name="q-can-i-gift-a-premium-subscription-to-my-friends-or-share-it-wi" href="#q-can-i-gift-a-premium-subscription-to-my-friends-or-share-it-wi"><i class="anchor-icon"></i></a>Q: Can I gift a premium subscription to my friends or share it with my family?</h4>
<p>Yes if you open a users profile, youll see a &#39;<strong>Gift Premium</strong>&#39; button under <img class="icon" src="/file/464001448/2/VHd-rEO8AMI.2898/1d9c403b5d0d54dbb0" alt="Menu iOS"> or <img class="icon" src="/file/464001466/3/TUYKwGzdaIM.984/c472ac8f01ebdd57c8" alt="Menu Android"> to send them a prepaid subscription for 3, 6 or 12 months.</p>
<h3><a class="anchor" name="cancellation" href="#cancellation"><i class="anchor-icon"></i></a>Cancellation</h3>
<h4><a class="anchor" name="q-how-can-i-cancel-my-subscription" href="#q-how-can-i-cancel-my-subscription"><i class="anchor-icon"></i></a>Q: How can I cancel my subscription?</h4>
<p>You can cancel your premium subscription via the same provider you used to purchase it.</p>
<ul>
<li><a href="https://t.me/premiumbot"><strong>@PremiumBot</strong></a> - Open the bot on Telegram and send the <code>/stop</code> command.</li>
<li><strong>Google Play</strong> - You can manage your subscription by tapping on your avatar in the top right and navigating to <em>Payments &amp; subscription &gt; Subscriptions</em>.</li>
<li><strong>iOS</strong> - Go to your <em>iOS Settings &gt; Apple ID Settings &gt; Subscriptions</em>.</li>
</ul>
<p>Telegram Premium purchases are handled by third-parties (e.g. <a href="https://t.me/premiumbot">@PremiumBot</a>, Google Play, Apple App Store).</p>
<h4><a class="anchor" name="q-what-happens-if-i-cancel-my-subscription" href="#q-what-happens-if-i-cancel-my-subscription"><i class="anchor-icon"></i></a>Q: What happens if I cancel my subscription?</h4>
<p>When you cancel your subscription, all future payments for Telegram Premium are also canceled. You will still have access to all your Premium features until the end of the current billing period, after which they will expire.</p>
<p>Once your subscription expires, your features will be revoked as follows:</p>
<ul>
<li><strong>Extra Usernames</strong> - You will retain any usernames you have already created but will not be able to create new public usernames unless you own less than 10.</li>
<li><strong>Extra Channels, extra chats in folders</strong> - Your channels and folders will stay as they are, but you will not be able to join more channels or add more chats to those folders.</li>
<li><strong>Extra Folders</strong> - The first 10 folders will remain functional. Any additional folders will be locked.</li>
<li><strong>Extra GIFs</strong> - Any GIFs past 200 will be hidden.</li>
<li><strong>Longer Bio</strong> - Your bio will not be changed, but you cant save any edits unless it is ≤ 70 characters.</li>
<li><strong>Extra Pinned Chats</strong> - Your first 5 pinned chats will remain, but any additional ones will be unpinned.</li>
<li><strong>Download Speed</strong> - Your files will download at standard speed.</li>
<li><strong>Premium Badge</strong> - Your premium badge will disappear.</li>
</ul>
<p>All free functionality will remain <strong>exactly as it was</strong> before subscribing.</p>
<h4><a class="anchor" name="q-what-happens-if-i-change-my-number" href="#q-what-happens-if-i-change-my-number"><i class="anchor-icon"></i></a>Q: What happens if I change my number?</h4>
<p>You can freely change the phone number associated with your account without losing your subscription the subscription is linked to your Telegram account, not to your phone number.</p>
<h4><a class="anchor" name="q-what-happens-if-i-uninstall-my-telegram-app" href="#q-what-happens-if-i-uninstall-my-telegram-app"><i class="anchor-icon"></i></a>Q: What happens if I uninstall my Telegram app?</h4>
<p>Uninstalling Telegram does not cancel your subscription it will remain available on any device at any time. Note that uninstalling the app or not opening it for some time does not pause your subscription, and you will be billed on its original renewal date.</p>
<h4><a class="anchor" name="q-what-happens-if-i-delete-my-account" href="#q-what-happens-if-i-delete-my-account"><i class="anchor-icon"></i></a>Q: What happens if I delete my account?</h4>
<p>If you subscribe via <a href="https://t.me/premiumbot">@PremiumBot</a>, deleting your account will terminate your recurring payments, as the Bot will not be able to charge an account that no longer exists. It will not be possible to refund any unused portion of your billing period.</p>
<p>If you subscribe to Premium via the App Store or Google Play, you will need to cancel your subscription through your Apple or Google <a href="#q-how-can-i-cancel-my-subscription">account settings</a> as these platforms may continue to charge you, even if you deleted your Telegram account or application.</p>
<h4><a class="anchor" name="q-does-premium-mean-i-can-never-get-banned-what-happens-if-i-do" href="#q-does-premium-mean-i-can-never-get-banned-what-happens-if-i-do"><i class="anchor-icon"></i></a>Q: Does Premium mean I can never get banned? What happens if I do?</h4>
<p>Telegram Premium does not come with any special treatment if you dont play nice, Telegram may limit some of the functionalities available to you, including your access to the Telegram platform. Therefore, if you violate our Terms of Service and receive a ban, you might lose the benefits of Telegram Premium and we will not compensate you for this loss.</p>
<h3><a class="anchor" name="privacy-and-data" href="#privacy-and-data"><i class="anchor-icon"></i></a>Privacy and Data</h3>
<blockquote>
<p>Check out our full <a href="/privacy">privacy policy</a> for more details.</p>
</blockquote>
<h4><a class="anchor" name="q-will-telegram-store-my-credit-card-information" href="#q-will-telegram-store-my-credit-card-information"><i class="anchor-icon"></i></a>Q: Will Telegram store my credit card information?</h4>
<p>No, Telegram does not store your credit card information. You purchase a premium subscription via a third-party (e.g. Google Play, Apple App Store, or a payment provider via bots like <a href="https://t.me/premiumbot">@PremiumBot</a>), so you additionally agree to their terms of service and you should check their individual privacy policies.</p>
<h4><a class="anchor" name="q-what-happens-to-my-data" href="#q-what-happens-to-my-data"><i class="anchor-icon"></i></a>Q: What happens to my data?</h4>
<p>Telegram only requires a <a href="https://telegram.org/privacy#3-1-basic-account-data">phone number</a> to sign up and access all of its functionality. Subscribing to Telegram Premium additionally requires that a user provide a payment method, which is directly transferred to a <a href="https://telegram.org/privacy#7-third-party-payment-services">third-party payment processor</a>. Any personal details from your payment method never reach Telegrams servers, and are securely processed solely by the payment provider. </p>
<h4><a class="anchor" name="q-if-i-subscribe-will-the-payment-processor-be-able-to-monitor-w" href="#q-if-i-subscribe-will-the-payment-processor-be-able-to-monitor-w"><i class="anchor-icon"></i></a>Q: If I subscribe, will the payment processor be able to monitor what I do on Telegram or how often I use premium features?</h4>
<p>No, payment processors <strong>cannot</strong> access your Telegram activity in any way. </p>
<h4><a class="anchor" name="q-will-other-users-know-that-i-bought-telegram-premium" href="#q-will-other-users-know-that-i-bought-telegram-premium"><i class="anchor-icon"></i></a>Q: Will other users know that I bought Telegram Premium?</h4>
<p>Other users will see that you are subscribed by your Telegram Premium badge.<br>They will not be able to see how you subscribed or how much you spent.</p>
</div> </div>
<div class="tl_main_download_desktop_section">
<h3 class="tl_main_download_desktop_header"></h3>
<div class="tl_main_download_desktop_wrap1">
<div class="tl_main_download_desktop_wrap">
<div class="tl_main_download_desktop clearfix">
<div class="tl_main_download_desktop_links clearfix">
<a href="//desktop.telegram.org/" class="tl_main_download_desktop_link tl_main_download_link_td" data-track="DesktopDownload/TDesktop" onclick="trackDlClick(this, event)">
Telegram&nbsp;for <b>PC / Linux</b>
</a><a href="//macos.telegram.org/" class="tl_main_download_desktop_link tl_main_download_link_osx" data-track="DesktopDownload/OSX" onclick="trackDlClick(this, event)">
Telegram&nbsp;for <b>macOS</b>
</a>
</div>
</div>
</div>
</div>
</div>
<div class="tl_main_recent_news_wrap tl_blog_list_page_wrap">
<h3 class="tl_main_recent_news_header">
<a href="/blog">Recent News</a>
</h3>
<div class="tl_main_recent_news_cards clearfix">
<a class="dev_blog_card_link_wrap" href="/blog/custom-emoji"><div class="dev_blog_card_wrap">
<img class="dev_blog_card_image" src="https://telegram.org/file/464001738/111e0/RVvmuGtCK0A.285280/6148669b1197e199ff" />
<div class="dev_blog_card_alltext_wrap">
<h4 class="dev_blog_card_title">Telegram Emoji Platform, Custom Animated Emoji Packs, Gifting Telegram Premium, and More</h4>
<div class="dev_blog_card_lead">Today&#39;s update introduces the Telegram Emoji Platform, animated emoji in messages and captions…</div>
</div>
<div class="dev_blog_card_date">Aug 12, 2022</div>
</div></a><a class="dev_blog_card_link_wrap" href="/blog/700-million-and-premium"><div class="dev_blog_card_wrap">
<img class="dev_blog_card_image" src="https://telegram.org/file/464001006/1044e/ZDyna5YyQwE.51909/a7532c511d9bab9ea9" />
<div class="dev_blog_card_alltext_wrap">
<h4 class="dev_blog_card_title">700 Million Users and Telegram Premium</h4>
<div class="dev_blog_card_lead">Telegram now has over 700 million monthly active users. Today we&#39;re launching Telegram Premium a subscription that lets you support Telegram&#39;s continued development and gives access…</div>
</div>
<div class="dev_blog_card_date">Jun 21, 2022</div>
</div></a>
</div>
</div>
<div class="tl_main_body tl_main_cards_animated_wrap">
<a name="what-can-you-do-with-Telegram"></a>
<h3 class="tl_main_body_header">Why Telegram?</h3>
<div class="tl_main_cards">
<div class="tl_main_card_cell">
<div class="tl_main_card_wrap">
<picture class="dev_page_tgsticker tl_main_card_animated js-tgsticker_image"><div></div><source type="application/x-tgsticker" srcset="/file/464001484/1/bzi7gr7XRGU.10147/815df2ef527132dd23"><img src="/file/464001897/3/f0Go0rLpEwk.11343.png/dd4eeb46cc5efc0688" /></picture>
<h3 class="tl_main_card_header">Simple</h3>
<div class="tl_main_card_lead"><b>Telegram</b> is so simple you already know how to use it.</div>
</div>
</div>
<div class="tl_main_card_cell">
<div class="tl_main_card_wrap">
<picture class="dev_page_tgsticker tl_main_card_animated js-tgsticker_image"><div></div><source type="application/x-tgsticker" srcset="/file/464001418/1/fabnJFzygPY.17422/bc9dec9fd8bd26e00e"><img src="/file/464001737/4/Fn57W9l3xI0.15286.png/d4b936ecc2c939f4fa" /></picture>
<h3 class="tl_main_card_header">Private</h3>
<div class="tl_main_card_lead"><b>Telegram</b> messages are heavily encrypted and can self-destruct.</div>
</div>
</div>
<div class="tl_main_card_cell">
<div class="tl_main_card_wrap">
<picture class="dev_page_tgsticker tl_main_card_animated js-tgsticker_image"><div></div><source type="application/x-tgsticker" srcset="/file/464001560/1/zLlKYgeDLoA.14496/62085b07461f2d87e4"><img src="/file/464001560/2/n7EACfx4FPY.16465.png/7318c11715aa2ec45b" /></picture>
<h3 class="tl_main_card_header">Synced</h3>
<div class="tl_main_card_lead"><b>Telegram</b> lets you access your chats from multiple devices.</div>
</div>
</div>
<div class="tl_main_card_cell">
<div class="tl_main_card_wrap">
<picture class="dev_page_tgsticker tl_main_card_animated js-tgsticker_image"><div></div><source type="application/x-tgsticker" srcset="/file/464001493/2/hV6uPcaHk_E.17388/dcccb066a7b4fe44ee"><img src="/file/464001132/3/-1qvqKPZsQQ.17975.png/7d57d7159cf4fbe9b2" /></picture>
<h3 class="tl_main_card_header">Fast</h3>
<div class="tl_main_card_lead"><b>Telegram</b> delivers messages faster than any other application.</div>
</div>
</div>
<div class="tl_main_card_cell">
<div class="tl_main_card_wrap">
<picture class="dev_page_tgsticker tl_main_card_animated js-tgsticker_image"><div></div><source type="application/x-tgsticker" srcset="/file/464001803/1/cnqy4KrA5bE.12755/b97780ca9da88b4f84"><img src="/file/464001871/3/Uyg3R7LmX1I.17628.png/911807f65dfb4f8f20" /></picture>
<h3 class="tl_main_card_header">Powerful</h3>
<div class="tl_main_card_lead"><b>Telegram</b> has no limits on the size of your media and chats.</div>
</div>
</div>
<div class="tl_main_card_cell">
<div class="tl_main_card_wrap">
<picture class="dev_page_tgsticker tl_main_card_animated js-tgsticker_image"><div></div><source type="application/x-tgsticker" srcset="/file/464001880/2/VGTLBN3QuYM.10959/8940838e7dddc787d8"><img src="/file/464001880/3/xOpm7ohoHQ0.12690.png/feb1e161b1d3608613" /></picture>
<h3 class="tl_main_card_header">Open</h3>
<div class="tl_main_card_lead"><b>Telegram</b> has an open <a href="https://core.telegram.org/api">API</a> and source code free for everyone.</div>
</div>
</div>
<div class="tl_main_card_cell">
<div class="tl_main_card_wrap">
<picture class="dev_page_tgsticker tl_main_card_animated js-tgsticker_image"><div></div><source type="application/x-tgsticker" srcset="/file/464001453/2/eW_MzRhUGoM.10926/fe1f3bc3dd08367c0a"><img src="/file/464001453/3/mNzXWC3RX0c.15740.png/9ce5fa5f3fb74460b4" /></picture>
<h3 class="tl_main_card_header">Secure</h3>
<div class="tl_main_card_lead"><b>Telegram</b> keeps your messages safe from hacker attacks.</div>
</div>
</div>
<div class="tl_main_card_cell">
<div class="tl_main_card_wrap">
<picture class="dev_page_tgsticker tl_main_card_animated js-tgsticker_image"><div></div><source type="application/x-tgsticker" srcset="/file/464001812/2/kLAK2TPyvUU.12545/f68c1caf735a2ea3db"><img src="/file/464001402/5/eOMSj3GzJXo.13579.png/f3cec6c451d023c109" /></picture>
<h3 class="tl_main_card_header">Social</h3>
<div class="tl_main_card_lead"><b>Telegram</b> groups can hold up to 200,000 members.</div>
</div>
</div>
<div class="tl_main_card_cell">
<div class="tl_main_card_wrap">
<picture class="dev_page_tgsticker tl_main_card_animated js-tgsticker_image"><div></div><source type="application/x-tgsticker" srcset="/file/464001166/1/01aTJ2ISKeU.21801/24028c7b6d07639794"><img src="/file/464001166/2/FzTl8_M5mQA.19325.png/b6c5dbc0e4f6553805" /></picture>
<h3 class="tl_main_card_header">Expressive</h3>
<div class="tl_main_card_lead"><b>Telegram</b> lets you completely customize your messenger.</div>
</div>
</div>
</div>
<div class="tl_main_noshare clearfix"></div>
</div> </div>
</div> </div>
@ -270,12 +254,8 @@
</div> </div>
</div> </div>
<script src="/js/main.js?46"></script> <script src="/js/main.js?46"></script>
<script src="/js/tgsticker.js?29"></script>
<script>backToTopInit("Go up");
<script>mainInitRetinaVideos();
mainInitLogo("\/img\/t_logo_sprite.svg");
mainInitTgStickers({"maxDeviceRatio":2,"cachingModulo":3,"unsupportedURL":"\/?notgs=1"});
backToTopInit("Go up");
removePreloadInit(); removePreloadInit();
</script> </script>
</body> </body>