Update content of files

This commit is contained in:
GitHub Action 2024-08-19 09:15:45 +00:00
parent 0f229615c0
commit ca447f9af6
55 changed files with 133 additions and 131 deletions

View file

@ -231,7 +231,7 @@ This allows the server to filter messages based on a text query, and even on the
<p>Users can turn their Telegram account into a <strong>business account</strong>, gaining access to business features such as opening hours, location, quick replies, automated messages, custom start page, chatbot support, and more.</p>
<p>For the moment, all Telegram Business features are available for free to <a href="/api/premium">Telegram Premium</a> subscribers. </p>
<h4><a class="anchor" href="#telegram-stars" id="telegram-stars" name="telegram-stars"><i class="anchor-icon"></i></a><a href="/api/stars">Telegram Stars</a></h4>
<p>Telegram Stars are an in-app currency that allows the user to pay for digital goods and services offered by <a href="https://telegram.org/blog/telegram-stars">Telegram bots</a> or <a href="https://telegram.org/blog/mini-app-bar-paid-media-and-more#pay-for-content-with-telegram-stars">Telegram channels</a>. </p>
<p>Telegram Stars are virtual items that allow users to purchase digital goods and services from bots and mini apps inside the Telegram ecosystem, send gifts to content creators on the Telegram platform, and more. </p>
<h4><a class="anchor" href="#paid-media" id="paid-media" name="paid-media"><i class="anchor-icon"></i></a><a href="/api/paid-media">Paid media</a></h4>
<p>Content creators can accept <a href="/api/stars">Stars</a> by publishing <strong>paid photos or videos</strong> on their channels. Subscribers will be allowed to view such posts only after paying the author to unlock them. </p>
<h4><a class="anchor" href="#channel-and-supergroup-boosts" id="channel-and-supergroup-boosts" name="channel-and-supergroup-boosts"><i class="anchor-icon"></i></a><a href="/api/boost">Channel and supergroup boosts</a></h4>

View file

@ -231,7 +231,7 @@ This allows the server to filter messages based on a text query, and even on the
<p>Users can turn their Telegram account into a <strong>business account</strong>, gaining access to business features such as opening hours, location, quick replies, automated messages, custom start page, chatbot support, and more.</p>
<p>For the moment, all Telegram Business features are available for free to <a href="/api/premium">Telegram Premium</a> subscribers. </p>
<h4><a class="anchor" href="#telegram-stars" id="telegram-stars" name="telegram-stars"><i class="anchor-icon"></i></a><a href="/api/stars">Telegram Stars</a></h4>
<p>Telegram Stars are an in-app currency that allows the user to pay for digital goods and services offered by <a href="https://telegram.org/blog/telegram-stars">Telegram bots</a> or <a href="https://telegram.org/blog/mini-app-bar-paid-media-and-more#pay-for-content-with-telegram-stars">Telegram channels</a>. </p>
<p>Telegram Stars are virtual items that allow users to purchase digital goods and services from bots and mini apps inside the Telegram ecosystem, send gifts to content creators on the Telegram platform, and more. </p>
<h4><a class="anchor" href="#paid-media" id="paid-media" name="paid-media"><i class="anchor-icon"></i></a><a href="/api/paid-media">Paid media</a></h4>
<p>Content creators can accept <a href="/api/stars">Stars</a> by publishing <strong>paid photos or videos</strong> on their channels. Subscribers will be allowed to view such posts only after paying the author to unlock them. </p>
<h4><a class="anchor" href="#channel-and-supergroup-boosts" id="channel-and-supergroup-boosts" name="channel-and-supergroup-boosts"><i class="anchor-icon"></i></a><a href="/api/boost">Channel and supergroup boosts</a></h4>

View file

@ -4,10 +4,10 @@
<meta charset="utf-8">
<title>Account deletion</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content=" How to reset an account if the 2FA password was forgotten.">
<meta property="description" content="How to reset an account if the 2FA password was forgotten.">
<meta property="og:title" content="Account deletion">
<meta property="og:image" content="c176ebb99487f059b0">
<meta property="og:description" content=" How to reset an account if the 2FA password was forgotten.">
<meta property="og:description" content="How to reset an account if the 2FA password was forgotten.">
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
@ -50,10 +50,10 @@
<a href='/method/account.sendConfirmPhoneCode'>account.sendConfirmPhoneCode</a>#1b3faa88 hash:<a href='/type/string'>string</a> settings:<a href='/type/CodeSettings'>CodeSettings</a> = <a href='/type/auth.SentCode'>auth.SentCode</a>;</code></pre>
<p>If the account doesn't have a <a href="/api/srp">2FA password</a>, calling this method will <strong>immediately delete the Telegram account</strong>.<br>
If the account has a <a href="/api/srp">2FA password</a> and it is provided to <code>account.deleteAccount:password</code>, calling this method will <strong>immediately delete the Telegram account</strong>. </p>
<p>If the account has a <a href="/api/srp">2FA password</a> but the user doesn't remember it, <a href="/api/srp#password-reset">password reset may be requested first »</a>, or otherwise, the <code>password</code> field may simply be left empty. </p>
<p>If the account has a <a href="/api/srp">2FA password</a> but the user doesn't remember it, <a href="/api/srp#password-reset">password reset may be requested first »</a>, or otherwise, the <code>password</code> field may simply be left empty. </p>
<p>In this case, if the account's <a href="/api/srp">2FA password</a> was modified more than 7 days ago and was active in the last 7 days, <strong>account deletion will be delayed for 7 days</strong>.
Otherwise, the account will be <strong>immediately deleted</strong>.<br>
In the first case, a <a href="/constructor/updateServiceNotification">service message will be sent to the user</a>, containing a <a href="/api/links#phone-confirmation-links">phone number confirmation link »</a>.</p>
In the first case, a <a href="/constructor/updateServiceNotification">service message will be sent to the user</a>, containing a <a href="/api/links#phone-confirmation-links">phone number confirmation link »</a>.</p>
<p>When such a link is clicked, <a href="/method/account.sendConfirmPhoneCode">account.sendConfirmPhoneCode</a> must be called with the specified <code>hash</code>, using the account with the specified <code>phone</code> number.<br>
This will send a phone number verification code to the phone number associated with the account.<br>
The phone code settings are the same as for the <a href="/api/auth">login code</a>, and <a href="/method/auth.cancelCode">auth.cancelCode</a> with <a href="/method/auth.resendCode">auth.resendCode</a> can be used as well, to resend or cancel the phone code as for the <a href="/api/auth">login code</a>.</p>
@ -66,7 +66,7 @@ Otherwise, if the number isn't confirmed in 7 days, the <strong>account will be
<h3><a class="anchor" href="#two-factor-authentication" id="two-factor-authentication" name="two-factor-authentication"><i class="anchor-icon"></i></a><a href="/api/srp">Two-factor authentication</a></h3>
<p>How to login to a user's account if they have enabled 2FA, how to change password. </p>
<h3><a class="anchor" href="#deep-links" id="deep-links" name="deep-links"><i class="anchor-icon"></i></a><a href="/api/links">Deep links</a></h3>
<p>Telegram clients must handle special <code>tg://</code> and <code>t.me</code> deep links encountered in messages, link entities and in other apps by registering OS handlers. </p></div>
<p>Telegram clients must handle special <code>tg://</code> and <code>t.me</code> deep links encountered in messages, link entities and in other apps by registering OS handlers.</p></div>
</div>

View file

