Update content of files

This commit is contained in:
GitHub Action 2023-12-01 19:54:19 +00:00
parent e81a66b7e1
commit 9488795a2b
25 changed files with 337 additions and 345 deletions

View file

@ -44,7 +44,7 @@
<div id="dev_page_content"><!-- scroll_nav -->
<p>Bots can install attachment menu and side menu entries, offering conveniently accessible, versatile <a href="/api/bots/webapps#normal-mini-apps">web apps</a>.</p>
<p>Bots can install attachment menu and side menu entries, offering conveniently accessible, versatile <a href="/api/bots/webapps#attachment-menu-mini-apps">mini 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>&lt;<a href='/type/RestrictionReason'>RestrictionReason</a>&gt; bot_inline_placeholder:flags.19?<a href='/type/string'>string</a> lang_code:flags.22?<a href='/type/string'>string</a> emoji_status:flags.30?<a href='/type/EmojiStatus'>EmojiStatus</a> usernames:flags2.0?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/Username'>Username</a>&gt; stories_max_id:flags2.5?<a href='/type/int'>int</a> = <a href='/type/User'>User</a>;
@ -83,8 +83,8 @@
Changes made using this method will trigger an <a href="/constructor/updateAttachMenuBots">updateAttachMenuBots</a> update in other clients, which should trigger a <a href="/method/messages.getAttachMenuBots">messages.getAttachMenuBots</a> call to fetch the full updated list of installed attachment/side menu entries.<br>
The attachment/side menu list should also be refreshed if the user changes the app's language in the settings. </p>
<p>Once an attachment/side menu is enabled for a certain user, the <a href="/constructor/user">user</a>.<code>attach_menu_enabled</code> flag will be set <em>for the bot</em>, and the <a href="/constructor/attachMenuBot">attachMenuBot</a>.<code>inactive</code> flag will be unset. </p>
<p>Clicking on the attachment/side menu entry should open the related <a href="/api/bots/webapps#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-or-side-menu-links">attachment/side menu deep links</a>.</p>
<p>Clicking on the attachment/side menu entry should open the related <a href="/api/bots/webapps#attachment-menu-mini-apps">attachment menu mini app</a>, see <a href="/api/bots/webapps#attachment-menu-mini-apps">here »</a> and <a href="/api/bots/webapps#side-menu-mini-apps">here »</a> for more info on the required steps.</p>
<p>Attachment menus can be installed and opened through <a href="/api/links#bot-attachment-or-side-menu-links">attachment/side menu deep links</a> and through <a href="/api/links#mini-app-links">mini app links</a>.</p>
<p>In particular, when clicking on such a link, <a href="/method/messages.getAttachMenuBot">messages.getAttachMenuBot</a> should be invoked to check if the bot has an associated attachment/side menu entry, and if yes: </p>
<ul>
<li>If the <a href="/constructor/attachMenuBot">attachMenuBot</a>.<code>inactive</code> flag:<ul>
@ -96,9 +96,9 @@ If the user accepts, invoke <a href="/method/messages.toggleBotInAttachMenu">mes
</ul>
</li>
<li>Open the Mini App:<ul>
<li>If the link subtype is a <a href="/api/links#open-anywhere"><code>startapp</code> link</a>, open the Mini App regardless of the currently open Telegram chat (in fact, the Mini App should opened even if the client itself is minimized), as specified <a href="/api/bots/webapps#normal-mini-apps">here »</a>. </li>
<li>For <a href="/api/links#bot-attachment-or-side-menu-links">any other link subtype</a>, check that the attachment menu can be opened in the chosen chat type by checking the <a href="/constructor/attachMenuBot">attachMenuBot</a>.<code>peer_types</code> field. <ul>
<li>If the chosen chat is supported, open the attachment menu <a href="/api/bots/webapps#normal-mini-apps">mini app »</a> as specified <a href="/api/bots/webapps#normal-mini-apps">here »</a>.</li>
<li>If the link is a <a href="/api/links#mini-app-links">direct mini app link</a>, open the Mini App regardless of the currently open Telegram chat (in fact, the Mini App should opened even if the client itself is minimized), as specified <a href="/api/bots/webapps#direct-link-mini-apps">here »</a>. </li>
<li>For <a href="/api/links#bot-attachment-or-side-menu-links">attachment/side menu links</a>, check that the attachment menu can be opened in the chosen chat type by checking the <a href="/constructor/attachMenuBot">attachMenuBot</a>.<code>peer_types</code> field. <ul>
<li>If the chosen chat is supported, open the <a href="/api/bots/webapps#attachment-menu-mini-apps">attachment menu mini app »</a> as specified <a href="/api/bots/webapps#attachment-menu-mini-apps">here »</a>.</li>
<li>Otherwise:<ul>
<li>If the user has just installed the attachment menu @ step 1, notify the user that the attachment menu was installed successfully.</li>
<li>Otherwise, notify the user that the attachment menu webapp can't be opened in the specified chat.</li>

View file

@ -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-mini-apps">bot mini 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#inline-mode-mini-apps">inline mode 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>

View file

@ -48,10 +48,10 @@
<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-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>
<p>Mini Apps can <em>send</em> web events starting with <code>web_app_</code>; see the <a href="/api/web-events">web event documentation for the full list of events that can be <em>sent</em> by the Mini App to the client »</a>. </p>
<h3><a class="anchor" href="#incoming-events-client-to-mini-app" id="incoming-events-client-to-mini-app" name="incoming-events-client-to-mini-app"><i class="anchor-icon"></i></a>Incoming events: Client to Mini App</h3>
<p>Mini Apps can also <em>receive</em> events, by exposing a <code>window.Telegram.WebView.receiveEvent("event_name", params)</code> method. </p>
<p>Here's the full list of events that can be <em>received</em> by a Mini App from the client, by calling the <code>receiveEvent</code> method. </p>
<p>Here's the full list of events that can be <em>received</em> by a Mini App from the client, if the client invokes the <code>receiveEvent</code> method. </p>
<h4><a class="anchor" href="#main-button-pressed" id="main-button-pressed" name="main-button-pressed"><i class="anchor-icon"></i></a><code>main_button_pressed</code></h4>
<p>Params: <code>null</code></p>
<p>Sent by the client when the user presses the main button located at the bottom of the webview, handle this event only if the main button was <a href="/api/web-events#web-app-setup-main-button">previously configured by a <code>web_app_setup_main_button</code> event »</a>.</p>
@ -206,7 +206,7 @@ Note that eventual errors will not be sent as a <code>failed</code> event if the
<a href='/method/messages.getInlineBotResults'>messages.getInlineBotResults</a>#514e999d flags:<a href='/type/%23'>#</a> bot:<a href='/type/InputUser'>InputUser</a> peer:<a href='/type/InputPeer'>InputPeer</a> geo_point:flags.0?<a href='/type/InputGeoPoint'>InputGeoPoint</a> query:<a href='/type/string'>string</a> offset:<a href='/type/string'>string</a> = <a href='/type/messages.BotResults'>messages.BotResults</a>;
<a href='/method/messages.requestSimpleWebView'>messages.requestSimpleWebView</a>#1a46500a flags:<a href='/type/%23'>#</a> from_switch_webview:flags.1?<a href='/constructor/true'>true</a> from_side_menu:flags.2?<a href='/constructor/true'>true</a> bot:<a href='/type/InputUser'>InputUser</a> url:flags.3?<a href='/type/string'>string</a> start_param:flags.4?<a href='/type/string'>string</a> theme_params:flags.0?<a href='/type/DataJSON'>DataJSON</a> platform:<a href='/type/string'>string</a> = <a href='/type/SimpleWebViewResult'>SimpleWebViewResult</a>;</code></pre>
<p>(Not to be confused with <a href="#inline-button-mini-apps">inline button mini apps »</a>). </p>
<p>Not to be confused with <a href="#inline-button-mini-apps">inline button mini apps »</a>. </p>
<p>Inline mode Mini Apps can be used to generate a custom set of inline results in response to a user's <a href="/api/bots/inline">inline query »</a> via a <a href="/api/web-events#web-app-switch-inline-query"><code>web_app_switch_inline_query</code> JS event »</a>. </p>
<p>Inline mode Mini Apps can be opened by clicking on an <a href="/constructor/inlineBotWebView">inlineBotWebView</a> button returned at the top of the inline result list, contained in <a href="/constructor/messages.botResults">messages.botResults</a>.<code>switch_webview</code>, returned by <a href="/method/messages.getInlineBotResults">messages.getInlineBotResults</a>. </p>
<p>Pass the <code>url</code> to <a href="/method/messages.requestSimpleWebView">messages.requestSimpleWebView</a>, while also setting the <code>from_switch_webview</code> flag. </p>
@ -236,11 +236,11 @@ If empty, the current chat is used. </li>
---functions---
<a href='/method/messages.requestSimpleWebView'>messages.requestSimpleWebView</a>#1a46500a flags:<a href='/type/%23'>#</a> from_switch_webview:flags.1?<a href='/constructor/true'>true</a> from_side_menu:flags.2?<a href='/constructor/true'>true</a> bot:<a href='/type/InputUser'>InputUser</a> url:flags.3?<a href='/type/string'>string</a> start_param:flags.4?<a href='/type/string'>string</a> theme_params:flags.0?<a href='/type/DataJSON'>DataJSON</a> platform:<a href='/type/string'>string</a> = <a href='/type/SimpleWebViewResult'>SimpleWebViewResult</a>;</code></pre>
<p>Direct Link Mini Apps can be opened by clicking on a <a href="/api/links#bot-attachment-or-side-menu-links"><code>startapp</code> link »</a>. </p>
<p>Direct Link Mini Apps can be opened by clicking on a <a href="/api/links#mini-app-links">Mini App link »</a>. </p>
<p>This action must trigger a <a href="/method/messages.requestSimpleWebView">messages.requestSimpleWebView</a> query with the <code>from_side_menu</code> flag set (like for <a href="#side-menu-mini-apps">side menu Mini Apps</a>), and any eventual <code>start_parameter</code> from the link should also be passed to the <code>start_param</code> flag. </p>
<p>Note that the app should be opened (with an installation prompt before, if needed) even if the client is minimized. </p>
<p>After invoking <a href="/method/messages.requestSimpleWebView">messages.requestSimpleWebView</a> and obtaining a <a href="/constructor/simpleWebViewResultUrl">simpleWebViewResultUrl</a> result, clients should open a webview using the <code>url</code> contained in the returned <a href="/constructor/simpleWebViewResultUrl">simpleWebViewResultUrl</a>. </p>
<h3><a class="anchor" href="#named-bot-mini-apps" id="named-bot-mini-apps" name="named-bot-mini-apps"><i class="anchor-icon"></i></a>Named bot Mini Apps</h3>
<h3><a class="anchor" href="#named-mini-apps" id="named-mini-apps" name="named-mini-apps"><i class="anchor-icon"></i></a>Named Mini Apps</h3>
<p>Schema:</p>
<pre><code><a href='/constructor/inputBotAppID'>inputBotAppID</a>#a920bd7a id:<a href='/type/long'>long</a> access_hash:<a href='/type/long'>long</a> = <a href='/type/InputBotApp'>InputBotApp</a>;
<a href='/constructor/inputBotAppShortName'>inputBotAppShortName</a>#908c0407 bot_id:<a href='/type/InputUser'>InputUser</a> short_name:<a href='/type/string'>string</a> = <a href='/type/InputBotApp'>InputBotApp</a>;
@ -257,7 +257,7 @@ If empty, the current chat is used. </li>
<a href='/method/messages.getBotApp'>messages.getBotApp</a>#34fdc5c3 app:<a href='/type/InputBotApp'>InputBotApp</a> hash:<a href='/type/long'>long</a> = <a href='/type/messages.BotApp'>messages.BotApp</a>;
<a href='/method/messages.requestAppWebView'>messages.requestAppWebView</a>#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-mini-app-links">named bot Mini App links »</a>. </p>
<p>Another way to open Mini Apps is by using <a href="/api/links#named-mini-app-links">named Mini App links »</a>. </p>
<p>These links are different from all other Mini App links, because they don't require the user to install an attachment menu, and a single bot can offer multiple Mini Apps, distinguished by their <code>short_name</code>. </p>
<p>These links should be handled as follows: </p>
<ul>

View file

@ -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-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/&lt;bot_username&gt;/&lt;short_name&gt;?startapp=&lt;start_parameter&gt;</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>
<p>Note that when opening <a href="/api/links#named-mini-app-links">named 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/&lt;bot_username&gt;/&lt;short_name&gt;?startapp=&lt;start_parameter&gt;</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-mini-app-links">named 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>

View file

@ -448,8 +448,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-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>
<p>Added support for <a href="/api/bots/webapps#named-mini-apps">named Mini Apps</a>, which can be opened from a <a href="/api/links#named-mini-app-links">named Mini App deep link</a>.<br>
<a href="/api/bots/webapps#inline-mode-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>
@ -458,8 +458,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-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/messages.getBotApp">messages.getBotApp</a> - Obtain information about a <a href="/api/bots/webapps#named-mini-apps">named 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-mini-app-links">named 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>
@ -471,13 +471,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-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/inputBotAppID">inputBotAppID</a> - Used to fetch information about a <a href="/api/bots/webapps#named-mini-apps">named 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-mini-apps">named 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-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/botApp">botApp</a> - Contains information about a <a href="/api/bots/webapps#named-mini-apps">named Mini App</a>.</li>
<li>Added <a href="/constructor/messages.botApp">messages.botApp</a> - Contains information about a <a href="/api/bots/webapps#named-mini-apps">named 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-mini-apps">named Mini App</a>.</li>
<li>Added <a href="/constructor/inlineBotWebView">inlineBotWebView</a> - Specifies an <a href="/api/bots/webapps#inline-mode-mini-apps">inline mode 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>

