Update content of files

This commit is contained in:
GitHub Action 2024-06-30 15:40:15 +00:00
parent fd06b09559
commit f9f95f58a1
15 changed files with 667 additions and 390 deletions

View file

@ -0,0 +1,368 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>Business</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Users can turn their Telegram account into a business account, gaining access to business features such as opening hours, location, quick replies, automated messages, custom start page, chatbot support, and more.">
<meta property="og:title" content="Business">
<meta property="og:image" content="">
<meta property="og:description" content="Users can turn their Telegram account into a business account, gaining access to business features such as opening hours, location, quick replies, automated messages, custom start page, chatbot support, and more.">
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/img/favicon-16x16.png">
<link rel="alternate icon" href="/img/favicon.ico" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?239" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class="active"><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class=""><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/api/business" >Business</a></li></ul></div>
<h1 id="dev_page_title">Business</h1>
<div id="dev_page_content"><!-- scroll_nav -->
<p>Users can turn their Telegram account into a <strong>business account</strong>, gaining access to business features such as opening hours, location, quick replies, automated messages, custom start page, chatbot support, and more.</p>
<h3><a class="anchor" href="#opening-hours" id="opening-hours" name="opening-hours"><i class="anchor-icon"></i></a>Opening hours</h3>
<pre><code><a href='/constructor/timezone'>timezone</a>#ff9289f5 id:<a href='/type/string'>string</a> name:<a href='/type/string'>string</a> utc_offset:<a href='/type/int'>int</a> = <a href='/type/Timezone'>Timezone</a>;
<a href='/constructor/help.timezonesListNotModified'>help.timezonesListNotModified</a>#970708cc = <a href='/type/help.TimezonesList'>help.TimezonesList</a>;
<a href='/constructor/help.timezonesList'>help.timezonesList</a>#7b74ed71 timezones:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/Timezone'>Timezone</a>&gt; hash:<a href='/type/int'>int</a> = <a href='/type/help.TimezonesList'>help.TimezonesList</a>;
<a href='/constructor/businessWeeklyOpen'>businessWeeklyOpen</a>#120b1ab9 start_minute:<a href='/type/int'>int</a> end_minute:<a href='/type/int'>int</a> = <a href='/type/BusinessWeeklyOpen'>BusinessWeeklyOpen</a>;
<a href='/constructor/businessWorkHours'>businessWorkHours</a>#8c92b098 flags:<a href='/type/%23'>#</a> open_now:flags.0?<a href='/constructor/true'>true</a> timezone_id:<a href='/type/string'>string</a> weekly_open:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/BusinessWeeklyOpen'>BusinessWeeklyOpen</a>&gt; = <a href='/type/BusinessWorkHours'>BusinessWorkHours</a>;
<a href='/constructor/userFull'>userFull</a>#cc997720 flags:<a href='/type/%23'>#</a> blocked:flags.0?<a href='/constructor/true'>true</a> phone_calls_available:flags.4?<a href='/constructor/true'>true</a> phone_calls_private:flags.5?<a href='/constructor/true'>true</a> can_pin_message:flags.7?<a href='/constructor/true'>true</a> has_scheduled:flags.12?<a href='/constructor/true'>true</a> video_calls_available:flags.13?<a href='/constructor/true'>true</a> voice_messages_forbidden:flags.20?<a href='/constructor/true'>true</a> translations_disabled:flags.23?<a href='/constructor/true'>true</a> stories_pinned_available:flags.26?<a href='/constructor/true'>true</a> blocked_my_stories_from:flags.27?<a href='/constructor/true'>true</a> wallpaper_overridden:flags.28?<a href='/constructor/true'>true</a> contact_require_premium:flags.29?<a href='/constructor/true'>true</a> read_dates_private:flags.30?<a href='/constructor/true'>true</a> flags2:<a href='/type/%23'>#</a> sponsored_enabled:flags2.7?<a href='/constructor/true'>true</a> id:<a href='/type/long'>long</a> about:flags.1?<a href='/type/string'>string</a> settings:<a href='/type/PeerSettings'>PeerSettings</a> personal_photo:flags.21?<a href='/type/Photo'>Photo</a> profile_photo:flags.2?<a href='/type/Photo'>Photo</a> fallback_photo:flags.22?<a href='/type/Photo'>Photo</a> notify_settings:<a href='/type/PeerNotifySettings'>PeerNotifySettings</a> bot_info:flags.3?<a href='/type/BotInfo'>BotInfo</a> pinned_msg_id:flags.6?<a href='/type/int'>int</a> common_chats_count:<a href='/type/int'>int</a> folder_id:flags.11?<a href='/type/int'>int</a> ttl_period:flags.14?<a href='/type/int'>int</a> theme_emoticon:flags.15?<a href='/type/string'>string</a> private_forward_name:flags.16?<a href='/type/string'>string</a> bot_group_admin_rights:flags.17?<a href='/type/ChatAdminRights'>ChatAdminRights</a> bot_broadcast_admin_rights:flags.18?<a href='/type/ChatAdminRights'>ChatAdminRights</a> premium_gifts:flags.19?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/PremiumGiftOption'>PremiumGiftOption</a>&gt; wallpaper:flags.24?<a href='/type/WallPaper'>WallPaper</a> stories:flags.25?<a href='/type/PeerStories'>PeerStories</a> business_work_hours:flags2.0?<a href='/type/BusinessWorkHours'>BusinessWorkHours</a> business_location:flags2.1?<a href='/type/BusinessLocation'>BusinessLocation</a> business_greeting_message:flags2.2?<a href='/type/BusinessGreetingMessage'>BusinessGreetingMessage</a> business_away_message:flags2.3?<a href='/type/BusinessAwayMessage'>BusinessAwayMessage</a> business_intro:flags2.4?<a href='/type/BusinessIntro'>BusinessIntro</a> birthday:flags2.5?<a href='/type/Birthday'>Birthday</a> personal_channel_id:flags2.6?<a href='/type/long'>long</a> personal_channel_message:flags2.6?<a href='/type/int'>int</a> = <a href='/type/UserFull'>UserFull</a>;
---functions---
<a href='/method/account.updateBusinessWorkHours'>account.updateBusinessWorkHours</a>#4b00e066 flags:<a href='/type/%23'>#</a> business_work_hours:flags.0?<a href='/type/BusinessWorkHours'>BusinessWorkHours</a> = <a href='/type/Bool'>Bool</a>;
<a href='/method/help.getTimezonesList'>help.getTimezonesList</a>#49b30240 hash:<a href='/type/int'>int</a> = <a href='/type/help.TimezonesList'>help.TimezonesList</a>;</code></pre>
<p>Businesses can display their hours of operation; this info will be contained in <a href="/constructor/userFull">userFull</a>.<code>business_work_hours</code>.<br>
To set this information use <a href="/method/account.updateBusinessWorkHours">account.updateBusinessWorkHours</a>, passing a <a href="/constructor/businessWorkHours">businessWorkHours</a> constructor with:</p>
<ul>
<li>
<p><code>weekly_open</code> - A list of time intervals (max 28) represented by <a href="/constructor/businessWeeklyOpen">businessWeeklyOpen</a>, indicating the opening hours of their business.<br>
The time intervals in <a href="/constructor/businessWeeklyOpen">businessWeeklyOpen</a>.<code>start/end_minute</code> are specified in minutes of the week.<br>
For example, <code>61</code> is <code>Monday 01:01</code>, but can also be <code>7*24*60+61</code> for <code>end_minute</code> (see below). </p>
<p>When modifying these values, the client should validate them with the following actions (executed in the specified order):</p>
<ul>
<li>
<p>Sort intervals by <code>start_minute</code> before uploading, also to facilitate client-side validation.</p>
</li>
<li>
<p>All intervals that do not satisfy the following conditions must be removed:</p>
<ul>
<li><code>end_minute - start_minute</code> must be <code>&gt;= 1</code></li>
<li><code>start_minute</code> must range from <code>0</code> to <code>7*24*60</code> inclusively</li>
<li><code>end_minute</code> must range from <code>1</code> to <code>8*24*60</code> inclusively (<code>8</code> and not <code>7</code> because this allows to specify intervals that, for example, start on <code>Sunday 21:00</code> and end on <code>Monday 04:00</code> (<code>6*24*60+21*60</code> to <code>7*24*60+4*60</code>) without violating the first condition)</li>
</ul>
</li>
<li>
<p>Intersecting intervals and intervals that start and end on the same minute of the day must be merged into a single interval before uploading, for example:</p>
<ul>
<li><code>Monday 00:00-Monday 00:01</code> and <code>Monday 00:01-Monday 00:10</code> =&gt; <code>Monday 00:00-Monday 00:10</code></li>
<li><code>Monday 00:00-Monday 00:05</code> and <code>Monday 00:01-Monday 00:10</code> =&gt; <code>Monday 00:00-Monday 00:10</code></li>
<li><code>Monday 00:00-Monday 01:00</code> and <code>Monday 00:01-Monday 00:10</code> =&gt; <code>Monday 00:00-Monday 01:00</code></li>
<li><code>Sunday 16:00-Monday 01:00</code> and <code>Monday 01:00-Monday 03:00</code> =&gt; <code>Sunday 16:00-Monday 03:00</code></li>
</ul>
<p>Note that in the last example, the first interval ended on <code>7*60*24+60</code> but the second interval started on <code>60</code>, and they were still merged (i.e., all intervals must be checked modulo <code>7*24*60</code>). </p>
<p>There is a special case where two such intersecting/adjacent intervals must still generate two distinct intervals instead of one, when:</p>
<ul>
<li>The starting minute of the original first interval is <code>&lt;= 7*24*60</code></li>
<li>AND the ending minute of the original second interval is <code>&gt;= 1*24*60</code>. </li>
</ul>
<p>This special case cannot be merged into a single interval, as the resulting <code>end_minute</code> would be <code>&gt;= 8*24*60</code>.<br>
Thus, the merge result of this special intersection case is two intervals, the first ending on <code>7*24*60</code> the second starting at <code>0</code>, splitting the first interval even if it originally spanned two or more days including Sunday and Monday. </p>
<p>Examples:</p>
<ul>
<li><code>Sunday 16:00-Monday 01:00</code> and <code>Monday 00:30-Thursday 03:00</code> =&gt; <code>Sunday 16:00-Sunday 23:59</code> and <code>Monday 00:00-Thursday 03:00</code></li>
<li><code>Sunday 16:00-Monday 01:00</code> and <code>Monday 01:00-Thursday 03:00</code> =&gt; <code>Sunday 16:00-Sunday 23:59</code> and <code>Monday 00:00-Thursday 03:00</code></li>
</ul>
</li>
<li>
<p>If <code>end_minute - start_minute</code> is <code>&gt; 7*24*60</code>, <code>end_minute</code> must be set equal to <code>start_minute + 7*24*60</code> (there must be no intervals longer than 1 week). </p>
</li>
<li>
<p>Recursively repeat the last two steps until no more changes are made. </p>
</li>
</ul>
</li>
</ul>
<ul>
<li><code>timezone_id</code> - An ID of one of the timezones returned by <a href="/method/help.getTimezonesList">help.getTimezonesList</a>.<br>
The timezone ID is contained <a href="/constructor/timezone">timezone</a>.<code>id</code>, a human-readable, localized name of the timezone is available in <a href="/constructor/timezone">timezone</a>.<code>name</code> and the <a href="/constructor/timezone">timezone</a>.<code>utc_offset</code> field contains the UTC offset in seconds, which may be displayed in hh:mm format by the client together with the human-readable name (i.e. <code>$name UTC -01:00</code>).</li>
<li><code>open_now</code> - Ignored when passed by the client, only populated by the server in <a href="/constructor/userFull">userFull</a>.<code>business_work_hours</code>, indicating whether the business is currently open according to the current time and the values in <code>weekly_open</code> and <code>timezone</code>. </li>
</ul>
<p>To remove all info about opening hours, invoke <a href="/method/account.updateBusinessWorkHours">account.updateBusinessWorkHours</a> without populating the <code>business_work_hours</code> flag. </p>
<h3><a class="anchor" href="#location" id="location" name="location"><i class="anchor-icon"></i></a>Location</h3>
<pre><code><a href='/constructor/businessLocation'>businessLocation</a>#ac5c1af7 flags:<a href='/type/%23'>#</a> geo_point:flags.0?<a href='/type/GeoPoint'>GeoPoint</a> address:<a href='/type/string'>string</a> = <a href='/type/BusinessLocation'>BusinessLocation</a>;
<a href='/constructor/userFull'>userFull</a>#cc997720 flags:<a href='/type/%23'>#</a> blocked:flags.0?<a href='/constructor/true'>true</a> phone_calls_available:flags.4?<a href='/constructor/true'>true</a> phone_calls_private:flags.5?<a href='/constructor/true'>true</a> can_pin_message:flags.7?<a href='/constructor/true'>true</a> has_scheduled:flags.12?<a href='/constructor/true'>true</a> video_calls_available:flags.13?<a href='/constructor/true'>true</a> voice_messages_forbidden:flags.20?<a href='/constructor/true'>true</a> translations_disabled:flags.23?<a href='/constructor/true'>true</a> stories_pinned_available:flags.26?<a href='/constructor/true'>true</a> blocked_my_stories_from:flags.27?<a href='/constructor/true'>true</a> wallpaper_overridden:flags.28?<a href='/constructor/true'>true</a> contact_require_premium:flags.29?<a href='/constructor/true'>true</a> read_dates_private:flags.30?<a href='/constructor/true'>true</a> flags2:<a href='/type/%23'>#</a> sponsored_enabled:flags2.7?<a href='/constructor/true'>true</a> id:<a href='/type/long'>long</a> about:flags.1?<a href='/type/string'>string</a> settings:<a href='/type/PeerSettings'>PeerSettings</a> personal_photo:flags.21?<a href='/type/Photo'>Photo</a> profile_photo:flags.2?<a href='/type/Photo'>Photo</a> fallback_photo:flags.22?<a href='/type/Photo'>Photo</a> notify_settings:<a href='/type/PeerNotifySettings'>PeerNotifySettings</a> bot_info:flags.3?<a href='/type/BotInfo'>BotInfo</a> pinned_msg_id:flags.6?<a href='/type/int'>int</a> common_chats_count:<a href='/type/int'>int</a> folder_id:flags.11?<a href='/type/int'>int</a> ttl_period:flags.14?<a href='/type/int'>int</a> theme_emoticon:flags.15?<a href='/type/string'>string</a> private_forward_name:flags.16?<a href='/type/string'>string</a> bot_group_admin_rights:flags.17?<a href='/type/ChatAdminRights'>ChatAdminRights</a> bot_broadcast_admin_rights:flags.18?<a href='/type/ChatAdminRights'>ChatAdminRights</a> premium_gifts:flags.19?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/PremiumGiftOption'>PremiumGiftOption</a>&gt; wallpaper:flags.24?<a href='/type/WallPaper'>WallPaper</a> stories:flags.25?<a href='/type/PeerStories'>PeerStories</a> business_work_hours:flags2.0?<a href='/type/BusinessWorkHours'>BusinessWorkHours</a> business_location:flags2.1?<a href='/type/BusinessLocation'>BusinessLocation</a> business_greeting_message:flags2.2?<a href='/type/BusinessGreetingMessage'>BusinessGreetingMessage</a> business_away_message:flags2.3?<a href='/type/BusinessAwayMessage'>BusinessAwayMessage</a> business_intro:flags2.4?<a href='/type/BusinessIntro'>BusinessIntro</a> birthday:flags2.5?<a href='/type/Birthday'>Birthday</a> personal_channel_id:flags2.6?<a href='/type/long'>long</a> personal_channel_message:flags2.6?<a href='/type/int'>int</a> = <a href='/type/UserFull'>UserFull</a>;
---functions---
<a href='/method/account.updateBusinessLocation'>account.updateBusinessLocation</a>#9e6b131a flags:<a href='/type/%23'>#</a> geo_point:flags.1?<a href='/type/InputGeoPoint'>InputGeoPoint</a> address:flags.0?<a href='/type/string'>string</a> = <a href='/type/Bool'>Bool</a>;</code></pre>
<p>Businesses may advertise their location using <a href="/method/account.updateBusinessLocation">account.updateBusinessLocation</a>; this information is then returned to users in <a href="/constructor/userFull">userFull</a>.<code>business_location</code>. </p>
<p>The method takes two parameters:</p>
<ul>
<li><code>address</code> - Mandatory when setting/updating the location, contains a textual description of the address (max 64 UTF-8 chars).</li>
<li><code>geo_point</code> - Optional, contains a set of geographical coordinates.</li>
</ul>
<p>To remove business location information invoke the method without setting any of the parameters. </p>
<p>If a <code>geo_point</code> is set, the business' location will also be advertised to geographically close users using the nearby users feature, <a href="/api/nearby/#fetching-nearby-users-and-geogroups">as described here »</a>. </p>
<p>Note that even if just the <code>address</code> is set (with or without a <code>geo_point</code>), the current geolocation of the user may not be changed using <a href="/method/contacts.getLocated">contacts.getLocated</a> method (i.e. for the <a href="/api/nearby#advertising-our-current-location">nearby users feature</a>): it will return a <code>BUSINESS_ADDRESS_ACTIVE</code> error, indicating that the location may only be changed (or removed) using <a href="/method/account.updateBusinessLocation">account.updateBusinessLocation »</a>. </p>
<h3><a class="anchor" href="#quick-reply-shortcuts" id="quick-reply-shortcuts" name="quick-reply-shortcuts"><i class="anchor-icon"></i></a>Quick reply shortcuts</h3>
<p>Telegram Business allows you to create <strong>quick replies</strong>.<br>
Quick replies are shortcuts for sending preset messages that may contain several messages and support text formatting, links, stickers, media, and files. </p>
<p>A quick reply shortcut has a name (shown to the user), a numeric ID and a set of associated <a href="/constructor/message">message</a>s. </p>
<h4><a class="anchor" href="#fetch-existing-quick-reply-shortcuts" id="fetch-existing-quick-reply-shortcuts" name="fetch-existing-quick-reply-shortcuts"><i class="anchor-icon"></i></a>Fetch existing quick reply shortcuts</h4>
<pre><code><a href='/constructor/message'>message</a>#94345242 flags:<a href='/type/%23'>#</a> out:flags.1?<a href='/constructor/true'>true</a> mentioned:flags.4?<a href='/constructor/true'>true</a> media_unread:flags.5?<a href='/constructor/true'>true</a> silent:flags.13?<a href='/constructor/true'>true</a> post:flags.14?<a href='/constructor/true'>true</a> from_scheduled:flags.18?<a href='/constructor/true'>true</a> legacy:flags.19?<a href='/constructor/true'>true</a> edit_hide:flags.21?<a href='/constructor/true'>true</a> pinned:flags.24?<a href='/constructor/true'>true</a> noforwards:flags.26?<a href='/constructor/true'>true</a> invert_media:flags.27?<a href='/constructor/true'>true</a> flags2:<a href='/type/%23'>#</a> offline:flags2.1?<a href='/constructor/true'>true</a> id:<a href='/type/int'>int</a> from_id:flags.8?<a href='/type/Peer'>Peer</a> from_boosts_applied:flags.29?<a href='/type/int'>int</a> peer_id:<a href='/type/Peer'>Peer</a> saved_peer_id:flags.28?<a href='/type/Peer'>Peer</a> fwd_from:flags.2?<a href='/type/MessageFwdHeader'>MessageFwdHeader</a> via_bot_id:flags.11?<a href='/type/long'>long</a> via_business_bot_id:flags2.0?<a href='/type/long'>long</a> reply_to:flags.3?<a href='/type/MessageReplyHeader'>MessageReplyHeader</a> date:<a href='/type/int'>int</a> message:<a href='/type/string'>string</a> media:flags.9?<a href='/type/MessageMedia'>MessageMedia</a> reply_markup:flags.6?<a href='/type/ReplyMarkup'>ReplyMarkup</a> entities:flags.7?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/MessageEntity'>MessageEntity</a>&gt; views:flags.10?<a href='/type/int'>int</a> forwards:flags.10?<a href='/type/int'>int</a> replies:flags.23?<a href='/type/MessageReplies'>MessageReplies</a> edit_date:flags.15?<a href='/type/int'>int</a> post_author:flags.16?<a href='/type/string'>string</a> grouped_id:flags.17?<a href='/type/long'>long</a> reactions:flags.20?<a href='/type/MessageReactions'>MessageReactions</a> restriction_reason:flags.22?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/RestrictionReason'>RestrictionReason</a>&gt; ttl_period:flags.25?<a href='/type/int'>int</a> quick_reply_shortcut_id:flags.30?<a href='/type/int'>int</a> effect:flags2.2?<a href='/type/long'>long</a> factcheck:flags2.3?<a href='/type/FactCheck'>FactCheck</a> = <a href='/type/Message'>Message</a>;
<a href='/constructor/quickReply'>quickReply</a>#697102b shortcut_id:<a href='/type/int'>int</a> shortcut:<a href='/type/string'>string</a> top_message:<a href='/type/int'>int</a> count:<a href='/type/int'>int</a> = <a href='/type/QuickReply'>QuickReply</a>;
<a href='/constructor/messages.quickReplies'>messages.quickReplies</a>#c68d6695 quick_replies:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/QuickReply'>QuickReply</a>&gt; messages:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/Message'>Message</a>&gt; chats:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/Chat'>Chat</a>&gt; users:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/User'>User</a>&gt; = <a href='/type/messages.QuickReplies'>messages.QuickReplies</a>;
<a href='/constructor/messages.quickRepliesNotModified'>messages.quickRepliesNotModified</a>#5f91eb5b = <a href='/type/messages.QuickReplies'>messages.QuickReplies</a>;
---functions---
<a href='/method/messages.getQuickReplies'>messages.getQuickReplies</a>#d483f2a8 hash:<a href='/type/long'>long</a> = <a href='/type/messages.QuickReplies'>messages.QuickReplies</a>;
<a href='/method/messages.getQuickReplyMessages'>messages.getQuickReplyMessages</a>#94a495c3 flags:<a href='/type/%23'>#</a> shortcut_id:<a href='/type/int'>int</a> id:flags.0?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/int'>int</a>&gt; hash:<a href='/type/long'>long</a> = <a href='/type/messages.Messages'>messages.Messages</a>;</code></pre>
<p>To fetch basic info about all existing quick reply shortcuts, use <a href="/method/messages.getQuickReplies">messages.getQuickReplies</a>. </p>
<p>The method will return the ID and name of each shortcut, along with the number of messages in the shortcut and the ID of (only) the last message of each shortcut (along with the message itself in <code>messages</code>). </p>
<p>Note that the <code>hash</code> is used for caching, and is generated <strong>not</strong> by using the message IDs, but rather the following set of integers, passed to the <a href="/api/offsets#hash-generation">usual hashing algorithm</a>. </p>
<pre><code>hash_ints = [];
foreach (quick_replies as quick_reply) {
hash_ints[] = quick_reply.shortcut_id;
hash_ints[] = hexdec(substr(md5(quick_reply.shortcut), 0, 16));
hash_ints[] = quick_reply.top_message;
hash_ints[] = top_message.edit_date || 0;
}</code></pre>
<p>The method will return <a href="/constructor/messages.quickRepliesNotModified">messages.quickRepliesNotModified</a> if the passed hash is equal to the server-side hash, meaning that the order, names and last messages of the quick replies haven't changed. </p>
<p>Editing some intermediate message in a quick reply will not change the hash, which is why <a href="/method/messages.getQuickReplyMessages">messages.getQuickReplyMessages</a> should be used to fetch (a subset or all) messages in a quick reply shortcut, and its hash is generated as follows (from the full message list of a shortcut, obviously):</p>
<pre><code>hash_ints = [];
foreach (messages as message) {
hash_ints[] = message.id;
hash_ints[] = message.edit_date || 0;
}</code></pre>
<h4><a class="anchor" href="#adding-a-message-to-a-quick-reply-shortcut" id="adding-a-message-to-a-quick-reply-shortcut" name="adding-a-message-to-a-quick-reply-shortcut"><i class="anchor-icon"></i></a>Adding a message to a quick reply shortcut</h4>
<pre><code><a href='/constructor/inputQuickReplyShortcut'>inputQuickReplyShortcut</a>#24596d41 shortcut:<a href='/type/string'>string</a> = <a href='/type/InputQuickReplyShortcut'>InputQuickReplyShortcut</a>;
<a href='/constructor/inputQuickReplyShortcutId'>inputQuickReplyShortcutId</a>#1190cf1 shortcut_id:<a href='/type/int'>int</a> = <a href='/type/InputQuickReplyShortcut'>InputQuickReplyShortcut</a>;
<a href='/constructor/message'>message</a>#94345242 flags:<a href='/type/%23'>#</a> out:flags.1?<a href='/constructor/true'>true</a> mentioned:flags.4?<a href='/constructor/true'>true</a> media_unread:flags.5?<a href='/constructor/true'>true</a> silent:flags.13?<a href='/constructor/true'>true</a> post:flags.14?<a href='/constructor/true'>true</a> from_scheduled:flags.18?<a href='/constructor/true'>true</a> legacy:flags.19?<a href='/constructor/true'>true</a> edit_hide:flags.21?<a href='/constructor/true'>true</a> pinned:flags.24?<a href='/constructor/true'>true</a> noforwards:flags.26?<a href='/constructor/true'>true</a> invert_media:flags.27?<a href='/constructor/true'>true</a> flags2:<a href='/type/%23'>#</a> offline:flags2.1?<a href='/constructor/true'>true</a> id:<a href='/type/int'>int</a> from_id:flags.8?<a href='/type/Peer'>Peer</a> from_boosts_applied:flags.29?<a href='/type/int'>int</a> peer_id:<a href='/type/Peer'>Peer</a> saved_peer_id:flags.28?<a href='/type/Peer'>Peer</a> fwd_from:flags.2?<a href='/type/MessageFwdHeader'>MessageFwdHeader</a> via_bot_id:flags.11?<a href='/type/long'>long</a> via_business_bot_id:flags2.0?<a href='/type/long'>long</a> reply_to:flags.3?<a href='/type/MessageReplyHeader'>MessageReplyHeader</a> date:<a href='/type/int'>int</a> message:<a href='/type/string'>string</a> media:flags.9?<a href='/type/MessageMedia'>MessageMedia</a> reply_markup:flags.6?<a href='/type/ReplyMarkup'>ReplyMarkup</a> entities:flags.7?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/MessageEntity'>MessageEntity</a>&gt; views:flags.10?<a href='/type/int'>int</a> forwards:flags.10?<a href='/type/int'>int</a> replies:flags.23?<a href='/type/MessageReplies'>MessageReplies</a> edit_date:flags.15?<a href='/type/int'>int</a> post_author:flags.16?<a href='/type/string'>string</a> grouped_id:flags.17?<a href='/type/long'>long</a> reactions:flags.20?<a href='/type/MessageReactions'>MessageReactions</a> restriction_reason:flags.22?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/RestrictionReason'>RestrictionReason</a>&gt; ttl_period:flags.25?<a href='/type/int'>int</a> quick_reply_shortcut_id:flags.30?<a href='/type/int'>int</a> effect:flags2.2?<a href='/type/long'>long</a> factcheck:flags2.3?<a href='/type/FactCheck'>FactCheck</a> = <a href='/type/Message'>Message</a>;
<a href='/constructor/quickReply'>quickReply</a>#697102b shortcut_id:<a href='/type/int'>int</a> shortcut:<a href='/type/string'>string</a> top_message:<a href='/type/int'>int</a> count:<a href='/type/int'>int</a> = <a href='/type/QuickReply'>QuickReply</a>;
<a href='/constructor/updateNewQuickReply'>updateNewQuickReply</a>#f53da717 quick_reply:<a href='/type/QuickReply'>QuickReply</a> = <a href='/type/Update'>Update</a>;
<a href='/constructor/updateQuickReplyMessage'>updateQuickReplyMessage</a>#3e050d0f message:<a href='/type/Message'>Message</a> = <a href='/type/Update'>Update</a>;
---functions---
<a href='/method/messages.sendMessage'>messages.sendMessage</a>#983f9745 flags:<a href='/type/%23'>#</a> no_webpage:flags.1?<a href='/constructor/true'>true</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> noforwards:flags.14?<a href='/constructor/true'>true</a> update_stickersets_order:flags.15?<a href='/constructor/true'>true</a> invert_media:flags.16?<a href='/constructor/true'>true</a> peer:<a href='/type/InputPeer'>InputPeer</a> reply_to:flags.0?<a href='/type/InputReplyTo'>InputReplyTo</a> message:<a href='/type/string'>string</a> random_id:<a href='/type/long'>long</a> reply_markup:flags.2?<a href='/type/ReplyMarkup'>ReplyMarkup</a> entities:flags.3?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/MessageEntity'>MessageEntity</a>&gt; schedule_date:flags.10?<a href='/type/int'>int</a> send_as:flags.13?<a href='/type/InputPeer'>InputPeer</a> quick_reply_shortcut:flags.17?<a href='/type/InputQuickReplyShortcut'>InputQuickReplyShortcut</a> effect:flags.18?<a href='/type/long'>long</a> = <a href='/type/Updates'>Updates</a>;
<a href='/method/messages.sendMedia'>messages.sendMedia</a>#7852834e 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> noforwards:flags.14?<a href='/constructor/true'>true</a> update_stickersets_order:flags.15?<a href='/constructor/true'>true</a> invert_media:flags.16?<a href='/constructor/true'>true</a> peer:<a href='/type/InputPeer'>InputPeer</a> reply_to:flags.0?<a href='/type/InputReplyTo'>InputReplyTo</a> media:<a href='/type/InputMedia'>InputMedia</a> message:<a href='/type/string'>string</a> random_id:<a href='/type/long'>long</a> reply_markup:flags.2?<a href='/type/ReplyMarkup'>ReplyMarkup</a> entities:flags.3?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/MessageEntity'>MessageEntity</a>&gt; schedule_date:flags.10?<a href='/type/int'>int</a> send_as:flags.13?<a href='/type/InputPeer'>InputPeer</a> quick_reply_shortcut:flags.17?<a href='/type/InputQuickReplyShortcut'>InputQuickReplyShortcut</a> effect:flags.18?<a href='/type/long'>long</a> = <a href='/type/Updates'>Updates</a>;
<a href='/method/messages.sendMultiMedia'>messages.sendMultiMedia</a>#37b74355 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> noforwards:flags.14?<a href='/constructor/true'>true</a> update_stickersets_order:flags.15?<a href='/constructor/true'>true</a> invert_media:flags.16?<a href='/constructor/true'>true</a> peer:<a href='/type/InputPeer'>InputPeer</a> reply_to:flags.0?<a href='/type/InputReplyTo'>InputReplyTo</a> multi_media:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/InputSingleMedia'>InputSingleMedia</a>&gt; schedule_date:flags.10?<a href='/type/int'>int</a> send_as:flags.13?<a href='/type/InputPeer'>InputPeer</a> quick_reply_shortcut:flags.17?<a href='/type/InputQuickReplyShortcut'>InputQuickReplyShortcut</a> effect:flags.18?<a href='/type/long'>long</a> = <a href='/type/Updates'>Updates</a>;
<a href='/method/messages.sendInlineBotResult'>messages.sendInlineBotResult</a>#3ebee86a 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> quick_reply_shortcut:flags.17?<a href='/type/InputQuickReplyShortcut'>InputQuickReplyShortcut</a> = <a href='/type/Updates'>Updates</a>;
<a href='/method/messages.forwardMessages'>messages.forwardMessages</a>#d5039208 flags:<a href='/type/%23'>#</a> silent:flags.5?<a href='/constructor/true'>true</a> background:flags.6?<a href='/constructor/true'>true</a> with_my_score:flags.8?<a href='/constructor/true'>true</a> drop_author:flags.11?<a href='/constructor/true'>true</a> drop_media_captions:flags.12?<a href='/constructor/true'>true</a> noforwards:flags.14?<a href='/constructor/true'>true</a> from_peer:<a href='/type/InputPeer'>InputPeer</a> id:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/int'>int</a>&gt; random_id:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/long'>long</a>&gt; to_peer:<a href='/type/InputPeer'>InputPeer</a> top_msg_id:flags.9?<a href='/type/int'>int</a> schedule_date:flags.10?<a href='/type/int'>int</a> send_as:flags.13?<a href='/type/InputPeer'>InputPeer</a> quick_reply_shortcut:flags.17?<a href='/type/InputQuickReplyShortcut'>InputQuickReplyShortcut</a> = <a href='/type/Updates'>Updates</a>;
<a href='/method/messages.checkQuickReplyShortcut'>messages.checkQuickReplyShortcut</a>#f1d0fbd3 shortcut:<a href='/type/string'>string</a> = <a href='/type/Bool'>Bool</a>;</code></pre>
<p>To add a message to a quick reply shortcut, use <a href="/method/messages.sendMessage">messages.sendMessage</a>, <a href="/method/messages.sendMedia">messages.sendMedia</a>, <a href="/method/messages.sendMultiMedia">messages.sendMultiMedia</a>, <a href="/method/messages.sendInlineBotResult">messages.sendInlineBotResult</a> or <a href="/method/messages.forwardMessages">messages.forwardMessages</a> with <code>peer=</code><a href="/constructor/inputPeerSelf">inputPeerSelf</a>, populating the <code>quick_reply_shortcut</code> flag with an <a href="/type/InputQuickReplyShortcut">InputQuickReplyShortcut</a> constructor. </p>
<p>The <a href="/type/InputQuickReplyShortcut">InputQuickReplyShortcut</a> constructor can be either:</p>
<ul>
<li><a href="/constructor/inputQuickReplyShortcut">inputQuickReplyShortcut</a> to use the shortcut name (used to create a new shortcut)</li>
<li><a href="/constructor/inputQuickReplyShortcut">inputQuickReplyShortcut</a> to use the shortcut ID (used to edit an existing shortcut)</li>
</ul>
<p>If the specified quick reply does not exist, it will be created when invoking the above methods, emitting an additional <a href="/constructor/updateNewQuickReply">updateNewQuickReply</a> to all logged-in sessions. </p>
<p>The numeric ID of the (newly created or existing) shortcut will be contained in the <code>quick_reply_shortcut_id</code> field of the <a href="/constructor/message">message</a>s contained in the <a href="/constructor/updateQuickReplyMessage">updateQuickReplyMessage</a> updates returned by invoking the above methods.<br>
The returned messages will use a common message <code>id</code> sequence, unrelated to any other message ID sequence used in API. </p>
<p>A maximum of <a href="/api/config#quick-replies-limit">appConfig.<code>quick_replies_limit</code></a> shortcuts may be created, otherwise a <code>400 QUICK_REPLIES_TOO_MUCH</code> error will be emitted by the methods above.</p>
<p>Each shortcut can contain a maximum of <a href="/api/config#quick-reply-messages-limit">appConfig.<code>quick_reply_messages_limit</code></a> messages, otherwise a <code>400 REPLY_MESSAGES_TOO_MUCH</code> error will be emitted by the methods above.</p>
<p>Make sure to invoke <a href="/method/messages.checkQuickReplyShortcut">messages.checkQuickReplyShortcut</a> passing the shortcut name before offering the user the choice to add a message to a quick reply shortcut, to make sure that none of the limits specified above were reached. </p>
<h4><a class="anchor" href="#sending-a-quick-reply-shortcut" id="sending-a-quick-reply-shortcut" name="sending-a-quick-reply-shortcut"><i class="anchor-icon"></i></a>Sending a quick reply shortcut</h4>
<pre><code>---functions---
<a href='/method/messages.sendQuickReplyMessages'>messages.sendQuickReplyMessages</a>#6c750de1 peer:<a href='/type/InputPeer'>InputPeer</a> shortcut_id:<a href='/type/int'>int</a> id:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/int'>int</a>&gt; random_id:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/long'>long</a>&gt; = <a href='/type/Updates'>Updates</a>;</code></pre>
<p>To send a quick reply shortcut to a user, use <a href="/method/messages.sendQuickReplyMessages">messages.sendQuickReplyMessages</a>, passing the shortcut ID. </p>
<p>Quick replies may only be sent by users, in private chats with other users.
The UI used to select quick replies should be similar to the one used for <a href="/api/bots/commands">bot commands</a>, using the shortcut name instead of the bot command name. </p>
<p>You may specify a subset of the messages in the <code>id</code> field to send only some of the shortcut messages (if empty, defaults to all of them). </p>
<h4><a class="anchor" href="#editing-a-quick-reply-shortcut-message" id="editing-a-quick-reply-shortcut-message" name="editing-a-quick-reply-shortcut-message"><i class="anchor-icon"></i></a>Editing a quick reply shortcut message</h4>
<pre><code><a href='/constructor/updateQuickReplyMessage'>updateQuickReplyMessage</a>#3e050d0f message:<a href='/type/Message'>Message</a> = <a href='/type/Update'>Update</a>;
---functions---
<a href='/method/messages.editMessage'>messages.editMessage</a>#dfd14005 flags:<a href='/type/%23'>#</a> no_webpage:flags.1?<a href='/constructor/true'>true</a> invert_media:flags.16?<a href='/constructor/true'>true</a> peer:<a href='/type/InputPeer'>InputPeer</a> id:<a href='/type/int'>int</a> message:flags.11?<a href='/type/string'>string</a> media:flags.14?<a href='/type/InputMedia'>InputMedia</a> reply_markup:flags.2?<a href='/type/ReplyMarkup'>ReplyMarkup</a> entities:flags.3?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/MessageEntity'>MessageEntity</a>&gt; schedule_date:flags.15?<a href='/type/int'>int</a> quick_reply_shortcut_id:flags.17?<a href='/type/int'>int</a> = <a href='/type/Updates'>Updates</a>;</code></pre>
<p>Use <a href="/method/messages.editMessage">messages.editMessage</a> to edit a message in a quick reply shortcut, passing the message ID in <code>id</code> and the shortcut ID in <code>quick_reply_shortcut_id</code>.</p>
<p>This will emit a <a href="/constructor/updateQuickReplyMessage">updateQuickReplyMessage</a> update.</p>
<h4><a class="anchor" href="#deleting-a-quick-reply-shortcut-message" id="deleting-a-quick-reply-shortcut-message" name="deleting-a-quick-reply-shortcut-message"><i class="anchor-icon"></i></a>Deleting a quick reply shortcut message</h4>
<pre><code><a href='/constructor/updateDeleteQuickReplyMessages'>updateDeleteQuickReplyMessages</a>#566fe7cd shortcut_id:<a href='/type/int'>int</a> messages:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/int'>int</a>&gt; = <a href='/type/Update'>Update</a>;
---functions---
<a href='/method/messages.deleteQuickReplyMessages'>messages.deleteQuickReplyMessages</a>#e105e910 shortcut_id:<a href='/type/int'>int</a> id:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/int'>int</a>&gt; = <a href='/type/Updates'>Updates</a>;</code></pre>
<p>To delete one or more messages from a quick reply shortcut, use <a href="/method/messages.deleteQuickReplyMessages">messages.deleteQuickReplyMessages</a>, passing the shortcut ID, and the list of message IDs to delete.<br>
This will also emit an <a href="/constructor/updateDeleteQuickReplyMessages">updateDeleteQuickReplyMessages</a> update. </p>
<h4><a class="anchor" href="#renaming-a-quick-reply-shortcut" id="renaming-a-quick-reply-shortcut" name="renaming-a-quick-reply-shortcut"><i class="anchor-icon"></i></a>Renaming a quick reply shortcut</h4>
<pre><code><a href='/constructor/updateQuickReplies'>updateQuickReplies</a>#f9470ab2 quick_replies:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/QuickReply'>QuickReply</a>&gt; = <a href='/type/Update'>Update</a>;
---functions---
<a href='/method/messages.editQuickReplyShortcut'>messages.editQuickReplyShortcut</a>#5c003cef shortcut_id:<a href='/type/int'>int</a> shortcut:<a href='/type/string'>string</a> = <a href='/type/Bool'>Bool</a>;</code></pre>
<p>Use <a href="/method/messages.editQuickReplyShortcut">messages.editQuickReplyShortcut</a> to rename a shortcut.<br>
This will emit an <a href="/constructor/updateQuickReplies">updateQuickReplies</a> update to other logged-in sessions. </p>
<h4><a class="anchor" href="#reordering-quick-reply-shortcuts" id="reordering-quick-reply-shortcuts" name="reordering-quick-reply-shortcuts"><i class="anchor-icon"></i></a>Reordering quick reply shortcuts</h4>
<pre><code><a href='/constructor/updateQuickReplies'>updateQuickReplies</a>#f9470ab2 quick_replies:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/QuickReply'>QuickReply</a>&gt; = <a href='/type/Update'>Update</a>;
---functions---
<a href='/method/messages.reorderQuickReplies'>messages.reorderQuickReplies</a>#60331907 order:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/int'>int</a>&gt; = <a href='/type/Bool'>Bool</a>;</code></pre>
<p>Use <a href="/method/messages.reorderQuickReplies">messages.reorderQuickReplies</a> to reorder quick reply shortcuts (not the messages within them); pass in <code>order</code> the IDs of all created quick reply shortcuts, in the desired order.<br>
This will emit an <a href="/constructor/updateQuickReplies">updateQuickReplies</a> update to other logged-in sessions. </p>
<h4><a class="anchor" href="#deleting-a-quick-reply-shortcut" id="deleting-a-quick-reply-shortcut" name="deleting-a-quick-reply-shortcut"><i class="anchor-icon"></i></a>Deleting a quick reply shortcut</h4>
<pre><code><a href='/constructor/updateDeleteQuickReply'>updateDeleteQuickReply</a>#53e6f1ec shortcut_id:<a href='/type/int'>int</a> = <a href='/type/Update'>Update</a>;
---functions---
<a href='/method/messages.deleteQuickReplyShortcut'>messages.deleteQuickReplyShortcut</a>#3cc04740 shortcut_id:<a href='/type/int'>int</a> = <a href='/type/Bool'>Bool</a>;</code></pre>
<p>To completely delete a quick reply shortcut, use <a href="/method/messages.deleteQuickReplyShortcut">messages.deleteQuickReplyShortcut</a>.<br>
This will also emit an <a href="/constructor/updateDeleteQuickReply">updateDeleteQuickReply</a> update to other logged-in sessions (and <em>no</em> <a href="/constructor/updateDeleteQuickReplyMessages">updateDeleteQuickReplyMessages</a> updates, even if all the messages in the shortcuts are also deleted by this method). </p>
<h3><a class="anchor" href="#greeting-messages" id="greeting-messages" name="greeting-messages"><i class="anchor-icon"></i></a>Greeting messages</h3>
<pre><code><a href='/constructor/inputBusinessRecipients'>inputBusinessRecipients</a>#6f8b32aa flags:<a href='/type/%23'>#</a> existing_chats:flags.0?<a href='/constructor/true'>true</a> new_chats:flags.1?<a href='/constructor/true'>true</a> contacts:flags.2?<a href='/constructor/true'>true</a> non_contacts:flags.3?<a href='/constructor/true'>true</a> exclude_selected:flags.5?<a href='/constructor/true'>true</a> users:flags.4?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/InputUser'>InputUser</a>&gt; = <a href='/type/InputBusinessRecipients'>InputBusinessRecipients</a>;
<a href='/constructor/inputBusinessGreetingMessage'>inputBusinessGreetingMessage</a>#194cb3b shortcut_id:<a href='/type/int'>int</a> recipients:<a href='/type/InputBusinessRecipients'>InputBusinessRecipients</a> no_activity_days:<a href='/type/int'>int</a> = <a href='/type/InputBusinessGreetingMessage'>InputBusinessGreetingMessage</a>;
<a href='/constructor/businessRecipients'>businessRecipients</a>#21108ff7 flags:<a href='/type/%23'>#</a> existing_chats:flags.0?<a href='/constructor/true'>true</a> new_chats:flags.1?<a href='/constructor/true'>true</a> contacts:flags.2?<a href='/constructor/true'>true</a> non_contacts:flags.3?<a href='/constructor/true'>true</a> exclude_selected:flags.5?<a href='/constructor/true'>true</a> users:flags.4?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/long'>long</a>&gt; = <a href='/type/BusinessRecipients'>BusinessRecipients</a>;
<a href='/constructor/businessGreetingMessage'>businessGreetingMessage</a>#e519abab shortcut_id:<a href='/type/int'>int</a> recipients:<a href='/type/BusinessRecipients'>BusinessRecipients</a> no_activity_days:<a href='/type/int'>int</a> = <a href='/type/BusinessGreetingMessage'>BusinessGreetingMessage</a>;
<a href='/constructor/userFull'>userFull</a>#cc997720 flags:<a href='/type/%23'>#</a> blocked:flags.0?<a href='/constructor/true'>true</a> phone_calls_available:flags.4?<a href='/constructor/true'>true</a> phone_calls_private:flags.5?<a href='/constructor/true'>true</a> can_pin_message:flags.7?<a href='/constructor/true'>true</a> has_scheduled:flags.12?<a href='/constructor/true'>true</a> video_calls_available:flags.13?<a href='/constructor/true'>true</a> voice_messages_forbidden:flags.20?<a href='/constructor/true'>true</a> translations_disabled:flags.23?<a href='/constructor/true'>true</a> stories_pinned_available:flags.26?<a href='/constructor/true'>true</a> blocked_my_stories_from:flags.27?<a href='/constructor/true'>true</a> wallpaper_overridden:flags.28?<a href='/constructor/true'>true</a> contact_require_premium:flags.29?<a href='/constructor/true'>true</a> read_dates_private:flags.30?<a href='/constructor/true'>true</a> flags2:<a href='/type/%23'>#</a> sponsored_enabled:flags2.7?<a href='/constructor/true'>true</a> id:<a href='/type/long'>long</a> about:flags.1?<a href='/type/string'>string</a> settings:<a href='/type/PeerSettings'>PeerSettings</a> personal_photo:flags.21?<a href='/type/Photo'>Photo</a> profile_photo:flags.2?<a href='/type/Photo'>Photo</a> fallback_photo:flags.22?<a href='/type/Photo'>Photo</a> notify_settings:<a href='/type/PeerNotifySettings'>PeerNotifySettings</a> bot_info:flags.3?<a href='/type/BotInfo'>BotInfo</a> pinned_msg_id:flags.6?<a href='/type/int'>int</a> common_chats_count:<a href='/type/int'>int</a> folder_id:flags.11?<a href='/type/int'>int</a> ttl_period:flags.14?<a href='/type/int'>int</a> theme_emoticon:flags.15?<a href='/type/string'>string</a> private_forward_name:flags.16?<a href='/type/string'>string</a> bot_group_admin_rights:flags.17?<a href='/type/ChatAdminRights'>ChatAdminRights</a> bot_broadcast_admin_rights:flags.18?<a href='/type/ChatAdminRights'>ChatAdminRights</a> premium_gifts:flags.19?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/PremiumGiftOption'>PremiumGiftOption</a>&gt; wallpaper:flags.24?<a href='/type/WallPaper'>WallPaper</a> stories:flags.25?<a href='/type/PeerStories'>PeerStories</a> business_work_hours:flags2.0?<a href='/type/BusinessWorkHours'>BusinessWorkHours</a> business_location:flags2.1?<a href='/type/BusinessLocation'>BusinessLocation</a> business_greeting_message:flags2.2?<a href='/type/BusinessGreetingMessage'>BusinessGreetingMessage</a> business_away_message:flags2.3?<a href='/type/BusinessAwayMessage'>BusinessAwayMessage</a> business_intro:flags2.4?<a href='/type/BusinessIntro'>BusinessIntro</a> birthday:flags2.5?<a href='/type/Birthday'>Birthday</a> personal_channel_id:flags2.6?<a href='/type/long'>long</a> personal_channel_message:flags2.6?<a href='/type/int'>int</a> = <a href='/type/UserFull'>UserFull</a>;
---functions---
<a href='/method/account.updateBusinessGreetingMessage'>account.updateBusinessGreetingMessage</a>#66cdafc4 flags:<a href='/type/%23'>#</a> message:flags.0?<a href='/type/InputBusinessGreetingMessage'>InputBusinessGreetingMessage</a> = <a href='/type/Bool'>Bool</a>;</code></pre>
<p>Telegram Business allows to configure a set of greeting messages, automatically sent to new users writing to us in private for the first time, or after a certain inactivity period. </p>
<p>Use <a href="/method/account.updateBusinessGreetingMessage">account.updateBusinessGreetingMessage</a> to set a (list of) greeting messages in <code>message</code>; to disable greetings, call the method without populating the <code>message</code> field. </p>
<p>If populated, the <code>message</code> field must contain a <a href="/constructor/inputBusinessGreetingMessage">inputBusinessGreetingMessage</a>, see <a href="/constructor/inputBusinessGreetingMessage">the constructor page »</a> for a description of its contents. </p>
<p>The currently configured business greeting can be fetched by the current user through <a href="/constructor/userFull">userFull</a>.<code>business_greeting_message</code>, represented by a <a href="/constructor/businessGreetingMessage">businessGreetingMessage constructor »</a>, equivalent to the input counterpart. </p>
<h3><a class="anchor" href="#away-messages" id="away-messages" name="away-messages"><i class="anchor-icon"></i></a>Away messages</h3>
<pre><code><a href='/constructor/inputBusinessRecipients'>inputBusinessRecipients</a>#6f8b32aa flags:<a href='/type/%23'>#</a> existing_chats:flags.0?<a href='/constructor/true'>true</a> new_chats:flags.1?<a href='/constructor/true'>true</a> contacts:flags.2?<a href='/constructor/true'>true</a> non_contacts:flags.3?<a href='/constructor/true'>true</a> exclude_selected:flags.5?<a href='/constructor/true'>true</a> users:flags.4?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/InputUser'>InputUser</a>&gt; = <a href='/type/InputBusinessRecipients'>InputBusinessRecipients</a>;
<a href='/constructor/businessAwayMessageScheduleAlways'>businessAwayMessageScheduleAlways</a>#c9b9e2b9 = <a href='/type/BusinessAwayMessageSchedule'>BusinessAwayMessageSchedule</a>;
<a href='/constructor/businessAwayMessageScheduleOutsideWorkHours'>businessAwayMessageScheduleOutsideWorkHours</a>#c3f2f501 = <a href='/type/BusinessAwayMessageSchedule'>BusinessAwayMessageSchedule</a>;
<a href='/constructor/businessAwayMessageScheduleCustom'>businessAwayMessageScheduleCustom</a>#cc4d9ecc start_date:<a href='/type/int'>int</a> end_date:<a href='/type/int'>int</a> = <a href='/type/BusinessAwayMessageSchedule'>BusinessAwayMessageSchedule</a>;
<a href='/constructor/inputBusinessAwayMessage'>inputBusinessAwayMessage</a>#832175e0 flags:<a href='/type/%23'>#</a> offline_only:flags.0?<a href='/constructor/true'>true</a> shortcut_id:<a href='/type/int'>int</a> schedule:<a href='/type/BusinessAwayMessageSchedule'>BusinessAwayMessageSchedule</a> recipients:<a href='/type/InputBusinessRecipients'>InputBusinessRecipients</a> = <a href='/type/InputBusinessAwayMessage'>InputBusinessAwayMessage</a>;
<a href='/constructor/businessRecipients'>businessRecipients</a>#21108ff7 flags:<a href='/type/%23'>#</a> existing_chats:flags.0?<a href='/constructor/true'>true</a> new_chats:flags.1?<a href='/constructor/true'>true</a> contacts:flags.2?<a href='/constructor/true'>true</a> non_contacts:flags.3?<a href='/constructor/true'>true</a> exclude_selected:flags.5?<a href='/constructor/true'>true</a> users:flags.4?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/long'>long</a>&gt; = <a href='/type/BusinessRecipients'>BusinessRecipients</a>;
<a href='/constructor/businessAwayMessage'>businessAwayMessage</a>#ef156a5c flags:<a href='/type/%23'>#</a> offline_only:flags.0?<a href='/constructor/true'>true</a> shortcut_id:<a href='/type/int'>int</a> schedule:<a href='/type/BusinessAwayMessageSchedule'>BusinessAwayMessageSchedule</a> recipients:<a href='/type/BusinessRecipients'>BusinessRecipients</a> = <a href='/type/BusinessAwayMessage'>BusinessAwayMessage</a>;
<a href='/constructor/userFull'>userFull</a>#cc997720 flags:<a href='/type/%23'>#</a> blocked:flags.0?<a href='/constructor/true'>true</a> phone_calls_available:flags.4?<a href='/constructor/true'>true</a> phone_calls_private:flags.5?<a href='/constructor/true'>true</a> can_pin_message:flags.7?<a href='/constructor/true'>true</a> has_scheduled:flags.12?<a href='/constructor/true'>true</a> video_calls_available:flags.13?<a href='/constructor/true'>true</a> voice_messages_forbidden:flags.20?<a href='/constructor/true'>true</a> translations_disabled:flags.23?<a href='/constructor/true'>true</a> stories_pinned_available:flags.26?<a href='/constructor/true'>true</a> blocked_my_stories_from:flags.27?<a href='/constructor/true'>true</a> wallpaper_overridden:flags.28?<a href='/constructor/true'>true</a> contact_require_premium:flags.29?<a href='/constructor/true'>true</a> read_dates_private:flags.30?<a href='/constructor/true'>true</a> flags2:<a href='/type/%23'>#</a> sponsored_enabled:flags2.7?<a href='/constructor/true'>true</a> id:<a href='/type/long'>long</a> about:flags.1?<a href='/type/string'>string</a> settings:<a href='/type/PeerSettings'>PeerSettings</a> personal_photo:flags.21?<a href='/type/Photo'>Photo</a> profile_photo:flags.2?<a href='/type/Photo'>Photo</a> fallback_photo:flags.22?<a href='/type/Photo'>Photo</a> notify_settings:<a href='/type/PeerNotifySettings'>PeerNotifySettings</a> bot_info:flags.3?<a href='/type/BotInfo'>BotInfo</a> pinned_msg_id:flags.6?<a href='/type/int'>int</a> common_chats_count:<a href='/type/int'>int</a> folder_id:flags.11?<a href='/type/int'>int</a> ttl_period:flags.14?<a href='/type/int'>int</a> theme_emoticon:flags.15?<a href='/type/string'>string</a> private_forward_name:flags.16?<a href='/type/string'>string</a> bot_group_admin_rights:flags.17?<a href='/type/ChatAdminRights'>ChatAdminRights</a> bot_broadcast_admin_rights:flags.18?<a href='/type/ChatAdminRights'>ChatAdminRights</a> premium_gifts:flags.19?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/PremiumGiftOption'>PremiumGiftOption</a>&gt; wallpaper:flags.24?<a href='/type/WallPaper'>WallPaper</a> stories:flags.25?<a href='/type/PeerStories'>PeerStories</a> business_work_hours:flags2.0?<a href='/type/BusinessWorkHours'>BusinessWorkHours</a> business_location:flags2.1?<a href='/type/BusinessLocation'>BusinessLocation</a> business_greeting_message:flags2.2?<a href='/type/BusinessGreetingMessage'>BusinessGreetingMessage</a> business_away_message:flags2.3?<a href='/type/BusinessAwayMessage'>BusinessAwayMessage</a> business_intro:flags2.4?<a href='/type/BusinessIntro'>BusinessIntro</a> birthday:flags2.5?<a href='/type/Birthday'>Birthday</a> personal_channel_id:flags2.6?<a href='/type/long'>long</a> personal_channel_message:flags2.6?<a href='/type/int'>int</a> = <a href='/type/UserFull'>UserFull</a>;
---functions---
<a href='/method/account.updateBusinessAwayMessage'>account.updateBusinessAwayMessage</a>#a26a7fa5 flags:<a href='/type/%23'>#</a> message:flags.0?<a href='/type/InputBusinessAwayMessage'>InputBusinessAwayMessage</a> = <a href='/type/Bool'>Bool</a>;</code></pre>
<p>Telegram Business allows to configure a set of "away" messages, automatically sent to users writing to us when we're offline, during closing hours, while we're on vacation, or in some other custom time period when we cannot immediately answer to the user. </p>
<p>Use <a href="/method/account.updateBusinessAwayMessage">account.updateBusinessAwayMessage</a> to set a (list of) away messages in <code>message</code>; to disable greetings, call the method without populating the <code>message</code> field. </p>
<p>If populated, the <code>message</code> field must contain a <a href="/constructor/inputBusinessAwayMessage">inputBusinessAwayMessage</a>, see <a href="/constructor/inputBusinessAwayMessage">the constructor page »</a> for a description of its contents. </p>
<p>The currently configured business away message can be fetched by the current user through <a href="/constructor/userFull">userFull</a>.<code>business_away_message</code>, represented by a <a href="/constructor/businessAwayMessage">businessAwayMessage constructor »</a>, equivalent to the input counterpart.</p></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/privacy">Privacy</a></li>
<li><a href="//telegram.org/press">Press</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/android">Android</a></li>
<li><a href="//telegram.org/dl/web">Mobile Web</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="//core.telegram.org/">Platform</a></h5>
<ul>
<li><a href="//core.telegram.org/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="//core.telegram.org/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/press">Press</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?47"></script>
<script src="/js/jquery.min.js?1"></script>
<script src="/js/bootstrap.min.js?1"></script>
<script>window.initDevPageNav&&initDevPageNav();
backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>