@ -46,7 +46,7 @@
<p><a href="/api/premium">Telegram Premium</a> users can grant their favorite channels and supergroups additional features like the ability to post <a href="/api/stories">stories</a> by giving them <strong>boosts</strong>. </p>
<p>Channels and supergroups level up as they gain more boosts and for each level, they gain additional features. </p>
<p>Additionally, channel admins may gain even more boosts by starting <a href="/api/giveaways">giveaways »</a>. </p>
<p>Additionally, channel admins may gain even more boosts by starting <a href="/api/giveaways">giveaways »</a>. </p>
<p>The maximum possible boost level for a channel is specified in the <a href="/api/config#boosts-channel-level-max">boosts_channel_level_max</a> config key.</p>
<p>Schema:</p>
<pre><code><a href='/constructor/myBoost'>myBoost</a>#c448415c flags:<a href='/type/%23'>#</a> slot:<a href='/type/int'>int</a> peer:flags.0?<a href='/type/Peer'>Peer</a> date:<a href='/type/int'>int</a> expires:<a href='/type/int'>int</a> cooldown_until_date:flags.1?<a href='/type/int'>int</a> = <a href='/type/MyBoost'>MyBoost</a>;
@ -99,30 +99,30 @@ A <code>BOOST_NOT_MODIFIED</code> RPC error will be returned when calling any of
---functions---
<a href='/method/stories.getChatsToSend'>stories.getChatsToSend</a>#a56a8b60 = <a href='/type/messages.Chats'>messages.Chats</a>;</code></pre>
<p>Everything works exactly the same as when <a href="/api/stories#posting-stories">posting stories as a user</a>, with the only difference that clients should pass the appropriate <a href="/constructor/inputPeerChannel">inputPeerChannel</a> instead of <a href="/constructor/inputPeerSelf">inputPeerSelf</a> to <a href="/method/stories.canSendStory">stories.canSendStory</a>, <a href="/method/stories.sendStory">stories.sendStory</a> and all the other story methods, see the <a href="/api/stories#posting-stories">main documentation »</a> for more info. </p>
<p>Use <a href="/method/stories.getChatsToSend">stories.getChatsToSend</a> to obtain a list of channels or supergroups where the user can post stories; <a href="/method/stories.canSendStory">stories.canSendStory</a> must still be used before uploading a story to make sure no other limit was reached, as described in the <a href="/api/stories#posting-stories">main documentation »</a>.</p>
<p>Everything works exactly the same as when <a href="/api/stories#posting-stories">posting stories as a user</a>, with the only difference that clients should pass the appropriate <a href="/constructor/inputPeerChannel">inputPeerChannel</a> instead of <a href="/constructor/inputPeerSelf">inputPeerSelf</a> to <a href="/method/stories.canSendStory">stories.canSendStory</a>, <a href="/method/stories.sendStory">stories.sendStory</a> and all the other story methods, see the <a href="/api/stories#posting-stories">main documentation »</a> for more info. </p>
<p>Use <a href="/method/stories.getChatsToSend">stories.getChatsToSend</a> to obtain a list of channels or supergroups where the user can post stories; <a href="/method/stories.canSendStory">stories.canSendStory</a> must still be used before uploading a story to make sure no other limit was reached, as described in the <a href="/api/stories#posting-stories">main documentation »</a>.</p>
<h4><a class="anchor" href="#boost-indicator-for-supergroup-messages" id="boost-indicator-for-supergroup-messages" name="boost-indicator-for-supergroup-messages"><i class="anchor-icon"></i></a>Boost indicator for supergroup messages</h4>
<p>In incoming supergroup messages from non-anonymous group members only, <a href="/constructor/message">message</a>.<code>from_boosts_applied</code> contains the number of boosts that the message's author has assigned to the supergroup.<br>
This counter should be shown in the UI, in the header of the message.<br>
Note that <a href="/constructor/message">message</a>.<code>from_boosts_applied</code> should be locally overridden for non-anonymous <em>outgoing</em> supergroup messages, according to the current value of <a href="/constructor/channelFull">channelFull</a>.<code>boosts_applied</code>, to ensure the value is correct even for messages sent by the current user before a supergroup was boosted (or after a boost has expired or the number of boosts has changed); do not update this value for incoming messages from other users, even if their boosts have changed.</p>
<h4><a class="anchor" href="#changing-message-accent-color" id="changing-message-accent-color" name="changing-message-accent-color"><i class="anchor-icon"></i></a>Changing message accent color</h4>
<p>After reaching at least the boost level specified in the <code>channel_min_level</code> field of the <a href="/constructor/help.peerColorOption">help.peerColorOption</a> constructor for the chosen palette, (only) channels gain the ability to change their <a href="/api/colors">message accent palette »</a>. </p>
<p>After reaching at least the boost level specified in the <code>channel_min_level</code> field of the <a href="/constructor/help.peerColorOption">help.peerColorOption</a> constructor for the chosen palette, (only) channels gain the ability to change their <a href="/api/colors">message accent palette »</a>. </p>
<h4><a class="anchor" href="#changing-message-accent-emoji" id="changing-message-accent-emoji" name="changing-message-accent-emoji"><i class="anchor-icon"></i></a>Changing message accent emoji</h4>
<p>After reaching at least the boost level specified in the <a href="/api/config#channel-bg-icon-level-min"><code>channel_bg_icon_level_min</code> config parameter</a>, (only) channels gain the ability to change the emoji used in the <a href="/api/colors">message accent palette »</a>. </p>
<p>After reaching at least the boost level specified in the <a href="/api/config#channel-bg-icon-level-min"><code>channel_bg_icon_level_min</code> config parameter</a>, (only) channels gain the ability to change the emoji used in the <a href="/api/colors">message accent palette »</a>. </p>
<h4><a class="anchor" href="#changing-profile-accent-color-emoji" id="changing-profile-accent-color-emoji" name="changing-profile-accent-color-emoji"><i class="anchor-icon"></i></a>Changing profile accent color/emoji</h4>
<p>After reaching at least the boost level specified in the <a href="/api/config#channel-profile-bg-icon-level-min"><code>channel_profile_bg_icon_level_min</code> »</a>/<a href="/api/config#group-profile-bg-icon-level-min"><code>group_profile_bg_icon_level_min</code> »</a> config parameters and the boost level specified in the <code>channel_min_level</code>/<code>group_min_level</code> field of the <a href="/constructor/help.peerColorOption">help.peerColorOption</a> constructor for the chosen palette, channels/supergroups gain the ability to change the emoji and color used in the <a href="/api/colors">profile accent palette »</a>. </p>
<p>After reaching at least the boost level specified in the <a href="/api/config#channel-profile-bg-icon-level-min"><code>channel_profile_bg_icon_level_min</code> »</a>/<a href="/api/config#group-profile-bg-icon-level-min"><code>group_profile_bg_icon_level_min</code> »</a> config parameters and the boost level specified in the <code>channel_min_level</code>/<code>group_min_level</code> field of the <a href="/constructor/help.peerColorOption">help.peerColorOption</a> constructor for the chosen palette, channels/supergroups gain the ability to change the emoji and color used in the <a href="/api/colors">profile accent palette »</a>. </p>
<h4><a class="anchor" href="#setting-wallpapers" id="setting-wallpapers" name="setting-wallpapers"><i class="anchor-icon"></i></a>Setting wallpapers</h4>
<p>After reaching at least the boost level specified in the <a href="/api/config#channel-wallpaper-level-min"><code>channel_wallpaper_level_min</code> »</a>/<a href="/api/config#group-wallpaper-level-min"><code>group_wallpaper_level_min</code> »</a> config parameters, channels/supergroups gain the ability to set a <a href="/api/wallpapers#channel-and-supergroup-wallpapers">fill channel/supergroup wallpaper, see here » for more info</a>.<br>
After reaching at least the boost level specified in the <a href="/api/config#channel-custom-wallpaper-level-min"><code>channel_custom_wallpaper_level_min</code> »</a>/<a href="/api/config#group-custom-wallpaper-level-min"><code>group_custom_wallpaper_level_min</code> »</a> config parameters, channels/supergroups gain the ability to set any custom <a href="/api/wallpapers">wallpaper</a>, not just <a href="/api/wallpapers">fill channel/supergroup wallpapers, see here » for more info</a>. </p>
<p>After reaching at least the boost level specified in the <a href="/api/config#channel-wallpaper-level-min"><code>channel_wallpaper_level_min</code> »</a>/<a href="/api/config#group-wallpaper-level-min"><code>group_wallpaper_level_min</code> »</a> config parameters, channels/supergroups gain the ability to set a <a href="/api/wallpapers#channel-and-supergroup-wallpapers">fill channel/supergroup wallpaper, see here » for more info</a>.<br>
After reaching at least the boost level specified in the <a href="/api/config#channel-custom-wallpaper-level-min"><code>channel_custom_wallpaper_level_min</code> »</a>/<a href="/api/config#group-custom-wallpaper-level-min"><code>group_custom_wallpaper_level_min</code> »</a> config parameters, channels/supergroups gain the ability to set any custom <a href="/api/wallpapers">wallpaper</a>, not just <a href="/api/wallpapers">fill channel/supergroup wallpapers, see here » for more info</a>. </p>
<h4><a class="anchor" href="#setting-a-custom-emoji-status" id="setting-a-custom-emoji-status" name="setting-a-custom-emoji-status"><i class="anchor-icon"></i></a>Setting a custom emoji status</h4>
<p>After reaching at least the boost level specified in the <a href="/api/config#channel-emoji-status-level-min"><code>channel_emoji_status_level_min</code> »</a>/<a href="/api/config#group-emoji-status-level-min"><code>group_emoji_status_level_min</code> »</a> config parameters, channels/supergroups gain the ability to change their <a href="/api/emoji-status">status emoji »</a>. </p>
<p>After reaching at least the boost level specified in the <a href="/api/config#channel-emoji-status-level-min"><code>channel_emoji_status_level_min</code> »</a>/<a href="/api/config#group-emoji-status-level-min"><code>group_emoji_status_level_min</code> »</a> config parameters, channels/supergroups gain the ability to change their <a href="/api/emoji-status">status emoji »</a>. </p>
<h4><a class="anchor" href="#bypass-slowmode-and-chat-restrictions" id="bypass-slowmode-and-chat-restrictions" name="bypass-slowmode-and-chat-restrictions"><i class="anchor-icon"></i></a>Bypass slowmode and chat restrictions</h4>
<pre><code><a href='/constructor/channelFull'>channelFull</a>#bbab348d flags:<a href='/type/%23'>#</a> can_view_participants:flags.3?<a href='/constructor/true'>true</a> can_set_username:flags.6?<a href='/constructor/true'>true</a> can_set_stickers:flags.7?<a href='/constructor/true'>true</a> hidden_prehistory:flags.10?<a href='/constructor/true'>true</a> can_set_location:flags.16?<a href='/constructor/true'>true</a> has_scheduled:flags.19?<a href='/constructor/true'>true</a> can_view_stats:flags.20?<a href='/constructor/true'>true</a> blocked:flags.22?<a href='/constructor/true'>true</a> flags2:<a href='/type/%23'>#</a> can_delete_channel:flags2.0?<a href='/constructor/true'>true</a> antispam:flags2.1?<a href='/constructor/true'>true</a> participants_hidden:flags2.2?<a href='/constructor/true'>true</a> translations_disabled:flags2.3?<a href='/constructor/true'>true</a> stories_pinned_available:flags2.5?<a href='/constructor/true'>true</a> view_forum_as_messages:flags2.6?<a href='/constructor/true'>true</a> restricted_sponsored:flags2.11?<a href='/constructor/true'>true</a> can_view_revenue:flags2.12?<a href='/constructor/true'>true</a> paid_media_allowed:flags2.14?<a href='/constructor/true'>true</a> can_view_stars_revenue:flags2.15?<a href='/constructor/true'>true</a> id:<a href='/type/long'>long</a> about:<a href='/type/string'>string</a> participants_count:flags.0?<a href='/type/int'>int</a> admins_count:flags.1?<a href='/type/int'>int</a> kicked_count:flags.2?<a href='/type/int'>int</a> banned_count:flags.2?<a href='/type/int'>int</a> online_count:flags.13?<a href='/type/int'>int</a> read_inbox_max_id:<a href='/type/int'>int</a> read_outbox_max_id:<a href='/type/int'>int</a> unread_count:<a href='/type/int'>int</a> chat_photo:<a href='/type/Photo'>Photo</a> notify_settings:<a href='/type/PeerNotifySettings'>PeerNotifySettings</a> exported_invite:flags.23?<a href='/type/ExportedChatInvite'>ExportedChatInvite</a> bot_info:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/BotInfo'>BotInfo</a>&gt; migrated_from_chat_id:flags.4?<a href='/type/long'>long</a> migrated_from_max_id:flags.4?<a href='/type/int'>int</a> pinned_msg_id:flags.5?<a href='/type/int'>int</a> stickerset:flags.8?<a href='/type/StickerSet'>StickerSet</a> available_min_id:flags.9?<a href='/type/int'>int</a> folder_id:flags.11?<a href='/type/int'>int</a> linked_chat_id:flags.14?<a href='/type/long'>long</a> location:flags.15?<a href='/type/ChannelLocation'>ChannelLocation</a> slowmode_seconds:flags.17?<a href='/type/int'>int</a> slowmode_next_send_date:flags.18?<a href='/type/int'>int</a> stats_dc:flags.12?<a href='/type/int'>int</a> pts:<a href='/type/int'>int</a> call:flags.21?<a href='/type/InputGroupCall'>InputGroupCall</a> ttl_period:flags.24?<a href='/type/int'>int</a> pending_suggestions:flags.25?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/string'>string</a>&gt; groupcall_default_join_as:flags.26?<a href='/type/Peer'>Peer</a> theme_emoticon:flags.27?<a href='/type/string'>string</a> requests_pending:flags.28?<a href='/type/int'>int</a> recent_requesters:flags.28?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/long'>long</a>&gt; default_send_as:flags.29?<a href='/type/Peer'>Peer</a> available_reactions:flags.30?<a href='/type/ChatReactions'>ChatReactions</a> reactions_limit:flags2.13?<a href='/type/int'>int</a> stories:flags2.4?<a href='/type/PeerStories'>PeerStories</a> wallpaper:flags2.7?<a href='/type/WallPaper'>WallPaper</a> boosts_applied:flags2.8?<a href='/type/int'>int</a> boosts_unrestrict:flags2.9?<a href='/type/int'>int</a> emojiset:flags2.10?<a href='/type/StickerSet'>StickerSet</a> = <a href='/type/ChatFull'>ChatFull</a>;
---functions---
<a href='/method/channels.setBoostsToUnblockRestrictions'>channels.setBoostsToUnblockRestrictions</a>#ad399cee channel:<a href='/type/InputChannel'>InputChannel</a> boosts:<a href='/type/int'>int</a> = <a href='/type/Updates'>Updates</a>;</code></pre>
<p>Supergroup admins with <a href="/constructor/chatAdminRights">ban_users admin rights »</a> may allow users that apply a certain number of boosts to the group to bypass <a href="/method/channels.toggleSlowMode">slow mode »</a> and <a href="/api/rights#default-rights">other »</a> supergroup restrictions using <a href="/method/channels.setBoostsToUnblockRestrictions">channels.setBoostsToUnblockRestrictions</a>. </p>
<p>Supergroup admins with <a href="/constructor/chatAdminRights">ban_users admin rights »</a> may allow users that apply a certain number of boosts to the group to bypass <a href="/method/channels.toggleSlowMode">slow mode »</a> and <a href="/api/rights#default-rights">other »</a> supergroup restrictions using <a href="/method/channels.setBoostsToUnblockRestrictions">channels.setBoostsToUnblockRestrictions</a>. </p>
<p>The number of required boosts must be specified in the <code>boosts</code> parameter (1-8, 0 to disable), and will be returned in <a href="/constructor/channelFull">channelFull</a>.<code>boosts_unrestrict</code>. </p>
<h4><a class="anchor" href="#setting-a-custom-emoji-stickerset-for-supergroups" id="setting-a-custom-emoji-stickerset-for-supergroups" name="setting-a-custom-emoji-stickerset-for-supergroups"><i class="anchor-icon"></i></a>Setting a custom emoji stickerset for supergroups</h4>
<pre><code><a href='/constructor/channelFull'>channelFull</a>#bbab348d flags:<a href='/type/%23'>#</a> can_view_participants:flags.3?<a href='/constructor/true'>true</a> can_set_username:flags.6?<a href='/constructor/true'>true</a> can_set_stickers:flags.7?<a href='/constructor/true'>true</a> hidden_prehistory:flags.10?<a href='/constructor/true'>true</a> can_set_location:flags.16?<a href='/constructor/true'>true</a> has_scheduled:flags.19?<a href='/constructor/true'>true</a> can_view_stats:flags.20?<a href='/constructor/true'>true</a> blocked:flags.22?<a href='/constructor/true'>true</a> flags2:<a href='/type/%23'>#</a> can_delete_channel:flags2.0?<a href='/constructor/true'>true</a> antispam:flags2.1?<a href='/constructor/true'>true</a> participants_hidden:flags2.2?<a href='/constructor/true'>true</a> translations_disabled:flags2.3?<a href='/constructor/true'>true</a> stories_pinned_available:flags2.5?<a href='/constructor/true'>true</a> view_forum_as_messages:flags2.6?<a href='/constructor/true'>true</a> restricted_sponsored:flags2.11?<a href='/constructor/true'>true</a> can_view_revenue:flags2.12?<a href='/constructor/true'>true</a> paid_media_allowed:flags2.14?<a href='/constructor/true'>true</a> can_view_stars_revenue:flags2.15?<a href='/constructor/true'>true</a> id:<a href='/type/long'>long</a> about:<a href='/type/string'>string</a> participants_count:flags.0?<a href='/type/int'>int</a> admins_count:flags.1?<a href='/type/int'>int</a> kicked_count:flags.2?<a href='/type/int'>int</a> banned_count:flags.2?<a href='/type/int'>int</a> online_count:flags.13?<a href='/type/int'>int</a> read_inbox_max_id:<a href='/type/int'>int</a> read_outbox_max_id:<a href='/type/int'>int</a> unread_count:<a href='/type/int'>int</a> chat_photo:<a href='/type/Photo'>Photo</a> notify_settings:<a href='/type/PeerNotifySettings'>PeerNotifySettings</a> exported_invite:flags.23?<a href='/type/ExportedChatInvite'>ExportedChatInvite</a> bot_info:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/BotInfo'>BotInfo</a>&gt; migrated_from_chat_id:flags.4?<a href='/type/long'>long</a> migrated_from_max_id:flags.4?<a href='/type/int'>int</a> pinned_msg_id:flags.5?<a href='/type/int'>int</a> stickerset:flags.8?<a href='/type/StickerSet'>StickerSet</a> available_min_id:flags.9?<a href='/type/int'>int</a> folder_id:flags.11?<a href='/type/int'>int</a> linked_chat_id:flags.14?<a href='/type/long'>long</a> location:flags.15?<a href='/type/ChannelLocation'>ChannelLocation</a> slowmode_seconds:flags.17?<a href='/type/int'>int</a> slowmode_next_send_date:flags.18?<a href='/type/int'>int</a> stats_dc:flags.12?<a href='/type/int'>int</a> pts:<a href='/type/int'>int</a> call:flags.21?<a href='/type/InputGroupCall'>InputGroupCall</a> ttl_period:flags.24?<a href='/type/int'>int</a> pending_suggestions:flags.25?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/string'>string</a>&gt; groupcall_default_join_as:flags.26?<a href='/type/Peer'>Peer</a> theme_emoticon:flags.27?<a href='/type/string'>string</a> requests_pending:flags.28?<a href='/type/int'>int</a> recent_requesters:flags.28?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/long'>long</a>&gt; default_send_as:flags.29?<a href='/type/Peer'>Peer</a> available_reactions:flags.30?<a href='/type/ChatReactions'>ChatReactions</a> reactions_limit:flags2.13?<a href='/type/int'>int</a> stories:flags2.4?<a href='/type/PeerStories'>PeerStories</a> wallpaper:flags2.7?<a href='/type/WallPaper'>WallPaper</a> boosts_applied:flags2.8?<a href='/type/int'>int</a> boosts_unrestrict:flags2.9?<a href='/type/int'>int</a> emojiset:flags2.10?<a href='/type/StickerSet'>StickerSet</a> = <a href='/type/ChatFull'>ChatFull</a>;
@ -132,18 +132,18 @@ After reaching at least the boost level specified in the <a href="/api/config#ch
---functions---
<a href='/method/channels.setEmojiStickers'>channels.setEmojiStickers</a>#3cd930b7 channel:<a href='/type/InputChannel'>InputChannel</a> stickerset:<a href='/type/InputStickerSet'>InputStickerSet</a> = <a href='/type/Bool'>Bool</a>;</code></pre>
<p>After reaching at least the boost level specified in the <a href="/api/config#group-emoji-stickers-level-min"><code>group_emoji_stickers_level_min</code> »</a> config parameter, supergroups gain the ability to associate a <a href="/api/custom-emoji">custom emoji stickerset »</a>, which can be used by all users of the group (including non-<a href="/api/premium">Premium</a> users!), for messages sent within the group. </p>
<p>After reaching at least the boost level specified in the <a href="/api/config#group-emoji-stickers-level-min"><code>group_emoji_stickers_level_min</code> »</a> config parameter, supergroups gain the ability to associate a <a href="/api/custom-emoji">custom emoji stickerset »</a>, which can be used by all users of the group (including non-<a href="/api/premium">Premium</a> users!), for messages sent within the group. </p>
<p>This feature is the custom emoji stickerset counterpart of the supergroup stickerset feature, available through <a href="/method/channels.setStickers">channels.setStickers</a>. </p>
<p>Invoke <a href="/method/channels.setEmojiStickers">channels.setEmojiStickers</a> to choose the custom emoji stickerset to associate to the supergroup, which will be available to users in <a href="/constructor/channelFull">channelFull</a>.<code>emojiset</code>, and should be prioritized when choosing a custom emoji; a <a href="/constructor/channelAdminLogEventActionChangeEmojiStickerSet">channelAdminLogEventActionChangeEmojiStickerSet</a> will be emitted to the <a href="/api/recent-actions">admin log</a> after invoking that method. </p>
<h4><a class="anchor" href="#unlimited-voice-message-transcriptions-for-supergroups" id="unlimited-voice-message-transcriptions-for-supergroups" name="unlimited-voice-message-transcriptions-for-supergroups"><i class="anchor-icon"></i></a>Unlimited voice message transcriptions for supergroups</h4>
<p>After reaching at least the boost level specified in the <a href="/api/config#group-transcribe-level-min"><code>group_transcribe_level_min</code> »</a> config parameter, non-<a href="/api/premium">Premium</a> users in the supergroup gain the ability to <a href="/api/transcribe">transcribe any voice message</a>, without using up their free transcription quota.</p>
<p>After reaching at least the boost level specified in the <a href="/api/config#group-transcribe-level-min"><code>group_transcribe_level_min</code> »</a> config parameter, non-<a href="/api/premium">Premium</a> users in the supergroup gain the ability to <a href="/api/transcribe">transcribe any voice message</a>, without using up their free transcription quota.</p>
<h4><a class="anchor" href="#disable-ads-on-the-channel" id="disable-ads-on-the-channel" name="disable-ads-on-the-channel"><i class="anchor-icon"></i></a>Disable ads on the channel</h4>
<pre><code><a href='/constructor/channelFull'>channelFull</a>#bbab348d flags:<a href='/type/%23'>#</a> can_view_participants:flags.3?<a href='/constructor/true'>true</a> can_set_username:flags.6?<a href='/constructor/true'>true</a> can_set_stickers:flags.7?<a href='/constructor/true'>true</a> hidden_prehistory:flags.10?<a href='/constructor/true'>true</a> can_set_location:flags.16?<a href='/constructor/true'>true</a> has_scheduled:flags.19?<a href='/constructor/true'>true</a> can_view_stats:flags.20?<a href='/constructor/true'>true</a> blocked:flags.22?<a href='/constructor/true'>true</a> flags2:<a href='/type/%23'>#</a> can_delete_channel:flags2.0?<a href='/constructor/true'>true</a> antispam:flags2.1?<a href='/constructor/true'>true</a> participants_hidden:flags2.2?<a href='/constructor/true'>true</a> translations_disabled:flags2.3?<a href='/constructor/true'>true</a> stories_pinned_available:flags2.5?<a href='/constructor/true'>true</a> view_forum_as_messages:flags2.6?<a href='/constructor/true'>true</a> restricted_sponsored:flags2.11?<a href='/constructor/true'>true</a> can_view_revenue:flags2.12?<a href='/constructor/true'>true</a> paid_media_allowed:flags2.14?<a href='/constructor/true'>true</a> can_view_stars_revenue:flags2.15?<a href='/constructor/true'>true</a> id:<a href='/type/long'>long</a> about:<a href='/type/string'>string</a> participants_count:flags.0?<a href='/type/int'>int</a> admins_count:flags.1?<a href='/type/int'>int</a> kicked_count:flags.2?<a href='/type/int'>int</a> banned_count:flags.2?<a href='/type/int'>int</a> online_count:flags.13?<a href='/type/int'>int</a> read_inbox_max_id:<a href='/type/int'>int</a> read_outbox_max_id:<a href='/type/int'>int</a> unread_count:<a href='/type/int'>int</a> chat_photo:<a href='/type/Photo'>Photo</a> notify_settings:<a href='/type/PeerNotifySettings'>PeerNotifySettings</a> exported_invite:flags.23?<a href='/type/ExportedChatInvite'>ExportedChatInvite</a> bot_info:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/BotInfo'>BotInfo</a>&gt; migrated_from_chat_id:flags.4?<a href='/type/long'>long</a> migrated_from_max_id:flags.4?<a href='/type/int'>int</a> pinned_msg_id:flags.5?<a href='/type/int'>int</a> stickerset:flags.8?<a href='/type/StickerSet'>StickerSet</a> available_min_id:flags.9?<a href='/type/int'>int</a> folder_id:flags.11?<a href='/type/int'>int</a> linked_chat_id:flags.14?<a href='/type/long'>long</a> location:flags.15?<a href='/type/ChannelLocation'>ChannelLocation</a> slowmode_seconds:flags.17?<a href='/type/int'>int</a> slowmode_next_send_date:flags.18?<a href='/type/int'>int</a> stats_dc:flags.12?<a href='/type/int'>int</a> pts:<a href='/type/int'>int</a> call:flags.21?<a href='/type/InputGroupCall'>InputGroupCall</a> ttl_period:flags.24?<a href='/type/int'>int</a> pending_suggestions:flags.25?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/string'>string</a>&gt; groupcall_default_join_as:flags.26?<a href='/type/Peer'>Peer</a> theme_emoticon:flags.27?<a href='/type/string'>string</a> requests_pending:flags.28?<a href='/type/int'>int</a> recent_requesters:flags.28?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/long'>long</a>&gt; default_send_as:flags.29?<a href='/type/Peer'>Peer</a> available_reactions:flags.30?<a href='/type/ChatReactions'>ChatReactions</a> reactions_limit:flags2.13?<a href='/type/int'>int</a> stories:flags2.4?<a href='/type/PeerStories'>PeerStories</a> wallpaper:flags2.7?<a href='/type/WallPaper'>WallPaper</a> boosts_applied:flags2.8?<a href='/type/int'>int</a> boosts_unrestrict:flags2.9?<a href='/type/int'>int</a> emojiset:flags2.10?<a href='/type/StickerSet'>StickerSet</a> = <a href='/type/ChatFull'>ChatFull</a>;
---functions---
<a href='/method/channels.restrictSponsoredMessages'>channels.restrictSponsoredMessages</a>#9ae91519 channel:<a href='/type/InputChannel'>InputChannel</a> restricted:<a href='/type/Bool'>Bool</a> = <a href='/type/Updates'>Updates</a>;</code></pre>
<p>After reaching at least the boost level specified in the <a href="/api/config#channel-restrict-sponsored-level-min"><code>channel_restrict_sponsored_level_min</code> »</a> config parameter, channel owners may disable ads on the channel for all users using <a href="/method/channels.restrictSponsoredMessages">channels.restrictSponsoredMessages</a>. </p>
<p>After reaching at least the boost level specified in the <a href="/api/config#channel-restrict-sponsored-level-min"><code>channel_restrict_sponsored_level_min</code> »</a> config parameter, channel owners may disable ads on the channel for all users using <a href="/method/channels.restrictSponsoredMessages">channels.restrictSponsoredMessages</a>. </p>
<p>If ads are disabled on the channel, the <a href="/constructor/channelFull">channelFull</a>.<code>restricted_sponsored</code> flag will be set (owners only).</p></div>
</div>