View file

@ -896,42 +896,6 @@ tg://resolve?domain=&lt;bot_username&gt;&amp;startgroup&amp;admin=&lt;permission
</tr>
</tbody>
</table>
<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-or-side-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/&lt;bot_username&gt;/&lt;short_name&gt;?startapp=&lt;start_parameter&gt;</code></pre>
<p><code>tg:</code> syntax:</p>
<pre><code>tg://resolve?domain=&lt;bot_username&gt;&amp;appname=&lt;short_name&gt;&amp;startapp=&lt;start_parameter&gt;</code></pre>
<p>Note that <a href="#bot-attachment-or-side-menu-links">bot attachment or side menu links</a> have a similar syntax, <em>without</em> a <code>short_name</code> parameter. </p>
<p>Parameters: </p>
<table class="table">
<thead>
<tr>
<th>Name</th>
<th style="text-align: center;">Optional</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>bot_username</code></td>
<td style="text-align: center;">Required</td>
<td>Username of the bot that owns the <a href="/api/bots/games">game</a></td>
</tr>
<tr>
<td><code>appname</code></td>
<td style="text-align: center;">Required</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>
<td style="text-align: center;">Optional</td>
<td><code>start_param</code> to pass to <a href="/method/messages.requestAppWebView">messages.requestAppWebView</a></td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#settings-links" id="settings-links" name="settings-links"><i class="anchor-icon"></i></a>Settings links</h3>
<h4><a class="anchor" href="#settings-link" id="settings-link" name="settings-link"><i class="anchor-icon"></i></a>Settings link</h4>
<p>Used to bring the user to the app settings. </p>
@ -1124,15 +1088,14 @@ These links are used to confirm ownership of the phone number, to prevent accoun
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#bot-attachment-or-side-menu-links" id="bot-attachment-or-side-menu-links" name="bot-attachment-or-side-menu-links"><i class="anchor-icon"></i></a>Bot attachment or side menu links</h3>
<p>Used to install and open a <a href="/api/bots/attach">bot attachment or side menu »</a> in a certain chat.<br>
For all link types, clients should first <a href="/api/bots/attach">install the associated bot attachment or side menu entry as specified here »</a>, and if the user accepts the installation prompt, open the Mini App using the following logic, depending on the link subtype:</p>
<h4><a class="anchor" href="#open-anywhere" id="open-anywhere" name="open-anywhere"><i class="anchor-icon"></i></a>Open anywhere</h4>
<h3><a class="anchor" href="#mini-app-links" id="mini-app-links" name="mini-app-links"><i class="anchor-icon"></i></a>Mini App links</h3>
<p>Used to install and open a <a href="/api/bots/attach">bot attachment or side menu »</a>.<br>
Clients should first <a href="/api/bots/attach">install the associated bot attachment or side menu entry as specified here »</a>, and if the user accepts the installation prompt, open the Mini App using the following logic. </p>
<p>After installing the attachment/side menu entry globally, opens the associated mini app using <a href="/method/messages.requestSimpleWebView">messages.requestSimpleWebView</a> with the <code>from_side_menu</code> flag set, regardless of the currently open Telegram chat (in fact, the Mini App should opened with that flag even if the client itself is minimized). </p>
<p><code>t.me</code> syntax:</p>
<pre><code>t.me/&lt;bot_username&gt;?startapp
t.me/&lt;bot_username&gt;?startapp=&lt;start_parameter&gt;</code></pre>
<p>Note that <a href="#named-bot-mini-app-links">named bot mini app links</a> have a similar syntax, with an additional <code>short_name</code> parameter. </p>
<p>Note that <a href="#named-mini-app-links">named Mini App links</a> have a similar syntax, with an additional <code>short_name</code> parameter to identify a specific Mini App owned by the bot. </p>
<p><code>tg:</code> syntax:</p>
<pre><code>tg://resolve?domain=&lt;bot_username&gt;&amp;startapp
tg://resolve?domain=&lt;bot_username&gt;&amp;startapp=&lt;start_parameter&gt;</code></pre>
@ -1158,6 +1121,45 @@ tg://resolve?domain=&lt;bot_username&gt;&amp;startapp=&lt;start_parameter&gt;</c
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#named-mini-app-links" id="named-mini-app-links" name="named-mini-app-links"><i class="anchor-icon"></i></a>Named mini app links</h3>
<p>Used to share <a href="/api/bots/webapps#named-mini-apps">named mini apps</a>. </p>
<p>These links are different from <a href="#bot-attachment-or-side-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-mini-apps">named Mini App documentation »</a>. </p>
<p><code>t.me</code> syntax:</p>
<pre><code>t.me/&lt;bot_username&gt;/&lt;short_name&gt;?startapp=&lt;start_parameter&gt;</code></pre>
<p><code>tg:</code> syntax:</p>
<pre><code>tg://resolve?domain=&lt;bot_username&gt;&amp;appname=&lt;short_name&gt;&amp;startapp=&lt;start_parameter&gt;</code></pre>
<p>Note that <a href="#mini-app-links">Mini App links</a> have a similar syntax, <em>without</em> a <code>short_name</code> parameter. </p>
<p>Parameters: </p>
<table class="table">
<thead>
<tr>
<th>Name</th>
<th style="text-align: center;">Optional</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>bot_username</code></td>
<td style="text-align: center;">Required</td>
<td>Username of the bot that owns the <a href="/api/bots/games">game</a></td>
</tr>
<tr>
<td><code>appname</code></td>
<td style="text-align: center;">Required</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>
<td style="text-align: center;">Optional</td>
<td><code>start_param</code> to pass to <a href="/method/messages.requestAppWebView">messages.requestAppWebView</a></td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#bot-attachment-or-side-menu-links" id="bot-attachment-or-side-menu-links" name="bot-attachment-or-side-menu-links"><i class="anchor-icon"></i></a>Bot attachment or side menu links</h3>
<p>Used to install and open a <a href="/api/bots/attach">bot attachment or side menu »</a> in a certain chat.<br>
For all link types, clients should first <a href="/api/bots/attach">install the associated bot attachment or side menu entry as specified here »</a>, and if the user accepts the installation prompt, open the Mini App using the following logic, depending on the link subtype:</p>
<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>After installing the attachment/side menu entry globally, opens the associated mini app using <a href="/method/messages.requestWebView">messages.requestWebView</a> in the currently open chat, by passing it to the <code>peer</code> parameter of <a href="/method/messages.requestWebView">messages.requestWebView</a>. </p>
<p>If the current chat is not supported by the <a href="/constructor/attachMenuBot">attachMenuBot</a>.<code>peer_types</code> field: </p>

View file

@ -174,7 +174,7 @@ If non-empty, the client should prompt the user to choose a specific chat of the
The array values specify which types of chats the user will be able to choose from.<br>
If empty, the current chat is used. </li>
</ul>
<p>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>
<p>Used by <a href="/api/bots/webapps#inline-mode-mini-apps">inline mode mini apps</a> to send back data to the bot as specified <a href="/api/bots/webapps#inline-mode-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>

View file

@ -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 mini app.">
<meta property="description" content="Contains the link that must be used to open a named 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 mini app.">
<meta property="og:description" content="Contains the link that must be used to open a named 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-mini-apps">named bot mini 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-mini-apps">named Mini App</a>.</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">

View file

@ -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 mini app.">
<meta property="description" content="Contains information about a named Mini App.">
<meta property="og:title" content="botApp">
<meta property="og:image" content="">
<meta property="og:description" content="Contains information about a named bot mini app.">
<meta property="og:description" content="Contains information about a named 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-mini-apps">named bot mini app</a>.</p>
<div id="dev_page_content"><p>Contains information about a <a href="/api/bots/webapps#named-mini-apps">named Mini App</a>.</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
@ -84,7 +84,7 @@
<tr>
<td><strong>short_name</strong></td>
<td style="text-align: center;"><a href="/type/string">string</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>
<td>bot mini app short name, used to generate <a href="/api/links#named-mini-app-links">named Mini App deep links</a>.</td>
</tr>
<tr>
<td><strong>title</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-mini-apps">named bot mini app</a></p>
<p>Obtain information about a <a href="/api/bots/webapps#named-mini-apps">named 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>

View file

@ -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 mini app button, shown on top of the inline query results list.">
<meta property="description" content="Specifies an inline mode 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 mini app button, shown on top of the inline query results list.">
<meta property="og:description" content="Specifies an inline mode 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-mini-apps">bot mini app</a> button, shown on top of the inline query results list.</p>
<div id="dev_page_content"><p>Specifies an <a href="/api/bots/webapps#inline-mode-mini-apps">inline mode 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">

View file

@ -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 mini app by its ID">
<meta property="description" content="Used to fetch information about a named 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 mini app by its ID">
<meta property="og:description" content="Used to fetch information about a named 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-mini-apps">named bot mini app</a> by its ID</p>
<div id="dev_page_content"><p>Used to fetch information about a <a href="/api/bots/webapps#named-mini-apps">named 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-mini-apps">named bot mini app</a> ID.</td>
<td><a href="/api/bots/webapps#named-mini-apps">named 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-mini-apps">named bot mini app</a>.</p></div>
<p>Contains information about a <a href="/api/bots/webapps#named-mini-apps">named Mini App</a>.</p></div>
</div>

View file

@ -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 mini app by its short name">
<meta property="description" content="Used to fetch information about a named 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 mini app by its short name">
<meta property="og:description" content="Used to fetch information about a named 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-mini-apps">named bot mini 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-mini-apps">named 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">
@ -74,7 +74,7 @@
<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-mini-app-links">named bot mini app deep link</a></td>
<td>Short name, obtained from a <a href="/api/links#named-mini-app-links">named Mini App deep link</a></td>
</tr>
</tbody>
</table>

View file

@ -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 mini app">
<meta property="description" content="Contains information about a named 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 mini app">
<meta property="og:description" content="Contains information about a named 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-mini-apps">named bot mini app</a></p>
<div id="dev_page_content"><p>Contains information about a <a href="/api/bots/webapps#named-mini-apps">named 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 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>Open a <a href="/bots/webapps">bot mini app</a> from a <a href="/api/links#named-mini-app-links">named 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>

View file

@ -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-mini-apps">bot mini 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#inline-mode-mini-apps">inline mode mini app</a>.</td>
</tr>
<tr>
<td><strong>results</strong></td>

View file

@ -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 mini app">
<meta property="description" content="Obtain information about a named 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 mini app">
<meta property="og:description" content="Obtain information about a named 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-mini-apps">named bot mini app</a></p>
<div id="dev_page_content"><p>Obtain information about a <a href="/api/bots/webapps#named-mini-apps">named 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-mini-app-links">named bot mini app deep link »</a>.</td>
<td>Bot app information obtained from a <a href="/api/links#named-mini-app-links">named Mini App deep link »</a>.</td>
</tr>
<tr>
<td><strong>hash</strong></td>

View file

@ -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 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="description" content="Open a bot mini app from a named 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 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:description" content="Open a bot mini app from a named 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 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>
<div id="dev_page_content"><p>Open a <a href="/bots/webapps">bot mini app</a> from a <a href="/api/links#named-mini-app-links">named 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-mini-app-links">named bot mini 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-mini-app-links">named 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-mini-app-links">named bot mini 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-mini-app-links">named 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-mini-app-links">named bot mini 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-mini-app-links">named 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-mini-apps">named bot mini app</a></p>
<p>Obtain information about a <a href="/api/bots/webapps#named-mini-apps">named 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>

View file

@ -81,7 +81,7 @@
<tr>
<td><strong>from_side_menu</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.2?<a href="/constructor/true">true</a></td>
<td>Set this flag if opening the Mini App from the installed <a href="/api/bots/attach">side menu entry »</a> or from a <a href="/api/links#open-anywhere"><code>startapp</code> link »</a>.</td>
<td>Set this flag if opening the Mini App from the installed <a href="/api/bots/attach">side menu entry »</a> or from a <a href="/api/links#mini-app-links">Mini App link »</a>.</td>
</tr>
<tr>
<td><strong>bot</strong></td>
@ -96,7 +96,7 @@
<tr>
<td><strong>start_param</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.4?<a href="/type/string">string</a></td>
<td>Start parameter, if opening from a <a href="/api/links#open-anywhere"><code>startapp</code> link »</a>.</td>
<td>Start parameter, if opening from a <a href="/api/links#mini-app-links">Mini App link »</a>.</td>
</tr>
<tr>
<td><strong>theme_params</strong></td>

View file

@ -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-mini-apps">bot mini 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#inline-mode-mini-apps">inline mode mini app</a>.</td>
</tr>
</tbody>
</table>

View file