View file

@ -468,13 +468,13 @@
<li>Added <a href="/constructor/businessLocation">businessLocation</a> - </li>
<li>Added <a href="/constructor/inputBusinessRecipients">inputBusinessRecipients</a> - </li>
<li>Added <a href="/constructor/businessRecipients">businessRecipients</a> - </li>
<li>Added <a href="/constructor/businessAwayMessageScheduleAlways">businessAwayMessageScheduleAlways</a> - </li>
<li>Added <a href="/constructor/businessAwayMessageScheduleOutsideWorkHours">businessAwayMessageScheduleOutsideWorkHours</a> - </li>
<li>Added <a href="/constructor/businessAwayMessageScheduleCustom">businessAwayMessageScheduleCustom</a> - </li>
<li>Added <a href="/constructor/inputBusinessGreetingMessage">inputBusinessGreetingMessage</a> - </li>
<li>Added <a href="/constructor/businessGreetingMessage">businessGreetingMessage</a> - </li>
<li>Added <a href="/constructor/inputBusinessAwayMessage">inputBusinessAwayMessage</a> - </li>
<li>Added <a href="/constructor/businessAwayMessage">businessAwayMessage</a> - </li>
<li>Added <a href="/constructor/businessAwayMessageScheduleAlways">businessAwayMessageScheduleAlways</a> - Always send <a href="/api/business#away-messages">Telegram Business away messages</a> to users writing to us in private.</li>
<li>Added <a href="/constructor/businessAwayMessageScheduleOutsideWorkHours">businessAwayMessageScheduleOutsideWorkHours</a> - Send <a href="/api/business#away-messages">Telegram Business away messages</a> to users writing to us in private outside of the configured <a href="/api/business#opening-hours">Telegram Business working hours</a>.</li>
<li>Added <a href="/constructor/businessAwayMessageScheduleCustom">businessAwayMessageScheduleCustom</a> - Send <a href="/api/business#away-messages">Telegram Business away messages</a> to users writing to us in private in the specified time span.</li>
<li>Added <a href="/constructor/inputBusinessGreetingMessage">inputBusinessGreetingMessage</a> - Describes a <a href="/api/business#greeting-messages">Telegram Business greeting</a>, automatically sent to new users writing to us in private for the first time, or after a certain inactivity period.</li>
<li>Added <a href="/constructor/businessGreetingMessage">businessGreetingMessage</a> - Describes a <a href="/api/business#greeting-messages">Telegram Business greeting</a>, automatically sent to new users writing to us in private for the first time, or after a certain inactivity period.</li>
<li>Added <a href="/constructor/inputBusinessAwayMessage">inputBusinessAwayMessage</a> - Describes a <a href="/api/business#away-messages">Telegram Business away message</a>, automatically sent to users writing to us when we're offline, during closing hours, while we're on vacation, or in some other custom time period when we cannot immediately answer to the user.</li>
<li>Added <a href="/constructor/businessAwayMessage">businessAwayMessage</a> - Describes a <a href="/api/business#away-messages">Telegram Business away message</a>, automatically sent to users writing to us when we're offline, during closing hours, while we're on vacation, or in some other custom time period when we cannot immediately answer to the user.</li>
<li>Added <a href="/constructor/timezone">timezone</a> - </li>
<li>Added <a href="/constructor/help.timezonesListNotModified">help.timezonesListNotModified</a> - </li>
<li>Added <a href="/constructor/help.timezonesList">help.timezonesList</a> - </li>