View file

@ -77,13 +77,13 @@
<a href='/method/messages.getAttachMenuBots'>messages.getAttachMenuBots</a>#16fcc2cb hash:<a href='/type/long'>long</a> = <a href='/type/AttachMenuBots'>AttachMenuBots</a>;</code></pre>
<p>Bots that have the <code>bot_attach_menu</code> flag set offer an attachment or side menu entry that can be added to the in-app attachment menu or main view side menu. </p>
<p>Use <a href="/method/messages.getAttachMenuBot">messages.getAttachMenuBot</a> to get info about the attachment/side menu entry of a given bot, see the <a href="/constructor/attachMenuBot">attachMenuBot constructor page for more info »</a>. </p>
<p>Use <a href="/method/messages.getAttachMenuBot">messages.getAttachMenuBot</a> to get info about the attachment/side menu entry of a given bot, see the <a href="/constructor/attachMenuBot">attachMenuBot constructor page for more info »</a>. </p>
<p>The currently installed attachment/side menu list can be fetched using <a href="/method/messages.getAttachMenuBots">messages.getAttachMenuBots</a>. </p>
<p>Use <a href="/method/messages.toggleBotInAttachMenu">messages.toggleBotInAttachMenu</a> to enable or disable the attachment and/or side menu of a given bot (the entries that must be installed or uninstalled depend on the values of the <a href="/constructor/attachMenuBot">attachMenuBot</a>.<code>show_in_attach_menu</code> and <a href="/constructor/attachMenuBot">attachMenuBot</a>.<code>show_in_side_menu</code> flags).<br>
Changes made using this method will trigger an <a href="/constructor/updateAttachMenuBots">updateAttachMenuBots</a> update in other clients, which should trigger a <a href="/method/messages.getAttachMenuBots">messages.getAttachMenuBots</a> call to fetch the full updated list of installed attachment/side menu entries.<br>
The attachment/side menu list should also be refreshed if the user changes the app's language in the settings. </p>
<p>Once an attachment/side menu is enabled for a certain user, the <a href="/constructor/user">user</a>.<code>attach_menu_enabled</code> flag will be set <em>for the bot</em>, and the <a href="/constructor/attachMenuBot">attachMenuBot</a>.<code>inactive</code> flag will be unset. </p>
<p>Clicking on the attachment/side menu entry should open the related <a href="/api/bots/webapps#attachment-menu-mini-apps">attachment menu mini app</a>, see <a href="/api/bots/webapps#attachment-menu-mini-apps">here »</a> and <a href="/api/bots/webapps#side-menu-mini-apps">here »</a> for more info on the required steps.</p>
<p>Clicking on the attachment/side menu entry should open the related <a href="/api/bots/webapps#attachment-menu-mini-apps">attachment menu mini app</a>, see <a href="/api/bots/webapps#attachment-menu-mini-apps">here »</a> and <a href="/api/bots/webapps#side-menu-mini-apps">here »</a> for more info on the required steps.</p>
<p>Attachment menus can be installed and opened through <a href="/api/links#bot-attachment-or-side-menu-links">attachment/side menu deep links</a>.</p>
<p>In particular, when clicking on such a link, <a href="/method/messages.getAttachMenuBot">messages.getAttachMenuBot</a> should be invoked to check if the bot has an associated attachment/side menu entry, and if yes: </p>
<ul>
@ -97,9 +97,9 @@ If the user accepts, proceed to the next step, otherwise abort the process. </l
</ul>
</li>
<li>Open the Mini App:<ul>
<li>If the link is a <a href="/api/links#direct-mini-app-links">direct mini app link</a>, open the Mini App regardless of the currently open Telegram chat (in fact, the Mini App should opened even if the client itself is minimized), as specified <a href="/api/bots/webapps#direct-link-mini-apps">here »</a>. </li>
<li>If the link is a <a href="/api/links#direct-mini-app-links">direct mini app link</a>, open the Mini App regardless of the currently open Telegram chat (in fact, the Mini App should opened even if the client itself is minimized), as specified <a href="/api/bots/webapps#direct-link-mini-apps">here »</a>. </li>
<li>For <a href="/api/links#bot-attachment-or-side-menu-links">attachment/side menu links</a>, check that the attachment menu can be opened in the chosen chat type by checking the <a href="/constructor/attachMenuBot">attachMenuBot</a>.<code>peer_types</code> field. <ul>
<li>If the chosen chat is supported, open the <a href="/api/bots/webapps#attachment-menu-mini-apps">attachment menu mini app »</a> as specified <a href="/api/bots/webapps#attachment-menu-mini-apps">here »</a>.</li>
<li>If the chosen chat is supported, open the <a href="/api/bots/webapps#attachment-menu-mini-apps">attachment menu mini app »</a> as specified <a href="/api/bots/webapps#attachment-menu-mini-apps">here »</a>.</li>
<li>Otherwise:<ul>
<li>If the user has just installed the attachment menu @ step 1, notify the user that the attachment menu was installed successfully.</li>
<li>Otherwise, notify the user that the attachment menu webapp can't be opened in the specified chat.</li>

View file

@ -46,7 +46,7 @@
<p>Users can interact with your bot via <strong>buttons</strong> or even <strong>inline buttons</strong>, straight from inline <strong>messages</strong> in <strong>any</strong> chat.<br>
This article describes the full button flow, using the MTProto API. </p>
<p>For a simplified description using the HTTP bot API, see <a href="/bots/features#keyboards">here »</a>. </p>
<p>For a simplified description using the HTTP bot API, see <a href="/bots/features#keyboards">here »</a>. </p>
<h3><a class="anchor" href="#buttons" id="buttons" name="buttons"><i class="anchor-icon"></i></a>Buttons</h3>
<pre><code><a href='/constructor/keyboardButton'>keyboardButton</a>#a2fa4880 text:<a href='/type/string'>string</a> = <a href='/type/KeyboardButton'>KeyboardButton</a>;
<a href='/constructor/keyboardButtonUrl'>keyboardButtonUrl</a>#258aff05 text:<a href='/type/string'>string</a> url:<a href='/type/string'>string</a> = <a href='/type/KeyboardButton'>KeyboardButton</a>;
@ -121,15 +121,15 @@ Each row can have a different number of columns, and user clients should properl
<p>Buttons available only in inline keyboards:</p>
<ul>
<li><a href="/constructor/keyboardButtonUrl">keyboardButtonUrl</a> - Open the URL, showing a "Do you want to open this URL?" prompt (unless the URL is one of the <a href="https://github.com/DrKLO/Telegram/blob/002c01ecd37cd08ed07b3ed84d79318d091dfc85/TMessagesProj/src/main/java/org/telegram/messenger/browser/Browser.java#L351">internal URIs</a>, in which case the URL should be opened right away)</li>
<li><a href="/constructor/keyboardButtonCallback">keyboardButtonCallback</a> - Send the callback data to the bot, optionally providing the user's 2FA SRP payload for identity verification, see <a href="#callback-queries">here for more info »</a></li>
<li><a href="/constructor/keyboardButtonCallback">keyboardButtonCallback</a> - Send the callback data to the bot, optionally providing the user's 2FA SRP payload for identity verification, see <a href="#callback-queries">here for more info »</a></li>
<li><a href="/constructor/keyboardButtonSwitchInline">keyboardButtonSwitchInline</a><ul>
<li>If <code>keyboardButtonSwitchInline.same_peer</code> is set, insert the bot's username and <code>keyboardButtonSwitchInline.query</code> in the current chat's input field, triggering an <a href="/api/bots/inline">inline query</a>.</li>
<li>If <code>keyboardButtonSwitchInline.same_peer</code> is not set, prompt the user to select one of their chats, and then insert the bot's username and <code>keyboardButtonSwitchInline.query</code> in the current chat's input field, triggering an <a href="/api/bots/inline">inline query</a>.</li>
</ul>
</li>
<li><a href="/constructor/keyboardButtonGame">keyboardButtonGame</a> - Open the <a href="/constructor/game">game</a> from the attached <a href="/constructor/messageMediaGame">messageMediaGame</a> constructor, for more info <a href="/api/bots/games">see here »</a></li>
<li><a href="/constructor/keyboardButtonBuy">keyboardButtonBuy</a> - Proceed to initiating the payment flow, for more info <a href="/api/payments">see here »</a></li>
<li><a href="/constructor/keyboardButtonUrlAuth">keyboardButtonUrlAuth</a> - Log into a website using the user's Telegram account, as specified <a href="/api/url-authorization">here »</a></li>
<li><a href="/constructor/keyboardButtonGame">keyboardButtonGame</a> - Open the <a href="/constructor/game">game</a> from the attached <a href="/constructor/messageMediaGame">messageMediaGame</a> constructor, for more info <a href="/api/bots/games">see here »</a></li>
<li><a href="/constructor/keyboardButtonBuy">keyboardButtonBuy</a> - Proceed to initiating the payment flow, for more info <a href="/api/payments">see here »</a></li>
<li><a href="/constructor/keyboardButtonUrlAuth">keyboardButtonUrlAuth</a> - Log into a website using the user's Telegram account, as specified <a href="/api/url-authorization">here »</a></li>
</ul>
<h3><a class="anchor" href="#callback-queries" id="callback-queries" name="callback-queries"><i class="anchor-icon"></i></a>Callback queries</h3>
<p><a href="/constructor/keyboardButtonCallback">keyboardButtonCallback</a> buttons can be used to send the specified <code>data</code> payload back to the bot, when they are clicked.<br>
@ -152,8 +152,8 @@ The same should happen when clicking on <a href="/constructor/keyboardButtonGame
<li><code>alert</code> indicates whether the <code>message</code> should be shown as a dismissible prompt, instead of a simple toast notification</li>
<li><code>has_url</code> Whether an URL is present</li>
<li><code>url</code> if specified, the client should open the URL, without showing a confirmation prompt. <br> This is safe and allowed, because here bots can only return: <ul>
<li><a href="/api/links#bot-links">Deep links to themselves »</a></li>
<li><a href="/api/links#game-links">Deep links to a valid game they own »</a>, if the bot has manually configured games, and the clicked button was a <a href="/constructor/keyboardButtonGame">keyboardButtonGame</a>. </li>
<li><a href="/api/links#bot-links">Deep links to themselves »</a></li>
<li><a href="/api/links#game-links">Deep links to a valid game they own »</a>, if the bot has manually configured games, and the clicked button was a <a href="/constructor/keyboardButtonGame">keyboardButtonGame</a>. </li>
</ul>
</li>
<li><code>native_ui</code> whether to open game URLs in a WebView or in native UI.</li>
@ -178,7 +178,7 @@ This is just a way of verifying the identity of the user, mainly used by the off
<p>Either way, bots must reply to the query as quickly as possible using <a href="/method/messages.setBotCallbackAnswer">messages.setBotCallbackAnswer</a>: </p>
<ul>
<li><code>query_id</code> is the <code>query_id</code> from <a href="/method/messages.getBotCallbackAnswer">messages.getBotCallbackAnswer</a>, an <a href="/constructor/updateBotCallbackQuery">updateBotCallbackQuery</a>, <a href="/constructor/updateInlineBotCallbackQuery">updateInlineBotCallbackQuery</a> or <a href="/constructor/updateBusinessBotCallbackQuery">updateBusinessBotCallbackQuery</a></li>
<li><code>message</code>, <code>alert</code>, <code>url</code> can contain messages and URLs to trigger different client behaviour, as <a href="#sending-a-callback-query">specified above »</a></li>
<li><code>message</code>, <code>alert</code>, <code>url</code> can contain messages and URLs to trigger different client behaviour, as <a href="#sending-a-callback-query">specified above »</a></li>
<li><code>cache_time</code> indicates the maximum amount of time in seconds that the result of the callback query may be cached by the <strong>client</strong>. </li>
</ul>
<p>If a <code>game_short_name</code> is present in the update, the bot should return the URL of the game with the specified name.<br>

View file

@ -44,7 +44,7 @@
<div id="dev_page_content"><!-- scroll_nav -->
<p>The <code>id</code> field of <a href="/api/peers">peers »</a> (i.e. users, chats, channels, secret chats) contain four distinct sequences of unique 64-bit IDs used to identify a specific user, chat, channel or secret chat. </p>
<p>The <code>id</code> field of <a href="/api/peers">peers »</a> (i.e. users, chats, channels, secret chats) contain four distinct sequences of unique 64-bit IDs used to identify a specific user, chat, channel or secret chat. </p>
<p>The ID sequences of users, chats, channels and secret chats <strong>overlap</strong>, so it is a good idea to transform the peer IDs to bot API dialog IDs as specified below. </p>
<p>A bot API dialog ID is a single, unique 64-bit peer ID sequence derived from the user, chat, channel and secret chat ID sequences, maintaining uniqueness across all of them.<br>
Bot API dialog IDs are already used in the <a href="/bots/api">bot API</a> and in the underlying <a href="https://github.com/tdlib/td">tdlib</a> library to identify peers. </p>

View file

@ -56,7 +56,7 @@
<a href='/method/photos.uploadProfilePhoto'>photos.uploadProfilePhoto</a>#388a3b5 flags:<a href='/type/%23'>#</a> fallback:flags.3?<a href='/constructor/true'>true</a> bot:flags.5?<a href='/type/InputUser'>InputUser</a> file:flags.0?<a href='/type/InputFile'>InputFile</a> video:flags.1?<a href='/type/InputFile'>InputFile</a> video_start_ts:flags.2?<a href='/type/double'>double</a> video_emoji_markup:flags.4?<a href='/type/VideoSize'>VideoSize</a> = <a href='/type/photos.Photo'>photos.Photo</a>; </code></pre>
<p>Bots may invoke <a href="/method/bots.setBotInfo">bots.setBotInfo</a> set a localized version of their name, about text and description; <a href="/method/bots.getBotInfo">bots.getBotInfo</a> may be used to obtain previously set values.<br>
Bots may also invoke <a href="/method/photos.uploadProfilePhoto">photos.uploadProfilePhoto</a> as specified in the <a href="/api/files#uploading-profile-or-chat-pictures">files documentation »</a> to set profile photos, videos or stickers. </p>
Bots may also invoke <a href="/method/photos.uploadProfilePhoto">photos.uploadProfilePhoto</a> as specified in the <a href="/api/files#uploading-profile-or-chat-pictures">files documentation »</a> to set profile photos, videos or stickers. </p>
<p>The same methods may be invoked by the user that owns the bot (bots owned by the current user have the <a href="/constructor/user">user</a>.<code>bot_can_edit</code> flag set) to modify the bot's information: to do so, specify the bot's peer information in the <code>bot</code> parameter.</p></div>
</div>

View file