@ -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 3C 04 06 00 BA 70 67 65
0010 | 14 00 00 00 F1 8E 7E BE 4A 20 F9 EC B2 FF 02 EB
0020 | DC D6 FF 20 BE 2C 9E 9B</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 58 5B 0E 00 35 39 6A 65
0010 | 14 00 00 00 F1 8E 7E BE F8 21 AC 0F 4F D4 CE AA
0020 | D0 13 3F E2 44 9F 86 D4</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>3C040600BA706765</code></td>
<td><code>585B0E0035396A65</code></td>
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() &lt;&lt; 32) + (N*4)</td>
</tr>
<tr>
@ -95,7 +95,7 @@
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>4A20F9ECB2FF02EBDCD6FF20BE2C9E9B</code></td>
<td><code>F821AC0F4FD4CEAAD0133FE2449F86D4</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 D8 0E 79 BA 70 67 65
0010 | AC 00 00 00 63 24 16 05 4A 20 F9 EC B2 FF 02 EB
0020 | DC D6 FF 20 BE 2C 9E 9B D6 49 5F 55 CD AF 79 0C
0030 | 1E 0C 40 55 9C 5E 1D 91 08 1A DD 8F 53 1C BB 41
0040 | 17 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 E4 F2 74 35 39 6A 65
0010 | A8 00 00 00 63 24 16 05 F8 21 AC 0F 4F D4 CE AA
0020 | D0 13 3F E2 44 9F 86 D4 90 99 8E 8A AD 0D A1 6E
0030 | 3B 99 50 BF 5A 7A E8 99 08 26 97 BF A6 44 87 25
0040 | CD 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>01D80E79BA706765</code></td>
<td><code>01E4F27435396A65</code></td>
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() &lt;&lt; 32) + (N*4)</td>
</tr>
<tr>
<td>message_length</td>
<td>16, 4</td>
<td><code>AC000000</code> (172 in decimal)</td>
<td><code>A8000000</code> (168 in decimal)</td>
<td>Message body length</td>
</tr>
<tr>
@ -150,19 +150,19 @@
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>4A20F9ECB2FF02EBDCD6FF20BE2C9E9B</code></td>
<td><code>F821AC0F4FD4CEAAD0133FE2449F86D4</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>D6495F55CDAF790C1E0C40559C5E1D91</code></td>
<td><code>90998E8AAD0DA16E3B9950BF5A7AE899</code></td>
<td>Server-generated random number</td>
</tr>
<tr>
<td>pq</td>
<td>56, 12</td>
<td><code>081ADD8F531CBB4117000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1935861001966272791</td>
<td><code>082697BFA6448725CD000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 2780902015759754701</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 &lt; q.</h5>
<!-- start pq -->
<pre><code>pq = 1935861001966272791</code></pre>
<p>Decompose into 2 prime cofactors <code>p &lt; q</code>: <code>1935861001966272791 = 1152207451 * 1680132341</code></p>
<pre><code>p = 1152207451
q = 1680132341</code></pre>
<pre><code>pq = 2780902015759754701</code></pre>
<p>Decompose into 2 prime cofactors <code>p &lt; q</code>: <code>2780902015759754701 = 1447414093 * 1921289857</code></p>
<pre><code>p = 1447414093
q = 1921289857</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 1A DD 8F 53 1C BB 41 17 00 00 00
0010 | 04 44 AD 4A 5B 00 00 00 04 64 24 C8 F5 00 00 00
0020 | 4A 20 F9 EC B2 FF 02 EB DC D6 FF 20 BE 2C 9E 9B
0030 | D6 49 5F 55 CD AF 79 0C 1E 0C 40 55 9C 5E 1D 91
0040 | 82 05 22 D4 26 58 46 C8 F7 E7 B7 E0 B7 74 AF 42
0050 | DC 51 F1 90 1C 8E E2 A4 41 87 03 98 D0 96 DF 25
<pre><code>0000 | 95 5F F5 A9 08 26 97 BF A6 44 87 25 CD 00 00 00
0010 | 04 56 45 C9 4D 00 00 00 04 72 84 8E 81 00 00 00
0020 | F8 21 AC 0F 4F D4 CE AA D0 13 3F E2 44 9F 86 D4
0030 | 90 99 8E 8A AD 0D A1 6E 3B 99 50 BF 5A 7A E8 99
0040 | 9B 92 95 7B 94 42 A5 1F 66 42 93 A0 F4 05 59 69
0050 | 97 3B 7C 3A 0B DC AA 1C 63 80 6C 66 10 9C 62 9A
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 = 1680132341</code></pre>
<tr>
<td>pq</td>
<td>4, 12</td>
<td><code>081ADD8F531CBB4117000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1935861001966272791</td>
<td><code>082697BFA6448725CD000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 2780902015759754701</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>0444AD4A5B000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1152207451</td>
<td><code>045645C94D000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1447414093</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>046424C8F5000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1680132341</td>
<td><code>0472848E81000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1921289857</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>4A20F9ECB2FF02EBDCD6FF20BE2C9E9B</code></td>
<td><code>F821AC0F4FD4CEAAD0133FE2449F86D4</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>48, 16</td>
<td><code>D6495F55CDAF790C1E0C40559C5E1D91</code></td>
<td><code>90998E8AAD0DA16E3B9950BF5A7AE899</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>new_nonce</td>
<td>64, 32</td>
<td><code>820522D4265846C8F7E7B7E0B774AF42</code> <code>DC51F1901C8EE2A441870398D096DF25</code></td>
<td><code>9B92957B9442A51F664293A0F4055969</code> <code>973B7C3A0BDCAA1C63806C66109C629A</code></td>
<td>Client-generated random number</td>
</tr>
<tr>
@ -291,39 +291,39 @@ q = 1680132341</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 = 955FF5A9081ADD8F531CBB41170000000444AD4A5B000000046424C8F50000004A20F9ECB2FF02EBDCD6FF20BE2C9E9BD6495F55CDAF790C1E0C40559C5E1D91820522D4265846C8F7E7B7E0B774AF42DC51F1901C8EE2A441870398D096DF2502000000
random_padding_bytes = A02800255F1BD74C87121565F40152C31CC431A5B71E47B35AA2FEE501015EC20BD9384549D72407DFA15621B41FC121C1F594A05D1E3229A442C3B01C17D2EE65CBB0B9BD365BDAB8AE3CEC78D758D71F2F0749191BFBD9148C060E</code></pre>
<pre><code>data = 955FF5A9082697BFA6448725CD000000045645C94D0000000472848E81000000F821AC0F4FD4CEAAD0133FE2449F86D490998E8AAD0DA16E3B9950BF5A7AE8999B92957B9442A51F664293A0F4055969973B7C3A0BDCAA1C63806C66109C629A02000000
random_padding_bytes = 6D401E9FBC96FFF4E42EDF9E0F36BCF77D54BDB15BE4CED43896165AA8D6D41FD257CF37C3B9D9C21321958145FD30F5A413735844EB201F00407CA8ECD915B039C899031F8A848510D8E40E87945742004BC3690545963F98B5DF6E</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 = A53F39509060A2560647550F3167D07F6FA08F29C84E6FF7FC67411D57FCAC1B93969620FC7B1A69F15454B21BD2AB46161535EDFB357BD21B13244B0F0A2977C2F65DB8E9259CC3788FC65E1FC7AFEF240AE9C784747FB960EAD47D8F4B148E07BCF7FC4972186C3EB0E45062D305741B6B6CE1223589AE8AEEFDA3BAC506F02B740ECC5A4079E15AE6D9BFB95C34B003E5BEC88446CE89E6AEBF4BEBADB820B5AA1280460A140C8D1F85F179BD2E4D2F00413E2C139E8E585A497EFB267C38777110D0841E272E99F1083DA76D7AC4FA4B9C00BA32CE5FCFAB010A7416AA63BA16795A2B23E7F18BA1009E4B636976DF8EC38187C8141FA46F7F3AE2556A01</code></pre>
<pre><code>encrypted_data = 5186BB5EA844FCCAAE5CC77182122CB0069DA1A6F05E60A08D610C01019CDC01CE84E6B73EF460A8FDB7CDAA97688EEA443DEC2F78323E91F9A5EA74C64237937104841F7D3B5417784DFA5B4A47013DF87CA966D9087088133CC802F529CE414B393DC86F23A1A8A28F89358B5FE6E7E9B6CE9579DA0DA8E05EB8D346B8D9113ED89BE229BA4628A078FC44A77A9294C37FE5A410FB46604D130E2501E79F8AC5D1112EC638A6634CE958A575F5A095FD9EFF6DB439518A7124F1529D5FF8FE15BE776AE9F6F6255F4895DD5BB7CA0BF50861AFB9C51159EC3F92560C089A5B3E70353E33D081F51BC43F3B19F23C603A08207CCB8EE5AFA157C33FD3E9DD0E</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 BC D4 09 00 BA 70 67 65
0010 | 40 01 00 00 BE E4 12 D7 4A 20 F9 EC B2 FF 02 EB
0020 | DC D6 FF 20 BE 2C 9E 9B D6 49 5F 55 CD AF 79 0C
0030 | 1E 0C 40 55 9C 5E 1D 91 04 44 AD 4A 5B 00 00 00
0040 | 04 64 24 C8 F5 00 00 00 85 FD 64 DE 85 1D 9D D0
0050 | FE 00 01 00 A5 3F 39 50 90 60 A2 56 06 47 55 0F
0060 | 31 67 D0 7F 6F A0 8F 29 C8 4E 6F F7 FC 67 41 1D
0070 | 57 FC AC 1B 93 96 96 20 FC 7B 1A 69 F1 54 54 B2
0080 | 1B D2 AB 46 16 15 35 ED FB 35 7B D2 1B 13 24 4B
0090 | 0F 0A 29 77 C2 F6 5D B8 E9 25 9C C3 78 8F C6 5E
00A0 | 1F C7 AF EF 24 0A E9 C7 84 74 7F B9 60 EA D4 7D
00B0 | 8F 4B 14 8E 07 BC F7 FC 49 72 18 6C 3E B0 E4 50
00C0 | 62 D3 05 74 1B 6B 6C E1 22 35 89 AE 8A EE FD A3
00D0 | BA C5 06 F0 2B 74 0E CC 5A 40 79 E1 5A E6 D9 BF
00E0 | B9 5C 34 B0 03 E5 BE C8 84 46 CE 89 E6 AE BF 4B
00F0 | EB AD B8 20 B5 AA 12 80 46 0A 14 0C 8D 1F 85 F1
0100 | 79 BD 2E 4D 2F 00 41 3E 2C 13 9E 8E 58 5A 49 7E
0110 | FB 26 7C 38 77 71 10 D0 84 1E 27 2E 99 F1 08 3D
0120 | A7 6D 7A C4 FA 4B 9C 00 BA 32 CE 5F CF AB 01 0A
0130 | 74 16 AA 63 BA 16 79 5A 2B 23 E7 F1 8B A1 00 9E
0140 | 4B 63 69 76 DF 8E C3 81 87 C8 14 1F A4 6F 7F 3A
0150 | E2 55 6A 01</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 5C 5B 0E 00 35 39 6A 65
0010 | 40 01 00 00 BE E4 12 D7 F8 21 AC 0F 4F D4 CE AA
0020 | D0 13 3F E2 44 9F 86 D4 90 99 8E 8A AD 0D A1 6E
0030 | 3B 99 50 BF 5A 7A E8 99 04 56 45 C9 4D 00 00 00
0040 | 04 72 84 8E 81 00 00 00 85 FD 64 DE 85 1D 9D D0
0050 | FE 00 01 00 51 86 BB 5E A8 44 FC CA AE 5C C7 71
0060 | 82 12 2C B0 06 9D A1 A6 F0 5E 60 A0 8D 61 0C 01
0070 | 01 9C DC 01 CE 84 E6 B7 3E F4 60 A8 FD B7 CD AA
0080 | 97 68 8E EA 44 3D EC 2F 78 32 3E 91 F9 A5 EA 74
0090 | C6 42 37 93 71 04 84 1F 7D 3B 54 17 78 4D FA 5B
00A0 | 4A 47 01 3D F8 7C A9 66 D9 08 70 88 13 3C C8 02
00B0 | F5 29 CE 41 4B 39 3D C8 6F 23 A1 A8 A2 8F 89 35
00C0 | 8B 5F E6 E7 E9 B6 CE 95 79 DA 0D A8 E0 5E B8 D3
00D0 | 46 B8 D9 11 3E D8 9B E2 29 BA 46 28 A0 78 FC 44
00E0 | A7 7A 92 94 C3 7F E5 A4 10 FB 46 60 4D 13 0E 25
00F0 | 01 E7 9F 8A C5 D1 11 2E C6 38 A6 63 4C E9 58 A5
0100 | 75 F5 A0 95 FD 9E FF 6D B4 39 51 8A 71 24 F1 52
0110 | 9D 5F F8 FE 15 BE 77 6A E9 F6 F6 25 5F 48 95 DD
0120 | 5B B7 CA 0B F5 08 61 AF B9 C5 11 59 EC 3F 92 56
0130 | 0C 08 9A 5B 3E 70 35 3E 33 D0 81 F5 1B C4 3F 3B
0140 | 19 F2 3C 60 3A 08 20 7C CB 8E E5 AF A1 57 C3 3F
0150 | D3 E9 DD 0E</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 = A02800255F1BD74C87121565F40152C31CC431A5B71E47B35AA2FEE50
<tr>
<td>message_id</td>
<td>8, 8</td>
<td><code>BCD40900BA706765</code></td>
<td><code>5C5B0E0035396A65</code></td>
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() &lt;&lt; 32) + (N*4)</td>
</tr>
<tr>
@ -363,25 +363,25 @@ random_padding_bytes = A02800255F1BD74C87121565F40152C31CC431A5B71E47B35AA2FEE50
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>4A20F9ECB2FF02EBDCD6FF20BE2C9E9B</code></td>
<td><code>F821AC0F4FD4CEAAD0133FE2449F86D4</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>D6495F55CDAF790C1E0C40559C5E1D91</code></td>
<td><code>90998E8AAD0DA16E3B9950BF5A7AE899</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>p</td>
<td>56, 8</td>
<td><code>0444AD4A5B000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1152207451</td>
<td><code>045645C94D000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1447414093</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>046424C8F5000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1680132341</td>
<td><code>0472848E81000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1921289857</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 = A02800255F1BD74C87121565F40152C31CC431A5B71E47B35AA2FEE50
<tr>
<td>encrypted_data</td>
<td>80, 260</td>
<td><code>FE000100A53F39509060A2560647550F</code> <code>3167D07F6FA08F29C84E6FF7FC67411D</code> <code>57FCAC1B93969620FC7B1A69F15454B2</code> <code>1BD2AB46161535EDFB357BD21B13244B</code> <code>0F0A2977C2F65DB8E9259CC3788FC65E</code> <code>1FC7AFEF240AE9C784747FB960EAD47D</code> <code>8F4B148E07BCF7FC4972186C3EB0E450</code> <code>62D305741B6B6CE1223589AE8AEEFDA3</code> <code>BAC506F02B740ECC5A4079E15AE6D9BF</code> <code>B95C34B003E5BEC88446CE89E6AEBF4B</code> <code>EBADB820B5AA1280460A140C8D1F85F1</code> <code>79BD2E4D2F00413E2C139E8E585A497E</code> <code>FB267C38777110D0841E272E99F1083D</code> <code>A76D7AC4FA4B9C00BA32CE5FCFAB010A</code> <code>7416AA63BA16795A2B23E7F18BA1009E</code> <code>4B636976DF8EC38187C8141FA46F7F3A</code><br> <code>E2556A01</code></td>
<td><code>FE0001005186BB5EA844FCCAAE5CC771</code> <code>82122CB0069DA1A6F05E60A08D610C01</code> <code>019CDC01CE84E6B73EF460A8FDB7CDAA</code> <code>97688EEA443DEC2F78323E91F9A5EA74</code> <code>C64237937104841F7D3B5417784DFA5B</code> <code>4A47013DF87CA966D9087088133CC802</code> <code>F529CE414B393DC86F23A1A8A28F8935</code> <code>8B5FE6E7E9B6CE9579DA0DA8E05EB8D3</code> <code>46B8D9113ED89BE229BA4628A078FC44</code> <code>A77A9294C37FE5A410FB46604D130E25</code> <code>01E79F8AC5D1112EC638A6634CE958A5</code> <code>75F5A095FD9EFF6DB439518A7124F152</code> <code>9D5FF8FE15BE776AE9F6F6255F4895DD</code> <code>5BB7CA0BF50861AFB9C51159EC3F9256</code> <code>0C089A5B3E70353E33D081F51BC43F3B</code> <code>19F23C603A08207CCB8EE5AFA157C33F</code><br> <code>D3E9DD0E</code></td>
<td>Value generated above</td>
</tr>
</tbody>
@ -402,47 +402,47 @@ random_padding_bytes = A02800255F1BD74C87121565F40152C31CC431A5B71E47B35AA2FEE50
<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 A4 0C 1C BB 70 67 65
0010 | B0 02 00 00 5C 07 E8 D0 4A 20 F9 EC B2 FF 02 EB
0020 | DC D6 FF 20 BE 2C 9E 9B D6 49 5F 55 CD AF 79 0C
0030 | 1E 0C 40 55 9C 5E 1D 91 FE 50 02 00 BA 78 8B 25
0040 | D6 DA A7 E7 E5 19 72 03 16 90 2C 8D 18 2F 35 DE
0050 | 43 AA 58 82 2F DB B8 AF DE DC 74 6C 58 EC 77 C3
0060 | 70 14 38 6A B8 CA E3 62 65 5B 4A 65 D9 30 51 16
0070 | 92 34 F9 72 CE 56 DD 5F 47 3E A3 D6 00 4E 8B 7E
0080 | DF 0C AC C0 B5 E1 75 DD CD BD 42 3D D3 86 DF DA
0090 | 4A C6 0A 3C 4F DC 4A 2C 0C CD 3B 78 89 7A 24 84
00A0 | DF D5 D2 13 0D 0F 20 86 34 57 04 31 AC D2 00 72
00B0 | 94 03 71 52 E8 FE 7B EF 53 A2 0F BE AF 68 E4 90
00C0 | 08 B2 AE 00 EA 58 D8 61 F5 44 94 2C C2 5F 97 D7
00D0 | 49 07 20 D3 F5 9F F0 C6 1A 59 D1 95 94 5E 43 FD
00E0 | 4B 6A DD 53 6B 2E 6B 77 FB CB 46 0B FE 68 9B BE
00F0 | 4C E9 44 8C 9D DE 8F 68 31 0F 56 FB 83 8E CA 3C
0100 | 91 2D F5 A0 F5 AA BA 16 0A A0 99 A3 22 AC 89 D1
0110 | 09 C5 0C 14 72 A2 5D 41 57 DB 75 F6 DA DC 91 C6
0120 | 23 0F F3 68 07 CA CB 0B 69 26 D6 D4 3E F8 60 5B
0130 | FE 26 C9 53 DB D5 A0 1B 94 D6 1F 42 20 00 74 94
0140 | 7D 66 A5 76 68 98 62 AE 2E 39 98 19 47 B5 35 B8
0150 | 16 6A CD 2E 9F BB 0D A5 BD 59 DD 6B C5 E8 FD 2D
0160 | 0D A1 D2 48 16 16 C6 7A E3 D5 F0 8A 34 F1 A7 2D
0170 | 97 7E C2 B0 E6 4C 56 63 0E A9 BA 41 20 BD D9 85
0180 | C2 C4 81 98 64 27 1E E3 5B A5 80 89 85 2F 21 50
0190 | 48 0C CC 38 77 8A FD 0F 8A 13 68 00 FD 6E B2 03
01A0 | 67 DF F3 D3 C1 D0 EC 23 6C 9C 51 68 77 59 EC 8D
01B0 | F6 D3 A0 E8 CC 06 0E D2 9A C4 51 9A 15 37 F1 01
01C0 | BF 7D AB 9E 4D 37 8F 01 29 E2 1F F6 96 62 D8 4D
01D0 | DD 86 ED C4 F3 AD 5B 91 4F 13 12 FC DB BD EE B5
01E0 | A1 A1 0C 5D B5 23 46 57 28 6F 12 14 F7 54 78 B4
01F0 | B3 45 A9 8E 33 CC 37 F2 50 D6 CA CF EB 64 AB 6B
0200 | EF 66 9D D9 68 89 5C 74 81 A3 23 7C EB A3 90 C6
0210 | 01 CA 08 4A 50 57 CB 10 7B E7 FF F1 23 AA 5F CB
0220 | 92 25 77 04 49 42 4B 41 38 FE 1A C6 F0 1D 88 71
0230 | B4 35 88 CF AD F3 29 10 3A 80 06 1D D9 3F 40 75
0240 | 16 E8 0C 64 3F 56 4E F9 A1 8D E0 11 AB 02 AD 83
0250 | 7B 03 70 31 AB 96 6C BA 23 99 A3 17 E6 78 79 95
0260 | 75 6E B8 2F 7F 20 67 53 9B ED CF C9 DB 3C 89 0C
0270 | 76 88 CB A9 7A CA 46 65 B6 2B 0E C9 69 34 EC BD
0280 | A9 A0 96 F5 70 45 A1 35 55 9C FB 76</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 18 53 2F 36 39 6A 65
0010 | 98 02 00 00 5C 07 E8 D0 F8 21 AC 0F 4F D4 CE AA
0020 | D0 13 3F E2 44 9F 86 D4 90 99 8E 8A AD 0D A1 6E
0030 | 3B 99 50 BF 5A 7A E8 99 FE 50 02 00 8B EC 6E E4
0040 | 68 5D 7C DF 09 24 96 27 E5 6C CC BD BD 31 3D 08
0050 | 08 ED 66 5B D0 03 0E E5 71 05 95 36 E7 D5 31 A8
0060 | 57 9E 3E EE AC 2F 56 6C 4D 0B 5B 29 C1 DF AD FC
0070 | B0 22 86 9A 83 24 68 B3 ED 26 97 F1 FF EC 21 81
0080 | 13 78 14 47 74 02 3A 40 F2 B6 64 5A 8D 2E BA AC
0090 | EC 24 5D AB 53 5E 5E A2 73 8D EC 62 B3 F8 10 64
00A0 | E1 17 B5 E3 44 7D 3E FC 04 24 81 51 95 A5 1B AE
00B0 | 45 8E AF 4D DA 62 97 60 BE 99 7E 5C 41 4D 2E 46
00C0 | 75 C2 66 19 1B 0C 74 BA 66 DA 2F C7 A9 4E CB C3
00D0 | 54 3A 87 A8 12 06 80 49 1B 0F 02 4A 35 2E 1E 8F
00E0 | 40 6C 79 68 9A 89 7E AE 90 6A 77 AF D7 2D 69 DF
00F0 | 8F E4 2A 43 E6 F3 EB 49 C2 73 1F 84 04 F7 C3 ED
0100 | 92 FC CA 2C 35 A3 BA 1A 84 44 82 8A A2 AF 99 C0
0110 | 80 34 F8 91 45 0C A7 D0 F6 F1 AA 84 63 94 6C 77
0120 | EC 7F C9 0D 3C 87 DE 82 23 29 FA A5 2E A5 D5 1D
0130 | 42 5C C4 FD F6 28 8F 2D BB 0C D6 1F DD 0D 15 E5
0140 | 10 78 6A 94 D2 90 E0 19 00 81 F6 B9 DD 27 20 2D
0150 | F1 97 38 6B 91 5F 5E 08 B7 8E EB DF 49 38 B1 F7
0160 | 8F 48 FD 47 C4 9A D4 6D 9F A7 F3 C7 7E F0 41 C7
0170 | A8 F5 9B 1B B5 B7 F4 0E 43 04 A2 C5 0F 13 05 A8
0180 | CD 96 11 C0 7F 2A 06 7C 77 30 68 B6 AA 2D A7 FB
0190 | 40 81 59 B7 D6 FF D3 7C 86 84 85 53 01 D2 00 7E
01A0 | 9D E3 2D 72 97 EC 10 FF 28 FB BE FB CD 0E 3A BE
01B0 | B7 37 52 8E D7 AA 4C 7F 58 28 EE 8F 70 B7 B5 1A
01C0 | 2A 04 18 4C 7B EB 52 E3 4B 2D 69 E4 D8 43 7D CE
01D0 | 4F E4 E0 FD 4C ED 4C AF 1D 1E 57 53 44 6D E9 60
01E0 | 25 75 18 AE E5 1C CC 7E 6E D9 3A A2 D0 36 CC B3
01F0 | CC CC 93 BA D1 1F 63 77 94 D3 55 B9 68 B3 BC DD
0200 | AD 40 E5 92 BB F1 2F 3B E7 D1 D4 22 AF 4A 82 3B
0210 | D6 04 88 B9 B7 E6 6F C7 D4 29 F6 37 C7 64 6B 4A
0220 | A0 88 6F 9C 8F A0 6D FC 26 97 6F 2F D6 C2 ED 9C
0230 | 94 56 A7 CA 0A 13 F9 1E 97 FC D1 CF 7B D4 25 D8
0240 | A2 0D BB 72 49 37 D6 45 02 FE 4F CA E3 22 07 D0
0250 | 22 24 A1 59 92 E6 34 06 69 FC 58 65 93 61 70 E0
0260 | 7E 87 ED 67 FA 1E 23 92 C3 2C A9 C2 84 96 8F 90
0270 | A6 95 27 72 C6 A2 27 F5 04 18 8F C6 D1 A6 43 98
0280 | 11 17 60 C0 CA 32 FE 69 F8 21 58 C2</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 = A02800255F1BD74C87121565F40152C31CC431A5B71E47B35AA2FEE50
<tr>
<td>message_id</td>
<td>8, 8</td>
<td><code>01A40C1CBB706765</code></td>
<td><code>0118532F36396A65</code></td>
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() &lt;&lt; 32) + (N*4)</td>
</tr>
<tr>
<td>message_length</td>
<td>16, 4</td>
<td><code>B0020000</code> (688 in decimal)</td>
<td><code>98020000</code> (664 in decimal)</td>
<td>Message body length</td>
</tr>
<tr>
@ -482,19 +482,19 @@ random_padding_bytes = A02800255F1BD74C87121565F40152C31CC431A5B71E47B35AA2FEE50
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>4A20F9ECB2FF02EBDCD6FF20BE2C9E9B</code></td>
<td><code>F821AC0F4FD4CEAAD0133FE2449F86D4</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>D6495F55CDAF790C1E0C40559C5E1D91</code></td>
<td><code>90998E8AAD0DA16E3B9950BF5A7AE899</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>encrypted_answer</td>
<td>56, 596</td>
<td><code>FE500200BA788B25D6DAA7E7E5197203</code> <code>16902C8D182F35DE43AA58822FDBB8AF</code> <code>DEDC746C58EC77C37014386AB8CAE362</code> <code>655B4A65D93051169234F972CE56DD5F</code> <code>473EA3D6004E8B7EDF0CACC0B5E175DD</code> <code>CDBD423DD386DFDA4AC60A3C4FDC4A2C</code> <code>0CCD3B78897A2484DFD5D2130D0F2086</code> <code>34570431ACD2007294037152E8FE7BEF</code> <code>53A20FBEAF68E49008B2AE00EA58D861</code> <code>F544942CC25F97D7490720D3F59FF0C6</code> <code>1A59D195945E43FD4B6ADD536B2E6B77</code> <code>FBCB460BFE689BBE4CE9448C9DDE8F68</code> <code>310F56FB838ECA3C912DF5A0F5AABA16</code> <code>0AA099A322AC89D109C50C1472A25D41</code> <code>57DB75F6DADC91C6230FF36807CACB0B</code> <code>6926D6D43EF8605BFE26C953DBD5A01B</code> <code>94D61F42200074947D66A576689862AE</code> <code>2E39981947B535B8166ACD2E9FBB0DA5</code> <code>BD59DD6BC5E8FD2D0DA1D2481616C67A</code> <code>E3D5F08A34F1A72D977EC2B0E64C5663</code> <code>0EA9BA4120BDD985C2C4819864271EE3</code> <code>5BA58089852F2150480CCC38778AFD0F</code> <code>8A136800FD6EB20367DFF3D3C1D0EC23</code> <code>6C9C51687759EC8DF6D3A0E8CC060ED2</code> <code>9AC4519A1537F101BF7DAB9E4D378F01</code> <code>29E21FF69662D84DDD86EDC4F3AD5B91</code> <code>4F1312FCDBBDEEB5A1A10C5DB5234657</code> <code>286F1214F75478B4B345A98E33CC37F2</code> <code>50D6CACFEB64AB6BEF669DD968895C74</code> <code>81A3237CEBA390C601CA084A5057CB10</code> <code>7BE7FFF123AA5FCB9225770449424B41</code> <code>38FE1AC6F01D8871B43588CFADF32910</code> <code>3A80061DD93F407516E80C643F564EF9</code> <code>A18DE011AB02AD837B037031AB966CBA</code> <code>2399A317E6787995756EB82F7F206753</code> <code>9BEDCFC9DB3C890C7688CBA97ACA4665</code> <code>B62B0EC96934ECBDA9A096F57045A135</code><br> <code>559CFB76</code></td>
<td><code>FE5002008BEC6EE4685D7CDF09249627</code> <code>E56CCCBDBD313D0808ED665BD0030EE5</code> <code>71059536E7D531A8579E3EEEAC2F566C</code> <code>4D0B5B29C1DFADFCB022869A832468B3</code> <code>ED2697F1FFEC21811378144774023A40</code> <code>F2B6645A8D2EBAACEC245DAB535E5EA2</code> <code>738DEC62B3F81064E117B5E3447D3EFC</code> <code>0424815195A51BAE458EAF4DDA629760</code> <code>BE997E5C414D2E4675C266191B0C74BA</code> <code>66DA2FC7A94ECBC3543A87A812068049</code> <code>1B0F024A352E1E8F406C79689A897EAE</code> <code>906A77AFD72D69DF8FE42A43E6F3EB49</code> <code>C2731F8404F7C3ED92FCCA2C35A3BA1A</code> <code>8444828AA2AF99C08034F891450CA7D0</code> <code>F6F1AA8463946C77EC7FC90D3C87DE82</code> <code>2329FAA52EA5D51D425CC4FDF6288F2D</code> <code>BB0CD61FDD0D15E510786A94D290E019</code> <code>0081F6B9DD27202DF197386B915F5E08</code> <code>B78EEBDF4938B1F78F48FD47C49AD46D</code> <code>9FA7F3C77EF041C7A8F59B1BB5B7F40E</code> <code>4304A2C50F1305A8CD9611C07F2A067C</code> <code>773068B6AA2DA7FB408159B7D6FFD37C</code> <code>8684855301D2007E9DE32D7297EC10FF</code> <code>28FBBEFBCD0E3ABEB737528ED7AA4C7F</code> <code>5828EE8F70B7B51A2A04184C7BEB52E3</code> <code>4B2D69E4D8437DCE4FE4E0FD4CED4CAF</code> <code>1D1E5753446DE960257518AEE51CCC7E</code> <code>6ED93AA2D036CCB3CCCC93BAD11F6377</code> <code>94D355B968B3BCDDAD40E592BBF12F3B</code> <code>E7D1D422AF4A823BD60488B9B7E66FC7</code> <code>D429F637C7646B4AA0886F9C8FA06DFC</code> <code>26976F2FD6C2ED9C9456A7CA0A13F91E</code> <code>97FCD1CF7BD425D8A20DBB724937D645</code> <code>02FE4FCAE32207D02224A15992E63406</code> <code>69FC5865936170E07E87ED67FA1E2392</code> <code>C32CA9C284968F90A6952772C6A227F5</code> <code>04188FC6D1A64398111760C0CA32FE69</code><br> <code>F82158C2</code></td>
<td>See below</td>
</tr>
</tbody>
@ -502,20 +502,20 @@ random_padding_bytes = A02800255F1BD74C87121565F40152C31CC431A5B71E47B35AA2FEE50
<!-- 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 = BA788B25D6DAA7E7E519720316902C8D182F35DE43AA58822FDBB8AFDEDC746C58EC77C37014386AB8CAE362655B4A65D93051169234F972CE56DD5F473EA3D6004E8B7EDF0CACC0B5E175DDCDBD423DD386DFDA4AC60A3C4FDC4A2C0CCD3B78897A2484DFD5D2130D0F208634570431ACD2007294037152E8FE7BEF53A20FBEAF68E49008B2AE00EA58D861F544942CC25F97D7490720D3F59FF0C61A59D195945E43FD4B6ADD536B2E6B77FBCB460BFE689BBE4CE9448C9DDE8F68310F56FB838ECA3C912DF5A0F5AABA160AA099A322AC89D109C50C1472A25D4157DB75F6DADC91C6230FF36807CACB0B6926D6D43EF8605BFE26C953DBD5A01B94D61F42200074947D66A576689862AE2E39981947B535B8166ACD2E9FBB0DA5BD59DD6BC5E8FD2D0DA1D2481616C67AE3D5F08A34F1A72D977EC2B0E64C56630EA9BA4120BDD985C2C4819864271EE35BA58089852F2150480CCC38778AFD0F8A136800FD6EB20367DFF3D3C1D0EC236C9C51687759EC8DF6D3A0E8CC060ED29AC4519A1537F101BF7DAB9E4D378F0129E21FF69662D84DDD86EDC4F3AD5B914F1312FCDBBDEEB5A1A10C5DB5234657286F1214F75478B4B345A98E33CC37F250D6CACFEB64AB6BEF669DD968895C7481A3237CEBA390C601CA084A5057CB107BE7FFF123AA5FCB9225770449424B4138FE1AC6F01D8871B43588CFADF329103A80061DD93F407516E80C643F564EF9A18DE011AB02AD837B037031AB966CBA2399A317E6787995756EB82F7F2067539BEDCFC9DB3C890C7688CBA97ACA4665B62B0EC96934ECBDA9A096F57045A135559CFB76
tmp_aes_key = 59209748A5A4BB1CBE9E3C24FEDE8183AF70A6B0ED09D6B2E9F56E4A9FB8CFB8
tmp_aes_iv = 5BB9E9E40F27C0F258D3A1C86CBEF81223618B2BCECEF465E0ACF956820522D4</code></pre>
<pre><code>encrypted_answer = 8BEC6EE4685D7CDF09249627E56CCCBDBD313D0808ED665BD0030EE571059536E7D531A8579E3EEEAC2F566C4D0B5B29C1DFADFCB022869A832468B3ED2697F1FFEC21811378144774023A40F2B6645A8D2EBAACEC245DAB535E5EA2738DEC62B3F81064E117B5E3447D3EFC0424815195A51BAE458EAF4DDA629760BE997E5C414D2E4675C266191B0C74BA66DA2FC7A94ECBC3543A87A8120680491B0F024A352E1E8F406C79689A897EAE906A77AFD72D69DF8FE42A43E6F3EB49C2731F8404F7C3ED92FCCA2C35A3BA1A8444828AA2AF99C08034F891450CA7D0F6F1AA8463946C77EC7FC90D3C87DE822329FAA52EA5D51D425CC4FDF6288F2DBB0CD61FDD0D15E510786A94D290E0190081F6B9DD27202DF197386B915F5E08B78EEBDF4938B1F78F48FD47C49AD46D9FA7F3C77EF041C7A8F59B1BB5B7F40E4304A2C50F1305A8CD9611C07F2A067C773068B6AA2DA7FB408159B7D6FFD37C8684855301D2007E9DE32D7297EC10FF28FBBEFBCD0E3ABEB737528ED7AA4C7F5828EE8F70B7B51A2A04184C7BEB52E34B2D69E4D8437DCE4FE4E0FD4CED4CAF1D1E5753446DE960257518AEE51CCC7E6ED93AA2D036CCB3CCCC93BAD11F637794D355B968B3BCDDAD40E592BBF12F3BE7D1D422AF4A823BD60488B9B7E66FC7D429F637C7646B4AA0886F9C8FA06DFC26976F2FD6C2ED9C9456A7CA0A13F91E97FCD1CF7BD425D8A20DBB724937D64502FE4FCAE32207D02224A15992E6340669FC5865936170E07E87ED67FA1E2392C32CA9C284968F90A6952772C6A227F504188FC6D1A64398111760C0CA32FE69F82158C2
tmp_aes_key = 29F7107633BDE69B33E3479A4D5424336B7A3C852107EB549320182AFB862BE0
tmp_aes_iv = 2BCD03C014A3E84A827DC03D304624CE98CB6B5678D748D27B09204E9B92957B</code></pre>
<!-- end server_DH_inner_data_input -->
<p>Yielding:</p>
<!-- start server_DH_inner_data_output -->
<pre><code>answer_with_hash = B351536647DBE892A8BA801D4EA092373BD5B86ABA0D89B54A20F9ECB2FF02EBDCD6FF20BE2C9E9BD6495F55CDAF790C1E0C40559C5E1D9103000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001007F0684E7F98BD24A04A854E770D12AB71B62A6F153F061F6C9F75BDDB8E43B11F16DCAF2DFD55D0D27BE22BDC4DD060C4854F0C7A363EC0852040ABA8E076C96741A8BDFBC66DA79D76045E2601952508365C7286500B4E10666E00F1ADB87275971250B3084D865EC7AB1D021732D4CA1925B91F153825C6A9E4286BDB2D8BBD7A1F37DB49D89DF858E46D245010A6FD25893C288EE5A39C68F0F1CDD08A48683BC06C1689C78E644206489AD73BBF6058AA04DBD87408F2C2F0D35041DB01A5827B5EF91EF88C487CD3F2E0C3E874AE6EBA71B38D1E56256A37B6F123F908ABDE96A8FD2FC8131D9F58A5F6286363BC68F76DB643360B50C950BC160AC623CBB7067652F5099F358CE9308
answer = BA0D89B54A20F9ECB2FF02EBDCD6FF20BE2C9E9BD6495F55CDAF790C1E0C40559C5E1D9103000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001007F0684E7F98BD24A04A854E770D12AB71B62A6F153F061F6C9F75BDDB8E43B11F16DCAF2DFD55D0D27BE22BDC4DD060C4854F0C7A363EC0852040ABA8E076C96741A8BDFBC66DA79D76045E2601952508365C7286500B4E10666E00F1ADB87275971250B3084D865EC7AB1D021732D4CA1925B91F153825C6A9E4286BDB2D8BBD7A1F37DB49D89DF858E46D245010A6FD25893C288EE5A39C68F0F1CDD08A48683BC06C1689C78E644206489AD73BBF6058AA04DBD87408F2C2F0D35041DB01A5827B5EF91EF88C487CD3F2E0C3E874AE6EBA71B38D1E56256A37B6F123F908ABDE96A8FD2FC8131D9F58A5F6286363BC68F76DB643360B50C950BC160AC623CBB7067652F5099F358CE9308</code></pre>
<pre><code>answer_with_hash = A0F4698C0DDC87F6D4D54219D9C1FFFD0B9D147ABA0D89B5F821AC0F4FD4CEAAD0133FE2449F86D490998E8AAD0DA16E3B9950BF5A7AE89903000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001008363ECDFB02282CDF33277D7A9515E2B0FD4084C411C49105F5DBFBB9797261FB79D28E19E186152EB705941A0FA67C57E42C05BDC749F5C4DD53E9E30A01B624B93183A72E45114978C0BCDEE80AF17C4565E0A188AB2D5057C307A1187C4A1B04293544D447EE0B6970980E79D1F11D99CDBD68F498E672E968569A24D4850E928573E2089990E76529BA9B4ACED3C26B51F3646E6CAA6BFCE9BCF3B3B1E30E8B1366B320DD8126D2CD4F1E887975BC02E0D03F6DA6EC0D94839994BF95BE3576D7B8F113BBF4DDD00ABF6F0E4431BB87145AC0190432597EA43B3802359F99F6FCE3A61F611DBAC2A33F69189260B603EA5ADD2629168C38479DBEC4A22D636396A65EEDBE8C0542F86F7
answer = BA0D89B5F821AC0F4FD4CEAAD0133FE2449F86D490998E8AAD0DA16E3B9950BF5A7AE89903000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE0001008363ECDFB02282CDF33277D7A9515E2B0FD4084C411C49105F5DBFBB9797261FB79D28E19E186152EB705941A0FA67C57E42C05BDC749F5C4DD53E9E30A01B624B93183A72E45114978C0BCDEE80AF17C4565E0A188AB2D5057C307A1187C4A1B04293544D447EE0B6970980E79D1F11D99CDBD68F498E672E968569A24D4850E928573E2089990E76529BA9B4ACED3C26B51F3646E6CAA6BFCE9BCF3B3B1E30E8B1366B320DD8126D2CD4F1E887975BC02E0D03F6DA6EC0D94839994BF95BE3576D7B8F113BBF4DDD00ABF6F0E4431BB87145AC0190432597EA43B3802359F99F6FCE3A61F611DBAC2A33F69189260B603EA5ADD2629168C38479DBEC4A22D636396A65EEDBE8C0542F86F7</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 4A 20 F9 EC B2 FF 02 EB DC D6 FF 20
0010 | BE 2C 9E 9B D6 49 5F 55 CD AF 79 0C 1E 0C 40 55
0020 | 9C 5E 1D 91 03 00 00 00 FE 00 01 00 C7 1C AE B9
<pre><code>0000 | BA 0D 89 B5 F8 21 AC 0F 4F D4 CE AA D0 13 3F E2
0010 | 44 9F 86 D4 90 99 8E 8A AD 0D A1 6E 3B 99 50 BF
0020 | 5A 7A E8 99 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 = BA0D89B54A20F9ECB2FF02EBDCD6FF20BE2C9E9BD6495F55CDAF790C1E0C40559C5E1D9
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 | 7F 06 84 E7 F9 8B D2 4A 04 A8 54 E7 70 D1 2A B7
0140 | 1B 62 A6 F1 53 F0 61 F6 C9 F7 5B DD B8 E4 3B 11
0150 | F1 6D CA F2 DF D5 5D 0D 27 BE 22 BD C4 DD 06 0C
0160 | 48 54 F0 C7 A3 63 EC 08 52 04 0A BA 8E 07 6C 96
0170 | 74 1A 8B DF BC 66 DA 79 D7 60 45 E2 60 19 52 50
0180 | 83 65 C7 28 65 00 B4 E1 06 66 E0 0F 1A DB 87 27
0190 | 59 71 25 0B 30 84 D8 65 EC 7A B1 D0 21 73 2D 4C
01A0 | A1 92 5B 91 F1 53 82 5C 6A 9E 42 86 BD B2 D8 BB
01B0 | D7 A1 F3 7D B4 9D 89 DF 85 8E 46 D2 45 01 0A 6F
01C0 | D2 58 93 C2 88 EE 5A 39 C6 8F 0F 1C DD 08 A4 86
01D0 | 83 BC 06 C1 68 9C 78 E6 44 20 64 89 AD 73 BB F6
01E0 | 05 8A A0 4D BD 87 40 8F 2C 2F 0D 35 04 1D B0 1A
01F0 | 58 27 B5 EF 91 EF 88 C4 87 CD 3F 2E 0C 3E 87 4A
0200 | E6 EB A7 1B 38 D1 E5 62 56 A3 7B 6F 12 3F 90 8A
0210 | BD E9 6A 8F D2 FC 81 31 D9 F5 8A 5F 62 86 36 3B
0220 | C6 8F 76 DB 64 33 60 B5 0C 95 0B C1 60 AC 62 3C
0230 | BB 70 67 65</code></pre>
0130 | 83 63 EC DF B0 22 82 CD F3 32 77 D7 A9 51 5E 2B
0140 | 0F D4 08 4C 41 1C 49 10 5F 5D BF BB 97 97 26 1F
0150 | B7 9D 28 E1 9E 18 61 52 EB 70 59 41 A0 FA 67 C5
0160 | 7E 42 C0 5B DC 74 9F 5C 4D D5 3E 9E 30 A0 1B 62
0170 | 4B 93 18 3A 72 E4 51 14 97 8C 0B CD EE 80 AF 17
0180 | C4 56 5E 0A 18 8A B2 D5 05 7C 30 7A 11 87 C4 A1
0190 | B0 42 93 54 4D 44 7E E0 B6 97 09 80 E7 9D 1F 11
01A0 | D9 9C DB D6 8F 49 8E 67 2E 96 85 69 A2 4D 48 50
01B0 | E9 28 57 3E 20 89 99 0E 76 52 9B A9 B4 AC ED 3C
01C0 | 26 B5 1F 36 46 E6 CA A6 BF CE 9B CF 3B 3B 1E 30
01D0 | E8 B1 36 6B 32 0D D8 12 6D 2C D4 F1 E8 87 97 5B
01E0 | C0 2E 0D 03 F6 DA 6E C0 D9 48 39 99 4B F9 5B E3
01F0 | 57 6D 7B 8F 11 3B BF 4D DD 00 AB F6 F0 E4 43 1B
0200 | B8 71 45 AC 01 90 43 25 97 EA 43 B3 80 23 59 F9
0210 | 9F 6F CE 3A 61 F6 11 DB AC 2A 33 F6 91 89 26 0B
0220 | 60 3E A5 AD D2 62 91 68 C3 84 79 DB EC 4A 22 D6
0230 | 36 39 6A 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 = BA0D89B54A20F9ECB2FF02EBDCD6FF20BE2C9E9BD6495F55CDAF790C1E0C40559C5E1D9
<tr>
<td>nonce</td>
<td>4, 16</td>
<td><code>4A20F9ECB2FF02EBDCD6FF20BE2C9E9B</code></td>
<td><code>F821AC0F4FD4CEAAD0133FE2449F86D4</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>20, 16</td>
<td><code>D6495F55CDAF790C1E0C40559C5E1D91</code></td>
<td><code>90998E8AAD0DA16E3B9950BF5A7AE899</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
@ -594,13 +594,13 @@ answer = BA0D89B54A20F9ECB2FF02EBDCD6FF20BE2C9E9BD6495F55CDAF790C1E0C40559C5E1D9
<tr>
<td>g_a</td>
<td>300, 260</td>
<td><code>FE0001007F0684E7F98BD24A04A854E7</code> <code>70D12AB71B62A6F153F061F6C9F75BDD</code> <code>B8E43B11F16DCAF2DFD55D0D27BE22BD</code> <code>C4DD060C4854F0C7A363EC0852040ABA</code> <code>8E076C96741A8BDFBC66DA79D76045E2</code> <code>601952508365C7286500B4E10666E00F</code> <code>1ADB87275971250B3084D865EC7AB1D0</code> <code>21732D4CA1925B91F153825C6A9E4286</code> <code>BDB2D8BBD7A1F37DB49D89DF858E46D2</code> <code>45010A6FD25893C288EE5A39C68F0F1C</code> <code>DD08A48683BC06C1689C78E644206489</code> <code>AD73BBF6058AA04DBD87408F2C2F0D35</code> <code>041DB01A5827B5EF91EF88C487CD3F2E</code> <code>0C3E874AE6EBA71B38D1E56256A37B6F</code> <code>123F908ABDE96A8FD2FC8131D9F58A5F</code> <code>6286363BC68F76DB643360B50C950BC1</code><br> <code>60AC623C</code></td>
<td><code>FE0001008363ECDFB02282CDF33277D7</code> <code>A9515E2B0FD4084C411C49105F5DBFBB</code> <code>9797261FB79D28E19E186152EB705941</code> <code>A0FA67C57E42C05BDC749F5C4DD53E9E</code> <code>30A01B624B93183A72E45114978C0BCD</code> <code>EE80AF17C4565E0A188AB2D5057C307A</code> <code>1187C4A1B04293544D447EE0B6970980</code> <code>E79D1F11D99CDBD68F498E672E968569</code> <code>A24D4850E928573E2089990E76529BA9</code> <code>B4ACED3C26B51F3646E6CAA6BFCE9BCF</code> <code>3B3B1E30E8B1366B320DD8126D2CD4F1</code> <code>E887975BC02E0D03F6DA6EC0D9483999</code> <code>4BF95BE3576D7B8F113BBF4DDD00ABF6</code> <code>F0E4431BB87145AC0190432597EA43B3</code> <code>802359F99F6FCE3A61F611DBAC2A33F6</code> <code>9189260B603EA5ADD2629168C38479DB</code><br> <code>EC4A22D6</code></td>
<td><code>g_a</code> diffie-hellman parameter</td>
</tr>
<tr>
<td>server_time</td>
<td>560, 4</td>
<td><code>BB706765</code> (1701277883 in decimal)</td>
<td><code>36396A65</code> (1701460278 in decimal)</td>
<td>Server time</td>
</tr>
</tbody>
@ -609,34 +609,34 @@ answer = BA0D89B54A20F9ECB2FF02EBDCD6FF20BE2C9E9BD6495F55CDAF790C1E0C40559C5E1D9
<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 = F9D04EC322F3D2317FA17BCCD880A0C842DB3FF30721787E9BA6ADEE64C8A240184EA008A03B749E5182D9BDF952D6B2009F83A943260AB777875BBD437B7AE0D57B1785B9D8CE129DA31EEEB81707B44C8E9FDD64EF7D572D04B344BC110FF55CB55A40D685BCF1FF9A8D503EB4CFDE50EBABF31A8F11BEF6D85C32C13EEA1EACCAC7CD1DA4FD07911BB5CCB090E86BE209E96BEEE48D8CB4CA4EB2C7C900B7311279A37E821FE2E27BB6CB1D57ACF2431BBDBDABFE5EA4AC4AC7D42FC84BE08F9607FDD86A7C6D421CB13B97FC1DEAE10A44466628CC89FF1E856D0B5D539A6904C4E274403AB51FAB3014DFA8B27CD9D4DD653B0214672D82AC2C7B25D927</code></pre>
<pre><code>b = 513FFC0FC78F74BDB3C4616032EFC4D9203BBE9C69A66D332A5EAAA4A34EAE55362A03F3B6D6ABF100132E6F77F1552E2861DBD01780D99498993BC683877EAC3BF392D01F77CCECCEF1BF1575203832473466190F3EF484DC60FFA6B144E1F55A92CFD4D790729F8941F23CE8C52833FDF147B6AFF2B12087AEE70DCF444041360F253E331784EDA44C68708E0B6745819EAAF107CCDBF5C41D2834CCB7AB05FB52F9DCD04E622AC1A0A1E09F0A172596786CA88A62A0D7C6BF3D109FD827B152E3EDF0DD5F0D0068054E34087919E1BBE938B05F1C6769EA289A0423276ED41B85644D40A547D43F375A81358A5ABDBA330682BE92682EA80D5921BB974395</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 = BB339605CD86E283C7378EBA3A44A02F02F8B98AC631735206F251F67E53F0D3ADD1774D919261C6968581306E813760BEF605A8F882143B4AA80EB6B77DB9E0A3AA0F7F0DE6B2CD9B8386924C37E8C609372ABCF27BC648846413CFBE4419A30ED3D995D742E074F2688689AB545CBB7500BD0E513D694E0425B9FF5CB00E1A610E9A7159EC47E2714F9D832C93E09FBB3E056AF48DCF02EBC168E88FCA9BF88D9516210B22192B0A589775A3C441CCEA4C7B9BCBC9D702BD13C4D0D6202EC2AC3548983563D50156B60019E8ACCFDC007628FBAE3B79F1CAB7A9E0CCC8777B6F6C49187AD784701DD63E44EF2A04A07BFE3596EF03DC24D6D204F73905A7FD</code></pre>
<pre><code>g_b = 57F9EA099BC77F1DFCBD1841D8A0BA7050C574D4B96E3DE335FE8929888B5249251CE9A1CC8BF5B59148010FE7D8E50C623EEECEB7C032255F03667996E4BF5BB6C74BFC3E8D7CEAB2FF8C860B13A6DCF89F49704D9B927FF1DEBD4FB7E50CAA2F3DF8AEEB5CF831A1D0B5B86DBE3E7724528412A34EE1E34487870A87A42C5CC6E8A3D368A788B6C06A43A336B34C881230C9A09EF838EBA84078C79C69A1ABAC3F9CB6FFAF0E69668ACC58F556434BB43FDDD39FC95A5EBFAF2F565B3A1B2AC665D5757DFA5625C50197AB6347B6F1BA958E83C70D55B8D5D529517E18700C4FD7B2D14922D9C813E98079E500099FEFA2D4EDC7B6A9C6E240D0C08DF2F1A0</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 4A 20 F9 EC B2 FF 02 EB DC D6 FF 20
0010 | BE 2C 9E 9B D6 49 5F 55 CD AF 79 0C 1E 0C 40 55
0020 | 9C 5E 1D 91 00 00 00 00 00 00 00 00 FE 00 01 00
0030 | BB 33 96 05 CD 86 E2 83 C7 37 8E BA 3A 44 A0 2F
0040 | 02 F8 B9 8A C6 31 73 52 06 F2 51 F6 7E 53 F0 D3
0050 | AD D1 77 4D 91 92 61 C6 96 85 81 30 6E 81 37 60
0060 | BE F6 05 A8 F8 82 14 3B 4A A8 0E B6 B7 7D B9 E0
0070 | A3 AA 0F 7F 0D E6 B2 CD 9B 83 86 92 4C 37 E8 C6
0080 | 09 37 2A BC F2 7B C6 48 84 64 13 CF BE 44 19 A3
0090 | 0E D3 D9 95 D7 42 E0 74 F2 68 86 89 AB 54 5C BB
00A0 | 75 00 BD 0E 51 3D 69 4E 04 25 B9 FF 5C B0 0E 1A
00B0 | 61 0E 9A 71 59 EC 47 E2 71 4F 9D 83 2C 93 E0 9F
00C0 | BB 3E 05 6A F4 8D CF 02 EB C1 68 E8 8F CA 9B F8
00D0 | 8D 95 16 21 0B 22 19 2B 0A 58 97 75 A3 C4 41 CC
00E0 | EA 4C 7B 9B CB C9 D7 02 BD 13 C4 D0 D6 20 2E C2
00F0 | AC 35 48 98 35 63 D5 01 56 B6 00 19 E8 AC CF DC
0100 | 00 76 28 FB AE 3B 79 F1 CA B7 A9 E0 CC C8 77 7B
0110 | 6F 6C 49 18 7A D7 84 70 1D D6 3E 44 EF 2A 04 A0
0120 | 7B FE 35 96 EF 03 DC 24 D6 D2 04 F7 39 05 A7 FD</code></pre>
<pre><code>0000 | 54 B6 43 66 F8 21 AC 0F 4F D4 CE AA D0 13 3F E2
0010 | 44 9F 86 D4 90 99 8E 8A AD 0D A1 6E 3B 99 50 BF
0020 | 5A 7A E8 99 00 00 00 00 00 00 00 00 FE 00 01 00
0030 | 57 F9 EA 09 9B C7 7F 1D FC BD 18 41 D8 A0 BA 70
0040 | 50 C5 74 D4 B9 6E 3D E3 35 FE 89 29 88 8B 52 49
0050 | 25 1C E9 A1 CC 8B F5 B5 91 48 01 0F E7 D8 E5 0C
0060 | 62 3E EE CE B7 C0 32 25 5F 03 66 79 96 E4 BF 5B
0070 | B6 C7 4B FC 3E 8D 7C EA B2 FF 8C 86 0B 13 A6 DC
0080 | F8 9F 49 70 4D 9B 92 7F F1 DE BD 4F B7 E5 0C AA
0090 | 2F 3D F8 AE EB 5C F8 31 A1 D0 B5 B8 6D BE 3E 77
00A0 | 24 52 84 12 A3 4E E1 E3 44 87 87 0A 87 A4 2C 5C
00B0 | C6 E8 A3 D3 68 A7 88 B6 C0 6A 43 A3 36 B3 4C 88
00C0 | 12 30 C9 A0 9E F8 38 EB A8 40 78 C7 9C 69 A1 AB
00D0 | AC 3F 9C B6 FF AF 0E 69 66 8A CC 58 F5 56 43 4B
00E0 | B4 3F DD D3 9F C9 5A 5E BF AF 2F 56 5B 3A 1B 2A
00F0 | C6 65 D5 75 7D FA 56 25 C5 01 97 AB 63 47 B6 F1
0100 | BA 95 8E 83 C7 0D 55 B8 D5 D5 29 51 7E 18 70 0C
0110 | 4F D7 B2 D1 49 22 D9 C8 13 E9 80 79 E5 00 09 9F
0120 | EF A2 D4 ED C7 B6 A9 C6 E2 40 D0 C0 8D F2 F1 A0</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 = BA0D89B54A20F9ECB2FF02EBDCD6FF20BE2C9E9BD6495F55CDAF790C1E0C40559C5E1D9
<tr>
<td>nonce</td>
<td>4, 16</td>
<td><code>4A20F9ECB2FF02EBDCD6FF20BE2C9E9B</code></td>
<td><code>F821AC0F4FD4CEAAD0133FE2449F86D4</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>20, 16</td>
<td><code>D6495F55CDAF790C1E0C40559C5E1D91</code></td>
<td><code>90998E8AAD0DA16E3B9950BF5A7AE899</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>g_b</td>
<td>36, 260</td>
<td><code>FE000100BB339605CD86E283C7378EBA</code> <code>3A44A02F02F8B98AC631735206F251F6</code> <code>7E53F0D3ADD1774D919261C696858130</code> <code>6E813760BEF605A8F882143B4AA80EB6</code> <code>B77DB9E0A3AA0F7F0DE6B2CD9B838692</code> <code>4C37E8C609372ABCF27BC648846413CF</code> <code>BE4419A30ED3D995D742E074F2688689</code> <code>AB545CBB7500BD0E513D694E0425B9FF</code> <code>5CB00E1A610E9A7159EC47E2714F9D83</code> <code>2C93E09FBB3E056AF48DCF02EBC168E8</code> <code>8FCA9BF88D9516210B22192B0A589775</code> <code>A3C441CCEA4C7B9BCBC9D702BD13C4D0</code> <code>D6202EC2AC3548983563D50156B60019</code> <code>E8ACCFDC007628FBAE3B79F1CAB7A9E0</code> <code>CCC8777B6F6C49187AD784701DD63E44</code> <code>EF2A04A07BFE3596EF03DC24D6D204F7</code><br> <code>3905A7FD</code></td>
<td><code>FE00010057F9EA099BC77F1DFCBD1841</code> <code>D8A0BA7050C574D4B96E3DE335FE8929</code> <code>888B5249251CE9A1CC8BF5B59148010F</code> <code>E7D8E50C623EEECEB7C032255F036679</code> <code>96E4BF5BB6C74BFC3E8D7CEAB2FF8C86</code> <code>0B13A6DCF89F49704D9B927FF1DEBD4F</code> <code>B7E50CAA2F3DF8AEEB5CF831A1D0B5B8</code> <code>6DBE3E7724528412A34EE1E34487870A</code> <code>87A42C5CC6E8A3D368A788B6C06A43A3</code> <code>36B34C881230C9A09EF838EBA84078C7</code> <code>9C69A1ABAC3F9CB6FFAF0E69668ACC58</code> <code>F556434BB43FDDD39FC95A5EBFAF2F56</code> <code>5B3A1B2AC665D5757DFA5625C50197AB</code> <code>6347B6F1BA958E83C70D55B8D5D52951</code> <code>7E18700C4FD7B2D14922D9C813E98079</code> <code>E500099FEFA2D4EDC7B6A9C6E240D0C0</code><br> <code>8DF2F1A0</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 = BA0D89B54A20F9ECB2FF02EBDCD6FF20BE2C9E9BD6495F55CDAF790C1E0C40559C5E1D9
<!-- 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 = 54B643664A20F9ECB2FF02EBDCD6FF20BE2C9E9BD6495F55CDAF790C1E0C40559C5E1D910000000000000000FE000100BB339605CD86E283C7378EBA3A44A02F02F8B98AC631735206F251F67E53F0D3ADD1774D919261C6968581306E813760BEF605A8F882143B4AA80EB6B77DB9E0A3AA0F7F0DE6B2CD9B8386924C37E8C609372ABCF27BC648846413CFBE4419A30ED3D995D742E074F2688689AB545CBB7500BD0E513D694E0425B9FF5CB00E1A610E9A7159EC47E2714F9D832C93E09FBB3E056AF48DCF02EBC168E88FCA9BF88D9516210B22192B0A589775A3C441CCEA4C7B9BCBC9D702BD13C4D0D6202EC2AC3548983563D50156B60019E8ACCFDC007628FBAE3B79F1CAB7A9E0CCC8777B6F6C49187AD784701DD63E44EF2A04A07BFE3596EF03DC24D6D204F73905A7FD
padding = 651D0C05CC5A53A6415004D5
tmp_aes_key = 59209748A5A4BB1CBE9E3C24FEDE8183AF70A6B0ED09D6B2E9F56E4A9FB8CFB8
tmp_aes_iv = 5BB9E9E40F27C0F258D3A1C86CBEF81223618B2BCECEF465E0ACF956820522D4</code></pre>
<pre><code>data = 54B64366F821AC0F4FD4CEAAD0133FE2449F86D490998E8AAD0DA16E3B9950BF5A7AE8990000000000000000FE00010057F9EA099BC77F1DFCBD1841D8A0BA7050C574D4B96E3DE335FE8929888B5249251CE9A1CC8BF5B59148010FE7D8E50C623EEECEB7C032255F03667996E4BF5BB6C74BFC3E8D7CEAB2FF8C860B13A6DCF89F49704D9B927FF1DEBD4FB7E50CAA2F3DF8AEEB5CF831A1D0B5B86DBE3E7724528412A34EE1E34487870A87A42C5CC6E8A3D368A788B6C06A43A336B34C881230C9A09EF838EBA84078C79C69A1ABAC3F9CB6FFAF0E69668ACC58F556434BB43FDDD39FC95A5EBFAF2F565B3A1B2AC665D5757DFA5625C50197AB6347B6F1BA958E83C70D55B8D5D529517E18700C4FD7B2D14922D9C813E98079E500099FEFA2D4EDC7B6A9C6E240D0C08DF2F1A0
padding = 08E683B08B4F3CC9206449AA
tmp_aes_key = 29F7107633BDE69B33E3479A4D5424336B7A3C852107EB549320182AFB862BE0
tmp_aes_iv = 2BCD03C014A3E84A827DC03D304624CE98CB6B5678D748D27B09204E9B92957B</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 = 5FCF96B77257F60B8427A7B416803C0FF96024C66966AAB2DCB0A40C2EC048173218735597A2353C37C38D648333A9BFC6F1912A886AF71D1C616B92C2233EDE9F1CF6C8868A92649F9F45A05E5ADF8E4D5BE63821CB35DAB1397E884C8638259A98DBCF913416C082F50EDA3C30D642DDB928D0CEF26BD57A06444081AAFE92061F991F4B81F8D1F8D44158A4CD3D220DB402687ADB26DB0508F47C134736354BFB9610515BB258228F182EE6C0CD746B940F1A5690EA169C80C6FC186603399DD5A5D1820C5BEE0DDF28A5BEA57B293064508D6D2D2AD330345189AEA7A21DE6101A92165319BB0F40B3055DDF92752ABC55D6E2D7285398F6F7EF90F6588F54B4F2718126C5C2CB5A954052ACCF22800647962409F3752B8F79D4E600E69C28B626EAEC61037BD5FF423E06093E14F234F346F66223023CED472884276E97AFFB1FF98ACA6C23E56EE30FF1086631</code></pre>
<pre><code>encrypted_data = 161550B26A25A0A55C07C5864C61B89109059D54AF6C38A79AFB50AD61F012E9EADD4BB61034971BF4ED90D97BF67BCA23B3B54D02F831D74ABE5AB403BB0410AF70856F08334CC38FA9783E11C399B1255FEFE481445D382FA6D17F3F39EE682DB49E62FA05909598EDAA12E6AEC66A71E5C997F1366DC0187B787E34ED75087C7149934A87435CC3295545D02BF4E699842D3D95372BFD25F6B6DB7DCC48DA9283A624CA7E45CACACAA4C73C395004FC2E854FE70551CD7B78C0EC1BAC598A43C597E112E574CDDC9ECD3150355E0C4C82AE24DD7CCC5B4CAA0E895F2EE60188BB677E82DB63648AFA21627CA10674968ED042F9B6D97A382BBB79E24DC36E8D0A8EC37DEBD56E0BE07E5AA03D222802FCD9456A68618512120B65950632007F348B175D8A715018BD3B67E8273FD9055FCADFECDCA50EF3A8DFD4EEBD5B9A24C3257E35584A12A1AA659D9C940B41</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 90 E8 0B 00 BB 70 67 65
0010 | 78 01 00 00 1F 5F 04 F5 4A 20 F9 EC B2 FF 02 EB
0020 | DC D6 FF 20 BE 2C 9E 9B D6 49 5F 55 CD AF 79 0C
0030 | 1E 0C 40 55 9C 5E 1D 91 FE 50 01 00 5F CF 96 B7
0040 | 72 57 F6 0B 84 27 A7 B4 16 80 3C 0F F9 60 24 C6
0050 | 69 66 AA B2 DC B0 A4 0C 2E C0 48 17 32 18 73 55
0060 | 97 A2 35 3C 37 C3 8D 64 83 33 A9 BF C6 F1 91 2A
0070 | 88 6A F7 1D 1C 61 6B 92 C2 23 3E DE 9F 1C F6 C8
0080 | 86 8A 92 64 9F 9F 45 A0 5E 5A DF 8E 4D 5B E6 38
0090 | 21 CB 35 DA B1 39 7E 88 4C 86 38 25 9A 98 DB CF
00A0 | 91 34 16 C0 82 F5 0E DA 3C 30 D6 42 DD B9 28 D0
00B0 | CE F2 6B D5 7A 06 44 40 81 AA FE 92 06 1F 99 1F
00C0 | 4B 81 F8 D1 F8 D4 41 58 A4 CD 3D 22 0D B4 02 68
00D0 | 7A DB 26 DB 05 08 F4 7C 13 47 36 35 4B FB 96 10
00E0 | 51 5B B2 58 22 8F 18 2E E6 C0 CD 74 6B 94 0F 1A
00F0 | 56 90 EA 16 9C 80 C6 FC 18 66 03 39 9D D5 A5 D1
0100 | 82 0C 5B EE 0D DF 28 A5 BE A5 7B 29 30 64 50 8D
0110 | 6D 2D 2A D3 30 34 51 89 AE A7 A2 1D E6 10 1A 92
0120 | 16 53 19 BB 0F 40 B3 05 5D DF 92 75 2A BC 55 D6
0130 | E2 D7 28 53 98 F6 F7 EF 90 F6 58 8F 54 B4 F2 71
0140 | 81 26 C5 C2 CB 5A 95 40 52 AC CF 22 80 06 47 96
0150 | 24 09 F3 75 2B 8F 79 D4 E6 00 E6 9C 28 B6 26 EA
0160 | EC 61 03 7B D5 FF 42 3E 06 09 3E 14 F2 34 F3 46
0170 | F6 62 23 02 3C ED 47 28 84 27 6E 97 AF FB 1F F9
0180 | 8A CA 6C 23 E5 6E E3 0F F1 08 66 31</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 DC 9D 08 00 36 39 6A 65
0010 | 78 01 00 00 1F 5F 04 F5 F8 21 AC 0F 4F D4 CE AA
0020 | D0 13 3F E2 44 9F 86 D4 90 99 8E 8A AD 0D A1 6E
0030 | 3B 99 50 BF 5A 7A E8 99 FE 50 01 00 16 15 50 B2
0040 | 6A 25 A0 A5 5C 07 C5 86 4C 61 B8 91 09 05 9D 54
0050 | AF 6C 38 A7 9A FB 50 AD 61 F0 12 E9 EA DD 4B B6
0060 | 10 34 97 1B F4 ED 90 D9 7B F6 7B CA 23 B3 B5 4D
0070 | 02 F8 31 D7 4A BE 5A B4 03 BB 04 10 AF 70 85 6F
0080 | 08 33 4C C3 8F A9 78 3E 11 C3 99 B1 25 5F EF E4
0090 | 81 44 5D 38 2F A6 D1 7F 3F 39 EE 68 2D B4 9E 62
00A0 | FA 05 90 95 98 ED AA 12 E6 AE C6 6A 71 E5 C9 97
00B0 | F1 36 6D C0 18 7B 78 7E 34 ED 75 08 7C 71 49 93
00C0 | 4A 87 43 5C C3 29 55 45 D0 2B F4 E6 99 84 2D 3D
00D0 | 95 37 2B FD 25 F6 B6 DB 7D CC 48 DA 92 83 A6 24
00E0 | CA 7E 45 CA CA CA A4 C7 3C 39 50 04 FC 2E 85 4F
00F0 | E7 05 51 CD 7B 78 C0 EC 1B AC 59 8A 43 C5 97 E1
0100 | 12 E5 74 CD DC 9E CD 31 50 35 5E 0C 4C 82 AE 24
0110 | DD 7C CC 5B 4C AA 0E 89 5F 2E E6 01 88 BB 67 7E
0120 | 82 DB 63 64 8A FA 21 62 7C A1 06 74 96 8E D0 42
0130 | F9 B6 D9 7A 38 2B BB 79 E2 4D C3 6E 8D 0A 8E C3
0140 | 7D EB D5 6E 0B E0 7E 5A A0 3D 22 28 02 FC D9 45
0150 | 6A 68 61 85 12 12 0B 65 95 06 32 00 7F 34 8B 17
0160 | 5D 8A 71 50 18 BD 3B 67 E8 27 3F D9 05 5F CA DF
0170 | EC DC A5 0E F3 A8 DF D4 EE BD 5B 9A 24 C3 25 7E
0180 | 35 58 4A 12 A1 AA 65 9D 9C 94 0B 41</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>90E80B00BB706765</code></td>
<td><code>DC9D080036396A65</code></td>
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() &lt;&lt; 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>4A20F9ECB2FF02EBDCD6FF20BE2C9E9B</code></td>
<td><code>F821AC0F4FD4CEAAD0133FE2449F86D4</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>D6495F55CDAF790C1E0C40559C5E1D91</code></td>
<td><code>90998E8AAD0DA16E3B9950BF5A7AE899</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>encrypted_data</td>
<td>56, 340</td>
<td><code>FE5001005FCF96B77257F60B8427A7B4</code> <code>16803C0FF96024C66966AAB2DCB0A40C</code> <code>2EC048173218735597A2353C37C38D64</code> <code>8333A9BFC6F1912A886AF71D1C616B92</code> <code>C2233EDE9F1CF6C8868A92649F9F45A0</code> <code>5E5ADF8E4D5BE63821CB35DAB1397E88</code> <code>4C8638259A98DBCF913416C082F50EDA</code> <code>3C30D642DDB928D0CEF26BD57A064440</code> <code>81AAFE92061F991F4B81F8D1F8D44158</code> <code>A4CD3D220DB402687ADB26DB0508F47C</code> <code>134736354BFB9610515BB258228F182E</code> <code>E6C0CD746B940F1A5690EA169C80C6FC</code> <code>186603399DD5A5D1820C5BEE0DDF28A5</code> <code>BEA57B293064508D6D2D2AD330345189</code> <code>AEA7A21DE6101A92165319BB0F40B305</code> <code>5DDF92752ABC55D6E2D7285398F6F7EF</code> <code>90F6588F54B4F2718126C5C2CB5A9540</code> <code>52ACCF22800647962409F3752B8F79D4</code> <code>E600E69C28B626EAEC61037BD5FF423E</code> <code>06093E14F234F346F66223023CED4728</code> <code>84276E97AFFB1FF98ACA6C23E56EE30F</code><br> <code>F1086631</code></td>
<td><code>FE500100161550B26A25A0A55C07C586</code> <code>4C61B89109059D54AF6C38A79AFB50AD</code> <code>61F012E9EADD4BB61034971BF4ED90D9</code> <code>7BF67BCA23B3B54D02F831D74ABE5AB4</code> <code>03BB0410AF70856F08334CC38FA9783E</code> <code>11C399B1255FEFE481445D382FA6D17F</code> <code>3F39EE682DB49E62FA05909598EDAA12</code> <code>E6AEC66A71E5C997F1366DC0187B787E</code> <code>34ED75087C7149934A87435CC3295545</code> <code>D02BF4E699842D3D95372BFD25F6B6DB</code> <code>7DCC48DA9283A624CA7E45CACACAA4C7</code> <code>3C395004FC2E854FE70551CD7B78C0EC</code> <code>1BAC598A43C597E112E574CDDC9ECD31</code> <code>50355E0C4C82AE24DD7CCC5B4CAA0E89</code> <code>5F2EE60188BB677E82DB63648AFA2162</code> <code>7CA10674968ED042F9B6D97A382BBB79</code> <code>E24DC36E8D0A8EC37DEBD56E0BE07E5A</code> <code>A03D222802FCD9456A68618512120B65</code> <code>950632007F348B175D8A715018BD3B67</code> <code>E8273FD9055FCADFECDCA50EF3A8DFD4</code> <code>EEBD5B9A24C3257E35584A12A1AA659D</code><br> <code>9C940B41</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 = B84BDBD3B935E5AE0DF7DFEF0EF5B7B736C91D5BC889B8D9D2AFF90A68A6F0E41E9073E7CDFB27A831A958BB6F8DBB911E04724A6F0CA1DBF06AE4D515810600D48BE09E4D69D999AE38C30A58C28D99978C3380EAA2A658ACA2D706E3CC1CB04FBFC675A0BA05D27C5B8C77E28F400B3AA6CF986A7D3129E79507C96AAA6C963AA38963864A2806EF4423B80DAF3CD1936AF9ABBEA039504112F86AFF06D75D20879A7C2B28882D0D16E2086543032A97E97761AD75344E5941FD81C83C73861764DD5AAD7E0C2611A44A7BC5BFB01ECA3F9F4F597D7856073EB977B95871EF4F6EB0A96F503EA3F02DA65B5ADD6ECB6E4B5145108946F42FEC906CE41D4774</code></pre>
<pre><code>auth_key = 3AFBF11452128AA72F132B1A687B8E19BAA16F91704CE5D19B0167AA78864581EB1160850CE88C019A6BBE35574DE258FB93C632F7149441B1D203C91CA41D876D94870821886BE34C2D8477CB820E260DD658AD4EA8B8867E8AB65E2F12CE81B271B3A9D9F0259C7257EBA6C78908005D500D9359C336FF7058FAEB3C4FD167C12E50A274394F201AA11B420A3BD9AB94D3184BA532FC2D2F70ADDD73F7600A8686716FB9C52B02AB1D68A9B841FC0923049F8AA8AB7D3BAA479CF16F99BACF97239B68FB637D0FD419A4924A24D5A0ACE20047CB37A4C05B0BA35D4FA2847B4D65B7EF5716DAB5C41C652EB9BF100AE92A5A432D533342E6DD870ED4E13B8F</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 6C 17 F6 BB 70 67 65
0010 | 44 00 00 00 34 F7 CB 3B 4A 20 F9 EC B2 FF 02 EB
0020 | DC D6 FF 20 BE 2C 9E 9B D6 49 5F 55 CD AF 79 0C
0030 | 1E 0C 40 55 9C 5E 1D 91 9D 52 64 57 64 A5 68 75
0040 | 94 59 22 9B 31 A2 94 E8</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 80 C0 93 36 39 6A 65
0010 | A0 00 00 00 34 F7 CB 3B F8 21 AC 0F 4F D4 CE AA
0020 | D0 13 3F E2 44 9F 86 D4 90 99 8E 8A AD 0D A1 6E
0030 | 3B 99 50 BF 5A 7A E8 99 C2 97 BF 31 2D 62 6C C0
0040 | 9E 84 15 52 67 36 CB DC</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>016C17F6BB706765</code></td>
<td><code>0180C09336396A65</code></td>
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() &lt;&lt; 32) + (N*4)</td>
</tr>
<tr>
<td>message_length</td>
<td>16, 4</td>
<td><code>44000000</code> (68 in decimal)</td>
<td><code>A0000000</code> (160 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>4A20F9ECB2FF02EBDCD6FF20BE2C9E9B</code></td>
<td><code>F821AC0F4FD4CEAAD0133FE2449F86D4</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>D6495F55CDAF790C1E0C40559C5E1D91</code></td>
<td><code>90998E8AAD0DA16E3B9950BF5A7AE899</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>new_nonce_hash1</td>
<td>56, 16</td>
<td><code>9D52645764A568759459229B31A294E8</code></td>
<td><code>C297BF312D626CC09E8415526736CBDC</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>

View file

@ -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 mini app.">
<meta property="description" content="Contains the link that must be used to open a named 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 mini app.">
<meta property="og:description" content="Contains the link that must be used to open a named 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-mini-apps">named bot mini 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-mini-apps">named 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-mini-apps">named bot mini app</a>.</td>
<td>Contains the link that must be used to open a <a href="/api/bots/webapps#named-mini-apps">named 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 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>
<td>Open a <a href="/bots/webapps">bot mini app</a> from a <a href="/api/links#named-mini-app-links">named 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>

View file

@ -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 mini app.">
<meta property="description" content="Contains information about a named Mini App.">
<meta property="og:title" content="BotApp">
<meta property="og:image" content="">
<meta property="og:description" content="Contains information about a named bot mini app.">
<meta property="og:description" content="Contains information about a named 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-mini-apps">named bot mini app</a>.</p>
<div id="dev_page_content"><p>Contains information about a <a href="/api/bots/webapps#named-mini-apps">named 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-mini-apps">named bot mini app</a>.</td>
<td>Contains information about a <a href="/api/bots/webapps#named-mini-apps">named Mini App</a>.</td>
</tr>
</tbody>
</table>

View file

@ -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 mini app button, shown on top of the inline query results list.">
<meta property="description" content="Specifies an inline mode 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 mini app button, shown on top of the inline query results list.">
<meta property="og:description" content="Specifies an inline mode 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-mini-apps">bot mini app</a> button, shown on top of the inline query results list.</p>
<div id="dev_page_content"><p>Specifies an <a href="/api/bots/webapps#inline-mode-mini-apps">inline mode 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-mini-apps">bot mini app</a> button, shown on top of the inline query results list.</td>
<td>Specifies an <a href="/api/bots/webapps#inline-mode-mini-apps">inline mode mini app</a> button, shown on top of the inline query results list.</td>
</tr>
</tbody>
</table>

View file

@ -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 mini app">
<meta property="description" content="Used to fetch information about a named 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 mini app">
<meta property="og:description" content="Used to fetch information about a named 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-mini-apps">named bot mini app</a></p>
<div id="dev_page_content"><p>Used to fetch information about a <a href="/api/bots/webapps#named-mini-apps">named 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-mini-apps">named bot mini app</a> by its ID</td>
<td>Used to fetch information about a <a href="/api/bots/webapps#named-mini-apps">named 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-mini-apps">named bot mini app</a> by its short name</td>
<td>Used to fetch information about a <a href="/api/bots/webapps#named-mini-apps">named Mini App</a> by its short name</td>
</tr>
</tbody>
</table>

View file

@ -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 mini app">
<meta property="description" content="Contains information about a named 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 mini app">
<meta property="og:description" content="Contains information about a named 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-mini-apps">named bot mini app</a></p>
<div id="dev_page_content"><p>Contains information about a <a href="/api/bots/webapps#named-mini-apps">named 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-mini-apps">named bot mini app</a></td>
<td>Contains information about a <a href="/api/bots/webapps#named-mini-apps">named 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-mini-apps">named bot mini app</a></td>
<td>Obtain information about a <a href="/api/bots/webapps#named-mini-apps">named Mini App</a></td>
</tr>
</tbody>
</table>

View file

@ -1302,13 +1302,11 @@ var Random = {
var LoginCodes = {
init: function() {
Aj.onLoad(function(state) {
$('.js-toggle-receive').on('change', LoginCodes.eToggleReceive);
state.needUpdate = true;
state.updLastReq = +Date.now();
state.updStateTo = setTimeout(LoginCodes.updateState, Main.UPDATE_PERIOD);
});
Aj.onUnload(function(state) {
$('.js-toggle-receive').off('change', LoginCodes.eToggleReceive);
clearTimeout(state.updStateTo);
state.needUpdate = false;
});
@ -1339,14 +1337,6 @@ var LoginCodes = {
}
}
},
eToggleReceive: function() {
var can_receive = $(this).prop('checked');
$('.js-codes-main').toggleClass('codes-disabled', !can_receive);
Aj.apiRequest('toggleLoginCodes', {
number: Aj.state.number,
can_receive: can_receive ? 1 : 0
});
}
};