View file

@ -4,10 +4,10 @@
<meta charset="utf-8">
<title>businessAwayMessage</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Describes a Telegram Business away message, automatically sent to users writing to us when we&#39;re offline, during closing">
<meta property="description" content="Describes a Telegram Business away message, automatically sent to users writing to us when we&#39;re offline, during closing hours, while we&#39;re on vacation, or in some other custom time period when we cannot immediately answer to the user.">
<meta property="og:title" content="businessAwayMessage">
<meta property="og:image" content="">
<meta property="og:description" content="Describes a Telegram Business away message, automatically sent to users writing to us when we&#39;re offline, during closing">
<meta property="og:description" content="Describes a Telegram Business away message, automatically sent to users writing to us when we&#39;re offline, during closing hours, while we&#39;re on vacation, or in some other custom time period when we cannot immediately answer to the user.">
<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/businessAwayMessage" >businessAwayMessage</a></li></ul></div>
<h1 id="dev_page_title">businessAwayMessage</h1>
<div id="dev_page_content"><p>Describes a <a href="/api/business#away-messages">Telegram Business away message</a>, automatically sent to users writing to us when we're offline, during closing hours, while we're on vacation, or in some other custom time period when we cannot immediately answer to the user. </p>
<div id="dev_page_content"><p>Describes a <a href="/api/business#away-messages">Telegram Business away message</a>, automatically sent to users writing to us when we're offline, during closing hours, while we're on vacation, or in some other custom time period when we cannot immediately answer to the user.</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>offline_only</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> </td>
<td>If set, the messages will not be sent if the account was online in the last 10 minutes.</td>
</tr>
<tr>
<td><strong>shortcut_id</strong></td>
@ -84,7 +84,7 @@
<tr>
<td><strong>schedule</strong></td>
<td style="text-align: center;"><a href="/type/BusinessAwayMessageSchedule">BusinessAwayMessageSchedule</a></td>
<td> </td>
<td>Specifies when should the away messages be sent.</td>
</tr>
<tr>
<td><strong>recipients</strong></td>
@ -94,7 +94,10 @@
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/BusinessAwayMessage">BusinessAwayMessage</a></p></div>
<p><a href="/type/BusinessAwayMessage">BusinessAwayMessage</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="#business" id="business" name="business"><i class="anchor-icon"></i></a><a href="/api/business">Business</a></h4>
<p>Users can turn their Telegram account into a business account, gaining access to business features such as opening hours, location, quick replies, automated messages, custom start page, chatbot support, and more.</p></div>
</div>