@ -46,7 +46,7 @@
<p>Interactive <a href="/bots/webapps">HTML5 Mini Apps</a> on Telegram can completely replace <strong>any website</strong>. </p>
<p>They support <a href="https://telegram.org/blog/privacy-discussions-web-bots#meet-seamless-web-bots">seamless authorization</a>, <a href="https://core.telegram.org/bots/payments">integrated payments</a> via multiple payment providers (with <em>Google Pay</em> and <em>Apple Pay</em> out of the box), delivering tailored push notifications to users, and <a href="https://core.telegram.org/bots">much more</a>.</p>
<p>This article offers a client-side overview of the implementation of bot mini apps using the MTProto API: see <a href="/bots/webapps">here for an overview of the mini-app side JS API »</a>. </p>
<p>This article offers a client-side overview of the implementation of bot mini apps using the MTProto API: see <a href="/bots/webapps">here for an overview of the mini-app side JS API »</a>. </p>
<h3><a class="anchor" href="#main-mini-apps" id="main-mini-apps" name="main-mini-apps"><i class="anchor-icon"></i></a>Main Mini Apps</h3>
<p>Schema:</p>
<pre><code><a href='/constructor/user'>user</a>#83314fca flags:<a href='/type/%23'>#</a> self:flags.10?<a href='/constructor/true'>true</a> contact:flags.11?<a href='/constructor/true'>true</a> mutual_contact:flags.12?<a href='/constructor/true'>true</a> deleted:flags.13?<a href='/constructor/true'>true</a> bot:flags.14?<a href='/constructor/true'>true</a> bot_chat_history:flags.15?<a href='/constructor/true'>true</a> bot_nochats:flags.16?<a href='/constructor/true'>true</a> verified:flags.17?<a href='/constructor/true'>true</a> restricted:flags.18?<a href='/constructor/true'>true</a> min:flags.20?<a href='/constructor/true'>true</a> bot_inline_geo:flags.21?<a href='/constructor/true'>true</a> support:flags.23?<a href='/constructor/true'>true</a> scam:flags.24?<a href='/constructor/true'>true</a> apply_min_photo:flags.25?<a href='/constructor/true'>true</a> fake:flags.26?<a href='/constructor/true'>true</a> bot_attach_menu:flags.27?<a href='/constructor/true'>true</a> premium:flags.28?<a href='/constructor/true'>true</a> attach_menu_enabled:flags.29?<a href='/constructor/true'>true</a> flags2:<a href='/type/%23'>#</a> bot_can_edit:flags2.1?<a href='/constructor/true'>true</a> close_friend:flags2.2?<a href='/constructor/true'>true</a> stories_hidden:flags2.3?<a href='/constructor/true'>true</a> stories_unavailable:flags2.4?<a href='/constructor/true'>true</a> contact_require_premium:flags2.10?<a href='/constructor/true'>true</a> bot_business:flags2.11?<a href='/constructor/true'>true</a> bot_has_main_app:flags2.13?<a href='/constructor/true'>true</a> id:<a href='/type/long'>long</a> access_hash:flags.0?<a href='/type/long'>long</a> first_name:flags.1?<a href='/type/string'>string</a> last_name:flags.2?<a href='/type/string'>string</a> username:flags.3?<a href='/type/string'>string</a> phone:flags.4?<a href='/type/string'>string</a> photo:flags.5?<a href='/type/UserProfilePhoto'>UserProfilePhoto</a> status:flags.6?<a href='/type/UserStatus'>UserStatus</a> bot_info_version:flags.14?<a href='/type/int'>int</a> restriction_reason:flags.18?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/RestrictionReason'>RestrictionReason</a>&gt; bot_inline_placeholder:flags.19?<a href='/type/string'>string</a> lang_code:flags.22?<a href='/type/string'>string</a> emoji_status:flags.30?<a href='/type/EmojiStatus'>EmojiStatus</a> usernames:flags2.0?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/Username'>Username</a>&gt; stories_max_id:flags2.5?<a href='/type/int'>int</a> color:flags2.8?<a href='/type/PeerColor'>PeerColor</a> profile_color:flags2.9?<a href='/type/PeerColor'>PeerColor</a> bot_active_users:flags2.12?<a href='/type/int'>int</a> = <a href='/type/User'>User</a>;
@ -61,8 +61,8 @@
<p>Clicking on this button should open the Main Mini App, by invoking <a href="/method/messages.requestMainWebView">messages.requestMainWebView</a>: no URL needs to be passed to the method, because the Main Mini App URL is configured through <a href="https://t.me/botfather">@botfather</a>. </p>
<p>After invoking <a href="/method/messages.requestMainWebView">messages.requestMainWebView</a> and obtaining a <a href="/constructor/webViewResultUrl">webViewResultUrl</a> result, clients should open a webview using the <code>url</code> contained in the returned <a href="/constructor/webViewResultUrl">webViewResultUrl</a>. </p>
<p>The bot's profile page should also show a list of photos and videos, previewing the features offered by the Main Mini App, see <a href="#main-mini-app-previews">Main Mini App previews</a> for more info on how to configure and render them. </p>
<p>Main Mini Apps are also featured in the in-app <a href="/api/search#apps-tab">Mini App Store »</a>. </p>
<p>The Main Mini App should also be directly opened when <a href="/api/links#main-mini-app-links">clicking on a Main Mini App deep link »</a>; the <code>compact</code> flag of the method must be set if the <code>mode</code> parameter in the link is set and equal to <code>compact</code>; any eventual <code>start_param</code> present in the link must also be passed to the method. </p>
<p>Main Mini Apps are also featured in the in-app <a href="/api/search#apps-tab">Mini App Store »</a>. </p>
<p>The Main Mini App should also be directly opened when <a href="/api/links#main-mini-app-links">clicking on a Main Mini App deep link »</a>; the <code>compact</code> flag of the method must be set if the <code>mode</code> parameter in the link is set and equal to <code>compact</code>; any eventual <code>start_param</code> present in the link must also be passed to the method. </p>
<h4><a class="anchor" href="#main-mini-app-previews" id="main-mini-app-previews" name="main-mini-app-previews"><i class="anchor-icon"></i></a>Main Mini App previews</h4>
<pre><code><a href='/constructor/botInfo'>botInfo</a>#8f300b57 flags:<a href='/type/%23'>#</a> has_preview_medias:flags.6?<a href='/constructor/true'>true</a> user_id:flags.0?<a href='/type/long'>long</a> description:flags.1?<a href='/type/string'>string</a> description_photo:flags.4?<a href='/type/Photo'>Photo</a> description_document:flags.5?<a href='/type/Document'>Document</a> commands:flags.2?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/BotCommand'>BotCommand</a>&gt; menu_button:flags.3?<a href='/type/BotMenuButton'>BotMenuButton</a> = <a href='/type/BotInfo'>BotInfo</a>;
@ -82,7 +82,7 @@
<a href='/method/bots.editPreviewMedia'>bots.editPreviewMedia</a>#8525606f bot:<a href='/type/InputUser'>InputUser</a> lang_code:<a href='/type/string'>string</a> media:<a href='/type/InputMedia'>InputMedia</a> new_media:<a href='/type/InputMedia'>InputMedia</a> = <a href='/type/BotPreviewMedia'>BotPreviewMedia</a>;
<a href='/method/bots.deletePreviewMedia'>bots.deletePreviewMedia</a>#2d0135b3 bot:<a href='/type/InputUser'>InputUser</a> lang_code:<a href='/type/string'>string</a> media:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/InputMedia'>InputMedia</a>&gt; = <a href='/type/Bool'>Bool</a>;
<a href='/method/bots.reorderPreviewMedias'>bots.reorderPreviewMedias</a>#b627f3aa bot:<a href='/type/InputUser'>InputUser</a> lang_code:<a href='/type/string'>string</a> order:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/InputMedia'>InputMedia</a>&gt; = <a href='/type/Bool'>Bool</a>;</code></pre>
<p>After enabling a <a href="#main-mini-apps">main mini app »</a> in <a href="https://t.me/botfather">@botfather</a>, bots gain the ability to display <strong>localized</strong> preview medias (photos and videos) on their profile page, offering examples of what the app can do. </p>
<p>After enabling a <a href="#main-mini-apps">main mini app »</a> in <a href="https://t.me/botfather">@botfather</a>, bots gain the ability to display <strong>localized</strong> preview medias (photos and videos) on their profile page, offering examples of what the app can do. </p>
<p>If a bot has some preview medias, the <a href="/constructor/botInfo">botInfo</a>.<code>has_preview_medias</code> flag will be set (<a href="/constructor/botInfo">botInfo</a> is contained in the bot's <a href="/constructor/userFull">userFull</a>).<br>
Clients should then invoke <a href="/method/bots.getPreviewMedias">bots.getPreviewMedias</a> to fetch&amp;download the preview medias once the user opens the bot's profile page.<br>
The method will automatically select the correctly localized variant of each preview, according to the language code of the user (as passed to <a href="/method/initConnection">initConnection</a> when first setting up the client). </p>
@ -94,7 +94,7 @@ Pass an empty string to <code>lang_code</code> when first invoking the method to
<p>Then, use <a href="/method/bots.addPreviewMedia">bots.addPreviewMedia</a>, <a href="/method/bots.editPreviewMedia">bots.editPreviewMedia</a>, <a href="/method/bots.reorderPreviewMedias">bots.reorderPreviewMedias</a>, <a href="/method/bots.deletePreviewMedia">bots.deletePreviewMedia</a>, uploading medias using <a href="/method/messages.uploadMedia">messages.uploadMedia</a> as usual to setup fallback and localized previews for existing and new languages. </p>
<p>As specified above, each language can have a distinct set of previews that may be edited and reordered independently.
The default, fallback language has an empty <code>lang_code</code>. </p>
<p>A maximum of <a href="/api/config#bot-preview-medias-max">bot_preview_medias_max »</a> preview medias may be added per localization key.</p>
<p>A maximum of <a href="/api/config#bot-preview-medias-max">bot_preview_medias_max »</a> preview medias may be added per localization key.</p>
<h3><a class="anchor" href="#keyboard-button-mini-apps" id="keyboard-button-mini-apps" name="keyboard-button-mini-apps"><i class="anchor-icon"></i></a>Keyboard Button Mini Apps</h3>
<p>Schema:</p>
<pre><code><a href='/constructor/replyKeyboardMarkup'>replyKeyboardMarkup</a>#85dd99d1 flags:<a href='/type/%23'>#</a> resize:flags.0?<a href='/constructor/true'>true</a> single_use:flags.1?<a href='/constructor/true'>true</a> selective:flags.2?<a href='/constructor/true'>true</a> persistent:flags.4?<a href='/constructor/true'>true</a> rows:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/KeyboardButtonRow'>KeyboardButtonRow</a>&gt; placeholder:flags.3?<a href='/type/string'>string</a> = <a href='/type/ReplyMarkup'>ReplyMarkup</a>;
@ -113,8 +113,8 @@ The default, fallback language has an empty <code>lang_code</code>. </p>
<a href='/method/messages.sendWebViewData'>messages.sendWebViewData</a>#dc0242c8 bot:<a href='/type/InputUser'>InputUser</a> random_id:<a href='/type/long'>long</a> button_text:<a href='/type/string'>string</a> data:<a href='/type/string'>string</a> = <a href='/type/Updates'>Updates</a>;</code></pre>
<p>Keyboard Button Mini Apps should be opened when the user clicks a <a href="/constructor/keyboardButtonSimpleWebView">keyboardButtonSimpleWebView</a> contained in a reply keyboard identified by a <a href="/constructor/replyKeyboardMarkup">replyKeyboardMarkup</a> constructor, by invoking <a href="/method/messages.requestSimpleWebView">messages.requestSimpleWebView</a> passing the button's <code>url</code> to the <code>url</code> parameter. </p>
<p>After invoking <a href="/method/messages.requestSimpleWebView">messages.requestSimpleWebView</a> and obtaining a <a href="/constructor/webViewResultUrl">webViewResultUrl</a> result, clients should open a webview using the <code>url</code> contained in the returned <a href="/constructor/webViewResultUrl">webViewResultUrl</a>. </p>
<p>Keyboard Button Mini Apps can send data back to the bot through the MTProto API via a <a href="/api/web-events#web-app-data-send"><code>web_app_data_send</code> JS event »</a>. </p>
<p>Upon receiving a <a href="/api/web-events#web-app-data-send"><code>web_app_data_send</code> JS event »</a> <strong>only</strong> from Keyboard Button Mini Apps, clients should invoke <a href="/method/messages.sendWebViewData">messages.sendWebViewData</a>, passing the following arguments:</p>
<p>Keyboard Button Mini Apps can send data back to the bot through the MTProto API via a <a href="/api/web-events#web-app-data-send"><code>web_app_data_send</code> JS event »</a>. </p>
<p>Upon receiving a <a href="/api/web-events#web-app-data-send"><code>web_app_data_send</code> JS event »</a> <strong>only</strong> from Keyboard Button Mini Apps, clients should invoke <a href="/method/messages.sendWebViewData">messages.sendWebViewData</a>, passing the following arguments:</p>
<ul>
<li><code>bot</code> - Bot ID</li>
<li><code>random_id</code> - Unique random ID to avoid resending the same event multiple times</li>
@ -144,20 +144,20 @@ The default, fallback language has an empty <code>lang_code</code>. </p>
<a href='/method/messages.prolongWebView'>messages.prolongWebView</a>#b0d81a83 flags:<a href='/type/%23'>#</a> silent:flags.5?<a href='/constructor/true'>true</a> peer:<a href='/type/InputPeer'>InputPeer</a> bot:<a href='/type/InputUser'>InputUser</a> query_id:<a href='/type/long'>long</a> reply_to:flags.0?<a href='/type/InputReplyTo'>InputReplyTo</a> send_as:flags.13?<a href='/type/InputPeer'>InputPeer</a> = <a href='/type/Bool'>Bool</a>;
<a href='/method/messages.sendWebViewResultMessage'>messages.sendWebViewResultMessage</a>#a4314f5 bot_query_id:<a href='/type/string'>string</a> result:<a href='/type/InputBotInlineResult'>InputBotInlineResult</a> = <a href='/type/WebViewMessageSent'>WebViewMessageSent</a>;</code></pre>
<p>Inline Button Mini Apps work similarly to <a href="/api/bots/inline">inline bots »</a>: they send messages on behalf of the user to the chat from which the query originated.</p>
<p>Inline Button Mini Apps work similarly to <a href="/api/bots/inline">inline bots »</a>: they send messages on behalf of the user to the chat from which the query originated.</p>
<p>When the user clicks on an <a href="/constructor/keyboardButtonWebView">keyboardButtonWebView</a> inline button contained in an inline keyboard identified by a <a href="/constructor/replyInlineMarkup">replyInlineMarkup</a> constructor, <a href="/method/messages.requestWebView">messages.requestWebView</a> should be invoked, passing <a href="/constructor/keyboardButtonWebView">keyboardButtonWebView</a>.<code>url</code> must be passed to the method's <code>url</code> parameter. </p>
<p>Then, clients should open a webview using the <code>url</code> contained in the returned <a href="/constructor/webViewResultUrl">webViewResultUrl</a>. </p>
<p>After loading the webview, until it is closed by a <a href="/api/web-events#web-app-close">web_app_close event</a>, the user client must invoke <a href="/method/messages.prolongWebView">messages.prolongWebView</a> every 60 seconds: if the method call returns <code>QUERY_ID_INVALID</code>, the webview must be closed. </p>
<p>The opened URL's fragment parameters already contain basic information about the user and a <code>query_id</code> parameter, that is exposed by the <a href="/bots/webapps">bot Mini Apps JS library</a>: this <code>query_id</code> can then be passed to the bot (within the Mini App itself, for example via an AJAX query or form submission to the server hosting the Mini App and the bot) and then used <strong>by the bot</strong> to invoke <a href="/method/messages.sendWebViewResultMessage">messages.sendWebViewResultMessage</a>, passing an <a href="/type/InputBotInlineResult">InputBotInlineResult</a> constructor that will automatically send a message with optionally attached media, and even inline buttons on behalf of the user. </p>
<h3><a class="anchor" href="#menu-button-mini-apps" id="menu-button-mini-apps" name="menu-button-mini-apps"><i class="anchor-icon"></i></a>Menu button Mini Apps</h3>
<p>Menu button Mini Apps work similarly to <a href="#inline-button-mini-apps">inline button Mini Apps »</a>: they send messages on behalf of the user to the chat from where the <a href="/api/bots/menu">bot menu button »</a> was clicked. </p>
<p>Menu button Mini Apps can be opened from a <a href="/constructor/botMenuButton">botMenuButton</a> <a href="/api/bots/menu">menu button »</a>: in this case, the <a href="/method/messages.requestWebView">messages.requestWebView</a>.<code>from_bot_menu</code> flag should be set, and the <a href="/constructor/botMenuButton">botMenuButton</a>.<code>url</code> field must be passed to the method's <code>url</code> parameter. </p>
<p>The full flow is identical to the flow for <a href="#inline-button-mini-apps">inline button Mini Apps »</a>, apart from the different flags passed to <a href="/method/messages.requestWebView">messages.requestWebView</a>, as described above.</p>
<p>Menu button Mini Apps work similarly to <a href="#inline-button-mini-apps">inline button Mini Apps »</a>: they send messages on behalf of the user to the chat from where the <a href="/api/bots/menu">bot menu button »</a> was clicked. </p>
<p>Menu button Mini Apps can be opened from a <a href="/constructor/botMenuButton">botMenuButton</a> <a href="/api/bots/menu">menu button »</a>: in this case, the <a href="/method/messages.requestWebView">messages.requestWebView</a>.<code>from_bot_menu</code> flag should be set, and the <a href="/constructor/botMenuButton">botMenuButton</a>.<code>url</code> field must be passed to the method's <code>url</code> parameter. </p>
<p>The full flow is identical to the flow for <a href="#inline-button-mini-apps">inline button Mini Apps »</a>, apart from the different flags passed to <a href="/method/messages.requestWebView">messages.requestWebView</a>, as described above.</p>
<h3><a class="anchor" href="#attachment-menu-mini-apps" id="attachment-menu-mini-apps" name="attachment-menu-mini-apps"><i class="anchor-icon"></i></a>Attachment menu Mini Apps</h3>
<p>Attachment menu Mini Apps work similarly to <a href="#inline-button-mini-apps">inline button Mini Apps »</a>: they send messages on behalf of the user to the chat where the bot's <a href="/api/bots/attach">attachment menu »</a> was opened. </p>
<p>Attachment menu Mini Apps can be opened from an <a href="/api/bots/attach">attachment menu entry »</a>: in this case, no special flag should be set when invoking <a href="/method/messages.requestWebView">messages.requestWebView</a>. </p>
<p>Attachment menu Mini Apps work similarly to <a href="#inline-button-mini-apps">inline button Mini Apps »</a>: they send messages on behalf of the user to the chat where the bot's <a href="/api/bots/attach">attachment menu »</a> was opened. </p>
<p>Attachment menu Mini Apps can be opened from an <a href="/api/bots/attach">attachment menu entry »</a>: in this case, no special flag should be set when invoking <a href="/method/messages.requestWebView">messages.requestWebView</a>. </p>
<p>Attachment menu Mini Apps can also be opened from a <a href="/api/links#bot-attachment-or-side-menu-links">bot attachment menu deep link</a>, in which case the <code>start_parameter</code> should be provided to <a href="/method/messages.requestWebView">messages.requestWebView</a>.<code>start_param</code>, if present, and the <code>compact</code> flag must be set if the <code>mode</code> parameter is set and equal to <code>compact</code>.</p>
<p>The full flow is identical to the flow for <a href="#inline-button-mini-apps">inline button Mini Apps »</a>, apart from the different flags passed to <a href="/method/messages.requestWebView">messages.requestWebView</a>, as described above.</p>
<p>The full flow is identical to the flow for <a href="#inline-button-mini-apps">inline button Mini Apps »</a>, apart from the different flags passed to <a href="/method/messages.requestWebView">messages.requestWebView</a>, as described above.</p>
<h3><a class="anchor" href="#inline-mode-mini-apps" id="inline-mode-mini-apps" name="inline-mode-mini-apps"><i class="anchor-icon"></i></a>Inline mode Mini Apps</h3>
<pre><code><a href='/constructor/messages.botResults'>messages.botResults</a>#e021f2f6 flags:<a href='/type/%23'>#</a> gallery:flags.0?<a href='/constructor/true'>true</a> query_id:<a href='/type/long'>long</a> next_offset:flags.1?<a href='/type/string'>string</a> switch_pm:flags.2?<a href='/type/InlineBotSwitchPM'>InlineBotSwitchPM</a> switch_webview:flags.3?<a href='/type/InlineBotWebView'>InlineBotWebView</a> results:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/BotInlineResult'>BotInlineResult</a>&gt; cache_time:<a href='/type/int'>int</a> users:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/User'>User</a>&gt; = <a href='/type/messages.BotResults'>messages.BotResults</a>;
@ -170,12 +170,12 @@ The default, fallback language has an empty <code>lang_code</code>. </p>
<a href='/method/messages.getInlineBotResults'>messages.getInlineBotResults</a>#514e999d flags:<a href='/type/%23'>#</a> bot:<a href='/type/InputUser'>InputUser</a> peer:<a href='/type/InputPeer'>InputPeer</a> geo_point:flags.0?<a href='/type/InputGeoPoint'>InputGeoPoint</a> query:<a href='/type/string'>string</a> offset:<a href='/type/string'>string</a> = <a href='/type/messages.BotResults'>messages.BotResults</a>;
<a href='/method/messages.requestSimpleWebView'>messages.requestSimpleWebView</a>#413a3e73 flags:<a href='/type/%23'>#</a> from_switch_webview:flags.1?<a href='/constructor/true'>true</a> from_side_menu:flags.2?<a href='/constructor/true'>true</a> compact:flags.7?<a href='/constructor/true'>true</a> bot:<a href='/type/InputUser'>InputUser</a> url:flags.3?<a href='/type/string'>string</a> start_param:flags.4?<a href='/type/string'>string</a> theme_params:flags.0?<a href='/type/DataJSON'>DataJSON</a> platform:<a href='/type/string'>string</a> = <a href='/type/WebViewResult'>WebViewResult</a>;</code></pre>
<p>Not to be confused with <a href="#inline-button-mini-apps">inline button mini apps »</a>. </p>
<p>Inline mode Mini Apps can be used to generate a custom set of inline results in response to a user's <a href="/api/bots/inline">inline query »</a> via a <a href="/api/web-events#web-app-switch-inline-query"><code>web_app_switch_inline_query</code> JS event »</a>. </p>
<p>Not to be confused with <a href="#inline-button-mini-apps">inline button mini apps »</a>. </p>
<p>Inline mode Mini Apps can be used to generate a custom set of inline results in response to a user's <a href="/api/bots/inline">inline query »</a> via a <a href="/api/web-events#web-app-switch-inline-query"><code>web_app_switch_inline_query</code> JS event »</a>. </p>
<p>Inline mode Mini Apps can be opened by clicking on an <a href="/constructor/inlineBotWebView">inlineBotWebView</a> button returned at the top of the inline result list, contained in <a href="/constructor/messages.botResults">messages.botResults</a>.<code>switch_webview</code>, returned by <a href="/method/messages.getInlineBotResults">messages.getInlineBotResults</a>. </p>
<p>Pass the <code>url</code> to <a href="/method/messages.requestSimpleWebView">messages.requestSimpleWebView</a>, while also setting the <code>from_switch_webview</code> flag. </p>
<p>After invoking <a href="/method/messages.requestSimpleWebView">messages.requestSimpleWebView</a> and obtaining a <a href="/constructor/webViewResultUrl">webViewResultUrl</a> result, clients should open a webview using the <code>url</code> contained in the returned <a href="/constructor/webViewResultUrl">webViewResultUrl</a>. </p>
<p>Once the user has finished making their choices in the Mini App, a <a href="/api/web-events#web-app-switch-inline-query"><code>web_app_switch_inline_query</code> JS event »</a> should be emitted, containing a JSON object with the following fields:</p>
<p>Once the user has finished making their choices in the Mini App, a <a href="/api/web-events#web-app-switch-inline-query"><code>web_app_switch_inline_query</code> JS event »</a> should be emitted, containing a JSON object with the following fields:</p>
<ul>
<li><code>query</code> - The inline query that will be inserted in the chat's input field, after the bot's username.<br>
May be an empty string, in which case just the bot's username will be inserted, triggering an empty inline query.</li>
@ -184,14 +184,14 @@ If non-empty, the client should prompt the user to choose a specific chat of the
The array values specify which types of chats the user will be able to choose from.<br>
If empty, the current chat is used. </li>
</ul>
<p>Upon receiving a <a href="/api/web-events#web-app-switch-inline-query"><code>web_app_switch_inline_query</code> JS event »</a> from the Mini App, the client should <a href="/api/bots/inline">make a new inline query »</a> to the same bot, with the newly specified <code>query</code>, either in the current chat or in the newly chosen chat, as specified by the <code>chat_types</code> field. </p>
<p>Upon receiving a <a href="/api/web-events#web-app-switch-inline-query"><code>web_app_switch_inline_query</code> JS event »</a> from the Mini App, the client should <a href="/api/bots/inline">make a new inline query »</a> to the same bot, with the newly specified <code>query</code>, either in the current chat or in the newly chosen chat, as specified by the <code>chat_types</code> field. </p>
<h3><a class="anchor" href="#side-menu-mini-apps" id="side-menu-mini-apps" name="side-menu-mini-apps"><i class="anchor-icon"></i></a>Side menu Mini Apps</h3>
<pre><code><a href='/constructor/webViewResultUrl'>webViewResultUrl</a>#4d22ff98 flags:<a href='/type/%23'>#</a> fullsize:flags.1?<a href='/constructor/true'>true</a> query_id:flags.0?<a href='/type/long'>long</a> url:<a href='/type/string'>string</a> = <a href='/type/WebViewResult'>WebViewResult</a>;
---functions---
<a href='/method/messages.requestSimpleWebView'>messages.requestSimpleWebView</a>#413a3e73 flags:<a href='/type/%23'>#</a> from_switch_webview:flags.1?<a href='/constructor/true'>true</a> from_side_menu:flags.2?<a href='/constructor/true'>true</a> compact:flags.7?<a href='/constructor/true'>true</a> bot:<a href='/type/InputUser'>InputUser</a> url:flags.3?<a href='/type/string'>string</a> start_param:flags.4?<a href='/type/string'>string</a> theme_params:flags.0?<a href='/type/DataJSON'>DataJSON</a> platform:<a href='/type/string'>string</a> = <a href='/type/WebViewResult'>WebViewResult</a>;</code></pre>
<p>Side menu Mini Apps can be opened by clicking on the installed <a href="/api/bots/attach">side menu entry »</a>. </p>
<p>Side menu Mini Apps can be opened by clicking on the installed <a href="/api/bots/attach">side menu entry »</a>. </p>
<p>This action must trigger a <a href="/method/messages.requestSimpleWebView">messages.requestSimpleWebView</a> query with the <code>from_side_menu</code> flag set: clients should open a webview using the <code>url</code> contained in the returned <a href="/constructor/webViewResultUrl">webViewResultUrl</a>. </p>
<p>After invoking <a href="/method/messages.requestSimpleWebView">messages.requestSimpleWebView</a> and obtaining a <a href="/constructor/webViewResultUrl">webViewResultUrl</a> result, clients should open a webview using the <code>url</code> contained in the returned <a href="/constructor/webViewResultUrl">webViewResultUrl</a>. </p>
<h3><a class="anchor" href="#direct-link-mini-apps" id="direct-link-mini-apps" name="direct-link-mini-apps"><i class="anchor-icon"></i></a>Direct Link Mini Apps</h3>
@ -211,7 +211,7 @@ If empty, the current chat is used. </li>
<a href='/method/messages.getBotApp'>messages.getBotApp</a>#34fdc5c3 app:<a href='/type/InputBotApp'>InputBotApp</a> hash:<a href='/type/long'>long</a> = <a href='/type/messages.BotApp'>messages.BotApp</a>;
<a href='/method/messages.requestAppWebView'>messages.requestAppWebView</a>#53618bce flags:<a href='/type/%23'>#</a> write_allowed:flags.0?<a href='/constructor/true'>true</a> compact:flags.7?<a href='/constructor/true'>true</a> peer:<a href='/type/InputPeer'>InputPeer</a> app:<a href='/type/InputBotApp'>InputBotApp</a> start_param:flags.1?<a href='/type/string'>string</a> theme_params:flags.2?<a href='/type/DataJSON'>DataJSON</a> platform:<a href='/type/string'>string</a> = <a href='/type/WebViewResult'>WebViewResult</a>;</code></pre>
<p>Another way to open Mini Apps is by using <a href="/api/links#direct-mini-app-links">Direct Mini App links »</a>. </p>
<p>Another way to open Mini Apps is by using <a href="/api/links#direct-mini-app-links">Direct Mini App links »</a>. </p>
<p>These links are different from all other Mini App links, because they don't require the user to install an attachment menu, and a single bot can offer multiple Mini Apps, distinguished by their <code>short_name</code>. </p>
<p>These links should be handled as follows: </p>
<ul>
@ -244,19 +244,19 @@ Confirmation should <strong>always</strong> be asked, even if the <code>inactive
</ul>
<p>Finally, open the webview using the <code>url</code> contained in the returned <a href="/constructor/webViewResultUrl">webViewResultUrl</a>. </p>
<h3><a class="anchor" href="#outgoing-events-mini-app-to-client" id="outgoing-events-mini-app-to-client" name="outgoing-events-mini-app-to-client"><i class="anchor-icon"></i></a>Outgoing events: Mini App to client</h3>
<p>Mini Apps can <em>send</em> web events starting with <code>web_app_</code>; see the <a href="/api/web-events">web event documentation for the full list of events that can be <em>sent</em> by the Mini App to the client »</a>. </p>
<p>Mini Apps can <em>send</em> web events starting with <code>web_app_</code>; see the <a href="/api/web-events">web event documentation for the full list of events that can be <em>sent</em> by the Mini App to the client »</a>. </p>
<h3><a class="anchor" href="#incoming-events-client-to-mini-app" id="incoming-events-client-to-mini-app" name="incoming-events-client-to-mini-app"><i class="anchor-icon"></i></a>Incoming events: Client to Mini App</h3>
<p>Mini Apps can also <em>receive</em> events, by exposing a <code>window.Telegram.WebView.receiveEvent("event_name", params)</code> method. </p>
<p>Here's the full list of events that can be <em>received</em> by a Mini App from the client, if the client invokes the <code>receiveEvent</code> method. </p>
<h4><a class="anchor" href="#main-button-pressed" id="main-button-pressed" name="main-button-pressed"><i class="anchor-icon"></i></a><code>main_button_pressed</code></h4>
<p>Params: <code>null</code></p>
<p>Sent by the client when the user presses the main button located at the bottom of the webview, handle this event only if the main button was <a href="/api/web-events#web-app-setup-main-button">previously configured by a <code>web_app_setup_main_button</code> event »</a>.</p>
<p>Sent by the client when the user presses the main button located at the bottom of the webview, handle this event only if the main button was <a href="/api/web-events#web-app-setup-main-button">previously configured by a <code>web_app_setup_main_button</code> event »</a>.</p>
<h4><a class="anchor" href="#back-button-pressed" id="back-button-pressed" name="back-button-pressed"><i class="anchor-icon"></i></a><code>back_button_pressed</code></h4>
<p>Params: <code>null</code></p>
<p>Sent by the client when the user presses the (OS or UI) back button, if it was <a href="/api/web-events#web-app-setup-back-button">previously enabled by a <code>web_app_setup_back_button</code> event »</a>.</p>
<p>Sent by the client when the user presses the (OS or UI) back button, if it was <a href="/api/web-events#web-app-setup-back-button">previously enabled by a <code>web_app_setup_back_button</code> event »</a>.</p>
<h4><a class="anchor" href="#settings-button-pressed" id="settings-button-pressed" name="settings-button-pressed"><i class="anchor-icon"></i></a><code>settings_button_pressed</code></h4>
<p>Params: <code>null</code></p>
<p>Sent by the client when the user presses the settings button, if it was <a href="/api/web-events#web-app-setup-settings-button">previously enabled by a <code>web_app_setup_settings_button</code> event »</a>.</p>
<p>Sent by the client when the user presses the settings button, if it was <a href="/api/web-events#web-app-setup-settings-button">previously enabled by a <code>web_app_setup_settings_button</code> event »</a>.</p>
<h4><a class="anchor" href="#invoice-closed" id="invoice-closed" name="invoice-closed"><i class="anchor-icon"></i></a><code>invoice_closed</code></h4>
<p>Params: JSON object with the following fields:</p>
<ul>
@ -266,11 +266,11 @@ Confirmation should <strong>always</strong> be asked, even if the <code>inactive
<li><code>failed</code> The user tried to pay, but the payment failed: the call to <a href="/method/payments.sendPaymentForm">payments.sendPaymentForm</a> returned an RPC error and the popup was closed.</li>
<li><code>pending</code> The payment is still processing: the bot will receive a further service message about a successful payment. <a href="/method/payments.sendPaymentForm">payments.sendPaymentForm</a> was successfully invoked returning <a href="/constructor/payments.paymentVerificationNeeded">payments.paymentVerificationNeeded</a>, the user completed all additional verification forms returned by the method and the invoice popup was closed, but the client hasn't received a <a href="/constructor/messageActionPaymentSent">messageActionPaymentSent</a> service message yet.<br>
Note that eventual errors will not be sent as a <code>failed</code> event if the user fails additional validation (ie 3-D Secure) returned by <a href="/constructor/payments.paymentVerificationNeeded">payments.paymentVerificationNeeded</a>: the state will remaing <code>pending</code>. </li>
<li><code>paid</code> The invoice was paid successfully: the client completed the <a href="/api/payments">payment flow »</a>, the invoice popup was closed and a <a href="/constructor/messageActionPaymentSent">messageActionPaymentSent</a> service message was received by the client.</li>
<li><code>paid</code> The invoice was paid successfully: the client completed the <a href="/api/payments">payment flow »</a>, the invoice popup was closed and a <a href="/constructor/messageActionPaymentSent">messageActionPaymentSent</a> service message was received by the client.</li>
</ul>
</li>
</ul>
<p>Sent by the client to report the <a href="/api/payments">payment status</a> of an invoice obtained from a <a href="/api/web-events#web-app-open-invoice"><code>web_app_open_invoice</code> event »</a>. </p>
<p>Sent by the client to report the <a href="/api/payments">payment status</a> of an invoice obtained from a <a href="/api/web-events#web-app-open-invoice"><code>web_app_open_invoice</code> event »</a>. </p>
<h4><a class="anchor" href="#viewport-changed" id="viewport-changed" name="viewport-changed"><i class="anchor-icon"></i></a><code>viewport_changed</code></h4>
<p>Params: a JSON object with the following fields:</p>
<ul>
@ -282,9 +282,9 @@ Note that eventual errors will not be sent as a <code>failed</code> event if the
<h4><a class="anchor" href="#theme-changed" id="theme-changed" name="theme-changed"><i class="anchor-icon"></i></a><code>theme_changed</code></h4>
<p>Params: a JSON object with the following fields:</p>
<ul>
<li><code>theme_params</code> - A <a href="#theme-parameters">theme parameters object »</a> (object)</li>
<li><code>theme_params</code> - A <a href="#theme-parameters">theme parameters object »</a> (object)</li>
</ul>
<p>Emitted when requested by the Mini App using a <a href="/api/web-events#web-app-request-theme"><code>web_app_request_theme</code> event »</a>, or when the app theme changes. </p>
<p>Emitted when requested by the Mini App using a <a href="/api/web-events#web-app-request-theme"><code>web_app_request_theme</code> event »</a>, or when the app theme changes. </p>
<h5><a class="anchor" href="#theme-parameters" id="theme-parameters" name="theme-parameters"><i class="anchor-icon"></i></a>Theme parameters</h5>
<p>Bot Mini Apps can be themed according to the following theme parameters, passed as a JSON object to the <code>theme_params</code> parameter of the <a href="/method/messages.requestSimpleWebView">messages.requestSimpleWebView</a>, <a href="/method/messages.requestWebView">messages.requestWebView</a> and <a href="/method/messages.requestAppWebView">messages.requestAppWebView</a> methods. </p>
<p>This JSON object has the following keys, containing color theme information (hex string, RGB, no alpha) to pass to the Mini App:</p>
@ -306,19 +306,19 @@ Note that eventual errors will not be sent as a <code>failed</code> event if the
</ul>
<h4><a class="anchor" href="#popup-closed" id="popup-closed" name="popup-closed"><i class="anchor-icon"></i></a><code>popup_closed</code></h4>
<p>Params: a JSON object with an optional <code>button_id</code> string field.</p>
<p>Emitted when the user presses a button or cancels a popup brought up by a previous <a href="/api/web-events#web-app-open-popup"><code>web_app_open_popup</code> event »</a>. </p>
<p>Emitted when the user presses a button or cancels a popup brought up by a previous <a href="/api/web-events#web-app-open-popup"><code>web_app_open_popup</code> event »</a>. </p>
<h4><a class="anchor" href="#write-access-requested" id="write-access-requested" name="write-access-requested"><i class="anchor-icon"></i></a><code>write_access_requested</code></h4>
<p>Params: a JSON object with the following fields:</p>
<ul>
<li><code>status</code> - <code>allowed</code> or <code>cancelled</code></li>
</ul>
<p>Used by clients to reply to a <a href="/api/web-events#web-app-request-write-access"><code>web_app_request_write_access</code> event »</a>, indicating whether the user has allowed the bot to send messages to the user (<code>allowed</code>) or not (<code>cancelled</code>). </p>
<p>Used by clients to reply to a <a href="/api/web-events#web-app-request-write-access"><code>web_app_request_write_access</code> event »</a>, indicating whether the user has allowed the bot to send messages to the user (<code>allowed</code>) or not (<code>cancelled</code>). </p>
<h4><a class="anchor" href="#phone-requested" id="phone-requested" name="phone-requested"><i class="anchor-icon"></i></a><code>phone_requested</code></h4>
<p>Params: a JSON object with the following fields:</p>
<ul>
<li><code>status</code> - <code>sent</code> or <code>cancelled</code></li>
</ul>
<p>Used by clients to reply to a <a href="/api/web-events#web-app-request-phone"><code>web_app_request_phone</code> event »</a>, indicating whether the user has shared their phone number with the bot (<code>allowed</code>) or not (<code>cancelled</code>). </p>
<p>Used by clients to reply to a <a href="/api/web-events#web-app-request-phone"><code>web_app_request_phone</code> event »</a>, indicating whether the user has shared their phone number with the bot (<code>allowed</code>) or not (<code>cancelled</code>). </p>
<h4><a class="anchor" href="#biometry-info-received" id="biometry-info-received" name="biometry-info-received"><i class="anchor-icon"></i></a><code>biometry_info_received</code></h4>
<p>Params: a JSON object with the following fields:</p>
<ul>
@ -329,32 +329,32 @@ Note that eventual errors will not be sent as a <code>failed</code> event if the
<li><code>unknown</code> - biometrics of an unknown type</li>
</ul>
</li>
<li><code>access_requested</code> - boolean, indicates whether the app has previously requested permission to use biometrics through a <a href="/api/web-events#web-app-biometry-request-access"><code>web_app_biometry_request_access</code> event »</a></li>
<li><code>access_granted</code> - boolean, indicates whether the user has granted the app permission to use biometrics in response to a <a href="/api/web-events#web-app-biometry-request-access"><code>web_app_biometry_request_access</code> event »</a>.<br>
If false and <code>access_requested</code> is true, the user has denied the app permission to use biometrics, in which case the app should open a prompt notifying the user that the biometric settings must be changed to use biometrics, and if the user clicks on the in-app confirm button, a <a href="/api/web-events#web-app-biometry-open-settings">web_app_biometry_open_settings event »</a> must be emitted.</li>
<li><code>token_saved</code> - boolean, whether a token was safely stored on-device by a previous <a href="/api/web-events#web-app-biometry-update-token">web_app_biometry_update_token event »</a>. </li>
<li><code>access_requested</code> - boolean, indicates whether the app has previously requested permission to use biometrics through a <a href="/api/web-events#web-app-biometry-request-access"><code>web_app_biometry_request_access</code> event »</a></li>
<li><code>access_granted</code> - boolean, indicates whether the user has granted the app permission to use biometrics in response to a <a href="/api/web-events#web-app-biometry-request-access"><code>web_app_biometry_request_access</code> event »</a>.<br>
If false and <code>access_requested</code> is true, the user has denied the app permission to use biometrics, in which case the app should open a prompt notifying the user that the biometric settings must be changed to use biometrics, and if the user clicks on the in-app confirm button, a <a href="/api/web-events#web-app-biometry-open-settings">web_app_biometry_open_settings event »</a> must be emitted.</li>
<li><code>token_saved</code> - boolean, whether a token was safely stored on-device by a previous <a href="/api/web-events#web-app-biometry-update-token">web_app_biometry_update_token event »</a>. </li>
<li><code>device_id</code> - string, a unique device identifier that can be used to match the token to the device.</li>
</ul>
<p>Used by clients to reply to a <a href="/api/web-events#web-app-biometry-get-info"><code>web_app_biometry_get_info</code> event »</a> or a <a href="/api/web-events#web-app-biometry-request-access"><code>web_app_biometry_request_access</code> event »</a>. </p>
<p>Used by clients to reply to a <a href="/api/web-events#web-app-biometry-get-info"><code>web_app_biometry_get_info</code> event »</a> or a <a href="/api/web-events#web-app-biometry-request-access"><code>web_app_biometry_request_access</code> event »</a>. </p>
<h4><a class="anchor" href="#biometry-token-updated" id="biometry-token-updated" name="biometry-token-updated"><i class="anchor-icon"></i></a><code>biometry_token_updated</code></h4>
<p>Params: a JSON object with the following fields:</p>
<ul>
<li><code>status</code> - string, one of:<ul>
<li><code>updated</code> - If the token was successfully updated.</li>
<li><code>removed</code> - If the token was successfully removed.</li>
<li><code>failed</code> - If biometric authentication failed, or the app doesn't have permission to use biometrics (a <a href="#biometry-info-received">biometry_info_received event »</a> event will also be emitted if the app hasn't previously initialized the state using <a href="/api/web-events#web-app-biometry-get-info"><code>web_app_biometry_get_info</code> event »</a> or a <a href="/api/web-events#web-app-biometry-request-access"><code>web_app_biometry_request_access</code> event »</a>). </li>
<li><code>failed</code> - If biometric authentication failed, or the app doesn't have permission to use biometrics (a <a href="#biometry-info-received">biometry_info_received event »</a> event will also be emitted if the app hasn't previously initialized the state using <a href="/api/web-events#web-app-biometry-get-info"><code>web_app_biometry_get_info</code> event »</a> or a <a href="/api/web-events#web-app-biometry-request-access"><code>web_app_biometry_request_access</code> event »</a>). </li>
</ul>
</li>
</ul>
<p>Used by clients to reply to a <a href="/api/web-events#web-app-biometry-update-token"><code>web_app_biometry_update_token</code> event »</a>. </p>
<p>Used by clients to reply to a <a href="/api/web-events#web-app-biometry-update-token"><code>web_app_biometry_update_token</code> event »</a>. </p>
<h4><a class="anchor" href="#biometry-auth-requested" id="biometry-auth-requested" name="biometry-auth-requested"><i class="anchor-icon"></i></a><code>biometry_auth_requested</code></h4>
<p>Params: a JSON object with the following fields:</p>
<ul>
<li><code>status</code> - string, either <code>authorized</code> or <code>failed</code>.<br>
If <code>failed</code>, a <a href="#biometry-info-received">biometry_info_received event »</a> event will also be emitted if the app hasn't previously initialized the state using <a href="/api/web-events#web-app-biometry-get-info"><code>web_app_biometry_get_info</code> event »</a> or a <a href="/api/web-events#web-app-biometry-request-access"><code>web_app_biometry_request_access</code> event »</a>. </li>
<li><code>token</code> - optional string, set if <code>status</code> is <code>authorized</code>, contains the token previously set using the <a href="/api/web-events#web-app-biometry-update-token"><code>web_app_biometry_update_token</code> event »</a>. </li>
If <code>failed</code>, a <a href="#biometry-info-received">biometry_info_received event »</a> event will also be emitted if the app hasn't previously initialized the state using <a href="/api/web-events#web-app-biometry-get-info"><code>web_app_biometry_get_info</code> event »</a> or a <a href="/api/web-events#web-app-biometry-request-access"><code>web_app_biometry_request_access</code> event »</a>. </li>
<li><code>token</code> - optional string, set if <code>status</code> is <code>authorized</code>, contains the token previously set using the <a href="/api/web-events#web-app-biometry-update-token"><code>web_app_biometry_update_token</code> event »</a>. </li>
</ul>
<p>Used by clients to reply to a <a href="/api/web-events#web-app-biometry-request-auth"><code>web_app_biometry_request_auth</code> biometric authentication request »</a>. </p>
<p>Used by clients to reply to a <a href="/api/web-events#web-app-biometry-request-auth"><code>web_app_biometry_request_auth</code> biometric authentication request »</a>. </p>
<h4><a class="anchor" href="#custom-method-invoked" id="custom-method-invoked" name="custom-method-invoked"><i class="anchor-icon"></i></a><code>custom_method_invoked</code></h4>
<p>Params: a JSON object with the following fields:</p>
<ul>
@ -362,23 +362,23 @@ If <code>failed</code>, a <a href="#biometry-info-received">biometry_info_receiv
<li><code>result</code> - The JSON data contained in the response of the <a href="/method/bots.invokeWebViewCustomMethod">bots.invokeWebViewCustomMethod</a> method, if the method call succeeded</li>
<li><code>error</code> - The text of the RPC error, if the method call failed</li>
</ul>
<p>Used by clients to reply to <a href="/api/web-events#web-app-invoke-custom-method"><code>web_app_invoke_custom_method</code> events »</a>. </p>
<p>Used by clients to reply to <a href="/api/web-events#web-app-invoke-custom-method"><code>web_app_invoke_custom_method</code> events »</a>. </p>
<h4><a class="anchor" href="#clipboard-text-received" id="clipboard-text-received" name="clipboard-text-received"><i class="anchor-icon"></i></a><code>clipboard_text_received</code></h4>
<p>Params: a JSON object with the following fields:</p>
<ul>
<li><code>req_id</code> - The <code>req_id</code> from the <code>web_app_read_text_from_clipboard</code> request</li>
<li><code>data</code> - A string with the clipboard contents (optional, if not provided consider the request failed)</li>
</ul>
<p>Used by clients to reply to <a href="/api/web-events#web-app-read-text-from-clipboard"><code>web_app_read_text_from_clipboard</code> events »</a>. </p>
<p>Used by clients to reply to <a href="/api/web-events#web-app-read-text-from-clipboard"><code>web_app_read_text_from_clipboard</code> events »</a>. </p>
<h4><a class="anchor" href="#qr-text-received" id="qr-text-received" name="qr-text-received"><i class="anchor-icon"></i></a><code>qr_text_received</code></h4>
<p>Params: a JSON object with the following fields:</p>
<ul>
<li><code>data</code> - string with the contents of a scanned QR code.</li>
</ul>
<p>Emitted by clients if a new QR code was scanned by the native QR code scanner opened with a <a href="/api/web-events#web-app-open-scan-qr-popup"><code>web_app_open_scan_qr_popup</code> event »</a>. </p>
<p>Emitted by clients if a new QR code was scanned by the native QR code scanner opened with a <a href="/api/web-events#web-app-open-scan-qr-popup"><code>web_app_open_scan_qr_popup</code> event »</a>. </p>
<h4><a class="anchor" href="#scan-qr-popup-closed" id="scan-qr-popup-closed" name="scan-qr-popup-closed"><i class="anchor-icon"></i></a><code>scan_qr_popup_closed</code></h4>
<p>Params: <code>null</code> or an empty object</p>
<p>Emitted by clients if the QR code scanner popup opened with a <a href="/api/web-events#web-app-open-scan-qr-popup"><code>web_app_open_scan_qr_popup</code> event »</a> was closed by the user or failed to open altogether due to permission issues.</p></div>
<p>Emitted by clients if the QR code scanner popup opened with a <a href="/api/web-events#web-app-open-scan-qr-popup"><code>web_app_open_scan_qr_popup</code> event »</a> was closed by the user or failed to open altogether due to permission issues.</p></div>
</div>

