mirror of
https://github.com/MarshalX/telegram-crawler.git
synced 2024-12-28 07:20:31 +01:00
Update content of files
This commit is contained in:
parent
73e0d739f6
commit
f96d8ca577
88 changed files with 600 additions and 532 deletions
|
@ -136,15 +136,15 @@
|
|||
<p>Users can interact with your bot via <strong>inline queries</strong>, straight from the <strong>text input field</strong> in <strong>any</strong> chat. </p>
|
||||
<h4><a class="anchor" href="#games" id="games" name="games"><i class="anchor-icon"></i></a><a href="/api/bots/games">Games</a></h4>
|
||||
<p>Bots can offer users HTML5 games to play solo or to compete against each other in groups and one-on-one chats; how to work with games in the MTProto API.</p>
|
||||
<h4><a class="anchor" href="#web-apps" id="web-apps" name="web-apps"><i class="anchor-icon"></i></a><a href="/api/bots/webapps">Web apps</a></h4>
|
||||
<p>Bots can offer users interactive <a href="/bots/webapps">HTML5 web apps</a> to completely replace <strong>any website</strong>. </p>
|
||||
<h4><a class="anchor" href="#mini-apps" id="mini-apps" name="mini-apps"><i class="anchor-icon"></i></a><a href="/api/bots/webapps">Mini apps</a></h4>
|
||||
<p>Bots can offer users interactive <a href="/bots/webapps">HTML5 mini apps</a> to completely replace <strong>any website</strong>. </p>
|
||||
<h4><a class="anchor" href="#attachment-menu" id="attachment-menu" name="attachment-menu"><i class="anchor-icon"></i></a><a href="/api/bots/attach">Attachment menu</a></h4>
|
||||
<p>Bots can install attachment menu entries, offering conveniently accessible, versatile web apps.</p>
|
||||
<p>Bots can install attachment menu entries, offering conveniently accessible, versatile mini apps.</p>
|
||||
<h4><a class="anchor" href="#stories" id="stories" name="stories"><i class="anchor-icon"></i></a><a href="/api/stories">Stories</a></h4>
|
||||
<p>Telegram users and channels can easily post and view <a href="https://telegram.org/blog/stories">stories</a> through the API.</p>
|
||||
<h4><a class="anchor" href="#privacy-settings" id="privacy-settings" name="privacy-settings"><i class="anchor-icon"></i></a><a href="/api/privacy">Privacy settings</a></h4>
|
||||
<p>Telegram allows users to specify granular privacy settings, choosing which users can or can't interact with them in certain ways.</p>
|
||||
<h4><a class="anchor" href="#search--filters" id="search--filters" name="search--filters"><i class="anchor-icon"></i></a><a href="/api/search">Search & filters</a></h4>
|
||||
<h4><a class="anchor" href="#search-amp-filters" id="search-amp-filters" name="search-amp-filters"><i class="anchor-icon"></i></a><a href="/api/search">Search & filters</a></h4>
|
||||
<p>Telegram allows applying detailed message filters while looking for messages in chats.
|
||||
This allows the server to filter messages based on a text query, and even on their type, and this feature is often used by graphical clients to implement features like the chat gallery, chat profile pictures and more.</p>
|
||||
<h4><a class="anchor" href="#polls" id="polls" name="polls"><i class="anchor-icon"></i></a><a href="/api/poll">Polls</a></h4>
|
||||
|
@ -221,7 +221,7 @@ This allows the server to filter messages based on a text query, and even on the
|
|||
<p>Working with contacts in the API.</p>
|
||||
<h3><a class="anchor" href="#blocklist" id="blocklist" name="blocklist"><i class="anchor-icon"></i></a><a href="/api/block">Blocklist</a></h3>
|
||||
<p>Working with the blocklist.</p>
|
||||
<h3><a class="anchor" href="#nearby-userschats" id="nearby-userschats" name="nearby-userschats"><i class="anchor-icon"></i></a><a href="/api/nearby">Nearby users&chats</a></h3>
|
||||
<h3><a class="anchor" href="#nearby-usersampchats" id="nearby-usersampchats" name="nearby-usersampchats"><i class="anchor-icon"></i></a><a href="/api/nearby">Nearby users&chats</a></h3>
|
||||
<p>How to work with geolocation-based features like geochats and the nearby users feature.</p>
|
||||
<h4><a class="anchor" href="#web-events" id="web-events" name="web-events"><i class="anchor-icon"></i></a><a href="/api/web-events">Web events</a></h4>
|
||||
<p>When interacting with HTML5 games and the websites of payment gateways, Telegram apps should expose the following JS APIs.</p>
|
||||
|
|
|
@ -136,15 +136,15 @@
|
|||
<p>Users can interact with your bot via <strong>inline queries</strong>, straight from the <strong>text input field</strong> in <strong>any</strong> chat. </p>
|
||||
<h4><a class="anchor" href="#games" id="games" name="games"><i class="anchor-icon"></i></a><a href="/api/bots/games">Games</a></h4>
|
||||
<p>Bots can offer users HTML5 games to play solo or to compete against each other in groups and one-on-one chats; how to work with games in the MTProto API.</p>
|
||||
<h4><a class="anchor" href="#web-apps" id="web-apps" name="web-apps"><i class="anchor-icon"></i></a><a href="/api/bots/webapps">Web apps</a></h4>
|
||||
<p>Bots can offer users interactive <a href="/bots/webapps">HTML5 web apps</a> to completely replace <strong>any website</strong>. </p>
|
||||
<h4><a class="anchor" href="#mini-apps" id="mini-apps" name="mini-apps"><i class="anchor-icon"></i></a><a href="/api/bots/webapps">Mini apps</a></h4>
|
||||
<p>Bots can offer users interactive <a href="/bots/webapps">HTML5 mini apps</a> to completely replace <strong>any website</strong>. </p>
|
||||
<h4><a class="anchor" href="#attachment-menu" id="attachment-menu" name="attachment-menu"><i class="anchor-icon"></i></a><a href="/api/bots/attach">Attachment menu</a></h4>
|
||||
<p>Bots can install attachment menu entries, offering conveniently accessible, versatile web apps.</p>
|
||||
<p>Bots can install attachment menu entries, offering conveniently accessible, versatile mini apps.</p>
|
||||
<h4><a class="anchor" href="#stories" id="stories" name="stories"><i class="anchor-icon"></i></a><a href="/api/stories">Stories</a></h4>
|
||||
<p>Telegram users and channels can easily post and view <a href="https://telegram.org/blog/stories">stories</a> through the API.</p>
|
||||
<h4><a class="anchor" href="#privacy-settings" id="privacy-settings" name="privacy-settings"><i class="anchor-icon"></i></a><a href="/api/privacy">Privacy settings</a></h4>
|
||||
<p>Telegram allows users to specify granular privacy settings, choosing which users can or can't interact with them in certain ways.</p>
|
||||
<h4><a class="anchor" href="#search--filters" id="search--filters" name="search--filters"><i class="anchor-icon"></i></a><a href="/api/search">Search & filters</a></h4>
|
||||
<h4><a class="anchor" href="#search-amp-filters" id="search-amp-filters" name="search-amp-filters"><i class="anchor-icon"></i></a><a href="/api/search">Search & filters</a></h4>
|
||||
<p>Telegram allows applying detailed message filters while looking for messages in chats.
|
||||
This allows the server to filter messages based on a text query, and even on their type, and this feature is often used by graphical clients to implement features like the chat gallery, chat profile pictures and more.</p>
|
||||
<h4><a class="anchor" href="#polls" id="polls" name="polls"><i class="anchor-icon"></i></a><a href="/api/poll">Polls</a></h4>
|
||||
|
@ -221,7 +221,7 @@ This allows the server to filter messages based on a text query, and even on the
|
|||
<p>Working with contacts in the API.</p>
|
||||
<h3><a class="anchor" href="#blocklist" id="blocklist" name="blocklist"><i class="anchor-icon"></i></a><a href="/api/block">Blocklist</a></h3>
|
||||
<p>Working with the blocklist.</p>
|
||||
<h3><a class="anchor" href="#nearby-userschats" id="nearby-userschats" name="nearby-userschats"><i class="anchor-icon"></i></a><a href="/api/nearby">Nearby users&chats</a></h3>
|
||||
<h3><a class="anchor" href="#nearby-usersampchats" id="nearby-usersampchats" name="nearby-usersampchats"><i class="anchor-icon"></i></a><a href="/api/nearby">Nearby users&chats</a></h3>
|
||||
<p>How to work with geolocation-based features like geochats and the nearby users feature.</p>
|
||||
<h4><a class="anchor" href="#web-events" id="web-events" name="web-events"><i class="anchor-icon"></i></a><a href="/api/web-events">Web events</a></h4>
|
||||
<p>When interacting with HTML5 games and the websites of payment gateways, Telegram apps should expose the following JS APIs.</p>
|
||||
|
|
|
@ -86,7 +86,7 @@ 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="#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>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 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></div>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
|
||||
<div id="dev_page_content"><!-- scroll_nav -->
|
||||
|
||||
<p>Bots can install attachment menu entries, offering conveniently accessible, versatile <a href="/api/bots/webapps#normal-web-apps">web apps</a>.</p>
|
||||
<p>Bots can install attachment menu entries, offering conveniently accessible, versatile <a href="/api/bots/webapps#normal-mini-apps">web apps</a>.</p>
|
||||
<p>Schema:</p>
|
||||
<pre><code><a href='/constructor/user'>user</a>#abb5f120 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> 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><<a href='/type/RestrictionReason'>RestrictionReason</a>> 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><<a href='/type/Username'>Username</a>> stories_max_id:flags2.5?<a href='/type/int'>int</a> = <a href='/type/User'>User</a>;
|
||||
|
||||
|
@ -83,7 +83,7 @@
|
|||
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 menu entries.<br>
|
||||
The attachment menu list should also be refreshed if the user changes the app's language in the settings. </p>
|
||||
<p>Once an attachment 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 menu entry should open the related <a href="/api/bots/webapps#normal-web-apps">bot web app</a>, see <a href="/api/bots/webapps#normal-web-apps">here »</a> for more info on the required steps.</p>
|
||||
<p>Clicking on the attachment menu entry should open the related <a href="/api/bots/webapps#normal-mini-apps">bot mini app</a>, see <a href="/api/bots/webapps#normal-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-menu-links">attachment menu deep links</a>.</p></div>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -104,7 +104,7 @@ Just like its <a href="/bots/api#answerinlinequery">bot API counterpart</a>, the
|
|||
|
||||
<a href='/method/messages.sendInlineBotResult'>messages.sendInlineBotResult</a>#f7bc68ba flags:<a href='/type/%23'>#</a> silent:flags.5?<a href='/constructor/true'>true</a> background:flags.6?<a href='/constructor/true'>true</a> clear_draft:flags.7?<a href='/constructor/true'>true</a> hide_via:flags.11?<a href='/constructor/true'>true</a> peer:<a href='/type/InputPeer'>InputPeer</a> reply_to:flags.0?<a href='/type/InputReplyTo'>InputReplyTo</a> random_id:<a href='/type/long'>long</a> query_id:<a href='/type/long'>long</a> id:<a href='/type/string'>string</a> schedule_date:flags.10?<a href='/type/int'>int</a> send_as:flags.13?<a href='/type/InputPeer'>InputPeer</a> = <a href='/type/Updates'>Updates</a>;</code></pre>
|
||||
<p>The user client should display the <a href="/constructor/messages.botResults">messages.botResults</a>.<code>results</code> obtained <a href="#1-making-an-inline-query">during querying</a> in a list, making sure to handle eventual bot timeouts in the form of a <code>BOT_RESPONSE_TIMEOUT</code> RPC error, by simply not displaying anything. </p>
|
||||
<p>If either the <a href="/constructor/messages.botResults">messages.botResults</a>.<code>switch_pm</code> or <a href="/constructor/messages.botResults">messages.botResults</a>.<code>switch_webview</code> flags are populated, a button should be displayed on top of the result list, that when clicked, instead of sending an inline result to the chat, switches the user to a private chat with the bot (<code>switch_pm</code>) or to a <a href="/api/bots/webapps#simple-web-apps">bot web app</a> (<code>switch_webview</code>). </p>
|
||||
<p>If either the <a href="/constructor/messages.botResults">messages.botResults</a>.<code>switch_pm</code> or <a href="/constructor/messages.botResults">messages.botResults</a>.<code>switch_webview</code> flags are populated, a button should be displayed on top of the result list, that when clicked, instead of sending an inline result to the chat, switches the user to a private chat with the bot (<code>switch_pm</code>) or to a <a href="/api/bots/webapps#simple-mini-apps">bot mini app</a> (<code>switch_webview</code>). </p>
|
||||
<p>If the user instead chooses a specific <code>BotInlineResult</code> from the normal <code>results</code> list, the <a href="/method/messages.sendInlineBotResult">messages.sendInlineBotResult</a> method should be invoked, passing:</p>
|
||||
<ul>
|
||||
<li>The <code>query_id</code> from <code>messages.botResults</code></li>
|
||||
|
|
|
@ -64,7 +64,7 @@
|
|||
<ul>
|
||||
<li><code>user_id</code> - <a href="/constructor/inputUserEmpty">inputUserEmpty</a></li>
|
||||
<li><code>button</code> - one of the following constructors:<ul>
|
||||
<li><a href="/constructor/botMenuButton">botMenuButton</a> - Opens a <a href="/api/bots/webapps">bot web app</a> when clicked.</li>
|
||||
<li><a href="/constructor/botMenuButton">botMenuButton</a> - Opens a <a href="/api/bots/webapps">bot mini app</a> when clicked.</li>
|
||||
<li><a href="/constructor/botMenuButtonCommands">botMenuButtonCommands</a> - Opens the bot's command list when clicked.</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
@ -75,7 +75,7 @@
|
|||
<ul>
|
||||
<li><code>user_id</code> - <a href="/constructor/inputUser">inputUser</a> with the user ID/access hash</li>
|
||||
<li><code>button</code> - one of the following constructors:<ul>
|
||||
<li><a href="/constructor/botMenuButton">botMenuButton</a> - Opens a <a href="/api/bots/webapps">bot web app</a> when clicked.</li>
|
||||
<li><a href="/constructor/botMenuButton">botMenuButton</a> - Opens a <a href="/api/bots/webapps">bot mini app</a> when clicked.</li>
|
||||
<li><a href="/constructor/botMenuButtonCommands">botMenuButtonCommands</a> - Opens the bot's command list when clicked.</li>
|
||||
<li><a href="/constructor/botMenuButton">botMenuButtonDefault</a> - Resets the behavior of the button to the <a href="#set-scope-all-users">default scope (all users)</a>. </li>
|
||||
</ul>
|
||||
|
@ -102,7 +102,7 @@
|
|||
</ul>
|
||||
<p>One of the following constructors will be returned:</p>
|
||||
<ul>
|
||||
<li><a href="/constructor/botMenuButton">botMenuButton</a> - Opens a <a href="/api/bots/webapps">bot web app</a> when clicked.</li>
|
||||
<li><a href="/constructor/botMenuButton">botMenuButton</a> - Opens a <a href="/api/bots/webapps">bot mini app</a> when clicked.</li>
|
||||
<li><a href="/constructor/botMenuButtonCommands">botMenuButtonCommands</a> - Opens the bot's command list when clicked.</li>
|
||||
</ul>
|
||||
<p><a href="/constructor/botMenuButton">botMenuButtonDefault</a> will never be returned in this case.</p>
|
||||
|
@ -113,7 +113,7 @@
|
|||
</ul>
|
||||
<p>One of the following constructors will be returned:</p>
|
||||
<ul>
|
||||
<li><a href="/constructor/botMenuButton">botMenuButton</a> - Opens a <a href="/api/bots/webapps">bot web app</a> when clicked.</li>
|
||||
<li><a href="/constructor/botMenuButton">botMenuButton</a> - Opens a <a href="/api/bots/webapps">bot mini app</a> when clicked.</li>
|
||||
<li><a href="/constructor/botMenuButtonCommands">botMenuButtonCommands</a> - Opens the bot's command list when clicked.</li>
|
||||
<li><a href="/constructor/botMenuButton">botMenuButtonDefault</a> - The <a href="#get-scope-all-users">default scope (all users) button behavior is in use</a>. </li>
|
||||
</ul>
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
<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>
|
||||
<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>Both <a href="#simple-web-apps">simple</a> and <a href="#normal-web-apps">normal</a> 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>Both <a href="#simple-mini-apps">simple</a> and <a href="#normal-mini-apps">normal</a> 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, by calling the <code>receiveEvent</code> method. </p>
|
||||
|
@ -170,7 +170,7 @@ Note that eventual errors will not be sent as a <code>failed</code> event if the
|
|||
<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>#8c5a3b3c flags:<a href='/type/%23'>#</a> write_allowed:flags.0?<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/AppWebViewResult'>AppWebViewResult</a>;</code></pre>
|
||||
<p>Another way to open Mini Apps is by using <a href="/api/links#named-bot-web-app-links">named bot Mini App links »</a>. </p>
|
||||
<p>Another way to open Mini Apps is by using <a href="/api/links#named-bot-mini-app-links">named bot Mini App links »</a>. </p>
|
||||
<p>These links are different from <a href="/api/links#bot-attachment-menu-links">bot attachment menu deep links »</a>, 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>
|
||||
|
|
|
@ -356,8 +356,8 @@ When fetching the admin list of a supergroup using <a href="/method/channels.get
|
|||
<p>A list of Telegram domains that support automatic login with no user confirmation, <a href="/api/url-authorization#link-url-authorization">click here for more info on URL authorization »</a>. (array of strings)</p>
|
||||
<h4><a class="anchor" href="#whitelisted-domains" id="whitelisted-domains" name="whitelisted-domains"><i class="anchor-icon"></i></a><code>whitelisted_domains</code></h4>
|
||||
<p>A list of Telegram domains that can always be opened without additional user confirmation, when clicking on in-app links where the URL is not fully displayed (i.e. <a href="/constructor/messageEntityTextUrl">messageEntityTextUrl</a> entities). (array of strings)</p>
|
||||
<p>Note that when opening <a href="/api/links#named-bot-web-app-links">named bot web app links</a> for the first time, confirmation should still be requested from the user, even if the domain of the containing deep link is whitelisted (i.e. <code>t.me/<bot_username>/<short_name>?startapp=<start_parameter></code>, where <code>t.me</code> is whitelisted). </p>
|
||||
<p>Confirmation should <strong>always</strong> be asked, even if we already opened the <a href="/api/links#named-bot-web-app-links">named bot web app</a> before, if the link is not visible (i.e. <a href="/constructor/messageEntityTextUrl">messageEntityTextUrl</a> text links, inline buttons etc.). </p>
|
||||
<p>Note that when opening <a href="/api/links#named-bot-mini-app-links">named bot mini app links</a> for the first time, confirmation should still be requested from the user, even if the domain of the containing deep link is whitelisted (i.e. <code>t.me/<bot_username>/<short_name>?startapp=<start_parameter></code>, where <code>t.me</code> is whitelisted). </p>
|
||||
<p>Confirmation should <strong>always</strong> be asked, even if we already opened the <a href="/api/links#named-bot-mini-app-links">named bot mini app</a> before, if the link is not visible (i.e. <a href="/constructor/messageEntityTextUrl">messageEntityTextUrl</a> text links, inline buttons etc.). </p>
|
||||
<h4><a class="anchor" href="#round-video-encoding" id="round-video-encoding" name="round-video-encoding"><i class="anchor-icon"></i></a><code>round_video_encoding</code></h4>
|
||||
<p>Contains a set of recommended codec parameters for round videos. (object, as described in the example)</p>
|
||||
<h4><a class="anchor" href="#chat-read-mark-size-threshold" id="chat-read-mark-size-threshold" name="chat-read-mark-size-threshold"><i class="anchor-icon"></i></a><code>chat_read_mark_size_threshold</code></h4>
|
||||
|
|
|
@ -47,7 +47,6 @@
|
|||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><strong>in_seq_no</strong></td>
|
||||
<td><strong>out_seq_no</strong></td>
|
||||
</tr>
|
||||
|
@ -68,41 +67,40 @@
|
|||
<p>E.g., the first message the local client sends to any secret chat will have <strong>out_seq_no</strong> of <strong>0+x_out</strong>, the second one will have <strong>out_seq_no</strong> of <strong>2*1+x_out</strong>, and so on, where <strong>x_out</strong> is 0 if the chat was initiated by the remote client, 1 otherwise; similarly for the received messages, but there <strong>x_in</strong> is used instead of <strong>x_out</strong> and is equal to 0 if the chat was initiated by the local client, 1 otherwise. </p>
|
||||
</blockquote>
|
||||
<p>Raw sequence numbers will be used in the remaining part of this text, unless otherwise specified.</p>
|
||||
<h4><a class="anchor" name="preventing-gaps" href="#preventing-gaps"><i class="anchor-icon"></i></a>Preventing gaps</h4>
|
||||
<h4><a class="anchor" href="#preventing-gaps" id="preventing-gaps" name="preventing-gaps"><i class="anchor-icon"></i></a>Preventing gaps</h4>
|
||||
<p>Your client must ensure that all outgoing secret chat messages are queued on the server in the correct order. This is achieved by correctly placing them into the <a href="/method/invokeAfterMsgs">invokeAfterMsgs</a> chain. Failure to do this may result in gaps on the remote client, which may in turn lead to aborted secret chats. The local client must maintain the correct sequence of <strong>in_seq_no</strong> for the remote client. To achieve this, assign <strong>in_seq_no</strong> and <strong>out_seq_no</strong> to each message at the <em>exact</em> moment when the message is created, and never change them in the future.</p>
|
||||
<h2><a class="anchor" name="security-checks" href="#security-checks"><i class="anchor-icon"></i></a>Security checks</h2>
|
||||
<h4><a class="anchor" name="checking-out-seq-no" href="#checking-out-seq-no"><i class="anchor-icon"></i></a>Checking out_seq_no</h4>
|
||||
<h2><a class="anchor" href="#security-checks" id="security-checks" name="security-checks"><i class="anchor-icon"></i></a>Security checks</h2>
|
||||
<h4><a class="anchor" href="#checking-out-seq-no" id="checking-out-seq-no" name="checking-out-seq-no"><i class="anchor-icon"></i></a>Checking out_seq_no</h4>
|
||||
<p>Your client must check that it has received <em>each</em> message with the sequence number <strong>out_seq_no</strong> starting from 0 to some current point <strong>C</strong>. It should then expect the next message to have the sequence number <strong>out_seq_no=C+1</strong>. If the <strong>out_seq_no</strong> in the received message does not match this, the following needs to be done:</p>
|
||||
<ul>
|
||||
<li>If the received <strong>out_seq_no<=C</strong>, the local client must drop the message (repeated message). The client should not check the contents of the message because the original message could have been deleted (see <a href="#deleting-unacknowledged-messages">Deleting unacknowledged messages</a>).</li>
|
||||
<li>If the received <strong>out_seq_no>C+1</strong>, it most likely means that the server left out some messages due to a technical failure or due to the messages becoming obsolete. A temporary solution to this is to simply abort the secret chat. But since this may cause some existing older secret chats to be aborted, it is strongly recommended for the client to properly handle such <strong>seq_no</strong> gaps. Note that <strong>in_seq_no</strong> is not increased upon receipt of such a message; it is advanced only after all preceding gaps are filled.</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" name="proper-handling-of-gaps" href="#proper-handling-of-gaps"><i class="anchor-icon"></i></a>Proper handling of gaps</h4>
|
||||
<p>In order to correctly handle incoming messages after a hole has been identified (when received <strong>out_seq_no>C+1</strong>), it is necessary to put received messages with the wrong <strong>seq_no</strong> into a “waiting queue” on the local client, and to re-request the missing messages using the special constructor <a href="/constructor/decryptedMessageActionResend">decryptedMessageActionResend</a> <code>start_seq_no:int end_seq_no:int = DecryptedMessageAction;</code>. The sequence numbers used in this constructor must be ready for interpretation by the remote client and therefore <em>cannot</em> be in their raw form: you can easily get the necessary <strong>start_seq_no</strong> by adding 2 to the <strong>out_seq_no</strong> of the last message before the hole and the <strong>end_seq_no</strong> by subtracting 2 from the <strong>out_seq_no</strong> of the received message with the wrong sequence number.</p>
|
||||
<h4><a class="anchor" href="#proper-handling-of-gaps" id="proper-handling-of-gaps" name="proper-handling-of-gaps"><i class="anchor-icon"></i></a>Proper handling of gaps</h4>
|
||||
<p>In order to correctly handle incoming messages after a hole has been identified (when received <strong>out_seq_no>C+1</strong>), it is necessary to put received messages with the wrong <strong>seq_no</strong> into a "waiting queue" on the local client, and to re-request the missing messages using the special constructor <a href="/constructor/decryptedMessageActionResend">decryptedMessageActionResend</a>. The sequence numbers used in this constructor must be ready for interpretation by the remote client and therefore <em>cannot</em> be in their raw form: you can easily get the necessary <strong>start_seq_no</strong> by adding 2 to the <strong>out_seq_no</strong> of the last message before the hole and the <strong>end_seq_no</strong> by subtracting 2 from the <strong>out_seq_no</strong> of the received message with the wrong sequence number.</p>
|
||||
<p>Each hole normally requires only one request to resend messages — if the remote client keeps sending out of sync messages, they should be put into the queue without sending a new request. Having received the missing messages, the local client must first interpret these messages in the right order by their <strong>seq_no</strong>. Once this is done, the client can proceed to interpret messages from the queue (again, in the right <strong>seq_no</strong> order).</p>
|
||||
<p>Special cases:</p>
|
||||
<ul>
|
||||
<li>Note that having <em>two</em> gaps simultaneously is very rare (provided that the remote client and server are operating normally) and it is acceptable to abort the secret chat in this situation.</li>
|
||||
<li>If a local client receives <a href="/constructor/decryptedMessageActionResend">decryptedMessageActionResend</a> but is unable to satisfy the request, it must abort the secret chat.</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" name="avoiding-concurrent-gaps" href="#avoiding-concurrent-gaps"><i class="anchor-icon"></i></a>Avoiding concurrent gaps</h4>
|
||||
<h4><a class="anchor" href="#avoiding-concurrent-gaps" id="avoiding-concurrent-gaps" name="avoiding-concurrent-gaps"><i class="anchor-icon"></i></a>Avoiding concurrent gaps</h4>
|
||||
<p>In order to avoid getting stuck with concurrent gaps on both sides, <a href="/constructor/decryptedMessageActionResend">decryptedMessageActionResend</a> must always be interpreted <em>immediately upon receipt</em> in all cases, even if its <strong>out_seq_no>=C+1</strong>. Note that each <a href="/constructor/decryptedMessageActionResend">decryptedMessageActionResend</a> must only be handled once, it must not be interpreted again when we interpret messages in the queue.</p>
|
||||
<h4><a class="anchor" name="checking-and-handling-in-seq-no" href="#checking-and-handling-in-seq-no"><i class="anchor-icon"></i></a>Checking and handling in_seq_no</h4>
|
||||
<h4><a class="anchor" href="#checking-and-handling-in-seq-no" id="checking-and-handling-in-seq-no" name="checking-and-handling-in-seq-no"><i class="anchor-icon"></i></a>Checking and handling in_seq_no</h4>
|
||||
<p><strong>in_seq_no</strong> of all received messages must be <em>valid</em>. To ensure this, perform the following checks:</p>
|
||||
<ul>
|
||||
<li><strong>in_seq_no</strong> must form a non-decreasing sequence of non-negative integer numbers.</li>
|
||||
<li><strong>in_seq_no</strong> must be valid at the moment of receiving the message, that is, if <strong>D</strong> is the <strong>out_seq_no</strong> of last message we sent, the received <strong>in_seq_no</strong> should not be greater than <strong>D + 1</strong>. This also allows us to insert the received message into its correct place in the secret chat. For example, imagine that the local client has sent 5 secret chat messages, and then receives a secret chat message with the text “Yes” and <strong>in_seq_no=2</strong>. In this situation the local client <em>must</em> place that message after the second message it sent. This makes manipulations with delayed messages impossible.</li>
|
||||
<li><strong>in_seq_no</strong> must be valid at the moment of receiving the message, that is, if <strong>D</strong> is the <strong>out_seq_no</strong> of last message we sent, the received <strong>in_seq_no</strong> should not be greater than <strong>D + 1</strong>. This also allows us to insert the received message into its correct place in the secret chat. For example, imagine that the local client has sent 5 secret chat messages, and then receives a secret chat message with the text "Yes" and <strong>in_seq_no=2</strong>. In this situation the local client <em>must</em> place that message after the second message it sent. This makes manipulations with delayed messages impossible.</li>
|
||||
</ul>
|
||||
<p>If <code>in_seq_no</code> contradicts these criteria, the local client is required to immediately abort the secret chat. This could happen only in case of malicious or buggy behaviour on either server or remote client side.</p>
|
||||
<h4><a class="anchor" name="deleting-unacknowledged-messages" href="#deleting-unacknowledged-messages"><i class="anchor-icon"></i></a>Deleting unacknowledged messages</h4>
|
||||
<h4><a class="anchor" href="#deleting-unacknowledged-messages" id="deleting-unacknowledged-messages" name="deleting-unacknowledged-messages"><i class="anchor-icon"></i></a>Deleting unacknowledged messages</h4>
|
||||
<p>In case the user on the local client has deleted a message <em>before</em> the server (or the remote client, if <a href="/constructor/decryptedMessageActionResend">decryptedMessageActionResend</a> is handled correctly) could acknowledge the message, for security reasons, you must:</p>
|
||||
<ul>
|
||||
<li>securely destroy the contents of the message (as in case of any other deleted Secret Chat message);</li>
|
||||
<li>change the local copy of the original message to <code>decryptedMessageActionDeleteMessages</code> with <strong>random_id</strong> equal to its own <strong>random_id</strong>;</li>
|
||||
<li>create a new outgoing message deleting the original message.</li>
|
||||
</ul>
|
||||
<p>This must be done because your client doesn't know whether the remote client really received the message or not. In the case the message was already received, it will be deleted by the second message; otherwise it must arrive as a “self-delete” message to maintain the correct sequence of seq_no.</p>
|
||||
</div>
|
||||
<p>This must be done because your client doesn't know whether the remote client really received the message or not. In the case the message was already received, it will be deleted by the second message; otherwise it must arrive as a "self-delete" message to maintain the correct sequence of seq_no.</p></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -47,11 +47,10 @@
|
|||
<p>Below you will find information on schema changes. For more details on the use of layers, see <a href="/api/invoking#layers">Invoking API methods</a>.</p>
|
||||
<h3><a class="anchor" href="#layer-164" id="layer-164" name="layer-164"><i class="anchor-icon"></i></a><a href="/schema?layer=164">Layer 164</a></h3>
|
||||
<h4><a class="anchor" href="#schema-changes" id="schema-changes" name="schema-changes"><i class="anchor-icon"></i></a>Schema changes</h4>
|
||||
<p>Introducing <a href="/api/stories#stealth-mode">stealth mode for stories</a>, <a href="/api/stories#media-areas">story media areas</a>, <a href="/api/block">bulk blocklist modification methods</a>, <a href="/api/story#react-to-a-story">story reactions</a>, <a href="/api/boost">stories for channels</a> thanks to <a href="/api/boost">channel boosts</a>, <a href="/api/auth#confirming-login">explicit session confirmation</a>, <a href="/api/bots/webapps">mini apps</a>.</p>
|
||||
<h5><a class="anchor" href="#new-methods" id="new-methods" name="new-methods"><i class="anchor-icon"></i></a>New Methods</h5>
|
||||
<ul>
|
||||
<li>Added <a href="/method/stories.activateStealthMode">stories.activateStealthMode</a> - Activates <a href="/api/stories#stealth-mode">stories stealth mode</a>, see <a href="/api/stories#stealth-mode">here »</a> for more info.</li>
|
||||
<li>Added <a href="/method/contacts.setBlocked">contacts.setBlocked</a> - Replace the contents of an entire <a href="/api/contacts">blocklist, see here for more info »</a>.</li>
|
||||
<li>Added <a href="/method/contacts.setBlocked">contacts.setBlocked</a> - Replace the contents of an entire <a href="/api/block">blocklist, see here for more info »</a>.</li>
|
||||
<li>Added <a href="/method/stories.sendReaction">stories.sendReaction</a> - React to a story.</li>
|
||||
<li>Added <a href="/method/bots.canSendMessage">bots.canSendMessage</a> - </li>
|
||||
<li>Added <a href="/method/bots.allowSendMessage">bots.allowSendMessage</a> - </li>
|
||||
|
@ -97,7 +96,7 @@
|
|||
</ul>
|
||||
<h5><a class="anchor" href="#new-constructors" id="new-constructors" name="new-constructors"><i class="anchor-icon"></i></a>New Constructors</h5>
|
||||
<ul>
|
||||
<li>Added <a href="/constructor/updateNewAuthorization">updateNewAuthorization</a> - Authorized to the current user's account through an unknown device.</li>
|
||||
<li>Added <a href="/constructor/updateNewAuthorization">updateNewAuthorization</a> - A new session logged into the current user's account through an unknown device.</li>
|
||||
<li>Added <a href="/constructor/storiesStealthMode">storiesStealthMode</a> - Information about the current <a href="/api/stories#stealth-mode">stealth mode</a> session.</li>
|
||||
<li>Added <a href="/constructor/updateStoriesStealthMode">updateStoriesStealthMode</a> - Indicates that <a href="/api/stories#stealth-mode">stories stealth mode</a> was activated.</li>
|
||||
<li>Added <a href="/constructor/mediaAreaCoordinates">mediaAreaCoordinates</a> - Coordinates and size of a clicable rectangular area on top of a story.</li>
|
||||
|
@ -237,8 +236,8 @@
|
|||
<li>Added <a href="/method/stories.togglePinned">stories.togglePinned</a> - Pin or unpin one or more stories</li>
|
||||
<li>Added <a href="/method/stories.getAllStories">stories.getAllStories</a> - Fetch the List of active (or active and hidden) stories, see <a href="/api/stories#watching-stories">here »</a> for more info on watching stories.</li>
|
||||
<li>Added <a href="/method/stories.getUserStories">stories.getUserStories</a></li>
|
||||
<li>Added <a href="/method/stories.getPinnedStories">stories.getPinnedStories</a> - Fetch the <a href="/api/stories#pinnedarchived-stories">stories</a> pinned on a peer's profile.</li>
|
||||
<li>Added <a href="/method/stories.getStoriesArchive">stories.getStoriesArchive</a> - Fetch the <a href="/api/stories#pinnedarchived-stories">story archive »</a> of a peer we control.</li>
|
||||
<li>Added <a href="/method/stories.getPinnedStories">stories.getPinnedStories</a> - Fetch the <a href="/api/stories#pinned-or-archived-stories">stories</a> pinned on a peer's profile.</li>
|
||||
<li>Added <a href="/method/stories.getStoriesArchive">stories.getStoriesArchive</a> - Fetch the <a href="/api/stories#pinned-or-archived-stories">story archive »</a> of a peer we control.</li>
|
||||
<li>Added <a href="/method/stories.getStoriesByID">stories.getStoriesByID</a> - Obtain full info about a set of <a href="/api/stories">stories</a> by their IDs.</li>
|
||||
<li>Added <a href="/method/stories.toggleAllStoriesHidden">stories.toggleAllStoriesHidden</a> - Hide the active stories of a specific peer, preventing them from being displayed on the action bar on the homescreen.</li>
|
||||
<li>Added <a href="/method/stories.getAllReadUserStories">stories.getAllReadUserStories</a></li>
|
||||
|
@ -272,7 +271,7 @@
|
|||
<li>Added <a href="/constructor/updateReadStories">updateReadStories</a> - Stories of a specific peer were marked as read.</li>
|
||||
<li>Added <a href="/constructor/stories.allStoriesNotModified">stories.allStoriesNotModified</a> - The list of active (or active and hidden) <a href="/api/stories#watching-stories">stories</a> has not changed.</li>
|
||||
<li>Added <a href="/constructor/stories.allStories">stories.allStories</a> - Full list of active (or active and hidden) <a href="/api/stories#watching-stories">stories</a>.</li>
|
||||
<li>Added <a href="/constructor/stories.stories">stories.stories</a> - List of <a href="/api/stories#pinnedarchived-stories">stories</a></li>
|
||||
<li>Added <a href="/constructor/stories.stories">stories.stories</a> - List of <a href="/api/stories#pinned-or-archived-stories">stories</a></li>
|
||||
<li>Added <a href="/constructor/stories.userStories">stories.userStories</a></li>
|
||||
<li>Added <a href="/constructor/inputPrivacyValueAllowCloseFriends">inputPrivacyValueAllowCloseFriends</a> - Allow only <a href="/api/privacy">close friends »</a></li>
|
||||
<li>Added <a href="/constructor/privacyValueAllowCloseFriends">privacyValueAllowCloseFriends</a> - Allow only <a href="/api/privacy">close friends »</a></li>
|
||||
|
@ -541,8 +540,8 @@ Bots may also now specify a custom peer filter when using <a href="/constructor/
|
|||
<h4><a class="anchor" href="#schema" id="schema" name="schema"><i class="anchor-icon"></i></a>Schema</h4>
|
||||
<div><pre><code><a href="/constructor/messagePeerReaction">messagePeerReaction</a>#8c79b63c flags:<a href="/type/%23">#</a> big:flags.0?<a href="/constructor/true">true</a> unread:flags.1?<a href="/constructor/true">true</a> peer_id:<a href="/type/Peer">Peer</a> date:<a href="/type/int">int</a> reaction:<a href="/type/Reaction">Reaction</a> = <a href="/type/MessagePeerReaction">MessagePeerReaction</a>;<br></code></pre></div>
|
||||
<h3><a class="anchor" href="#layer-154" id="layer-154" name="layer-154"><i class="anchor-icon"></i></a><a href="/schema?layer=154">Layer 154</a></h3>
|
||||
<p>Added support for <a href="/api/bots/webapps#named-bot-web-apps">named bot web apps</a>, which can be opened from a <a href="/api/links#named-bot-web-app-links">named bot web app deep link</a>.<br>
|
||||
<a href="/api/bots/webapps#simple-web-apps">Web apps</a> can now be opened by clicking on a <code>switch_webview</code> inline result, similar to <code>switch_pm</code> inline results.<br>
|
||||
<p>Added support for <a href="/api/bots/webapps#named-bot-mini-apps">named bot mini apps</a>, which can be opened from a <a href="/api/links#named-bot-mini-app-links">named bot mini app deep link</a>.<br>
|
||||
<a href="/api/bots/webapps#simple-mini-apps">Web apps</a> can now be opened by clicking on a <code>switch_webview</code> inline result, similar to <code>switch_pm</code> inline results.<br>
|
||||
Bots can now edit and localize their own about text and description.<br>
|
||||
The current <a href="/api/auth#future-auth-tokens">future auth token</a> is now directly returned in the <a href="/constructor/config">config</a> constructor, which was also cleaned up to remove redundant information already contained in the <a href="/api/config#client-configuration">appConfig configuration</a>.<br>
|
||||
<a href="/method/messages.getMessageReadParticipants">messages.getMessageReadParticipants</a> now returns a timestamp for each user, indicating when that user has read the specified message.</p>
|
||||
|
@ -551,8 +550,8 @@ The current <a href="/api/auth#future-auth-tokens">future auth token</a> is now
|
|||
<h4><a class="anchor" href="#schema-changes" id="schema-changes" name="schema-changes"><i class="anchor-icon"></i></a>Schema changes</h4>
|
||||
<h5><a class="anchor" href="#new-methods" id="new-methods" name="new-methods"><i class="anchor-icon"></i></a>New Methods</h5>
|
||||
<ul>
|
||||
<li>Added <a href="/method/messages.getBotApp">messages.getBotApp</a> - Obtain information about a <a href="/api/bots/webapps#named-bot-web-apps">named bot web app</a></li>
|
||||
<li>Added <a href="/method/messages.requestAppWebView">messages.requestAppWebView</a> - Open a <a href="/bots/webapps">bot web app</a> from a <a href="/api/links#named-bot-web-app-links">named bot web app deep link</a>, sending over user information after user confirmation.</li>
|
||||
<li>Added <a href="/method/messages.getBotApp">messages.getBotApp</a> - Obtain information about a <a href="/api/bots/webapps#named-bot-mini-apps">named bot mini app</a></li>
|
||||
<li>Added <a href="/method/messages.requestAppWebView">messages.requestAppWebView</a> - Open a <a href="/bots/webapps">bot mini app</a> from a <a href="/api/links#named-bot-mini-app-links">named bot mini app deep link</a>, sending over user information after user confirmation.</li>
|
||||
<li>Added <a href="/method/bots.setBotInfo">bots.setBotInfo</a> - Set localized name, about text and description of a bot (or of the current account, if called by a bot).</li>
|
||||
<li>Added <a href="/method/bots.getBotInfo">bots.getBotInfo</a> - Get localized name, about text and description of a bot (or of the current account, if called by a bot).</li>
|
||||
</ul>
|
||||
|
@ -564,13 +563,13 @@ The current <a href="/api/auth#future-auth-tokens">future auth token</a> is now
|
|||
</ul>
|
||||
<h5><a class="anchor" href="#new-constructors" id="new-constructors" name="new-constructors"><i class="anchor-icon"></i></a>New Constructors</h5>
|
||||
<ul>
|
||||
<li>Added <a href="/constructor/inputBotAppID">inputBotAppID</a> - Used to fetch information about a <a href="/api/bots/webapps#named-bot-web-apps">named bot web app</a> by its ID</li>
|
||||
<li>Added <a href="/constructor/inputBotAppShortName">inputBotAppShortName</a> - Used to fetch information about a <a href="/api/bots/webapps#named-bot-web-apps">named bot web app</a> by its short name</li>
|
||||
<li>Added <a href="/constructor/inputBotAppID">inputBotAppID</a> - Used to fetch information about a <a href="/api/bots/webapps#named-bot-mini-apps">named bot mini app</a> by its ID</li>
|
||||
<li>Added <a href="/constructor/inputBotAppShortName">inputBotAppShortName</a> - Used to fetch information about a <a href="/api/bots/webapps#named-bot-mini-apps">named bot mini app</a> by its short name</li>
|
||||
<li>Added <a href="/constructor/botAppNotModified">botAppNotModified</a> - Bot app info hasn't changed.</li>
|
||||
<li>Added <a href="/constructor/botApp">botApp</a> - Contains information about a <a href="/api/bots/webapps#named-bot-web-apps">named bot web app</a>.</li>
|
||||
<li>Added <a href="/constructor/messages.botApp">messages.botApp</a> - Contains information about a <a href="/api/bots/webapps#named-bot-web-apps">named bot web app</a></li>
|
||||
<li>Added <a href="/constructor/appWebViewResultUrl">appWebViewResultUrl</a> - Contains the link that must be used to open a <a href="/api/bots/webapps#named-bot-web-apps">named bot web app</a>.</li>
|
||||
<li>Added <a href="/constructor/inlineBotWebView">inlineBotWebView</a> - Specifies a <a href="/api/bots/webapps#simple-web-apps">bot web app</a> button, shown on top of the inline query results list.</li>
|
||||
<li>Added <a href="/constructor/botApp">botApp</a> - Contains information about a <a href="/api/bots/webapps#named-bot-mini-apps">named bot mini app</a>.</li>
|
||||
<li>Added <a href="/constructor/messages.botApp">messages.botApp</a> - Contains information about a <a href="/api/bots/webapps#named-bot-mini-apps">named bot mini app</a></li>
|
||||
<li>Added <a href="/constructor/appWebViewResultUrl">appWebViewResultUrl</a> - Contains the link that must be used to open a <a href="/api/bots/webapps#named-bot-mini-apps">named bot mini app</a>.</li>
|
||||
<li>Added <a href="/constructor/inlineBotWebView">inlineBotWebView</a> - Specifies a <a href="/api/bots/webapps#simple-mini-apps">bot mini app</a> button, shown on top of the inline query results list.</li>
|
||||
<li>Added <a href="/constructor/readParticipantDate">readParticipantDate</a> - Contains info about when a certain participant has read a message</li>
|
||||
<li>Added <a href="/constructor/updateGroupInvitePrivacyForbidden">updateGroupInvitePrivacyForbidden</a> - 0-N updates of this type may be returned only when invoking <a href="/method/messages.addChatUser">messages.addChatUser</a>, <a href="/method/channels.inviteToChannel">channels.inviteToChannel</a> or <a href="/method/messages.createChat">messages.createChat</a>: it indicates we couldn't add a user to a chat because of their privacy settings; if required, an <a href="/api/invites">invite link</a> can be shared with the user, instead.</li>
|
||||
</ul>
|
||||
|
@ -754,7 +753,7 @@ Third-party apps may log in using any of the other code delivery methods (Telegr
|
|||
<a href="/method/account.deleteAutoSaveExceptions">account.deleteAutoSaveExceptions</a>#53bc0020 = <a href="/type/Bool">Bool</a>;<br></code></pre></div>
|
||||
<h3><a class="anchor" href="#layer-151" id="layer-151" name="layer-151"><i class="anchor-icon"></i></a><a href="/schema?layer=151">Layer 151</a></h3>
|
||||
<p>Introducing spoiler media, custom contact profile pictures, hidden supergroup participants and persistent bot keyboards.<br>
|
||||
<a href="/api/bots/attach">Attachment menu bot web apps</a> may now ask permission to write direct messages to the users that install them.</p>
|
||||
<a href="/api/bots/attach">Attachment menu bot mini apps</a> may now ask permission to write direct messages to the users that install them.</p>
|
||||
<h4><a class="anchor" href="#schema-changes" id="schema-changes" name="schema-changes"><i class="anchor-icon"></i></a>Schema changes</h4>
|
||||
<h5><a class="anchor" href="#new-methods" id="new-methods" name="new-methods"><i class="anchor-icon"></i></a>New Methods</h5>
|
||||
<ul>
|
||||
|
@ -1084,7 +1083,7 @@ Added support for thread IDs in <a href="/api/links#message-links">message deep
|
|||
<a href="/method/stickers.createStickerSet">stickers.createStickerSet</a>#9021ab67 flags:<a href="/type/%23">#</a> masks:flags.0?<a href="/constructor/true">true</a> animated:flags.1?<a href="/constructor/true">true</a> videos:flags.4?<a href="/constructor/true">true</a> emojis:flags.5?<a href="/constructor/true">true</a> text_color:flags.6?<a href="/constructor/true">true</a> user_id:<a href="/type/InputUser">InputUser</a> title:<a href="/type/string">string</a> short_name:<a href="/type/string">string</a> thumb:flags.2?<a href="/type/InputDocument">InputDocument</a> stickers:<a href="/type/Vector%20t">Vector</a><<a href="/type/InputStickerSetItem">InputStickerSetItem</a>> software:flags.3?<a href="/type/string">string</a> = <a href="/type/messages.StickerSet">messages.StickerSet</a>;<br>
|
||||
<a href="/method/messages.getExtendedMedia">messages.getExtendedMedia</a>#84f80814 peer:<a href="/type/InputPeer">InputPeer</a> id:<a href="/type/Vector%20t">Vector</a><<a href="/type/int">int</a>> = <a href="/type/Updates">Updates</a>;<br></code></pre></div>
|
||||
<h3><a class="anchor" href="#layer-145" id="layer-145" name="layer-145"><i class="anchor-icon"></i></a><a href="/schema?layer=145">Layer 145</a></h3>
|
||||
<p><a href="/api/emoji-status">Custom emoji statuses</a>, <a href="/api/reactions">custom emoji & multiple message reactions</a>, <a href="/api/auth#email-verification">login via email</a>, <a href="/api/stickers#recent-stickersets">recent stickersets</a>, <a href="/api/premium">Telegram Premium</a> and <a href="/api/bots/webapps">bot web app</a> improvements.</p>
|
||||
<p><a href="/api/emoji-status">Custom emoji statuses</a>, <a href="/api/reactions">custom emoji & multiple message reactions</a>, <a href="/api/auth#email-verification">login via email</a>, <a href="/api/stickers#recent-stickersets">recent stickersets</a>, <a href="/api/premium">Telegram Premium</a> and <a href="/api/bots/webapps">bot mini app</a> improvements.</p>
|
||||
<p>Added the following brand new documentation articles:</p>
|
||||
<ul>
|
||||
<li><a href="/api/links">Deep links</a></li>
|
||||
|
@ -1458,7 +1457,7 @@ Also, discussion group admins can now <a href="/api/discussion#requiring-users-t
|
|||
<p>Introducing:</p>
|
||||
<ul>
|
||||
<li><a href="/api/bots/attach">Attachment menus</a></li>
|
||||
<li><a href="/api/bots/webapps">Bot web apps</a></li>
|
||||
<li><a href="/api/bots/webapps">bot mini apps</a></li>
|
||||
<li><a href="/api/bots/menu">Custom bot menu buttons</a></li>
|
||||
<li><a href="/api/rights#suggested-bot-rights">Suggested bot admin rights</a></li>
|
||||
<li><a href="/api/ringtones">Ringtones</a></li>
|
||||
|
@ -1471,14 +1470,14 @@ Also, discussion group admins can now <a href="/api/discussion#requiring-users-t
|
|||
<h4><a class="anchor" href="#schema-changes" id="schema-changes" name="schema-changes"><i class="anchor-icon"></i></a>Schema changes</h4>
|
||||
<h5><a class="anchor" href="#new-methods" id="new-methods" name="new-methods"><i class="anchor-icon"></i></a>New Methods</h5>
|
||||
<ul>
|
||||
<li>Added <a href="/method/messages.getAttachMenuBots">messages.getAttachMenuBots</a> - Returns installed attachment menu <a href="/api/bots/attach">bot web apps »</a></li>
|
||||
<li>Added <a href="/method/messages.getAttachMenuBot">messages.getAttachMenuBot</a> - Returns attachment menu entry for a <a href="/api/bots/attach">bot web app that can be launched from the attachment menu »</a></li>
|
||||
<li>Added <a href="/method/messages.getAttachMenuBots">messages.getAttachMenuBots</a> - Returns installed attachment menu <a href="/api/bots/attach">bot mini apps »</a></li>
|
||||
<li>Added <a href="/method/messages.getAttachMenuBot">messages.getAttachMenuBot</a> - Returns attachment menu entry for a <a href="/api/bots/attach">bot mini app that can be launched from the attachment menu »</a></li>
|
||||
<li>Added <a href="/method/messages.toggleBotInAttachMenu">messages.toggleBotInAttachMenu</a> - Enable or disable <a href="/api/bots/attach">web bot attachment menu »</a></li>
|
||||
<li>Added <a href="/method/messages.requestWebView">messages.requestWebView</a> - Open a <a href="/bots/webapps">bot web app</a>, sending over user information after user confirmation.</li>
|
||||
<li>Added <a href="/method/messages.requestWebView">messages.requestWebView</a> - Open a <a href="/bots/webapps">bot mini app</a>, sending over user information after user confirmation.</li>
|
||||
<li>Added <a href="/method/messages.prolongWebView">messages.prolongWebView</a> - Indicate to the server (from the user side) that the user is still using a web app.</li>
|
||||
<li>Added <a href="/method/messages.requestSimpleWebView">messages.requestSimpleWebView</a> - Open a <a href="/api/bots/webapps">bot web app</a>.</li>
|
||||
<li>Added <a href="/method/messages.requestSimpleWebView">messages.requestSimpleWebView</a> - Open a <a href="/api/bots/webapps">bot mini app</a>.</li>
|
||||
<li>Added <a href="/method/messages.sendWebViewResultMessage">messages.sendWebViewResultMessage</a> - Terminate webview interaction started with <a href="/method/messages.requestWebView">messages.requestWebView</a>, sending the specified message to the chat on behalf of the user.</li>
|
||||
<li>Added <a href="/method/messages.sendWebViewData">messages.sendWebViewData</a> - Used by the user to relay data from an opened <a href="/api/bots/webapps">reply keyboard bot web app</a> to the bot that owns it.</li>
|
||||
<li>Added <a href="/method/messages.sendWebViewData">messages.sendWebViewData</a> - Used by the user to relay data from an opened <a href="/api/bots/webapps">reply keyboard bot mini app</a> to the bot that owns it.</li>
|
||||
<li>Added <a href="/method/bots.setBotMenuButton">bots.setBotMenuButton</a> - Sets the <a href="/api/bots/menu">menu button action »</a> for a given user or for all users</li>
|
||||
<li>Added <a href="/method/bots.getBotMenuButton">bots.getBotMenuButton</a> - Gets the menu button action for a given user or for all users, previously set using <a href="/method/bots.setBotMenuButton">bots.setBotMenuButton</a>; users can see this information in the <a href="/constructor/botInfo">botInfo</a> constructor.</li>
|
||||
<li>Added <a href="/method/account.getSavedRingtones">account.getSavedRingtones</a> - Fetch saved notification sounds</li>
|
||||
|
@ -1495,21 +1494,21 @@ Also, discussion group admins can now <a href="/api/discussion#requiring-users-t
|
|||
</ul>
|
||||
<h5><a class="anchor" href="#new-constructors" id="new-constructors" name="new-constructors"><i class="anchor-icon"></i></a>New Constructors</h5>
|
||||
<ul>
|
||||
<li>Added <a href="/constructor/attachMenuBotIconColor">attachMenuBotIconColor</a> - Represents an attachment menu icon color for <a href="/api/bots/attach">bot web apps »</a></li>
|
||||
<li>Added <a href="/constructor/attachMenuBotIcon">attachMenuBotIcon</a> - Represents an attachment menu icon for <a href="/api/bots/attach">bot web apps »</a></li>
|
||||
<li>Added <a href="/constructor/attachMenuBot">attachMenuBot</a> - Represents a <a href="/api/bots/attach">bot web app that can be launched from the attachment menu »</a></li>
|
||||
<li>Added <a href="/constructor/attachMenuBotsNotModified">attachMenuBotsNotModified</a> - The list of bot web apps hasn't changed</li>
|
||||
<li>Added <a href="/constructor/attachMenuBots">attachMenuBots</a> - Represents a list of <a href="/api/bots/attach">bot web apps that can be launched from the attachment menu »</a></li>
|
||||
<li>Added <a href="/constructor/attachMenuBotsBot">attachMenuBotsBot</a> - Represents a <a href="/api/bots/attach">bot web app that can be launched from the attachment menu »</a></li>
|
||||
<li>Added <a href="/constructor/attachMenuBotIconColor">attachMenuBotIconColor</a> - Represents an attachment menu icon color for <a href="/api/bots/attach">bot mini apps »</a></li>
|
||||
<li>Added <a href="/constructor/attachMenuBotIcon">attachMenuBotIcon</a> - Represents an attachment menu icon for <a href="/api/bots/attach">bot mini apps »</a></li>
|
||||
<li>Added <a href="/constructor/attachMenuBot">attachMenuBot</a> - Represents a <a href="/api/bots/attach">bot mini app that can be launched from the attachment menu »</a></li>
|
||||
<li>Added <a href="/constructor/attachMenuBotsNotModified">attachMenuBotsNotModified</a> - The list of bot mini apps hasn't changed</li>
|
||||
<li>Added <a href="/constructor/attachMenuBots">attachMenuBots</a> - Represents a list of <a href="/api/bots/attach">bot mini apps that can be launched from the attachment menu »</a></li>
|
||||
<li>Added <a href="/constructor/attachMenuBotsBot">attachMenuBotsBot</a> - Represents a <a href="/api/bots/attach">bot mini app that can be launched from the attachment menu »</a></li>
|
||||
<li>Added <a href="/constructor/updateAttachMenuBots">updateAttachMenuBots</a> - The list of installed <a href="/api/bots/attach">attachment menu entries »</a> has changed, use <a href="/method/messages.getAttachMenuBots">messages.getAttachMenuBots</a> to fetch the updated list.</li>
|
||||
<li>Added <a href="/constructor/webViewResultUrl">webViewResultUrl</a> - Contains the webview URL with appropriate theme and user info parameters added</li>
|
||||
<li>Added <a href="/constructor/simpleWebViewResultUrl">simpleWebViewResultUrl</a> - Contains the webview URL with appropriate theme parameters added</li>
|
||||
<li>Added <a href="/constructor/webViewMessageSent">webViewMessageSent</a> - Info about a sent inline webview message</li>
|
||||
<li>Added <a href="/constructor/updateWebViewResultSent">updateWebViewResultSent</a> - Indicates to a bot that a webview was closed and an inline message was sent on behalf of the user using <a href="/method/messages.sendWebViewResultMessage">messages.sendWebViewResultMessage</a></li>
|
||||
<li>Added <a href="/constructor/keyboardButtonWebView">keyboardButtonWebView</a> - Button to open a <a href="/api/bots/webapps">bot web app</a> using <a href="/method/messages.requestWebView">messages.requestWebView</a>, sending over user information after user confirmation.</li>
|
||||
<li>Added <a href="/constructor/keyboardButtonSimpleWebView">keyboardButtonSimpleWebView</a> - Button to open a <a href="/api/bots/webapps">bot web app</a> using <a href="/method/messages.requestSimpleWebView">messages.requestSimpleWebView</a>, without sending user information to the web app.</li>
|
||||
<li>Added <a href="/constructor/messageActionWebViewDataSentMe">messageActionWebViewDataSentMe</a> - Data from an opened <a href="/api/bots/webapps">reply keyboard bot web app</a> was relayed to the bot that owns it (bot side service message).</li>
|
||||
<li>Added <a href="/constructor/messageActionWebViewDataSent">messageActionWebViewDataSent</a> - Data from an opened <a href="/api/bots/webapps">reply keyboard bot web app</a> was relayed to the bot that owns it (user side service message).</li>
|
||||
<li>Added <a href="/constructor/keyboardButtonWebView">keyboardButtonWebView</a> - Button to open a <a href="/api/bots/webapps">bot mini app</a> using <a href="/method/messages.requestWebView">messages.requestWebView</a>, sending over user information after user confirmation.</li>
|
||||
<li>Added <a href="/constructor/keyboardButtonSimpleWebView">keyboardButtonSimpleWebView</a> - Button to open a <a href="/api/bots/webapps">bot mini app</a> using <a href="/method/messages.requestSimpleWebView">messages.requestSimpleWebView</a>, without sending user information to the web app.</li>
|
||||
<li>Added <a href="/constructor/messageActionWebViewDataSentMe">messageActionWebViewDataSentMe</a> - Data from an opened <a href="/api/bots/webapps">reply keyboard bot mini app</a> was relayed to the bot that owns it (bot side service message).</li>
|
||||
<li>Added <a href="/constructor/messageActionWebViewDataSent">messageActionWebViewDataSent</a> - Data from an opened <a href="/api/bots/webapps">reply keyboard bot mini app</a> was relayed to the bot that owns it (user side service message).</li>
|
||||
<li>Added <a href="/constructor/updateBotMenuButton">updateBotMenuButton</a> - The menu button behavior for the specified bot has changed</li>
|
||||
<li>Added <a href="/constructor/botMenuButtonDefault">botMenuButtonDefault</a> - Placeholder <a href="/api/bots/menu">bot menu button</a> never returned to users: see <a href="/api/bots/menu">the docs for more info</a>.</li>
|
||||
<li>Added <a href="/constructor/botMenuButtonCommands">botMenuButtonCommands</a> - <a href="/api/bots/menu">Bot menu button</a> that opens the bot command list when clicked.</li>
|
||||
|
|
|
@ -884,10 +884,10 @@ tg://resolve?domain=<bot_username>&startgroup&admin=<permission
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3><a class="anchor" href="#named-bot-web-app-links" id="named-bot-web-app-links" name="named-bot-web-app-links"><i class="anchor-icon"></i></a>Named bot web app links</h3>
|
||||
<p>Used to share <a href="/api/bots/webapps#named-bot-web-apps">named bot web apps</a>. </p>
|
||||
<p>These links are different from <a href="#bot-attachment-menu-links">bot attachment menu deep links</a>, because they don't require the user to install an attachment menu, and a single bot can offer multiple named web apps, distinguished by their <code>short_name</code>. </p>
|
||||
<p>These links should be handled as specified in the <a href="/api/bots/webapps#named-bot-web-apps">named bot web app documentation »</a>. </p>
|
||||
<h3><a class="anchor" href="#named-bot-mini-app-links" id="named-bot-mini-app-links" name="named-bot-mini-app-links"><i class="anchor-icon"></i></a>Named bot mini app links</h3>
|
||||
<p>Used to share <a href="/api/bots/webapps#named-bot-mini-apps">named bot mini apps</a>. </p>
|
||||
<p>These links are different from <a href="#bot-attachment-menu-links">bot attachment menu deep links</a>, because they don't require the user to install an attachment menu, and a single bot can offer multiple named mini apps, distinguished by their <code>short_name</code>. </p>
|
||||
<p>These links should be handled as specified in the <a href="/api/bots/webapps#named-bot-mini-apps">named bot mini app documentation »</a>. </p>
|
||||
<p><code>t.me</code> syntax:</p>
|
||||
<pre><code>t.me/<bot_username>/<short_name>?startapp=<start_parameter></code></pre>
|
||||
<p><code>tg:</code> syntax:</p>
|
||||
|
@ -910,7 +910,7 @@ tg://resolve?domain=<bot_username>&startgroup&admin=<permission
|
|||
<tr>
|
||||
<td><code>appname</code></td>
|
||||
<td style="text-align: center;">Required</td>
|
||||
<td>Web app short name, to pass to <a href="/constructor/inputBotAppShortName">inputBotAppShortName</a>.<code>short_name</code> when invoking <a href="/method/messages.getBotApp">messages.getBotApp</a></td>
|
||||
<td>Mini app short name, to pass to <a href="/constructor/inputBotAppShortName">inputBotAppShortName</a>.<code>short_name</code> when invoking <a href="/method/messages.getBotApp">messages.getBotApp</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>startapp</code></td>
|
||||
|
@ -1118,7 +1118,7 @@ For all link types, clients should:</p>
|
|||
<li>Check that the associated bot username has an associated <a href="/api/bots/attach">attachment menu</a> as specified <a href="/api/bots/attach">here »</a>.</li>
|
||||
<li>If not installed, ask the user to <a href="/api/bots/attach">install the attachment menu »</a>.</li>
|
||||
<li>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 attachment menu <a href="/api/bots/webapps#normal-web-apps">web app »</a></li>
|
||||
<li>If the chosen chat is supported, open the attachment menu <a href="/api/bots/webapps#normal-mini-apps">mini app »</a></li>
|
||||
<li>Otherwise:<ul>
|
||||
<li>If the user has just installed the attachment menu @ step 2, 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>
|
||||
|
@ -1128,7 +1128,7 @@ For all link types, clients should:</p>
|
|||
</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#open-in-current-chat" id="open-in-current-chat" name="open-in-current-chat"><i class="anchor-icon"></i></a>Open in current chat</h4>
|
||||
<p>Installs and opens an attachment menu web app in the currently open chat. </p>
|
||||
<p>Installs and opens an attachment menu mini app in the currently open chat. </p>
|
||||
<p><code>t.me</code> syntax:</p>
|
||||
<pre><code>t.me/<bot_username>?startattach
|
||||
t.me/<bot_username>?startattach=<start_parameter></code></pre>
|
||||
|
@ -1158,7 +1158,7 @@ tg://resolve?domain=<bot_username>&startattach=<start_parameter>
|
|||
</tbody>
|
||||
</table>
|
||||
<h4><a class="anchor" href="#open-in-specific-chat" id="open-in-specific-chat" name="open-in-specific-chat"><i class="anchor-icon"></i></a>Open in specific chat</h4>
|
||||
<p>Installs and opens an attachment menu web app in a specific chat. </p>
|
||||
<p>Installs and opens an attachment menu mini app in a specific chat. </p>
|
||||
<p><code>t.me</code> syntax:</p>
|
||||
<pre><code>t.me/<username>?attach=<bot_username>
|
||||
t.me/<username>?attach=<bot_username>&startattach=<start_parameter>
|
||||
|
@ -1182,12 +1182,12 @@ tg://resolve?phone=<phone_number>&attach=<bot_username>&star
|
|||
<tr>
|
||||
<td><code>username</code></td>
|
||||
<td style="text-align: center;">Required for <a href="#public-username-links">username links</a></td>
|
||||
<td>Username of chat where to open web app</td>
|
||||
<td>Username of chat where to open mini app</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>phone_number</code></td>
|
||||
<td style="text-align: center;">Required for <a href="#phone-number-links">phone number links</a></td>
|
||||
<td>Phone number of private chat where to open web app</td>
|
||||
<td>Phone number of private chat where to open mini app</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>bot_username</code></td>
|
||||
|
@ -1202,7 +1202,7 @@ tg://resolve?phone=<phone_number>&attach=<bot_username>&star
|
|||
</tbody>
|
||||
</table>
|
||||
<h4><a class="anchor" href="#open-in-any-chat" id="open-in-any-chat" name="open-in-any-chat"><i class="anchor-icon"></i></a>Open in any chat</h4>
|
||||
<p>Installs an attachment menu, opens a dialog selection form that will open the attachment menu web app in a specific chat. </p>
|
||||
<p>Installs an attachment menu, opens a dialog selection form that will open the attachment menu mini app in a specific chat. </p>
|
||||
<p><code>t.me</code> syntax:</p>
|
||||
<pre><code>t.me/<bot_username>?startattach&choose=users+bots+groups+channels
|
||||
t.me/<bot_username>?startattach=<start_parameter>&choose=users+bots+groups+channels</code></pre>
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
<div id="dev_page_content"><!-- scroll_nav -->
|
||||
|
||||
<p>How to work with geolocation-based features like geochats and the nearby users feature.</p>
|
||||
<h3><a class="anchor" href="#fetching-nearby-users--geogroups" id="fetching-nearby-users--geogroups" name="fetching-nearby-users--geogroups"><i class="anchor-icon"></i></a>Fetching nearby users & geogroups</h3>
|
||||
<h3><a class="anchor" href="#fetching-nearby-users-and-geogroups" id="fetching-nearby-users-and-geogroups" name="fetching-nearby-users-and-geogroups"><i class="anchor-icon"></i></a>Fetching nearby users and geogroups</h3>
|
||||
<pre><code><a href='/constructor/inputGeoPoint'>inputGeoPoint</a>#48222faf flags:<a href='/type/%23'>#</a> lat:<a href='/type/double'>double</a> long:<a href='/type/double'>double</a> accuracy_radius:flags.0?<a href='/type/int'>int</a> = <a href='/type/InputGeoPoint'>InputGeoPoint</a>;
|
||||
|
||||
---functions---
|
||||
|
@ -63,7 +63,7 @@
|
|||
<a href='/method/channels.createChannel'>channels.createChannel</a>#91006707 flags:<a href='/type/%23'>#</a> broadcast:flags.0?<a href='/constructor/true'>true</a> megagroup:flags.1?<a href='/constructor/true'>true</a> for_import:flags.3?<a href='/constructor/true'>true</a> forum:flags.5?<a href='/constructor/true'>true</a> title:<a href='/type/string'>string</a> about:<a href='/type/string'>string</a> geo_point:flags.2?<a href='/type/InputGeoPoint'>InputGeoPoint</a> address:flags.2?<a href='/type/string'>string</a> ttl_period:flags.4?<a href='/type/int'>int</a> = <a href='/type/Updates'>Updates</a>;
|
||||
|
||||
<a href='/method/channels.editLocation'>channels.editLocation</a>#58e63f6d channel:<a href='/type/InputChannel'>InputChannel</a> geo_point:<a href='/type/InputGeoPoint'>InputGeoPoint</a> address:<a href='/type/string'>string</a> = <a href='/type/Bool'>Bool</a>;</code></pre>
|
||||
<p>Pass a <code>geo_point</code> to <a href="/method/channels.createChannel">channels.createChannel</a> when creating a <a href="/api/channel">supergroup</a> in order to create a geogroup associated to a geolocation, that will be returned to <a href="#fetching-nearby-users--geogroups">nearby users »</a>. </p>
|
||||
<p>Pass a <code>geo_point</code> to <a href="/method/channels.createChannel">channels.createChannel</a> when creating a <a href="/api/channel">supergroup</a> in order to create a geogroup associated to a geolocation, that will be returned to <a href="#fetching-nearby-users-and-geogroups">nearby users »</a>. </p>
|
||||
<p>A textual description of the location (1-64 UTF-8 chars) should also be passed in <code>address</code>. </p>
|
||||
<p>Use <a href="/method/channels.editLocation">channels.editLocation</a> to change the group's location.</p>
|
||||
<h3><a class="anchor" href="#advertising-our-current-location" id="advertising-our-current-location" name="advertising-our-current-location"><i class="anchor-icon"></i></a>Advertising our current location</h3>
|
||||
|
@ -72,10 +72,10 @@
|
|||
---functions---
|
||||
|
||||
<a href='/method/contacts.getLocated'>contacts.getLocated</a>#d348bc44 flags:<a href='/type/%23'>#</a> background:flags.1?<a href='/constructor/true'>true</a> geo_point:<a href='/type/InputGeoPoint'>InputGeoPoint</a> self_expires:flags.0?<a href='/type/int'>int</a> = <a href='/type/Updates'>Updates</a>;</code></pre>
|
||||
<p>Our current location may be <a href="#fetching-nearby-users--geogroups">advertised to other users</a> using <a href="/method/contacts.getLocated">contacts.getLocated</a>: in this case the <code>self_expires</code> flag <strong>must always be set</strong>.</p>
|
||||
<p>Our current location may be <a href="#fetching-nearby-users-and-geogroups">advertised to other users</a> using <a href="/method/contacts.getLocated">contacts.getLocated</a>: in this case the <code>self_expires</code> flag <strong>must always be set</strong>.</p>
|
||||
<p>This flag is used to specify the expiration TTL of the passed geolocation (i.e. the geolocation will expire after <code>self_expires</code> seconds); pass `0x7fffffff`` to disable expiry, 0 to make the current geolocation private. </p>
|
||||
<p>The method will also return a list of nearby users and chats, but only if the passed expiration TTL is not equal to zero.<br>
|
||||
Users may still fetch nearby users and chats without making their geolocation public by simply not setting the flag, see <a href="#fetching-nearby-users--geogroups">here »</a> for more info. </p>
|
||||
Users may still fetch nearby users and chats without making their geolocation public by simply not setting the flag, see <a href="#fetching-nearby-users-and-geogroups">here »</a> for more info. </p>
|
||||
<p>While the geolocation of the current user is public, clients should update it in the background every half-an-hour or so (or in any case before the expiration date specified with <code>self_expires</code>), while setting this flag: if the new location is more than 1 KM away from the previous one, or if the previous location is unknown, the <code>background</code> flag should be set.</p></div>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -85,7 +85,7 @@ You can also attach an inline keyboard to the message using the <code>reply_mark
|
|||
|
||||
<a href='/method/payments.exportInvoice'>payments.exportInvoice</a>#f91b065 invoice_media:<a href='/type/InputMedia'>InputMedia</a> = <a href='/type/payments.ExportedInvoice'>payments.ExportedInvoice</a>;</code></pre>
|
||||
<p>Bots may also generate <a href="/api/links#invoice-links">invoice deep links</a> using <a href="/method/payments.exportInvoice">payments.exportInvoice</a>. </p>
|
||||
<p>The returned <a href="/constructor/payments.exportedInvoice">payments.exportedInvoice</a> will contain an <a href="/api/links#invoice-links">invoice deep link</a> that can be shared directly, or sent in a bot web app <a href="/api/web-events#web-app-open-invoice"><code>web_app_open_invoice</code> event</a>.</p>
|
||||
<p>The returned <a href="/constructor/payments.exportedInvoice">payments.exportedInvoice</a> will contain an <a href="/api/links#invoice-links">invoice deep link</a> that can be shared directly, or sent in a bot mini app <a href="/api/web-events#web-app-open-invoice"><code>web_app_open_invoice</code> event</a>.</p>
|
||||
<h3><a class="anchor" href="#2-order-information" id="2-order-information" name="2-order-information"><i class="anchor-icon"></i></a>2. Order information</h3>
|
||||
<h4><a class="anchor" href="#21-invoice" id="21-invoice" name="21-invoice"><i class="anchor-icon"></i></a>2.1 Invoice</h4>
|
||||
<pre><code><a href='/constructor/keyboardButtonBuy'>keyboardButtonBuy</a>#afd93fbb text:<a href='/type/string'>string</a> = <a href='/type/KeyboardButton'>KeyboardButton</a>;
|
||||
|
|
|
@ -111,9 +111,9 @@ These last two parameters are exactly the same, except that one uses absolute, t
|
|||
<p>Regularly, if new users have voted in polls available to the user, they will receive an <a href="/constructor/updateMessagePoll">updateMessagePoll</a>, with updated <a href="/constructor/pollResults">pollResults</a>. </p>
|
||||
<p>The same constructor can also be fetched manually using <a href="/method/messages.getPollResults">messages.getPollResults</a>.</p>
|
||||
<h3><a class="anchor" href="#getting-poll-voters-in-non-anonymous-polls" id="getting-poll-voters-in-non-anonymous-polls" name="getting-poll-voters-in-non-anonymous-polls"><i class="anchor-icon"></i></a>Getting poll voters in non-anonymous polls</h3>
|
||||
<pre><code><a href='/constructor/messageUserVote'>messageUserVote</a>#34d247b4 user_id:<a href='/type/long'>long</a> option:<a href='/type/bytes'>bytes</a> date:<a href='/type/int'>int</a> = <a href='/type/MessageUserVote'>MessageUserVote</a>;
|
||||
<a href='/constructor/messageUserVoteInputOption'>messageUserVoteInputOption</a>#3ca5b0ec user_id:<a href='/type/long'>long</a> date:<a href='/type/int'>int</a> = <a href='/type/MessageUserVote'>MessageUserVote</a>;
|
||||
<a href='/constructor/messageUserVoteMultiple'>messageUserVoteMultiple</a>#8a65e557 user_id:<a href='/type/long'>long</a> options:<a href='/type/Vector%20t'>Vector</a><<a href='/type/bytes'>bytes</a>> date:<a href='/type/int'>int</a> = <a href='/type/MessageUserVote'>MessageUserVote</a>;
|
||||
<pre><code><a href='/constructor/messagePeerVote'>messagePeerVote</a>#b6cc2d5c peer:<a href='/type/Peer'>Peer</a> option:<a href='/type/bytes'>bytes</a> date:<a href='/type/int'>int</a> = <a href='/type/MessagePeerVote'>MessagePeerVote</a>;
|
||||
<a href='/constructor/messagePeerVoteInputOption'>messagePeerVoteInputOption</a>#74cda504 peer:<a href='/type/Peer'>Peer</a> date:<a href='/type/int'>int</a> = <a href='/type/MessagePeerVote'>MessagePeerVote</a>;
|
||||
<a href='/constructor/messagePeerVoteMultiple'>messagePeerVoteMultiple</a>#4628f6e6 peer:<a href='/type/Peer'>Peer</a> options:<a href='/type/Vector%20t'>Vector</a><<a href='/type/bytes'>bytes</a>> date:<a href='/type/int'>int</a> = <a href='/type/MessagePeerVote'>MessagePeerVote</a>;
|
||||
|
||||
<a href='/constructor/messages.votesList'>messages.votesList</a>#4899484e flags:<a href='/type/%23'>#</a> count:<a href='/type/int'>int</a> votes:<a href='/type/Vector%20t'>Vector</a><<a href='/type/MessagePeerVote'>MessagePeerVote</a>> chats:<a href='/type/Vector%20t'>Vector</a><<a href='/type/Chat'>Chat</a>> users:<a href='/type/Vector%20t'>Vector</a><<a href='/type/User'>User</a>> next_offset:flags.0?<a href='/type/string'>string</a> = <a href='/type/messages.VotesList'>messages.VotesList</a>;
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ Note that in order to obtain permission to post stories as a channel, it must be
|
|||
<ul>
|
||||
<li>If we're trying to send a story as a channel:<ul>
|
||||
<li>The current user is an administrator of the channel and has <a href="/constructor/chatAdminRights"><code>post_stories</code> admin rights</a>; otherwise, a <code>CHAT_ADMIN_REQUIRED</code> error is returned.</li>
|
||||
<li>AND the channel has <a href="#boosts">received enough boosts to post the story »</a>; otherwise, a <code>BOOSTS_REQUIRED</code> error is returned.</li>
|
||||
<li>AND the channel has <a href="/api/boost">received enough boosts to post the story »</a>; otherwise, a <code>BOOSTS_REQUIRED</code> error is returned.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>If we're trying to send a story as the current user:<ul>
|
||||
|
@ -94,13 +94,13 @@ Note that if any of the conditions changes in the period between the call to <a
|
|||
<li><code>media</code>: The story media.</li>
|
||||
<li><code>media_areas</code>: <a href="/api/stories#media-areas">Media areas</a> associated to the story, see <a href="/api/stories#media-areas">here »</a> for more info.</li>
|
||||
<li><code>privacy_rules</code>: A set of <a href="/api/privacy#privacy-rules">privacy rules »</a> for the story as an array of <a href="/type/InputPrivacyRule">InputPrivacyRule</a> constructors, indicating who can or can't view the story.</li>
|
||||
<li><code>expire</code>: Period after which the story is moved to <a href="#pinnedarchived-stories">archive</a> (and <a href="#pinnedarchived-stories">to the profile</a> if <code>pinned</code> is set), in seconds; must be one of <code>6 * 3600</code>, <code>12 * 3600</code>, <code>86400</code>, or <code>2 * 86400</code> for Telegram Premium users, and <code>86400</code> otherwise.</li>
|
||||
<li><code>pinned</code>: Whether to also <a href="#pinned-stories">add the story to the profile</a> automatically upon expiration. If not set, the story will only be added to the <a href="#pinnedarchived-stories">archive</a>. </li>
|
||||
<li><code>expire</code>: Period after which the story is moved to <a href="#pinned-or-archived-stories">archive</a> (and <a href="#pinned-or-archived-stories">to the profile</a> if <code>pinned</code> is set), in seconds; must be one of <code>6 * 3600</code>, <code>12 * 3600</code>, <code>86400</code>, or <code>2 * 86400</code> for Telegram Premium users, and <code>86400</code> otherwise.</li>
|
||||
<li><code>pinned</code>: Whether to also <a href="#pinned-or-archived-stories">add the story to the profile</a> automatically upon expiration. If not set, the story will only be added to the <a href="#pinned-or-archived-stories">archive</a>. </li>
|
||||
</ul>
|
||||
<p>Once a story is successfully uploaded, an <a href="/constructor/updateStoryID">updateStoryID</a> will be returned, indicating the story ID (<code>id</code>) that was attributed to the story (like for messages, <code>random_id</code> indicates the <code>random_id</code> that was passed to <a href="/method/stories.sendStory">stories.sendStory</a>: this way, you can tell which story was assigned a specific <code>id</code> by checking which <a href="/method/stories.sendStory">stories.sendStory</a> call has the returned <code>random_id</code>). </p>
|
||||
<p>Also, posting a story will emit an <a href="/constructor/updateStory">updateStory</a> both for us, and for our subscribers/contacts (even if they have <a href="#hiding-stories-of-other-users">hidden</a> our stories). </p>
|
||||
<p>A story may also be edited using <a href="/method/stories.editStory">stories.editStory</a>. </p>
|
||||
<h4><a class="anchor" href="#pinned-archived-stories" id="pinned-archived-stories" name="pinned-archived-stories"><i class="anchor-icon"></i></a>Pinned/archived stories</h4>
|
||||
<h4><a class="anchor" href="#pinned-or-archived-stories" id="pinned-or-archived-stories" name="pinned-or-archived-stories"><i class="anchor-icon"></i></a>Pinned or archived stories</h4>
|
||||
<pre><code><a href='/constructor/stories.stories'>stories.stories</a>#5dd8c3c8 count:<a href='/type/int'>int</a> stories:<a href='/type/Vector%20t'>Vector</a><<a href='/type/StoryItem'>StoryItem</a>> chats:<a href='/type/Vector%20t'>Vector</a><<a href='/type/Chat'>Chat</a>> users:<a href='/type/Vector%20t'>Vector</a><<a href='/type/User'>User</a>> = <a href='/type/stories.Stories'>stories.Stories</a>;
|
||||
|
||||
---functions---
|
||||
|
@ -157,7 +157,7 @@ Use <a href="/method/stories.getAllStories">stories.getAllStories</a> to fetch t
|
|||
<li>Initially, neither the <code>next</code> or <code>state</code> flags should be set: upon completion of the RPC call, a new <code>state</code> string is returned and should be stored locally, associated either to the main or hidden story list (depending on the value of <code>hidden</code> we passed); pass the locally stored <code>state</code> to all future calls of the method. </li>
|
||||
<li>If more stories are available, the returned <a href="/constructor/stories.allStories">stories.allStories</a>.<code>has_more</code> flag will be set: in this case, the client should re-call the method with the newly returned <code>state</code> <strong>and</strong> the <code>next</code> flag set to fetch a new <code>state</code> and the remaining stories from the chosen story list; the process should be repeated until no more stories are available (<code>has_more</code> will <strong>not</strong> be set). </li>
|
||||
</ul>
|
||||
<p>Once the full story list is fetched, <a href="/constructor/stories.allStories">stories.allStories</a> can be called with the stored <code>state</code> <strong>without</strong> setting the <code>next</code> flag to check for updates in an active story list: if no changes have occurred since our last call, <a href="/method/stories.allStoriesNotModified">stories.allStoriesNotModified</a> is returned, otherwise <a href="/constructor/stories.allStories">stories.allStories</a> is returned (possibly requiring further pagination as described above).<br>
|
||||
<p>Once the full story list is fetched, <a href="/constructor/stories.allStories">stories.allStories</a> can be called with the stored <code>state</code> <strong>without</strong> setting the <code>next</code> flag to check for updates in an active story list: if no changes have occurred since our last call, <a href="/constructor/stories.allStoriesNotModified">stories.allStoriesNotModified</a> is returned, otherwise <a href="/constructor/stories.allStories">stories.allStories</a> is returned (possibly requiring further pagination as described above).<br>
|
||||
Note that a change is currently only defined as an addition or removal (i.e. by moving it to the hidden list or vice versa) of a peer to/from a story list, not as a new story being posted; those changes are received as simple <a href="/constructor/updateStory">updateStory</a> updates. </p>
|
||||
<p>Changes to the active stories list are contained in the <a href="/constructor/stories.allStories">stories.allStories</a>.<code>peer_stories</code> field: this field contains a vector of <a href="/constructor/peerStories">peerStories</a> constructors, one for each peer, containing the peer ID, the ID of the maximum read story (if any), and a list of <a href="/type/StoryItem">StoryItem</a> constructors of type:</p>
|
||||
<ul>
|
||||
|
@ -179,7 +179,7 @@ Use <a href="/method/stories.getAllReadPeerStories">stories.getAllReadPeerStorie
|
|||
<a href='/method/stories.toggleAllStoriesHidden'>stories.toggleAllStoriesHidden</a>#7c2557c4 hidden:<a href='/type/Bool'>Bool</a> = <a href='/type/Bool'>Bool</a>;</code></pre>
|
||||
<p>Use <a href="/method/stories.toggleAllStoriesHidden">stories.togglePeerStoriesHidden</a> to hide the active stories of a specific peer, preventing them from being displayed on the action bar on the homescreen.<br>
|
||||
When the stories of a user are marked as hidden, the <code>stories_hidden</code> flag is set on the related <a href="/constructor/user">user</a> constructor, and they should only be visible on the action bar when opening the <a href="/api/folders#peer-folders">archive folder</a>, by setting the <code>hidden</code> flag when calling <a href="/method/stories.getAllStories">stories.getAllStories</a>, see <a href="#watching-stories">here</a> for more info. </p>
|
||||
<p>Note that the <a href="/api/folders#peer-folders">archive folder is the peer folder used for archived chats</a>: hidden stories are displayed there purely due to a UI implementation detail, not because they're actually added to the <a href="/api/folders#peer-folders">archive peer folder »</a> or the <a href="#pinnedarchived-stories">story archive »</a>, which are different things. </p>
|
||||
<p>Note that the <a href="/api/folders#peer-folders">archive folder is the peer folder used for archived chats</a>: hidden stories are displayed there purely due to a UI implementation detail, not because they're actually added to the <a href="/api/folders#peer-folders">archive peer folder »</a> or the <a href="#pinned-or-archived-stories">story archive »</a>, which are different things. </p>
|
||||
<h3><a class="anchor" href="#fetching-the-viewer-list" id="fetching-the-viewer-list" name="fetching-the-viewer-list"><i class="anchor-icon"></i></a>Fetching the viewer list</h3>
|
||||
<pre><code><a href='/constructor/storyView'>storyView</a>#b0bdeac5 flags:<a href='/type/%23'>#</a> blocked:flags.0?<a href='/constructor/true'>true</a> blocked_my_stories_from:flags.1?<a href='/constructor/true'>true</a> user_id:<a href='/type/long'>long</a> date:<a href='/type/int'>int</a> reaction:flags.2?<a href='/type/Reaction'>Reaction</a> = <a href='/type/StoryView'>StoryView</a>;
|
||||
<a href='/constructor/stories.storyViewsList'>stories.storyViewsList</a>#46e9b9ec flags:<a href='/type/%23'>#</a> count:<a href='/type/int'>int</a> reactions_count:<a href='/type/int'>int</a> views:<a href='/type/Vector%20t'>Vector</a><<a href='/type/StoryView'>StoryView</a>> users:<a href='/type/Vector%20t'>Vector</a><<a href='/type/User'>User</a>> next_offset:flags.0?<a href='/type/string'>string</a> = <a href='/type/stories.StoryViewsList'>stories.StoryViewsList</a>;
|
||||
|
@ -249,7 +249,7 @@ When the stories of a user are marked as hidden, the <code>stories_hidden</code>
|
|||
<a href='/constructor/mediaAreaVenue'>mediaAreaVenue</a>#be82db9c coordinates:<a href='/type/MediaAreaCoordinates'>MediaAreaCoordinates</a> geo:<a href='/type/GeoPoint'>GeoPoint</a> title:<a href='/type/string'>string</a> address:<a href='/type/string'>string</a> provider:<a href='/type/string'>string</a> venue_id:<a href='/type/string'>string</a> venue_type:<a href='/type/string'>string</a> = <a href='/type/MediaArea'>MediaArea</a>;
|
||||
|
||||
<a href='/constructor/inputMediaAreaVenue'>inputMediaAreaVenue</a>#b282217f coordinates:<a href='/type/MediaAreaCoordinates'>MediaAreaCoordinates</a> query_id:<a href='/type/long'>long</a> result_id:<a href='/type/string'>string</a> = <a href='/type/MediaArea'>MediaArea</a>;</code></pre>
|
||||
<p>Location tags are represented by a <a href="/constructor/mediaAreaVenue">mediaAreaVenue</a> or <a href="/constructor/mediaAreaGeoPoint">mediaAreaGeoPoint</a>, associated to a location sticker on top of the story media with an associated <a href="#media-area">clickable media area</a>. </p>
|
||||
<p>Location tags are represented by a <a href="/constructor/mediaAreaVenue">mediaAreaVenue</a> or <a href="/constructor/mediaAreaGeoPoint">mediaAreaGeoPoint</a>, associated to a location sticker on top of the story media with an associated <a href="#media-areas">clickable media area</a>. </p>
|
||||
<p>Both constructors have an associated geolocation represented as a <a href="/constructor/geoPoint">geoPoint</a>, and information about the clickable media area on top of the story media as a <a href="/constructor/mediaAreaCoordinates">mediaAreaCoordinates</a> constructor. </p>
|
||||
<p><a href="/constructor/mediaAreaGeoPoint">mediaAreaGeoPoint</a> is used to represent a simple geolocation without any extra information.<br>
|
||||
<a href="/constructor/mediaAreaVenue">mediaAreaVenue</a> is used to represent the location of a specific venue (i.e. a mall, a shop, a dance school et cetera), and apart from the venue's coordinates, it also contains a textual representation of the address, the venue name (<code>title</code>) and a venue type/ID (<code>venue_id</code>/<code>venue_type</code>) in a format supported by the venue provider specified in <code>provider</code>. </p>
|
||||
|
|
|
@ -44,10 +44,10 @@
|
|||
|
||||
<div id="dev_page_content"><!-- scroll_nav -->
|
||||
|
||||
<p>When interacting with HTML5 games, websites of payment gateways and <a href="/api/bots/webapps">bot web apps</a>, Telegram apps should expose APIs to allow receiving data and events from the websites.</p>
|
||||
<p>When interacting with HTML5 games, websites of payment gateways and <a href="/api/bots/webapps">bot mini apps</a>, Telegram apps should expose APIs to allow receiving data and events from the websites.</p>
|
||||
<h3><a class="anchor" href="#event-apis" id="event-apis" name="event-apis"><i class="anchor-icon"></i></a>Event APIs</h3>
|
||||
<p>Games, payment gateways and <a href="/api/bots/webapps">bot web apps</a> can generate events that are meant to be received by the Telegram apps.
|
||||
Typically events are generated by using the <code>postEvent</code> method of the <a href="https://github.com/TelegramMessenger/GamingCommunication/blob/master/games.js">GamingCommunication library</a>, or by the <a href="/bots/webapps#initializing-web-apps">bot web apps library</a>.<br>
|
||||
<p>Games, payment gateways and <a href="/api/bots/webapps">bot mini apps</a> can generate events that are meant to be received by the Telegram apps.
|
||||
Typically events are generated by using the <code>postEvent</code> method of the <a href="https://github.com/TelegramMessenger/GamingCommunication/blob/master/games.js">GamingCommunication library</a>, or by the <a href="/bots/webapps#initializing-mini-apps">bot mini apps library</a>.<br>
|
||||
The <code>postEvent</code> function will try sending the event to the Telegram app in a number of different ways.</p>
|
||||
<h4><a class="anchor" href="#webviewproxy" id="webviewproxy" name="webviewproxy"><i class="anchor-icon"></i></a>WebviewProxy</h4>
|
||||
<p>In mobile apps, the event receiver API should be typically exposed as a <code>window.TelegramWebviewProxy</code> object with a <code>postEvent</code> method.</p>
|
||||
|
@ -56,14 +56,14 @@ The <code>postEvent</code> function will try sending the event to the Telegram a
|
|||
<p>Alternatively, a <code>window.external.notify</code> method can be exposed, accepting a string JSON payload with the event type and payload:</p>
|
||||
<pre><code>window.external.notify(JSON.stringify({eventType: eventType, eventData: eventData}));</code></pre>
|
||||
<h4><a class="anchor" href="#postmessage-api" id="postmessage-api" name="postmessage-api"><i class="anchor-icon"></i></a>postMessage API</h4>
|
||||
<p>Finally, web MTProto clients that need to open a game, open a <a href="/api/bots/webapps">bot web app</a> or process a payment in an iframe can use the <a href="https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage">postMessage API</a> to receive events from iframes.<br>
|
||||
The GamingCommunication and bot web apps libraries by default will use <code>'*'</code> as <code>targetOrigin</code>, sending messages to parent pages regardless of the origin of the embedder.</p>
|
||||
<p>Finally, web MTProto clients that need to open a game, open a <a href="/api/bots/webapps">bot mini app</a> or process a payment in an iframe can use the <a href="https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage">postMessage API</a> to receive events from iframes.<br>
|
||||
The GamingCommunication and bot mini apps libraries by default will use <code>'*'</code> as <code>targetOrigin</code>, sending messages to parent pages regardless of the origin of the embedder.</p>
|
||||
<pre><code>window.parent.postMessage(JSON.stringify({eventType: eventType, eventData: eventData}), targetOrigin);</code></pre>
|
||||
<h3><a class="anchor" href="#event-types" id="event-types" name="event-types"><i class="anchor-icon"></i></a>Event types</h3>
|
||||
<p><code>eventType</code> is a simple string indicating the event type, and <code>eventData</code> is a payload with an object that will be parsed by the Telegram app.</p>
|
||||
<h4><a class="anchor" href="#web-app-close" id="web-app-close" name="web-app-close"><i class="anchor-icon"></i></a><code>web_app_close</code></h4>
|
||||
<p>No event payload. </p>
|
||||
<p>Emitted by <a href="/api/bots/webapps">bot web apps</a> when the web app webview should be closed.</p>
|
||||
<p>Emitted by <a href="/api/bots/webapps">bot mini apps</a> when the mini app webview should be closed.</p>
|
||||
<h4><a class="anchor" href="#web-app-open-popup" id="web-app-open-popup" name="web-app-open-popup"><i class="anchor-icon"></i></a><code>web_app_open_popup</code></h4>
|
||||
<p>Event data: a JSON object with the following fields (which should be properly validated by the client).</p>
|
||||
<ul>
|
||||
|
@ -76,10 +76,10 @@ The GamingCommunication and bot web apps libraries by default will use <code>'*'
|
|||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<p>Emitted by <a href="/api/bots/webapps">bot web apps</a> when to open a native pop-up over the webview.</p>
|
||||
<p>Emitted by <a href="/api/bots/webapps">bot mini apps</a> when to open a native pop-up over the webview.</p>
|
||||
<p>By default, buttons should be displayed on one row.<br>
|
||||
If the web app provides two buttons that can't fit horizontally on one row, display each button on a separate row.<br>
|
||||
If the web app provides three buttons, always display each button on a separate row. </p>
|
||||
If the mini app provides two buttons that can't fit horizontally on one row, display each button on a separate row.<br>
|
||||
If the mini app provides three buttons, always display each button on a separate row. </p>
|
||||
<ul>
|
||||
<li>If the user presses any of the buttons, call <code>window.Telegram.WebView.receiveEvent("popup_closed", {"button_id": "<button id>"})</code></li>
|
||||
<li>If the user cancels the interaction without pressing any of the specified buttons, call <code>window.Telegram.WebView.receiveEvent("popup_closed", {})</code></li>
|
||||
|
@ -91,17 +91,17 @@ While handling is enabled, maximum 3 consecutive valid events of this type can b
|
|||
<p>If equal to <code>true</code>, the client should require user confirmation with a "Changes that you made may not be saved." popup with "Cancel"/"Close anyway" buttons before closing the webview, to avoid accidentally aborting a sensitive operation; otherwise no confirmation should be requested. </p>
|
||||
<h4><a class="anchor" href="#web-app-set-background-color" id="web-app-set-background-color" name="web-app-set-background-color"><i class="anchor-icon"></i></a><code>web_app_set_background_color</code></h4>
|
||||
<p>Event data: a JSON object with a string <code>color</code> with a hex RGB color. </p>
|
||||
<p>Used to set the web app background and lower overscroll color. </p>
|
||||
<p>Used to set the mini app background and lower overscroll color. </p>
|
||||
<h4><a class="anchor" href="#web-app-set-header-color" id="web-app-set-header-color" name="web-app-set-header-color"><i class="anchor-icon"></i></a><code>web_app_set_header_color</code></h4>
|
||||
<p>Event data: a JSON object with a string <code>color_key</code>, with of the following values:</p>
|
||||
<ul>
|
||||
<li><code>bg_color</code> - The <code>bg_color</code> from the <a href="/api/bots/webapps#theme-parameters">theme parameters</a> should be used.</li>
|
||||
<li><code>secondary_bg_color</code> - The <code>secondary_bg_color</code> from the <a href="/api/bots/webapps#theme-parameters">theme parameters</a> should be used.</li>
|
||||
</ul>
|
||||
<p>Used to set the web app header and upper overscroll color. </p>
|
||||
<p>Used to set the mini app header and upper overscroll color. </p>
|
||||
<h4><a class="anchor" href="#web-app-data-send" id="web-app-data-send" name="web-app-data-send"><i class="anchor-icon"></i></a><code>web_app_data_send</code></h4>
|
||||
<p>Event data: a JSON object with a string <code>data</code> field. </p>
|
||||
<p>Used by <a href="/api/bots/webapps#simple-web-apps">simple webapps</a> to send back data to the bot as specified <a href="/api/bots/webapps#simple-web-apps">here »</a>. The Web App will be closed. </p>
|
||||
<p>Used by <a href="/api/bots/webapps#simple-mini-apps">simple mini apps</a> to send back data to the bot as specified <a href="/api/bots/webapps#simple-mini-apps">here »</a>. The Mini App will be closed. </p>
|
||||
<h4><a class="anchor" href="#web-app-trigger-haptic-feedback" id="web-app-trigger-haptic-feedback" name="web-app-trigger-haptic-feedback"><i class="anchor-icon"></i></a><code>web_app_trigger_haptic_feedback</code></h4>
|
||||
<p>Event data: a JSON object with the following fields:</p>
|
||||
<ul>
|
||||
|
@ -129,32 +129,32 @@ While handling is enabled, maximum 3 consecutive valid events of this type can b
|
|||
<p>Used to trigger haptic feedback for a user interaction in a webapp.</p>
|
||||
<h4><a class="anchor" href="#web-app-open-link" id="web-app-open-link" name="web-app-open-link"><i class="anchor-icon"></i></a><code>web_app_open_link</code></h4>
|
||||
<p>Event data: a JSON object with a string <code>url</code> field. </p>
|
||||
<p>Used to open a link in an external browser (or in a new tab for browser clients). The Web App will not be closed. </p>
|
||||
<p>Note that this method can be called only in response to the user interaction with the Web App interface (e.g. a click inside the Web App or on the main button).<br>
|
||||
After opening the URL, further events of this type should be ignored until the user interacts again with the Web App interface (as above).<br>
|
||||
Note that user interactions must have a TTL of 10 seconds: events of this type must be ignored if the last Web App user interaction happened more than 10 seconds ago.</p>
|
||||
<p>Used to open a link in an external browser (or in a new tab for browser clients). The Mini App will not be closed. </p>
|
||||
<p>Note that this method can be called only in response to the user interaction with the Mini App interface (e.g. a click inside the Mini App or on the main button).<br>
|
||||
After opening the URL, further events of this type should be ignored until the user interacts again with the Mini App interface (as above).<br>
|
||||
Note that user interactions must have a TTL of 10 seconds: events of this type must be ignored if the last Mini App user interaction happened more than 10 seconds ago.</p>
|
||||
<h4><a class="anchor" href="#web-app-open-tg-link" id="web-app-open-tg-link" name="web-app-open-tg-link"><i class="anchor-icon"></i></a><code>web_app_open_tg_link</code></h4>
|
||||
<p>Event data: a JSON object with a string <code>path_full</code> field, containing the path+query component of a <a href="/api/links">t.me deep link</a> (<code>url = 'https://t.me' + path_full</code>). </p>
|
||||
<p>Used to open a <a href="/api/links">t.me deep link</a>. The Web App must be closed.</p>
|
||||
<p>Used to open a <a href="/api/links">t.me deep link</a>. The Mini App must be closed.</p>
|
||||
<h4><a class="anchor" href="#web-app-open-invoice" id="web-app-open-invoice" name="web-app-open-invoice"><i class="anchor-icon"></i></a><code>web_app_open_invoice</code></h4>
|
||||
<p>Event data: a JSON object with a string <code>slug</code> field, containing an <a href="/api/links#invoice-links">invoice deep link</a>.</p>
|
||||
<p>Used to initiate <a href="/api/payments">payment of an invoice »</a>, by opening an invoice popup over the Web App: the Web App itself must not be closed. </p>
|
||||
<p>The payment status must be reported back to the web app using <a href="/api/bots/webapps#invoice-closed">invoice_closed</a>.</p>
|
||||
<p>Used to initiate <a href="/api/payments">payment of an invoice »</a>, by opening an invoice popup over the Mini App: the Mini App itself must not be closed. </p>
|
||||
<p>The payment status must be reported back to the mini app using <a href="/api/bots/webapps#invoice-closed">invoice_closed</a>.</p>
|
||||
<h4><a class="anchor" href="#web-app-expand" id="web-app-expand" name="web-app-expand"><i class="anchor-icon"></i></a><code>web_app_expand</code></h4>
|
||||
<p>No event payload.</p>
|
||||
<p>Expands the web app to the maximum available height.<br>
|
||||
The web app must also be expanded when the user swipes up on the webview. </p>
|
||||
<p>Expands the mini app to the maximum available height.<br>
|
||||
The mini app must also be expanded when the user swipes up on the webview. </p>
|
||||
<p>This event must be ignored <em>during</em> a user swipe down, used to reduce the webview.</p>
|
||||
<h4><a class="anchor" href="#web-app-request-viewport" id="web-app-request-viewport" name="web-app-request-viewport"><i class="anchor-icon"></i></a><code>web_app_request_viewport</code></h4>
|
||||
<p>No event payload.</p>
|
||||
<p>Used by web apps to request information about the viewport, clients should emit a <a href="/api/bots/webapps#viewport-changed">viewport_changed event</a>.</p>
|
||||
<p>Used by mini apps to request information about the viewport, clients should emit a <a href="/api/bots/webapps#viewport-changed">viewport_changed event</a>.</p>
|
||||
<h4><a class="anchor" href="#web-app-request-theme" id="web-app-request-theme" name="web-app-request-theme"><i class="anchor-icon"></i></a><code>web_app_request_theme</code></h4>
|
||||
<p>No event payload.</p>
|
||||
<p>Used by web apps to request information about the current theme, clients should emit a <a href="/api/bots/webapps#theme-changed">theme_changed event</a>.</p>
|
||||
<p>Used by mini apps to request information about the current theme, clients should emit a <a href="/api/bots/webapps#theme-changed">theme_changed event</a>.</p>
|
||||
<h4><a class="anchor" href="#web-app-ready" id="web-app-ready" name="web-app-ready"><i class="anchor-icon"></i></a><code>web_app_ready</code></h4>
|
||||
<p>No event payload.</p>
|
||||
<p>Emitted by web apps when they are fully loaded, signaling to client apps that the loading spinner placeholder can be removed. </p>
|
||||
<p>Note that there is no guarantee that this event will be emitted when the web app is fully loaded: clients should remove the loading spinner upon receiving this event or when the page finishes loading (native webview/iframe event), whichever event comes first.</p>
|
||||
<p>Emitted by mini apps when they are fully loaded, signaling to client apps that the loading spinner placeholder can be removed. </p>
|
||||
<p>Note that there is no guarantee that this event will be emitted when the mini app is fully loaded: clients should remove the loading spinner upon receiving this event or when the page finishes loading (native webview/iframe event), whichever event comes first.</p>
|
||||
<h4><a class="anchor" href="#web-app-setup-main-button" id="web-app-setup-main-button" name="web-app-setup-main-button"><i class="anchor-icon"></i></a><code>web_app_setup_main_button</code></h4>
|
||||
<p>Event payload: JSON object with the following fields:</p>
|
||||
<ul>
|
||||
|
@ -166,8 +166,8 @@ The web app must also be expanded when the user swipes up on the webview. </p>
|
|||
<li><code>is_progress_visible</code> - Indicates whether the button should display a loading indicator (boolean, false by default)</li>
|
||||
</ul>
|
||||
<p>Configures the main button, located immediately below the webview: when the user presses it a <a href="/api/bots/webapps#main-button-pressed"><code>main_button_pressed</code> event should be emitted by the client</a>. </p>
|
||||
<p>Some clients implement a horizontal media type tab bar located at the bottom of the screen, opened when the user clicks on the attachment menu button: this tab bar contains a horizontal list of buttons used to attach media of a certain type and to open installed <a href="/api/bots/attach">attachment menu web apps</a>.<br>
|
||||
In clients that implements a tab bar, iff the user opens a web app through a tab bar button and the web app emits a <code>web_app_setup_main_button</code> with <code>is_visible=true</code>, the main button should be displayed (replacing the tab bar) only after the first tap inside of the webview, to prevent bots from immediately blocking the tab bar. </p>
|
||||
<p>Some clients implement a horizontal media type tab bar located at the bottom of the screen, opened when the user clicks on the attachment menu button: this tab bar contains a horizontal list of buttons used to attach media of a certain type and to open installed <a href="/api/bots/attach">attachment menu mini apps</a>.<br>
|
||||
In clients that implements a tab bar, iff the user opens a mini app through a tab bar button and the mini app emits a <code>web_app_setup_main_button</code> with <code>is_visible=true</code>, the main button should be displayed (replacing the tab bar) only after the first tap inside of the webview, to prevent bots from immediately blocking the tab bar. </p>
|
||||
<p>Otherwise, the main button can be displayed right away with no user interaction when receiving a <code>web_app_setup_main_button</code> event with <code>is_visible=true</code>. </p>
|
||||
<h4><a class="anchor" href="#web-app-setup-back-button" id="web-app-setup-back-button" name="web-app-setup-back-button"><i class="anchor-icon"></i></a><code>web_app_setup_back_button</code></h4>
|
||||
<p>Event data: a JSON object with an <code>is_visible</code> boolean field.</p>
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>appWebViewResultUrl</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Contains the link that must be used to open a named bot web app.">
|
||||
<meta property="description" content="Contains the link that must be used to open a named bot mini app.">
|
||||
<meta property="og:title" content="appWebViewResultUrl">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Contains the link that must be used to open a named bot web app.">
|
||||
<meta property="og:description" content="Contains the link that must be used to open a named bot mini app.">
|
||||
<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">
|
||||
|
@ -42,7 +42,7 @@
|
|||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/appWebViewResultUrl" >appWebViewResultUrl</a></li></ul></div>
|
||||
<h1 id="dev_page_title">appWebViewResultUrl</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Contains the link that must be used to open a <a href="/api/bots/webapps#named-bot-web-apps">named bot web app</a>.</p>
|
||||
<div id="dev_page_content"><p>Contains the link that must be used to open a <a href="/api/bots/webapps#named-bot-mini-apps">named bot mini app</a>.</p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>attachMenuBot</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Represents a bot web app that can be launched from the attachment menu »">
|
||||
<meta property="description" content="Represents a bot mini app that can be launched from the attachment menu »">
|
||||
<meta property="og:title" content="attachMenuBot">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Represents a bot web app that can be launched from the attachment menu »">
|
||||
<meta property="og:description" content="Represents a bot mini app that can be launched from the attachment menu »">
|
||||
<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">
|
||||
|
@ -42,7 +42,7 @@
|
|||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/attachMenuBot" >attachMenuBot</a></li></ul></div>
|
||||
<h1 id="dev_page_title">attachMenuBot</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Represents a <a href="/api/bots/attach">bot web app that can be launched from the attachment menu »</a></p>
|
||||
<div id="dev_page_content"><p>Represents a <a href="/api/bots/attach">bot mini app that can be launched from the attachment menu »</a></p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>attachMenuBotIcon</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Represents an attachment menu icon for bot web apps »">
|
||||
<meta property="description" content="Represents an attachment menu icon for bot mini apps »">
|
||||
<meta property="og:title" content="attachMenuBotIcon">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Represents an attachment menu icon for bot web apps »">
|
||||
<meta property="og:description" content="Represents an attachment menu icon for bot mini apps »">
|
||||
<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">
|
||||
|
@ -42,7 +42,7 @@
|
|||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/attachMenuBotIcon" >attachMenuBotIcon</a></li></ul></div>
|
||||
<h1 id="dev_page_title">attachMenuBotIcon</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Represents an attachment menu icon for <a href="/api/bots/attach">bot web apps »</a></p>
|
||||
<div id="dev_page_content"><p>Represents an attachment menu icon for <a href="/api/bots/attach">bot mini apps »</a></p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
@ -74,7 +74,7 @@
|
|||
<tr>
|
||||
<td><strong>name</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/string">string</a></td>
|
||||
<td>One of the following values: note that animated icons must be played when the user clicks on the button, activating the bot web app. <br><br><code>default_static</code> - Default attachment menu icon in SVG format <br><code>placeholder_static</code> - Default placeholder for opened Web Apps in SVG format <br><code>ios_static</code> - Attachment menu icon in SVG format for the official iOS app <br><code>ios_animated</code> - Animated attachment menu icon in TGS format for the official iOS app <br><code>android_animated</code> - Animated attachment menu icon in TGS format for the official Android app <br><code>macos_animated</code> - Animated attachment menu icon in TGS format for the official native Mac OS app</td>
|
||||
<td>One of the following values: note that animated icons must be played when the user clicks on the button, activating the bot mini app. <br><br><code>default_static</code> - Default attachment menu icon in SVG format <br><code>placeholder_static</code> - Default placeholder for opened Web Apps in SVG format <br><code>ios_static</code> - Attachment menu icon in SVG format for the official iOS app <br><code>ios_animated</code> - Animated attachment menu icon in TGS format for the official iOS app <br><code>android_animated</code> - Animated attachment menu icon in TGS format for the official Android app <br><code>macos_animated</code> - Animated attachment menu icon in TGS format for the official native Mac OS app</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>icon</strong></td>
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>attachMenuBotIconColor</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Represents an attachment menu icon color for bot web apps »">
|
||||
<meta property="description" content="Represents an attachment menu icon color for bot mini apps »">
|
||||
<meta property="og:title" content="attachMenuBotIconColor">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Represents an attachment menu icon color for bot web apps »">
|
||||
<meta property="og:description" content="Represents an attachment menu icon color for bot mini apps »">
|
||||
<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">
|
||||
|
@ -42,7 +42,7 @@
|
|||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/attachMenuBotIconColor" >attachMenuBotIconColor</a></li></ul></div>
|
||||
<h1 id="dev_page_title">attachMenuBotIconColor</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Represents an attachment menu icon color for <a href="/api/bots/attach">bot web apps »</a></p>
|
||||
<div id="dev_page_content"><p>Represents an attachment menu icon color for <a href="/api/bots/attach">bot mini apps »</a></p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>attachMenuBots</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Represents a list of bot web apps that can be launched from the attachment menu »">
|
||||
<meta property="description" content="Represents a list of bot mini apps that can be launched from the attachment menu »">
|
||||
<meta property="og:title" content="attachMenuBots">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Represents a list of bot web apps that can be launched from the attachment menu »">
|
||||
<meta property="og:description" content="Represents a list of bot mini apps that can be launched from the attachment menu »">
|
||||
<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">
|
||||
|
@ -42,7 +42,7 @@
|
|||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/attachMenuBots" >attachMenuBots</a></li></ul></div>
|
||||
<h1 id="dev_page_title">attachMenuBots</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Represents a list of <a href="/api/bots/attach">bot web apps that can be launched from the attachment menu »</a></p>
|
||||
<div id="dev_page_content"><p>Represents a list of <a href="/api/bots/attach">bot mini apps that can be launched from the attachment menu »</a></p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
@ -74,7 +74,7 @@
|
|||
<tr>
|
||||
<td><strong>bots</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/Vector%20t">Vector</a><<a href="/type/AttachMenuBot">AttachMenuBot</a>></td>
|
||||
<td>List of <a href="/api/bots/attach">bot web apps that can be launched from the attachment menu »</a></td>
|
||||
<td>List of <a href="/api/bots/attach">bot mini apps that can be launched from the attachment menu »</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>users</strong></td>
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>attachMenuBotsBot</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Represents a bot web app that can be launched from the attachment menu »">
|
||||
<meta property="description" content="Represents a bot mini app that can be launched from the attachment menu »">
|
||||
<meta property="og:title" content="attachMenuBotsBot">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Represents a bot web app that can be launched from the attachment menu »">
|
||||
<meta property="og:description" content="Represents a bot mini app that can be launched from the attachment menu »">
|
||||
<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">
|
||||
|
@ -42,7 +42,7 @@
|
|||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/attachMenuBotsBot" >attachMenuBotsBot</a></li></ul></div>
|
||||
<h1 id="dev_page_title">attachMenuBotsBot</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Represents a <a href="/api/bots/attach">bot web app that can be launched from the attachment menu »</a></p>
|
||||
<div id="dev_page_content"><p>Represents a <a href="/api/bots/attach">bot mini app that can be launched from the attachment menu »</a></p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
@ -69,7 +69,7 @@
|
|||
<tr>
|
||||
<td><strong>bot</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/AttachMenuBot">AttachMenuBot</a></td>
|
||||
<td>Represents a <a href="/api/bots/attach">bot web app that can be launched from the attachment menu »</a><br></td>
|
||||
<td>Represents a <a href="/api/bots/attach">bot mini app that can be launched from the attachment menu »</a><br></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>users</strong></td>
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>attachMenuBotsNotModified</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="The list of bot web apps hasn't changed">
|
||||
<meta property="description" content="The list of bot mini apps hasn't changed">
|
||||
<meta property="og:title" content="attachMenuBotsNotModified">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="The list of bot web apps hasn't changed">
|
||||
<meta property="og:description" content="The list of bot mini apps hasn't changed">
|
||||
<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">
|
||||
|
@ -42,7 +42,7 @@
|
|||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/attachMenuBotsNotModified" >attachMenuBotsNotModified</a></li></ul></div>
|
||||
<h1 id="dev_page_title">attachMenuBotsNotModified</h1>
|
||||
|
||||
<div id="dev_page_content"><p>The list of bot web apps hasn't changed</p>
|
||||
<div id="dev_page_content"><p>The list of bot mini apps hasn't changed</p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>botApp</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Contains information about a named bot web app.">
|
||||
<meta property="description" content="Contains information about a named bot mini app.">
|
||||
<meta property="og:title" content="botApp">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Contains information about a named bot web app.">
|
||||
<meta property="og:description" content="Contains information about a named bot mini app.">
|
||||
<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">
|
||||
|
@ -42,7 +42,7 @@
|
|||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/botApp" >botApp</a></li></ul></div>
|
||||
<h1 id="dev_page_title">botApp</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Contains information about a <a href="/api/bots/webapps#named-bot-web-apps">named bot web app</a>.</p>
|
||||
<div id="dev_page_content"><p>Contains information about a <a href="/api/bots/webapps#named-bot-mini-apps">named bot mini app</a>.</p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
@ -74,37 +74,37 @@
|
|||
<tr>
|
||||
<td><strong>id</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/long">long</a></td>
|
||||
<td>Bot web app ID</td>
|
||||
<td>bot mini app ID</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>access_hash</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/long">long</a></td>
|
||||
<td>Bot web app access hash</td>
|
||||
<td>bot mini app access hash</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>short_name</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/string">string</a></td>
|
||||
<td>Bot web app short name, used to generate <a href="/api/links#named-bot-web-app-links">named bot web app deep links</a>.</td>
|
||||
<td>bot mini app short name, used to generate <a href="/api/links#named-bot-mini-app-links">named bot mini app deep links</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>title</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/string">string</a></td>
|
||||
<td>Bot web app title.</td>
|
||||
<td>bot mini app title.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>description</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/string">string</a></td>
|
||||
<td>Bot web app description.</td>
|
||||
<td>bot mini app description.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>photo</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/Photo">Photo</a></td>
|
||||
<td>Bot web app photo.</td>
|
||||
<td>bot mini app photo.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>document</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.0?<a href="/type/Document">Document</a></td>
|
||||
<td>Bot web app animation.</td>
|
||||
<td>bot mini app animation.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>hash</strong></td>
|
||||
|
@ -119,7 +119,7 @@
|
|||
<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="#messagesgetbotapp" id="messagesgetbotapp" name="messagesgetbotapp"><i class="anchor-icon"></i></a><a href="/method/messages.getBotApp">messages.getBotApp</a></h4>
|
||||
<p>Obtain information about a <a href="/api/bots/webapps#named-bot-web-apps">named bot web app</a></p>
|
||||
<p>Obtain information about a <a href="/api/bots/webapps#named-bot-mini-apps">named bot mini app</a></p>
|
||||
<h4><a class="anchor" href="#mini-apps-on-telegram" id="mini-apps-on-telegram" name="mini-apps-on-telegram"><i class="anchor-icon"></i></a><a href="/api/bots/webapps">Mini Apps on Telegram</a></h4>
|
||||
<p>Bots can offer users interactive HTML5 web apps to completely replace any website.</p></div>
|
||||
|
||||
|
|
|
@ -134,17 +134,17 @@
|
|||
<tr>
|
||||
<td><strong>post_stories</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.14?<a href="/constructor/true">true</a></td>
|
||||
<td>If set, allows the admin to post <a href="/api/stories#channel-stories">stories</a> as the <a href="/api/channel">channel</a>.</td>
|
||||
<td>If set, allows the admin to post <a href="/api/stories">stories</a> as the <a href="/api/channel">channel</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>edit_stories</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.15?<a href="/constructor/true">true</a></td>
|
||||
<td>If set, allows the admin to edit <a href="/api/stories#channel-stories">stories</a> posted by the other admins of the <a href="/api/channel">channel</a>.</td>
|
||||
<td>If set, allows the admin to edit <a href="/api/stories">stories</a> posted by the other admins of the <a href="/api/channel">channel</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>delete_stories</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.16?<a href="/constructor/true">true</a></td>
|
||||
<td>If set, allows the admin to delete <a href="/api/stories#channel-stories">stories</a> posted by the other admins of the <a href="/api/channel">channel</a>.</td>
|
||||
<td>If set, allows the admin to delete <a href="/api/stories">stories</a> posted by the other admins of the <a href="/api/channel">channel</a>.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>inlineBotWebView</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Specifies a bot web app button, shown on top of the inline query results list.">
|
||||
<meta property="description" content="Specifies a bot mini app button, shown on top of the inline query results list.">
|
||||
<meta property="og:title" content="inlineBotWebView">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Specifies a bot web app button, shown on top of the inline query results list.">
|
||||
<meta property="og:description" content="Specifies a bot mini app button, shown on top of the inline query results list.">
|
||||
<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">
|
||||
|
@ -42,7 +42,7 @@
|
|||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/inlineBotWebView" >inlineBotWebView</a></li></ul></div>
|
||||
<h1 id="dev_page_title">inlineBotWebView</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Specifies a <a href="/api/bots/webapps#simple-web-apps">bot web app</a> button, shown on top of the inline query results list.</p>
|
||||
<div id="dev_page_content"><p>Specifies a <a href="/api/bots/webapps#simple-mini-apps">bot mini app</a> button, shown on top of the inline query results list.</p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>inputBotAppID</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Used to fetch information about a named bot web app by its ID">
|
||||
<meta property="description" content="Used to fetch information about a named bot mini app by its ID">
|
||||
<meta property="og:title" content="inputBotAppID">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Used to fetch information about a named bot web app by its ID">
|
||||
<meta property="og:description" content="Used to fetch information about a named bot mini app by its ID">
|
||||
<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">
|
||||
|
@ -42,7 +42,7 @@
|
|||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/inputBotAppID" >inputBotAppID</a></li></ul></div>
|
||||
<h1 id="dev_page_title">inputBotAppID</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Used to fetch information about a <a href="/api/bots/webapps#named-bot-web-apps">named bot web app</a> by its ID</p>
|
||||
<div id="dev_page_content"><p>Used to fetch information about a <a href="/api/bots/webapps#named-bot-mini-apps">named bot mini app</a> by its ID</p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
@ -69,7 +69,7 @@
|
|||
<tr>
|
||||
<td><strong>id</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/long">long</a></td>
|
||||
<td><a href="/api/bots/webapps#named-bot-web-apps">named bot web app</a> ID.</td>
|
||||
<td><a href="/api/bots/webapps#named-bot-mini-apps">named bot mini app</a> ID.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>access_hash</strong></td>
|
||||
|
@ -84,7 +84,7 @@
|
|||
<h4><a class="anchor" href="#mini-apps-on-telegram" id="mini-apps-on-telegram" name="mini-apps-on-telegram"><i class="anchor-icon"></i></a><a href="/api/bots/webapps">Mini Apps on Telegram</a></h4>
|
||||
<p>Bots can offer users interactive HTML5 web apps to completely replace any website.</p>
|
||||
<h4><a class="anchor" href="#botapp" id="botapp" name="botapp"><i class="anchor-icon"></i></a><a href="/constructor/botApp">botApp</a></h4>
|
||||
<p>Contains information about a <a href="/api/bots/webapps#named-bot-web-apps">named bot web app</a>.</p></div>
|
||||
<p>Contains information about a <a href="/api/bots/webapps#named-bot-mini-apps">named bot mini app</a>.</p></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>inputBotAppShortName</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Used to fetch information about a named bot web app by its short name">
|
||||
<meta property="description" content="Used to fetch information about a named bot mini app by its short name">
|
||||
<meta property="og:title" content="inputBotAppShortName">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Used to fetch information about a named bot web app by its short name">
|
||||
<meta property="og:description" content="Used to fetch information about a named bot mini app by its short name">
|
||||
<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">
|
||||
|
@ -42,7 +42,7 @@
|
|||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/inputBotAppShortName" >inputBotAppShortName</a></li></ul></div>
|
||||
<h1 id="dev_page_title">inputBotAppShortName</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Used to fetch information about a <a href="/api/bots/webapps#named-bot-web-apps">named bot web app</a> by its short name</p>
|
||||
<div id="dev_page_content"><p>Used to fetch information about a <a href="/api/bots/webapps#named-bot-mini-apps">named bot mini app</a> by its short name</p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
@ -69,12 +69,12 @@
|
|||
<tr>
|
||||
<td><strong>bot_id</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/InputUser">InputUser</a></td>
|
||||
<td>ID of the bot that owns the bot web app</td>
|
||||
<td>ID of the bot that owns the bot mini app</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>short_name</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/string">string</a></td>
|
||||
<td>Short name, obtained from a <a href="/api/links#named-bot-web-app-links">named bot web app deep link</a></td>
|
||||
<td>Short name, obtained from a <a href="/api/links#named-bot-mini-app-links">named bot mini app deep link</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>keyboardButtonSimpleWebView</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Button to open a bot web app using messages.requestSimpleWebView, without sending user information to the web app.">
|
||||
<meta property="description" content="Button to open a bot mini app using messages.requestSimpleWebView, without sending user information to the web app. Can only be sent or received as part of a reply keyboard, use keyboardButtonWebView for inline keyboards.">
|
||||
<meta property="og:title" content="keyboardButtonSimpleWebView">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Button to open a bot web app using messages.requestSimpleWebView, without sending user information to the web app.">
|
||||
<meta property="og:description" content="Button to open a bot mini app using messages.requestSimpleWebView, without sending user information to the web app. Can only be sent or received as part of a reply keyboard, use keyboardButtonWebView for inline keyboards.">
|
||||
<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">
|
||||
|
@ -42,7 +42,7 @@
|
|||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/keyboardButtonSimpleWebView" >keyboardButtonSimpleWebView</a></li></ul></div>
|
||||
<h1 id="dev_page_title">keyboardButtonSimpleWebView</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Button to open a <a href="/api/bots/webapps">bot web app</a> using <a href="/method/messages.requestSimpleWebView">messages.requestSimpleWebView</a>, without sending user information to the web app.</p>
|
||||
<div id="dev_page_content"><p>Button to open a <a href="/api/bots/webapps">bot mini app</a> using <a href="/method/messages.requestSimpleWebView">messages.requestSimpleWebView</a>, without sending user information to the web app.</p>
|
||||
<p>Can only be sent or received as part of a reply keyboard, use <a href="/constructor/keyboardButtonWebView">keyboardButtonWebView</a> for inline keyboards.</p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
|
@ -85,9 +85,9 @@
|
|||
<h4><a class="anchor" href="#mini-apps-on-telegram" id="mini-apps-on-telegram" name="mini-apps-on-telegram"><i class="anchor-icon"></i></a><a href="/api/bots/webapps">Mini Apps on Telegram</a></h4>
|
||||
<p>Bots can offer users interactive HTML5 web apps to completely replace any website.</p>
|
||||
<h4><a class="anchor" href="#messagesrequestsimplewebview" id="messagesrequestsimplewebview" name="messagesrequestsimplewebview"><i class="anchor-icon"></i></a><a href="/method/messages.requestSimpleWebView">messages.requestSimpleWebView</a></h4>
|
||||
<p>Open a <a href="/api/bots/webapps">bot web app</a>.</p>
|
||||
<p>Open a <a href="/api/bots/webapps">bot mini app</a>.</p>
|
||||
<h4><a class="anchor" href="#keyboardbuttonwebview" id="keyboardbuttonwebview" name="keyboardbuttonwebview"><i class="anchor-icon"></i></a><a href="/constructor/keyboardButtonWebView">keyboardButtonWebView</a></h4>
|
||||
<p>Button to open a <a href="/api/bots/webapps">bot web app</a> using <a href="/method/messages.requestWebView">messages.requestWebView</a>, sending over user information after user confirmation.</p>
|
||||
<p>Button to open a <a href="/api/bots/webapps">bot mini app</a> using <a href="/method/messages.requestWebView">messages.requestWebView</a>, sending over user information after user confirmation.</p>
|
||||
<p>Can only be sent or received as part of an inline keyboard, use <a href="/constructor/keyboardButtonSimpleWebView">keyboardButtonSimpleWebView</a> for reply keyboards.</p></div>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>keyboardButtonWebView</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Button to open a bot web app using messages.requestWebView, sending over user information after user confirmation.">
|
||||
<meta property="description" content="Button to open a bot mini app using messages.requestWebView, sending over user information after user confirmation. Can only be sent or received as part of an inline keyboard, use keyboardButtonSimpleWebView for reply keyboards.">
|
||||
<meta property="og:title" content="keyboardButtonWebView">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Button to open a bot web app using messages.requestWebView, sending over user information after user confirmation.">
|
||||
<meta property="og:description" content="Button to open a bot mini app using messages.requestWebView, sending over user information after user confirmation. Can only be sent or received as part of an inline keyboard, use keyboardButtonSimpleWebView for reply keyboards.">
|
||||
<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">
|
||||
|
@ -42,7 +42,7 @@
|
|||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/keyboardButtonWebView" >keyboardButtonWebView</a></li></ul></div>
|
||||
<h1 id="dev_page_title">keyboardButtonWebView</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Button to open a <a href="/api/bots/webapps">bot web app</a> using <a href="/method/messages.requestWebView">messages.requestWebView</a>, sending over user information after user confirmation.</p>
|
||||
<div id="dev_page_content"><p>Button to open a <a href="/api/bots/webapps">bot mini app</a> using <a href="/method/messages.requestWebView">messages.requestWebView</a>, sending over user information after user confirmation.</p>
|
||||
<p>Can only be sent or received as part of an inline keyboard, use <a href="/constructor/keyboardButtonSimpleWebView">keyboardButtonSimpleWebView</a> for reply keyboards.</p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
|
@ -85,10 +85,10 @@
|
|||
<h4><a class="anchor" href="#mini-apps-on-telegram" id="mini-apps-on-telegram" name="mini-apps-on-telegram"><i class="anchor-icon"></i></a><a href="/api/bots/webapps">Mini Apps on Telegram</a></h4>
|
||||
<p>Bots can offer users interactive HTML5 web apps to completely replace any website.</p>
|
||||
<h4><a class="anchor" href="#messagesrequestwebview" id="messagesrequestwebview" name="messagesrequestwebview"><i class="anchor-icon"></i></a><a href="/method/messages.requestWebView">messages.requestWebView</a></h4>
|
||||
<p>Open a <a href="/bots/webapps">bot web app</a>, sending over user information after user confirmation.</p>
|
||||
<p>Open a <a href="/bots/webapps">bot mini app</a>, sending over user information after user confirmation.</p>
|
||||
<p>After calling this method, until the user closes the webview, <a href="/method/messages.prolongWebView">messages.prolongWebView</a> must be called every 60 seconds.</p>
|
||||
<h4><a class="anchor" href="#keyboardbuttonsimplewebview" id="keyboardbuttonsimplewebview" name="keyboardbuttonsimplewebview"><i class="anchor-icon"></i></a><a href="/constructor/keyboardButtonSimpleWebView">keyboardButtonSimpleWebView</a></h4>
|
||||
<p>Button to open a <a href="/api/bots/webapps">bot web app</a> using <a href="/method/messages.requestSimpleWebView">messages.requestSimpleWebView</a>, without sending user information to the web app.</p>
|
||||
<p>Button to open a <a href="/api/bots/webapps">bot mini app</a> using <a href="/method/messages.requestSimpleWebView">messages.requestSimpleWebView</a>, without sending user information to the web app.</p>
|
||||
<p>Can only be sent or received as part of a reply keyboard, use <a href="/constructor/keyboardButtonWebView">keyboardButtonWebView</a> for inline keyboards.</p></div>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>messageActionBotAllowed</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="We have given the bot permission to send us direct messages.">
|
||||
<meta property="description" content="We have given the bot permission to send us direct messages. The optional fields specify how did we authorize the bot to send us messages.">
|
||||
<meta property="og:title" content="messageActionBotAllowed">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="We have given the bot permission to send us direct messages.">
|
||||
<meta property="og:description" content="We have given the bot permission to send us direct messages. The optional fields specify how did we authorize the bot to send us messages.">
|
||||
<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">
|
||||
|
@ -90,7 +90,7 @@
|
|||
<tr>
|
||||
<td><strong>app</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.2?<a href="/type/BotApp">BotApp</a></td>
|
||||
<td>We have authorized the bot to send us messages by opening the specified <a href="/api/bots/webapps">bot web app</a>.</td>
|
||||
<td>We have authorized the bot to send us messages by opening the specified <a href="/api/bots/webapps">bot mini app</a>.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>messageActionWebViewDataSent</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Data from an opened reply keyboard bot web app was relayed to the bot that owns it (user side service message).">
|
||||
<meta property="description" content="Data from an opened reply keyboard bot mini app was relayed to the bot that owns it (user side service message). Clients should display a service message with the text Data from the «$text» button was transferred to the bot.">
|
||||
<meta property="og:title" content="messageActionWebViewDataSent">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Data from an opened reply keyboard bot web app was relayed to the bot that owns it (user side service message).">
|
||||
<meta property="og:description" content="Data from an opened reply keyboard bot mini app was relayed to the bot that owns it (user side service message). Clients should display a service message with the text Data from the «$text» button was transferred to the bot.">
|
||||
<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">
|
||||
|
@ -42,7 +42,7 @@
|
|||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/messageActionWebViewDataSent" >messageActionWebViewDataSent</a></li></ul></div>
|
||||
<h1 id="dev_page_title">messageActionWebViewDataSent</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Data from an opened <a href="/api/bots/webapps">reply keyboard bot web app</a> was relayed to the bot that owns it (user side service message).</p>
|
||||
<div id="dev_page_content"><p>Data from an opened <a href="/api/bots/webapps">reply keyboard bot mini app</a> was relayed to the bot that owns it (user side service message).</p>
|
||||
<p>Clients should display a service message with the text <code>Data from the «$text» button was transferred to the bot.</code></p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
|
@ -78,7 +78,7 @@
|
|||
<p><a href="/type/MessageAction">MessageAction</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="#keyboardbuttonsimplewebview" id="keyboardbuttonsimplewebview" name="keyboardbuttonsimplewebview"><i class="anchor-icon"></i></a><a href="/constructor/keyboardButtonSimpleWebView">keyboardButtonSimpleWebView</a></h4>
|
||||
<p>Button to open a <a href="/api/bots/webapps">bot web app</a> using <a href="/method/messages.requestSimpleWebView">messages.requestSimpleWebView</a>, without sending user information to the web app.</p>
|
||||
<p>Button to open a <a href="/api/bots/webapps">bot mini app</a> using <a href="/method/messages.requestSimpleWebView">messages.requestSimpleWebView</a>, without sending user information to the web app.</p>
|
||||
<p>Can only be sent or received as part of a reply keyboard, use <a href="/constructor/keyboardButtonWebView">keyboardButtonWebView</a> for inline keyboards.</p>
|
||||
<h4><a class="anchor" href="#mini-apps-on-telegram" id="mini-apps-on-telegram" name="mini-apps-on-telegram"><i class="anchor-icon"></i></a><a href="/api/bots/webapps">Mini Apps on Telegram</a></h4>
|
||||
<p>Bots can offer users interactive HTML5 web apps to completely replace any website.</p></div>
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>messageActionWebViewDataSentMe</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Data from an opened reply keyboard bot web app was relayed to the bot that owns it (bot side service message).">
|
||||
<meta property="description" content="Data from an opened reply keyboard bot mini app was relayed to the bot that owns it (bot side service message).">
|
||||
<meta property="og:title" content="messageActionWebViewDataSentMe">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Data from an opened reply keyboard bot web app was relayed to the bot that owns it (bot side service message).">
|
||||
<meta property="og:description" content="Data from an opened reply keyboard bot mini app was relayed to the bot that owns it (bot side service message).">
|
||||
<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">
|
||||
|
@ -42,7 +42,7 @@
|
|||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/messageActionWebViewDataSentMe" >messageActionWebViewDataSentMe</a></li></ul></div>
|
||||
<h1 id="dev_page_title">messageActionWebViewDataSentMe</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Data from an opened <a href="/api/bots/webapps">reply keyboard bot web app</a> was relayed to the bot that owns it (bot side service message).</p>
|
||||
<div id="dev_page_content"><p>Data from an opened <a href="/api/bots/webapps">reply keyboard bot mini app</a> was relayed to the bot that owns it (bot side service message).</p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
@ -82,7 +82,7 @@
|
|||
<p><a href="/type/MessageAction">MessageAction</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="#keyboardbuttonsimplewebview" id="keyboardbuttonsimplewebview" name="keyboardbuttonsimplewebview"><i class="anchor-icon"></i></a><a href="/constructor/keyboardButtonSimpleWebView">keyboardButtonSimpleWebView</a></h4>
|
||||
<p>Button to open a <a href="/api/bots/webapps">bot web app</a> using <a href="/method/messages.requestSimpleWebView">messages.requestSimpleWebView</a>, without sending user information to the web app.</p>
|
||||
<p>Button to open a <a href="/api/bots/webapps">bot mini app</a> using <a href="/method/messages.requestSimpleWebView">messages.requestSimpleWebView</a>, without sending user information to the web app.</p>
|
||||
<p>Can only be sent or received as part of a reply keyboard, use <a href="/constructor/keyboardButtonWebView">keyboardButtonWebView</a> for inline keyboards.</p>
|
||||
<h4><a class="anchor" href="#mini-apps-on-telegram" id="mini-apps-on-telegram" name="mini-apps-on-telegram"><i class="anchor-icon"></i></a><a href="/api/bots/webapps">Mini Apps on Telegram</a></h4>
|
||||
<p>Bots can offer users interactive HTML5 web apps to completely replace any website.</p></div>
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>messages.botApp</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Contains information about a named bot web app">
|
||||
<meta property="description" content="Contains information about a named bot mini app">
|
||||
<meta property="og:title" content="messages.botApp">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Contains information about a named bot web app">
|
||||
<meta property="og:description" content="Contains information about a named bot mini app">
|
||||
<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">
|
||||
|
@ -42,7 +42,7 @@
|
|||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/messages.botApp" >messages.botApp</a></li></ul></div>
|
||||
<h1 id="dev_page_title">messages.botApp</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Contains information about a <a href="/api/bots/webapps#named-bot-web-apps">named bot web app</a></p>
|
||||
<div id="dev_page_content"><p>Contains information about a <a href="/api/bots/webapps#named-bot-mini-apps">named bot mini app</a></p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
@ -97,7 +97,7 @@
|
|||
<p><a href="/type/messages.BotApp">messages.BotApp</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="#messagesrequestappwebview" id="messagesrequestappwebview" name="messagesrequestappwebview"><i class="anchor-icon"></i></a><a href="/method/messages.requestAppWebView">messages.requestAppWebView</a></h4>
|
||||
<p>Open a <a href="/bots/webapps">bot web app</a> from a <a href="/api/links#named-bot-web-app-links">named bot web app deep link</a>, sending over user information after user confirmation.</p>
|
||||
<p>Open a <a href="/bots/webapps">bot mini app</a> from a <a href="/api/links#named-bot-mini-app-links">named bot mini app deep link</a>, sending over user information after user confirmation.</p>
|
||||
<p>After calling this method, until the user closes the webview, <a href="/method/messages.prolongWebView">messages.prolongWebView</a> must be called every 60 seconds.</p>
|
||||
<h4><a class="anchor" href="#mini-apps-on-telegram" id="mini-apps-on-telegram" name="mini-apps-on-telegram"><i class="anchor-icon"></i></a><a href="/api/bots/webapps">Mini Apps on Telegram</a></h4>
|
||||
<p>Bots can offer users interactive HTML5 web apps to completely replace any website.</p></div>
|
||||
|
|
|
@ -94,7 +94,7 @@
|
|||
<tr>
|
||||
<td><strong>switch_webview</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.3?<a href="/type/InlineBotWebView">InlineBotWebView</a></td>
|
||||
<td>Shown as a button on top of the remaining inline result list; if clicked, opens the specified <a href="/api/bots/webapps#simple-web-apps">bot web app</a>.</td>
|
||||
<td>Shown as a button on top of the remaining inline result list; if clicked, opens the specified <a href="/api/bots/webapps#simple-mini-apps">bot mini app</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>results</strong></td>
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/stories.stories" >stories.stories</a></li></ul></div>
|
||||
<h1 id="dev_page_title">stories.stories</h1>
|
||||
|
||||
<div id="dev_page_content"><p>List of <a href="/api/stories#pinnedarchived-stories">stories</a></p>
|
||||
<div id="dev_page_content"><p>List of <a href="/api/stories#pinned-or-archived-stories">stories</a></p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
|
|
@ -64,7 +64,7 @@
|
|||
<h4><a class="anchor" href="#bot-attachment-menu-entries" id="bot-attachment-menu-entries" name="bot-attachment-menu-entries"><i class="anchor-icon"></i></a><a href="/api/bots/attach">Bot attachment menu entries</a></h4>
|
||||
<p>Bots can install attachment menu entries, offering conveniently accessible, versatile web apps.</p>
|
||||
<h4><a class="anchor" href="#messagesgetattachmenubots" id="messagesgetattachmenubots" name="messagesgetattachmenubots"><i class="anchor-icon"></i></a><a href="/method/messages.getAttachMenuBots">messages.getAttachMenuBots</a></h4>
|
||||
<p>Returns installed attachment menu <a href="/api/bots/attach">bot web apps »</a></p></div>
|
||||
<p>Returns installed attachment menu <a href="/api/bots/attach">bot mini apps »</a></p></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>updateNewAuthorization</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Authorized to the current user's account through an unknown device.">
|
||||
<meta property="description" content="A new session logged into the current user's account through an unknown device.">
|
||||
<meta property="og:title" content="updateNewAuthorization">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Authorized to the current user's account through an unknown device.">
|
||||
<meta property="og:description" content="A new session logged into the current user's account through an unknown device.">
|
||||
<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">
|
||||
|
|
|
@ -125,7 +125,7 @@
|
|||
<tr>
|
||||
<td>420</td>
|
||||
<td>TAKEOUT_INIT_DELAY_%d</td>
|
||||
<td>Wait %d seconds before initializing takeout.</td>
|
||||
<td>Sorry, for security reasons, you will be able to begin downloading your data in %d seconds. We have notified all your devices about the export request to make sure it's authorized and to give you time to react if it's not.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
@ -140,6 +140,11 @@
|
|||
<tbody>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>ADDRESS_INVALID</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHANNELS_ADMIN_LOCATED_TOO_MUCH</td>
|
||||
<td>The user has reached the limit of public geogroups.</td>
|
||||
</tr>
|
||||
|
@ -177,7 +182,7 @@
|
|||
<p>Import chat history from a foreign chat app into a specific Telegram chat, <a href="/api/import">click here for more info about imported chats »</a>.</p>
|
||||
<h4><a class="anchor" href="#forums" id="forums" name="forums"><i class="anchor-icon"></i></a><a href="/api/forum">Forums</a></h4>
|
||||
<p>Telegram allows creating forums with multiple distinct topics.</p>
|
||||
<h4><a class="anchor" href="#nearby-userschats" id="nearby-userschats" name="nearby-userschats"><i class="anchor-icon"></i></a><a href="/api/nearby">Nearby users&chats</a></h4>
|
||||
<h4><a class="anchor" href="#nearby-usersampchats" id="nearby-usersampchats" name="nearby-usersampchats"><i class="anchor-icon"></i></a><a href="/api/nearby">Nearby users&chats</a></h4>
|
||||
<p>How to work with geolocation-based features like geochats and the nearby users feature.</p>
|
||||
<h4><a class="anchor" href="#messagessetdefaulthistoryttl" id="messagessetdefaulthistoryttl" name="messagessetdefaulthistoryttl"><i class="anchor-icon"></i></a><a href="/method/messages.setDefaultHistoryTTL">messages.setDefaultHistoryTTL</a></h4>
|
||||
<p>Changes the default value of the Time-To-Live setting, applied to all new chats.</p></div>
|
||||
|
|
|
@ -129,6 +129,11 @@
|
|||
<td>This supergroup is not a forum.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>403</td>
|
||||
<td>CHAT_ADMIN_REQUIRED</td>
|
||||
<td>You must be an admin in this chat to do this.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>DOCUMENT_INVALID</td>
|
||||
<td>The specified document is invalid.</td>
|
||||
|
|
|
@ -110,6 +110,11 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>MEGAGROUP_GEO_REQUIRED</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>MEGAGROUP_REQUIRED</td>
|
||||
<td>You can only use this method on a supergroup.</td>
|
||||
</tr>
|
||||
|
@ -118,7 +123,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="#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>
|
||||
<p>How to handle channels, supergroups, gigagroups, basic groups, and what's the difference between them.</p>
|
||||
<h4><a class="anchor" href="#nearby-userschats" id="nearby-userschats" name="nearby-userschats"><i class="anchor-icon"></i></a><a href="/api/nearby">Nearby users&chats</a></h4>
|
||||
<h4><a class="anchor" href="#nearby-usersampchats" id="nearby-usersampchats" name="nearby-usersampchats"><i class="anchor-icon"></i></a><a href="/api/nearby">Nearby users&chats</a></h4>
|
||||
<p>How to work with geolocation-based features like geochats and the nearby users feature.</p></div>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -97,9 +97,7 @@
|
|||
<h4><a class="anchor" href="#blocklist" id="blocklist" name="blocklist"><i class="anchor-icon"></i></a><a href="/api/block">Blocklist</a></h4>
|
||||
<p>Working with the blocklist.</p>
|
||||
<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="#contacts" id="contacts" name="contacts"><i class="anchor-icon"></i></a><a href="/api/contacts">Contacts</a></h4>
|
||||
<p>Working with contacts.</p></div>
|
||||
<p>How to fetch results from large lists of objects.</p></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>messages.getAttachMenuBot</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Returns attachment menu entry for a bot web app that can be launched from the attachment menu »">
|
||||
<meta property="description" content="Returns attachment menu entry for a bot mini app that can be launched from the attachment menu »">
|
||||
<meta property="og:title" content="messages.getAttachMenuBot">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Returns attachment menu entry for a bot web app that can be launched from the attachment menu »">
|
||||
<meta property="og:description" content="Returns attachment menu entry for a bot mini app that can be launched from the attachment menu »">
|
||||
<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">
|
||||
|
@ -42,7 +42,7 @@
|
|||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/methods" >All Methods</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/method/messages.getAttachMenuBot" >messages.getAttachMenuBot</a></li></ul></div>
|
||||
<h1 id="dev_page_title">messages.getAttachMenuBot</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Returns attachment menu entry for a <a href="/api/bots/attach">bot web app that can be launched from the attachment menu »</a></p>
|
||||
<div id="dev_page_content"><p>Returns attachment menu entry for a <a href="/api/bots/attach">bot mini app that can be launched from the attachment menu »</a></p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>messages.getAttachMenuBots</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Returns installed attachment menu bot web apps »">
|
||||
<meta property="description" content="Returns installed attachment menu bot mini apps »">
|
||||
<meta property="og:title" content="messages.getAttachMenuBots">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Returns installed attachment menu bot web apps »">
|
||||
<meta property="og:description" content="Returns installed attachment menu bot mini apps »">
|
||||
<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">
|
||||
|
@ -42,7 +42,7 @@
|
|||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/methods" >All Methods</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/method/messages.getAttachMenuBots" >messages.getAttachMenuBots</a></li></ul></div>
|
||||
<h1 id="dev_page_title">messages.getAttachMenuBots</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Returns installed attachment menu <a href="/api/bots/attach">bot web apps »</a></p>
|
||||
<div id="dev_page_content"><p>Returns installed attachment menu <a href="/api/bots/attach">bot mini apps »</a></p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>messages.getBotApp</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Obtain information about a named bot web app">
|
||||
<meta property="description" content="Obtain information about a named bot mini app">
|
||||
<meta property="og:title" content="messages.getBotApp">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Obtain information about a named bot web app">
|
||||
<meta property="og:description" content="Obtain information about a named bot mini app">
|
||||
<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">
|
||||
|
@ -42,7 +42,7 @@
|
|||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/methods" >All Methods</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/method/messages.getBotApp" >messages.getBotApp</a></li></ul></div>
|
||||
<h1 id="dev_page_title">messages.getBotApp</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Obtain information about a <a href="/api/bots/webapps#named-bot-web-apps">named bot web app</a></p>
|
||||
<div id="dev_page_content"><p>Obtain information about a <a href="/api/bots/webapps#named-bot-mini-apps">named bot mini app</a></p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
@ -71,7 +71,7 @@
|
|||
<tr>
|
||||
<td><strong>app</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/InputBotApp">InputBotApp</a></td>
|
||||
<td>Bot app information obtained from a <a href="/api/links#named-bot-web-app-links">named bot web app deep link »</a>.</td>
|
||||
<td>Bot app information obtained from a <a href="/api/links#named-bot-mini-app-links">named bot mini app deep link »</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>hash</strong></td>
|
||||
|
|
|
@ -114,6 +114,11 @@
|
|||
<td>The provided chat id is invalid.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>500</td>
|
||||
<td>CHAT_INVALID</td>
|
||||
<td>Invalid chat.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>PEER_ID_INVALID</td>
|
||||
<td>The provided peer id is invalid.</td>
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>messages.prolongWebView</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Indicate to the server (from the user side) that the user is still using a web app.">
|
||||
<meta property="description" content="Indicate to the server (from the user side) that the user is still using a web app. If the method returns a QUERY_ID_INVALID error, the webview must be closed.">
|
||||
<meta property="og:title" content="messages.prolongWebView">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Indicate to the server (from the user side) that the user is still using a web app.">
|
||||
<meta property="og:description" content="Indicate to the server (from the user side) that the user is still using a web app. If the method returns a QUERY_ID_INVALID error, the webview must be closed.">
|
||||
<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">
|
||||
|
@ -115,7 +115,7 @@
|
|||
<h4><a class="anchor" href="#mini-apps-on-telegram" id="mini-apps-on-telegram" name="mini-apps-on-telegram"><i class="anchor-icon"></i></a><a href="/api/bots/webapps">Mini Apps on Telegram</a></h4>
|
||||
<p>Bots can offer users interactive HTML5 web apps to completely replace any website.</p>
|
||||
<h4><a class="anchor" href="#messagesrequestwebview" id="messagesrequestwebview" name="messagesrequestwebview"><i class="anchor-icon"></i></a><a href="/method/messages.requestWebView">messages.requestWebView</a></h4>
|
||||
<p>Open a <a href="/bots/webapps">bot web app</a>, sending over user information after user confirmation.</p>
|
||||
<p>Open a <a href="/bots/webapps">bot mini app</a>, sending over user information after user confirmation.</p>
|
||||
<p>After calling this method, until the user closes the webview, <a href="/method/messages.prolongWebView">messages.prolongWebView</a> must be called every 60 seconds.</p></div>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>messages.requestAppWebView</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Open a bot web app from a named bot web app deep link, sending over user information after user confirmation.">
|
||||
<meta property="description" content="Open a bot mini app from a named bot mini app deep link, sending over user information after user confirmation. After calling this method, until the user closes the webview, messages.prolongWebView must be called every 60 seconds.">
|
||||
<meta property="og:title" content="messages.requestAppWebView">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Open a bot web app from a named bot web app deep link, sending over user information after user confirmation.">
|
||||
<meta property="og:description" content="Open a bot mini app from a named bot mini app deep link, sending over user information after user confirmation. After calling this method, until the user closes the webview, messages.prolongWebView must be called every 60 seconds.">
|
||||
<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">
|
||||
|
@ -42,7 +42,7 @@
|
|||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/methods" >All Methods</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/method/messages.requestAppWebView" >messages.requestAppWebView</a></li></ul></div>
|
||||
<h1 id="dev_page_title">messages.requestAppWebView</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Open a <a href="/bots/webapps">bot web app</a> from a <a href="/api/links#named-bot-web-app-links">named bot web app deep link</a>, sending over user information after user confirmation.</p>
|
||||
<div id="dev_page_content"><p>Open a <a href="/bots/webapps">bot mini app</a> from a <a href="/api/links#named-bot-mini-app-links">named bot mini app deep link</a>, sending over user information after user confirmation.</p>
|
||||
<p>After calling this method, until the user closes the webview, <a href="/method/messages.prolongWebView">messages.prolongWebView</a> must be called every 60 seconds.</p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
|
@ -77,7 +77,7 @@
|
|||
<tr>
|
||||
<td><strong>write_allowed</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.0?<a href="/constructor/true">true</a></td>
|
||||
<td>Set this flag if the bot is asking permission to send messages to the user as specified in the <a href="/api/links#named-bot-web-app-links">named bot web app deep link</a> docs, and the user agreed.</td>
|
||||
<td>Set this flag if the bot is asking permission to send messages to the user as specified in the <a href="/api/links#named-bot-mini-app-links">named bot mini app deep link</a> docs, and the user agreed.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>peer</strong></td>
|
||||
|
@ -87,12 +87,12 @@
|
|||
<tr>
|
||||
<td><strong>app</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/InputBotApp">InputBotApp</a></td>
|
||||
<td>The app obtained by invoking <a href="/method/messages.getBotApp">messages.getBotApp</a> as specified in the <a href="/api/links#named-bot-web-app-links">named bot web app deep link</a> docs.</td>
|
||||
<td>The app obtained by invoking <a href="/method/messages.getBotApp">messages.getBotApp</a> as specified in the <a href="/api/links#named-bot-mini-app-links">named bot mini app deep link</a> docs.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>start_param</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.1?<a href="/type/string">string</a></td>
|
||||
<td>If the <code>startapp</code> query string parameter is present in the <a href="/api/links#named-bot-web-app-links">named bot web app deep link</a>, pass it to <code>start_param</code>.</td>
|
||||
<td>If the <code>startapp</code> query string parameter is present in the <a href="/api/links#named-bot-mini-app-links">named bot mini app deep link</a>, pass it to <code>start_param</code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>theme_params</strong></td>
|
||||
|
@ -112,7 +112,7 @@
|
|||
<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="#messagesgetbotapp" id="messagesgetbotapp" name="messagesgetbotapp"><i class="anchor-icon"></i></a><a href="/method/messages.getBotApp">messages.getBotApp</a></h4>
|
||||
<p>Obtain information about a <a href="/api/bots/webapps#named-bot-web-apps">named bot web app</a></p>
|
||||
<p>Obtain information about a <a href="/api/bots/webapps#named-bot-mini-apps">named bot mini app</a></p>
|
||||
<h4><a class="anchor" href="#mini-apps-on-telegram" id="mini-apps-on-telegram" name="mini-apps-on-telegram"><i class="anchor-icon"></i></a><a href="/api/bots/webapps">Mini Apps on Telegram</a></h4>
|
||||
<p>Bots can offer users interactive HTML5 web apps to completely replace any website.</p>
|
||||
<h4><a class="anchor" href="#telegram-mini-apps" id="telegram-mini-apps" name="telegram-mini-apps"><i class="anchor-icon"></i></a><a href="/bots/webapps">Telegram Mini Apps</a></h4>
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>messages.requestSimpleWebView</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Open a bot web app.">
|
||||
<meta property="description" content="Open a bot mini app.">
|
||||
<meta property="og:title" content="messages.requestSimpleWebView">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Open a bot web app.">
|
||||
<meta property="og:description" content="Open a bot mini app.">
|
||||
<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">
|
||||
|
@ -42,7 +42,7 @@
|
|||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/methods" >All Methods</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/method/messages.requestSimpleWebView" >messages.requestSimpleWebView</a></li></ul></div>
|
||||
<h1 id="dev_page_title">messages.requestSimpleWebView</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Open a <a href="/api/bots/webapps">bot web app</a>.</p>
|
||||
<div id="dev_page_content"><p>Open a <a href="/api/bots/webapps">bot mini app</a>.</p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
@ -86,7 +86,7 @@
|
|||
<tr>
|
||||
<td><strong>bot</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/InputUser">InputUser</a></td>
|
||||
<td>Bot that owns the webapp</td>
|
||||
<td>Bot that owns the mini app</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>url</strong></td>
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>messages.requestWebView</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Open a bot web app, sending over user information after user confirmation.">
|
||||
<meta property="description" content="Open a bot mini app, sending over user information after user confirmation. After calling this method, until the user closes the webview, messages.prolongWebView must be called every 60 seconds.">
|
||||
<meta property="og:title" content="messages.requestWebView">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Open a bot web app, sending over user information after user confirmation.">
|
||||
<meta property="og:description" content="Open a bot mini app, sending over user information after user confirmation. After calling this method, until the user closes the webview, messages.prolongWebView must be called every 60 seconds.">
|
||||
<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">
|
||||
|
@ -42,7 +42,7 @@
|
|||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/methods" >All Methods</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/method/messages.requestWebView" >messages.requestWebView</a></li></ul></div>
|
||||
<h1 id="dev_page_title">messages.requestWebView</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Open a <a href="/bots/webapps">bot web app</a>, sending over user information after user confirmation.</p>
|
||||
<div id="dev_page_content"><p>Open a <a href="/bots/webapps">bot mini app</a>, sending over user information after user confirmation.</p>
|
||||
<p>After calling this method, until the user closes the webview, <a href="/method/messages.prolongWebView">messages.prolongWebView</a> must be called every 60 seconds.</p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
|
|
|
@ -279,6 +279,11 @@
|
|||
<td>There are too many scheduled messages.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>500</td>
|
||||
<td>SEND_MEDIA_INVALID</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>420</td>
|
||||
<td>SLOWMODE_WAIT_%d</td>
|
||||
<td>Slowmode is enabled in this chat: wait %d seconds before sending another message to this chat.</td>
|
||||
|
|
|
@ -330,6 +330,11 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>REPLY_TO_USER_INVALID</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>SCHEDULE_BOT_NOT_ALLOWED</td>
|
||||
<td>Bots cannot schedule messages.</td>
|
||||
</tr>
|
||||
|
@ -359,6 +364,11 @@
|
|||
<td>Slowmode is enabled in this chat: wait %d seconds before sending another message to this chat.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>STORY_ID_INVALID</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>406</td>
|
||||
<td>TOPIC_CLOSED</td>
|
||||
<td>This topic was closed, you can't send messages to it anymore.</td>
|
||||
|
|
|
@ -115,6 +115,11 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>STORY_ID_INVALID</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>YOU_BLOCKED_USER</td>
|
||||
<td>You blocked this user.</td>
|
||||
</tr>
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>messages.sendWebViewData</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Used by the user to relay data from an opened reply keyboard bot web app to the bot that owns it.">
|
||||
<meta property="description" content="Used by the user to relay data from an opened reply keyboard bot mini app to the bot that owns it.">
|
||||
<meta property="og:title" content="messages.sendWebViewData">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Used by the user to relay data from an opened reply keyboard bot web app to the bot that owns it.">
|
||||
<meta property="og:description" content="Used by the user to relay data from an opened reply keyboard bot mini app to the bot that owns it.">
|
||||
<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">
|
||||
|
@ -42,7 +42,7 @@
|
|||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/methods" >All Methods</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/method/messages.sendWebViewData" >messages.sendWebViewData</a></li></ul></div>
|
||||
<h1 id="dev_page_title">messages.sendWebViewData</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Used by the user to relay data from an opened <a href="/api/bots/webapps">reply keyboard bot web app</a> to the bot that owns it.</p>
|
||||
<div id="dev_page_content"><p>Used by the user to relay data from an opened <a href="/api/bots/webapps">reply keyboard bot mini app</a> to the bot that owns it.</p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
@ -100,7 +100,7 @@
|
|||
<p><a href="/type/Updates">Updates</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="#keyboardbuttonsimplewebview" id="keyboardbuttonsimplewebview" name="keyboardbuttonsimplewebview"><i class="anchor-icon"></i></a><a href="/constructor/keyboardButtonSimpleWebView">keyboardButtonSimpleWebView</a></h4>
|
||||
<p>Button to open a <a href="/api/bots/webapps">bot web app</a> using <a href="/method/messages.requestSimpleWebView">messages.requestSimpleWebView</a>, without sending user information to the web app.</p>
|
||||
<p>Button to open a <a href="/api/bots/webapps">bot mini app</a> using <a href="/method/messages.requestSimpleWebView">messages.requestSimpleWebView</a>, without sending user information to the web app.</p>
|
||||
<p>Can only be sent or received as part of a reply keyboard, use <a href="/constructor/keyboardButtonWebView">keyboardButtonWebView</a> for inline keyboards.</p>
|
||||
<h4><a class="anchor" href="#web-events" id="web-events" name="web-events"><i class="anchor-icon"></i></a><a href="/api/web-events">Web events</a></h4>
|
||||
<p>How telegram apps interact with webpages</p>
|
||||
|
|
|
@ -102,7 +102,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="#messagesrequestwebview" id="messagesrequestwebview" name="messagesrequestwebview"><i class="anchor-icon"></i></a><a href="/method/messages.requestWebView">messages.requestWebView</a></h4>
|
||||
<p>Open a <a href="/bots/webapps">bot web app</a>, sending over user information after user confirmation.</p>
|
||||
<p>Open a <a href="/bots/webapps">bot mini app</a>, sending over user information after user confirmation.</p>
|
||||
<p>After calling this method, until the user closes the webview, <a href="/method/messages.prolongWebView">messages.prolongWebView</a> must be called every 60 seconds.</p></div>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -112,7 +112,7 @@
|
|||
<tr>
|
||||
<td><strong>switch_webview</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.4?<a href="/type/InlineBotWebView">InlineBotWebView</a></td>
|
||||
<td>If passed, clients will display a button on top of the remaining inline result list with the specified text, that switches the user to the specified <a href="/api/bots/webapps#simple-web-apps">bot web app</a>.</td>
|
||||
<td>If passed, clients will display a button on top of the remaining inline result list with the specified text, that switches the user to the specified <a href="/api/bots/webapps#simple-mini-apps">bot mini app</a>.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
@ -95,7 +95,7 @@
|
|||
<p><a href="/type/Bool">Bool</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="#attachmenubot" id="attachmenubot" name="attachmenubot"><i class="anchor-icon"></i></a><a href="/constructor/attachMenuBot">attachMenuBot</a></h4>
|
||||
<p>Represents a <a href="/api/bots/attach">bot web app that can be launched from the attachment menu »</a></p>
|
||||
<p>Represents a <a href="/api/bots/attach">bot mini app that can be launched from the attachment menu »</a></p>
|
||||
<h4><a class="anchor" href="#bot-attachment-menu-entries" id="bot-attachment-menu-entries" name="bot-attachment-menu-entries"><i class="anchor-icon"></i></a><a href="/api/bots/attach">Bot attachment menu entries</a></h4>
|
||||
<p>Bots can install attachment menu entries, offering conveniently accessible, versatile web apps.</p></div>
|
||||
|
||||
|
|
|
@ -91,7 +91,7 @@
|
|||
<tr>
|
||||
<td>400</td>
|
||||
<td>BOOST_NOT_MODIFIED</td>
|
||||
<td>You're already <a href="/api/stories#channel-stories">boosting</a> the specified channel.</td>
|
||||
<td>You're already <a href="/api/boost">boosting</a> the specified channel.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
|
|
|
@ -91,7 +91,7 @@
|
|||
<tr>
|
||||
<td>400</td>
|
||||
<td>BOOST_NOT_MODIFIED</td>
|
||||
<td>You're already <a href="/api/stories#channel-stories">boosting</a> the specified channel.</td>
|
||||
<td>You're already <a href="/api/boost">boosting</a> the specified channel.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
|
@ -107,9 +107,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="#channel-boosts" id="channel-boosts" name="channel-boosts"><i class="anchor-icon"></i></a><a href="/api/boost">Channel boosts</a></h4>
|
||||
<p>Telegram Premium users can grant their favorite channels additional features like the ability to post stories by giving them boosts.</p>
|
||||
<h4><a class="anchor" href="#stories" id="stories" name="stories"><i class="anchor-icon"></i></a><a href="/api/stories">Stories</a></h4>
|
||||
<p>Telegram users and channels can easily post and view stories through the API.</p></div>
|
||||
<p>Telegram Premium users can grant their favorite channels additional features like the ability to post stories by giving them boosts.</p></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -91,7 +91,7 @@
|
|||
<tr>
|
||||
<td>400</td>
|
||||
<td>BOOSTS_REQUIRED</td>
|
||||
<td>The specified channel must first be <a href="/api/stories#channel-stories">boosted by its users</a> in order to be able to post stories.</td>
|
||||
<td>The specified channel must first be <a href="/api/boost">boosted by its users</a> in order to be able to post stories.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
|
@ -126,8 +126,8 @@
|
|||
</tbody>
|
||||
</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="#stories" id="stories" name="stories"><i class="anchor-icon"></i></a><a href="/api/stories">Stories</a></h4>
|
||||
<p>Telegram users and channels can easily post and view stories through the API.</p>
|
||||
<h4><a class="anchor" href="#channel-boosts" id="channel-boosts" name="channel-boosts"><i class="anchor-icon"></i></a><a href="/api/boost">Channel boosts</a></h4>
|
||||
<p>Telegram Premium users can grant their favorite channels additional features like the ability to post stories by giving them boosts.</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>
|
||||
<p>The MTProto API has multiple configuration parameters that can be fetched with the appropriate methods.</p>
|
||||
<h4><a class="anchor" href="#telegram-premium" id="telegram-premium" name="telegram-premium"><i class="anchor-icon"></i></a><a href="/api/premium">Telegram Premium</a></h4>
|
||||
|
|
|
@ -89,6 +89,11 @@
|
|||
<tbody>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHANNEL_PRIVATE</td>
|
||||
<td>You haven't joined this channel/supergroup.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>PEER_ID_INVALID</td>
|
||||
<td>The provided peer id is invalid.</td>
|
||||
</tr>
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/methods" >All Methods</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/method/stories.getPinnedStories" >stories.getPinnedStories</a></li></ul></div>
|
||||
<h1 id="dev_page_title">stories.getPinnedStories</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Fetch the <a href="/api/stories#pinnedarchived-stories">stories</a> pinned on a peer's profile.</p>
|
||||
<div id="dev_page_content"><p>Fetch the <a href="/api/stories#pinned-or-archived-stories">stories</a> pinned on a peer's profile.</p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/methods" >All Methods</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/method/stories.getStoriesArchive" >stories.getStoriesArchive</a></li></ul></div>
|
||||
<h1 id="dev_page_title">stories.getStoriesArchive</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Fetch the <a href="/api/stories#pinnedarchived-stories">story archive »</a> of a peer we control.</p>
|
||||
<div id="dev_page_content"><p>Fetch the <a href="/api/stories#pinned-or-archived-stories">story archive »</a> of a peer we control.</p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
@ -99,6 +99,11 @@
|
|||
<tbody>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHAT_ADMIN_REQUIRED</td>
|
||||
<td>You must be an admin in this chat to do this.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>PEER_ID_INVALID</td>
|
||||
<td>The provided peer id is invalid.</td>
|
||||
</tr>
|
||||
|
|
|
@ -94,6 +94,16 @@
|
|||
<tbody>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHANNEL_INVALID</td>
|
||||
<td>The provided channel is invalid.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHANNEL_PRIVATE</td>
|
||||
<td>You haven't joined this channel/supergroup.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>PEER_ID_INVALID</td>
|
||||
<td>The provided peer id is invalid.</td>
|
||||
</tr>
|
||||
|
|
|
@ -98,6 +98,11 @@
|
|||
<td>PEER_ID_INVALID</td>
|
||||
<td>The provided peer id is invalid.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>STORY_ID_EMPTY</td>
|
||||
<td>You specified no story IDs.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
|
||||
|
|
|
@ -92,6 +92,16 @@
|
|||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>AES_DECRYPT_FAILED</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>CDN_METHOD_INVALID</td>
|
||||
<td>You can't call this method in a CDN DC.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>500</td>
|
||||
<td>CDN_UPLOAD_TIMEOUT</td>
|
||||
<td>A server-side timeout occurred while reuploading the file to the CDN DC.</td>
|
||||
|
|
|
@ -1498,11 +1498,11 @@ Look for updates of telegram's terms of service…">
|
|||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/stories.getPinnedStories">stories.getPinnedStories</a></td>
|
||||
<td>Fetch the <a href="/api/stories#pinnedarchived-stories">stories</a> pinned on a peer's profile.</td>
|
||||
<td>Fetch the <a href="/api/stories#pinned-or-archived-stories">stories</a> pinned on a peer's profile.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/stories.getStoriesArchive">stories.getStoriesArchive</a></td>
|
||||
<td>Fetch the <a href="/api/stories#pinnedarchived-stories">story archive »</a> of a peer we control.</td>
|
||||
<td>Fetch the <a href="/api/stories#pinned-or-archived-stories">story archive »</a> of a peer we control.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/stories.getStoriesByID">stories.getStoriesByID</a></td>
|
||||
|
@ -1736,7 +1736,7 @@ Look for updates of telegram's terms of service…">
|
|||
<tbody>
|
||||
<tr>
|
||||
<td><a href="/method/messages.requestWebView">messages.requestWebView</a></td>
|
||||
<td>Open a <a href="/bots/webapps">bot web app</a>, sending over user information after user confirmation.<br><br>After calling this method, until the user closes the webview, <a href="/method/messages.prolongWebView">messages.prolongWebView</a> must be called every 60 seconds.</td>
|
||||
<td>Open a <a href="/bots/webapps">bot mini app</a>, sending over user information after user confirmation.<br><br>After calling this method, until the user closes the webview, <a href="/method/messages.prolongWebView">messages.prolongWebView</a> must be called every 60 seconds.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/messages.prolongWebView">messages.prolongWebView</a></td>
|
||||
|
@ -1744,7 +1744,7 @@ Look for updates of telegram's terms of service…">
|
|||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/messages.requestSimpleWebView">messages.requestSimpleWebView</a></td>
|
||||
<td>Open a <a href="/api/bots/webapps">bot web app</a>.</td>
|
||||
<td>Open a <a href="/api/bots/webapps">bot mini app</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/messages.sendWebViewResultMessage">messages.sendWebViewResultMessage</a></td>
|
||||
|
@ -1752,15 +1752,15 @@ Look for updates of telegram's terms of service…">
|
|||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/messages.sendWebViewData">messages.sendWebViewData</a></td>
|
||||
<td>Used by the user to relay data from an opened <a href="/api/bots/webapps">reply keyboard bot web app</a> to the bot that owns it.</td>
|
||||
<td>Used by the user to relay data from an opened <a href="/api/bots/webapps">reply keyboard bot mini app</a> to the bot that owns it.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/messages.requestAppWebView">messages.requestAppWebView</a></td>
|
||||
<td>Open a <a href="/bots/webapps">bot web app</a> from a <a href="/api/links#named-bot-web-app-links">named bot web app deep link</a>, sending over user information after user confirmation.<br><br>After calling this method, until the user closes the webview, <a href="/method/messages.prolongWebView">messages.prolongWebView</a> must be called every 60 seconds.</td>
|
||||
<td>Open a <a href="/bots/webapps">bot mini app</a> from a <a href="/api/links#named-bot-mini-app-links">named bot mini app deep link</a>, sending over user information after user confirmation.<br><br>After calling this method, until the user closes the webview, <a href="/method/messages.prolongWebView">messages.prolongWebView</a> must be called every 60 seconds.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/messages.getBotApp">messages.getBotApp</a></td>
|
||||
<td>Obtain information about a <a href="/api/bots/webapps#named-bot-web-apps">named bot web app</a></td>
|
||||
<td>Obtain information about a <a href="/api/bots/webapps#named-bot-mini-apps">named bot mini app</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
@ -1967,7 +1967,7 @@ Look for updates of telegram's terms of service…">
|
|||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/contacts.setBlocked">contacts.setBlocked</a></td>
|
||||
<td>Replace the contents of an entire <a href="/api/contacts">blocklist, see here for more info »</a>.</td>
|
||||
<td>Replace the contents of an entire <a href="/api/block">blocklist, see here for more info »</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/contacts.editCloseFriends">contacts.editCloseFriends</a></td>
|
||||
|
@ -2786,7 +2786,7 @@ Look for updates of telegram's terms of service…">
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3><a class="anchor" href="#working-with-the-attachment-menu--of-web-app-bots-" id="working-with-the-attachment-menu--of-web-app-bots-" name="working-with-the-attachment-menu--of-web-app-bots-"><i class="anchor-icon"></i></a>Working with the <a href="/bots/webapps#launching-web-apps-from-the-attachment-menu">attachment menu »</a> of <a href="/bots/webapps">web app bots »</a></h3>
|
||||
<h3><a class="anchor" href="#working-with-the-attachment-menu--of-web-app-bots-" id="working-with-the-attachment-menu--of-web-app-bots-" name="working-with-the-attachment-menu--of-web-app-bots-"><i class="anchor-icon"></i></a>Working with the <a href="/bots/webapps#launching-mini-apps-from-the-attachment-menu">attachment menu »</a> of <a href="/bots/webapps">web app bots »</a></h3>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -2797,11 +2797,11 @@ Look for updates of telegram's terms of service…">
|
|||
<tbody>
|
||||
<tr>
|
||||
<td><a href="/method/messages.getAttachMenuBots">messages.getAttachMenuBots</a></td>
|
||||
<td>Returns installed attachment menu <a href="/api/bots/attach">bot web apps »</a></td>
|
||||
<td>Returns installed attachment menu <a href="/api/bots/attach">bot mini apps »</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/messages.getAttachMenuBot">messages.getAttachMenuBot</a></td>
|
||||
<td>Returns attachment menu entry for a <a href="/api/bots/attach">bot web app that can be launched from the attachment menu »</a></td>
|
||||
<td>Returns attachment menu entry for a <a href="/api/bots/attach">bot mini app that can be launched from the attachment menu »</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/messages.toggleBotInAttachMenu">messages.toggleBotInAttachMenu</a></td>
|
||||
|
@ -2828,7 +2828,7 @@ Look for updates of telegram's terms of service…">
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3><a class="anchor" href="#working-with-the-bot-menu-button-" id="working-with-the-bot-menu-button-" name="working-with-the-bot-menu-button-"><i class="anchor-icon"></i></a>Working with the bot <a href="/bots/webapps#launching-web-apps-from-the-menu-button">menu button »</a></h3>
|
||||
<h3><a class="anchor" href="#working-with-the-bot-menu-button-" id="working-with-the-bot-menu-button-" name="working-with-the-bot-menu-button-"><i class="anchor-icon"></i></a>Working with the bot <a href="/bots/webapps#launching-mini-apps-from-the-menu-button">menu button »</a></h3>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
|
|
|
@ -53,9 +53,9 @@
|
|||
<h5><a class="anchor" href="#1-client-sends-query-to-server" id="1-client-sends-query-to-server" name="1-client-sends-query-to-server"><i class="anchor-icon"></i></a>1) Client sends query to server</h5>
|
||||
<!-- start req_pq_multi -->
|
||||
<p>Sent payload (excluding transport headers/trailers):</p>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 54 62 0A 00 CE 97 5F 65
|
||||
0010 | 14 00 00 00 F1 8E 7E BE 9A 34 B2 BA F3 FF F7 F1
|
||||
0020 | C3 31 F2 31 91 49 DF 0F</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 94 DC 0A 00 8D A3 5F 65
|
||||
0010 | 14 00 00 00 F1 8E 7E BE E4 69 51 99 0E 2C FC CA
|
||||
0020 | C9 32 4D 1B 8C 8F 04 C9</code></pre>
|
||||
<p>Payload (de)serialization:</p>
|
||||
<pre><code>req_pq_multi#be7e8ef1 nonce:int128 = ResPQ;</code></pre>
|
||||
<table class="table">
|
||||
|
@ -77,7 +77,7 @@
|
|||
<tr>
|
||||
<td>message_id</td>
|
||||
<td>8, 8</td>
|
||||
<td><code>54620A00CE975F65</code></td>
|
||||
<td><code>94DC0A008DA35F65</code></td>
|
||||
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() << 32) + (N*4)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -95,7 +95,7 @@
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>24, 16</td>
|
||||
<td><code>9A34B2BAF3FFF7F1C331F2319149DF0F</code></td>
|
||||
<td><code>E46951990E2CFCCAC9324D1B8C8F04C9</code></td>
|
||||
<td>Random number</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -104,11 +104,11 @@
|
|||
<h5><a class="anchor" href="#2-server-sends-response-of-the-form" id="2-server-sends-response-of-the-form" name="2-server-sends-response-of-the-form"><i class="anchor-icon"></i></a>2) Server sends response of the form</h5>
|
||||
<!-- start resPQ -->
|
||||
<p>Received payload (excluding transport headers/trailers):</p>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 20 6E C1 CE 97 5F 65
|
||||
0010 | 5C 00 00 00 63 24 16 05 9A 34 B2 BA F3 FF F7 F1
|
||||
0020 | C3 31 F2 31 91 49 DF 0F EE 52 4C B3 9F 67 CF EF
|
||||
0030 | A6 71 47 6A 74 13 E8 55 08 1E 14 EA 0E 80 3B 6D
|
||||
0040 | 49 00 00 00 15 C4 B5 1C 03 00 00 00 A5 B7 F7 09
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 C0 FA A4 8D A3 5F 65
|
||||
0010 | A4 00 00 00 63 24 16 05 E4 69 51 99 0E 2C FC CA
|
||||
0020 | C9 32 4D 1B 8C 8F 04 C9 A6 4C FF DC C6 39 1B 39
|
||||
0030 | 96 EF 16 29 1A 89 8C 9F 08 13 0C 3C 35 9C 72 33
|
||||
0040 | E5 00 00 00 15 C4 B5 1C 03 00 00 00 A5 B7 F7 09
|
||||
0050 | 35 5F C3 0B 21 6B E8 6C 02 2B B4 C3 85 FD 64 DE
|
||||
0060 | 85 1D 9D D0</code></pre>
|
||||
<p>Payload (de)serialization:</p>
|
||||
|
@ -132,13 +132,13 @@
|
|||
<tr>
|
||||
<td>message_id</td>
|
||||
<td>8, 8</td>
|
||||
<td><code>01206EC1CE975F65</code></td>
|
||||
<td><code>01C0FAA48DA35F65</code></td>
|
||||
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() << 32) + (N*4)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>message_length</td>
|
||||
<td>16, 4</td>
|
||||
<td><code>5C000000</code> (92 in decimal)</td>
|
||||
<td><code>A4000000</code> (164 in decimal)</td>
|
||||
<td>Message body length</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -150,19 +150,19 @@
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>24, 16</td>
|
||||
<td><code>9A34B2BAF3FFF7F1C331F2319149DF0F</code></td>
|
||||
<td><code>E46951990E2CFCCAC9324D1B8C8F04C9</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>EE524CB39F67CFEFA671476A7413E855</code></td>
|
||||
<td><code>A64CFFDCC6391B3996EF16291A898C9F</code></td>
|
||||
<td>Server-generated random number</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>pq</td>
|
||||
<td>56, 12</td>
|
||||
<td><code>081E14EA0E803B6D49000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 2167614668673871177</td>
|
||||
<td><code>08130C3C359C7233E5000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1372538187396821989</td>
|
||||
<td>Single-byte prefix denoting length, an 8-byte string, and three bytes of padding</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -208,22 +208,22 @@
|
|||
<h4><a class="anchor" href="#proof-of-work" id="proof-of-work" name="proof-of-work"><i class="anchor-icon"></i></a>Proof of work</h4>
|
||||
<h5><a class="anchor" href="#3-client-decomposes-pq-into-prime-factors-such-that-p-lt-q" id="3-client-decomposes-pq-into-prime-factors-such-that-p-lt-q" name="3-client-decomposes-pq-into-prime-factors-such-that-p-lt-q"><i class="anchor-icon"></i></a>3) Client decomposes pq into prime factors such that p < q.</h5>
|
||||
<!-- start pq -->
|
||||
<pre><code>pq = 2167614668673871177</code></pre>
|
||||
<p>Decompose into 2 prime cofactors <code>p < q</code>: <code>2167614668673871177 = 1358494177 * 1595601001</code></p>
|
||||
<pre><code>p = 1358494177
|
||||
q = 1595601001</code></pre>
|
||||
<pre><code>pq = 1372538187396821989</code></pre>
|
||||
<p>Decompose into 2 prime cofactors <code>p < q</code>: <code>1372538187396821989 = 1161614081 * 1181578469</code></p>
|
||||
<pre><code>p = 1161614081
|
||||
q = 1181578469</code></pre>
|
||||
<!-- end pq -->
|
||||
<h4><a class="anchor" href="#presenting-proof-of-work-server-authentication" id="presenting-proof-of-work-server-authentication" name="presenting-proof-of-work-server-authentication"><i class="anchor-icon"></i></a>Presenting proof of work; Server authentication</h4>
|
||||
<h5><a class="anchor" href="#4-encrypted-data-payload-generation" id="4-encrypted-data-payload-generation" name="4-encrypted-data-payload-generation"><i class="anchor-icon"></i></a>4) <code>encrypted_data</code> payload generation</h5>
|
||||
<p>First of all, generate an <code>encrypted_data</code> payload as follows:</p>
|
||||
<!-- start p_q_inner_data_dc -->
|
||||
<p>Generated payload (excluding transport headers/trailers):</p>
|
||||
<pre><code>0000 | 95 5F F5 A9 08 1E 14 EA 0E 80 3B 6D 49 00 00 00
|
||||
0010 | 04 50 F8 F9 E1 00 00 00 04 5F 1A F0 69 00 00 00
|
||||
0020 | 9A 34 B2 BA F3 FF F7 F1 C3 31 F2 31 91 49 DF 0F
|
||||
0030 | EE 52 4C B3 9F 67 CF EF A6 71 47 6A 74 13 E8 55
|
||||
0040 | 2E A9 3C 55 A6 9B 21 26 00 7B EE CF 09 39 A7 7D
|
||||
0050 | 32 32 60 FB 68 C8 DF 67 D3 20 49 70 11 51 32 1C
|
||||
<pre><code>0000 | 95 5F F5 A9 08 13 0C 3C 35 9C 72 33 E5 00 00 00
|
||||
0010 | 04 45 3C D3 01 00 00 00 04 46 6D 74 E5 00 00 00
|
||||
0020 | E4 69 51 99 0E 2C FC CA C9 32 4D 1B 8C 8F 04 C9
|
||||
0030 | A6 4C FF DC C6 39 1B 39 96 EF 16 29 1A 89 8C 9F
|
||||
0040 | 9C 7B 11 8F 21 6F E2 D6 2A AB 8B 5A 3A 25 B9 D4
|
||||
0050 | A6 D6 A8 DB 83 B1 D0 91 15 DB 5E 34 77 FC 43 88
|
||||
0060 | 02 00 00 00</code></pre>
|
||||
<p>Payload (de)serialization:</p>
|
||||
<pre><code>p_q_inner_data_dc#a9f55f95 pq:string p:string q:string nonce:int128 server_nonce:int128 new_nonce:int256 dc:int = P_Q_inner_data;</code></pre>
|
||||
|
@ -246,37 +246,37 @@ q = 1595601001</code></pre>
|
|||
<tr>
|
||||
<td>pq</td>
|
||||
<td>4, 12</td>
|
||||
<td><code>081E14EA0E803B6D49000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 2167614668673871177</td>
|
||||
<td><code>08130C3C359C7233E5000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1372538187396821989</td>
|
||||
<td>Single-byte prefix denoting length, 8-byte string, and three bytes of padding</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>p</td>
|
||||
<td>16, 8</td>
|
||||
<td><code>0450F8F9E1000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1358494177</td>
|
||||
<td><code>04453CD301000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1161614081</td>
|
||||
<td>First prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>q</td>
|
||||
<td>24, 8</td>
|
||||
<td><code>045F1AF069000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1595601001</td>
|
||||
<td><code>04466D74E5000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1181578469</td>
|
||||
<td>Second prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>32, 16</td>
|
||||
<td><code>9A34B2BAF3FFF7F1C331F2319149DF0F</code></td>
|
||||
<td><code>E46951990E2CFCCAC9324D1B8C8F04C9</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>48, 16</td>
|
||||
<td><code>EE524CB39F67CFEFA671476A7413E855</code></td>
|
||||
<td><code>A64CFFDCC6391B3996EF16291A898C9F</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>new_nonce</td>
|
||||
<td>64, 32</td>
|
||||
<td><code>2EA93C55A69B2126007BEECF0939A77D</code> <code>323260FB68C8DF67D32049701151321C</code></td>
|
||||
<td><code>9C7B118F216FE2D62AAB8B5A3A25B9D4</code> <code>A6D6A8DB83B1D09115DB5E3477FC4388</code></td>
|
||||
<td>Client-generated random number</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -291,39 +291,39 @@ q = 1595601001</code></pre>
|
|||
<p>The serialization of <em>P_Q_inner_data</em> produces <strong>data</strong>, which is used to generate <strong>encrypted_data</strong> as specified in <a href="/mtproto/auth_key">step 4.1</a>.<br>
|
||||
These are the inputs to the algorithm specified in <a href="/mtproto/auth_key">step 4.1</a>:</p>
|
||||
<!-- start p_q_inner_data_input -->
|
||||
<pre><code>data = 955FF5A9081E14EA0E803B6D490000000450F8F9E1000000045F1AF0690000009A34B2BAF3FFF7F1C331F2319149DF0FEE524CB39F67CFEFA671476A7413E8552EA93C55A69B2126007BEECF0939A77D323260FB68C8DF67D32049701151321C02000000
|
||||
random_padding_bytes = 441AD8C99CE5A2AB3F1DF851330024CEE71186EC20A16CC06E5756A596F8439DCFE0C706927E1483D8F95B089AA5575ADF5917018AFD7192D3DFD481F3D036D9545898FA3B92B47D85AF0DC1497FF8D785D00DE958A25301433E532B</code></pre>
|
||||
<pre><code>data = 955FF5A908130C3C359C7233E500000004453CD30100000004466D74E5000000E46951990E2CFCCAC9324D1B8C8F04C9A64CFFDCC6391B3996EF16291A898C9F9C7B118F216FE2D62AAB8B5A3A25B9D4A6D6A8DB83B1D09115DB5E3477FC438802000000
|
||||
random_padding_bytes = 5BAC11024D7BD6C8E2BAC6129BD8650247D600A27B1A7FEEC5D0D283F17426E457FC4FAF0E801037AA30EAA15F1B5B86022FF814AE225554801BB0893538E84CFD99CC60D54259B8CFA6DD97836347F2D3A86E741646B715BBB08482</code></pre>
|
||||
<!-- end p_q_inner_data_input -->
|
||||
<p>And this is the output:</p>
|
||||
<!-- start p_q_inner_data_output -->
|
||||
<pre><code>encrypted_data = CAF6728D3ED9D3C91FDD6F60DA1D298A516E8234AC876CF715341E74E6670B6F5168A4D79C025A05265280540C260D3945CE1CB1EE4D27800D681CFFB572FFAA42A9BAAC3474CAEC86B44B4D41ED09864CD4A43419DF12A7CB984ADA2E3987A993925D9DA258E8975B9CA795591803A2C73AF1B2BB2A3121B35A6BF13763FFC04F21046876942DA6084B36DC857C874F318B076BD083FDD056C897C6428695C5D3C284CDC858BB479B92376F75EEE68715D3C35F7E19CC1196E853AEC2FA4891DE206A1F3CF4F728A35753C8C2B394D8CD28D2CC8874AC300CAD30D2098A8DFE232902E11635291ACB23EFA07C521209B27C53BAC41916EDA3EA3816361D169A</code></pre>
|
||||
<pre><code>encrypted_data = 91604243D2B0170B2D8334762A3A93F47F4D5700BEB8D469631710E52216A8A79A73AD4DA242BD652A816CE141F43FC3A0AE5837086A555F3EE9B8327F6EF37039786CF939F6007B17CC8BC8F3CA60FBE2B1BF85CD7961B51747125F6B173DD70214CAAF597363B3885290CDCF5F13DC231C9F45036ECDFFC7397CCD7906FDB5F9DC32F3DB0A187B65493E6E61C3586071D17FF6A0416217BDC3469D766FBB8DD8144BD1DA4AFBE359AC0DDB1FCE47F2E2F5C91E90BB403F53851F82C7B08200EBB5F3A9E0182A879E6B24651F835C668BC39512245FADE4D2BBC26C9346815BFC6CAEE8A99DF85280440071558F9659E37597C6DEEF67FBFA374756864C59FC</code></pre>
|
||||
<!-- end p_q_inner_data_output -->
|
||||
<p>The length of the final string is 256 bytes.</p>
|
||||
<h5><a class="anchor" href="#5-send-req-dh-params-query-with-generated-encrypted-data" id="5-send-req-dh-params-query-with-generated-encrypted-data" name="5-send-req-dh-params-query-with-generated-encrypted-data"><i class="anchor-icon"></i></a>5) Send req_DH_params query with generated <code>encrypted_data</code></h5>
|
||||
<!-- start req_DH_params -->
|
||||
<p>Sent payload (excluding transport headers/trailers):</p>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 58 62 0A 00 CE 97 5F 65
|
||||
0010 | 40 01 00 00 BE E4 12 D7 9A 34 B2 BA F3 FF F7 F1
|
||||
0020 | C3 31 F2 31 91 49 DF 0F EE 52 4C B3 9F 67 CF EF
|
||||
0030 | A6 71 47 6A 74 13 E8 55 04 50 F8 F9 E1 00 00 00
|
||||
0040 | 04 5F 1A F0 69 00 00 00 85 FD 64 DE 85 1D 9D D0
|
||||
0050 | FE 00 01 00 CA F6 72 8D 3E D9 D3 C9 1F DD 6F 60
|
||||
0060 | DA 1D 29 8A 51 6E 82 34 AC 87 6C F7 15 34 1E 74
|
||||
0070 | E6 67 0B 6F 51 68 A4 D7 9C 02 5A 05 26 52 80 54
|
||||
0080 | 0C 26 0D 39 45 CE 1C B1 EE 4D 27 80 0D 68 1C FF
|
||||
0090 | B5 72 FF AA 42 A9 BA AC 34 74 CA EC 86 B4 4B 4D
|
||||
00A0 | 41 ED 09 86 4C D4 A4 34 19 DF 12 A7 CB 98 4A DA
|
||||
00B0 | 2E 39 87 A9 93 92 5D 9D A2 58 E8 97 5B 9C A7 95
|
||||
00C0 | 59 18 03 A2 C7 3A F1 B2 BB 2A 31 21 B3 5A 6B F1
|
||||
00D0 | 37 63 FF C0 4F 21 04 68 76 94 2D A6 08 4B 36 DC
|
||||
00E0 | 85 7C 87 4F 31 8B 07 6B D0 83 FD D0 56 C8 97 C6
|
||||
00F0 | 42 86 95 C5 D3 C2 84 CD C8 58 BB 47 9B 92 37 6F
|
||||
0100 | 75 EE E6 87 15 D3 C3 5F 7E 19 CC 11 96 E8 53 AE
|
||||
0110 | C2 FA 48 91 DE 20 6A 1F 3C F4 F7 28 A3 57 53 C8
|
||||
0120 | C2 B3 94 D8 CD 28 D2 CC 88 74 AC 30 0C AD 30 D2
|
||||
0130 | 09 8A 8D FE 23 29 02 E1 16 35 29 1A CB 23 EF A0
|
||||
0140 | 7C 52 12 09 B2 7C 53 BA C4 19 16 ED A3 EA 38 16
|
||||
0150 | 36 1D 16 9A</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 98 DC 0A 00 8D A3 5F 65
|
||||
0010 | 40 01 00 00 BE E4 12 D7 E4 69 51 99 0E 2C FC CA
|
||||
0020 | C9 32 4D 1B 8C 8F 04 C9 A6 4C FF DC C6 39 1B 39
|
||||
0030 | 96 EF 16 29 1A 89 8C 9F 04 45 3C D3 01 00 00 00
|
||||
0040 | 04 46 6D 74 E5 00 00 00 85 FD 64 DE 85 1D 9D D0
|
||||
0050 | FE 00 01 00 91 60 42 43 D2 B0 17 0B 2D 83 34 76
|
||||
0060 | 2A 3A 93 F4 7F 4D 57 00 BE B8 D4 69 63 17 10 E5
|
||||
0070 | 22 16 A8 A7 9A 73 AD 4D A2 42 BD 65 2A 81 6C E1
|
||||
0080 | 41 F4 3F C3 A0 AE 58 37 08 6A 55 5F 3E E9 B8 32
|
||||
0090 | 7F 6E F3 70 39 78 6C F9 39 F6 00 7B 17 CC 8B C8
|
||||
00A0 | F3 CA 60 FB E2 B1 BF 85 CD 79 61 B5 17 47 12 5F
|
||||
00B0 | 6B 17 3D D7 02 14 CA AF 59 73 63 B3 88 52 90 CD
|
||||
00C0 | CF 5F 13 DC 23 1C 9F 45 03 6E CD FF C7 39 7C CD
|
||||
00D0 | 79 06 FD B5 F9 DC 32 F3 DB 0A 18 7B 65 49 3E 6E
|
||||
00E0 | 61 C3 58 60 71 D1 7F F6 A0 41 62 17 BD C3 46 9D
|
||||
00F0 | 76 6F BB 8D D8 14 4B D1 DA 4A FB E3 59 AC 0D DB
|
||||
0100 | 1F CE 47 F2 E2 F5 C9 1E 90 BB 40 3F 53 85 1F 82
|
||||
0110 | C7 B0 82 00 EB B5 F3 A9 E0 18 2A 87 9E 6B 24 65
|
||||
0120 | 1F 83 5C 66 8B C3 95 12 24 5F AD E4 D2 BB C2 6C
|
||||
0130 | 93 46 81 5B FC 6C AE E8 A9 9D F8 52 80 44 00 71
|
||||
0140 | 55 8F 96 59 E3 75 97 C6 DE EF 67 FB FA 37 47 56
|
||||
0150 | 86 4C 59 FC</code></pre>
|
||||
<p>Payload (de)serialization:</p>
|
||||
<pre><code>req_DH_params#d712e4be nonce:int128 server_nonce:int128 p:string q:string public_key_fingerprint:long encrypted_data:string = Server_DH_Params;</code></pre>
|
||||
<table class="table">
|
||||
|
@ -345,7 +345,7 @@ random_padding_bytes = 441AD8C99CE5A2AB3F1DF851330024CEE71186EC20A16CC06E5756A59
|
|||
<tr>
|
||||
<td>message_id</td>
|
||||
<td>8, 8</td>
|
||||
<td><code>58620A00CE975F65</code></td>
|
||||
<td><code>98DC0A008DA35F65</code></td>
|
||||
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() << 32) + (N*4)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -363,25 +363,25 @@ random_padding_bytes = 441AD8C99CE5A2AB3F1DF851330024CEE71186EC20A16CC06E5756A59
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>24, 16</td>
|
||||
<td><code>9A34B2BAF3FFF7F1C331F2319149DF0F</code></td>
|
||||
<td><code>E46951990E2CFCCAC9324D1B8C8F04C9</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>EE524CB39F67CFEFA671476A7413E855</code></td>
|
||||
<td><code>A64CFFDCC6391B3996EF16291A898C9F</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>p</td>
|
||||
<td>56, 8</td>
|
||||
<td><code>0450F8F9E1000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1358494177</td>
|
||||
<td><code>04453CD301000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1161614081</td>
|
||||
<td>First prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>q</td>
|
||||
<td>64, 8</td>
|
||||
<td><code>045F1AF069000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1595601001</td>
|
||||
<td><code>04466D74E5000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1181578469</td>
|
||||
<td>Second prime cofactor: single-byte prefix denoting length, 4-byte string, and three bytes of padding</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -393,7 +393,7 @@ random_padding_bytes = 441AD8C99CE5A2AB3F1DF851330024CEE71186EC20A16CC06E5756A59
|
|||
<tr>
|
||||
<td>encrypted_data</td>
|
||||
<td>80, 260</td>
|
||||
<td><code>FE000100CAF6728D3ED9D3C91FDD6F60</code> <code>DA1D298A516E8234AC876CF715341E74</code> <code>E6670B6F5168A4D79C025A0526528054</code> <code>0C260D3945CE1CB1EE4D27800D681CFF</code> <code>B572FFAA42A9BAAC3474CAEC86B44B4D</code> <code>41ED09864CD4A43419DF12A7CB984ADA</code> <code>2E3987A993925D9DA258E8975B9CA795</code> <code>591803A2C73AF1B2BB2A3121B35A6BF1</code> <code>3763FFC04F21046876942DA6084B36DC</code> <code>857C874F318B076BD083FDD056C897C6</code> <code>428695C5D3C284CDC858BB479B92376F</code> <code>75EEE68715D3C35F7E19CC1196E853AE</code> <code>C2FA4891DE206A1F3CF4F728A35753C8</code> <code>C2B394D8CD28D2CC8874AC300CAD30D2</code> <code>098A8DFE232902E11635291ACB23EFA0</code> <code>7C521209B27C53BAC41916EDA3EA3816</code><br> <code>361D169A</code></td>
|
||||
<td><code>FE00010091604243D2B0170B2D833476</code> <code>2A3A93F47F4D5700BEB8D469631710E5</code> <code>2216A8A79A73AD4DA242BD652A816CE1</code> <code>41F43FC3A0AE5837086A555F3EE9B832</code> <code>7F6EF37039786CF939F6007B17CC8BC8</code> <code>F3CA60FBE2B1BF85CD7961B51747125F</code> <code>6B173DD70214CAAF597363B3885290CD</code> <code>CF5F13DC231C9F45036ECDFFC7397CCD</code> <code>7906FDB5F9DC32F3DB0A187B65493E6E</code> <code>61C3586071D17FF6A0416217BDC3469D</code> <code>766FBB8DD8144BD1DA4AFBE359AC0DDB</code> <code>1FCE47F2E2F5C91E90BB403F53851F82</code> <code>C7B08200EBB5F3A9E0182A879E6B2465</code> <code>1F835C668BC39512245FADE4D2BBC26C</code> <code>9346815BFC6CAEE8A99DF85280440071</code> <code>558F9659E37597C6DEEF67FBFA374756</code><br> <code>864C59FC</code></td>
|
||||
<td>Value generated above</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -402,47 +402,47 @@ random_padding_bytes = 441AD8C99CE5A2AB3F1DF851330024CEE71186EC20A16CC06E5756A59
|
|||
<h5><a class="anchor" href="#6-server-responds-with" id="6-server-responds-with" name="6-server-responds-with"><i class="anchor-icon"></i></a>6) Server responds with:</h5>
|
||||
<!-- start server_DH_params_ok -->
|
||||
<p>Received payload (excluding transport headers/trailers):</p>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 FC 45 6F CF 97 5F 65
|
||||
0010 | 78 02 00 00 5C 07 E8 D0 9A 34 B2 BA F3 FF F7 F1
|
||||
0020 | C3 31 F2 31 91 49 DF 0F EE 52 4C B3 9F 67 CF EF
|
||||
0030 | A6 71 47 6A 74 13 E8 55 FE 50 02 00 41 10 93 8E
|
||||
0040 | AC B0 EC C6 4A 25 8E F4 17 3B CB 5F 9C B2 7B 36
|
||||
0050 | 5F 11 A9 17 2B 44 FC 4B 4E 1E 08 83 9B D0 97 D3
|
||||
0060 | 5F C5 72 0F 4F 9E AE F9 45 7D 05 A3 25 76 B5 CB
|
||||
0070 | 8F 99 7A 1E A2 E2 08 7C 32 1F B1 BF A2 1A 5E D2
|
||||
0080 | A0 BC 87 AF FB 68 FB E0 60 D3 19 6B 30 DC 1E BC
|
||||
0090 | 22 6D B9 16 8E 47 1D 60 0E A7 5E 59 CC D7 3E 9A
|
||||
00A0 | 26 63 E3 82 94 22 FD 22 5A 0C 3A 80 3D 49 9A 52
|
||||
00B0 | F5 DF E0 D9 F6 CA 25 2D 97 22 C8 76 E9 AA FE 46
|
||||
00C0 | CD 79 2D 85 2F 73 46 46 18 3A 7B 47 39 2D E9 C0
|
||||
00D0 | 9C 6B 29 4B 23 D1 B8 76 5E 72 6D B1 BC 13 80 D0
|
||||
00E0 | 24 0E A5 96 B0 DE AF C1 19 27 3C CA B9 50 C9 61
|
||||
00F0 | 47 1E 9C 78 57 AB AE DD 86 13 8E A2 AA 9E 37 F1
|
||||
0100 | AB 1E DE 96 48 9F 03 82 8A D0 E1 E4 57 1B 4E 63
|
||||
0110 | 06 BF F4 F1 9A 64 B7 6D 74 CC 61 C5 8C 13 EC 15
|
||||
0120 | 2E FE EC 9F A0 E1 49 F4 7B E9 8E 42 43 56 92 09
|
||||
0130 | 6C 4F 21 47 A7 CC CC A6 C6 C4 40 FD C2 FA D9 D9
|
||||
0140 | EB CE 03 22 92 B2 AA 84 D0 D9 25 4D 33 77 8B 0B
|
||||
0150 | 84 AF 4D 2E B9 5B 79 4A E9 B7 5F 0C BD 10 46 6F
|
||||
0160 | 33 A8 5B 3B CC B6 82 02 47 B2 89 FA CE CF A6 A1
|
||||
0170 | 23 ED 59 B8 50 DB 9F 99 45 AC 02 F1 7B 6C 1E 0B
|
||||
0180 | 11 EA 2E AA 0C 51 2B 7A 45 F1 0D A9 2A 6B 85 3E
|
||||
0190 | 1E 31 3B A7 25 0B FD ED 89 88 D4 55 E3 2D A0 6F
|
||||
01A0 | 72 E3 5D B2 A6 6E 4F FA E2 09 77 74 8D A3 A3 EC
|
||||
01B0 | 30 0C 27 5F 88 33 E3 78 50 C4 65 84 5A 7C 6C 9E
|
||||
01C0 | 07 C5 AE 95 FB 70 5D 8F DE F6 33 80 A2 0D 72 7E
|
||||
01D0 | 8A F7 FF 7A 40 C1 74 B1 27 AC 11 8A 46 D1 5D 7F
|
||||
01E0 | 07 D6 D7 2F 55 4C B3 D8 F0 67 45 BE 72 BF DC 55
|
||||
01F0 | 47 05 0A 33 8D 9E 14 B6 56 C9 E4 33 18 9D 29 42
|
||||
0200 | 18 A0 73 3B 12 05 22 E6 9C 8A 33 A2 DA C7 E4 0F
|
||||
0210 | 8A 7D 10 38 A8 72 5F E0 8F 54 3B 14 0F FB EE BA
|
||||
0220 | A3 56 4D F0 B1 0D 82 F9 CF 9A DF D7 89 70 E5 73
|
||||
0230 | 15 01 A6 31 AE 13 BE 8A DD 44 A4 77 92 BE 57 C2
|
||||
0240 | 4F 6F 27 2D BE 87 87 C5 2B AD 8E D5 38 25 AA C9
|
||||
0250 | B0 83 6B 95 3E 17 B4 83 91 B8 3E 92 E3 56 23 8E
|
||||
0260 | 36 01 93 7C DD E5 33 0D 6B 6B FB E6 34 77 26 37
|
||||
0270 | 32 A3 75 CF 97 80 1A CF 71 75 00 58 16 9A 66 E9
|
||||
0280 | EF B9 46 88 BE D1 95 C0 8A 76 F0 1A</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 58 ED 48 8E A3 5F 65
|
||||
0010 | 94 02 00 00 5C 07 E8 D0 E4 69 51 99 0E 2C FC CA
|
||||
0020 | C9 32 4D 1B 8C 8F 04 C9 A6 4C FF DC C6 39 1B 39
|
||||
0030 | 96 EF 16 29 1A 89 8C 9F FE 50 02 00 17 51 7F 20
|
||||
0040 | 90 40 EC F4 1C 08 C7 29 23 A8 F5 1B 5E 52 41 16
|
||||
0050 | BD 50 26 33 30 DC 9C 85 8C 73 D3 D6 68 20 2E A8
|
||||
0060 | 5B F1 1A 87 57 96 6B 3E C0 9C C6 5F B6 AE 01 9B
|
||||
0070 | 6F F8 3A 5B 1C DC A3 B2 04 11 7C 77 03 22 E3 EF
|
||||
0080 | B7 8F 34 FC B3 25 0C BD BC 21 C9 19 3C 67 1B E6
|
||||
0090 | 0D 6A 66 70 02 B2 DE D6 DE A4 78 6B 8C E3 A9 B6
|
||||
00A0 | 0A F6 43 E5 A8 EF 04 0E 9B C8 28 94 43 DF EC AC
|
||||
00B0 | 11 3B ED 85 B6 D3 2E 85 76 E4 55 17 96 53 DD 1F
|
||||
00C0 | E0 44 DE D1 A9 D1 43 9B 1C E0 82 1F 95 A5 E7 1D
|
||||
00D0 | 01 DF 56 70 9E C6 E5 D2 86 AC 63 22 8D 14 1A 4C
|
||||
00E0 | 69 FF D4 C0 83 77 D6 5E 41 39 B2 38 88 28 DA 79
|
||||
00F0 | 45 FE 56 55 38 B3 1F 04 B3 A7 A0 61 E8 B0 D2 D8
|
||||
0100 | 67 AA 3A 48 E4 79 EE 00 1D F8 1D 8B B5 8C 62 7D
|
||||
0110 | 6D 9D 42 A0 70 31 BB AA C5 EB 02 8B CA B1 10 D2
|
||||
0120 | 2C 53 13 BD 44 B6 34 20 CC 55 51 72 26 57 F5 08
|
||||
0130 | DD 44 55 C0 90 CE FA 06 B5 28 69 99 6A E8 E4 67
|
||||
0140 | F4 9A A3 48 7F 31 7F 97 EE B9 16 A8 C8 74 6F 94
|
||||
0150 | BD 6E 96 81 B6 30 13 C8 67 50 6A 12 56 AD EA 9C
|
||||
0160 | 6F DB 88 2D E1 D7 D0 AB 36 AA B4 13 F0 58 19 A5
|
||||
0170 | A6 E5 E2 9E CB 07 DF F6 DB C0 C2 19 77 37 5E 07
|
||||
0180 | 2E 73 14 6B A1 09 34 4A 17 F2 ED 08 4F 5F AA CE
|
||||
0190 | 7B AA B5 45 67 2B 13 41 7F 37 FC 43 C8 D8 CE 14
|
||||
01A0 | D7 C6 08 70 33 2C 99 C7 8D 17 75 34 5A BC 1D 2D
|
||||
01B0 | B8 38 AB 13 05 7C 7D 0D 2D 94 42 90 B3 EA E0 D2
|
||||
01C0 | 03 20 36 CE 92 DE 06 69 89 2F 7E B1 D0 9E D6 C5
|
||||
01D0 | E7 B5 97 1E 65 CB DD 4C 01 7C 2C 7C 57 44 0C 41
|
||||
01E0 | 67 F6 A3 54 42 CA 09 B9 F1 09 76 FE 80 37 CE F0
|
||||
01F0 | E3 09 E2 16 F0 A7 2E FC 47 9A 27 D5 8B AB 39 F9
|
||||
0200 | 07 9B 27 9D A3 FE 74 84 86 D8 47 07 38 7B E7 9B
|
||||
0210 | 9F CE 62 E6 BF 8D 9F 86 F6 0A 0A 59 39 B2 50 91
|
||||
0220 | 80 CC 21 C9 49 0A 2C D9 F0 D0 86 D9 EB A0 78 08
|
||||
0230 | 54 07 37 4D 30 72 A2 4C 1D 81 5F 7E EE EB FB E8
|
||||
0240 | E1 9B 3E 3B 21 B7 40 10 B6 4E E6 EE E7 BB 71 34
|
||||
0250 | 15 A6 5C 6A 29 86 47 2C 2A EC DB E5 94 78 43 55
|
||||
0260 | AD 86 A7 7F FB 27 B6 86 15 A0 F9 BF 02 F8 66 35
|
||||
0270 | 1D 4D 0F A7 35 6B 93 4E 13 42 7C 39 89 15 04 93
|
||||
0280 | 2C 1C 9E BC 00 0C 59 3E 1C 69 E3 11</code></pre>
|
||||
<p>Payload (de)serialization:</p>
|
||||
<pre><code>server_DH_params_ok#d0e8075c nonce:int128 server_nonce:int128 encrypted_answer:string = Server_DH_Params;</code></pre>
|
||||
<table class="table">
|
||||
|
@ -464,13 +464,13 @@ random_padding_bytes = 441AD8C99CE5A2AB3F1DF851330024CEE71186EC20A16CC06E5756A59
|
|||
<tr>
|
||||
<td>message_id</td>
|
||||
<td>8, 8</td>
|
||||
<td><code>01FC456FCF975F65</code></td>
|
||||
<td><code>0158ED488EA35F65</code></td>
|
||||
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() << 32) + (N*4)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>message_length</td>
|
||||
<td>16, 4</td>
|
||||
<td><code>78020000</code> (632 in decimal)</td>
|
||||
<td><code>94020000</code> (660 in decimal)</td>
|
||||
<td>Message body length</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -482,19 +482,19 @@ random_padding_bytes = 441AD8C99CE5A2AB3F1DF851330024CEE71186EC20A16CC06E5756A59
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>24, 16</td>
|
||||
<td><code>9A34B2BAF3FFF7F1C331F2319149DF0F</code></td>
|
||||
<td><code>E46951990E2CFCCAC9324D1B8C8F04C9</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>EE524CB39F67CFEFA671476A7413E855</code></td>
|
||||
<td><code>A64CFFDCC6391B3996EF16291A898C9F</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>encrypted_answer</td>
|
||||
<td>56, 596</td>
|
||||
<td><code>FE5002004110938EACB0ECC64A258EF4</code> <code>173BCB5F9CB27B365F11A9172B44FC4B</code> <code>4E1E08839BD097D35FC5720F4F9EAEF9</code> <code>457D05A32576B5CB8F997A1EA2E2087C</code> <code>321FB1BFA21A5ED2A0BC87AFFB68FBE0</code> <code>60D3196B30DC1EBC226DB9168E471D60</code> <code>0EA75E59CCD73E9A2663E3829422FD22</code> <code>5A0C3A803D499A52F5DFE0D9F6CA252D</code> <code>9722C876E9AAFE46CD792D852F734646</code> <code>183A7B47392DE9C09C6B294B23D1B876</code> <code>5E726DB1BC1380D0240EA596B0DEAFC1</code> <code>19273CCAB950C961471E9C7857ABAEDD</code> <code>86138EA2AA9E37F1AB1EDE96489F0382</code> <code>8AD0E1E4571B4E6306BFF4F19A64B76D</code> <code>74CC61C58C13EC152EFEEC9FA0E149F4</code> <code>7BE98E42435692096C4F2147A7CCCCA6</code> <code>C6C440FDC2FAD9D9EBCE032292B2AA84</code> <code>D0D9254D33778B0B84AF4D2EB95B794A</code> <code>E9B75F0CBD10466F33A85B3BCCB68202</code> <code>47B289FACECFA6A123ED59B850DB9F99</code> <code>45AC02F17B6C1E0B11EA2EAA0C512B7A</code> <code>45F10DA92A6B853E1E313BA7250BFDED</code> <code>8988D455E32DA06F72E35DB2A66E4FFA</code> <code>E20977748DA3A3EC300C275F8833E378</code> <code>50C465845A7C6C9E07C5AE95FB705D8F</code> <code>DEF63380A20D727E8AF7FF7A40C174B1</code> <code>27AC118A46D15D7F07D6D72F554CB3D8</code> <code>F06745BE72BFDC5547050A338D9E14B6</code> <code>56C9E433189D294218A0733B120522E6</code> <code>9C8A33A2DAC7E40F8A7D1038A8725FE0</code> <code>8F543B140FFBEEBAA3564DF0B10D82F9</code> <code>CF9ADFD78970E5731501A631AE13BE8A</code> <code>DD44A47792BE57C24F6F272DBE8787C5</code> <code>2BAD8ED53825AAC9B0836B953E17B483</code> <code>91B83E92E356238E3601937CDDE5330D</code> <code>6B6BFBE63477263732A375CF97801ACF</code> <code>71750058169A66E9EFB94688BED195C0</code><br> <code>8A76F01A</code></td>
|
||||
<td><code>FE50020017517F209040ECF41C08C729</code> <code>23A8F51B5E524116BD50263330DC9C85</code> <code>8C73D3D668202EA85BF11A8757966B3E</code> <code>C09CC65FB6AE019B6FF83A5B1CDCA3B2</code> <code>04117C770322E3EFB78F34FCB3250CBD</code> <code>BC21C9193C671BE60D6A667002B2DED6</code> <code>DEA4786B8CE3A9B60AF643E5A8EF040E</code> <code>9BC8289443DFECAC113BED85B6D32E85</code> <code>76E455179653DD1FE044DED1A9D1439B</code> <code>1CE0821F95A5E71D01DF56709EC6E5D2</code> <code>86AC63228D141A4C69FFD4C08377D65E</code> <code>4139B2388828DA7945FE565538B31F04</code> <code>B3A7A061E8B0D2D867AA3A48E479EE00</code> <code>1DF81D8BB58C627D6D9D42A07031BBAA</code> <code>C5EB028BCAB110D22C5313BD44B63420</code> <code>CC5551722657F508DD4455C090CEFA06</code> <code>B52869996AE8E467F49AA3487F317F97</code> <code>EEB916A8C8746F94BD6E9681B63013C8</code> <code>67506A1256ADEA9C6FDB882DE1D7D0AB</code> <code>36AAB413F05819A5A6E5E29ECB07DFF6</code> <code>DBC0C21977375E072E73146BA109344A</code> <code>17F2ED084F5FAACE7BAAB545672B1341</code> <code>7F37FC43C8D8CE14D7C60870332C99C7</code> <code>8D1775345ABC1D2DB838AB13057C7D0D</code> <code>2D944290B3EAE0D2032036CE92DE0669</code> <code>892F7EB1D09ED6C5E7B5971E65CBDD4C</code> <code>017C2C7C57440C4167F6A35442CA09B9</code> <code>F10976FE8037CEF0E309E216F0A72EFC</code> <code>479A27D58BAB39F9079B279DA3FE7484</code> <code>86D84707387BE79B9FCE62E6BF8D9F86</code> <code>F60A0A5939B2509180CC21C9490A2CD9</code> <code>F0D086D9EBA078085407374D3072A24C</code> <code>1D815F7EEEEBFBE8E19B3E3B21B74010</code> <code>B64EE6EEE7BB713415A65C6A2986472C</code> <code>2AECDBE594784355AD86A77FFB27B686</code> <code>15A0F9BF02F866351D4D0FA7356B934E</code> <code>13427C39891504932C1C9EBC000C593E</code><br> <code>1C69E311</code></td>
|
||||
<td>See below</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -502,20 +502,20 @@ random_padding_bytes = 441AD8C99CE5A2AB3F1DF851330024CEE71186EC20A16CC06E5756A59
|
|||
<!-- end server_DH_params_ok -->
|
||||
<p>Decrypt <code>encrypted_answer</code> using the reverse of the process specified in <a href="/mtproto/auth_key#6-server-responds-with">step 6</a>:</p>
|
||||
<!-- start server_DH_inner_data_input -->
|
||||
<pre><code>encrypted_answer = 4110938EACB0ECC64A258EF4173BCB5F9CB27B365F11A9172B44FC4B4E1E08839BD097D35FC5720F4F9EAEF9457D05A32576B5CB8F997A1EA2E2087C321FB1BFA21A5ED2A0BC87AFFB68FBE060D3196B30DC1EBC226DB9168E471D600EA75E59CCD73E9A2663E3829422FD225A0C3A803D499A52F5DFE0D9F6CA252D9722C876E9AAFE46CD792D852F734646183A7B47392DE9C09C6B294B23D1B8765E726DB1BC1380D0240EA596B0DEAFC119273CCAB950C961471E9C7857ABAEDD86138EA2AA9E37F1AB1EDE96489F03828AD0E1E4571B4E6306BFF4F19A64B76D74CC61C58C13EC152EFEEC9FA0E149F47BE98E42435692096C4F2147A7CCCCA6C6C440FDC2FAD9D9EBCE032292B2AA84D0D9254D33778B0B84AF4D2EB95B794AE9B75F0CBD10466F33A85B3BCCB6820247B289FACECFA6A123ED59B850DB9F9945AC02F17B6C1E0B11EA2EAA0C512B7A45F10DA92A6B853E1E313BA7250BFDED8988D455E32DA06F72E35DB2A66E4FFAE20977748DA3A3EC300C275F8833E37850C465845A7C6C9E07C5AE95FB705D8FDEF63380A20D727E8AF7FF7A40C174B127AC118A46D15D7F07D6D72F554CB3D8F06745BE72BFDC5547050A338D9E14B656C9E433189D294218A0733B120522E69C8A33A2DAC7E40F8A7D1038A8725FE08F543B140FFBEEBAA3564DF0B10D82F9CF9ADFD78970E5731501A631AE13BE8ADD44A47792BE57C24F6F272DBE8787C52BAD8ED53825AAC9B0836B953E17B48391B83E92E356238E3601937CDDE5330D6B6BFBE63477263732A375CF97801ACF71750058169A66E9EFB94688BED195C08A76F01A
|
||||
tmp_aes_key = DB2F34B706C1F015EF12A76AD1A6D824D5C4EBA7CA8DD56DF50B61B7A9536C80
|
||||
tmp_aes_iv = 0B108CEA9A57852932D4DF2C472DD80227154011C4EDB6BA8D1E18682EA93C55</code></pre>
|
||||
<pre><code>encrypted_answer = 17517F209040ECF41C08C72923A8F51B5E524116BD50263330DC9C858C73D3D668202EA85BF11A8757966B3EC09CC65FB6AE019B6FF83A5B1CDCA3B204117C770322E3EFB78F34FCB3250CBDBC21C9193C671BE60D6A667002B2DED6DEA4786B8CE3A9B60AF643E5A8EF040E9BC8289443DFECAC113BED85B6D32E8576E455179653DD1FE044DED1A9D1439B1CE0821F95A5E71D01DF56709EC6E5D286AC63228D141A4C69FFD4C08377D65E4139B2388828DA7945FE565538B31F04B3A7A061E8B0D2D867AA3A48E479EE001DF81D8BB58C627D6D9D42A07031BBAAC5EB028BCAB110D22C5313BD44B63420CC5551722657F508DD4455C090CEFA06B52869996AE8E467F49AA3487F317F97EEB916A8C8746F94BD6E9681B63013C867506A1256ADEA9C6FDB882DE1D7D0AB36AAB413F05819A5A6E5E29ECB07DFF6DBC0C21977375E072E73146BA109344A17F2ED084F5FAACE7BAAB545672B13417F37FC43C8D8CE14D7C60870332C99C78D1775345ABC1D2DB838AB13057C7D0D2D944290B3EAE0D2032036CE92DE0669892F7EB1D09ED6C5E7B5971E65CBDD4C017C2C7C57440C4167F6A35442CA09B9F10976FE8037CEF0E309E216F0A72EFC479A27D58BAB39F9079B279DA3FE748486D84707387BE79B9FCE62E6BF8D9F86F60A0A5939B2509180CC21C9490A2CD9F0D086D9EBA078085407374D3072A24C1D815F7EEEEBFBE8E19B3E3B21B74010B64EE6EEE7BB713415A65C6A2986472C2AECDBE594784355AD86A77FFB27B68615A0F9BF02F866351D4D0FA7356B934E13427C39891504932C1C9EBC000C593E1C69E311
|
||||
tmp_aes_key = 36AF1C65434A521AC270F3D8F15F783B83916E3D5B318253377518B1879B0FA0
|
||||
tmp_aes_iv = BA8DF136F86FF86F2894AD855701045215AB156F6D7B7CD8810B810E9C7B118F</code></pre>
|
||||
<!-- end server_DH_inner_data_input -->
|
||||
<p>Yielding:</p>
|
||||
<!-- start server_DH_inner_data_output -->
|
||||
<pre><code>answer_with_hash = FFD741ADB59CFD08046C78EEC6486E798865444CBA0D89B59A34B2BAF3FFF7F1C331F2319149DF0FEE524CB39F67CFEFA671476A7413E85503000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE00010079241B5C80B4C81FED0BAF2D4C892B0124D2CD962C2C09CBB117D6E8D4541C56E1902CD0330601647E56C20DB73C55659D8B97F5BEC0DF0D652130B969F6F1C6B72566B68852C8C831B72FF864390C2B0AA0083053FB88CF3D47F08E05EF7AF9057367EE44511540C561B5BA21B7D12AB50ECBECFB85CE1FDCE5654ED90A086B816606EC948399B262748C8732A630633D888B644D2B584622F9DA08294F307DD43E655C5A0687EA568291AAB091D9F6D57D861E75CD4CE8E68B1A69CCE29A4857E570141C53062633339BAB64FC96A28723523975BD7670DB616D2D1C1FAD08D29C781E866B2BA05AEA4F9C90AD55897DBA1077A7FCEBC34C33A43A5E7DBAA7CF975F65167DF1F4851834AB
|
||||
answer = BA0D89B59A34B2BAF3FFF7F1C331F2319149DF0FEE524CB39F67CFEFA671476A7413E85503000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE00010079241B5C80B4C81FED0BAF2D4C892B0124D2CD962C2C09CBB117D6E8D4541C56E1902CD0330601647E56C20DB73C55659D8B97F5BEC0DF0D652130B969F6F1C6B72566B68852C8C831B72FF864390C2B0AA0083053FB88CF3D47F08E05EF7AF9057367EE44511540C561B5BA21B7D12AB50ECBECFB85CE1FDCE5654ED90A086B816606EC948399B262748C8732A630633D888B644D2B584622F9DA08294F307DD43E655C5A0687EA568291AAB091D9F6D57D861E75CD4CE8E68B1A69CCE29A4857E570141C53062633339BAB64FC96A28723523975BD7670DB616D2D1C1FAD08D29C781E866B2BA05AEA4F9C90AD55897DBA1077A7FCEBC34C33A43A5E7DBAA7CF975F65167DF1F4851834AB</code></pre>
|
||||
<pre><code>answer_with_hash = 1E8D385DFEC613497A71D39AE30E07D2AECF13BABA0D89B5E46951990E2CFCCAC9324D1B8C8F04C9A64CFFDCC6391B3996EF16291A898C9F03000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE00010031BD08268C2DDB0B1C87439402F2B753FB694FE149EE4E00917ACD38B3BF9D44D99AD346EB2DC6CDFC07824DBFD44369814FE10BE378977EC56978889A7EB5D0AA6C03B5611EA6445D4C152229B21E78213136FB9A822B3413DD546FC86E8E273322FDAEBA3A24E0B5DCE76DD67A427BAD16A483AA327252E3B0796040233DCFEB0752D77812112EAE83678AB98FA9371D6CD987426D62F761ADFB706351D7FBAFD6E4F2E201B3AEA82A13EA55BEA815DA7E552ACE782D75772AB9BA7AA2E394C34F3BB769089F465C4B64FA94AFCEE238CB885ABDFEA28508905FE6806B8AAA55F8A52ADB6FB908B58B6B054EA896CFE2F4FC03E1DD416CA8602E4F93EB3F8D8EA35F6560C569E896AEB16B
|
||||
answer = BA0D89B5E46951990E2CFCCAC9324D1B8C8F04C9A64CFFDCC6391B3996EF16291A898C9F03000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE00010031BD08268C2DDB0B1C87439402F2B753FB694FE149EE4E00917ACD38B3BF9D44D99AD346EB2DC6CDFC07824DBFD44369814FE10BE378977EC56978889A7EB5D0AA6C03B5611EA6445D4C152229B21E78213136FB9A822B3413DD546FC86E8E273322FDAEBA3A24E0B5DCE76DD67A427BAD16A483AA327252E3B0796040233DCFEB0752D77812112EAE83678AB98FA9371D6CD987426D62F761ADFB706351D7FBAFD6E4F2E201B3AEA82A13EA55BEA815DA7E552ACE782D75772AB9BA7AA2E394C34F3BB769089F465C4B64FA94AFCEE238CB885ABDFEA28508905FE6806B8AAA55F8A52ADB6FB908B58B6B054EA896CFE2F4FC03E1DD416CA8602E4F93EB3F8D8EA35F6560C569E896AEB16B</code></pre>
|
||||
<!-- end server_DH_inner_data_output -->
|
||||
<!-- start server_DH_inner_data -->
|
||||
<p>Generated payload (excluding transport headers/trailers):</p>
|
||||
<pre><code>0000 | BA 0D 89 B5 9A 34 B2 BA F3 FF F7 F1 C3 31 F2 31
|
||||
0010 | 91 49 DF 0F EE 52 4C B3 9F 67 CF EF A6 71 47 6A
|
||||
0020 | 74 13 E8 55 03 00 00 00 FE 00 01 00 C7 1C AE B9
|
||||
<pre><code>0000 | BA 0D 89 B5 E4 69 51 99 0E 2C FC CA C9 32 4D 1B
|
||||
0010 | 8C 8F 04 C9 A6 4C FF DC C6 39 1B 39 96 EF 16 29
|
||||
0020 | 1A 89 8C 9F 03 00 00 00 FE 00 01 00 C7 1C AE B9
|
||||
0030 | C6 B1 C9 04 8E 6C 52 2F 70 F1 3F 73 98 0D 40 23
|
||||
0040 | 8E 3E 21 C1 49 34 D0 37 56 3D 93 0F 48 19 8A 0A
|
||||
0050 | A7 C1 40 58 22 94 93 D2 25 30 F4 DB FA 33 6F 6E
|
||||
|
@ -532,23 +532,23 @@ answer = BA0D89B59A34B2BAF3FFF7F1C331F2319149DF0FEE524CB39F67CFEFA671476A7413E85
|
|||
0100 | F4 7B F9 59 D9 56 85 0C E9 29 85 1F 0D 81 15 F6
|
||||
0110 | 35 B1 05 EE 2E 4E 15 D0 4B 24 54 BF 6F 4F AD F0
|
||||
0120 | 34 B1 04 03 11 9C D8 E3 B9 2F CC 5B FE 00 01 00
|
||||
0130 | 79 24 1B 5C 80 B4 C8 1F ED 0B AF 2D 4C 89 2B 01
|
||||
0140 | 24 D2 CD 96 2C 2C 09 CB B1 17 D6 E8 D4 54 1C 56
|
||||
0150 | E1 90 2C D0 33 06 01 64 7E 56 C2 0D B7 3C 55 65
|
||||
0160 | 9D 8B 97 F5 BE C0 DF 0D 65 21 30 B9 69 F6 F1 C6
|
||||
0170 | B7 25 66 B6 88 52 C8 C8 31 B7 2F F8 64 39 0C 2B
|
||||
0180 | 0A A0 08 30 53 FB 88 CF 3D 47 F0 8E 05 EF 7A F9
|
||||
0190 | 05 73 67 EE 44 51 15 40 C5 61 B5 BA 21 B7 D1 2A
|
||||
01A0 | B5 0E CB EC FB 85 CE 1F DC E5 65 4E D9 0A 08 6B
|
||||
01B0 | 81 66 06 EC 94 83 99 B2 62 74 8C 87 32 A6 30 63
|
||||
01C0 | 3D 88 8B 64 4D 2B 58 46 22 F9 DA 08 29 4F 30 7D
|
||||
01D0 | D4 3E 65 5C 5A 06 87 EA 56 82 91 AA B0 91 D9 F6
|
||||
01E0 | D5 7D 86 1E 75 CD 4C E8 E6 8B 1A 69 CC E2 9A 48
|
||||
01F0 | 57 E5 70 14 1C 53 06 26 33 33 9B AB 64 FC 96 A2
|
||||
0200 | 87 23 52 39 75 BD 76 70 DB 61 6D 2D 1C 1F AD 08
|
||||
0210 | D2 9C 78 1E 86 6B 2B A0 5A EA 4F 9C 90 AD 55 89
|
||||
0220 | 7D BA 10 77 A7 FC EB C3 4C 33 A4 3A 5E 7D BA A7
|
||||
0230 | CF 97 5F 65</code></pre>
|
||||
0130 | 31 BD 08 26 8C 2D DB 0B 1C 87 43 94 02 F2 B7 53
|
||||
0140 | FB 69 4F E1 49 EE 4E 00 91 7A CD 38 B3 BF 9D 44
|
||||
0150 | D9 9A D3 46 EB 2D C6 CD FC 07 82 4D BF D4 43 69
|
||||
0160 | 81 4F E1 0B E3 78 97 7E C5 69 78 88 9A 7E B5 D0
|
||||
0170 | AA 6C 03 B5 61 1E A6 44 5D 4C 15 22 29 B2 1E 78
|
||||
0180 | 21 31 36 FB 9A 82 2B 34 13 DD 54 6F C8 6E 8E 27
|
||||
0190 | 33 22 FD AE BA 3A 24 E0 B5 DC E7 6D D6 7A 42 7B
|
||||
01A0 | AD 16 A4 83 AA 32 72 52 E3 B0 79 60 40 23 3D CF
|
||||
01B0 | EB 07 52 D7 78 12 11 2E AE 83 67 8A B9 8F A9 37
|
||||
01C0 | 1D 6C D9 87 42 6D 62 F7 61 AD FB 70 63 51 D7 FB
|
||||
01D0 | AF D6 E4 F2 E2 01 B3 AE A8 2A 13 EA 55 BE A8 15
|
||||
01E0 | DA 7E 55 2A CE 78 2D 75 77 2A B9 BA 7A A2 E3 94
|
||||
01F0 | C3 4F 3B B7 69 08 9F 46 5C 4B 64 FA 94 AF CE E2
|
||||
0200 | 38 CB 88 5A BD FE A2 85 08 90 5F E6 80 6B 8A AA
|
||||
0210 | 55 F8 A5 2A DB 6F B9 08 B5 8B 6B 05 4E A8 96 CF
|
||||
0220 | E2 F4 FC 03 E1 DD 41 6C A8 60 2E 4F 93 EB 3F 8D
|
||||
0230 | 8E A3 5F 65</code></pre>
|
||||
<p>Payload (de)serialization:</p>
|
||||
<pre><code>server_DH_inner_data#b5890dba nonce:int128 server_nonce:int128 g:int dh_prime:string g_a:string server_time:int = Server_DH_inner_data;</code></pre>
|
||||
<table class="table">
|
||||
|
@ -570,13 +570,13 @@ answer = BA0D89B59A34B2BAF3FFF7F1C331F2319149DF0FEE524CB39F67CFEFA671476A7413E85
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>4, 16</td>
|
||||
<td><code>9A34B2BAF3FFF7F1C331F2319149DF0F</code></td>
|
||||
<td><code>E46951990E2CFCCAC9324D1B8C8F04C9</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>20, 16</td>
|
||||
<td><code>EE524CB39F67CFEFA671476A7413E855</code></td>
|
||||
<td><code>A64CFFDCC6391B3996EF16291A898C9F</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -594,13 +594,13 @@ answer = BA0D89B59A34B2BAF3FFF7F1C331F2319149DF0FEE524CB39F67CFEFA671476A7413E85
|
|||
<tr>
|
||||
<td>g_a</td>
|
||||
<td>300, 260</td>
|
||||
<td><code>FE00010079241B5C80B4C81FED0BAF2D</code> <code>4C892B0124D2CD962C2C09CBB117D6E8</code> <code>D4541C56E1902CD0330601647E56C20D</code> <code>B73C55659D8B97F5BEC0DF0D652130B9</code> <code>69F6F1C6B72566B68852C8C831B72FF8</code> <code>64390C2B0AA0083053FB88CF3D47F08E</code> <code>05EF7AF9057367EE44511540C561B5BA</code> <code>21B7D12AB50ECBECFB85CE1FDCE5654E</code> <code>D90A086B816606EC948399B262748C87</code> <code>32A630633D888B644D2B584622F9DA08</code> <code>294F307DD43E655C5A0687EA568291AA</code> <code>B091D9F6D57D861E75CD4CE8E68B1A69</code> <code>CCE29A4857E570141C53062633339BAB</code> <code>64FC96A28723523975BD7670DB616D2D</code> <code>1C1FAD08D29C781E866B2BA05AEA4F9C</code> <code>90AD55897DBA1077A7FCEBC34C33A43A</code><br> <code>5E7DBAA7</code></td>
|
||||
<td><code>FE00010031BD08268C2DDB0B1C874394</code> <code>02F2B753FB694FE149EE4E00917ACD38</code> <code>B3BF9D44D99AD346EB2DC6CDFC07824D</code> <code>BFD44369814FE10BE378977EC5697888</code> <code>9A7EB5D0AA6C03B5611EA6445D4C1522</code> <code>29B21E78213136FB9A822B3413DD546F</code> <code>C86E8E273322FDAEBA3A24E0B5DCE76D</code> <code>D67A427BAD16A483AA327252E3B07960</code> <code>40233DCFEB0752D77812112EAE83678A</code> <code>B98FA9371D6CD987426D62F761ADFB70</code> <code>6351D7FBAFD6E4F2E201B3AEA82A13EA</code> <code>55BEA815DA7E552ACE782D75772AB9BA</code> <code>7AA2E394C34F3BB769089F465C4B64FA</code> <code>94AFCEE238CB885ABDFEA28508905FE6</code> <code>806B8AAA55F8A52ADB6FB908B58B6B05</code> <code>4EA896CFE2F4FC03E1DD416CA8602E4F</code><br> <code>93EB3F8D</code></td>
|
||||
<td><code>g_a</code> diffie-hellman parameter</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_time</td>
|
||||
<td>560, 4</td>
|
||||
<td><code>CF975F65</code> (1700763599 in decimal)</td>
|
||||
<td><code>8EA35F65</code> (1700766606 in decimal)</td>
|
||||
<td>Server time</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -609,34 +609,34 @@ answer = BA0D89B59A34B2BAF3FFF7F1C331F2319149DF0FEE524CB39F67CFEFA671476A7413E85
|
|||
<h5><a class="anchor" href="#7-client-computes-random-2048-bit-number-b-using-a-sufficient-amount-of-entropy-and-sends-the-server-a-message" id="7-client-computes-random-2048-bit-number-b-using-a-sufficient-amount-of-entropy-and-sends-the-server-a-message" name="7-client-computes-random-2048-bit-number-b-using-a-sufficient-amount-of-entropy-and-sends-the-server-a-message"><i class="anchor-icon"></i></a>7) Client computes random 2048-bit number <em>b</em> (using a sufficient amount of entropy) and sends the server a message</h5>
|
||||
<p>First, generate a secure random 2048-bit number b:</p>
|
||||
<!-- start b -->
|
||||
<pre><code>b = B94B19F4663965D3475834E9594CE260D9E75DBA771A518EBFF7826310821ED0140E73DAEED7D995D00D1707F83B95D7B3BED5FB02E907C8DAF8874529D3D6F59954F6E371F62E1D9C0BFD3C9B37BFF4ACF8F364038F8BE4E3CEF93C6AA75FE01F79C47FDB9F898AAB104027B59B029FC356D21637338E5A2A02324A10895C885E1D84B0673FFD7F309DC3CD538AFB85335A9E6E5B2C24FF80DDFECF7F8E07935DBBEEE3125DC748348312C162DFD2EB355FCBFDE963C8A9756B52B0FA53EADAE0C5C4208AF988316F78F87A31EB8F52ECD6FEC107286D9C5B9B1B521A08BD39A041BBA65C1474A2CB765A8AC2006B03E2F2E931D741B50FBFEA07CB22189BFB</code></pre>
|
||||
<pre><code>b = 2A3F22645B45D055BADC3890F8907F23847497B8D6373ADE8310ACBB6D7A262FFE8AF3B6E1A0E87102B24DDFB8F3530D408ECE349363E67B07B03F3CA277FD009CBBF9A2A3B48EBB11910F6C8FF2B1BBDAAEC209DF32F27A64E77A42BE16531788C66EBED1CD1C3F15CAC3F63B563F8340CF9B0C9D112712A00F0DE746A8A1DBC9B0477AF018234AB4E99F8BD4DAD26FB3B95DED07F8F2AEB1ECFE3F569C48A80FC147B5658CF1FEB56F2FF26AF4DFA152729694A592DA77A6BB7ED2A547FC3755014F086B6D53E664A898BE275334A23BB4A82172014B8A4EA5160209894FF32D33F765DC5FC66DE4B3E810D12F64A9820DFBBD0350630FB671F9A759313875</code></pre>
|
||||
<!-- end b -->
|
||||
<p>Then compute <code>g_b = pow(g, b) mod dh_prime</code></p>
|
||||
<!-- start g_b -->
|
||||
<pre><code>g_b = B03B9954067464ABDF175BADDFCC201F0B7E7971DCC88DB4150BD2AEB28A4A93F4D41E5F2B10E5408046F584714511196614524F66E681191F1F7B48C71DD519EDE29A0686D8E7B7BD60D4C276AACE8D6825C79740541A32012589B0FA4FA45632A579F8B962A17850086DA30715DBC9B8F1636A1D04743A542773FEB7F785E47C5DA93B4CBF935DC762245ED7D1448DFBF0C3CD86EF34DF3966FE5A677976026DFF0244EB5822A85AF94C4B17102653239533CA14C9366A486371911B75C4C2A93448F0C6A70F72AE4D3075FC6CC70CCB1D4CC4D64C57D4436DBA65A8DCC93E455770789A3572A636CC8AB107B86B9D7E5596D5FBC71C26D5AAD6AF58290E64</code></pre>
|
||||
<pre><code>g_b = 28C6539480C002AFFBEB2FA8C7060A89EF38361C7B8999C1C5D5FD6E7E46100673F76C8E78B82EBEFDDC975FAB0D79AB26280DC346886578A177982EA686736F6C44D505F4CF9D7FA097AA2F07B775DCD0345BA1D12C6BB440A711E9BE663FBB9F1A14CF8676C64A220B259B21377E10CA8B68B05180849D2A29CC96283053D1CF4A4E6105835A6BD97FAB25A15B3F62BF9931BF19072B4D0BCC7CB24E5007D6B9A77EB4A63BB62993097710AC85803A5A4E0FC792D7101A09F1E52ED12273083FDC9D85F465CD1FEDCE4F6E387DC1CE08D02D3E26561B2E5395565BE507209498AF1F4EC2A08BFBBF7799A70D2CFA538F92CBC4A61C50575D4934D5263B4932</code></pre>
|
||||
<!-- end g_b -->
|
||||
<h6>7.1) generation of encrypted_data</h6>
|
||||
<!-- start client_DH_inner_data -->
|
||||
<p>Generated payload (excluding transport headers/trailers):</p>
|
||||
<pre><code>0000 | 54 B6 43 66 9A 34 B2 BA F3 FF F7 F1 C3 31 F2 31
|
||||
0010 | 91 49 DF 0F EE 52 4C B3 9F 67 CF EF A6 71 47 6A
|
||||
0020 | 74 13 E8 55 00 00 00 00 00 00 00 00 FE 00 01 00
|
||||
0030 | B0 3B 99 54 06 74 64 AB DF 17 5B AD DF CC 20 1F
|
||||
0040 | 0B 7E 79 71 DC C8 8D B4 15 0B D2 AE B2 8A 4A 93
|
||||
0050 | F4 D4 1E 5F 2B 10 E5 40 80 46 F5 84 71 45 11 19
|
||||
0060 | 66 14 52 4F 66 E6 81 19 1F 1F 7B 48 C7 1D D5 19
|
||||
0070 | ED E2 9A 06 86 D8 E7 B7 BD 60 D4 C2 76 AA CE 8D
|
||||
0080 | 68 25 C7 97 40 54 1A 32 01 25 89 B0 FA 4F A4 56
|
||||
0090 | 32 A5 79 F8 B9 62 A1 78 50 08 6D A3 07 15 DB C9
|
||||
00A0 | B8 F1 63 6A 1D 04 74 3A 54 27 73 FE B7 F7 85 E4
|
||||
00B0 | 7C 5D A9 3B 4C BF 93 5D C7 62 24 5E D7 D1 44 8D
|
||||
00C0 | FB F0 C3 CD 86 EF 34 DF 39 66 FE 5A 67 79 76 02
|
||||
00D0 | 6D FF 02 44 EB 58 22 A8 5A F9 4C 4B 17 10 26 53
|
||||
00E0 | 23 95 33 CA 14 C9 36 6A 48 63 71 91 1B 75 C4 C2
|
||||
00F0 | A9 34 48 F0 C6 A7 0F 72 AE 4D 30 75 FC 6C C7 0C
|
||||
0100 | CB 1D 4C C4 D6 4C 57 D4 43 6D BA 65 A8 DC C9 3E
|
||||
0110 | 45 57 70 78 9A 35 72 A6 36 CC 8A B1 07 B8 6B 9D
|
||||
0120 | 7E 55 96 D5 FB C7 1C 26 D5 AA D6 AF 58 29 0E 64</code></pre>
|
||||
<pre><code>0000 | 54 B6 43 66 E4 69 51 99 0E 2C FC CA C9 32 4D 1B
|
||||
0010 | 8C 8F 04 C9 A6 4C FF DC C6 39 1B 39 96 EF 16 29
|
||||
0020 | 1A 89 8C 9F 00 00 00 00 00 00 00 00 FE 00 01 00
|
||||
0030 | 28 C6 53 94 80 C0 02 AF FB EB 2F A8 C7 06 0A 89
|
||||
0040 | EF 38 36 1C 7B 89 99 C1 C5 D5 FD 6E 7E 46 10 06
|
||||
0050 | 73 F7 6C 8E 78 B8 2E BE FD DC 97 5F AB 0D 79 AB
|
||||
0060 | 26 28 0D C3 46 88 65 78 A1 77 98 2E A6 86 73 6F
|
||||
0070 | 6C 44 D5 05 F4 CF 9D 7F A0 97 AA 2F 07 B7 75 DC
|
||||
0080 | D0 34 5B A1 D1 2C 6B B4 40 A7 11 E9 BE 66 3F BB
|
||||
0090 | 9F 1A 14 CF 86 76 C6 4A 22 0B 25 9B 21 37 7E 10
|
||||
00A0 | CA 8B 68 B0 51 80 84 9D 2A 29 CC 96 28 30 53 D1
|
||||
00B0 | CF 4A 4E 61 05 83 5A 6B D9 7F AB 25 A1 5B 3F 62
|
||||
00C0 | BF 99 31 BF 19 07 2B 4D 0B CC 7C B2 4E 50 07 D6
|
||||
00D0 | B9 A7 7E B4 A6 3B B6 29 93 09 77 10 AC 85 80 3A
|
||||
00E0 | 5A 4E 0F C7 92 D7 10 1A 09 F1 E5 2E D1 22 73 08
|
||||
00F0 | 3F DC 9D 85 F4 65 CD 1F ED CE 4F 6E 38 7D C1 CE
|
||||
0100 | 08 D0 2D 3E 26 56 1B 2E 53 95 56 5B E5 07 20 94
|
||||
0110 | 98 AF 1F 4E C2 A0 8B FB BF 77 99 A7 0D 2C FA 53
|
||||
0120 | 8F 92 CB C4 A6 1C 50 57 5D 49 34 D5 26 3B 49 32</code></pre>
|
||||
<p>Payload (de)serialization:</p>
|
||||
<pre><code>client_DH_inner_data#6643b654 nonce:int128 server_nonce:int128 retry_id:long g_b:string = Client_DH_Inner_Data;</code></pre>
|
||||
<table class="table">
|
||||
|
@ -658,19 +658,19 @@ answer = BA0D89B59A34B2BAF3FFF7F1C331F2319149DF0FEE524CB39F67CFEFA671476A7413E85
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>4, 16</td>
|
||||
<td><code>9A34B2BAF3FFF7F1C331F2319149DF0F</code></td>
|
||||
<td><code>E46951990E2CFCCAC9324D1B8C8F04C9</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>20, 16</td>
|
||||
<td><code>EE524CB39F67CFEFA671476A7413E855</code></td>
|
||||
<td><code>A64CFFDCC6391B3996EF16291A898C9F</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>g_b</td>
|
||||
<td>36, 260</td>
|
||||
<td><code>FE000100B03B9954067464ABDF175BAD</code> <code>DFCC201F0B7E7971DCC88DB4150BD2AE</code> <code>B28A4A93F4D41E5F2B10E5408046F584</code> <code>714511196614524F66E681191F1F7B48</code> <code>C71DD519EDE29A0686D8E7B7BD60D4C2</code> <code>76AACE8D6825C79740541A32012589B0</code> <code>FA4FA45632A579F8B962A17850086DA3</code> <code>0715DBC9B8F1636A1D04743A542773FE</code> <code>B7F785E47C5DA93B4CBF935DC762245E</code> <code>D7D1448DFBF0C3CD86EF34DF3966FE5A</code> <code>677976026DFF0244EB5822A85AF94C4B</code> <code>17102653239533CA14C9366A48637191</code> <code>1B75C4C2A93448F0C6A70F72AE4D3075</code> <code>FC6CC70CCB1D4CC4D64C57D4436DBA65</code> <code>A8DCC93E455770789A3572A636CC8AB1</code> <code>07B86B9D7E5596D5FBC71C26D5AAD6AF</code><br> <code>58290E64</code></td>
|
||||
<td><code>FE00010028C6539480C002AFFBEB2FA8</code> <code>C7060A89EF38361C7B8999C1C5D5FD6E</code> <code>7E46100673F76C8E78B82EBEFDDC975F</code> <code>AB0D79AB26280DC346886578A177982E</code> <code>A686736F6C44D505F4CF9D7FA097AA2F</code> <code>07B775DCD0345BA1D12C6BB440A711E9</code> <code>BE663FBB9F1A14CF8676C64A220B259B</code> <code>21377E10CA8B68B05180849D2A29CC96</code> <code>283053D1CF4A4E6105835A6BD97FAB25</code> <code>A15B3F62BF9931BF19072B4D0BCC7CB2</code> <code>4E5007D6B9A77EB4A63BB62993097710</code> <code>AC85803A5A4E0FC792D7101A09F1E52E</code> <code>D12273083FDC9D85F465CD1FEDCE4F6E</code> <code>387DC1CE08D02D3E26561B2E5395565B</code> <code>E507209498AF1F4EC2A08BFBBF7799A7</code> <code>0D2CFA538F92CBC4A61C50575D4934D5</code><br> <code>263B4932</code></td>
|
||||
<td>Single-byte prefix denoting length, a 256-byte (2048-bit) string, and zero bytes of padding</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -684,47 +684,47 @@ answer = BA0D89B59A34B2BAF3FFF7F1C331F2319149DF0FEE524CB39F67CFEFA671476A7413E85
|
|||
<!-- end client_DH_inner_data -->
|
||||
<p>The serialization of <em>Client_DH_Inner_Data</em> produces a string <strong>data</strong>. This is used to generate <strong>encrypted_data</strong> as specified in <a href="#7-client-computes-random-2048-bit-number-b-using-a-sufficient-amount-of-entropy-and-sends-the-server-a-message">step 6</a>, using the following inputs:</p>
|
||||
<!-- start client_DH_inner_data_input -->
|
||||
<pre><code>data = 54B643669A34B2BAF3FFF7F1C331F2319149DF0FEE524CB39F67CFEFA671476A7413E8550000000000000000FE000100B03B9954067464ABDF175BADDFCC201F0B7E7971DCC88DB4150BD2AEB28A4A93F4D41E5F2B10E5408046F584714511196614524F66E681191F1F7B48C71DD519EDE29A0686D8E7B7BD60D4C276AACE8D6825C79740541A32012589B0FA4FA45632A579F8B962A17850086DA30715DBC9B8F1636A1D04743A542773FEB7F785E47C5DA93B4CBF935DC762245ED7D1448DFBF0C3CD86EF34DF3966FE5A677976026DFF0244EB5822A85AF94C4B17102653239533CA14C9366A486371911B75C4C2A93448F0C6A70F72AE4D3075FC6CC70CCB1D4CC4D64C57D4436DBA65A8DCC93E455770789A3572A636CC8AB107B86B9D7E5596D5FBC71C26D5AAD6AF58290E64
|
||||
padding = 20107E428F635BE3D5AC0F63
|
||||
tmp_aes_key = DB2F34B706C1F015EF12A76AD1A6D824D5C4EBA7CA8DD56DF50B61B7A9536C80
|
||||
tmp_aes_iv = 0B108CEA9A57852932D4DF2C472DD80227154011C4EDB6BA8D1E18682EA93C55</code></pre>
|
||||
<pre><code>data = 54B64366E46951990E2CFCCAC9324D1B8C8F04C9A64CFFDCC6391B3996EF16291A898C9F0000000000000000FE00010028C6539480C002AFFBEB2FA8C7060A89EF38361C7B8999C1C5D5FD6E7E46100673F76C8E78B82EBEFDDC975FAB0D79AB26280DC346886578A177982EA686736F6C44D505F4CF9D7FA097AA2F07B775DCD0345BA1D12C6BB440A711E9BE663FBB9F1A14CF8676C64A220B259B21377E10CA8B68B05180849D2A29CC96283053D1CF4A4E6105835A6BD97FAB25A15B3F62BF9931BF19072B4D0BCC7CB24E5007D6B9A77EB4A63BB62993097710AC85803A5A4E0FC792D7101A09F1E52ED12273083FDC9D85F465CD1FEDCE4F6E387DC1CE08D02D3E26561B2E5395565BE507209498AF1F4EC2A08BFBBF7799A70D2CFA538F92CBC4A61C50575D4934D5263B4932
|
||||
padding = 33B75874ECD7561FE4873622
|
||||
tmp_aes_key = 36AF1C65434A521AC270F3D8F15F783B83916E3D5B318253377518B1879B0FA0
|
||||
tmp_aes_iv = BA8DF136F86FF86F2894AD855701045215AB156F6D7B7CD8810B810E9C7B118F</code></pre>
|
||||
<!-- end client_DH_inner_data_input -->
|
||||
<p>Process:</p>
|
||||
<pre><code>data_with_hash := SHA1(data) + data + padding (0-15 random bytes such that total length is divisible by 16)
|
||||
encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);</code></pre>
|
||||
<p>Output:</p>
|
||||
<!-- start client_DH_inner_data_output -->
|
||||
<pre><code>encrypted_data = FF6551BB89A52E6E84591FFD97A0B9B04287F5DF2C9DD99981BF339DA80E67F776348AD9182D2B0E62D021B2013DB21FC5631F96F0BFADF9EC2EAA77256247AECBD46E6453C672DE7E96B6C1F0D3A3A93DB290A939B63A0E9756566ED63D80E4A621065B3AC71BF537FA9DE8345363DB25BE0622B24EE43FF4765A609739BE0612C4F6852AD998A2D5EE66A19A48C5C2F049CB606AECD4FB68B14BE28E9CC8CAEDEFC599501039C9E61E333B6487FB64145D26BC53BD0EC357CE6CC22D901043EEC24B7940F92C04253513FF16C711039DA3C1E6EE9BA19707845D7055FEB077383C80253E852F4699A493417E8E078BA432846553008B6F88C5D92048C014ABE942B5D785C622EA7277B8C24422471611009604EE51FC9F6ABA96A6A724A83398CF3EBDFC9268A56A1271DCF337D765E134E2F132B089858573F13A1F18F1968FC110EE978EC3360661FF127D97E2AC</code></pre>
|
||||
<pre><code>encrypted_data = 72480B838758A1231EA90000928DBFE8D3D42FE9667A4910C7C78BBD91D1AF45DA1D172DBE7918DE42039E356DF1B0CBF329954913E1EFD46B940795320CC5EF05FFE501F20BB50F2C8C12CAD92E32CABE86F0FD1AA5C2B9CD8C20654A7F2E96B29AB1C67D78951AE51B2A1E0BD578B786C5F123ECBB80894B24B8DC4D0846EA6A81E5DFEFE3DE9EF61D3E97E2D6AFC0D7593538FF7ACF53021AC57173B8730D2889E97DBE1DDAB450D2AEC4941800D190B468076F96118C96C9D177E557A1453491171263CDFE7831A85AF465221ED5DA4B5053966AB85B1C91D071956A79DA59B6DDEB07116BE464E18ED448EB8A9203D1FAD3956B4057B58DB96E9D76F76A09EBB8D8799E2999AFC5E275185C1879FAABFFFC28AA8330352A6AF473F6C31F4098AFBD1CA1C00DB175350850411187E52126D0DF736FCABC2727ADBE444F1B3EBBAD6D876870A6E81E72BF4A43BDE5</code></pre>
|
||||
<!-- end client_DH_inner_data_output -->
|
||||
<p>The length of the final string is 336 bytes.</p>
|
||||
<h6>7.2) set_client_DH_params query</h6>
|
||||
<!-- start set_client_DH_params -->
|
||||
<p>Sent payload (excluding transport headers/trailers):</p>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 44 14 05 00 CF 97 5F 65
|
||||
0010 | 78 01 00 00 1F 5F 04 F5 9A 34 B2 BA F3 FF F7 F1
|
||||
0020 | C3 31 F2 31 91 49 DF 0F EE 52 4C B3 9F 67 CF EF
|
||||
0030 | A6 71 47 6A 74 13 E8 55 FE 50 01 00 FF 65 51 BB
|
||||
0040 | 89 A5 2E 6E 84 59 1F FD 97 A0 B9 B0 42 87 F5 DF
|
||||
0050 | 2C 9D D9 99 81 BF 33 9D A8 0E 67 F7 76 34 8A D9
|
||||
0060 | 18 2D 2B 0E 62 D0 21 B2 01 3D B2 1F C5 63 1F 96
|
||||
0070 | F0 BF AD F9 EC 2E AA 77 25 62 47 AE CB D4 6E 64
|
||||
0080 | 53 C6 72 DE 7E 96 B6 C1 F0 D3 A3 A9 3D B2 90 A9
|
||||
0090 | 39 B6 3A 0E 97 56 56 6E D6 3D 80 E4 A6 21 06 5B
|
||||
00A0 | 3A C7 1B F5 37 FA 9D E8 34 53 63 DB 25 BE 06 22
|
||||
00B0 | B2 4E E4 3F F4 76 5A 60 97 39 BE 06 12 C4 F6 85
|
||||
00C0 | 2A D9 98 A2 D5 EE 66 A1 9A 48 C5 C2 F0 49 CB 60
|
||||
00D0 | 6A EC D4 FB 68 B1 4B E2 8E 9C C8 CA ED EF C5 99
|
||||
00E0 | 50 10 39 C9 E6 1E 33 3B 64 87 FB 64 14 5D 26 BC
|
||||
00F0 | 53 BD 0E C3 57 CE 6C C2 2D 90 10 43 EE C2 4B 79
|
||||
0100 | 40 F9 2C 04 25 35 13 FF 16 C7 11 03 9D A3 C1 E6
|
||||
0110 | EE 9B A1 97 07 84 5D 70 55 FE B0 77 38 3C 80 25
|
||||
0120 | 3E 85 2F 46 99 A4 93 41 7E 8E 07 8B A4 32 84 65
|
||||
0130 | 53 00 8B 6F 88 C5 D9 20 48 C0 14 AB E9 42 B5 D7
|
||||
0140 | 85 C6 22 EA 72 77 B8 C2 44 22 47 16 11 00 96 04
|
||||
0150 | EE 51 FC 9F 6A BA 96 A6 A7 24 A8 33 98 CF 3E BD
|
||||
0160 | FC 92 68 A5 6A 12 71 DC F3 37 D7 65 E1 34 E2 F1
|
||||
0170 | 32 B0 89 85 85 73 F1 3A 1F 18 F1 96 8F C1 10 EE
|
||||
0180 | 97 8E C3 36 06 61 FF 12 7D 97 E2 AC</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 84 08 0B 00 8E A3 5F 65
|
||||
0010 | 78 01 00 00 1F 5F 04 F5 E4 69 51 99 0E 2C FC CA
|
||||
0020 | C9 32 4D 1B 8C 8F 04 C9 A6 4C FF DC C6 39 1B 39
|
||||
0030 | 96 EF 16 29 1A 89 8C 9F FE 50 01 00 72 48 0B 83
|
||||
0040 | 87 58 A1 23 1E A9 00 00 92 8D BF E8 D3 D4 2F E9
|
||||
0050 | 66 7A 49 10 C7 C7 8B BD 91 D1 AF 45 DA 1D 17 2D
|
||||
0060 | BE 79 18 DE 42 03 9E 35 6D F1 B0 CB F3 29 95 49
|
||||
0070 | 13 E1 EF D4 6B 94 07 95 32 0C C5 EF 05 FF E5 01
|
||||
0080 | F2 0B B5 0F 2C 8C 12 CA D9 2E 32 CA BE 86 F0 FD
|
||||
0090 | 1A A5 C2 B9 CD 8C 20 65 4A 7F 2E 96 B2 9A B1 C6
|
||||
00A0 | 7D 78 95 1A E5 1B 2A 1E 0B D5 78 B7 86 C5 F1 23
|
||||
00B0 | EC BB 80 89 4B 24 B8 DC 4D 08 46 EA 6A 81 E5 DF
|
||||
00C0 | EF E3 DE 9E F6 1D 3E 97 E2 D6 AF C0 D7 59 35 38
|
||||
00D0 | FF 7A CF 53 02 1A C5 71 73 B8 73 0D 28 89 E9 7D
|
||||
00E0 | BE 1D DA B4 50 D2 AE C4 94 18 00 D1 90 B4 68 07
|
||||
00F0 | 6F 96 11 8C 96 C9 D1 77 E5 57 A1 45 34 91 17 12
|
||||
0100 | 63 CD FE 78 31 A8 5A F4 65 22 1E D5 DA 4B 50 53
|
||||
0110 | 96 6A B8 5B 1C 91 D0 71 95 6A 79 DA 59 B6 DD EB
|
||||
0120 | 07 11 6B E4 64 E1 8E D4 48 EB 8A 92 03 D1 FA D3
|
||||
0130 | 95 6B 40 57 B5 8D B9 6E 9D 76 F7 6A 09 EB B8 D8
|
||||
0140 | 79 9E 29 99 AF C5 E2 75 18 5C 18 79 FA AB FF FC
|
||||
0150 | 28 AA 83 30 35 2A 6A F4 73 F6 C3 1F 40 98 AF BD
|
||||
0160 | 1C A1 C0 0D B1 75 35 08 50 41 11 87 E5 21 26 D0
|
||||
0170 | DF 73 6F CA BC 27 27 AD BE 44 4F 1B 3E BB AD 6D
|
||||
0180 | 87 68 70 A6 E8 1E 72 BF 4A 43 BD E5</code></pre>
|
||||
<p>Payload (de)serialization:</p>
|
||||
<pre><code>set_client_DH_params#f5045f1f nonce:int128 server_nonce:int128 encrypted_data:string = Set_client_DH_params_answer;</code></pre>
|
||||
<table class="table">
|
||||
|
@ -746,7 +746,7 @@ encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);<
|
|||
<tr>
|
||||
<td>message_id</td>
|
||||
<td>8, 8</td>
|
||||
<td><code>44140500CF975F65</code></td>
|
||||
<td><code>84080B008EA35F65</code></td>
|
||||
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() << 32) + (N*4)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -764,19 +764,19 @@ encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);<
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>24, 16</td>
|
||||
<td><code>9A34B2BAF3FFF7F1C331F2319149DF0F</code></td>
|
||||
<td><code>E46951990E2CFCCAC9324D1B8C8F04C9</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>EE524CB39F67CFEFA671476A7413E855</code></td>
|
||||
<td><code>A64CFFDCC6391B3996EF16291A898C9F</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>encrypted_data</td>
|
||||
<td>56, 340</td>
|
||||
<td><code>FE500100FF6551BB89A52E6E84591FFD</code> <code>97A0B9B04287F5DF2C9DD99981BF339D</code> <code>A80E67F776348AD9182D2B0E62D021B2</code> <code>013DB21FC5631F96F0BFADF9EC2EAA77</code> <code>256247AECBD46E6453C672DE7E96B6C1</code> <code>F0D3A3A93DB290A939B63A0E9756566E</code> <code>D63D80E4A621065B3AC71BF537FA9DE8</code> <code>345363DB25BE0622B24EE43FF4765A60</code> <code>9739BE0612C4F6852AD998A2D5EE66A1</code> <code>9A48C5C2F049CB606AECD4FB68B14BE2</code> <code>8E9CC8CAEDEFC599501039C9E61E333B</code> <code>6487FB64145D26BC53BD0EC357CE6CC2</code> <code>2D901043EEC24B7940F92C04253513FF</code> <code>16C711039DA3C1E6EE9BA19707845D70</code> <code>55FEB077383C80253E852F4699A49341</code> <code>7E8E078BA432846553008B6F88C5D920</code> <code>48C014ABE942B5D785C622EA7277B8C2</code> <code>4422471611009604EE51FC9F6ABA96A6</code> <code>A724A83398CF3EBDFC9268A56A1271DC</code> <code>F337D765E134E2F132B089858573F13A</code> <code>1F18F1968FC110EE978EC3360661FF12</code><br> <code>7D97E2AC</code></td>
|
||||
<td><code>FE50010072480B838758A1231EA90000</code> <code>928DBFE8D3D42FE9667A4910C7C78BBD</code> <code>91D1AF45DA1D172DBE7918DE42039E35</code> <code>6DF1B0CBF329954913E1EFD46B940795</code> <code>320CC5EF05FFE501F20BB50F2C8C12CA</code> <code>D92E32CABE86F0FD1AA5C2B9CD8C2065</code> <code>4A7F2E96B29AB1C67D78951AE51B2A1E</code> <code>0BD578B786C5F123ECBB80894B24B8DC</code> <code>4D0846EA6A81E5DFEFE3DE9EF61D3E97</code> <code>E2D6AFC0D7593538FF7ACF53021AC571</code> <code>73B8730D2889E97DBE1DDAB450D2AEC4</code> <code>941800D190B468076F96118C96C9D177</code> <code>E557A1453491171263CDFE7831A85AF4</code> <code>65221ED5DA4B5053966AB85B1C91D071</code> <code>956A79DA59B6DDEB07116BE464E18ED4</code> <code>48EB8A9203D1FAD3956B4057B58DB96E</code> <code>9D76F76A09EBB8D8799E2999AFC5E275</code> <code>185C1879FAABFFFC28AA8330352A6AF4</code> <code>73F6C31F4098AFBD1CA1C00DB1753508</code> <code>50411187E52126D0DF736FCABC2727AD</code> <code>BE444F1B3EBBAD6D876870A6E81E72BF</code><br> <code>4A43BDE5</code></td>
|
||||
<td>Encrypted client_DH_inner_data generated previously, serialized as a TL byte string</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -785,17 +785,17 @@ encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);<
|
|||
<h5><a class="anchor" href="#8-auth-key-generation" id="8-auth-key-generation" name="8-auth-key-generation"><i class="anchor-icon"></i></a>8) Auth key generation</h5>
|
||||
<p>The client computes the auth_key using formula <code>g_a^b mod dh_prime</code>:</p>
|
||||
<!-- start auth_key -->
|
||||
<pre><code>auth_key = 68C607FBF732686328AE0C9C39DA9D914C386228BF7FBE1891A24C99167A35B3586593272E4EF007588229042E8035599C21731D959E408B0CF9842AE25F1715E3F58CFAA3737061AAAD1D1C4195F2502C3AAB56C2FFEA4C2CA0A5443F4C4A74FDBF5CA5CC6E254B301DC3262B52FDD0E92E9FB7406E6E9953A028D2CF4BEE3D7C34C8910C03D041AED65FC90A0BFFC5D52718D7D0C6AF7B8C624B967F8BF06201EB64009F1C191E250A81E1261B2BD0C22075D3CFECDE990C857AD9CBCB180DE9AA3211C34D140D67D6778F209A0FA96742D3D05EBDB8A993CF2C40EF44F4B190DAC0A7B9A9766EFF33C60457ABEB765DAF5F75F5EDA564F78AB4DBFD571E03</code></pre>
|
||||
<pre><code>auth_key = 592D13011EA9CF4D4C067794B5B53CE4531573E2828E4B3612809790585E36B8F6627E697477BBD9C4104698168C92BF2B7FFBA53D183BC8CA551236FD07BAD96C20C38FFC4BECABD284E65C43CBAEA80640FDE5AC5BF17EC5E13DC0F96B8CC073EED665083971EE76441CADBC506ED559E037DE5AC9BBB85072B283C9FBCD4F22C7DBC3E3C1B4505A4EA99006927291867C39269A824D7C8A11B0128B11BBB7AC98818F00D26E902A1A18A99C5C938AEEF321BA377B66B64F3B1652FC3F21BD96E80AB4E28A7C510E925EF2B69EBE98C359B745BC9F268C6F6E52DE9D263F7C7606A1E7C0827EBDE0FCE1A8D68C6F55C476DADD2A7A59D9E74250F8970384BA</code></pre>
|
||||
<!-- end auth_key -->
|
||||
<h5><a class="anchor" href="#9-final-server-reply" id="9-final-server-reply" name="9-final-server-reply"><i class="anchor-icon"></i></a>9) Final server reply</h5>
|
||||
<p>The server verifies and confirms that auth_key_hash is unique: since it's unique, it replies with the following:</p>
|
||||
<!-- start dh_gen_ok -->
|
||||
<p>Received payload (excluding transport headers/trailers):</p>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 68 BC C8 CF 97 5F 65
|
||||
0010 | 4C 00 00 00 34 F7 CB 3B 9A 34 B2 BA F3 FF F7 F1
|
||||
0020 | C3 31 F2 31 91 49 DF 0F EE 52 4C B3 9F 67 CF EF
|
||||
0030 | A6 71 47 6A 74 13 E8 55 6C 0F 3C 63 0E 46 CC AE
|
||||
0040 | B0 6F 9F 7D 3C 57 80 43</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 A8 EE 93 8E A3 5F 65
|
||||
0010 | 9C 00 00 00 34 F7 CB 3B E4 69 51 99 0E 2C FC CA
|
||||
0020 | C9 32 4D 1B 8C 8F 04 C9 A6 4C FF DC C6 39 1B 39
|
||||
0030 | 96 EF 16 29 1A 89 8C 9F F4 1A A1 86 22 84 BE 73
|
||||
0040 | F2 45 03 E2 1F 6C 24 BF</code></pre>
|
||||
<p>Payload (de)serialization:</p>
|
||||
<pre><code>dh_gen_ok#3bcbf734 nonce:int128 server_nonce:int128 new_nonce_hash1:int128 = Set_client_DH_params_answer;</code></pre>
|
||||
<table class="table">
|
||||
|
@ -817,13 +817,13 @@ encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);<
|
|||
<tr>
|
||||
<td>message_id</td>
|
||||
<td>8, 8</td>
|
||||
<td><code>0168BCC8CF975F65</code></td>
|
||||
<td><code>01A8EE938EA35F65</code></td>
|
||||
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() << 32) + (N*4)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>message_length</td>
|
||||
<td>16, 4</td>
|
||||
<td><code>4C000000</code> (76 in decimal)</td>
|
||||
<td><code>9C000000</code> (156 in decimal)</td>
|
||||
<td>Message body length</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -835,19 +835,19 @@ encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);<
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>24, 16</td>
|
||||
<td><code>9A34B2BAF3FFF7F1C331F2319149DF0F</code></td>
|
||||
<td><code>E46951990E2CFCCAC9324D1B8C8F04C9</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>EE524CB39F67CFEFA671476A7413E855</code></td>
|
||||
<td><code>A64CFFDCC6391B3996EF16291A898C9F</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>new_nonce_hash1</td>
|
||||
<td>56, 16</td>
|
||||
<td><code>6C0F3C630E46CCAEB06F9F7D3C578043</code></td>
|
||||
<td><code>F41AA1862284BE73F24503E21F6C24BF</code></td>
|
||||
<td>The 128 lower-order bits of SHA1 of the byte string derived from the <code>new_nonce</code> string by adding a single byte with the value of 1, 2, or 3, and followed by another 8 bytes with <code>auth_key_aux_hash</code>. Different values are required to prevent an intruder from changing server response dh_gen_ok into dh_gen_retry.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>AppWebViewResult</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Contains the link that must be used to open a named bot web app.">
|
||||
<meta property="description" content="Contains the link that must be used to open a named bot mini app.">
|
||||
<meta property="og:title" content="AppWebViewResult">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Contains the link that must be used to open a named bot web app.">
|
||||
<meta property="og:description" content="Contains the link that must be used to open a named bot mini app.">
|
||||
<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">
|
||||
|
@ -42,7 +42,7 @@
|
|||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/type/AppWebViewResult" >AppWebViewResult</a></li></ul></div>
|
||||
<h1 id="dev_page_title">AppWebViewResult</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Contains the link that must be used to open a <a href="/api/bots/webapps#named-bot-web-apps">named bot web app</a>.</p>
|
||||
<div id="dev_page_content"><p>Contains the link that must be used to open a <a href="/api/bots/webapps#named-bot-mini-apps">named bot mini app</a>.</p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
@ -71,7 +71,7 @@
|
|||
<tbody>
|
||||
<tr>
|
||||
<td><a href="/constructor/appWebViewResultUrl">appWebViewResultUrl</a></td>
|
||||
<td>Contains the link that must be used to open a <a href="/api/bots/webapps#named-bot-web-apps">named bot web app</a>.</td>
|
||||
<td>Contains the link that must be used to open a <a href="/api/bots/webapps#named-bot-mini-apps">named bot mini app</a>.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
@ -86,7 +86,7 @@
|
|||
<tbody>
|
||||
<tr>
|
||||
<td><a href="/method/messages.requestAppWebView">messages.requestAppWebView</a></td>
|
||||
<td>Open a <a href="/bots/webapps">bot web app</a> from a <a href="/api/links#named-bot-web-app-links">named bot web app deep link</a>, sending over user information after user confirmation.<br><br>After calling this method, until the user closes the webview, <a href="/method/messages.prolongWebView">messages.prolongWebView</a> must be called every 60 seconds.</td>
|
||||
<td>Open a <a href="/bots/webapps">bot mini app</a> from a <a href="/api/links#named-bot-mini-app-links">named bot mini app deep link</a>, sending over user information after user confirmation.<br><br>After calling this method, until the user closes the webview, <a href="/method/messages.prolongWebView">messages.prolongWebView</a> must be called every 60 seconds.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>AttachMenuBot</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Represents a bot web app that can be launched from the attachment menu »">
|
||||
<meta property="description" content="Represents a bot mini app that can be launched from the attachment menu »">
|
||||
<meta property="og:title" content="AttachMenuBot">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Represents a bot web app that can be launched from the attachment menu »">
|
||||
<meta property="og:description" content="Represents a bot mini app that can be launched from the attachment menu »">
|
||||
<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">
|
||||
|
@ -42,7 +42,7 @@
|
|||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/type/AttachMenuBot" >AttachMenuBot</a></li></ul></div>
|
||||
<h1 id="dev_page_title">AttachMenuBot</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Represents a <a href="/bots/webapps#launching-web-apps-from-the-attachment-menu">bot web app that can be launched from the attachment menu »</a></p>
|
||||
<div id="dev_page_content"><p>Represents a <a href="/bots/webapps#launching-mini-apps-from-the-attachment-menu">bot mini app that can be launched from the attachment menu »</a></p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
@ -67,7 +67,7 @@
|
|||
<tbody>
|
||||
<tr>
|
||||
<td><a href="/constructor/attachMenuBot">attachMenuBot</a></td>
|
||||
<td>Represents a <a href="/api/bots/attach">bot web app that can be launched from the attachment menu »</a></td>
|
||||
<td>Represents a <a href="/api/bots/attach">bot mini app that can be launched from the attachment menu »</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>AttachMenuBotIcon</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Represents an attachment menu icon for bot web apps »">
|
||||
<meta property="description" content="Represents an attachment menu icon for bot mini apps »">
|
||||
<meta property="og:title" content="AttachMenuBotIcon">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Represents an attachment menu icon for bot web apps »">
|
||||
<meta property="og:description" content="Represents an attachment menu icon for bot mini apps »">
|
||||
<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">
|
||||
|
@ -42,7 +42,7 @@
|
|||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/type/AttachMenuBotIcon" >AttachMenuBotIcon</a></li></ul></div>
|
||||
<h1 id="dev_page_title">AttachMenuBotIcon</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Represents an attachment menu icon for <a href="/bots/webapps#launching-web-apps-from-the-attachment-menu">bot web apps »</a></p>
|
||||
<div id="dev_page_content"><p>Represents an attachment menu icon for <a href="/bots/webapps#launching-mini-apps-from-the-attachment-menu">bot mini apps »</a></p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
@ -67,7 +67,7 @@
|
|||
<tbody>
|
||||
<tr>
|
||||
<td><a href="/constructor/attachMenuBotIcon">attachMenuBotIcon</a></td>
|
||||
<td>Represents an attachment menu icon for <a href="/api/bots/attach">bot web apps »</a></td>
|
||||
<td>Represents an attachment menu icon for <a href="/api/bots/attach">bot mini apps »</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>AttachMenuBotIconColor</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Represents an attachment menu icon color for bot web apps »">
|
||||
<meta property="description" content="Represents an attachment menu icon color for bot mini apps »">
|
||||
<meta property="og:title" content="AttachMenuBotIconColor">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Represents an attachment menu icon color for bot web apps »">
|
||||
<meta property="og:description" content="Represents an attachment menu icon color for bot mini apps »">
|
||||
<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">
|
||||
|
@ -42,7 +42,7 @@
|
|||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/type/AttachMenuBotIconColor" >AttachMenuBotIconColor</a></li></ul></div>
|
||||
<h1 id="dev_page_title">AttachMenuBotIconColor</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Represents an attachment menu icon color for <a href="/bots/webapps#launching-web-apps-from-the-attachment-menu">bot web apps »</a></p>
|
||||
<div id="dev_page_content"><p>Represents an attachment menu icon color for <a href="/bots/webapps#launching-mini-apps-from-the-attachment-menu">bot mini apps »</a></p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
@ -67,7 +67,7 @@
|
|||
<tbody>
|
||||
<tr>
|
||||
<td><a href="/constructor/attachMenuBotIconColor">attachMenuBotIconColor</a></td>
|
||||
<td>Represents an attachment menu icon color for <a href="/api/bots/attach">bot web apps »</a></td>
|
||||
<td>Represents an attachment menu icon color for <a href="/api/bots/attach">bot mini apps »</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>AttachMenuBots</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Represents a list of bot web apps that can be launched from the attachment menu »">
|
||||
<meta property="description" content="Represents a list of bot mini apps that can be launched from the attachment menu »">
|
||||
<meta property="og:title" content="AttachMenuBots">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Represents a list of bot web apps that can be launched from the attachment menu »">
|
||||
<meta property="og:description" content="Represents a list of bot mini apps that can be launched from the attachment menu »">
|
||||
<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">
|
||||
|
@ -42,7 +42,7 @@
|
|||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/type/AttachMenuBots" >AttachMenuBots</a></li></ul></div>
|
||||
<h1 id="dev_page_title">AttachMenuBots</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Represents a list of <a href="/bots/webapps#launching-web-apps-from-the-attachment-menu">bot web apps that can be launched from the attachment menu »</a></p>
|
||||
<div id="dev_page_content"><p>Represents a list of <a href="/bots/webapps#launching-mini-apps-from-the-attachment-menu">bot mini apps that can be launched from the attachment menu »</a></p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
@ -72,11 +72,11 @@
|
|||
<tbody>
|
||||
<tr>
|
||||
<td><a href="/constructor/attachMenuBotsNotModified">attachMenuBotsNotModified</a></td>
|
||||
<td>The list of bot web apps hasn't changed</td>
|
||||
<td>The list of bot mini apps hasn't changed</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/attachMenuBots">attachMenuBots</a></td>
|
||||
<td>Represents a list of <a href="/api/bots/attach">bot web apps that can be launched from the attachment menu »</a></td>
|
||||
<td>Represents a list of <a href="/api/bots/attach">bot mini apps that can be launched from the attachment menu »</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
@ -91,7 +91,7 @@
|
|||
<tbody>
|
||||
<tr>
|
||||
<td><a href="/method/messages.getAttachMenuBots">messages.getAttachMenuBots</a></td>
|
||||
<td>Returns installed attachment menu <a href="/api/bots/attach">bot web apps »</a></td>
|
||||
<td>Returns installed attachment menu <a href="/api/bots/attach">bot mini apps »</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>AttachMenuBotsBot</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Represents a bot web app that can be launched from the attachment menu »">
|
||||
<meta property="description" content="Represents a bot mini app that can be launched from the attachment menu »">
|
||||
<meta property="og:title" content="AttachMenuBotsBot">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Represents a bot web app that can be launched from the attachment menu »">
|
||||
<meta property="og:description" content="Represents a bot mini app that can be launched from the attachment menu »">
|
||||
<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">
|
||||
|
@ -42,7 +42,7 @@
|
|||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/type/AttachMenuBotsBot" >AttachMenuBotsBot</a></li></ul></div>
|
||||
<h1 id="dev_page_title">AttachMenuBotsBot</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Represents a <a href="/bots/webapps#launching-web-apps-from-the-attachment-menu">bot web app that can be launched from the attachment menu »</a></p>
|
||||
<div id="dev_page_content"><p>Represents a <a href="/bots/webapps#launching-mini-apps-from-the-attachment-menu">bot mini app that can be launched from the attachment menu »</a></p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
@ -71,7 +71,7 @@
|
|||
<tbody>
|
||||
<tr>
|
||||
<td><a href="/constructor/attachMenuBotsBot">attachMenuBotsBot</a></td>
|
||||
<td>Represents a <a href="/api/bots/attach">bot web app that can be launched from the attachment menu »</a></td>
|
||||
<td>Represents a <a href="/api/bots/attach">bot mini app that can be launched from the attachment menu »</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
@ -86,7 +86,7 @@
|
|||
<tbody>
|
||||
<tr>
|
||||
<td><a href="/method/messages.getAttachMenuBot">messages.getAttachMenuBot</a></td>
|
||||
<td>Returns attachment menu entry for a <a href="/api/bots/attach">bot web app that can be launched from the attachment menu »</a></td>
|
||||
<td>Returns attachment menu entry for a <a href="/api/bots/attach">bot mini app that can be launched from the attachment menu »</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>AttachMenuPeerType</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Indicates a supported peer type for a bot web app attachment menu">
|
||||
<meta property="description" content="Indicates a supported peer type for a bot mini app attachment menu">
|
||||
<meta property="og:title" content="AttachMenuPeerType">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Indicates a supported peer type for a bot web app attachment menu">
|
||||
<meta property="og:description" content="Indicates a supported peer type for a bot mini app attachment menu">
|
||||
<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">
|
||||
|
@ -42,7 +42,7 @@
|
|||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/type/AttachMenuPeerType" >AttachMenuPeerType</a></li></ul></div>
|
||||
<h1 id="dev_page_title">AttachMenuPeerType</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Indicates a supported peer type for a <a href="/bots/webapps#launching-web-apps-from-the-attachment-menu">bot web app attachment menu</a></p>
|
||||
<div id="dev_page_content"><p>Indicates a supported peer type for a <a href="/bots/webapps#launching-mini-apps-from-the-attachment-menu">bot mini app attachment menu</a></p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
|
|
@ -837,7 +837,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/contacts.setBlocked">contacts.setBlocked</a></td>
|
||||
<td>Replace the contents of an entire <a href="/api/contacts">blocklist, see here for more info »</a>.</td>
|
||||
<td>Replace the contents of an entire <a href="/api/block">blocklist, see here for more info »</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/bots.canSendMessage">bots.canSendMessage</a></td>
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>BotApp</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Contains information about a named bot web app.">
|
||||
<meta property="description" content="Contains information about a named bot mini app.">
|
||||
<meta property="og:title" content="BotApp">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Contains information about a named bot web app.">
|
||||
<meta property="og:description" content="Contains information about a named bot mini app.">
|
||||
<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">
|
||||
|
@ -42,7 +42,7 @@
|
|||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/type/BotApp" >BotApp</a></li></ul></div>
|
||||
<h1 id="dev_page_title">BotApp</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Contains information about a <a href="/api/bots/webapps#named-bot-web-apps">named bot web app</a>.</p>
|
||||
<div id="dev_page_content"><p>Contains information about a <a href="/api/bots/webapps#named-bot-mini-apps">named bot mini app</a>.</p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
@ -72,7 +72,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/botApp">botApp</a></td>
|
||||
<td>Contains information about a <a href="/api/bots/webapps#named-bot-web-apps">named bot web app</a>.</td>
|
||||
<td>Contains information about a <a href="/api/bots/webapps#named-bot-mini-apps">named bot mini app</a>.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>InlineBotWebView</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Specifies a bot web app button, shown on top of the inline query results list.">
|
||||
<meta property="description" content="Specifies a bot mini app button, shown on top of the inline query results list.">
|
||||
<meta property="og:title" content="InlineBotWebView">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Specifies a bot web app button, shown on top of the inline query results list.">
|
||||
<meta property="og:description" content="Specifies a bot mini app button, shown on top of the inline query results list.">
|
||||
<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">
|
||||
|
@ -42,7 +42,7 @@
|
|||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/type/InlineBotWebView" >InlineBotWebView</a></li></ul></div>
|
||||
<h1 id="dev_page_title">InlineBotWebView</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Specifies a <a href="/api/bots/webapps#simple-web-apps">bot web app</a> button, shown on top of the inline query results list.</p>
|
||||
<div id="dev_page_content"><p>Specifies a <a href="/api/bots/webapps#simple-mini-apps">bot mini app</a> button, shown on top of the inline query results list.</p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
@ -67,7 +67,7 @@
|
|||
<tbody>
|
||||
<tr>
|
||||
<td><a href="/constructor/inlineBotWebView">inlineBotWebView</a></td>
|
||||
<td>Specifies a <a href="/api/bots/webapps#simple-web-apps">bot web app</a> button, shown on top of the inline query results list.</td>
|
||||
<td>Specifies a <a href="/api/bots/webapps#simple-mini-apps">bot mini app</a> button, shown on top of the inline query results list.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>InputBotApp</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Used to fetch information about a named bot web app">
|
||||
<meta property="description" content="Used to fetch information about a named bot mini app">
|
||||
<meta property="og:title" content="InputBotApp">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Used to fetch information about a named bot web app">
|
||||
<meta property="og:description" content="Used to fetch information about a named bot mini app">
|
||||
<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">
|
||||
|
@ -42,7 +42,7 @@
|
|||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/type/InputBotApp" >InputBotApp</a></li></ul></div>
|
||||
<h1 id="dev_page_title">InputBotApp</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Used to fetch information about a <a href="/api/bots/webapps#named-bot-web-apps">named bot web app</a></p>
|
||||
<div id="dev_page_content"><p>Used to fetch information about a <a href="/api/bots/webapps#named-bot-mini-apps">named bot mini app</a></p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
@ -68,11 +68,11 @@
|
|||
<tbody>
|
||||
<tr>
|
||||
<td><a href="/constructor/inputBotAppID">inputBotAppID</a></td>
|
||||
<td>Used to fetch information about a <a href="/api/bots/webapps#named-bot-web-apps">named bot web app</a> by its ID</td>
|
||||
<td>Used to fetch information about a <a href="/api/bots/webapps#named-bot-mini-apps">named bot mini app</a> by its ID</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/inputBotAppShortName">inputBotAppShortName</a></td>
|
||||
<td>Used to fetch information about a <a href="/api/bots/webapps#named-bot-web-apps">named bot web app</a> by its short name</td>
|
||||
<td>Used to fetch information about a <a href="/api/bots/webapps#named-bot-mini-apps">named bot mini app</a> by its short name</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
@ -134,11 +134,11 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/keyboardButtonWebView">keyboardButtonWebView</a></td>
|
||||
<td>Button to open a <a href="/api/bots/webapps">bot web app</a> using <a href="/method/messages.requestWebView">messages.requestWebView</a>, sending over user information after user confirmation.<br><br>Can only be sent or received as part of an inline keyboard, use <a href="/constructor/keyboardButtonSimpleWebView">keyboardButtonSimpleWebView</a> for reply keyboards.</td>
|
||||
<td>Button to open a <a href="/api/bots/webapps">bot mini app</a> using <a href="/method/messages.requestWebView">messages.requestWebView</a>, sending over user information after user confirmation.<br><br>Can only be sent or received as part of an inline keyboard, use <a href="/constructor/keyboardButtonSimpleWebView">keyboardButtonSimpleWebView</a> for reply keyboards.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/keyboardButtonSimpleWebView">keyboardButtonSimpleWebView</a></td>
|
||||
<td>Button to open a <a href="/api/bots/webapps">bot web app</a> using <a href="/method/messages.requestSimpleWebView">messages.requestSimpleWebView</a>, without sending user information to the web app.<br><br>Can only be sent or received as part of a reply keyboard, use <a href="/constructor/keyboardButtonWebView">keyboardButtonWebView</a> for inline keyboards.</td>
|
||||
<td>Button to open a <a href="/api/bots/webapps">bot mini app</a> using <a href="/method/messages.requestSimpleWebView">messages.requestSimpleWebView</a>, without sending user information to the web app.<br><br>Can only be sent or received as part of a reply keyboard, use <a href="/constructor/keyboardButtonWebView">keyboardButtonWebView</a> for inline keyboards.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/keyboardButtonRequestPeer">keyboardButtonRequestPeer</a></td>
|
||||
|
|
|
@ -225,11 +225,11 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/messageActionWebViewDataSentMe">messageActionWebViewDataSentMe</a></td>
|
||||
<td>Data from an opened <a href="/api/bots/webapps">reply keyboard bot web app</a> was relayed to the bot that owns it (bot side service message).</td>
|
||||
<td>Data from an opened <a href="/api/bots/webapps">reply keyboard bot mini app</a> was relayed to the bot that owns it (bot side service message).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/messageActionWebViewDataSent">messageActionWebViewDataSent</a></td>
|
||||
<td>Data from an opened <a href="/api/bots/webapps">reply keyboard bot web app</a> was relayed to the bot that owns it (user side service message).<br><br>Clients should display a service message with the text <code>Data from the «$text» button was transferred to the bot.</code></td>
|
||||
<td>Data from an opened <a href="/api/bots/webapps">reply keyboard bot mini app</a> was relayed to the bot that owns it (user side service message).<br><br>Clients should display a service message with the text <code>Data from the «$text» button was transferred to the bot.</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/messageActionGiftPremium">messageActionGiftPremium</a></td>
|
||||
|
|
|
@ -86,7 +86,7 @@
|
|||
<tbody>
|
||||
<tr>
|
||||
<td><a href="/method/messages.requestSimpleWebView">messages.requestSimpleWebView</a></td>
|
||||
<td>Open a <a href="/api/bots/webapps">bot web app</a>.</td>
|
||||
<td>Open a <a href="/api/bots/webapps">bot mini app</a>.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
|
|
|
@ -215,7 +215,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/updateNewAuthorization">updateNewAuthorization</a></td>
|
||||
<td>Authorized to the current user's account through an unknown device.</td>
|
||||
<td>A new session logged into the current user's account through an unknown device.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/updateNewEncryptedMessage">updateNewEncryptedMessage</a></td>
|
||||
|
|
|
@ -494,7 +494,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/messages.sendWebViewData">messages.sendWebViewData</a></td>
|
||||
<td>Used by the user to relay data from an opened <a href="/api/bots/webapps">reply keyboard bot web app</a> to the bot that owns it.</td>
|
||||
<td>Used by the user to relay data from an opened <a href="/api/bots/webapps">reply keyboard bot mini app</a> to the bot that owns it.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/channels.toggleJoinToSend">channels.toggleJoinToSend</a></td>
|
||||
|
|
|
@ -86,7 +86,7 @@
|
|||
<tbody>
|
||||
<tr>
|
||||
<td><a href="/method/messages.requestWebView">messages.requestWebView</a></td>
|
||||
<td>Open a <a href="/bots/webapps">bot web app</a>, sending over user information after user confirmation.<br><br>After calling this method, until the user closes the webview, <a href="/method/messages.prolongWebView">messages.prolongWebView</a> must be called every 60 seconds.</td>
|
||||
<td>Open a <a href="/bots/webapps">bot mini app</a>, sending over user information after user confirmation.<br><br>After calling this method, until the user closes the webview, <a href="/method/messages.prolongWebView">messages.prolongWebView</a> must be called every 60 seconds.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>messages.BotApp</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Contains information about a named bot web app">
|
||||
<meta property="description" content="Contains information about a named bot mini app">
|
||||
<meta property="og:title" content="messages.BotApp">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Contains information about a named bot web app">
|
||||
<meta property="og:description" content="Contains information about a named bot mini app">
|
||||
<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">
|
||||
|
@ -42,7 +42,7 @@
|
|||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/type/messages.BotApp" >messages.BotApp</a></li></ul></div>
|
||||
<h1 id="dev_page_title">messages.BotApp</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Contains information about a <a href="/api/bots/webapps#named-bot-web-apps">named bot web app</a></p>
|
||||
<div id="dev_page_content"><p>Contains information about a <a href="/api/bots/webapps#named-bot-mini-apps">named bot mini app</a></p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
@ -71,7 +71,7 @@
|
|||
<tbody>
|
||||
<tr>
|
||||
<td><a href="/constructor/messages.botApp">messages.botApp</a></td>
|
||||
<td>Contains information about a <a href="/api/bots/webapps#named-bot-web-apps">named bot web app</a></td>
|
||||
<td>Contains information about a <a href="/api/bots/webapps#named-bot-mini-apps">named bot mini app</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
@ -86,7 +86,7 @@
|
|||
<tbody>
|
||||
<tr>
|
||||
<td><a href="/method/messages.getBotApp">messages.getBotApp</a></td>
|
||||
<td>Obtain information about a <a href="/api/bots/webapps#named-bot-web-apps">named bot web app</a></td>
|
||||
<td>Obtain information about a <a href="/api/bots/webapps#named-bot-mini-apps">named bot mini app</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/type/stories.Stories" >stories.Stories</a></li></ul></div>
|
||||
<h1 id="dev_page_title">stories.Stories</h1>
|
||||
|
||||
<div id="dev_page_content"><p>List of <a href="/api/stories#pinnedarchived-stories">stories</a></p>
|
||||
<div id="dev_page_content"><p>List of <a href="/api/stories#pinned-or-archived-stories">stories</a></p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
@ -73,7 +73,7 @@
|
|||
<tbody>
|
||||
<tr>
|
||||
<td><a href="/constructor/stories.stories">stories.stories</a></td>
|
||||
<td>List of <a href="/api/stories#pinnedarchived-stories">stories</a></td>
|
||||
<td>List of <a href="/api/stories#pinned-or-archived-stories">stories</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
@ -88,11 +88,11 @@
|
|||
<tbody>
|
||||
<tr>
|
||||
<td><a href="/method/stories.getPinnedStories">stories.getPinnedStories</a></td>
|
||||
<td>Fetch the <a href="/api/stories#pinnedarchived-stories">stories</a> pinned on a peer's profile.</td>
|
||||
<td>Fetch the <a href="/api/stories#pinned-or-archived-stories">stories</a> pinned on a peer's profile.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/stories.getStoriesArchive">stories.getStoriesArchive</a></td>
|
||||
<td>Fetch the <a href="/api/stories#pinnedarchived-stories">story archive »</a> of a peer we control.</td>
|
||||
<td>Fetch the <a href="/api/stories#pinned-or-archived-stories">story archive »</a> of a peer we control.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/stories.getStoriesByID">stories.getStoriesByID</a></td>
|
||||
|
|
Loading…
Reference in a new issue