View file

@ -4,16 +4,10 @@
<meta charset="utf-8">
<title>businessAwayMessageScheduleAlways</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Parameters
This constructor does not require any parameters.
Type
BusinessAwayMessageSchedule">
<meta property="description" content="Always send Telegram Business away messages to users writing to us in private.">
<meta property="og:title" content="businessAwayMessageScheduleAlways">
<meta property="og:image" content="">
<meta property="og:description" content="Parameters
This constructor does not require any parameters.
Type
BusinessAwayMessageSchedule">
<meta property="og:description" content="Always send Telegram Business away messages to users writing to us in private.">
<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">
@ -48,7 +42,8 @@ BusinessAwayMessageSchedule">
<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/businessAwayMessageScheduleAlways" >businessAwayMessageScheduleAlways</a></li></ul></div>
<h1 id="dev_page_title">businessAwayMessageScheduleAlways</h1>
<div id="dev_page_content"><p><div class="clearfix">
<div id="dev_page_content"><p>Always send <a href="/api/business#away-messages">Telegram Business away messages</a> to users writing to us in private.</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 181 <b class="caret"></b></a>
@ -64,7 +59,10 @@ BusinessAwayMessageSchedule">
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<p>This constructor does not require any parameters.</p>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/BusinessAwayMessageSchedule">BusinessAwayMessageSchedule</a></p></div>
<p><a href="/type/BusinessAwayMessageSchedule">BusinessAwayMessageSchedule</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="#business" id="business" name="business"><i class="anchor-icon"></i></a><a href="/api/business">Business</a></h4>
<p>Users can turn their Telegram account into a business account, gaining access to business features such as opening hours, location, quick replies, automated messages, custom start page, chatbot support, and more.</p></div>
</div>

View file

@ -4,32 +4,10 @@
<meta charset="utf-8">
<title>businessAwayMessageScheduleCustom</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Parameters
Name
Type
Description
start_date
int
 
end_date
int
 
Type
BusinessAwayMessageSchedule">
<meta property="description" content="Send Telegram Business away messages to users writing to us in private in the specified time span.">
<meta property="og:title" content="businessAwayMessageScheduleCustom">
<meta property="og:image" content="">
<meta property="og:description" content="Parameters
Name
Type
Description
start_date
int
 
end_date
int
 
Type
BusinessAwayMessageSchedule">
<meta property="og:description" content="Send Telegram Business away messages to users writing to us in private in the specified time span.">
<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">
@ -64,7 +42,8 @@ BusinessAwayMessageSchedule">
<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/businessAwayMessageScheduleCustom" >businessAwayMessageScheduleCustom</a></li></ul></div>
<h1 id="dev_page_title">businessAwayMessageScheduleCustom</h1>
<div id="dev_page_content"><p><div class="clearfix">
<div id="dev_page_content"><p>Send <a href="/api/business#away-messages">Telegram Business away messages</a> to users writing to us in private in the specified time span.</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 181 <b class="caret"></b></a>
@ -90,17 +69,20 @@ BusinessAwayMessageSchedule">
<tr>
<td><strong>start_date</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td> </td>
<td>Start date (UNIX timestamp).</td>
</tr>
<tr>
<td><strong>end_date</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td> </td>
<td>End date (UNIX timestamp).</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/BusinessAwayMessageSchedule">BusinessAwayMessageSchedule</a></p></div>
<p><a href="/type/BusinessAwayMessageSchedule">BusinessAwayMessageSchedule</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="#business" id="business" name="business"><i class="anchor-icon"></i></a><a href="/api/business">Business</a></h4>
<p>Users can turn their Telegram account into a business account, gaining access to business features such as opening hours, location, quick replies, automated messages, custom start page, chatbot support, and more.</p></div>
</div>

View file

@ -4,16 +4,10 @@
<meta charset="utf-8">
<title>businessAwayMessageScheduleOutsideWorkHours</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Parameters
This constructor does not require any parameters.
Type
BusinessAwayMessageSchedule">
<meta property="description" content="Send Telegram Business away messages to users writing to us in private outside of the configured Telegram Business working hours.">
<meta property="og:title" content="businessAwayMessageScheduleOutsideWorkHours">
<meta property="og:image" content="">
<meta property="og:description" content="Parameters
This constructor does not require any parameters.
Type
BusinessAwayMessageSchedule">
<meta property="og:description" content="Send Telegram Business away messages to users writing to us in private outside of the configured Telegram Business working hours.">
<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">
@ -48,7 +42,8 @@ BusinessAwayMessageSchedule">
<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/businessAwayMessageScheduleOutsideWorkHours" >businessAwayMessageScheduleOutsideWorkHours</a></li></ul></div>
<h1 id="dev_page_title">businessAwayMessageScheduleOutsideWorkHours</h1>
<div id="dev_page_content"><p><div class="clearfix">
<div id="dev_page_content"><p>Send <a href="/api/business#away-messages">Telegram Business away messages</a> to users writing to us in private outside of the configured <a href="/api/business#opening-hours">Telegram Business working hours</a>.</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 181 <b class="caret"></b></a>
@ -64,7 +59,10 @@ BusinessAwayMessageSchedule">
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<p>This constructor does not require any parameters.</p>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/BusinessAwayMessageSchedule">BusinessAwayMessageSchedule</a></p></div>
<p><a href="/type/BusinessAwayMessageSchedule">BusinessAwayMessageSchedule</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="#business" id="business" name="business"><i class="anchor-icon"></i></a><a href="/api/business">Business</a></h4>
<p>Users can turn their Telegram account into a business account, gaining access to business features such as opening hours, location, quick replies, automated messages, custom start page, chatbot support, and more.</p></div>
</div>

View file

@ -4,38 +4,10 @@
<meta charset="utf-8">
<title>businessGreetingMessage</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Parameters
Name
Type
Description
shortcut_id
int
 
recipients
BusinessRecipients
 
no_activity_days
int
 
Type
Busines…">
<meta property="description" content="Describes a Telegram Business greeting, automatically sent to new users writing to us in private for the first time, or after a certain inactivity period.">
<meta property="og:title" content="businessGreetingMessage">
<meta property="og:image" content="">
<meta property="og:description" content="Parameters
Name
Type
Description
shortcut_id
int
 
recipients
BusinessRecipients
 
no_activity_days
int
 
Type
Busines…">
<meta property="og:description" content="Describes a Telegram Business greeting, automatically sent to new users writing to us in private for the first time, or after a certain inactivity period.">
<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">
@ -70,7 +42,8 @@ Busines…">
<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/businessGreetingMessage" >businessGreetingMessage</a></li></ul></div>
<h1 id="dev_page_title">businessGreetingMessage</h1>
<div id="dev_page_content"><p><div class="clearfix">
<div id="dev_page_content"><p>Describes a <a href="/api/business#greeting-messages">Telegram Business greeting</a>, automatically sent to new users writing to us in private for the first time, or after a certain inactivity period.</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 181 <b class="caret"></b></a>
@ -96,22 +69,25 @@ Busines…">
<tr>
<td><strong>shortcut_id</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td> </td>
<td>ID of a <a href="/api/business#quick-reply-shortcuts">quick reply shorcut, containing the greeting messages to send, see here » for more info</a>.</td>
</tr>
<tr>
<td><strong>recipients</strong></td>
<td style="text-align: center;"><a href="/type/BusinessRecipients">BusinessRecipients</a></td>
<td> </td>
<td>Allowed recipients for the greeting messages.</td>
</tr>
<tr>
<td><strong>no_activity_days</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td> </td>
<td>The number of days after which a private chat will be considered as inactive; currently, must be one of 7, 14, 21, or 28.</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/BusinessGreetingMessage">BusinessGreetingMessage</a></p></div>
<p><a href="/type/BusinessGreetingMessage">BusinessGreetingMessage</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="#business" id="business" name="business"><i class="anchor-icon"></i></a><a href="/api/business">Business</a></h4>
<p>Users can turn their Telegram account into a business account, gaining access to business features such as opening hours, location, quick replies, automated messages, custom start page, chatbot support, and more.</p></div>
</div>

View file

@ -4,34 +4,10 @@
<meta charset="utf-8">
<title>inputBusinessAwayMessage</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Parameters
Name
Type
Description
flags
#
Flags, see TL conditional fields
offline_only
flags.0?true
 
shortcut_id
int
 …">
<meta property="description" content="Describes a Telegram Business away message, automatically sent to users writing to us when we&#39;re offline, during closing hours, while we&#39;re on vacation, or in some other custom time period when we cannot immediately answer to the user.">
<meta property="og:title" content="inputBusinessAwayMessage">
<meta property="og:image" content="">
<meta property="og:description" content="Parameters
Name
Type
Description
flags
#
Flags, see TL conditional fields
offline_only
flags.0?true
 
shortcut_id
int
 …">
<meta property="og:description" content="Describes a Telegram Business away message, automatically sent to users writing to us when we&#39;re offline, during closing hours, while we&#39;re on vacation, or in some other custom time period when we cannot immediately answer to the user.">
<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">
@ -66,7 +42,8 @@ int
<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/inputBusinessAwayMessage" >inputBusinessAwayMessage</a></li></ul></div>
<h1 id="dev_page_title">inputBusinessAwayMessage</h1>
<div id="dev_page_content"><p><div class="clearfix">
<div id="dev_page_content"><p>Describes a <a href="/api/business#away-messages">Telegram Business away message</a>, automatically sent to users writing to us when we're offline, during closing hours, while we're on vacation, or in some other custom time period when we cannot immediately answer to the user.</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 181 <b class="caret"></b></a>
@ -97,27 +74,30 @@ int
<tr>
<td><strong>offline_only</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> </td>
<td>If set, the messages will not be sent if the account was online in the last 10 minutes.</td>
</tr>
<tr>
<td><strong>shortcut_id</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td> </td>
<td>ID of a <a href="/api/business#quick-reply-shortcuts">quick reply shorcut, containing the away messages to send, see here » for more info</a>.</td>
</tr>
<tr>
<td><strong>schedule</strong></td>
<td style="text-align: center;"><a href="/type/BusinessAwayMessageSchedule">BusinessAwayMessageSchedule</a></td>
<td> </td>
<td>Specifies when should the away messages be sent.</td>
</tr>
<tr>
<td><strong>recipients</strong></td>
<td style="text-align: center;"><a href="/type/InputBusinessRecipients">InputBusinessRecipients</a></td>
<td> </td>
<td>Allowed recipients for the away messages.</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/InputBusinessAwayMessage">InputBusinessAwayMessage</a></p></div>
<p><a href="/type/InputBusinessAwayMessage">InputBusinessAwayMessage</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="#business" id="business" name="business"><i class="anchor-icon"></i></a><a href="/api/business">Business</a></h4>
<p>Users can turn their Telegram account into a business account, gaining access to business features such as opening hours, location, quick replies, automated messages, custom start page, chatbot support, and more.</p></div>
</div>

View file

@ -4,38 +4,10 @@
<meta charset="utf-8">
<title>inputBusinessGreetingMessage</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Parameters
Name
Type
Description
shortcut_id
int
 
recipients
InputBusinessRecipients
 
no_activity_days
int
 
Type
In…">
<meta property="description" content="Describes a Telegram Business greeting, automatically sent to new users writing to us in private for the first time, or after a certain inactivity period.">
<meta property="og:title" content="inputBusinessGreetingMessage">
<meta property="og:image" content="">
<meta property="og:description" content="Parameters
Name
Type
Description
shortcut_id
int
 
recipients
InputBusinessRecipients
 
no_activity_days
int
 