View file

@ -49,7 +49,7 @@ An error is characterized by several parameters:</p>
<h4><a class="anchor" href="#error-type" id="error-type" name="error-type"><i class="anchor-icon"></i></a>Error Type</h4>
<p>A string literal in the form of <code>/[A-Z_0-9]+/</code>, which summarizes the problem. For example, <code>AUTH_KEY_UNREGISTERED</code>. This is an optional parameter.</p>
<h4><a class="anchor" href="#error-database" id="error-database" name="error-database"><i class="anchor-icon"></i></a>Error Database</h4>
<p>A full human-readable JSON list of RPC errors that can be returned by all methods in the API can be found <a href="/file/400780400409/2/eYpI8EyTOcE.133746.json/64cdd68f65de0d2dc5">here »</a>, what follows is a description of its fields: </p>
<p>A full human-readable JSON list of RPC errors that can be returned by all methods in the API can be found <a href="/file/400780400136/2/BZBIj6SH0pw.133746.json/4d0deb08c48a24e879">here »</a>, what follows is a description of its fields: </p>
<ul>
<li><code>errors</code> - All error messages and codes for each method (object).<ul>
<li>Keys: Error codes as strings (numeric strings)</li>
@ -164,7 +164,7 @@ Also note that by session we mean a logged-in session identified by an <a href="
<h4><a class="anchor" href="#error-example" id="error-example" name="error-example"><i class="anchor-icon"></i></a>Error Example:</h4>
<ul>
<li>FLOOD_WAIT_X: A wait of X seconds is required (where X is a number)</li>
<li>FLOOD_PREMIUM_WAIT_X: A wait of X seconds is required (where X is a number); the user may also purchase a <a href="/api/premium">Telegram Premium subscription</a> to remove this limitation.</li>
<li>FLOOD_PREMIUM_WAIT_X: A wait of X seconds is required (where X is a number); the user may also purchase a <a href="/api/premium">Telegram Premium subscription</a> to remove this limitation. See <a href="/api/files">here »</a> for more info on how to handle this error. </li>
</ul>
<h3><a class="anchor" href="#500-internal" id="500-internal" name="500-internal"><i class="anchor-icon"></i></a>500 INTERNAL</h3>
<p>An internal server error occurred while a request was being processed; for example, there was a disruption while accessing a database or file storage.</p>

View file

@ -102,7 +102,8 @@
<li>FLOOD_PREMIUM_WAIT_X: Indicates that upload speed is limited because the current account does not have a <a href="/api/premium">Premium</a> subscription, and that the query must be automatically repeated by the client after X seconds.<br>
When receiving this error, clients should display the <a href="/api/premium">Telegram Premium subscription modal</a>, offering the user to purchase a Premium subscription to increase upload speed <a href="/api/config#upload-premium-speedup-upload">upload_premium_speedup_upload »</a> times.<br>
Note that this modal should only be displayed if the file that is being uploaded is currently visible to the user; if it isn't, the modal should be displayed once the loading/already loaded media becomes visible.<br>
Also, this modal should only be shown <strong>at most</strong> every <a href="/api/config#upload-premium-speedup-notify-period">upload_premium_speedup_notify_period »</a>, to avoid bombarding the user with this popup for every file whose upload is slowed down. </li>
Also, this modal should only be shown <strong>at most</strong> every <a href="/api/config#upload-premium-speedup-notify-period">upload_premium_speedup_notify_period »</a>, to avoid bombarding the user with this popup for every file whose upload is slowed down.<br>
This error can only be received when the user has uploaded tens of gigabytes or more. </li>
</ul>
<p>While the parts are being uploaded, an <a href="https://en.wikipedia.org/wiki/MD5">MD5 hash</a> of the file contents can also be computed to be used later as the <strong>md5_checksum</strong> parameter in the <a href="/constructor/inputFile">inputFile</a> constructor (since it is checked only by the server, for encrypted secret chat files it must be generated from the encrypted file).<br>
After the entire file is successfully saved, the final method may be called and passed the generated <a href="/type/InputFile">inputFile</a> object. In case the <a href="/method/upload.saveBigFilePart">upload.saveBigFilePart</a> method is used, the <a href="/constructor/inputFileBig">inputFileBig</a> constructor must be passed, in other cases use <a href="/constructor/inputFile">inputFile</a>.</p>
@ -342,7 +343,8 @@ The file download operation may also return one of the following <a href="/api/e
<li>FLOOD_PREMIUM_WAIT_X: Indicates that download speed is limited because the current account does not have a <a href="/api/premium">Premium</a> subscription, and that the query must be automatically repeated by the client after X seconds.<br>
When receiving this error, clients should display the <a href="/api/premium">Telegram Premium subscription modal</a>, offering the user to purchase a Premium subscription to increase download speed <a href="/api/config#upload-premium-speedup-download">upload_premium_speedup_download »</a> times.<br>
Note that this modal should only be displayed if the file that is being downloaded is currently visible to the user; if it isn't, the modal should be displayed once the loading/already loaded media becomes visible.<br>
Also, this modal should only be shown <strong>at most</strong> every <a href="/api/config#upload-premium-speedup-notify-period">upload_premium_speedup_notify_period »</a>, to avoid bombarding the user with this popup for every file whose download is slowed down. </li>
Also, this modal should only be shown <strong>at most</strong> every <a href="/api/config#upload-premium-speedup-notify-period">upload_premium_speedup_notify_period »</a>, to avoid bombarding the user with this popup for every file whose download is slowed down.<br>
This error can only be received when the user has uploaded tens of gigabytes or more. </li>
</ul>
<h4><a class="anchor" href="#verifying-downloaded-chunks" id="verifying-downloaded-chunks" name="verifying-downloaded-chunks"><i class="anchor-icon"></i></a>Verifying downloaded chunks</h4>
<pre><code><a href='/constructor/fileHash'>fileHash</a>#f39b035c offset:<a href='/type/long'>long</a> limit:<a href='/type/int'>int</a> hash:<a href='/type/bytes'>bytes</a> = <a href='/type/FileHash'>FileHash</a>;

View file

@ -68,7 +68,7 @@
<li>Clarified <a href="/api/updates#subscribing-to-updates">which updates may be accepted from not yet logged sessions »</a>.</li>
</ul>
</li>
<li>Clarified that the <a href="/api/offsets#hash-generation">hash generation algorithm used for caching</a> uses the unsigned right shift operator and can also accept strings in the ID array. </li>
<li>Clarified that the <a href="/api/offsets#hash-generation">hash generation algorithm used for caching</a> uses the unsigned right shift operator and can also accept strings in the ID array.</li>
</ul>
<p>The following new features were added:</p>
<ul>

View file

@ -134,7 +134,7 @@ Clients should display this message, along with a sticker from the <a href="/con
<a href='/method/payments.refundStarsCharge'>payments.refundStarsCharge</a>#25ae8f4a user_id:<a href='/type/InputUser'>InputUser</a> charge_id:<a href='/type/string'>string</a> = <a href='/type/Updates'>Updates</a>;</code></pre>
<p>The full flow to follow to make purchases using Telegram Stars is described along the traditional payment flow in the <a href="/api/payments">payments documentation »</a>: all invoices and constructors working with currency amounts will use the currency code <code>XTR</code>, and the amounts will be in Telegram Stars. </p>
<h4><a class="anchor" href="#paid-media" id="paid-media" name="paid-media"><i class="anchor-icon"></i></a>Paid media</h4>
<p>Telegram Stars are used to pay for <a href="/api/paid-media">paid media</a>, which may be posted on channels by administrators as specified <a href="/api/paid-media">here »</a>. </p>
<p>Telegram Stars are used to pay for <a href="/api/paid-media">paid media</a>, which may be posted on channels by administrators as specified <a href="/api/paid-media">here »</a>. </p>
<p>Purchasing paid media will transfer Telegram Stars to the channel's balance.<br>
Channel owners can then <a href="#withdrawing-revenue">withdraw Stars as Toncoin »</a>, or <a href="#paying-for-ads">use Stars to place ads for the channel »</a>. </p>
<p><a href="#revenue-statistics">Star revenue statistics</a> and <a href="#balance-and-transaction-history">balance information</a> is also available to channel owners. </p>