Type
In…">
<meta property="og:description" content="Describes a Telegram Business greeting, automatically sent to new users writing to us in private for the first time, or after a certain inactivity period.">
<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">
@ -70,7 +42,8 @@ In…">
<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/inputBusinessGreetingMessage" >inputBusinessGreetingMessage</a></li></ul></div>
<h1 id="dev_page_title">inputBusinessGreetingMessage</h1>
<div id="dev_page_content"><p><div class="clearfix">
<div id="dev_page_content"><p>Describes a <a href="/api/business#greeting-messages">Telegram Business greeting</a>, automatically sent to new users writing to us in private for the first time, or after a certain inactivity period.</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 181 <b class="caret"></b></a>
@ -96,22 +69,25 @@ In…">
<tr>
<td><strong>shortcut_id</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td> </td>
<td>ID of a <a href="/api/business#quick-reply-shortcuts">quick reply shorcut, containing the greeting messages to send, see here » for more info</a>.</td>
</tr>
<tr>
<td><strong>recipients</strong></td>
<td style="text-align: center;"><a href="/type/InputBusinessRecipients">InputBusinessRecipients</a></td>
<td> </td>
<td>Allowed recipients for the greeting messages.</td>
</tr>
<tr>
<td><strong>no_activity_days</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td> </td>
<td>The number of days after which a private chat will be considered as inactive; currently, must be one of 7, 14, 21, or 28.</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/InputBusinessGreetingMessage">InputBusinessGreetingMessage</a></p></div>
<p><a href="/type/InputBusinessGreetingMessage">InputBusinessGreetingMessage</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="#business" id="business" name="business"><i class="anchor-icon"></i></a><a href="/api/business">Business</a></h4>
<p>Users can turn their Telegram account into a business account, gaining access to business features such as opening hours, location, quick replies, automated messages, custom start page, chatbot support, and more.</p></div>
</div>

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 EC 1D 03 00 F3 53 80 66
0010 | 14 00 00 00 F1 8E 7E BE 4F FD 74 02 5B 71 15 B1
0020 | 79 D5 22 08 0D 95 26 F7</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 98 B3 03 00 E0 7A 81 66
0010 | 14 00 00 00 F1 8E 7E BE E5 13 A2 1E BE 09 99 3F
0020 | 92 7E B1 38 D8 5B 28 87</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>EC1D0300F3538066</code></td>
<td><code>98B30300E07A8166</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>4FFD74025B7115B179D522080D9526F7</code></td>
<td><code>E513A21EBE09993F927EB138D85B2887</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 68 13 0F F4 53 80 66
0010 | 94 00 00 00 63 24 16 05 4F FD 74 02 5B 71 15 B1
0020 | 79 D5 22 08 0D 95 26 F7 E4 0E E9 C2 E3 06 43 7D
0030 | 43 DE 4B 90 FA 2E 32 84 08 14 EF 2A 74 5F 64 09
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 60 4B 47 E0 7A 81 66
0010 | 80 00 00 00 63 24 16 05 E5 13 A2 1E BE 09 99 3F
0020 | 92 7E B1 38 D8 5B 28 87 20 8C D9 6C 6E 2E A8 51
0030 | CC 03 32 86 E4 9C 99 E8 08 13 58 38 91 7A 18 0D
0040 | 95 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>0168130FF4538066</code></td>
<td><code>01604B47E07A8166</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>94000000</code> (148 in decimal)</td>
<td><code>80000000</code> (128 in decimal)</td>
<td>Message body length</td>
</tr>
<tr>
@ -150,19 +150,19 @@
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>4FFD74025B7115B179D522080D9526F7</code></td>
<td><code>E513A21EBE09993F927EB138D85B2887</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>E40EE9C2E306437D43DE4B90FA2E3284</code></td>
<td><code>208CD96C6E2EA851CC033286E49C99E8</code></td>
<td>Server-generated random number</td>
</tr>
<tr>
<td>pq</td>
<td>56, 12</td>
<td><code>0814EF2A745F640917000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1508471079497369879</td>
<td><code>08135838917A180D95000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1393926282140978581</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 = 1508471079497369879</code></pre>
<p>Decompose into 2 prime cofactors <code>p &lt; q</code>: <code>1508471079497369879 = 1108947353 * 1360272943</code></p>
<pre><code>p = 1108947353
q = 1360272943</code></pre>
<pre><code>pq = 1393926282140978581</code></pre>
<p>Decompose into 2 prime cofactors <code>p &lt; q</code>: <code>1393926282140978581 = 1068871513 * 1304110237</code></p>
<pre><code>p = 1068871513
q = 1304110237</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 14 EF 2A 74 5F 64 09 17 00 00 00
0010 | 04 42 19 31 99 00 00 00 04 51 14 1E 2F 00 00 00
0020 | 4F FD 74 02 5B 71 15 B1 79 D5 22 08 0D 95 26 F7
0030 | E4 0E E9 C2 E3 06 43 7D 43 DE 4B 90 FA 2E 32 84
0040 | BD BC 63 F1 0B 3D C4 09 83 10 E1 54 DA C9 DF 85
0050 | 02 35 69 44 47 C6 38 AD 3C ED B8 D2 18 AB B0 22
<pre><code>0000 | 95 5F F5 A9 08 13 58 38 91 7A 18 0D 95 00 00 00
0010 | 04 3F B5 AF 59 00 00 00 04 4D BB 24 9D 00 00 00
0020 | E5 13 A2 1E BE 09 99 3F 92 7E B1 38 D8 5B 28 87
0030 | 20 8C D9 6C 6E 2E A8 51 CC 03 32 86 E4 9C 99 E8
0040 | A9 5E 45 9C F0 31 60 8C F1 4A 59 23 05 A3 2D 8D
0050 | B7 9E A2 79 FE 81 78 7A 01 9A 35 8D 4D 35 DD C6
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 = 1360272943</code></pre>
<tr>
<td>pq</td>
<td>4, 12</td>
<td><code>0814EF2A745F640917000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1508471079497369879</td>
<td><code>08135838917A180D95000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1393926282140978581</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>0442193199000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1108947353</td>
<td><code>043FB5AF59000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1068871513</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>0451141E2F000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1360272943</td>
<td><code>044DBB249D000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1304110237</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>4FFD74025B7115B179D522080D9526F7</code></td>
<td><code>E513A21EBE09993F927EB138D85B2887</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>48, 16</td>
<td><code>E40EE9C2E306437D43DE4B90FA2E3284</code></td>
<td><code>208CD96C6E2EA851CC033286E49C99E8</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>new_nonce</td>
<td>64, 32</td>
<td><code>BDBC63F10B3DC4098310E154DAC9DF85</code> <code>0235694447C638AD3CEDB8D218ABB022</code></td>
<td><code>A95E459CF031608CF14A592305A32D8D</code> <code>B79EA279FE81787A019A358D4D35DDC6</code></td>
<td>Client-generated random number</td>
</tr>
<tr>
@ -291,39 +291,39 @@ q = 1360272943</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 = 955FF5A90814EF2A745F64091700000004421931990000000451141E2F0000004FFD74025B7115B179D522080D9526F7E40EE9C2E306437D43DE4B90FA2E3284BDBC63F10B3DC4098310E154DAC9DF850235694447C638AD3CEDB8D218ABB02202000000
random_padding_bytes = 516F5D77E67E28DEFAEEDBA1B2C7650CA2CB432393C59E0506AEC3C022B4564F44051CBCEDAF8853E518A636B450714323C34E2464E7011AB94A3CC1C49F0AE2F54B56966BF521C8A3E76F3F3C878E8B55CA9FC00983D10BEB05CC1E</code></pre>
<pre><code>data = 955FF5A908135838917A180D95000000043FB5AF59000000044DBB249D000000E513A21EBE09993F927EB138D85B2887208CD96C6E2EA851CC033286E49C99E8A95E459CF031608CF14A592305A32D8DB79EA279FE81787A019A358D4D35DDC602000000
random_padding_bytes = D8C09583EA4ADB0247123F26F250522B8E0B2D6E39417C454EE9E3D0F0AAF926554F8BBA26D35B12FB3AE2FF7F02A5BA049AA04BE4C19308C4C01CDB55785B46C40EAAFD1EFF1E9DB88337C0D24D5A0B6AA9E18AC10B6FD1E32FD52D</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 = 3EE03E231A32A07D7BEECD03B7F7771BED69FA523363BE5E9E374608F0B42FAACBFB344A1A8760FCF4C0DA7F70540550ED7B434E5C6CA8F0D3F21E5B0126ECA7D4F2A4B4F4A6987470916534BFAF1C474020D78EAD8E3B82C4F6D0AF951F439B7D63DFB3D556347192E1D4506D546045D85E7D16316971C2422AB64E98FCA4C16994F878C2DCC8823F907FDCC4AD024E12E08B58FCFAE13E74B4D578248C179B571C5C3DDE6DDACFE4F4CF5AE02FFCA3E8216CCB2450FF2214C80A5898B80BB51AB3C54CDBF5244A8E4F4035E6B716E94BC4CF11EE82E9F491E77B5124AC651E1C58F0ACF982AC8EF5824EFE22252FA49F3750259E751DB8A5E715714722B857</code></pre>
<pre><code>encrypted_data = 6C642CD629ABA36B314453C6F3788A4F0BD3590AE3E37352874E4C96E272F85A7E097CB6D8B7F902C4B32273CD88DBA77F936F84B86A402F720CBF4C1137B32439D6474D3A103E1EAE3D3E37C49FC4CBEE3ED4A953790F8EB01921203BE521BC909D3167C1598A45D5FAE98F988CF3581B85F107F29C194754CC4357AE44ED60672CC93821995759AF9F654CA33A36EF117C59A2F3ABC7BB7D5C9A20A37853C59858C77E7CFA1761C2551161D1439BB00AD9C56F783CB1A11D0FEF236800F223846C9A8293C1F21DEFB71BB6BD76405DE10F0182E4A30F4A858FE4681F46289C2CE371311B3CC1351DAA2BCB8D4433BA588182A555ED3B159FDAB53391373954</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 44 AA 09 00 F4 53 80 66
0010 | 40 01 00 00 BE E4 12 D7 4F FD 74 02 5B 71 15 B1
0020 | 79 D5 22 08 0D 95 26 F7 E4 0E E9 C2 E3 06 43 7D
0030 | 43 DE 4B 90 FA 2E 32 84 04 42 19 31 99 00 00 00
0040 | 04 51 14 1E 2F 00 00 00 85 FD 64 DE 85 1D 9D D0
0050 | FE 00 01 00 3E E0 3E 23 1A 32 A0 7D 7B EE CD 03
0060 | B7 F7 77 1B ED 69 FA 52 33 63 BE 5E 9E 37 46 08
0070 | F0 B4 2F AA CB FB 34 4A 1A 87 60 FC F4 C0 DA 7F
0080 | 70 54 05 50 ED 7B 43 4E 5C 6C A8 F0 D3 F2 1E 5B
0090 | 01 26 EC A7 D4 F2 A4 B4 F4 A6 98 74 70 91 65 34
00A0 | BF AF 1C 47 40 20 D7 8E AD 8E 3B 82 C4 F6 D0 AF
00B0 | 95 1F 43 9B 7D 63 DF B3 D5 56 34 71 92 E1 D4 50
00C0 | 6D 54 60 45 D8 5E 7D 16 31 69 71 C2 42 2A B6 4E
00D0 | 98 FC A4 C1 69 94 F8 78 C2 DC C8 82 3F 90 7F DC
00E0 | C4 AD 02 4E 12 E0 8B 58 FC FA E1 3E 74 B4 D5 78
00F0 | 24 8C 17 9B 57 1C 5C 3D DE 6D DA CF E4 F4 CF 5A
0100 | E0 2F FC A3 E8 21 6C CB 24 50 FF 22 14 C8 0A 58
0110 | 98 B8 0B B5 1A B3 C5 4C DB F5 24 4A 8E 4F 40 35
0120 | E6 B7 16 E9 4B C4 CF 11 EE 82 E9 F4 91 E7 7B 51
0130 | 24 AC 65 1E 1C 58 F0 AC F9 82 AC 8E F5 82 4E FE
0140 | 22 25 2F A4 9F 37 50 25 9E 75 1D B8 A5 E7 15 71
0150 | 47 22 B8 57</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 60 DF 03 00 E0 7A 81 66
0010 | 40 01 00 00 BE E4 12 D7 E5 13 A2 1E BE 09 99 3F
0020 | 92 7E B1 38 D8 5B 28 87 20 8C D9 6C 6E 2E A8 51
0030 | CC 03 32 86 E4 9C 99 E8 04 3F B5 AF 59 00 00 00
0040 | 04 4D BB 24 9D 00 00 00 85 FD 64 DE 85 1D 9D D0
0050 | FE 00 01 00 6C 64 2C D6 29 AB A3 6B 31 44 53 C6
0060 | F3 78 8A 4F 0B D3 59 0A E3 E3 73 52 87 4E 4C 96
0070 | E2 72 F8 5A 7E 09 7C B6 D8 B7 F9 02 C4 B3 22 73
0080 | CD 88 DB A7 7F 93 6F 84 B8 6A 40 2F 72 0C BF 4C
0090 | 11 37 B3 24 39 D6 47 4D 3A 10 3E 1E AE 3D 3E 37
00A0 | C4 9F C4 CB EE 3E D4 A9 53 79 0F 8E B0 19 21 20
00B0 | 3B E5 21 BC 90 9D 31 67 C1 59 8A 45 D5 FA E9 8F
00C0 | 98 8C F3 58 1B 85 F1 07 F2 9C 19 47 54 CC 43 57
00D0 | AE 44 ED 60 67 2C C9 38 21 99 57 59 AF 9F 65 4C
00E0 | A3 3A 36 EF 11 7C 59 A2 F3 AB C7 BB 7D 5C 9A 20
00F0 | A3 78 53 C5 98 58 C7 7E 7C FA 17 61 C2 55 11 61
0100 | D1 43 9B B0 0A D9 C5 6F 78 3C B1 A1 1D 0F EF 23
0110 | 68 00 F2 23 84 6C 9A 82 93 C1 F2 1D EF B7 1B B6
0120 | BD 76 40 5D E1 0F 01 82 E4 A3 0F 4A 85 8F E4 68
0130 | 1F 46 28 9C 2C E3 71 31 1B 3C C1 35 1D AA 2B CB
0140 | 8D 44 33 BA 58 81 82 A5 55 ED 3B 15 9F DA B5 33
0150 | 91 37 39 54</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 = 516F5D77E67E28DEFAEEDBA1B2C7650CA2CB432393C59E0506AEC3C02
<tr>
<td>message_id</td>
<td>8, 8</td>
<td><code>44AA0900F4538066</code></td>
<td><code>60DF0300E07A8166</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 = 516F5D77E67E28DEFAEEDBA1B2C7650CA2CB432393C59E0506AEC3C02
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>4FFD74025B7115B179D522080D9526F7</code></td>
<td><code>E513A21EBE09993F927EB138D85B2887</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>E40EE9C2E306437D43DE4B90FA2E3284</code></td>
<td><code>208CD96C6E2EA851CC033286E49C99E8</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>p</td>
<td>56, 8</td>
<td><code>0442193199000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1108947353</td>
<td><code>043FB5AF59000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1068871513</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>0451141E2F000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1360272943</td>
<td><code>044DBB249D000000</code><br>TL byte deserialization <br>=&gt; bigendian conversion to decimal<br>=&gt; 1304110237</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 = 516F5D77E67E28DEFAEEDBA1B2C7650CA2CB432393C59E0506AEC3C02
<tr>
<td>encrypted_data</td>
<td>80, 260</td>
<td><code>FE0001003EE03E231A32A07D7BEECD03</code> <code>B7F7771BED69FA523363BE5E9E374608</code> <code>F0B42FAACBFB344A1A8760FCF4C0DA7F</code> <code>70540550ED7B434E5C6CA8F0D3F21E5B</code> <code>0126ECA7D4F2A4B4F4A6987470916534</code> <code>BFAF1C474020D78EAD8E3B82C4F6D0AF</code> <code>951F439B7D63DFB3D556347192E1D450</code> <code>6D546045D85E7D16316971C2422AB64E</code> <code>98FCA4C16994F878C2DCC8823F907FDC</code> <code>C4AD024E12E08B58FCFAE13E74B4D578</code> <code>248C179B571C5C3DDE6DDACFE4F4CF5A</code> <code>E02FFCA3E8216CCB2450FF2214C80A58</code> <code>98B80BB51AB3C54CDBF5244A8E4F4035</code> <code>E6B716E94BC4CF11EE82E9F491E77B51</code> <code>24AC651E1C58F0ACF982AC8EF5824EFE</code> <code>22252FA49F3750259E751DB8A5E71571</code><br> <code>4722B857</code></td>
<td><code>FE0001006C642CD629ABA36B314453C6</code> <code>F3788A4F0BD3590AE3E37352874E4C96</code> <code>E272F85A7E097CB6D8B7F902C4B32273</code> <code>CD88DBA77F936F84B86A402F720CBF4C</code> <code>1137B32439D6474D3A103E1EAE3D3E37</code> <code>C49FC4CBEE3ED4A953790F8EB0192120</code> <code>3BE521BC909D3167C1598A45D5FAE98F</code> <code>988CF3581B85F107F29C194754CC4357</code> <code>AE44ED60672CC93821995759AF9F654C</code> <code>A33A36EF117C59A2F3ABC7BB7D5C9A20</code> <code>A37853C59858C77E7CFA1761C2551161</code> <code>D1439BB00AD9C56F783CB1A11D0FEF23</code> <code>6800F223846C9A8293C1F21DEFB71BB6</code> <code>BD76405DE10F0182E4A30F4A858FE468</code> <code>1F46289C2CE371311B3CC1351DAA2BCB</code> <code>8D4433BA588182A555ED3B159FDAB533</code><br> <code>91373954</code></td>
<td>Value generated above</td>
</tr>
</tbody>
@ -402,47 +402,47 @@ random_padding_bytes = 516F5D77E67E28DEFAEEDBA1B2C7650CA2CB432393C59E0506AEC3C02
<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 A0 72 C6 F4 53 80 66
0010 | A8 02 00 00 5C 07 E8 D0 4F FD 74 02 5B 71 15 B1
0020 | 79 D5 22 08 0D 95 26 F7 E4 0E E9 C2 E3 06 43 7D
0030 | 43 DE 4B 90 FA 2E 32 84 FE 50 02 00 79 DB 14 50
0040 | 50 CC 2B 86 8B D7 B9 93 C6 2D 97 95 90 68 0B 67
0050 | E8 D3 E4 44 5B E6 90 EB 75 DE 7B 63 1E E4 99 22
0060 | 3D 61 B2 36 CE 9D E1 7F 54 FA D9 58 B7 9E D2 B1
0070 | 95 EF F9 FE AE BB C8 29 64 C5 E9 DA 98 38 26 13
0080 | 5F 09 E4 E1 BF C6 41 0B B7 D2 E3 47 AD FE 0F F2
0090 | 7A 9B A3 99 77 F7 D3 01 8C 64 DD 8B 62 3D 44 71
00A0 | C9 59 9B 65 D2 6E BB E4 65 6A F8 31 B2 C0 34 28
00B0 | 38 5A 9A D4 6C FB 04 80 11 81 57 27 76 4C 0E FF
00C0 | 86 8E FB 6B 0E EE 13 9A E1 1E DD C7 52 72 00 F1
00D0 | E5 C4 90 2F DA C3 3C FE 69 15 C0 BE 59 F5 22 6C
00E0 | 32 E9 A2 6D E3 19 51 91 95 93 E7 21 94 BC 1C E7
00F0 | E3 38 06 5E A0 63 65 1E C3 70 47 E0 FD 60 36 52
0100 | B6 E0 FF 49 3B C0 AB C3 84 22 1E 8F 05 3B E0 36
0110 | 8A 69 1F 2E AC 9E 20 83 3A 60 A8 00 33 CE CD F0
0120 | 8A 95 71 8A 63 52 F2 9A 4C DD 89 2A 3B 19 81 BF
0130 | 1A FB E4 77 44 B5 93 F3 C4 45 AD 2B 81 48 6D 1F
0140 | 89 EA 50 79 69 40 8D CC 17 9A 1E 66 7C 0C E8 0A
0150 | 13 8F 52 F6 41 34 DF 19 C9 B0 56 7F 67 28 DA 58
0160 | 3A 9E F4 E7 5B EF 79 BC 5F 09 E3 CC 10 E8 5A A8
0170 | 2B 49 A7 F2 AD 3F 8C F4 88 44 B4 C5 84 F7 FB 05
0180 | CF 0F 74 13 38 F8 62 77 D5 8F 3B B3 5C 96 0A 0C
0190 | 8F DE 2E 96 67 88 03 BC 3E EF E1 6D 8B C9 93 E5
01A0 | 80 AC 60 3D E8 CB E1 E5 5A D8 EC A7 56 1B 61 BC
01B0 | F1 6D 6B 9A A7 0A A6 83 CA A3 D2 9D 3E 0F 76 BA
01C0 | B3 D9 A9 B0 15 F3 88 64 57 E8 C7 62 E6 26 20 81
01D0 | AD D1 3C E4 EA 8D EB 19 90 F7 84 F1 C8 09 8C C0
01E0 | E7 59 37 FC 4D 3A D0 22 ED 28 2A 0F 2F 22 C4 66
01F0 | 38 FC 20 7B 43 5B 2D 33 3D 87 9A 9A 82 03 BE EB
0200 | 99 8F 90 B2 C4 A2 04 37 53 16 31 73 BE B4 F2 4C
0210 | 37 5C A7 BF 6F C1 90 E9 FE 2D ED A0 89 06 9A 6B
0220 | 2E 02 08 66 59 06 33 70 18 59 1D C3 7C B9 A3 69
0230 | CF A0 35 E5 92 4C 3F 2E BE 5A BB 9B 87 9B 44 0E
0240 | 27 FB FF 6A 3A C6 E5 ED E4 4D B1 07 42 E3 37 1D
0250 | FC EB 77 04 4C 35 50 CF BD 15 9B 45 B6 F5 F9 4F
0260 | 94 9D 3F 20 75 1D D3 08 5F CE 20 2B EF 90 8D D5
0270 | 9A 4E 5A F7 AC D1 F1 82 88 31 53 A5 FC 87 15 C4
0280 | C9 94 C4 6B 91 F6 B7 F9 91 53 27 CF</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 C0 8E 01 E1 7A 81 66
0010 | 78 02 00 00 5C 07 E8 D0 E5 13 A2 1E BE 09 99 3F
0020 | 92 7E B1 38 D8 5B 28 87 20 8C D9 6C 6E 2E A8 51
0030 | CC 03 32 86 E4 9C 99 E8 FE 50 02 00 68 FC 5F BB
0040 | 57 8C CB D0 EB 73 57 A6 55 48 20 75 3B F9 EF 11
0050 | 79 55 67 43 9E 7C DE 07 52 3F 9A 51 44 5B 2A BA
0060 | 4E B2 4D FF DA DE CF 4F EE 2F AD 49 72 71 4E 35
0070 | FC 82 C3 87 C1 23 BE 80 72 0B 71 58 C7 DB 5E 9C
0080 | 54 EF D5 3F F5 55 14 45 56 A7 5B 8F 91 61 A1 5A
0090 | 50 23 CE 68 2F 13 08 E3 44 0D B9 E9 AC DC 7F 4E
00A0 | 83 52 C0 1C 23 8C 67 B7 5C F9 63 2C 33 75 70 09
00B0 | 70 AA C2 8A BD E8 DB A9 5E 9F 7C DC CB CB 24 EC
00C0 | FB B3 76 7E 28 51 48 7F 3D CA A2 6A 59 3E F5 4C
00D0 | A8 9E 36 2C 41 06 12 03 DC 26 EB D4 27 37 EB B2
00E0 | AF 76 A7 75 97 23 C1 A1 7D D5 28 76 57 92 F0 C8
00F0 | 2F 00 8C E2 A4 D7 C0 2D E0 B4 71 AE 80 77 FF F8
0100 | AA 4C EE 24 99 53 3E 31 4E 88 6E FE 69 44 CD E7
0110 | 3D C9 29 CF 0A 83 43 D5 10 D6 DA 0A CF E2 E8 EE
0120 | 66 48 3E C1 E6 C7 67 19 1C 1F 0C 05 BF D9 91 76
0130 | C1 36 31 D0 7A 6B DF 1B 7C 6C 94 5F 7B A5 EA 70
0140 | EA 08 89 5A 69 12 64 94 6B 00 1D F4 F7 8A 5B 77
0150 | 87 C3 0B 4D 95 AC 8C D4 68 8E EC 52 93 6E A8 46
0160 | FE 4D E6 27 A0 55 1F AD 23 2F 51 CF B8 2C AB E3
0170 | FE 45 26 6F 7D 2B BE F4 BB C8 BE CA 5B 0B 12 13
0180 | CD 97 38 CE AC BF 05 76 AF 54 80 35 8E A7 A5 75
0190 | 83 CC 71 40 35 7F E6 2F 8C 12 86 56 E2 90 16 7F
01A0 | 64 DD 14 58 4F BB 3E 03 81 AD E2 AA 7A D7 12 E8
01B0 | D6 FC CC 1B 3D 23 17 7D 02 18 0B 5A BA FF FA 9B
01C0 | 3E 23 FE FF B2 50 4B C3 9A 99 74 DA CD 0B 91 D9
01D0 | 8E 73 E9 22 D9 60 DF 90 0D 87 56 A7 2C C4 10 16
01E0 | 09 D7 18 5A BD 3E 51 AB 34 45 2A 94 92 A5 CA BF
01F0 | 00 B8 66 D1 24 40 CD 32 40 F1 5A DB A5 D8 15 31
0200 | 77 1E AC 01 3C BB 1F E8 95 E0 71 4A 4D 39 B3 7F
0210 | 4C DB 30 8F 3D 81 CD 39 1D 78 03 A0 14 15 ED 5E
0220 | A0 9A 3F 9E 64 E7 1F DB 5F 68 C4 53 1F CD 21 16
0230 | 6D BE 45 5A C2 E5 40 48 2A 6B 2F 9C 82 76 D3 8B
0240 | B5 16 50 7E 12 FC 6C FF A3 18 B2 99 12 0C 7F C1
0250 | 76 14 F2 99 34 9F 6E B4 5A 9A C0 DB 0D 7D 5B 80
0260 | EE 42 BA C4 20 DD 66 7E 1A 36 D1 C9 BF 84 C8 D5
0270 | A4 9B E6 A4 4F B1 84 3B 2A D3 5E 2A F2 14 80 30
0280 | 85 E2 0D 18 B9 70 5F BB F1 90 00 4E</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 = 516F5D77E67E28DEFAEEDBA1B2C7650CA2CB432393C59E0506AEC3C02
<tr>
<td>message_id</td>
<td>8, 8</td>
<td><code>01A072C6F4538066</code></td>
<td><code>01C08E01E17A8166</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>A8020000</code> (680 in decimal)</td>
<td><code>78020000</code> (632 in decimal)</td>
<td>Message body length</td>
</tr>
<tr>
@ -482,19 +482,19 @@ random_padding_bytes = 516F5D77E67E28DEFAEEDBA1B2C7650CA2CB432393C59E0506AEC3C02
<tr>
<td>nonce</td>
<td>24, 16</td>
<td><code>4FFD74025B7115B179D522080D9526F7</code></td>
<td><code>E513A21EBE09993F927EB138D85B2887</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>E40EE9C2E306437D43DE4B90FA2E3284</code></td>
<td><code>208CD96C6E2EA851CC033286E49C99E8</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>encrypted_answer</td>
<td>56, 596</td>
<td><code>FE50020079DB145050CC2B868BD7B993</code> <code>C62D979590680B67E8D3E4445BE690EB</code> <code>75DE7B631EE499223D61B236CE9DE17F</code> <code>54FAD958B79ED2B195EFF9FEAEBBC829</code> <code>64C5E9DA983826135F09E4E1BFC6410B</code> <code>B7D2E347ADFE0FF27A9BA39977F7D301</code> <code>8C64DD8B623D4471C9599B65D26EBBE4</code> <code>656AF831B2C03428385A9AD46CFB0480</code> <code>11815727764C0EFF868EFB6B0EEE139A</code> <code>E11EDDC7527200F1E5C4902FDAC33CFE</code> <code>6915C0BE59F5226C32E9A26DE3195191</code> <code>9593E72194BC1CE7E338065EA063651E</code> <code>C37047E0FD603652B6E0FF493BC0ABC3</code> <code>84221E8F053BE0368A691F2EAC9E2083</code> <code>3A60A80033CECDF08A95718A6352F29A</code> <code>4CDD892A3B1981BF1AFBE47744B593F3</code> <code>C445AD2B81486D1F89EA507969408DCC</code> <code>179A1E667C0CE80A138F52F64134DF19</code> <code>C9B0567F6728DA583A9EF4E75BEF79BC</code> <code>5F09E3CC10E85AA82B49A7F2AD3F8CF4</code> <code>8844B4C584F7FB05CF0F741338F86277</code> <code>D58F3BB35C960A0C8FDE2E96678803BC</code> <code>3EEFE16D8BC993E580AC603DE8CBE1E5</code> <code>5AD8ECA7561B61BCF16D6B9AA70AA683</code> <code>CAA3D29D3E0F76BAB3D9A9B015F38864</code> <code>57E8C762E6262081ADD13CE4EA8DEB19</code> <code>90F784F1C8098CC0E75937FC4D3AD022</code> <code>ED282A0F2F22C46638FC207B435B2D33</code> <code>3D879A9A8203BEEB998F90B2C4A20437</code> <code>53163173BEB4F24C375CA7BF6FC190E9</code> <code>FE2DEDA089069A6B2E02086659063370</code> <code>18591DC37CB9A369CFA035E5924C3F2E</code> <code>BE5ABB9B879B440E27FBFF6A3AC6E5ED</code> <code>E44DB10742E3371DFCEB77044C3550CF</code> <code>BD159B45B6F5F94F949D3F20751DD308</code> <code>5FCE202BEF908DD59A4E5AF7ACD1F182</code> <code>883153A5FC8715C4C994C46B91F6B7F9</code><br> <code>915327CF</code></td>
<td><code>FE50020068FC5FBB578CCBD0EB7357A6</code> <code>554820753BF9EF11795567439E7CDE07</code> <code>523F9A51445B2ABA4EB24DFFDADECF4F</code> <code>EE2FAD4972714E35FC82C387C123BE80</code> <code>720B7158C7DB5E9C54EFD53FF5551445</code> <code>56A75B8F9161A15A5023CE682F1308E3</code> <code>440DB9E9ACDC7F4E8352C01C238C67B7</code> <code>5CF9632C3375700970AAC28ABDE8DBA9</code> <code>5E9F7CDCCBCB24ECFBB3767E2851487F</code> <code>3DCAA26A593EF54CA89E362C41061203</code> <code>DC26EBD42737EBB2AF76A7759723C1A1</code> <code>7DD528765792F0C82F008CE2A4D7C02D</code> <code>E0B471AE8077FFF8AA4CEE2499533E31</code> <code>4E886EFE6944CDE73DC929CF0A8343D5</code> <code>10D6DA0ACFE2E8EE66483EC1E6C76719</code> <code>1C1F0C05BFD99176C13631D07A6BDF1B</code> <code>7C6C945F7BA5EA70EA08895A69126494</code> <code>6B001DF4F78A5B7787C30B4D95AC8CD4</code> <code>688EEC52936EA846FE4DE627A0551FAD</code> <code>232F51CFB82CABE3FE45266F7D2BBEF4</code> <code>BBC8BECA5B0B1213CD9738CEACBF0576</code> <code>AF5480358EA7A57583CC7140357FE62F</code> <code>8C128656E290167F64DD14584FBB3E03</code> <code>81ADE2AA7AD712E8D6FCCC1B3D23177D</code> <code>02180B5ABAFFFA9B3E23FEFFB2504BC3</code> <code>9A9974DACD0B91D98E73E922D960DF90</code> <code>0D8756A72CC4101609D7185ABD3E51AB</code> <code>34452A9492A5CABF00B866D12440CD32</code> <code>40F15ADBA5D81531771EAC013CBB1FE8</code> <code>95E0714A4D39B37F4CDB308F3D81CD39</code> <code>1D7803A01415ED5EA09A3F9E64E71FDB</code> <code>5F68C4531FCD21166DBE455AC2E54048</code> <code>2A6B2F9C8276D38BB516507E12FC6CFF</code> <code>A318B299120C7FC17614F299349F6EB4</code> <code>5A9AC0DB0D7D5B80EE42BAC420DD667E</code> <code>1A36D1C9BF84C8D5A49BE6A44FB1843B</code> <code>2AD35E2AF214803085E20D18B9705FBB</code><br> <code>F190004E</code></td>
<td>See below</td>
</tr>
</tbody>
@ -502,20 +502,20 @@ random_padding_bytes = 516F5D77E67E28DEFAEEDBA1B2C7650CA2CB432393C59E0506AEC3C02
<!-- 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 = 79DB145050CC2B868BD7B993C62D979590680B67E8D3E4445BE690EB75DE7B631EE499223D61B236CE9DE17F54FAD958B79ED2B195EFF9FEAEBBC82964C5E9DA983826135F09E4E1BFC6410BB7D2E347ADFE0FF27A9BA39977F7D3018C64DD8B623D4471C9599B65D26EBBE4656AF831B2C03428385A9AD46CFB048011815727764C0EFF868EFB6B0EEE139AE11EDDC7527200F1E5C4902FDAC33CFE6915C0BE59F5226C32E9A26DE31951919593E72194BC1CE7E338065EA063651EC37047E0FD603652B6E0FF493BC0ABC384221E8F053BE0368A691F2EAC9E20833A60A80033CECDF08A95718A6352F29A4CDD892A3B1981BF1AFBE47744B593F3C445AD2B81486D1F89EA507969408DCC179A1E667C0CE80A138F52F64134DF19C9B0567F6728DA583A9EF4E75BEF79BC5F09E3CC10E85AA82B49A7F2AD3F8CF48844B4C584F7FB05CF0F741338F86277D58F3BB35C960A0C8FDE2E96678803BC3EEFE16D8BC993E580AC603DE8CBE1E55AD8ECA7561B61BCF16D6B9AA70AA683CAA3D29D3E0F76BAB3D9A9B015F3886457E8C762E6262081ADD13CE4EA8DEB1990F784F1C8098CC0E75937FC4D3AD022ED282A0F2F22C46638FC207B435B2D333D879A9A8203BEEB998F90B2C4A2043753163173BEB4F24C375CA7BF6FC190E9FE2DEDA089069A6B2E0208665906337018591DC37CB9A369CFA035E5924C3F2EBE5ABB9B879B440E27FBFF6A3AC6E5EDE44DB10742E3371DFCEB77044C3550CFBD159B45B6F5F94F949D3F20751DD3085FCE202BEF908DD59A4E5AF7ACD1F182883153A5FC8715C4C994C46B91F6B7F9915327CF
tmp_aes_key = E4AA87BC8EF68FA820FA6A4D1D3049C5B7C23C84300AEA91965C5293D672F1F1
tmp_aes_iv = AD629073561090F2D8DCAF3053C26850DCE96FF5BE6A6AD595706A13BDBC63F1</code></pre>
<pre><code>encrypted_answer = 68FC5FBB578CCBD0EB7357A6554820753BF9EF11795567439E7CDE07523F9A51445B2ABA4EB24DFFDADECF4FEE2FAD4972714E35FC82C387C123BE80720B7158C7DB5E9C54EFD53FF555144556A75B8F9161A15A5023CE682F1308E3440DB9E9ACDC7F4E8352C01C238C67B75CF9632C3375700970AAC28ABDE8DBA95E9F7CDCCBCB24ECFBB3767E2851487F3DCAA26A593EF54CA89E362C41061203DC26EBD42737EBB2AF76A7759723C1A17DD528765792F0C82F008CE2A4D7C02DE0B471AE8077FFF8AA4CEE2499533E314E886EFE6944CDE73DC929CF0A8343D510D6DA0ACFE2E8EE66483EC1E6C767191C1F0C05BFD99176C13631D07A6BDF1B7C6C945F7BA5EA70EA08895A691264946B001DF4F78A5B7787C30B4D95AC8CD4688EEC52936EA846FE4DE627A0551FAD232F51CFB82CABE3FE45266F7D2BBEF4BBC8BECA5B0B1213CD9738CEACBF0576AF5480358EA7A57583CC7140357FE62F8C128656E290167F64DD14584FBB3E0381ADE2AA7AD712E8D6FCCC1B3D23177D02180B5ABAFFFA9B3E23FEFFB2504BC39A9974DACD0B91D98E73E922D960DF900D8756A72CC4101609D7185ABD3E51AB34452A9492A5CABF00B866D12440CD3240F15ADBA5D81531771EAC013CBB1FE895E0714A4D39B37F4CDB308F3D81CD391D7803A01415ED5EA09A3F9E64E71FDB5F68C4531FCD21166DBE455AC2E540482A6B2F9C8276D38BB516507E12FC6CFFA318B299120C7FC17614F299349F6EB45A9AC0DB0D7D5B80EE42BAC420DD667E1A36D1C9BF84C8D5A49BE6A44FB1843B2AD35E2AF214803085E20D18B9705FBBF190004E
tmp_aes_key = CF23EC44DE45FD3A03AA827E598B3AB47B8EE0B043D64FBD235703D21496F977
tmp_aes_iv = D1ADA3FBAAE77657362A1628CE31D6240C5754B126BA2E3FCB1ED87FA95E459C</code></pre>
<!-- end server_DH_inner_data_input -->
<p>Yielding:</p>
<!-- start server_DH_inner_data_output -->
<pre><code>answer_with_hash = A8F7DAFD8EBDAB9D8ABD17183AC62BADE297D59CBA0D89B54FFD74025B7115B179D522080D9526F7E40EE9C2E306437D43DE4B90FA2E328403000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE00010013933F276A94930322BED5FF198EC1C882E979E8A55FA0C56B3230B881F84A8BD521DC2215414C6B8D20D2982F4424ABA11D80F0E7AEBD74732BCFA5DCB7670400B67F5F3D9E90828F1037F287D13763541A6213711759A406328179ADE70B7F2B99933CC1299531E79573D6A71A0F512EAE44B72FA64A113ECB8EDC6FFFCB7A9A1C9FA969D3395CBA7B7B0CE0C192FD962459695BDA9423BE2645E54F68E9B6DF68A36CC42E5F947FDF024FCCDCAAA8C3E489AB8EA1A78079EFD7196D8BB298BBF0268E57975C2353BBC75976F5EF2E02C8C1626D5BAEB8A489EF64B840212660F9625C560E0E06244A4D94324FBB36C8B1406F4B8B2452EC184F037CD29B9BF4538066D97245331B4806A1
answer = BA0D89B54FFD74025B7115B179D522080D9526F7E40EE9C2E306437D43DE4B90FA2E328403000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE00010013933F276A94930322BED5FF198EC1C882E979E8A55FA0C56B3230B881F84A8BD521DC2215414C6B8D20D2982F4424ABA11D80F0E7AEBD74732BCFA5DCB7670400B67F5F3D9E90828F1037F287D13763541A6213711759A406328179ADE70B7F2B99933CC1299531E79573D6A71A0F512EAE44B72FA64A113ECB8EDC6FFFCB7A9A1C9FA969D3395CBA7B7B0CE0C192FD962459695BDA9423BE2645E54F68E9B6DF68A36CC42E5F947FDF024FCCDCAAA8C3E489AB8EA1A78079EFD7196D8BB298BBF0268E57975C2353BBC75976F5EF2E02C8C1626D5BAEB8A489EF64B840212660F9625C560E0E06244A4D94324FBB36C8B1406F4B8B2452EC184F037CD29B9BF4538066D97245331B4806A1</code></pre>
<pre><code>answer_with_hash = 1E460FA44597896E051E84B959EF39ADF380E9D2BA0D89B5E513A21EBE09993F927EB138D85B2887208CD96C6E2EA851CC033286E49C99E803000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE000100989EDFACA03A3B00314641D862F03CEC6022E965E518756D07C9C06EF0BFEB09E0220EF22566DB9B3D9DF3AA87B2B12F2DC70A734AE54AF7EC37CBDFD7ECFF99022B71DFABF4A8E99890411099227EE3B6B56ED24479A9867F815228EAA95EC40A8FB66F764D2FAE766FED04752DCD491993A941A9D716D0BDFD65C2FDAAEA1D476E4C81FE01E86B01A6C3F9C03225D4920687122847D8584AA4F21317E66D0C661B51E71DB52DB38CEC046BB9636F66A7FAA0AA96186848F36AA57F86076553A826F707A9802D84C62C1B8D27E6A2FB871B2BBCCB10EC26BEB970F09B85A6384F8A992640ACF2A02F8AA69A52FD0DC220E34E7237AD2815F1A95CF1BF4615C4E17A8166CEAC715B148B50B2
answer = BA0D89B5E513A21EBE09993F927EB138D85B2887208CD96C6E2EA851CC033286E49C99E803000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE000100989EDFACA03A3B00314641D862F03CEC6022E965E518756D07C9C06EF0BFEB09E0220EF22566DB9B3D9DF3AA87B2B12F2DC70A734AE54AF7EC37CBDFD7ECFF99022B71DFABF4A8E99890411099227EE3B6B56ED24479A9867F815228EAA95EC40A8FB66F764D2FAE766FED04752DCD491993A941A9D716D0BDFD65C2FDAAEA1D476E4C81FE01E86B01A6C3F9C03225D4920687122847D8584AA4F21317E66D0C661B51E71DB52DB38CEC046BB9636F66A7FAA0AA96186848F36AA57F86076553A826F707A9802D84C62C1B8D27E6A2FB871B2BBCCB10EC26BEB970F09B85A6384F8A992640ACF2A02F8AA69A52FD0DC220E34E7237AD2815F1A95CF1BF4615C4E17A8166CEAC715B148B50B2</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 4F FD 74 02 5B 71 15 B1 79 D5 22 08
0010 | 0D 95 26 F7 E4 0E E9 C2 E3 06 43 7D 43 DE 4B 90
0020 | FA 2E 32 84 03 00 00 00 FE 00 01 00 C7 1C AE B9
<pre><code>0000 | BA 0D 89 B5 E5 13 A2 1E BE 09 99 3F 92 7E B1 38
0010 | D8 5B 28 87 20 8C D9 6C 6E 2E A8 51 CC 03 32 86
0020 | E4 9C 99 E8 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 = BA0D89B54FFD74025B7115B179D522080D9526F7E40EE9C2E306437D43DE4B90FA2E328
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 | 13 93 3F 27 6A 94 93 03 22 BE D5 FF 19 8E C1 C8
0140 | 82 E9 79 E8 A5 5F A0 C5 6B 32 30 B8 81 F8 4A 8B
0150 | D5 21 DC 22 15 41 4C 6B 8D 20 D2 98 2F 44 24 AB
0160 | A1 1D 80 F0 E7 AE BD 74 73 2B CF A5 DC B7 67 04
0170 | 00 B6 7F 5F 3D 9E 90 82 8F 10 37 F2 87 D1 37 63
0180 | 54 1A 62 13 71 17 59 A4 06 32 81 79 AD E7 0B 7F
0190 | 2B 99 93 3C C1 29 95 31 E7 95 73 D6 A7 1A 0F 51
01A0 | 2E AE 44 B7 2F A6 4A 11 3E CB 8E DC 6F FF CB 7A
01B0 | 9A 1C 9F A9 69 D3 39 5C BA 7B 7B 0C E0 C1 92 FD
01C0 | 96 24 59 69 5B DA 94 23 BE 26 45 E5 4F 68 E9 B6
01D0 | DF 68 A3 6C C4 2E 5F 94 7F DF 02 4F CC DC AA A8
01E0 | C3 E4 89 AB 8E A1 A7 80 79 EF D7 19 6D 8B B2 98
01F0 | BB F0 26 8E 57 97 5C 23 53 BB C7 59 76 F5 EF 2E
0200 | 02 C8 C1 62 6D 5B AE B8 A4 89 EF 64 B8 40 21 26
0210 | 60 F9 62 5C 56 0E 0E 06 24 4A 4D 94 32 4F BB 36
0220 | C8 B1 40 6F 4B 8B 24 52 EC 18 4F 03 7C D2 9B 9B
0230 | F4 53 80 66</code></pre>
0130 | 98 9E DF AC A0 3A 3B 00 31 46 41 D8 62 F0 3C EC
0140 | 60 22 E9 65 E5 18 75 6D 07 C9 C0 6E F0 BF EB 09
0150 | E0 22 0E F2 25 66 DB 9B 3D 9D F3 AA 87 B2 B1 2F
0160 | 2D C7 0A 73 4A E5 4A F7 EC 37 CB DF D7 EC FF 99
0170 | 02 2B 71 DF AB F4 A8 E9 98 90 41 10 99 22 7E E3
0180 | B6 B5 6E D2 44 79 A9 86 7F 81 52 28 EA A9 5E C4
0190 | 0A 8F B6 6F 76 4D 2F AE 76 6F ED 04 75 2D CD 49
01A0 | 19 93 A9 41 A9 D7 16 D0 BD FD 65 C2 FD AA EA 1D
01B0 | 47 6E 4C 81 FE 01 E8 6B 01 A6 C3 F9 C0 32 25 D4
01C0 | 92 06 87 12 28 47 D8 58 4A A4 F2 13 17 E6 6D 0C
01D0 | 66 1B 51 E7 1D B5 2D B3 8C EC 04 6B B9 63 6F 66
01E0 | A7 FA A0 AA 96 18 68 48 F3 6A A5 7F 86 07 65 53
01F0 | A8 26 F7 07 A9 80 2D 84 C6 2C 1B 8D 27 E6 A2 FB
0200 | 87 1B 2B BC CB 10 EC 26 BE B9 70 F0 9B 85 A6 38
0210 | 4F 8A 99 26 40 AC F2 A0 2F 8A A6 9A 52 FD 0D C2
0220 | 20 E3 4E 72 37 AD 28 15 F1 A9 5C F1 BF 46 15 C4
0230 | E1 7A 81 66</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 = BA0D89B54FFD74025B7115B179D522080D9526F7E40EE9C2E306437D43DE4B90FA2E328
<tr>
<td>nonce</td>
<td>4, 16</td>
<td><code>4FFD74025B7115B179D522080D9526F7</code></td>
<td><code>E513A21EBE09993F927EB138D85B2887</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>20, 16</td>
<td><code>E40EE9C2E306437D43DE4B90FA2E3284</code></td>
<td><code>208CD96C6E2EA851CC033286E49C99E8</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
@ -594,13 +594,13 @@ answer = BA0D89B54FFD74025B7115B179D522080D9526F7E40EE9C2E306437D43DE4B90FA2E328
<tr>
<td>g_a</td>
<td>300, 260</td>
<td><code>FE00010013933F276A94930322BED5FF</code> <code>198EC1C882E979E8A55FA0C56B3230B8</code> <code>81F84A8BD521DC2215414C6B8D20D298</code> <code>2F4424ABA11D80F0E7AEBD74732BCFA5</code> <code>DCB7670400B67F5F3D9E90828F1037F2</code> <code>87D13763541A6213711759A406328179</code> <code>ADE70B7F2B99933CC1299531E79573D6</code> <code>A71A0F512EAE44B72FA64A113ECB8EDC</code> <code>6FFFCB7A9A1C9FA969D3395CBA7B7B0C</code> <code>E0C192FD962459695BDA9423BE2645E5</code> <code>4F68E9B6DF68A36CC42E5F947FDF024F</code> <code>CCDCAAA8C3E489AB8EA1A78079EFD719</code> <code>6D8BB298BBF0268E57975C2353BBC759</code> <code>76F5EF2E02C8C1626D5BAEB8A489EF64</code> <code>B840212660F9625C560E0E06244A4D94</code> <code>324FBB36C8B1406F4B8B2452EC184F03</code><br> <code>7CD29B9B</code></td>
<td><code>FE000100989EDFACA03A3B00314641D8</code> <code>62F03CEC6022E965E518756D07C9C06E</code> <code>F0BFEB09E0220EF22566DB9B3D9DF3AA</code> <code>87B2B12F2DC70A734AE54AF7EC37CBDF</code> <code>D7ECFF99022B71DFABF4A8E998904110</code> <code>99227EE3B6B56ED24479A9867F815228</code> <code>EAA95EC40A8FB66F764D2FAE766FED04</code> <code>752DCD491993A941A9D716D0BDFD65C2</code> <code>FDAAEA1D476E4C81FE01E86B01A6C3F9</code> <code>C03225D4920687122847D8584AA4F213</code> <code>17E66D0C661B51E71DB52DB38CEC046B</code> <code>B9636F66A7FAA0AA96186848F36AA57F</code> <code>86076553A826F707A9802D84C62C1B8D</code> <code>27E6A2FB871B2BBCCB10EC26BEB970F0</code> <code>9B85A6384F8A992640ACF2A02F8AA69A</code> <code>52FD0DC220E34E7237AD2815F1A95CF1</code><br> <code>BF4615C4</code></td>
<td><code>g_a</code> diffie-hellman parameter</td>
</tr>
<tr>
<td>server_time</td>
<td>560, 4</td>
<td><code>F4538066</code> (1719686132 in decimal)</td>
<td><code>E17A8166</code> (1719761633 in decimal)</td>
<td>Server time</td>
</tr>
</tbody>
@ -609,34 +609,34 @@ answer = BA0D89B54FFD74025B7115B179D522080D9526F7E40EE9C2E306437D43DE4B90FA2E328
<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 = E0B02BF67DB0DB4AD728A8A994B6F59DC982FC26ADA4F6E20F8CC88E754C862BA273913EFAA4690B77686F8A973DB2F46623D35F548CC890C8E2C2F9F889AD243F91021DF465EBA1A139AC4632126D9AE0791E3E1953A4F2E1A5D25100D9B8D4EE01894F6069022F2AF75D83EB27C8ADC248F4676AE9B7B05E29DF9C0405D062A96E765C0972B881A373794BEF2C6844058C1902E6D17924C8707FE54AAEA058D6C6A44FCE3BC05639B8059EDC4E8ACFBB86EA875C27F84AC35AB4B47C918D7C5B4AFD059FAEAA5E3315A774555D264D65F188805151C236EE1094D3117A81C54C8913E19880FF0DF3E3500FFCF166B946C7A7FAA3C95642CBFE2D29AE30C79B</code></pre>
<pre><code>b = 4A32C267CECCB4D454FF0BB7F67493DEF82A37E3AD8BD4A81A5FE1604D3E353EED0FA42751AEE5C81DFE9A685BEFBD4ABA6974D03A4C176FA4C4E4D62A94C0A076EF8CAA886D8544555116B0CCACDC6D701F795E4C6CA4F4629B7E624C5C2AFF35B831B8B919435EDBA13ABD6EA94A47F828CE7D4D7308E98DC462B8569E4E268D91BA230572CF94CDEA8AB2C925331E3A4A2D602A13DF2FE0091AFF7C315AC2F7CAE7D4D432F362767A9DA8CA149EAF858CF8CEACA3EB76342154D7A83C3EEB14B3F6B46A3E9E58EC8BBB972061E6E48877C70AD86A31E38DD98EC06B272BA2857A65BB3D9373E5B66486997639FD4D10FADDD49D17AEF76B09860911406A0E</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 = 75FA35FCB6728EAA9B893E70B15513D6D47DE68C321E7224D99D2D29B5FEBAC5BF9FCABDB31B2F831059085A231A5B5FF695A914C544038CC6CF45AA3CB751772A3FC236F75425CF862AB2C061DD7AD76F89BAC88D2D43D1579FF0126B397B77301078C3B4C4B9E0464E31FDF07C816174AE9EE9537E95E6B339ABF84E220A5BF243565B5AFB26F276DE604C706E2BBF4AB6D3928759E166513825CE8F896D15917F9A34582238745D1B3C80DFC9C899C171B50B56512C9A2D53DC1163F23BB3553309E0444F2E20FA0965D94A782F5CEFE849724EDD0F07B336B58FBBE224E47FBB34D03ED58E806186C283A17F28A05A3E52050975AECA0F52CECB6A3414EE</code></pre>
<pre><code>g_b = 17D902F86FB6A6E20E84902826DE3E6BEA06B3B9369192A1D6B869795C068FD7D4C8DE1109EF4930CBC5E05835E8217F6EE67E85F36D787266BCB0CBCC1F7D1DB37183C5A469E2927E31898C1B81AE181EF645372B440FA39E3E460654F787BFAF4FB21A1CF8C4A511FDAB712D6EEC796FE0AE1102F28C323645DACB302F7C6CC6BB4D8F24FC9F6433235BCCD1A391EDF650F6998332A49402917A2CB285ED6FDE670A37478C8AE902EE54B17FD0F7D393460FF959ADDE60E9F129ECA1F2A62EEE52A5870DF04FAB7006F1A7837514952D503E405C223BE486CF25E56F5CE49AA3DEFE7432244AE07A30B53589E16E5110AE3AB7EB44008F0DDD381C5ED685B1</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 4F FD 74 02 5B 71 15 B1 79 D5 22 08
0010 | 0D 95 26 F7 E4 0E E9 C2 E3 06 43 7D 43 DE 4B 90
0020 | FA 2E 32 84 00 00 00 00 00 00 00 00 FE 00 01 00
0030 | 75 FA 35 FC B6 72 8E AA 9B 89 3E 70 B1 55 13 D6
0040 | D4 7D E6 8C 32 1E 72 24 D9 9D 2D 29 B5 FE BA C5
0050 | BF 9F CA BD B3 1B 2F 83 10 59 08 5A 23 1A 5B 5F
0060 | F6 95 A9 14 C5 44 03 8C C6 CF 45 AA 3C B7 51 77
0070 | 2A 3F C2 36 F7 54 25 CF 86 2A B2 C0 61 DD 7A D7
0080 | 6F 89 BA C8 8D 2D 43 D1 57 9F F0 12 6B 39 7B 77
0090 | 30 10 78 C3 B4 C4 B9 E0 46 4E 31 FD F0 7C 81 61
00A0 | 74 AE 9E E9 53 7E 95 E6 B3 39 AB F8 4E 22 0A 5B
00B0 | F2 43 56 5B 5A FB 26 F2 76 DE 60 4C 70 6E 2B BF
00C0 | 4A B6 D3 92 87 59 E1 66 51 38 25 CE 8F 89 6D 15
00D0 | 91 7F 9A 34 58 22 38 74 5D 1B 3C 80 DF C9 C8 99
00E0 | C1 71 B5 0B 56 51 2C 9A 2D 53 DC 11 63 F2 3B B3
00F0 | 55 33 09 E0 44 4F 2E 20 FA 09 65 D9 4A 78 2F 5C
0100 | EF E8 49 72 4E DD 0F 07 B3 36 B5 8F BB E2 24 E4
0110 | 7F BB 34 D0 3E D5 8E 80 61 86 C2 83 A1 7F 28 A0
0120 | 5A 3E 52 05 09 75 AE CA 0F 52 CE CB 6A 34 14 EE</code></pre>
<pre><code>0000 | 54 B6 43 66 E5 13 A2 1E BE 09 99 3F 92 7E B1 38
0010 | D8 5B 28 87 20 8C D9 6C 6E 2E A8 51 CC 03 32 86
0020 | E4 9C 99 E8 00 00 00 00 00 00 00 00 FE 00 01 00
0030 | 17 D9 02 F8 6F B6 A6 E2 0E 84 90 28 26 DE 3E 6B
0040 | EA 06 B3 B9 36 91 92 A1 D6 B8 69 79 5C 06 8F D7
0050 | D4 C8 DE 11 09 EF 49 30 CB C5 E0 58 35 E8 21 7F
0060 | 6E E6 7E 85 F3 6D 78 72 66 BC B0 CB CC 1F 7D 1D
0070 | B3 71 83 C5 A4 69 E2 92 7E 31 89 8C 1B 81 AE 18
0080 | 1E F6 45 37 2B 44 0F A3 9E 3E 46 06 54 F7 87 BF
0090 | AF 4F B2 1A 1C F8 C4 A5 11 FD AB 71 2D 6E EC 79
00A0 | 6F E0 AE 11 02 F2 8C 32 36 45 DA CB 30 2F 7C 6C
00B0 | C6 BB 4D 8F 24 FC 9F 64 33 23 5B CC D1 A3 91 ED
00C0 | F6 50 F6 99 83 32 A4 94 02 91 7A 2C B2 85 ED 6F
00D0 | DE 67 0A 37 47 8C 8A E9 02 EE 54 B1 7F D0 F7 D3
00E0 | 93 46 0F F9 59 AD DE 60 E9 F1 29 EC A1 F2 A6 2E
00F0 | EE 52 A5 87 0D F0 4F AB 70 06 F1 A7 83 75 14 95
0100 | 2D 50 3E 40 5C 22 3B E4 86 CF 25 E5 6F 5C E4 9A
0110 | A3 DE FE 74 32 24 4A E0 7A 30 B5 35 89 E1 6E 51
0120 | 10 AE 3A B7 EB 44 00 8F 0D DD 38 1C 5E D6 85 B1</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 = BA0D89B54FFD74025B7115B179D522080D9526F7E40EE9C2E306437D43DE4B90FA2E328
<tr>
<td>nonce</td>
<td>4, 16</td>
<td><code>4FFD74025B7115B179D522080D9526F7</code></td>
<td><code>E513A21EBE09993F927EB138D85B2887</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>20, 16</td>
<td><code>E40EE9C2E306437D43DE4B90FA2E3284</code></td>
<td><code>208CD96C6E2EA851CC033286E49C99E8</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>g_b</td>
<td>36, 260</td>
<td><code>FE00010075FA35FCB6728EAA9B893E70</code> <code>B15513D6D47DE68C321E7224D99D2D29</code> <code>B5FEBAC5BF9FCABDB31B2F831059085A</code> <code>231A5B5FF695A914C544038CC6CF45AA</code> <code>3CB751772A3FC236F75425CF862AB2C0</code> <code>61DD7AD76F89BAC88D2D43D1579FF012</code> <code>6B397B77301078C3B4C4B9E0464E31FD</code> <code>F07C816174AE9EE9537E95E6B339ABF8</code> <code>4E220A5BF243565B5AFB26F276DE604C</code> <code>706E2BBF4AB6D3928759E166513825CE</code> <code>8F896D15917F9A34582238745D1B3C80</code> <code>DFC9C899C171B50B56512C9A2D53DC11</code> <code>63F23BB3553309E0444F2E20FA0965D9</code> <code>4A782F5CEFE849724EDD0F07B336B58F</code> <code>BBE224E47FBB34D03ED58E806186C283</code> <code>A17F28A05A3E52050975AECA0F52CECB</code><br> <code>6A3414EE</code></td>
<td><code>FE00010017D902F86FB6A6E20E849028</code> <code>26DE3E6BEA06B3B9369192A1D6B86979</code> <code>5C068FD7D4C8DE1109EF4930CBC5E058</code> <code>35E8217F6EE67E85F36D787266BCB0CB</code> <code>CC1F7D1DB37183C5A469E2927E31898C</code> <code>1B81AE181EF645372B440FA39E3E4606</code> <code>54F787BFAF4FB21A1CF8C4A511FDAB71</code> <code>2D6EEC796FE0AE1102F28C323645DACB</code> <code>302F7C6CC6BB4D8F24FC9F6433235BCC</code> <code>D1A391EDF650F6998332A49402917A2C</code> <code>B285ED6FDE670A37478C8AE902EE54B1</code> <code>7FD0F7D393460FF959ADDE60E9F129EC</code> <code>A1F2A62EEE52A5870DF04FAB7006F1A7</code> <code>837514952D503E405C223BE486CF25E5</code> <code>6F5CE49AA3DEFE7432244AE07A30B535</code> <code>89E16E5110AE3AB7EB44008F0DDD381C</code><br> <code>5ED685B1</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 = BA0D89B54FFD74025B7115B179D522080D9526F7E40EE9C2E306437D43DE4B90FA2E328
<!-- 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 = 54B643664FFD74025B7115B179D522080D9526F7E40EE9C2E306437D43DE4B90FA2E32840000000000000000FE00010075FA35FCB6728EAA9B893E70B15513D6D47DE68C321E7224D99D2D29B5FEBAC5BF9FCABDB31B2F831059085A231A5B5FF695A914C544038CC6CF45AA3CB751772A3FC236F75425CF862AB2C061DD7AD76F89BAC88D2D43D1579FF0126B397B77301078C3B4C4B9E0464E31FDF07C816174AE9EE9537E95E6B339ABF84E220A5BF243565B5AFB26F276DE604C706E2BBF4AB6D3928759E166513825CE8F896D15917F9A34582238745D1B3C80DFC9C899C171B50B56512C9A2D53DC1163F23BB3553309E0444F2E20FA0965D94A782F5CEFE849724EDD0F07B336B58FBBE224E47FBB34D03ED58E806186C283A17F28A05A3E52050975AECA0F52CECB6A3414EE
padding = E9507C3044D329555B85F36D
tmp_aes_key = E4AA87BC8EF68FA820FA6A4D1D3049C5B7C23C84300AEA91965C5293D672F1F1
tmp_aes_iv = AD629073561090F2D8DCAF3053C26850DCE96FF5BE6A6AD595706A13BDBC63F1</code></pre>
<pre><code>data = 54B64366E513A21EBE09993F927EB138D85B2887208CD96C6E2EA851CC033286E49C99E80000000000000000FE00010017D902F86FB6A6E20E84902826DE3E6BEA06B3B9369192A1D6B869795C068FD7D4C8DE1109EF4930CBC5E05835E8217F6EE67E85F36D787266BCB0CBCC1F7D1DB37183C5A469E2927E31898C1B81AE181EF645372B440FA39E3E460654F787BFAF4FB21A1CF8C4A511FDAB712D6EEC796FE0AE1102F28C323645DACB302F7C6CC6BB4D8F24FC9F6433235BCCD1A391EDF650F6998332A49402917A2CB285ED6FDE670A37478C8AE902EE54B17FD0F7D393460FF959ADDE60E9F129ECA1F2A62EEE52A5870DF04FAB7006F1A7837514952D503E405C223BE486CF25E56F5CE49AA3DEFE7432244AE07A30B53589E16E5110AE3AB7EB44008F0DDD381C5ED685B1
padding = 6D3B66A7CE56384B9810247C
tmp_aes_key = CF23EC44DE45FD3A03AA827E598B3AB47B8EE0B043D64FBD235703D21496F977
tmp_aes_iv = D1ADA3FBAAE77657362A1628CE31D6240C5754B126BA2E3FCB1ED87FA95E459C</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 = E74DA6BC5658DEF1EC2E6F6DB0D5F02E950B9C62098009F12BA6570691377CCEE928D07529766A8193EA7DFAB492DB3400DC4E66D5A96B64371ADCC1D968D3AFA01187818ED9D2FE63B8EAA6E842C6DCF5F05CA9D6E6F8DD23C046CF25B1D5AFD25B12E2DA206FAD2F6E24A15AB759452AFF6A1A4215FB76067D95BFFE0E274E0991FFE382E543547CA6E287556E5CF7259DE6B22916CA5DB64948FFE0DCE9B9CD3D7335106BE3F585AC83E001DEFE1D398AA812EA909302CB01F770E64D8350E35346CCEB3715A209DF1F98A6D8D8D797C1A91698CA611C280328B5B4C95C5E623AD4FA406278563B71A94A1F23C2879EA7B31C37D39E2AD9C809EFBE3CE244D4C9FE949909659CEE4B074D29CD490BFD3BEFCFEC653C33E2B1A073CD26890DAAE30165E1B0A480B9FA4611F5ED037526CFFF4FBB660E491F1DFA38C9F8EFAD19A0B45C5E2FD38C4D083B2EC6530001</code></pre>
<pre><code>encrypted_data = 24A98346AED40FE134212501317F5B3CB5CBA1966F76C3E0E2D6F33DA17DBBB550741FE7F5F1B2A470E6C60327017713C8F15672B264B196F2FBD98B034FD1BC88067D95CDB1CE2594913DC85C0911C3B622FE317E43AE91743AD3EFECE5D54338F2F19A6E242C4EFC04BF9B7BB0CE1A4BC2CA6FFAD61750602020642627CB8977066D88F5D183EB9AE6D9CB231DBB0D6C8733C25C1F42C8A53F9C3341B9BFFCB5EBBF269BB2F0150A3C60C78AA4F4D7ECE0E626467879EA78DE4AD14BEF9738F63106322C419A91A8279B5C3AF3F6EFFC719BF2FBE791F63FA7397420C9913D31F2DEDE2A670DDE89FA147BE8F71F6EABBDE3EACC9247AEBA7E5454E04120C5B932AB6D2E4199CFDC8FAB8DC1FB9C198610F4D81D3B0B3FC703A33FC337694963156AFCE7B96241588CF340255A56AAE44786BB1448F59966D39808ACE52F06ED974C7652063429A7F1227BFBB9D8E9</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 30 A7 05 00 F5 53 80 66
0010 | 78 01 00 00 1F 5F 04 F5 4F FD 74 02 5B 71 15 B1
0020 | 79 D5 22 08 0D 95 26 F7 E4 0E E9 C2 E3 06 43 7D
0030 | 43 DE 4B 90 FA 2E 32 84 FE 50 01 00 E7 4D A6 BC
0040 | 56 58 DE F1 EC 2E 6F 6D B0 D5 F0 2E 95 0B 9C 62
0050 | 09 80 09 F1 2B A6 57 06 91 37 7C CE E9 28 D0 75
0060 | 29 76 6A 81 93 EA 7D FA B4 92 DB 34 00 DC 4E 66
0070 | D5 A9 6B 64 37 1A DC C1 D9 68 D3 AF A0 11 87 81
0080 | 8E D9 D2 FE 63 B8 EA A6 E8 42 C6 DC F5 F0 5C A9
0090 | D6 E6 F8 DD 23 C0 46 CF 25 B1 D5 AF D2 5B 12 E2
00A0 | DA 20 6F AD 2F 6E 24 A1 5A B7 59 45 2A FF 6A 1A
00B0 | 42 15 FB 76 06 7D 95 BF FE 0E 27 4E 09 91 FF E3
00C0 | 82 E5 43 54 7C A6 E2 87 55 6E 5C F7 25 9D E6 B2
00D0 | 29 16 CA 5D B6 49 48 FF E0 DC E9 B9 CD 3D 73 35
00E0 | 10 6B E3 F5 85 AC 83 E0 01 DE FE 1D 39 8A A8 12
00F0 | EA 90 93 02 CB 01 F7 70 E6 4D 83 50 E3 53 46 CC
0100 | EB 37 15 A2 09 DF 1F 98 A6 D8 D8 D7 97 C1 A9 16
0110 | 98 CA 61 1C 28 03 28 B5 B4 C9 5C 5E 62 3A D4 FA
0120 | 40 62 78 56 3B 71 A9 4A 1F 23 C2 87 9E A7 B3 1C
0130 | 37 D3 9E 2A D9 C8 09 EF BE 3C E2 44 D4 C9 FE 94
0140 | 99 09 65 9C EE 4B 07 4D 29 CD 49 0B FD 3B EF CF
0150 | EC 65 3C 33 E2 B1 A0 73 CD 26 89 0D AA E3 01 65
0160 | E1 B0 A4 80 B9 FA 46 11 F5 ED 03 75 26 CF FF 4F
0170 | BB 66 0E 49 1F 1D FA 38 C9 F8 EF AD 19 A0 B4 5C
0180 | 5E 2F D3 8C 4D 08 3B 2E C6 53 00 01</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 6C 47 0A 00 E1 7A 81 66
0010 | 78 01 00 00 1F 5F 04 F5 E5 13 A2 1E BE 09 99 3F
0020 | 92 7E B1 38 D8 5B 28 87 20 8C D9 6C 6E 2E A8 51
0030 | CC 03 32 86 E4 9C 99 E8 FE 50 01 00 24 A9 83 46
0040 | AE D4 0F E1 34 21 25 01 31 7F 5B 3C B5 CB A1 96
0050 | 6F 76 C3 E0 E2 D6 F3 3D A1 7D BB B5 50 74 1F E7
0060 | F5 F1 B2 A4 70 E6 C6 03 27 01 77 13 C8 F1 56 72
0070 | B2 64 B1 96 F2 FB D9 8B 03 4F D1 BC 88 06 7D 95
0080 | CD B1 CE 25 94 91 3D C8 5C 09 11 C3 B6 22 FE 31
0090 | 7E 43 AE 91 74 3A D3 EF EC E5 D5 43 38 F2 F1 9A
00A0 | 6E 24 2C 4E FC 04 BF 9B 7B B0 CE 1A 4B C2 CA 6F
00B0 | FA D6 17 50 60 20 20 64 26 27 CB 89 77 06 6D 88
00C0 | F5 D1 83 EB 9A E6 D9 CB 23 1D BB 0D 6C 87 33 C2
00D0 | 5C 1F 42 C8 A5 3F 9C 33 41 B9 BF FC B5 EB BF 26
00E0 | 9B B2 F0 15 0A 3C 60 C7 8A A4 F4 D7 EC E0 E6 26
00F0 | 46 78 79 EA 78 DE 4A D1 4B EF 97 38 F6 31 06 32
0100 | 2C 41 9A 91 A8 27 9B 5C 3A F3 F6 EF FC 71 9B F2
0110 | FB E7 91 F6 3F A7 39 74 20 C9 91 3D 31 F2 DE DE
0120 | 2A 67 0D DE 89 FA 14 7B E8 F7 1F 6E AB BD E3 EA
0130 | CC 92 47 AE BA 7E 54 54 E0 41 20 C5 B9 32 AB 6D
0140 | 2E 41 99 CF DC 8F AB 8D C1 FB 9C 19 86 10 F4 D8
0150 | 1D 3B 0B 3F C7 03 A3 3F C3 37 69 49 63 15 6A FC
0160 | E7 B9 62 41 58 8C F3 40 25 5A 56 AA E4 47 86 BB
0170 | 14 48 F5 99 66 D3 98 08 AC E5 2F 06 ED 97 4C 76
0180 | 52 06 34 29 A7 F1 22 7B FB B9 D8 E9</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>30A70500F5538066</code></td>
<td><code>6C470A00E17A8166</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>4FFD74025B7115B179D522080D9526F7</code></td>
<td><code>E513A21EBE09993F927EB138D85B2887</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>E40EE9C2E306437D43DE4B90FA2E3284</code></td>
<td><code>208CD96C6E2EA851CC033286E49C99E8</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>encrypted_data</td>
<td>56, 340</td>
<td><code>FE500100E74DA6BC5658DEF1EC2E6F6D</code> <code>B0D5F02E950B9C62098009F12BA65706</code> <code>91377CCEE928D07529766A8193EA7DFA</code> <code>B492DB3400DC4E66D5A96B64371ADCC1</code> <code>D968D3AFA01187818ED9D2FE63B8EAA6</code> <code>E842C6DCF5F05CA9D6E6F8DD23C046CF</code> <code>25B1D5AFD25B12E2DA206FAD2F6E24A1</code> <code>5AB759452AFF6A1A4215FB76067D95BF</code> <code>FE0E274E0991FFE382E543547CA6E287</code> <code>556E5CF7259DE6B22916CA5DB64948FF</code> <code>E0DCE9B9CD3D7335106BE3F585AC83E0</code> <code>01DEFE1D398AA812EA909302CB01F770</code> <code>E64D8350E35346CCEB3715A209DF1F98</code> <code>A6D8D8D797C1A91698CA611C280328B5</code> <code>B4C95C5E623AD4FA406278563B71A94A</code> <code>1F23C2879EA7B31C37D39E2AD9C809EF</code> <code>BE3CE244D4C9FE949909659CEE4B074D</code> <code>29CD490BFD3BEFCFEC653C33E2B1A073</code> <code>CD26890DAAE30165E1B0A480B9FA4611</code> <code>F5ED037526CFFF4FBB660E491F1DFA38</code> <code>C9F8EFAD19A0B45C5E2FD38C4D083B2E</code><br> <code>C6530001</code></td>
<td><code>FE50010024A98346AED40FE134212501</code> <code>317F5B3CB5CBA1966F76C3E0E2D6F33D</code> <code>A17DBBB550741FE7F5F1B2A470E6C603</code> <code>27017713C8F15672B264B196F2FBD98B</code> <code>034FD1BC88067D95CDB1CE2594913DC8</code> <code>5C0911C3B622FE317E43AE91743AD3EF</code> <code>ECE5D54338F2F19A6E242C4EFC04BF9B</code> <code>7BB0CE1A4BC2CA6FFAD6175060202064</code> <code>2627CB8977066D88F5D183EB9AE6D9CB</code> <code>231DBB0D6C8733C25C1F42C8A53F9C33</code> <code>41B9BFFCB5EBBF269BB2F0150A3C60C7</code> <code>8AA4F4D7ECE0E626467879EA78DE4AD1</code> <code>4BEF9738F63106322C419A91A8279B5C</code> <code>3AF3F6EFFC719BF2FBE791F63FA73974</code> <code>20C9913D31F2DEDE2A670DDE89FA147B</code> <code>E8F71F6EABBDE3EACC9247AEBA7E5454</code> <code>E04120C5B932AB6D2E4199CFDC8FAB8D</code> <code>C1FB9C198610F4D81D3B0B3FC703A33F</code> <code>C337694963156AFCE7B96241588CF340</code> <code>255A56AAE44786BB1448F59966D39808</code> <code>ACE52F06ED974C7652063429A7F1227B</code><br> <code>FBB9D8E9</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 = A8BECD2600C465423CA1D7C7DCD5761C7D5A6976EED715C0F7155F2A74F625698AD583FCD8DA543F3322557C06510B24B171E899F21F029653AAFD5FB53702E68A22F03BFF231527770B066C453727B44204F8E902D2E172C58CB34E0ABA5E2C3BE7555FF8EF39DCDF59E560D48092246CBD87DA83F0498239973FD8E3CE63246D71F1BB4E3B9CC7F8AE99DAB5055D663AA53E6C748E5FAD6C6D437B988C204841573EC5C68907B3C48AB03115F4E4D20B47AD90CE309581A2DFCC1F3F728B908D1692486FF65047BC74E0B69C11A524B05F4F1659D231B7C1F19DF5242C0CE71157CF46C7FF0F0B9191EC1690BBF091BB362A4D98654DA405A21EBDEA5BFFF5</code></pre>
<pre><code>auth_key = 075A5BD962A4DC0178D33FF48730219966E6EBEE0AF4B9994353AB75022CD6116E00632316B31CBCBF4701D608AE260E800030FFC7D56971F78DC518EE18CC5DF5ADDAC1A8D35361D4DC6DB492B515EBF0D287EC6532AA5ADEA1D42697E58D347ECE3B8E0CD4F37AB0CE0BBF499CC6ABDF85DCA873BD891101150B8B56478B959D2A0F8E733A2EE131A7978C85E1CD6E2B7C13A3946C686B9A7308B6719860D72F6A91CC5D78872345F72344D0D3126E67FA0AC7538DB518BD2A13ABD81A56F760684CD25DD12394F96A996E684A0B708B4DDFCB9906B2A3399B5E04D58DC3D3B8E62962EA9735ED677789141C2E8E1843D24E523863F371866AFF0AB8E08CB5</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 20 70 EF F5 53 80 66
0010 | 40 00 00 00 34 F7 CB 3B 4F FD 74 02 5B 71 15 B1
0020 | 79 D5 22 08 0D 95 26 F7 E4 0E E9 C2 E3 06 43 7D
0030 | 43 DE 4B 90 FA 2E 32 84 6B 59 22 92 30 E0 2A 80
0040 | EE C8 A7 07 E5 37 EC 08</code></pre>
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 98 2C E5 E1 7A 81 66
0010 | A8 00 00 00 34 F7 CB 3B E5 13 A2 1E BE 09 99 3F
0020 | 92 7E B1 38 D8 5B 28 87 20 8C D9 6C 6E 2E A8 51
0030 | CC 03 32 86 E4 9C 99 E8 D5 58 A2 84 E9 13 85 89
0040 | 04 EA BE 25 64 86 AD 6F</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>012070EFF5538066</code></td>
<td><code>01982CE5E17A8166</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>40000000</code> (64 in decimal)</td>
<td><code>A8000000</code> (168 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>4FFD74025B7115B179D522080D9526F7</code></td>
<td><code>E513A21EBE09993F927EB138D85B2887</code></td>
<td>Value generated by client in Step 1</td>
</tr>
<tr>
<td>server_nonce</td>
<td>40, 16</td>
<td><code>E40EE9C2E306437D43DE4B90FA2E3284</code></td>
<td><code>208CD96C6E2EA851CC033286E49C99E8</code></td>
<td>Value received from server in Step 2</td>
</tr>
<tr>
<td>new_nonce_hash1</td>
<td>56, 16</td>
<td><code>6B59229230E02A80EEC8A707E537EC08</code></td>
<td><code>D558A284E913858904EABE256486AD6F</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

@ -8,14 +8,14 @@
Constructor
Description
businessAwayMessage
 ">
Describes a Telegram Business away message, automatically sent…">
<meta property="og:title" content="BusinessAwayMessage">
<meta property="og:image" content="">
<meta property="og:description" content="Constructors
Constructor
Description
businessAwayMessage
 ">
Describes a Telegram Business away message, automatically sent…">
<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">
@ -74,7 +74,7 @@ businessAwayMessage
<tbody>
<tr>
<td><a href="/constructor/businessAwayMessage">businessAwayMessage</a></td>
<td> </td>
<td>Describes a <a href="/api/business#away-messages">Telegram Business away message</a>, automatically sent to users writing to us when we're offline, during closing hours, while we're on vacation, or in some other custom time period when we cannot immediately answer to the user.</td>
</tr>
</tbody>
</table></div>

View file

@ -8,18 +8,14 @@
Constructor
Description
businessAwayMessageScheduleAlways
 
businessAwayMessageScheduleOutsideWorkHours
 …">
Always send Telegram Business away messages to users…">
<meta property="og:title" content="BusinessAwayMessageSchedule">
<meta property="og:image" content="">
<meta property="og:description" content="Constructors
Constructor
Description
businessAwayMessageScheduleAlways
 
businessAwayMessageScheduleOutsideWorkHours
 …">
Always send Telegram Business away messages to users…">
<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">
@ -80,15 +76,15 @@ businessAwayMessageScheduleOutsideWorkHours
<tbody>
<tr>
<td><a href="/constructor/businessAwayMessageScheduleAlways">businessAwayMessageScheduleAlways</a></td>
<td> </td>
<td>Always send <a href="/api/business#away-messages">Telegram Business away messages</a> to users writing to us in private.</td>
</tr>
<tr>
<td><a href="/constructor/businessAwayMessageScheduleOutsideWorkHours">businessAwayMessageScheduleOutsideWorkHours</a></td>
<td> </td>
<td>Send <a href="/api/business#away-messages">Telegram Business away messages</a> to users writing to us in private outside of the configured <a href="/api/business#opening-hours">Telegram Business working hours</a>.</td>
</tr>
<tr>
<td><a href="/constructor/businessAwayMessageScheduleCustom">businessAwayMessageScheduleCustom</a></td>
<td> </td>
<td>Send <a href="/api/business#away-messages">Telegram Business away messages</a> to users writing to us in private in the specified time span.</td>
</tr>
</tbody>
</table></div>

View file

@ -8,14 +8,14 @@
Constructor
Description
businessGreetingMessage
 ">
Describes a Telegram Business greeting, automatically sent…">
<meta property="og:title" content="BusinessGreetingMessage">
<meta property="og:image" content="">
<meta property="og:description" content="Constructors
Constructor
Description
businessGreetingMessage
 ">
Describes a Telegram Business greeting, automatically sent…">
<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">
@ -74,7 +74,7 @@ businessGreetingMessage
<tbody>
<tr>
<td><a href="/constructor/businessGreetingMessage">businessGreetingMessage</a></td>
<td> </td>
<td>Describes a <a href="/api/business#greeting-messages">Telegram Business greeting</a>, automatically sent to new users writing to us in private for the first time, or after a certain inactivity period.</td>
</tr>
</tbody>
</table></div>

View file

@ -8,14 +8,14 @@
Constructor
Description
inputBusinessAwayMessage
 ">
Describes a Telegram Business away message, automatically…">
<meta property="og:title" content="InputBusinessAwayMessage">
<meta property="og:image" content="">
<meta property="og:description" content="Constructors
Constructor
Description
inputBusinessAwayMessage
 ">
Describes a Telegram Business away message, automatically…">
<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">
@ -74,7 +74,7 @@ inputBusinessAwayMessage
<tbody>
<tr>
<td><a href="/constructor/inputBusinessAwayMessage">inputBusinessAwayMessage</a></td>
<td> </td>
<td>Describes a <a href="/api/business#away-messages">Telegram Business away message</a>, automatically sent to users writing to us when we're offline, during closing hours, while we're on vacation, or in some other custom time period when we cannot immediately answer to the user.</td>
</tr>
</tbody>
</table></div>

View file

@ -8,14 +8,14 @@
Constructor
Description
inputBusinessGreetingMessage
 ">
Describes a Telegram Business greeting, automatically…">
<meta property="og:title" content="InputBusinessGreetingMessage">
<meta property="og:image" content="">
<meta property="og:description" content="Constructors
Constructor
Description
inputBusinessGreetingMessage
 ">
Describes a Telegram Business greeting, automatically…">
<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">
@ -74,7 +74,7 @@ inputBusinessGreetingMessage
<tbody>
<tr>
<td><a href="/constructor/inputBusinessGreetingMessage">inputBusinessGreetingMessage</a></td>
<td> </td>
<td>Describes a <a href="/api/business#greeting-messages">Telegram Business greeting</a>, automatically sent to new users writing to us in private for the first time, or after a certain inactivity period.</td>
</tr>
</tbody>
</table></div>