View file

@ -118,7 +118,7 @@
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#bot-payments-api" id="bot-payments-api" name="bot-payments-api"><i class="anchor-icon"></i></a><a href="/bots/payments">Bot Payments API</a></h4>
<h4><a class="anchor" href="#telegram-stars" id="telegram-stars" name="telegram-stars"><i class="anchor-icon"></i></a><a href="/api/stars">Telegram Stars</a></h4>
<p>Telegram Stars are an in-app currency that allows the user to pay for digital goods and services offered by Telegram bots or Telegram channels.</p></div>
<p>Telegram Stars are virtual items that allow users to purchase digital goods and services from bots and mini apps inside the Telegram ecosystem, send gifts to content creators on the Telegram platform, and more.</p></div>
</div>

View file

@ -401,7 +401,7 @@
<h4><a class="anchor" href="#paid-media" id="paid-media" name="paid-media"><i class="anchor-icon"></i></a><a href="/api/paid-media">Paid media</a></h4>
<p>Content creators can accept <a href="/api/stars">Stars</a> by publishing <strong>paid photos or videos</strong> on their channels. Subscribers will be allowed to view such posts only after paying the author to unlock them.</p>
<h4><a class="anchor" href="#telegram-stars" id="telegram-stars" name="telegram-stars"><i class="anchor-icon"></i></a><a href="/api/stars">Telegram Stars</a></h4>
<p>Telegram Stars are an in-app currency that allows the user to pay for digital goods and services offered by Telegram bots or Telegram channels.</p>
<p>Telegram Stars are virtual items that allow users to purchase digital goods and services from bots and mini apps inside the Telegram ecosystem, send gifts to content creators on the Telegram platform, and more.</p>
<h4><a class="anchor" href="#admin-banned-default-rights" id="admin-banned-default-rights" name="admin-banned-default-rights"><i class="anchor-icon"></i></a><a href="/api/rights">Admin, banned, default rights</a></h4>
<p>How to handle admin permissions, granular bans and global permissions in channels, groups and supergroups.</p>
<h4><a class="anchor" href="#channels-supergroups-gigagroups-and-basic-groups" id="channels-supergroups-gigagroups-and-basic-groups" name="channels-supergroups-gigagroups-and-basic-groups"><i class="anchor-icon"></i></a><a href="/api/channel">Channels, supergroups, gigagroups and basic groups</a></h4>

View file

@ -81,7 +81,7 @@
<h4><a class="anchor" href="#inputstorepaymentstarsgift" id="inputstorepaymentstarsgift" name="inputstorepaymentstarsgift"><i class="anchor-icon"></i></a><a href="/constructor/inputStorePaymentStarsGift">inputStorePaymentStarsGift</a></h4>
<p>Used to gift <a href="/api/stars">Telegram Stars</a> to a friend.</p>
<h4><a class="anchor" href="#telegram-stars" id="telegram-stars" name="telegram-stars"><i class="anchor-icon"></i></a><a href="/api/stars">Telegram Stars</a></h4>
<p>Telegram Stars are an in-app currency that allows the user to pay for digital goods and services offered by Telegram bots or Telegram channels.</p></div>
<p>Telegram Stars are virtual items that allow users to purchase digital goods and services from bots and mini apps inside the Telegram ecosystem, send gifts to content creators on the Telegram platform, and more.</p></div>
</div>

View file

@ -82,7 +82,7 @@
<p><a href="/type/InputMedia">InputMedia</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#telegram-stars" id="telegram-stars" name="telegram-stars"><i class="anchor-icon"></i></a><a href="/api/stars">Telegram Stars</a></h4>
<p>Telegram Stars are an in-app currency that allows the user to pay for digital goods and services offered by Telegram bots or Telegram channels.</p>
<p>Telegram Stars are virtual items that allow users to purchase digital goods and services from bots and mini apps inside the Telegram ecosystem, send gifts to content creators on the Telegram platform, and more.</p>
<h4><a class="anchor" href="#paid-media" id="paid-media" name="paid-media"><i class="anchor-icon"></i></a><a href="/api/paid-media">Paid media</a></h4>
<p>Content creators can accept <a href="/api/stars">Stars</a> by publishing <strong>paid photos or videos</strong> on their channels. Subscribers will be allowed to view such posts only after paying the author to unlock them.</p></div>

View file

@ -93,7 +93,7 @@
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#bot-payments-api" id="bot-payments-api" name="bot-payments-api"><i class="anchor-icon"></i></a><a href="/bots/payments">Bot Payments API</a></h4>
<h4><a class="anchor" href="#telegram-stars" id="telegram-stars" name="telegram-stars"><i class="anchor-icon"></i></a><a href="/api/stars">Telegram Stars</a></h4>
<p>Telegram Stars are an in-app currency that allows the user to pay for digital goods and services offered by Telegram bots or Telegram channels.</p></div>
<p>Telegram Stars are virtual items that allow users to purchase digital goods and services from bots and mini apps inside the Telegram ecosystem, send gifts to content creators on the Telegram platform, and more.</p></div>
</div>

View file

@ -148,7 +148,7 @@
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#bot-payments-api" id="bot-payments-api" name="bot-payments-api"><i class="anchor-icon"></i></a><a href="/bots/payments">Bot Payments API</a></h4>
<h4><a class="anchor" href="#telegram-stars" id="telegram-stars" name="telegram-stars"><i class="anchor-icon"></i></a><a href="/api/stars">Telegram Stars</a></h4>
<p>Telegram Stars are an in-app currency that allows the user to pay for digital goods and services offered by Telegram bots or Telegram channels.</p></div>
<p>Telegram Stars are virtual items that allow users to purchase digital goods and services from bots and mini apps inside the Telegram ecosystem, send gifts to content creators on the Telegram platform, and more.</p></div>
</div>

View file

@ -108,7 +108,7 @@
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#bot-payments-api" id="bot-payments-api" name="bot-payments-api"><i class="anchor-icon"></i></a><a href="/bots/payments">Bot Payments API</a></h4>
<h4><a class="anchor" href="#telegram-stars" id="telegram-stars" name="telegram-stars"><i class="anchor-icon"></i></a><a href="/api/stars">Telegram Stars</a></h4>
<p>Telegram Stars are an in-app currency that allows the user to pay for digital goods and services offered by Telegram bots or Telegram channels.</p></div>
<p>Telegram Stars are virtual items that allow users to purchase digital goods and services from bots and mini apps inside the Telegram ecosystem, send gifts to content creators on the Telegram platform, and more.</p></div>
</div>

View file

@ -103,7 +103,7 @@
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#bot-payments-api" id="bot-payments-api" name="bot-payments-api"><i class="anchor-icon"></i></a><a href="/bots/payments">Bot Payments API</a></h4>
<h4><a class="anchor" href="#telegram-stars" id="telegram-stars" name="telegram-stars"><i class="anchor-icon"></i></a><a href="/api/stars">Telegram Stars</a></h4>
<p>Telegram Stars are an in-app currency that allows the user to pay for digital goods and services offered by Telegram bots or Telegram channels.</p>
<p>Telegram Stars are virtual items that allow users to purchase digital goods and services from bots and mini apps inside the Telegram ecosystem, send gifts to content creators on the Telegram platform, and more.</p>
<h4><a class="anchor" href="#deep-links" id="deep-links" name="deep-links"><i class="anchor-icon"></i></a><a href="/api/links">Deep links</a></h4>
<p>Telegram clients must handle special tg:// and t.me deep links encountered in messages, link entities and in other apps by registering OS handlers.</p>
<h4><a class="anchor" href="#client-configuration" id="client-configuration" name="client-configuration"><i class="anchor-icon"></i></a><a href="/api/config">Client configuration</a></h4>

View file

@ -112,7 +112,7 @@
<p><a href="/type/payments.PaymentForm">payments.PaymentForm</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#telegram-stars" id="telegram-stars" name="telegram-stars"><i class="anchor-icon"></i></a><a href="/api/stars">Telegram Stars</a></h4>
<p>Telegram Stars are an in-app currency that allows the user to pay for digital goods and services offered by Telegram bots or Telegram channels.</p></div>
<p>Telegram Stars are virtual items that allow users to purchase digital goods and services from bots and mini apps inside the Telegram ecosystem, send gifts to content creators on the Telegram platform, and more.</p></div>
</div>

View file

@ -127,7 +127,7 @@
<p><a href="/type/payments.PaymentReceipt">payments.PaymentReceipt</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#telegram-stars" id="telegram-stars" name="telegram-stars"><i class="anchor-icon"></i></a><a href="/api/stars">Telegram Stars</a></h4>
<p>Telegram Stars are an in-app currency that allows the user to pay for digital goods and services offered by Telegram bots or Telegram channels.</p></div>
<p>Telegram Stars are virtual items that allow users to purchase digital goods and services from bots and mini apps inside the Telegram ecosystem, send gifts to content creators on the Telegram platform, and more.</p></div>
</div>

View file

@ -77,7 +77,7 @@
<p><a href="/type/payments.StarsRevenueAdsAccountUrl">payments.StarsRevenueAdsAccountUrl</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#telegram-stars" id="telegram-stars" name="telegram-stars"><i class="anchor-icon"></i></a><a href="/api/stars">Telegram Stars</a></h4>
<p>Telegram Stars are an in-app currency that allows the user to pay for digital goods and services offered by Telegram bots or Telegram channels.</p></div>
<p>Telegram Stars are virtual items that allow users to purchase digital goods and services from bots and mini apps inside the Telegram ecosystem, send gifts to content creators on the Telegram platform, and more.</p></div>
</div>

View file

@ -88,7 +88,7 @@
<p><a href="/type/payments.StarsRevenueStats">payments.StarsRevenueStats</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#telegram-stars" id="telegram-stars" name="telegram-stars"><i class="anchor-icon"></i></a><a href="/api/stars">Telegram Stars</a></h4>
<p>Telegram Stars are an in-app currency that allows the user to pay for digital goods and services offered by Telegram bots or Telegram channels.</p></div>
<p>Telegram Stars are virtual items that allow users to purchase digital goods and services from bots and mini apps inside the Telegram ecosystem, send gifts to content creators on the Telegram platform, and more.</p></div>
</div>

View file

@ -77,7 +77,7 @@
<p><a href="/type/payments.StarsRevenueWithdrawalUrl">payments.StarsRevenueWithdrawalUrl</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#telegram-stars" id="telegram-stars" name="telegram-stars"><i class="anchor-icon"></i></a><a href="/api/stars">Telegram Stars</a></h4>
<p>Telegram Stars are an in-app currency that allows the user to pay for digital goods and services offered by Telegram bots or Telegram channels.</p></div>
<p>Telegram Stars are virtual items that allow users to purchase digital goods and services from bots and mini apps inside the Telegram ecosystem, send gifts to content creators on the Telegram platform, and more.</p></div>
</div>

View file

@ -105,7 +105,7 @@
<p>Fetch <a href="/api/stars#balance-and-transaction-history">Telegram Stars transactions</a>.</p>
<p>The <code>inbound</code> and <code>outbound</code> flags are mutually exclusive: if none of the two are set, both incoming and outgoing transactions are fetched.</p>
<h4><a class="anchor" href="#telegram-stars" id="telegram-stars" name="telegram-stars"><i class="anchor-icon"></i></a><a href="/api/stars">Telegram Stars</a></h4>
<p>Telegram Stars are an in-app currency that allows the user to pay for digital goods and services offered by Telegram bots or Telegram channels.</p></div>
<p>Telegram Stars are virtual items that allow users to purchase digital goods and services from bots and mini apps inside the Telegram ecosystem, send gifts to content creators on the Telegram platform, and more.</p></div>
</div>

View file

@ -103,7 +103,7 @@
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#bot-payments-api" id="bot-payments-api" name="bot-payments-api"><i class="anchor-icon"></i></a><a href="/bots/payments">Bot Payments API</a></h4>
<h4><a class="anchor" href="#telegram-stars" id="telegram-stars" name="telegram-stars"><i class="anchor-icon"></i></a><a href="/api/stars">Telegram Stars</a></h4>
<p>Telegram Stars are an in-app currency that allows the user to pay for digital goods and services offered by Telegram bots or Telegram channels.</p></div>
<p>Telegram Stars are virtual items that allow users to purchase digital goods and services from bots and mini apps inside the Telegram ecosystem, send gifts to content creators on the Telegram platform, and more.</p></div>
</div>

View file

@ -102,7 +102,7 @@
<p><a href="/type/StarsRevenueStatus">StarsRevenueStatus</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#telegram-stars" id="telegram-stars" name="telegram-stars"><i class="anchor-icon"></i></a><a href="/api/stars">Telegram Stars</a></h4>
<p>Telegram Stars are an in-app currency that allows the user to pay for digital goods and services offered by Telegram bots or Telegram channels.</p></div>
<p>Telegram Stars are virtual items that allow users to purchase digital goods and services from bots and mini apps inside the Telegram ecosystem, send gifts to content creators on the Telegram platform, and more.</p></div>
</div>

View file

@ -103,7 +103,7 @@
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#bot-payments-api" id="bot-payments-api" name="bot-payments-api"><i class="anchor-icon"></i></a><a href="/bots/payments">Bot Payments API</a></h4>
<h4><a class="anchor" href="#telegram-stars" id="telegram-stars" name="telegram-stars"><i class="anchor-icon"></i></a><a href="/api/stars">Telegram Stars</a></h4>
<p>Telegram Stars are an in-app currency that allows the user to pay for digital goods and services offered by Telegram bots or Telegram channels.</p></div>
<p>Telegram Stars are virtual items that allow users to purchase digital goods and services from bots and mini apps inside the Telegram ecosystem, send gifts to content creators on the Telegram platform, and more.</p></div>
</div>

View file

@ -163,7 +163,7 @@
<h4><a class="anchor" href="#paid-media" id="paid-media" name="paid-media"><i class="anchor-icon"></i></a><a href="/api/paid-media">Paid media</a></h4>
<p>Content creators can accept <a href="/api/stars">Stars</a> by publishing <strong>paid photos or videos</strong> on their channels. Subscribers will be allowed to view such posts only after paying the author to unlock them.</p>
<h4><a class="anchor" href="#telegram-stars" id="telegram-stars" name="telegram-stars"><i class="anchor-icon"></i></a><a href="/api/stars">Telegram Stars</a></h4>
<p>Telegram Stars are an in-app currency that allows the user to pay for digital goods and services offered by Telegram bots or Telegram channels.</p></div>
<p>Telegram Stars are virtual items that allow users to purchase digital goods and services from bots and mini apps inside the Telegram ecosystem, send gifts to content creators on the Telegram platform, and more.</p></div>
</div>

View file

@ -77,7 +77,7 @@
<p><a href="/type/StarsTransactionPeer">StarsTransactionPeer</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#telegram-stars" id="telegram-stars" name="telegram-stars"><i class="anchor-icon"></i></a><a href="/api/stars">Telegram Stars</a></h4>
<p>Telegram Stars are an in-app currency that allows the user to pay for digital goods and services offered by Telegram bots or Telegram channels.</p></div>
<p>Telegram Stars are virtual items that allow users to purchase digital goods and services from bots and mini apps inside the Telegram ecosystem, send gifts to content creators on the Telegram platform, and more.</p></div>
</div>

View file

@ -62,7 +62,7 @@
<p><a href="/type/StarsTransactionPeer">StarsTransactionPeer</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#telegram-stars" id="telegram-stars" name="telegram-stars"><i class="anchor-icon"></i></a><a href="/api/stars">Telegram Stars</a></h4>
<p>Telegram Stars are an in-app currency that allows the user to pay for digital goods and services offered by Telegram bots or Telegram channels.</p></div>
<p>Telegram Stars are virtual items that allow users to purchase digital goods and services from bots and mini apps inside the Telegram ecosystem, send gifts to content creators on the Telegram platform, and more.</p></div>
</div>

View file

@ -62,7 +62,7 @@
<p><a href="/type/StarsTransactionPeer">StarsTransactionPeer</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#telegram-stars" id="telegram-stars" name="telegram-stars"><i class="anchor-icon"></i></a><a href="/api/stars">Telegram Stars</a></h4>
<p>Telegram Stars are an in-app currency that allows the user to pay for digital goods and services offered by Telegram bots or Telegram channels.</p></div>
<p>Telegram Stars are virtual items that allow users to purchase digital goods and services from bots and mini apps inside the Telegram ecosystem, send gifts to content creators on the Telegram platform, and more.</p></div>
</div>

View file

@ -62,7 +62,7 @@
<p><a href="/type/StarsTransactionPeer">StarsTransactionPeer</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#telegram-stars" id="telegram-stars" name="telegram-stars"><i class="anchor-icon"></i></a><a href="/api/stars">Telegram Stars</a></h4>
<p>Telegram Stars are an in-app currency that allows the user to pay for digital goods and services offered by Telegram bots or Telegram channels.</p></div>
<p>Telegram Stars are virtual items that allow users to purchase digital goods and services from bots and mini apps inside the Telegram ecosystem, send gifts to content creators on the Telegram platform, and more.</p></div>
</div>

View file

@ -62,7 +62,7 @@
<p><a href="/type/StarsTransactionPeer">StarsTransactionPeer</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#telegram-stars" id="telegram-stars" name="telegram-stars"><i class="anchor-icon"></i></a><a href="/api/stars">Telegram Stars</a></h4>
<p>Telegram Stars are an in-app currency that allows the user to pay for digital goods and services offered by Telegram bots or Telegram channels.</p>
<p>Telegram Stars are virtual items that allow users to purchase digital goods and services from bots and mini apps inside the Telegram ecosystem, send gifts to content creators on the Telegram platform, and more.</p>
<h4><a class="anchor" href="#inputinvoicestars" id="inputinvoicestars" name="inputinvoicestars"><i class="anchor-icon"></i></a><a href="/constructor/inputInvoiceStars">inputInvoiceStars</a></h4>
<p>Used to top up the <a href="/api/stars">Telegram Stars</a> balance of the current account or someone else's account.</p></div>

View file

@ -113,7 +113,7 @@
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#bot-payments-api" id="bot-payments-api" name="bot-payments-api"><i class="anchor-icon"></i></a><a href="/bots/payments">Bot Payments API</a></h4>
<h4><a class="anchor" href="#telegram-stars" id="telegram-stars" name="telegram-stars"><i class="anchor-icon"></i></a><a href="/api/stars">Telegram Stars</a></h4>
<p>Telegram Stars are an in-app currency that allows the user to pay for digital goods and services offered by Telegram bots or Telegram channels.</p></div>
<p>Telegram Stars are virtual items that allow users to purchase digital goods and services from bots and mini apps inside the Telegram ecosystem, send gifts to content creators on the Telegram platform, and more.</p></div>
</div>

View file

@ -77,7 +77,7 @@
<p><a href="/type/Update">Update</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#telegram-stars" id="telegram-stars" name="telegram-stars"><i class="anchor-icon"></i></a><a href="/api/stars">Telegram Stars</a></h4>
<p>Telegram Stars are an in-app currency that allows the user to pay for digital goods and services offered by Telegram bots or Telegram channels.</p></div>
<p>Telegram Stars are virtual items that allow users to purchase digital goods and services from bots and mini apps inside the Telegram ecosystem, send gifts to content creators on the Telegram platform, and more.</p></div>
</div>

View file

@ -82,7 +82,7 @@
<p><a href="/type/Update">Update</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#telegram-stars" id="telegram-stars" name="telegram-stars"><i class="anchor-icon"></i></a><a href="/api/stars">Telegram Stars</a></h4>
<p>Telegram Stars are an in-app currency that allows the user to pay for digital goods and services offered by Telegram bots or Telegram channels.</p></div>
<p>Telegram Stars are virtual items that allow users to purchase digital goods and services from bots and mini apps inside the Telegram ecosystem, send gifts to content creators on the Telegram platform, and more.</p></div>
</div>

View file

@ -211,7 +211,7 @@
<tr>
<td>400</td>
<td>ENTITY_BOUNDS_INVALID</td>
<td>A specified <a href="/api/entities#entity-length">entity offset or length</a> is invalid, see <a href="/api/entities#entity-length">here »</a> for info on how to properly compute the entity offset/length.</td>
<td>A specified <a href="/api/entities#entity-length">entity offset or length</a> is invalid, see <a href="/api/entities#entity-length">here »</a> for info on how to properly compute the entity offset/length.</td>
</tr>
<tr>
<td>400</td>

View file

@ -96,7 +96,7 @@
</table>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#telegram-stars" id="telegram-stars" name="telegram-stars"><i class="anchor-icon"></i></a><a href="/api/stars">Telegram Stars</a></h4>
<p>Telegram Stars are an in-app currency that allows the user to pay for digital goods and services offered by Telegram bots or Telegram channels.</p></div>
<p>Telegram Stars are virtual items that allow users to purchase digital goods and services from bots and mini apps inside the Telegram ecosystem, send gifts to content creators on the Telegram platform, and more.</p></div>
</div>

View file

@ -108,7 +108,7 @@
<h4><a class="anchor" href="#inputpeerself" id="inputpeerself" name="inputpeerself"><i class="anchor-icon"></i></a><a href="/constructor/inputPeerSelf">inputPeerSelf</a></h4>
<p>Defines the current user.</p>
<h4><a class="anchor" href="#telegram-stars" id="telegram-stars" name="telegram-stars"><i class="anchor-icon"></i></a><a href="/api/stars">Telegram Stars</a></h4>
<p>Telegram Stars are an in-app currency that allows the user to pay for digital goods and services offered by Telegram bots or Telegram channels.</p></div>
<p>Telegram Stars are virtual items that allow users to purchase digital goods and services from bots and mini apps inside the Telegram ecosystem, send gifts to content creators on the Telegram platform, and more.</p></div>
</div>

View file

@ -118,7 +118,7 @@
<h4><a class="anchor" href="#two-factor-authentication" id="two-factor-authentication" name="two-factor-authentication"><i class="anchor-icon"></i></a><a href="/api/srp">Two-factor authentication</a></h4>
<p>How to login to a user's account if they have enabled 2FA, how to change password.</p>
<h4><a class="anchor" href="#telegram-stars" id="telegram-stars" name="telegram-stars"><i class="anchor-icon"></i></a><a href="/api/stars">Telegram Stars</a></h4>
<p>Telegram Stars are an in-app currency that allows the user to pay for digital goods and services offered by Telegram bots or Telegram channels.</p></div>
<p>Telegram Stars are virtual items that allow users to purchase digital goods and services from bots and mini apps inside the Telegram ecosystem, send gifts to content creators on the Telegram platform, and more.</p></div>
</div>

View file

@ -96,7 +96,7 @@
</table>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#telegram-stars" id="telegram-stars" name="telegram-stars"><i class="anchor-icon"></i></a><a href="/api/stars">Telegram Stars</a></h4>
<p>Telegram Stars are an in-app currency that allows the user to pay for digital goods and services offered by Telegram bots or Telegram channels.</p>
<p>Telegram Stars are virtual items that allow users to purchase digital goods and services from bots and mini apps inside the Telegram ecosystem, send gifts to content creators on the Telegram platform, and more.</p>
<h4><a class="anchor" href="#inputpeerself" id="inputpeerself" name="inputpeerself"><i class="anchor-icon"></i></a><a href="/constructor/inputPeerSelf">inputPeerSelf</a></h4>
<p>Defines the current user.</p></div>

View file

@ -137,7 +137,7 @@
<h4><a class="anchor" href="#pagination-in-the-api" id="pagination-in-the-api" name="pagination-in-the-api"><i class="anchor-icon"></i></a><a href="/api/offsets">Pagination in the API</a></h4>
<p>How to fetch results from large lists of objects.</p>
<h4><a class="anchor" href="#telegram-stars" id="telegram-stars" name="telegram-stars"><i class="anchor-icon"></i></a><a href="/api/stars">Telegram Stars</a></h4>
<p>Telegram Stars are an in-app currency that allows the user to pay for digital goods and services offered by Telegram bots or Telegram channels.</p></div>
<p>Telegram Stars are virtual items that allow users to purchase digital goods and services from bots and mini apps inside the Telegram ecosystem, send gifts to content creators on the Telegram platform, and more.</p></div>
</div>

View file

@ -118,7 +118,7 @@
<h3><a class="anchor" href="#bots-can-use-this-method" id="bots-can-use-this-method" name="bots-can-use-this-method"><i class="anchor-icon"></i></a>Bots can use this method</h3>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#telegram-stars" id="telegram-stars" name="telegram-stars"><i class="anchor-icon"></i></a><a href="/api/stars">Telegram Stars</a></h4>
<p>Telegram Stars are an in-app currency that allows the user to pay for digital goods and services offered by Telegram bots or Telegram channels.</p>
<p>Telegram Stars are virtual items that allow users to purchase digital goods and services from bots and mini apps inside the Telegram ecosystem, send gifts to content creators on the Telegram platform, and more.</p>
<h4><a class="anchor" href="#payments-api" id="payments-api" name="payments-api"><i class="anchor-icon"></i></a><a href="/api/payments">Payments API</a></h4>
<p>You can accept payments from Telegram users via Telegram Bots.</p></div>

View file

@ -94,7 +94,7 @@ Then, payloads are wrapped in the following envelope:</p>
<li>Length: payload length, divided by four, and encoded as 3 length bytes (little endian)</li>
<li>Payload: the MTProto payload</li>
</ul>
<p><a href="#quick-ack">Quick ACK »</a> may be enabled for this transport. </p>
<p><a href="#quick-ack">Quick ACK »</a> may be enabled for this transport. </p>
<p>To request a quick ACK from the server for an encrypted MTProto payload, use the following envelope for <em>outgoing</em> messages, instead of the one specified above.</p>
<p>If the packet length divided by four is smaller than 127:</p>
<ul>
@ -129,7 +129,7 @@ Then, payloads are wrapped in the following envelope:</p>
<li>Length: payload length encoded as 4 length bytes (little endian)</li>
<li>Payload: the MTProto payload</li>
</ul>
<p><a href="#quick-ack">Quick ACK »</a> may be enabled for this transport. </p>
<p><a href="#quick-ack">Quick ACK »</a> may be enabled for this transport. </p>
<p>To request a quick ACK from the server for an encrypted MTProto payload, add <code>0x80000000</code> to the <code>len</code> field before encoding it (equivalent to doing <code>len = len | (1 &lt;&lt; 31)</code>, i.e. set the most-significant bit of the length). </p>
<p>The server will send quick ACK tokens as a standalone 4-byte packet without a length header.</p>
<pre><code>+----+
@ -154,7 +154,7 @@ Then, payloads are wrapped in the following envelope:</p>
<li>Payload: the MTProto payload</li>
<li>Padding: A random padding string of length <code>0-15</code></li>
</ul>
<p><a href="#quick-ack">Quick ACK »</a> may be enabled for this transport. </p>
<p><a href="#quick-ack">Quick ACK »</a> may be enabled for this transport. </p>
<p>To request a quick ACK from the server for an encrypted MTProto payload, add <code>0x80000000</code> to the <code>len</code> field before encoding it (equivalent to doing <code>len = len | (1 &lt;&lt; 31)</code>, i.e. set the most-significant bit of the length). </p>
<p>The server will send quick ACK tokens as a standalone 8 to 16-byte packet (excluding the length of the packet itself, encoded as usual), containing a 4-byte header with all bits set, followed by the ACK token (<code>abcd</code>), followed by 0 to 8 random padding bytes.</p>
<pre><code>+----+----+----+----...----+
@ -215,7 +215,7 @@ The encoding simply consists of the DC ID in two-byte signed little-endian form;
<p>Two keys are extracted from both initialization payloads, using bytes at offsets <code>8-40</code>: the key extracted from the primary payload is used as encryption key, the key extracted from the secondary payload is used as decryption key.</p>
<p>Two IVs are extracted from both initialization payloads, using bytes at offsets <code>40-56</code>: the IV extracted from the primary payload is used as encryption IV, the IV extracted from the secondary payload is used as decryption IV.</p>
<p><strong>Only if using MTProxy</strong>, the secret is used to provide connection with the MTProxy server.
The secret is a 16-byte string, usually distributed in its hexadecimal form along with the MTProxy host and port in <a href="/api/links#mtproxy-links">proxy deep links »</a>.</p>
The secret is a 16-byte string, usually distributed in its hexadecimal form along with the MTProxy host and port in <a href="/api/links#mtproxy-links">proxy deep links »</a>.</p>
<p>Often, a 17-byte version of the secret can be found: this simply indicates that the client should use a specific MTProto transport (based on the first byte, usually it's <code>0xdd</code>, to indicate that the padded intermediate protocol should be used <code>0xdddddddd</code>; however, clients should default to the padded intermediate transport whenever an additional byte in the secret is encountered).</p>
<p>The extracted encryption and decryption keys must be concatenated with the secret (the first byte of which should be ignored if it's the 17-byte version), and the SHA256 hash of such string should be used as encryption/decryption key.</p>
<p>The obtained encryption and decryption key/IV pairs must then be used with <strong>AES-256-CTR</strong> to encrypt and decrypt all outgoing and incoming payloads.<br>

View file

@ -133,7 +133,7 @@ Schema: </p>
</ul>
</li>
</ul>
<p>Subsequently, <a href="#passport-secret-decryption">the client receives the encrypted <em>passport_secret</em> from the server and decrypts it after the user enters their password »</a>.</p>
<p>Subsequently, <a href="#passport-secret-decryption">the client receives the encrypted <em>passport_secret</em> from the server and decrypts it after the user enters their password »</a>.</p>
<p>In case the password is changed or a more secure algorithm is introduced in an update of the API, the client re-encrypts the <em>passport_secret</em> using the new password.
If the password is disabled, all Telegram Passport data is lost.</p>
<h4><a class="anchor" href="#passport-secret-decryption" id="passport-secret-decryption" name="passport-secret-decryption"><i class="anchor-icon"></i></a>Passport Secret Decryption</h4>
@ -308,7 +308,7 @@ Data must be in JSON format and not TL, as it has to be passed directly to the s
---functions---
<a href='/method/upload.saveFilePart'>upload.saveFilePart</a>#b304a621 file_id:<a href='/type/long'>long</a> file_part:<a href='/type/int'>int</a> bytes:<a href='/type/bytes'>bytes</a> = <a href='/type/Bool'>Bool</a>;</code></pre>
<p>Files (JPG format, max. 10 MB) are encrypted and padded (<a href="#encryption">see Encryption</a>), and then uploaded chunk by chunk as described in <a href="/api/files">files »</a>, except that instead of generating an <a href="/constructor/inputFile">inputFile</a>, an <a href="/constructor/inputSecureFile">inputSecureFile</a> should be generated, instead.</p>
<p>Files (JPG format, max. 10 MB) are encrypted and padded (<a href="#encryption">see Encryption</a>), and then uploaded chunk by chunk as described in <a href="/api/files">files »</a>, except that instead of generating an <a href="/constructor/inputFile">inputFile</a>, an <a href="/constructor/inputSecureFile">inputSecureFile</a> should be generated, instead.</p>
<ul>
<li>As for secret chat files, the <code>md5_checksum</code> is to be set to the MD5 hash of the <em>encrypted</em> file, for a server-side integrity check.</li>
<li>The <code>file_hash</code> field should be set to the <em>data_hash</em> of the data.</li>

View file

@ -73,7 +73,7 @@
</table>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#telegram-stars" id="telegram-stars" name="telegram-stars"><i class="anchor-icon"></i></a><a href="/api/stars">Telegram Stars</a></h4>
<p>Telegram Stars are an in-app currency that allows the user to pay for digital goods and services offered by Telegram bots or Telegram channels.</p></div>
<p>Telegram Stars are virtual items that allow users to purchase digital goods and services from bots and mini apps inside the Telegram ecosystem, send gifts to content creators on the Telegram platform, and more.</p></div>
</div>

View file

@ -73,7 +73,7 @@
</table>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#telegram-stars" id="telegram-stars" name="telegram-stars"><i class="anchor-icon"></i></a><a href="/api/stars">Telegram Stars</a></h4>
<p>Telegram Stars are an in-app currency that allows the user to pay for digital goods and services offered by Telegram bots or Telegram channels.</p></div>
<p>Telegram Stars are virtual items that allow users to purchase digital goods and services from bots and mini apps inside the Telegram ecosystem, send gifts to content creators on the Telegram platform, and more.</p></div>
</div>

View file

@ -73,7 +73,7 @@
</table>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#telegram-stars" id="telegram-stars" name="telegram-stars"><i class="anchor-icon"></i></a><a href="/api/stars">Telegram Stars</a></h4>
<p>Telegram Stars are an in-app currency that allows the user to pay for digital goods and services offered by Telegram bots or Telegram channels.</p></div>
<p>Telegram Stars are virtual items that allow users to purchase digital goods and services from bots and mini apps inside the Telegram ecosystem, send gifts to content creators on the Telegram platform, and more.</p></div>
</div>

View file

@ -103,7 +103,7 @@
</table>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#telegram-stars" id="telegram-stars" name="telegram-stars"><i class="anchor-icon"></i></a><a href="/api/stars">Telegram Stars</a></h4>
<p>Telegram Stars are an in-app currency that allows the user to pay for digital goods and services offered by Telegram bots or Telegram channels.</p></div>
<p>Telegram Stars are virtual items that allow users to purchase digital goods and services from bots and mini apps inside the Telegram ecosystem, send gifts to content creators on the Telegram platform, and more.</p></div>
</div>

View file

@ -92,7 +92,7 @@
</table>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#telegram-stars" id="telegram-stars" name="telegram-stars"><i class="anchor-icon"></i></a><a href="/api/stars">Telegram Stars</a></h4>
<p>Telegram Stars are an in-app currency that allows the user to pay for digital goods and services offered by Telegram bots or Telegram channels.</p></div>
<p>Telegram Stars are virtual items that allow users to purchase digital goods and services from bots and mini apps inside the Telegram ecosystem, send gifts to content creators on the Telegram platform, and more.</p></div>
</div>

View file

@ -93,7 +93,7 @@
</table>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#telegram-stars" id="telegram-stars" name="telegram-stars"><i class="anchor-icon"></i></a><a href="/api/stars">Telegram Stars</a></h4>
<p>Telegram Stars are an in-app currency that allows the user to pay for digital goods and services offered by Telegram bots or Telegram channels.</p></div>
<p>Telegram Stars are virtual items that allow users to purchase digital goods and services from bots and mini apps inside the Telegram ecosystem, send gifts to content creators on the Telegram platform, and more.</p></div>
</div>

View file

@ -92,7 +92,7 @@
</table>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#telegram-stars" id="telegram-stars" name="telegram-stars"><i class="anchor-icon"></i></a><a href="/api/stars">Telegram Stars</a></h4>
<p>Telegram Stars are an in-app currency that allows the user to pay for digital goods and services offered by Telegram bots or Telegram channels.</p></div>
<p>Telegram Stars are virtual items that allow users to purchase digital goods and services from bots and mini apps inside the Telegram ecosystem, send gifts to content creators on the Telegram platform, and more.</p></div>
</div>