mirror of
https://github.com/MarshalX/telegram-crawler.git
synced 2024-12-29 15:59:13 +01:00
Update content of files
This commit is contained in:
parent
b288d62a2b
commit
99275dbbe9
62 changed files with 1353 additions and 773 deletions
|
@ -216,7 +216,7 @@ In this case, instructions for <a href="/api/srp">SRP 2FA authentication</a> mus
|
|||
<p>To set up two-factor authorization on an already authorized account, follow the <a href="/api/srp">SRP 2FA authentication docs</a>.</p>
|
||||
<h4><a class="anchor" href="#test-accounts" id="test-accounts" name="test-accounts"><i class="anchor-icon"></i></a>Test Accounts</h4>
|
||||
<p>Each phone number is limited to only a certain amount of logins per day (e.g. 5, but this is subject to change) after which the API will return a FLOOD error until the next day. This might not be enough for testing the implementation of User Authorization flows in client applications.</p>
|
||||
<p>There are several reserved phone number prefixes for testing that your application handles redirects between DCs, sign up, sign in and 2FA flows correctly. These numbers are only available on <strong>Test DCs</strong> (their IP addresses for TCP transport are available in <a href="https://my.telegram.org/apps">API development tools</a> panel after <a href="https://core.telegram.org/api/obtaining_api_id#obtaining-api-id">api_id was obtained</a>, <a href="https://core.telegram.org/mtproto/transports#uri-format">URI format</a> for HTTPS/Websocket transport).</p>
|
||||
<p>There are several reserved phone number prefixes for testing that your application handles redirects between DCs, sign up, sign in and 2FA flows correctly. These numbers are only available on <strong>Test DCs</strong> (their IP addresses for TCP transport are available in <a href="https://my.telegram.org/apps">API development tools</a> panel after <a href="https://core.telegram.org/api/obtaining_api_id#obtaining-api-id">api_id was obtained</a>, <a href="https://core.telegram.org/mtproto/transports#uri-format">URI format</a> for HTTPS/WebSocket transport).</p>
|
||||
<p>If you wish to emulate an application of a user associated with DC number X, it is sufficient to specify the phone number as <code>99966XYYYY</code>, where YYYY are random numbers, when registering the user. A user like this would always get XXXXX as the login confirmation code (the DC number, repeated five times). Note that the value of X must be in the range of 1-3 because there are only 3 Test DCs. When the flood limit is reached for any particular test number, just choose another number (changing the YYYY random part).</p>
|
||||
<p>Do not store any important or private information in the messages of such test accounts; anyone can make use of the simplified authorization mechanism – and we periodically wipe all information stored there.</p>
|
||||
<p>Proceed with User Authorization flows in <strong>Production DCs</strong> only after you make sure everything works correctly on <strong>Test DCs</strong> first to avoid reaching flood limits.</p>
|
||||
|
|
|
@ -47,212 +47,377 @@
|
|||
</blockquote>
|
||||
<p>This page lists some libraries and frameworks <strong>developed by the Telegram community</strong> – you should take care to report any bugs you may find to the respective developers, as these projects are not maintained by Telegram.</p>
|
||||
<p>Ping us on <a href="https://telegram.me/botsupport">@BotSupport</a> if you would like your library to appear on this page.</p>
|
||||
<h4><a class="anchor" name="php" href="#php"><i class="anchor-icon"></i></a>PHP</h4>
|
||||
<h4><a class="anchor" href="#php" id="php" name="php"><i class="anchor-icon"></i></a>PHP</h4>
|
||||
<ul>
|
||||
<li><p><strong>Nutgram</strong>. The Telegram bot framework that doesn't drive you nuts.<br><a href="https://github.com/nutgram/nutgram">https://github.com/nutgram/nutgram</a></p>
|
||||
<li>
|
||||
<p><strong>Nutgram</strong>. The Telegram bot framework that doesn't drive you nuts.
|
||||
<a href="https://github.com/nutgram/nutgram">https://github.com/nutgram/nutgram</a></p>
|
||||
</li>
|
||||
<li><p><strong>klev-o/telegram-bot-api</strong>. Simple and convenient object-oriented implementation Telegram Bot API with PHP version ^7.4 support.<br><a href="https://github.com/klev-o/telegram-bot-api">https://github.com/klev-o/telegram-bot-api</a></p>
|
||||
<li>
|
||||
<p><strong>klev-o/telegram-bot-api</strong>. Simple and convenient object-oriented implementation Telegram Bot API with PHP version ^7.4 support.
|
||||
<a href="https://github.com/klev-o/telegram-bot-api">https://github.com/klev-o/telegram-bot-api</a></p>
|
||||
</li>
|
||||
<li><p><strong>Telegraph</strong>. A Laravel package for fluently interacting with Telegram Bots.<br><a href="https://github.com/def-studio/telegraph">https://github.com/def-studio/telegraph</a></p>
|
||||
<li>
|
||||
<p><strong>Telegraph</strong>. A Laravel package for fluently interacting with Telegram Bots.
|
||||
<a href="https://github.com/def-studio/telegraph">https://github.com/def-studio/telegraph</a></p>
|
||||
</li>
|
||||
<li><p><strong>TeleBot</strong>. Easy way to create Telegram bots in PHP. Rich Laravel support out of the box.<br><a href="https://github.com/westacks/telebot">https://github.com/westacks/telebot</a></p>
|
||||
<li>
|
||||
<p><strong>TeleBot</strong>. Easy way to create Telegram bots in PHP. Rich Laravel support out of the box.
|
||||
<a href="https://github.com/westacks/telebot">https://github.com/westacks/telebot</a></p>
|
||||
</li>
|
||||
<li><p><strong>PTB</strong>. A PHP Procedural library for Telegram Bot API.<br><a href="https://github.com/DevDasher/PTB-PHP">https://github.com/DevDasher/PTB-PHP</a></p>
|
||||
<li>
|
||||
<p><strong>PTB</strong>. A PHP Procedural library for Telegram Bot API.
|
||||
<a href="https://github.com/DevDasher/PTB-PHP">https://github.com/DevDasher/PTB-PHP</a></p>
|
||||
</li>
|
||||
<li><p><strong>LaraGram</strong>. An advanced framework for Telegram Bot development.<br><a href="https://github.com/laraXgram/LaraGram">https://github.com/laraXgram/LaraGram</a></p>
|
||||
<li>
|
||||
<p><strong>LaraGram</strong>. An advanced framework for Telegram Bot development.
|
||||
<a href="https://github.com/laraXgram/LaraGram">https://github.com/laraXgram/LaraGram</a></p>
|
||||
</li>
|
||||
<li><p><strong>BotAPI</strong>. SDK for the Telegram Bot API.<br><a href="https://github.com/TelegramSDK/BotAPI">https://github.com/TelegramSDK/BotAPI</a></p>
|
||||
<li>
|
||||
<p><strong>BotAPI</strong>. SDK for the Telegram Bot API.
|
||||
<a href="https://github.com/TelegramSDK/BotAPI">https://github.com/TelegramSDK/BotAPI</a></p>
|
||||
</li>
|
||||
<li><p><strong>TuriBot</strong>. A simple way to communicate with Telegram APIs in PHP.<br><a href="https://github.com/davtur19/TuriBot">https://github.com/davtur19/TuriBot</a></p>
|
||||
<li>
|
||||
<p><strong>TuriBot</strong>. A simple way to communicate with Telegram APIs in PHP.
|
||||
<a href="https://github.com/davtur19/TuriBot">https://github.com/davtur19/TuriBot</a></p>
|
||||
</li>
|
||||
<li><p><strong>TelegramBotsApi</strong>. SDK for Telegram Bot API.<br><a href="https://github.com/kuvardin/TelegramBotsApi">https://github.com/kuvardin/TelegramBotsApi</a></p>
|
||||
<li>
|
||||
<p><strong>TelegramBotsApi</strong>. SDK for Telegram Bot API.
|
||||
<a href="https://github.com/kuvardin/TelegramBotsApi">https://github.com/kuvardin/TelegramBotsApi</a></p>
|
||||
</li>
|
||||
<li><p><strong>PHP Telegram Bot</strong>. PHP Telegram Bot based on the official Telegram Bot API.<br><a href="https://github.com/php-telegram-bot/core">https://github.com/php-telegram-bot/core</a></p>
|
||||
<li>
|
||||
<p><strong>PHP Telegram Bot</strong>. PHP Telegram Bot based on the official Telegram Bot API.
|
||||
<a href="https://github.com/php-telegram-bot/core">https://github.com/php-telegram-bot/core</a></p>
|
||||
</li>
|
||||
<li><p><strong>Telegram Bot PHP</strong>. A library that makes using Telegram Bot API much easier.<br><a href="https://github.com/telegram-bot-php/core">https://github.com/telegram-bot-php/core</a></p>
|
||||
<li>
|
||||
<p><strong>Telegram Bot PHP</strong>. A library that makes using Telegram Bot API much easier.
|
||||
<a href="https://github.com/telegram-bot-php/core">https://github.com/telegram-bot-php/core</a></p>
|
||||
</li>
|
||||
<li><p><strong>PHP Telegram API</strong>. A complete async capable Telegram Bot API implementation for PHP7.<br><a href="https://github.com/unreal4u/telegram-api">https://github.com/unreal4u/telegram-api</a></p>
|
||||
<li>
|
||||
<p><strong>PHP Telegram API</strong>. A complete async capable Telegram Bot API implementation for PHP7.
|
||||
<a href="https://github.com/unreal4u/telegram-api">https://github.com/unreal4u/telegram-api</a></p>
|
||||
</li>
|
||||
<li><p><strong>Telegram Bot Api Base</strong>. Clear and simple Telegram Bot API.<br><a href="https://github.com/tg-bot-api/bot-api-base">https://github.com/tg-bot-api/bot-api-base</a></p>
|
||||
<li>
|
||||
<p><strong>Telegram Bot Api Base</strong>. Clear and simple Telegram Bot API.
|
||||
<a href="https://github.com/tg-bot-api/bot-api-base">https://github.com/tg-bot-api/bot-api-base</a></p>
|
||||
</li>
|
||||
<li><p><strong>NeleBot X Framework</strong>. Framework for Telegram Bot API.<br><a href="https://github.com/NeleB54Gold/NeleBotX">https://github.com/NeleB54Gold/NeleBotX</a></p>
|
||||
<li>
|
||||
<p><strong>NeleBot X Framework</strong>. Framework for Telegram Bot API.
|
||||
<a href="https://github.com/NeleB54Gold/NeleBotX">https://github.com/NeleB54Gold/NeleBotX</a></p>
|
||||
</li>
|
||||
<li><p><strong>Bot API PHP SDK</strong>. Telegram Bot API PHP SDK. Supports Laravel out of the box.<br><a href="https://github.com/irazasyed/telegram-bot-sdk">https://github.com/irazasyed/telegram-bot-sdk</a></p>
|
||||
<li>
|
||||
<p><strong>Bot API PHP SDK</strong>. Telegram Bot API PHP SDK. Supports Laravel out of the box.
|
||||
<a href="https://github.com/irazasyed/telegram-bot-sdk">https://github.com/irazasyed/telegram-bot-sdk</a></p>
|
||||
</li>
|
||||
<li><p><strong>TgBotLib</strong>. A library for creating Telegram Bots in PHP, based on the Telegram Bot API.<br><a href="https://git.n64.cc/nosial/libs/tgbot">https://git.n64.cc/nosial/libs/tgbot</a></p>
|
||||
<li>
|
||||
<p><strong>TgBotLib</strong>. A library for creating Telegram Bots in PHP, based on the Telegram Bot API.
|
||||
<a href="https://git.n64.cc/nosial/libs/tgbot">https://git.n64.cc/nosial/libs/tgbot</a></p>
|
||||
</li>
|
||||
<li><p><strong>PHP Telegram Bot Api</strong>. Native PHP Wrapper for Telegram BOT API.<br><a href="https://github.com/TelegramBot/Api">https://github.com/TelegramBot/Api</a></p>
|
||||
<li>
|
||||
<p><strong>PHP Telegram Bot Api</strong>. Native PHP Wrapper for Telegram BOT API.
|
||||
<a href="https://github.com/TelegramBot/Api">https://github.com/TelegramBot/Api</a></p>
|
||||
</li>
|
||||
<li><p><strong>NovaGram</strong>. An Object-Oriented PHP library for Telegram Bots.<br><a href="https://github.com/skrtdev/NovaGram">https://github.com/skrtdev/NovaGram</a></p>
|
||||
<li>
|
||||
<p><strong>NovaGram</strong>. An Object-Oriented PHP library for Telegram Bots.
|
||||
<a href="https://github.com/skrtdev/NovaGram">https://github.com/skrtdev/NovaGram</a></p>
|
||||
</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" name="go" href="#go"><i class="anchor-icon"></i></a>Go</h4>
|
||||
<h4><a class="anchor" href="#go" id="go" name="go"><i class="anchor-icon"></i></a>Go</h4>
|
||||
<ul>
|
||||
<li><p><strong>Golang Telegram Bot library</strong>. An autogenerated wrapper for the Telegram Bot API. Inspired by the python-telegram-bot library.<br><a href="https://github.com/paulsonoflars/gotgbot">https://github.com/paulsonoflars/gotgbot</a></p>
|
||||
<li>
|
||||
<p><strong>Golang Telegram Bot library</strong>. An autogenerated wrapper for the Telegram Bot API. Inspired by the python-telegram-bot library.
|
||||
<a href="https://github.com/paulsonoflars/gotgbot">https://github.com/paulsonoflars/gotgbot</a></p>
|
||||
</li>
|
||||
<li><p><strong>Telego</strong>. Telegram Bot API library.<br><a href="https://github.com/mymmrac/telego">https://github.com/mymmrac/telego</a></p>
|
||||
<li>
|
||||
<p><strong>Telego</strong>. Telegram Bot API library.
|
||||
<a href="https://github.com/mymmrac/telego">https://github.com/mymmrac/telego</a></p>
|
||||
</li>
|
||||
<li><p><strong>Golang Telegram Bot</strong>. Telegram Bot API Go framework.<br><a href="https://github.com/go-telegram/bot">https://github.com/go-telegram/bot</a></p>
|
||||
<li>
|
||||
<p><strong>Golang Telegram Bot</strong>. Telegram Bot API Go framework.
|
||||
<a href="https://github.com/go-telegram/bot">https://github.com/go-telegram/bot</a></p>
|
||||
</li>
|
||||
<li><p><strong>echotron</strong>. An elegant and concurrent library for the Telegram Bot API.<br><a href="https://github.com/NicoNex/echotron">https://github.com/NicoNex/echotron</a></p>
|
||||
<li>
|
||||
<p><strong>echotron</strong>. An elegant and concurrent library for the Telegram Bot API.
|
||||
<a href="https://github.com/NicoNex/echotron">https://github.com/NicoNex/echotron</a></p>
|
||||
</li>
|
||||
<li><p><strong>Telegram Bot API helper for Golang</strong>. A Telegram Bot API wrapper.<br><a href="https://github.com/meinside/telegram-bot-go">https://github.com/meinside/telegram-bot-go</a></p>
|
||||
<li>
|
||||
<p><strong>Telegram Bot API helper for Golang</strong>. A Telegram Bot API wrapper.
|
||||
<a href="https://github.com/meinside/telegram-bot-go">https://github.com/meinside/telegram-bot-go</a></p>
|
||||
</li>
|
||||
<li><p><strong>telebot</strong>. A Telegram bot framework.<br><a href="https://github.com/tucnak/telebot">https://github.com/tucnak/telebot</a></p>
|
||||
<li>
|
||||
<p><strong>telebot</strong>. A Telegram bot framework.
|
||||
<a href="https://github.com/tucnak/telebot">https://github.com/tucnak/telebot</a></p>
|
||||
</li>
|
||||
<li><p><strong>Telegram Bot API client for Golang</strong>. Telegram Bot API client library for golang.<br><a href="https://github.com/udev-21/ya-golang-tbot-api">https://github.com/udev-21/ya-golang-tbot-api</a></p>
|
||||
<li>
|
||||
<p><strong>Telegram Bot API client for Golang</strong>. Telegram Bot API client library for golang.
|
||||
<a href="https://github.com/udev-21/ya-golang-tbot-api">https://github.com/udev-21/ya-golang-tbot-api</a></p>
|
||||
</li>
|
||||
<li><p><strong>go-tg</strong>. Library for accessing Telegram Bot API, with batteries for building complex bots included.<br><a href="https://github.com/mr-linch/go-tg">https://github.com/mr-linch/go-tg</a></p>
|
||||
<li>
|
||||
<p><strong>go-tg</strong>. Library for accessing Telegram Bot API, with batteries for building complex bots included.
|
||||
<a href="https://github.com/mr-linch/go-tg">https://github.com/mr-linch/go-tg</a></p>
|
||||
</li>
|
||||
<li><p><strong>Telegram Bot API: Go implementation</strong>. A Telegram IM bots API implementation.<br><a href="https://github.com/temoon/telegram-bots-api">https://github.com/temoon/telegram-bots-api</a></p>
|
||||
<li>
|
||||
<p><strong>Telegram Bot API: Go implementation</strong>. A Telegram IM bots API implementation.
|
||||
<a href="https://github.com/temoon/telegram-bots-api">https://github.com/temoon/telegram-bots-api</a></p>
|
||||
</li>
|
||||
<li><p><strong>Telegrambot</strong>. Telegram Bot API in Go, but with more clean code.<br><a href="https://github.com/nickname76/telegrambot">https://github.com/nickname76/telegrambot</a></p>
|
||||
<li>
|
||||
<p><strong>Telegrambot</strong>. Telegram Bot API in Go, but with more clean code.
|
||||
<a href="https://github.com/nickname76/telegrambot">https://github.com/nickname76/telegrambot</a></p>
|
||||
</li>
|
||||
<li><p><strong>go-telegram-bot-api</strong>. Bindings for the Telegram Bot API.<br><a href="https://github.com/go-telegram-bot-api/telegram-bot-api">https://github.com/go-telegram-bot-api/telegram-bot-api</a></p>
|
||||
<li>
|
||||
<p><strong>go-telegram-bot-api</strong>. Bindings for the Telegram Bot API.
|
||||
<a href="https://github.com/go-telegram-bot-api/telegram-bot-api">https://github.com/go-telegram-bot-api/telegram-bot-api</a></p>
|
||||
</li>
|
||||
<li><p><strong>TgWrap</strong>. A library with Telegram Bot API bindings.<br><a href="https://github.com/rogozhka/tgwrap">https://github.com/rogozhka/tgwrap</a></p>
|
||||
<li>
|
||||
<p><strong>TgWrap</strong>. A library with Telegram Bot API bindings.
|
||||
<a href="https://github.com/rogozhka/tgwrap">https://github.com/rogozhka/tgwrap</a></p>
|
||||
</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" name="python" href="#python"><i class="anchor-icon"></i></a>Python</h4>
|
||||
<h4><a class="anchor" href="#python" id="python" name="python"><i class="anchor-icon"></i></a>Python</h4>
|
||||
<ul>
|
||||
<li><p><strong>python-telegram-bot</strong>. A wrapper you can't refuse.<br><a href="https://github.com/python-telegram-bot/python-telegram-bot">https://github.com/python-telegram-bot/python-telegram-bot</a></p>
|
||||
<li>
|
||||
<p><strong>python-telegram-bot</strong>. A wrapper you can't refuse.
|
||||
<a href="https://github.com/python-telegram-bot/python-telegram-bot">https://github.com/python-telegram-bot/python-telegram-bot</a></p>
|
||||
</li>
|
||||
<li><p><strong>pyTelegramBotAPI</strong>. A simple, but extensible Python implementation for the Telegram Bot API.<br><a href="https://github.com/eternnoir/pyTelegramBotAPI">https://github.com/eternnoir/pyTelegramBotAPI</a></p>
|
||||
<li>
|
||||
<p><strong>pyTelegramBotAPI</strong>. A simple, but extensible Python implementation for the Telegram Bot API.
|
||||
<a href="https://github.com/eternnoir/pyTelegramBotAPI">https://github.com/eternnoir/pyTelegramBotAPI</a></p>
|
||||
</li>
|
||||
<li><p><strong>AIOGram</strong>. A pretty simple and fully asynchronous library for Telegram Bot API written with asyncio and aiohttp.<br><a href="https://github.com/aiogram/aiogram">https://github.com/aiogram/aiogram</a></p>
|
||||
<li>
|
||||
<p><strong>AIOGram</strong>. A pretty simple and fully asynchronous library for Telegram Bot API written with asyncio and aiohttp.
|
||||
<a href="https://github.com/aiogram/aiogram">https://github.com/aiogram/aiogram</a></p>
|
||||
</li>
|
||||
<li><p><strong>TGramBot</strong>. A partially auto-generated and asynchronous Minimal Telegram Bot API framework.<br><a href="https://github.com/KeralaBots/TGramBot">https://github.com/KeralaBots/TGramBot</a></p>
|
||||
<li>
|
||||
<p><strong>TGramBot</strong>. A partially auto-generated and asynchronous Minimal Telegram Bot API framework.
|
||||
<a href="https://github.com/KeralaBots/TGramBot">https://github.com/KeralaBots/TGramBot</a></p>
|
||||
</li>
|
||||
<li><p><strong>OrigamiBot</strong>. A pythonic Telegram bot API library.<br><a href="https://github.com/cmd410/OrigamiBot">https://github.com/cmd410/OrigamiBot</a></p>
|
||||
<li>
|
||||
<p><strong>OrigamiBot</strong>. A pythonic Telegram bot API library.
|
||||
<a href="https://github.com/cmd410/OrigamiBot">https://github.com/cmd410/OrigamiBot</a></p>
|
||||
</li>
|
||||
<li><p><strong>pytgbot</strong>. A module to access the Telegram Bot API.<br><a href="https://github.com/luckydonald/pytgbot">https://github.com/luckydonald/pytgbot</a></p>
|
||||
<li>
|
||||
<p><strong>pytgbot</strong>. A module to access the Telegram Bot API.
|
||||
<a href="https://github.com/luckydonald/pytgbot">https://github.com/luckydonald/pytgbot</a></p>
|
||||
</li>
|
||||
<li><p><strong>teleflask</strong>. A framework based on flask and pytgbot.<br><a href="https://github.com/luckydonald/teleflask">https://github.com/luckydonald/teleflask</a></p>
|
||||
<li>
|
||||
<p><strong>teleflask</strong>. A framework based on flask and pytgbot.
|
||||
<a href="https://github.com/luckydonald/teleflask">https://github.com/luckydonald/teleflask</a></p>
|
||||
</li>
|
||||
<li><p><strong>telegram-text</strong>. A Python markup module, which can be used with other frameworks.<br><a href="https://github.com/SKY-ALIN/telegram-text">https://github.com/SKY-ALIN/telegram-text</a></p>
|
||||
<li>
|
||||
<p><strong>telegram-text</strong>. A Python markup module, which can be used with other frameworks.
|
||||
<a href="https://github.com/SKY-ALIN/telegram-text">https://github.com/SKY-ALIN/telegram-text</a></p>
|
||||
</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" name="rust" href="#rust"><i class="anchor-icon"></i></a>Rust</h4>
|
||||
<h4><a class="anchor" href="#rust" id="rust" name="rust"><i class="anchor-icon"></i></a>Rust</h4>
|
||||
<ul>
|
||||
<li><p><strong>Frankenstein</strong>. A Telegram Bot API client.<br><a href="https://github.com/ayrat555/frankenstein">https://github.com/ayrat555/frankenstein</a></p>
|
||||
<li>
|
||||
<p><strong>Frankenstein</strong>. A Telegram Bot API client.
|
||||
<a href="https://github.com/ayrat555/frankenstein">https://github.com/ayrat555/frankenstein</a></p>
|
||||
</li>
|
||||
<li><p><strong>teloxide</strong>. An elegant Telegram bots framework.<br><a href="https://github.com/teloxide/teloxide">https://github.com/teloxide/teloxide</a></p>
|
||||
<li>
|
||||
<p><strong>teloxide</strong>. An elegant Telegram bots framework.
|
||||
<a href="https://github.com/teloxide/teloxide">https://github.com/teloxide/teloxide</a></p>
|
||||
</li>
|
||||
<li><p><strong>MOBOT</strong>. A Telegram Bot Library in Rust.<br><a href="https://github.com/0xfe/mobot">https://github.com/0xfe/mobot</a></p>
|
||||
<li>
|
||||
<p><strong>MOBOT</strong>. A Telegram Bot Library in Rust.
|
||||
<a href="https://github.com/0xfe/mobot">https://github.com/0xfe/mobot</a></p>
|
||||
</li>
|
||||
<li><p><strong>Ferrisgram</strong>. An asynchronous autogenerated wrapper for the Telegram Bot API.<br><a href="https://github.com/ferrisgram/ferrisgram">https://github.com/ferrisgram/ferrisgram</a></p>
|
||||
<li>
|
||||
<p><strong>Ferrisgram</strong>. An asynchronous autogenerated wrapper for the Telegram Bot API.
|
||||
<a href="https://github.com/ferrisgram/ferrisgram">https://github.com/ferrisgram/ferrisgram</a></p>
|
||||
</li>
|
||||
<li><p><strong>tgbotapi</strong>. A library for using the Telegram Bot API.<br><a href="https://github.com/Syfaro/tgbotapi-rs">https://github.com/Syfaro/tgbotapi-rs</a></p>
|
||||
<li>
|
||||
<p><strong>tgbotapi</strong>. A library for using the Telegram Bot API.
|
||||
<a href="https://github.com/Syfaro/tgbotapi-rs">https://github.com/Syfaro/tgbotapi-rs</a></p>
|
||||
</li>
|
||||
<li><p><strong>carapax</strong>. A Telegram Bot API framework.<br><a href="https://github.com/tg-rs/carapax">https://github.com/tg-rs/carapax</a></p>
|
||||
<li>
|
||||
<p><strong>carapax</strong>. A Telegram Bot API framework.
|
||||
<a href="https://github.com/tg-rs/carapax">https://github.com/tg-rs/carapax</a></p>
|
||||
</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" name="kotlin" href="#kotlin"><i class="anchor-icon"></i></a>Kotlin</h4>
|
||||
<h4><a class="anchor" href="#kotlin" id="kotlin" name="kotlin"><i class="anchor-icon"></i></a>Kotlin</h4>
|
||||
<ul>
|
||||
<li><p><strong>TelegramBotAPI</strong>. Type-safe library for work with Telegram Bot API.<br><a href="https://github.com/InsanusMokrassar/TelegramBotAPI">https://github.com/InsanusMokrassar/TelegramBotAPI</a></p>
|
||||
<li>
|
||||
<p><strong>TelegramBotAPI</strong>. Type-safe library for work with Telegram Bot API.
|
||||
<a href="https://github.com/InsanusMokrassar/TelegramBotAPI">https://github.com/InsanusMokrassar/TelegramBotAPI</a></p>
|
||||
</li>
|
||||
<li><p><strong>Kotlin Telegram Bot</strong>. Telegram Bot API wrapper, with handy Kotlin DSL.<br><a href="https://github.com/vendelieu/telegram-bot">https://github.com/vendelieu/telegram-bot</a></p>
|
||||
<li>
|
||||
<p><strong>Kotlin Telegram Bot</strong>. Telegram Bot API wrapper, with handy Kotlin DSL.
|
||||
<a href="https://github.com/vendelieu/telegram-bot">https://github.com/vendelieu/telegram-bot</a></p>
|
||||
</li>
|
||||
<li><p><strong>Kotlin Telegram Bot</strong>. A wrapper for the Telegram Bot API.<br><a href="https://github.com/kotlin-telegram-bot/kotlin-telegram-bot">https://github.com/kotlin-telegram-bot/kotlin-telegram-bot</a></p>
|
||||
<li>
|
||||
<p><strong>Kotlin Telegram Bot</strong>. A wrapper for the Telegram Bot API.
|
||||
<a href="https://github.com/kotlin-telegram-bot/kotlin-telegram-bot">https://github.com/kotlin-telegram-bot/kotlin-telegram-bot</a></p>
|
||||
</li>
|
||||
<li><p><strong>Telegram Bot API in Kotlin Multiplatform</strong>. Telegram Bot API in Kotlin.<br><a href="https://github.com/omarmiatello/telegram">https://github.com/omarmiatello/telegram</a></p>
|
||||
<li>
|
||||
<p><strong>Telegram Bot API in Kotlin Multiplatform</strong>. Telegram Bot API in Kotlin.
|
||||
<a href="https://github.com/omarmiatello/telegram">https://github.com/omarmiatello/telegram</a></p>
|
||||
</li>
|
||||
<li><p><strong>kt-telegram-bot</strong>. Telegram Bot API library for Kotlin language.<br><a href="https://github.com/elbekD/kt-telegram-bot">https://github.com/elbekD/kt-telegram-bot</a></p>
|
||||
<li>
|
||||
<p><strong>kt-telegram-bot</strong>. Telegram Bot API library for Kotlin language.
|
||||
<a href="https://github.com/elbekD/kt-telegram-bot">https://github.com/elbekD/kt-telegram-bot</a></p>
|
||||
</li>
|
||||
<li><p><strong>Iris Telegram API</strong>. Yet another Telegram API bot created with Kotlin.<br><a href="https://github.com/iris2iris/iris-telegram-api">https://github.com/iris2iris/iris-telegram-api</a></p>
|
||||
<li>
|
||||
<p><strong>Iris Telegram API</strong>. Yet another Telegram API bot created with Kotlin.
|
||||
<a href="https://github.com/iris2iris/iris-telegram-api">https://github.com/iris2iris/iris-telegram-api</a></p>
|
||||
</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" name="node-js" href="#node-js"><i class="anchor-icon"></i></a>Node.js</h4>
|
||||
<h4><a class="anchor" href="#nodejs" id="nodejs" name="nodejs"><i class="anchor-icon"></i></a>Node.js</h4>
|
||||
<ul>
|
||||
<li><p><strong>Telegraf</strong>. Modern Telegram Bot Framework for Node.js.<br><a href="https://github.com/telegraf/telegraf">https://github.com/telegraf/telegraf</a></p>
|
||||
<li>
|
||||
<p><strong>Telegraf</strong>. Modern Telegram Bot Framework for Node.js.
|
||||
<a href="https://github.com/telegraf/telegraf">https://github.com/telegraf/telegraf</a></p>
|
||||
</li>
|
||||
<li><p><strong>Node-Telegram-bot</strong>. Node.js module to interact with the official Telegram Bot API.<br><a href="https://github.com/yagop/node-telegram-bot-api">https://github.com/yagop/node-telegram-bot-api</a></p>
|
||||
<li>
|
||||
<p><strong>Node-Telegram-bot</strong>. Node.js module to interact with the official Telegram Bot API.
|
||||
<a href="https://github.com/yagop/node-telegram-bot-api">https://github.com/yagop/node-telegram-bot-api</a></p>
|
||||
</li>
|
||||
<li><p><strong>Telebot</strong>. The easy way to write Telegram bots.<br><a href="https://github.com/mullwar/telebot">https://github.com/mullwar/telebot</a></p>
|
||||
<li>
|
||||
<p><strong>Telebot</strong>. The easy way to write Telegram bots.
|
||||
<a href="https://github.com/mullwar/telebot">https://github.com/mullwar/telebot</a></p>
|
||||
</li>
|
||||
<li><p><strong>Slimbot</strong>. A fuss-free, thin wrapper around Telegram Bot API for Node.js. No frills.<br><a href="https://github.com/edisonchee/slimbot">https://github.com/edisonchee/slimbot</a></p>
|
||||
<li>
|
||||
<p><strong>Slimbot</strong>. A fuss-free, thin wrapper around Telegram Bot API for Node.js. No frills.
|
||||
<a href="https://github.com/edisonchee/slimbot">https://github.com/edisonchee/slimbot</a></p>
|
||||
</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" name="net" href="#net"><i class="anchor-icon"></i></a>.NET</h4>
|
||||
<h4><a class="anchor" href="#net" id="net" name="net"><i class="anchor-icon"></i></a>.NET</h4>
|
||||
<ul>
|
||||
<li><p><strong>Telegram.bot</strong>. .NET Client for Telegram Bot API.<br><a href="https://github.com/TelegramBots/Telegram.Bot">https://github.com/TelegramBots/Telegram.Bot</a></p>
|
||||
<li>
|
||||
<p><strong>Telegram.bot</strong>. .NET Client for Telegram Bot API.
|
||||
<a href="https://github.com/TelegramBots/Telegram.Bot">https://github.com/TelegramBots/Telegram.Bot</a></p>
|
||||
</li>
|
||||
<li><p><strong>Telegram.Bots</strong>. A .NET 5 wrapper for the Telegram Bot API.<br><a href="https://github.com/TelegramBotsAPI/Telegram.Bots">https://github.com/TelegramBotsAPI/Telegram.Bots</a></p>
|
||||
<li>
|
||||
<p><strong>Telegram.Bots</strong>. A .NET 5 wrapper for the Telegram Bot API.
|
||||
<a href="https://github.com/TelegramBotsAPI/Telegram.Bots">https://github.com/TelegramBotsAPI/Telegram.Bots</a></p>
|
||||
</li>
|
||||
<li><p><strong>RxTelegram.Bot</strong>. RxTelegram uses a reactive approach to make Updates available.<br><a href="https://github.com/RxTelegram/RxTelegram.Bot">https://github.com/RxTelegram/RxTelegram.Bot</a></p>
|
||||
<li>
|
||||
<p><strong>RxTelegram.Bot</strong>. RxTelegram uses a reactive approach to make Updates available.
|
||||
<a href="https://github.com/RxTelegram/RxTelegram.Bot">https://github.com/RxTelegram/RxTelegram.Bot</a></p>
|
||||
</li>
|
||||
<li><p><strong>Telegram.BotAPI for NET</strong>. One of the most complete libraries available to interact with the Telegram Bot API.<br><a href="https://github.com/Eptagone/Telegram.BotAPI">https://github.com/Eptagone/Telegram.BotAPI</a></p>
|
||||
<li>
|
||||
<p><strong>Telegram.BotAPI for NET</strong>. One of the most complete libraries available to interact with the Telegram Bot API.
|
||||
<a href="https://github.com/Eptagone/Telegram.BotAPI">https://github.com/Eptagone/Telegram.BotAPI</a></p>
|
||||
</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" name="swift" href="#swift"><i class="anchor-icon"></i></a>Swift</h4>
|
||||
<h4><a class="anchor" href="#swift" id="swift" name="swift"><i class="anchor-icon"></i></a>Swift</h4>
|
||||
<ul>
|
||||
<li><p><strong>Telegram Vapor Bot</strong>. The wrapper for the Telegram Bot API written in Swift with Vapor.<br><a href="https://github.com/nerzh/telegram-vapor-bot">https://github.com/nerzh/telegram-vapor-bot</a></p>
|
||||
<li>
|
||||
<p><strong>Telegram Vapor Bot</strong>. The wrapper for the Telegram Bot API written in Swift with Vapor.
|
||||
<a href="https://github.com/nerzh/telegram-vapor-bot">https://github.com/nerzh/telegram-vapor-bot</a></p>
|
||||
</li>
|
||||
<li><p><strong>telegram-bot-swift</strong>. Telegram Bot SDK for Swift.<br><a href="https://github.com/rapierorg/telegram-bot-swift">https://github.com/rapierorg/telegram-bot-swift</a></p>
|
||||
<li>
|
||||
<p><strong>telegram-bot-swift</strong>. Telegram Bot SDK for Swift.
|
||||
<a href="https://github.com/rapierorg/telegram-bot-swift">https://github.com/rapierorg/telegram-bot-swift</a></p>
|
||||
</li>
|
||||
<li><p><strong>Telegrammer</strong>. Telegram Bot Framework written in Swift 5.1 with SwiftNIO network framework.<br><a href="https://github.com/givip/Telegrammer">https://github.com/givip/Telegrammer</a></p>
|
||||
<li>
|
||||
<p><strong>Telegrammer</strong>. Telegram Bot Framework written in Swift 5.1 with SwiftNIO network framework.
|
||||
<a href="https://github.com/givip/Telegrammer">https://github.com/givip/Telegrammer</a></p>
|
||||
</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" name="typescript" href="#typescript"><i class="anchor-icon"></i></a>TypeScript</h4>
|
||||
<h4><a class="anchor" href="#typescript" id="typescript" name="typescript"><i class="anchor-icon"></i></a>TypeScript</h4>
|
||||
<ul>
|
||||
<li><p><strong>grammY</strong>. The Telegram Bot Framework.<br><a href="https://github.com/grammyjs/grammY">https://github.com/grammyjs/grammY</a></p>
|
||||
<li>
|
||||
<p><strong>grammY</strong>. The Telegram Bot Framework.
|
||||
<a href="https://github.com/grammyjs/grammY">https://github.com/grammyjs/grammY</a></p>
|
||||
</li>
|
||||
<li><p><strong>Nestgram</strong>. Framework for working with Telegram Bot API on TypeScript like Nest.js.<br><a href="https://github.com/Degreet/nestgram">https://github.com/Degreet/nestgram</a></p>
|
||||
<li>
|
||||
<p><strong>Nestgram</strong>. Framework for working with Telegram Bot API on TypeScript like Nest.js.
|
||||
<a href="https://github.com/Degreet/nestgram">https://github.com/Degreet/nestgram</a></p>
|
||||
</li>
|
||||
<li><p><strong>puregram</strong>. Powerful and modern telegram bot api sdk for node.js and typescript.<br><a href="https://github.com/nitreojs/puregram">https://github.com/nitreojs/puregram</a></p>
|
||||
<li>
|
||||
<p><strong>puregram</strong>. Powerful and modern telegram bot api sdk for node.js and typescript.
|
||||
<a href="https://github.com/nitreojs/puregram">https://github.com/nitreojs/puregram</a></p>
|
||||
</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" name="java" href="#java"><i class="anchor-icon"></i></a>Java</h4>
|
||||
<h4><a class="anchor" href="#java" id="java" name="java"><i class="anchor-icon"></i></a>Java</h4>
|
||||
<ul>
|
||||
<li><p><strong>TelegramBots</strong>. A simple to use library to create Telegram Bots.<br><a href="https://github.com/rubenlagus/TelegramBots">https://github.com/rubenlagus/TelegramBots</a></p>
|
||||
<li>
|
||||
<p><strong>TelegramBots</strong>. A simple to use library to create Telegram Bots.
|
||||
<a href="https://github.com/rubenlagus/TelegramBots">https://github.com/rubenlagus/TelegramBots</a></p>
|
||||
</li>
|
||||
<li><p><strong>Java API</strong>. Telegram Bot API for Java.<br><a href="https://github.com/pengrad/java-telegram-bot-api">https://github.com/pengrad/java-telegram-bot-api</a></p>
|
||||
<li>
|
||||
<p><strong>Java API</strong>. Telegram Bot API for Java.
|
||||
<a href="https://github.com/pengrad/java-telegram-bot-api">https://github.com/pengrad/java-telegram-bot-api</a></p>
|
||||
</li>
|
||||
<li><p><strong>ReBot</strong>. A Java EE Telegram Bot API.<br><a href="https://github.com/rebasing-xyz/rebot">https://github.com/rebasing-xyz/rebot</a></p>
|
||||
<li>
|
||||
<p><strong>ReBot</strong>. A Java EE Telegram Bot API.
|
||||
<a href="https://github.com/rebasing-xyz/rebot">https://github.com/rebasing-xyz/rebot</a></p>
|
||||
</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" name="scala" href="#scala"><i class="anchor-icon"></i></a>Scala</h4>
|
||||
<h4><a class="anchor" href="#scala" id="scala" name="scala"><i class="anchor-icon"></i></a>Scala</h4>
|
||||
<ul>
|
||||
<li><p><strong>canoe</strong>. Functional Telegram Bot API.<br><a href="https://github.com/augustjune/canoe">https://github.com/augustjune/canoe</a></p>
|
||||
<li>
|
||||
<p><strong>canoe</strong>. Functional Telegram Bot API.
|
||||
<a href="https://github.com/augustjune/canoe">https://github.com/augustjune/canoe</a></p>
|
||||
</li>
|
||||
<li><p><strong>bot4s.telegram</strong>. Simple, extensible, strongly-typed wrapper for the Telegram Bot API.<br><a href="https://github.com/bot4s/telegram">https://github.com/bot4s/telegram</a></p>
|
||||
<li>
|
||||
<p><strong>bot4s.telegram</strong>. Simple, extensible, strongly-typed wrapper for the Telegram Bot API.
|
||||
<a href="https://github.com/bot4s/telegram">https://github.com/bot4s/telegram</a></p>
|
||||
</li>
|
||||
<li><p><strong>F[Tg] - Telegramium</strong>. Pure functional Telegram Bot API implementation.<br><a href="https://github.com/apimorphism/telegramium">https://github.com/apimorphism/telegramium</a></p>
|
||||
<li>
|
||||
<p><strong>F[Tg] - Telegramium</strong>. Pure functional Telegram Bot API implementation.
|
||||
<a href="https://github.com/apimorphism/telegramium">https://github.com/apimorphism/telegramium</a></p>
|
||||
</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" name="ruby" href="#ruby"><i class="anchor-icon"></i></a>Ruby</h4>
|
||||
<h4><a class="anchor" href="#ruby" id="ruby" name="ruby"><i class="anchor-icon"></i></a>Ruby</h4>
|
||||
<ul>
|
||||
<li><p><strong>Telegram::Bot</strong>. Ruby gem for building Telegram Bot with optional Rails integration.<br><a href="https://github.com/telegram-bot-rb/telegram-bot">https://github.com/telegram-bot-rb/telegram-bot</a></p>
|
||||
<li>
|
||||
<p><strong>Telegram::Bot</strong>. Ruby gem for building Telegram Bot with optional Rails integration.
|
||||
<a href="https://github.com/telegram-bot-rb/telegram-bot">https://github.com/telegram-bot-rb/telegram-bot</a></p>
|
||||
</li>
|
||||
<li><p><strong>telegram-bot-ruby</strong>. Ruby wrapper for Telegram's Bot API.<br><a href="https://github.com/atipugin/telegram-bot-ruby">https://github.com/atipugin/telegram-bot-ruby</a></p>
|
||||
<li>
|
||||
<p><strong>telegram-bot-ruby</strong>. Ruby wrapper for Telegram's Bot API.
|
||||
<a href="https://github.com/atipugin/telegram-bot-ruby">https://github.com/atipugin/telegram-bot-ruby</a></p>
|
||||
</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" name="other-languages" href="#other-languages"><i class="anchor-icon"></i></a>Other Languages</h4>
|
||||
<h4><a class="anchor" href="#other-languages" id="other-languages" name="other-languages"><i class="anchor-icon"></i></a>Other Languages</h4>
|
||||
<ul>
|
||||
<li><p>Elixir. <strong>ExGram</strong>. Telegram Bot API low level API and framework.<br><a href="https://github.com/rockneurotiko/ex_gram">https://github.com/rockneurotiko/ex_gram</a></p>
|
||||
<li>
|
||||
<p>Elixir. <strong>ExGram</strong>. Telegram Bot API low level API and framework.
|
||||
<a href="https://github.com/rockneurotiko/ex_gram">https://github.com/rockneurotiko/ex_gram</a></p>
|
||||
</li>
|
||||
<li><p>Elixir. <strong>Nadia</strong>. Telegram Bot API Wrapper.<br><a href="https://github.com/zhyu/nadia">https://github.com/zhyu/nadia</a></p>
|
||||
<li>
|
||||
<p>Elixir. <strong>Nadia</strong>. Telegram Bot API Wrapper.
|
||||
<a href="https://github.com/zhyu/nadia">https://github.com/zhyu/nadia</a></p>
|
||||
</li>
|
||||
<li><p>C++. <strong>tgbot-cpp</strong>. A library for Telegram Bot API.<br><a href="https://github.com/reo7sp/tgbot-cpp">https://github.com/reo7sp/tgbot-cpp</a></p>
|
||||
<li>
|
||||
<p>C++. <strong>tgbot-cpp</strong>. A library for Telegram Bot API.
|
||||
<a href="https://github.com/reo7sp/tgbot-cpp">https://github.com/reo7sp/tgbot-cpp</a></p>
|
||||
</li>
|
||||
<li><p>C++. <strong>tgbot</strong>. A library for Telegram Bot API with generated API types and methods.<br><a href="https://github.com/egorpugin/tgbot">https://github.com/egorpugin/tgbot</a></p>
|
||||
<li>
|
||||
<p>C++. <strong>tgbot</strong>. A library for Telegram Bot API with generated API types and methods.
|
||||
<a href="https://github.com/egorpugin/tgbot">https://github.com/egorpugin/tgbot</a></p>
|
||||
</li>
|
||||
<li><p>Dart. <strong>TeleDart</strong>. A library interfacing with the latest Telegram Bot API.<br><a href="https://github.com/DinoLeung/TeleDart">https://github.com/DinoLeung/TeleDart</a></p>
|
||||
<li>
|
||||
<p>Dart. <strong>TeleDart</strong>. A library interfacing with the latest Telegram Bot API.
|
||||
<a href="https://github.com/DinoLeung/TeleDart">https://github.com/DinoLeung/TeleDart</a></p>
|
||||
</li>
|
||||
<li><p>Pascal. <strong>TGBotMini</strong>. Telegram Bot Mini API.<br><a href="https://github.com/HemulGM/TGBotMini">https://github.com/HemulGM/TGBotMini</a></p>
|
||||
<li>
|
||||
<p>Pascal. <strong>TGBotMini</strong>. Telegram Bot Mini API.
|
||||
<a href="https://github.com/HemulGM/TGBotMini">https://github.com/HemulGM/TGBotMini</a></p>
|
||||
</li>
|
||||
<li><p>Clojure. <strong>telegrambot-lib</strong>. A library for interacting with the Telegram Bot API.<br><a href="https://github.com/wdhowe/telegrambot-lib">https://github.com/wdhowe/telegrambot-lib</a></p>
|
||||
<li>
|
||||
<p>Clojure. <strong>telegrambot-lib</strong>. A library for interacting with the Telegram Bot API.
|
||||
<a href="https://github.com/wdhowe/telegrambot-lib">https://github.com/wdhowe/telegrambot-lib</a></p>
|
||||
</li>
|
||||
<li><p>Lua. <strong>telegram-bot-lua</strong>. A feature-filled Telegram Bot API library.<br><a href="https://github.com/wrxck/telegram-bot-lua">https://github.com/wrxck/telegram-bot-lua</a></p>
|
||||
<li>
|
||||
<p>Lua. <strong>telegram-bot-lua</strong>. A feature-filled Telegram Bot API library.
|
||||
<a href="https://github.com/wrxck/telegram-bot-lua">https://github.com/wrxck/telegram-bot-lua</a></p>
|
||||
</li>
|
||||
<li><p>OCaml. <strong>TelegraML</strong>. A library for creating bots for Telegram.<br><a href="https://github.com/nv-vn/TelegraML">https://github.com/nv-vn/TelegraML</a></p>
|
||||
<li>
|
||||
<p>OCaml. <strong>TelegraML</strong>. A library for creating bots for Telegram.
|
||||
<a href="https://github.com/nv-vn/TelegraML">https://github.com/nv-vn/TelegraML</a></p>
|
||||
</li>
|
||||
<li><p>Haskell. <strong>haskell-telegram-api</strong>. High-level bindings to the Telegram Bot API based on <a href="https://haskell-servant.github.io/">servant</a> library.<br><a href="https://github.com/klappvisor/haskell-telegram-api">https://github.com/klappvisor/haskell-telegram-api</a></p>
|
||||
<li>
|
||||
<p>Haskell. <strong>haskell-telegram-api</strong>. High-level bindings to the Telegram Bot API based on <a href="https://haskell-servant.github.io/">servant</a> library.
|
||||
<a href="https://github.com/klappvisor/haskell-telegram-api">https://github.com/klappvisor/haskell-telegram-api</a></p>
|
||||
</li>
|
||||
<li><p>Perl. <strong>Telegram Bot</strong>. A genuine Perl 6 client for the Telegram's Bot API.<br><a href="https://github.com/GildedHonour/TelegramBot">https://github.com/GildedHonour/TelegramBot</a></p>
|
||||
<li>
|
||||
<p>Perl. <strong>Telegram Bot</strong>. A genuine Perl 6 client for the Telegram's Bot API.
|
||||
<a href="https://github.com/GildedHonour/TelegramBot">https://github.com/GildedHonour/TelegramBot</a></p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</ul></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>messageEntityMention</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Message entity mentioning the current user">
|
||||
<meta property="description" content="Message entity mentioning a user by @username; messageEntityMentionName can also be used to mention users by their ID.">
|
||||
<meta property="og:title" content="messageEntityMention">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Message entity mentioning the current user">
|
||||
<meta property="og:description" content="Message entity mentioning a user by @username; messageEntityMentionName can also be used to mention users by their ID.">
|
||||
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
|
||||
|
@ -84,7 +84,9 @@
|
|||
<h4><a class="anchor" href="#styled-text-with-message-entities" id="styled-text-with-message-entities" name="styled-text-with-message-entities"><i class="anchor-icon"></i></a><a href="/api/entities">Styled text with message entities</a></h4>
|
||||
<p>How to create styled text with message entities</p>
|
||||
<h4><a class="anchor" href="#mentions" id="mentions" name="mentions"><i class="anchor-icon"></i></a><a href="/api/mentions">Mentions</a></h4>
|
||||
<p>Telegram allows mentioning other users in case of urgent duckling matters, and quickly navigating to those mentions in order to read them as swiftly as possible.</p></div>
|
||||
<p>Telegram allows mentioning other users in case of urgent duckling matters, and quickly navigating to those mentions in order to read them as swiftly as possible.</p>
|
||||
<h4><a class="anchor" href="#messageentitymentionname" id="messageentitymentionname" name="messageentitymentionname"><i class="anchor-icon"></i></a><a href="/constructor/messageEntityMentionName">messageEntityMentionName</a></h4>
|
||||
<p>Message entity representing a <a href="/api/mentions">user mention</a>: for <em>creating</em> a mention use <a href="/constructor/inputMessageEntityMentionName">inputMessageEntityMentionName</a>.</p></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -153,6 +153,11 @@
|
|||
<td>SMS_CODE_CREATE_FAILED</td>
|
||||
<td>An error occurred while creating the SMS code.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>Sorry, too many invalid attempts to enter your password. Please try again later.</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
|
||||
|
|
|
@ -149,6 +149,11 @@
|
|||
<td>You have joined too many channels/supergroups.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>500</td>
|
||||
<td>CHANNEL_ID_GENERATE_FAILED</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHAT_ABOUT_TOO_LONG</td>
|
||||
<td>Chat about too long.</td>
|
||||
|
@ -159,6 +164,11 @@
|
|||
<td>No chat title provided.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>TTL_PERIOD_INVALID</td>
|
||||
<td>The specified TTL period is invalid.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>406</td>
|
||||
<td>USER_RESTRICTED</td>
|
||||
<td>You're spamreported, you can't create channels or chats.</td>
|
||||
|
|
|
@ -128,6 +128,11 @@
|
|||
<td>CHANNEL_INVALID</td>
|
||||
<td>The provided channel is invalid.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>403</td>
|
||||
<td>CHAT_WRITE_FORBIDDEN</td>
|
||||
<td>You can't write in this chat.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3><a class="anchor" href="#bots-can-use-this-method" id="bots-can-use-this-method" name="bots-can-use-this-method"><i class="anchor-icon"></i></a>Bots can use this method</h3>
|
||||
|
|
|
@ -116,7 +116,7 @@
|
|||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHAT_NOT_MODIFIED</td>
|
||||
<td>The pinned message wasn't modified.</td>
|
||||
<td>No changes were made to chat information because the new information you passed is identical to the current information.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>403</td>
|
||||
|
|
|
@ -82,6 +82,28 @@
|
|||
</table>
|
||||
<h3><a class="anchor" href="#result" id="result" name="result"><i class="anchor-icon"></i></a>Result</h3>
|
||||
<p><a href="/type/messages.AffectedHistory">messages.AffectedHistory</a></p>
|
||||
<h3><a class="anchor" href="#possible-errors" id="possible-errors" name="possible-errors"><i class="anchor-icon"></i></a>Possible errors</h3>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Code</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHANNEL_INVALID</td>
|
||||
<td>The provided channel is invalid.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>TOPIC_ID_INVALID</td>
|
||||
<td>The specified topic ID is invalid.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3><a class="anchor" href="#bots-can-use-this-method" id="bots-can-use-this-method" name="bots-can-use-this-method"><i class="anchor-icon"></i></a>Bots can use this method</h3>
|
||||
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
|
||||
<h4><a class="anchor" href="#forums" id="forums" name="forums"><i class="anchor-icon"></i></a><a href="/api/forum">Forums</a></h4>
|
||||
|
|
|
@ -119,6 +119,11 @@
|
|||
<td>You must be an admin in this chat to do this.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHAT_NOT_MODIFIED</td>
|
||||
<td>No changes were made to chat information because the new information you passed is identical to the current information.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>403</td>
|
||||
<td>CHAT_WRITE_FORBIDDEN</td>
|
||||
<td>You can't write in this chat.</td>
|
||||
|
|
|
@ -106,7 +106,7 @@
|
|||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHAT_NOT_MODIFIED</td>
|
||||
<td>The pinned message wasn't modified.</td>
|
||||
<td>No changes were made to chat information because the new information you passed is identical to the current information.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
|
|
|
@ -116,7 +116,7 @@
|
|||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHAT_NOT_MODIFIED</td>
|
||||
<td>The pinned message wasn't modified.</td>
|
||||
<td>No changes were made to chat information because the new information you passed is identical to the current information.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>403</td>
|
||||
|
@ -148,6 +148,11 @@
|
|||
<td>PHOTO_INVALID</td>
|
||||
<td>Photo invalid.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>STICKER_MIME_INVALID</td>
|
||||
<td>The specified sticker MIME type is invalid.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3><a class="anchor" href="#bots-can-use-this-method" id="bots-can-use-this-method" name="bots-can-use-this-method"><i class="anchor-icon"></i></a>Bots can use this method</h3>
|
||||
|
|
|
@ -116,7 +116,7 @@
|
|||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHAT_NOT_MODIFIED</td>
|
||||
<td>The pinned message wasn't modified.</td>
|
||||
<td>No changes were made to chat information because the new information you passed is identical to the current information.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
|
|
|
@ -129,7 +129,6 @@
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3><a class="anchor" href="#bots-can-use-this-method" id="bots-can-use-this-method" name="bots-can-use-this-method"><i class="anchor-icon"></i></a>Bots can use this method</h3>
|
||||
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
|
||||
<h4><a class="anchor" href="#pagination-in-the-api" id="pagination-in-the-api" name="pagination-in-the-api"><i class="anchor-icon"></i></a><a href="/api/offsets">Pagination in the API</a></h4>
|
||||
<p>How to fetch results from large lists of objects.</p>
|
||||
|
|
|
@ -82,6 +82,33 @@
|
|||
</table>
|
||||
<h3><a class="anchor" href="#result" id="result" name="result"><i class="anchor-icon"></i></a>Result</h3>
|
||||
<p><a href="/type/messages.ForumTopics">messages.ForumTopics</a></p>
|
||||
<h3><a class="anchor" href="#possible-errors" id="possible-errors" name="possible-errors"><i class="anchor-icon"></i></a>Possible errors</h3>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Code</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHANNEL_FORUM_MISSING</td>
|
||||
<td>This supergroup is not a forum.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHANNEL_INVALID</td>
|
||||
<td>The provided channel is invalid.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>TOPICS_EMPTY</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3><a class="anchor" href="#bots-can-use-this-method" id="bots-can-use-this-method" name="bots-can-use-this-method"><i class="anchor-icon"></i></a>Bots can use this method</h3></div>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -105,7 +105,7 @@
|
|||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHAT_NOT_MODIFIED</td>
|
||||
<td>The pinned message wasn't modified.</td>
|
||||
<td>No changes were made to chat information because the new information you passed is identical to the current information.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
|
|
|
@ -134,6 +134,11 @@
|
|||
<td>You have successfully requested to join this chat or channel.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>500</td>
|
||||
<td>MEMBER_CHAT_ADD_FAILED</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>MSG_ID_INVALID</td>
|
||||
<td>Invalid message ID provided.</td>
|
||||
|
|
|
@ -111,7 +111,7 @@
|
|||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHAT_NOT_MODIFIED</td>
|
||||
<td>The pinned message wasn't modified.</td>
|
||||
<td>No changes were made to chat information because the new information you passed is identical to the current information.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
|
|
|
@ -126,7 +126,7 @@
|
|||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHAT_NOT_MODIFIED</td>
|
||||
<td>The pinned message wasn't modified.</td>
|
||||
<td>No changes were made to chat information because the new information you passed is identical to the current information.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
|
|
|
@ -116,7 +116,7 @@
|
|||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHAT_NOT_MODIFIED</td>
|
||||
<td>The pinned message wasn't modified.</td>
|
||||
<td>No changes were made to chat information because the new information you passed is identical to the current information.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
|
|
|
@ -111,7 +111,7 @@
|
|||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHAT_NOT_MODIFIED</td>
|
||||
<td>The pinned message wasn't modified.</td>
|
||||
<td>No changes were made to chat information because the new information you passed is identical to the current information.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
|
|
|
@ -100,6 +100,16 @@
|
|||
<tbody>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHANNEL_PRIVATE</td>
|
||||
<td>You haven't joined this channel/supergroup.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHAT_ADMIN_REQUIRED</td>
|
||||
<td>You must be an admin in this chat to do this.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>USERNAMES_ACTIVE_TOO_MUCH</td>
|
||||
<td>The maximum number of active usernames was reached.</td>
|
||||
</tr>
|
||||
|
|
|
@ -116,7 +116,7 @@
|
|||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHAT_NOT_MODIFIED</td>
|
||||
<td>The pinned message wasn't modified.</td>
|
||||
<td>No changes were made to chat information because the new information you passed is identical to the current information.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>403</td>
|
||||
|
|
|
@ -98,6 +98,11 @@
|
|||
<td>CHANNEL_INVALID</td>
|
||||
<td>The provided channel is invalid.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHANNEL_PRIVATE</td>
|
||||
<td>You haven't joined this channel/supergroup.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3><a class="anchor" href="#errors" id="errors" name="errors"><i class="anchor-icon"></i></a>Errors</h3>
|
||||
|
|
|
@ -77,6 +77,23 @@
|
|||
</table>
|
||||
<h3><a class="anchor" href="#result" id="result" name="result"><i class="anchor-icon"></i></a>Result</h3>
|
||||
<p><a href="/type/chatlists.ChatlistUpdates">chatlists.ChatlistUpdates</a></p>
|
||||
<h3><a class="anchor" href="#possible-errors" id="possible-errors" name="possible-errors"><i class="anchor-icon"></i></a>Possible errors</h3>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Code</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>INPUT_CHATLIST_INVALID</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3><a class="anchor" href="#bots-can-use-this-method" id="bots-can-use-this-method" name="bots-can-use-this-method"><i class="anchor-icon"></i></a>Bots can use this method</h3>
|
||||
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
|
||||
<h4><a class="anchor" href="#deep-links" id="deep-links" name="deep-links"><i class="anchor-icon"></i></a><a href="/api/links">Deep links</a></h4>
|
||||
|
|
|
@ -95,6 +95,11 @@
|
|||
<tbody>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHANNEL_PRIVATE</td>
|
||||
<td>You haven't joined this channel/supergroup.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHAT_ID_INVALID</td>
|
||||
<td>The provided chat id is invalid.</td>
|
||||
</tr>
|
||||
|
|
|
@ -95,6 +95,11 @@
|
|||
<td>You haven't joined this channel/supergroup.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>500</td>
|
||||
<td>CHAT_MEMBERS_CHANNEL</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>INVITE_HASH_EMPTY</td>
|
||||
<td>The invite hash is empty.</td>
|
||||
|
|
|
@ -126,7 +126,7 @@
|
|||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHAT_NOT_MODIFIED</td>
|
||||
<td>The pinned message wasn't modified.</td>
|
||||
<td>No changes were made to chat information because the new information you passed is identical to the current information.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>403</td>
|
||||
|
|
|
@ -110,8 +110,13 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHAT_ID_INVALID</td>
|
||||
<td>The provided chat id is invalid.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHAT_NOT_MODIFIED</td>
|
||||
<td>The pinned message wasn't modified.</td>
|
||||
<td>No changes were made to chat information because the new information you passed is identical to the current information.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>403</td>
|
||||
|
|
|
@ -106,7 +106,7 @@
|
|||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHAT_NOT_MODIFIED</td>
|
||||
<td>The pinned message wasn't modified.</td>
|
||||
<td>No changes were made to chat information because the new information you passed is identical to the current information.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
|
|
|
@ -106,7 +106,7 @@
|
|||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHAT_NOT_MODIFIED</td>
|
||||
<td>The pinned message wasn't modified.</td>
|
||||
<td>No changes were made to chat information because the new information you passed is identical to the current information.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
|
|
|
@ -125,6 +125,11 @@
|
|||
<tbody>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHANNEL_PRIVATE</td>
|
||||
<td>You haven't joined this channel/supergroup.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHAT_ADMIN_REQUIRED</td>
|
||||
<td>You must be an admin in this chat to do this.</td>
|
||||
</tr>
|
||||
|
|
|
@ -204,6 +204,11 @@
|
|||
<td>A specified <a href="/api/entities#entity-length">entity offset or length</a> is invalid, see <a href="/api/entities#entity-length">here »</a> for info on how to properly compute the entity offset/length.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>IMAGE_PROCESS_FAILED</td>
|
||||
<td>Failure while processing image.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>403</td>
|
||||
<td>INLINE_BOT_REQUIRED</td>
|
||||
<td>Only the inline bot can edit message.</td>
|
||||
|
@ -239,6 +244,11 @@
|
|||
<td>Previous media invalid.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>MEDIA_TTL_INVALID</td>
|
||||
<td>The specified media TTL is invalid.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>403</td>
|
||||
<td>MESSAGE_AUTHOR_REQUIRED</td>
|
||||
<td>Message author required.</td>
|
||||
|
|
|
@ -184,6 +184,11 @@
|
|||
<td>You can't forward messages from a protected chat.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>403</td>
|
||||
<td>CHAT_GUEST_SEND_FORBIDDEN</td>
|
||||
<td>You join the discussion group before commenting, see <a href="/api/discussion#requiring-users-to-join-the-group">here »</a> for more info.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHAT_ID_INVALID</td>
|
||||
<td>The provided chat id is invalid.</td>
|
||||
|
@ -358,7 +363,9 @@
|
|||
<h3><a class="anchor" href="#bots-can-use-this-method" id="bots-can-use-this-method" name="bots-can-use-this-method"><i class="anchor-icon"></i></a>Bots can use this method</h3>
|
||||
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
|
||||
<h4><a class="anchor" href="#forums" id="forums" name="forums"><i class="anchor-icon"></i></a><a href="/api/forum">Forums</a></h4>
|
||||
<p>Telegram allows creating forums with multiple distinct topics.</p></div>
|
||||
<p>Telegram allows creating forums with multiple distinct topics.</p>
|
||||
<h4><a class="anchor" href="#discussion-groups" id="discussion-groups" name="discussion-groups"><i class="anchor-icon"></i></a><a href="/api/discussion">Discussion groups</a></h4>
|
||||
<p>Groups can be associated to a channel as a discussion group, to allow users to discuss about posts.</p></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -99,7 +99,6 @@
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3><a class="anchor" href="#bots-can-use-this-method" id="bots-can-use-this-method" name="bots-can-use-this-method"><i class="anchor-icon"></i></a>Bots can use this method</h3>
|
||||
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
|
||||
<h4><a class="anchor" href="#deep-links" id="deep-links" name="deep-links"><i class="anchor-icon"></i></a><a href="/api/links">Deep links</a></h4>
|
||||
<p>Telegram clients must handle special tg:// and t.me deep links encountered in messages, link entities and in other apps by registering OS handlers.</p>
|
||||
|
|
|
@ -124,6 +124,11 @@
|
|||
<tbody>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHANNEL_INVALID</td>
|
||||
<td>The provided channel is invalid.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHANNEL_PRIVATE</td>
|
||||
<td>You haven't joined this channel/supergroup.</td>
|
||||
</tr>
|
||||
|
|
|
@ -150,6 +150,11 @@
|
|||
<td>PEER_ID_INVALID</td>
|
||||
<td>The provided peer id is invalid.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>TOPIC_ID_INVALID</td>
|
||||
<td>The specified topic ID is invalid.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
|
||||
|
|
|
@ -110,6 +110,11 @@
|
|||
<tbody>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHANNELS_TOO_MUCH</td>
|
||||
<td>You have joined too many channels/supergroups.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHANNEL_PRIVATE</td>
|
||||
<td>You haven't joined this channel/supergroup.</td>
|
||||
</tr>
|
||||
|
|
|
@ -110,10 +110,25 @@
|
|||
<tbody>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHANNELS_TOO_MUCH</td>
|
||||
<td>You have joined too many channels/supergroups.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHANNEL_PRIVATE</td>
|
||||
<td>You haven't joined this channel/supergroup.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHAT_ADMIN_REQUIRED</td>
|
||||
<td>You must be an admin in this chat to do this.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>403</td>
|
||||
<td>CHAT_WRITE_FORBIDDEN</td>
|
||||
<td>You can't write in this chat.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>HIDE_REQUESTER_MISSING</td>
|
||||
<td>The join request was missing or was already handled.</td>
|
||||
|
@ -125,6 +140,11 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>MSG_ID_INVALID</td>
|
||||
<td>Invalid message ID provided.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>PEER_ID_INVALID</td>
|
||||
<td>The provided peer id is invalid.</td>
|
||||
</tr>
|
||||
|
|
|
@ -93,7 +93,7 @@ The method returns a list of <strong>random_id</strong>s of messages for which p
|
|||
<td>The specified max_qts is invalid.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>500</td>
|
||||
<td>MSG_WAIT_FAILED</td>
|
||||
<td>A waiting call returned an error.</td>
|
||||
</tr>
|
||||
|
|
|
@ -105,6 +105,11 @@
|
|||
<tbody>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHANNEL_INVALID</td>
|
||||
<td>The provided channel is invalid.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHANNEL_PRIVATE</td>
|
||||
<td>You haven't joined this channel/supergroup.</td>
|
||||
</tr>
|
||||
|
|
|
@ -88,6 +88,28 @@
|
|||
</table>
|
||||
<h3><a class="anchor" href="#result" id="result" name="result"><i class="anchor-icon"></i></a>Result</h3>
|
||||
<p><a href="/type/Bool">Bool</a></p>
|
||||
<h3><a class="anchor" href="#possible-errors" id="possible-errors" name="possible-errors"><i class="anchor-icon"></i></a>Possible errors</h3>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Code</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>MSG_ID_INVALID</td>
|
||||
<td>Invalid message ID provided.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>USER_ID_INVALID</td>
|
||||
<td>The provided user ID is invalid.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
|
||||
<h4><a class="anchor" href="#message-reactions" id="message-reactions" name="message-reactions"><i class="anchor-icon"></i></a><a href="/api/reactions">Message reactions</a></h4>
|
||||
<p>Telegram allows users to react on any message using specific emojis, triggering cute lottie animations.</p></div>
|
||||
|
|
|
@ -108,7 +108,6 @@
|
|||
</table>
|
||||
<h3><a class="anchor" href="#result" id="result" name="result"><i class="anchor-icon"></i></a>Result</h3>
|
||||
<p><a href="/type/AppWebViewResult">AppWebViewResult</a></p>
|
||||
<h3><a class="anchor" href="#bots-can-use-this-method" id="bots-can-use-this-method" name="bots-can-use-this-method"><i class="anchor-icon"></i></a>Bots can use this method</h3>
|
||||
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
|
||||
<h4><a class="anchor" href="#deep-links" id="deep-links" name="deep-links"><i class="anchor-icon"></i></a><a href="/api/links">Deep links</a></h4>
|
||||
<p>Telegram clients must handle special tg:// and t.me deep links encountered in messages, link entities and in other apps by registering OS handlers.</p>
|
||||
|
|
|
@ -114,7 +114,7 @@
|
|||
<td>The provided secret chat ID is invalid.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>500</td>
|
||||
<td>MSG_WAIT_FAILED</td>
|
||||
<td>A waiting call returned an error.</td>
|
||||
</tr>
|
||||
|
|
|
@ -240,6 +240,11 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>DOCUMENT_INVALID</td>
|
||||
<td>The specified document is invalid.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>ENCRYPTION_DECLINED</td>
|
||||
<td>The secret chat was declined.</td>
|
||||
</tr>
|
||||
|
@ -284,6 +289,11 @@
|
|||
<td>Invalid message ID provided.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>500</td>
|
||||
<td>MSG_WAIT_FAILED</td>
|
||||
<td>A waiting call returned an error.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>406</td>
|
||||
<td>PAYMENT_UNSUPPORTED</td>
|
||||
<td>A detailed description of the error will be received separately as described <a href="/api/errors#406-not-acceptable">here »</a>.</td>
|
||||
|
|
|
@ -170,6 +170,16 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td>403</td>
|
||||
<td>CHAT_SEND_PHOTOS_FORBIDDEN</td>
|
||||
<td>You can't send photos in this chat.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>403</td>
|
||||
<td>CHAT_SEND_VIDEOS_FORBIDDEN</td>
|
||||
<td>You can't send videos in this chat.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>403</td>
|
||||
<td>CHAT_WRITE_FORBIDDEN</td>
|
||||
<td>You can't write in this chat.</td>
|
||||
</tr>
|
||||
|
|
|
@ -106,7 +106,7 @@
|
|||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHAT_NOT_MODIFIED</td>
|
||||
<td>The pinned message wasn't modified.</td>
|
||||
<td>No changes were made to chat information because the new information you passed is identical to the current information.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
|
|
|
@ -101,7 +101,7 @@
|
|||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHAT_NOT_MODIFIED</td>
|
||||
<td>The pinned message wasn't modified.</td>
|
||||
<td>No changes were made to chat information because the new information you passed is identical to the current information.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
|
|
|
@ -101,7 +101,7 @@
|
|||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHAT_NOT_MODIFIED</td>
|
||||
<td>The pinned message wasn't modified.</td>
|
||||
<td>No changes were made to chat information because the new information you passed is identical to the current information.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
|
|
|
@ -105,7 +105,7 @@
|
|||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHAT_NOT_MODIFIED</td>
|
||||
<td>The pinned message wasn't modified.</td>
|
||||
<td>No changes were made to chat information because the new information you passed is identical to the current information.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
@ -100,6 +100,11 @@
|
|||
<tbody>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHATLIST_EXCLUDE_INVALID</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHAT_ID_INVALID</td>
|
||||
<td>The provided chat id is invalid.</td>
|
||||
</tr>
|
||||
|
|
|
@ -136,7 +136,7 @@
|
|||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHAT_NOT_MODIFIED</td>
|
||||
<td>The pinned message wasn't modified.</td>
|
||||
<td>No changes were made to chat information because the new information you passed is identical to the current information.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>403</td>
|
||||
|
|
|
@ -104,6 +104,23 @@
|
|||
</table>
|
||||
<h3><a class="anchor" href="#result" id="result" name="result"><i class="anchor-icon"></i></a>Result</h3>
|
||||
<p><a href="/type/MessageMedia">MessageMedia</a></p>
|
||||
<h3><a class="anchor" href="#possible-errors" id="possible-errors" name="possible-errors"><i class="anchor-icon"></i></a>Possible errors</h3>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Code</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHAT_ADMIN_REQUIRED</td>
|
||||
<td>You must be an admin in this chat to do this.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
|
||||
<h4><a class="anchor" href="#imported-messages" id="imported-messages" name="imported-messages"><i class="anchor-icon"></i></a><a href="/api/import">Imported messages</a></h4>
|
||||
<p>Telegram allows importing messages and media from foreign chat apps.</p>
|
||||
|
|
|
@ -140,6 +140,11 @@
|
|||
<td>The number of file parts is invalid.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>500</td>
|
||||
<td>FILE_WRITE_EMPTY</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>IMAGE_PROCESS_FAILED</td>
|
||||
<td>Failure while processing image.</td>
|
||||
|
|
|
@ -93,6 +93,11 @@
|
|||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>403</td>
|
||||
<td>GROUPCALL_FORBIDDEN</td>
|
||||
<td>The group call has already ended.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>GROUPCALL_INVALID</td>
|
||||
<td>The specified group call is invalid.</td>
|
||||
|
|
|
@ -113,6 +113,11 @@
|
|||
<td>The number of file parts is invalid.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>500</td>
|
||||
<td>FILE_WRITE_EMPTY</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>IMAGE_PROCESS_FAILED</td>
|
||||
<td>Failure while processing image.</td>
|
||||
|
|
|
@ -99,6 +99,16 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>USERNAME_OCCUPIED</td>
|
||||
<td>The provided username is already occupied.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>500</td>
|
||||
<td>USERNAME_UNSYNCHRONIZED</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>USER_ID_INVALID</td>
|
||||
<td>The provided user ID is invalid.</td>
|
||||
</tr>
|
||||
|
|
|
@ -111,7 +111,7 @@ MTProto v1.0 (<a href="/mtproto_v1">described here</a> for reference) is depreca
|
|||
</blockquote>
|
||||
<h3><a class="anchor" href="#brief-component-summary" id="brief-component-summary" name="brief-component-summary"><i class="anchor-icon"></i></a>Brief Component Summary</h3>
|
||||
<h4><a class="anchor" href="#high-level-component-rpc-query-languageapi" id="high-level-component-rpc-query-languageapi" name="high-level-component-rpc-query-languageapi"><i class="anchor-icon"></i></a>High-Level Component (RPC Query Language/API)</h4>
|
||||
<p>From the standpoint of the high-level component, the client and the server exchange <em>messages</em> inside a <em>session</em>. The session is attached to the client device (the application, to be more exact) rather than a specific websocket/http/https/tcp connection. In addition, each session is attached to a <em>user key ID</em> by which authorization is actually accomplished.</p>
|
||||
<p>From the standpoint of the high-level component, the client and the server exchange <em>messages</em> inside a <em>session</em>. The session is attached to the client device (the application, to be more exact) rather than a specific WebSocket/http/https/tcp connection. In addition, each session is attached to a <em>user key ID</em> by which authorization is actually accomplished.</p>
|
||||
<p>Several connections to a server may be open; messages may be sent in either direction through any of the connections (a response to a query is not necessarily returned through the same connection that carried the original query, although most often, that is the case; however, in no case can a message be returned through a connection belonging to a different session). When the UDP protocol is used, a response might be returned by a different IP address than the one to which the query had been sent.</p>
|
||||
<p>There are several types of messages:</p>
|
||||
<ul>
|
||||
|
@ -157,8 +157,8 @@ Additionally, the following transport features can be used: </p>
|
|||
Multiple transport protocols are defined:</p>
|
||||
<ul>
|
||||
<li><a href="/mtproto/transports#tcp">TCP</a></li>
|
||||
<li><a href="/mtproto/transports#websocket">Websocket</a></li>
|
||||
<li><a href="/mtproto/transports#websocket-over-https">Websocket over HTTPS</a></li>
|
||||
<li><a href="/mtproto/transports#websocket">WebSocket</a></li>
|
||||
<li><a href="/mtproto/transports#websocket-over-https">WebSocket over HTTPS</a></li>
|
||||
<li><a href="/mtproto/transports#http">HTTP</a></li>
|
||||
<li><a href="/mtproto/transports#https">HTTPS</a></li>
|
||||
<li>UDP</li>
|
||||
|
|
|
@ -159,7 +159,7 @@ They are the 32 higher-order bits of SHA256 of the encrypted portion of the pack
|
|||
<p>Error 429 (transport flood) is returned when too many transport connections are established to the same IP in a too short lapse of time, or if any of the <a href="/mtproto/service_messages#simple-container">container</a>/<a href="/mtproto/service_messages_about_messages#acknowledgment-of-receipt">service message limits</a> are reached.</p>
|
||||
<p>Error 444 (invalid DC) is returned while <a href="/mtproto/auth_key#presenting-proof-of-work-server-authentication">creating an auth key</a>, <a href="#transport-obfuscation">connecting to an MTProxy</a> or in other contexts if an invalid DC ID is specified.</p>
|
||||
<h4><a class="anchor" href="#transport-obfuscation" id="transport-obfuscation" name="transport-obfuscation"><i class="anchor-icon"></i></a>Transport obfuscation</h4>
|
||||
<p>Transport obfuscation is required to use the <a href="transports#websocket">websocket transports</a>.</p>
|
||||
<p>Transport obfuscation is required to use the <a href="transports#websocket">WebSocket transports</a>.</p>
|
||||
<p>Transport obfuscation to <strong>prevent ISP blocks</strong> is implemented using the following protocol, situated under the MTProto transport in the ISO/OSI stack, see the <a href="/mtproto#recap">recap</a>; this means that the payload is first wrapped in the <a href="/mtproto/mtproto-transports">MTProto transport envelope</a> (all transports are supported), and then obfuscated: </p>
|
||||
<p>Prior to establishing the connection (and eventually sending the protocol header of a specific <a href="/mtproto/mtproto-transports">MTProto transport</a>), a 64-byte (512-bit) <strong>random</strong> initialization payload is generated.
|
||||
During the generation process, special care must be taken in order to avoid a situation where that the first int (first four bytes) of the random string are equal to one of the known protocol identifiers (see above).<br>
|
||||
|
|
|
@ -53,9 +53,9 @@
|
|||
<h5><a class="anchor" href="#1-client-sends-query-to-server" id="1-client-sends-query-to-server" name="1-client-sends-query-to-server"><i class="anchor-icon"></i></a>1) Client sends query to server</h5>
|
||||
<!-- start req_pq_multi -->
|
||||
<p>Sent payload (excluding transport headers/trailers):</p>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 54 BC 00 00 FF 9A 9E 64
|
||||
0010 | 14 00 00 00 F1 8E 7E BE DA 60 3B 0B 6C 74 D6 0E
|
||||
0020 | C9 4A 04 D8 3A F2 02 7D</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 A4 55 01 00 ED 11 BD 64
|
||||
0010 | 14 00 00 00 F1 8E 7E BE 7A 1F FF 53 21 A4 04 32
|
||||
0020 | 84 F5 F3 02 41 19 D9 50</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>54BC0000FF9A9E64</code></td>
|
||||
<td><code>A4550100ED11BD64</code></td>
|
||||
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() << 32) + (N*4)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -95,7 +95,7 @@
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>24, 16</td>
|
||||
<td><code>DA603B0B6C74D60EC94A04D83AF2027D</code></td>
|
||||
<td><code>7A1FFF5321A4043284F5F3024119D950</code></td>
|
||||
<td>Random number</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -104,15 +104,15 @@
|
|||
<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 64 63 C2 FF 9A 9E 64
|
||||
0010 | 50 00 00 00 63 24 16 05 DA 60 3B 0B 6C 74 D6 0E
|
||||
0020 | C9 4A 04 D8 3A F2 02 7D 8C 0C 71 9D 73 8B 75 78
|
||||
0030 | 66 BA 31 F7 EF 43 97 39 08 1D 03 06 D7 8C 29 2A
|
||||
0040 | 69 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 A0 BF 74 ED 11 BD 64
|
||||
0010 | C0 00 00 00 63 24 16 05 7A 1F FF 53 21 A4 04 32
|
||||
0020 | 84 F5 F3 02 41 19 D9 50 AE CF 0E 9B D3 89 17 4E
|
||||
0030 | 9A E7 5D CB 0D 3C 7D C6 08 28 99 20 60 6C 46 1C
|
||||
0040 | 09 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>
|
||||
<pre><code>resPQ#05162463 nonce:int128 server_nonce:int128 pq:string server_public_key_fingerprints:Vector<long> = ResPQ;</code></pre>
|
||||
<pre><code>resPQ#05162463 nonce:int128 server_nonce:int128 pq:string server_public_key_fingerprints:Vector<strlong> = ResPQ;</code></pre>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -132,13 +132,13 @@
|
|||
<tr>
|
||||
<td>message_id</td>
|
||||
<td>8, 8</td>
|
||||
<td><code>016463C2FF9A9E64</code></td>
|
||||
<td><code>01A0BF74ED11BD64</code></td>
|
||||
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() << 32) + (N*4)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>message_length</td>
|
||||
<td>16, 4</td>
|
||||
<td><code>50000000</code> (80 in decimal)</td>
|
||||
<td><code>C0000000</code> (192 in decimal)</td>
|
||||
<td>Message body length</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -150,23 +150,23 @@
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>24, 16</td>
|
||||
<td><code>DA603B0B6C74D60EC94A04D83AF2027D</code></td>
|
||||
<td><code>7A1FFF5321A4043284F5F3024119D950</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>8C0C719D738B757866BA31F7EF439739</code></td>
|
||||
<td><code>AECF0E9BD389174E9AE75DCB0D3C7DC6</code></td>
|
||||
<td>Server-generated random number</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>pq</td>
|
||||
<td>56, 12</td>
|
||||
<td><code>081D0306D78C292A69000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 2090522174869285481</td>
|
||||
<td><code>08289920606C461C09000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 2925405031459331081</td>
|
||||
<td>Single-byte prefix denoting length, an 8-byte string, and three bytes of padding</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>%(Vector long)</td>
|
||||
<td>%(Vector strlong)</td>
|
||||
<td>68, 4</td>
|
||||
<td><code>15c4b51c</code></td>
|
||||
<td><em>Vector t</em> constructor number from TL schema</td>
|
||||
|
@ -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--q" id="3-client-decomposes-pq-into-prime-factors-such-that-p--q" name="3-client-decomposes-pq-into-prime-factors-such-that-p--q"><i class="anchor-icon"></i></a>3) Client decomposes pq into prime factors such that p < q.</h5>
|
||||
<!-- start pq -->
|
||||
<pre><code>pq = 2090522174869285481</code></pre>
|
||||
<p>Decompose into 2 prime cofactors <code>p < q</code>: <code>2090522174869285481 = 1112973847 * 1878321023</code></p>
|
||||
<pre><code>p = 1112973847
|
||||
q = 1878321023</code></pre>
|
||||
<pre><code>pq = 2925405031459331081</code></pre>
|
||||
<p>Decompose into 2 prime cofactors <code>p < q</code>: <code>2925405031459331081 = 1643114519 * 1780402399</code></p>
|
||||
<pre><code>p = 1643114519
|
||||
q = 1780402399</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 1D 03 06 D7 8C 29 2A 69 00 00 00
|
||||
0010 | 04 42 56 A2 17 00 00 00 04 6F F4 E7 7F 00 00 00
|
||||
0020 | DA 60 3B 0B 6C 74 D6 0E C9 4A 04 D8 3A F2 02 7D
|
||||
0030 | 8C 0C 71 9D 73 8B 75 78 66 BA 31 F7 EF 43 97 39
|
||||
0040 | 0E 63 58 A8 84 41 7C 48 A8 81 CD B2 44 E1 CE 7D
|
||||
0050 | 3F F7 C4 E4 4E 38 10 39 EF DC E2 57 66 F4 8C E4
|
||||
<pre><code>0000 | 95 5F F5 A9 08 28 99 20 60 6C 46 1C 09 00 00 00
|
||||
0010 | 04 61 EF F0 17 00 00 00 04 6A 1E C8 DF 00 00 00
|
||||
0020 | 7A 1F FF 53 21 A4 04 32 84 F5 F3 02 41 19 D9 50
|
||||
0030 | AE CF 0E 9B D3 89 17 4E 9A E7 5D CB 0D 3C 7D C6
|
||||
0040 | 6C A1 C6 89 07 5B 8C 46 00 AE 53 8F C7 FC 25 EB
|
||||
0050 | 2F A6 AE B2 7C 98 DA 61 16 37 33 04 59 E7 26 2B
|
||||
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 = 1878321023</code></pre>
|
|||
<tr>
|
||||
<td>pq</td>
|
||||
<td>4, 12</td>
|
||||
<td><code>081D0306D78C292A69000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 2090522174869285481</td>
|
||||
<td><code>08289920606C461C09000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 2925405031459331081</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>044256A217000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1112973847</td>
|
||||
<td><code>0461EFF017000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1643114519</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>046FF4E77F000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1878321023</td>
|
||||
<td><code>046A1EC8DF000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1780402399</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>DA603B0B6C74D60EC94A04D83AF2027D</code></td>
|
||||
<td><code>7A1FFF5321A4043284F5F3024119D950</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>48, 16</td>
|
||||
<td><code>8C0C719D738B757866BA31F7EF439739</code></td>
|
||||
<td><code>AECF0E9BD389174E9AE75DCB0D3C7DC6</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>new_nonce</td>
|
||||
<td>64, 32</td>
|
||||
<td><code>0E6358A884417C48A881CDB244E1CE7D</code> <code>3FF7C4E44E381039EFDCE25766F48CE4</code></td>
|
||||
<td><code>6CA1C689075B8C4600AE538FC7FC25EB</code> <code>2FA6AEB27C98DA611637330459E7262B</code></td>
|
||||
<td>Client-generated random number</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -291,39 +291,39 @@ q = 1878321023</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 = 955FF5A9081D0306D78C292A69000000044256A217000000046FF4E77F000000DA603B0B6C74D60EC94A04D83AF2027D8C0C719D738B757866BA31F7EF4397390E6358A884417C48A881CDB244E1CE7D3FF7C4E44E381039EFDCE25766F48CE402000000
|
||||
random_padding_bytes = 6A5F16CE16C2F010CF1F5B1305F4340A22E68A8BC48EC863A7F3FB907CBA6FFDE7C240684F1767F3ABECA72A65B6B737894D25CF280679407F569BD4F5A52BCEB645852B499E9A467DFFD015FC2AA75DE1AB51568B018CEE65999DD3</code></pre>
|
||||
<pre><code>data = 955FF5A908289920606C461C090000000461EFF017000000046A1EC8DF0000007A1FFF5321A4043284F5F3024119D950AECF0E9BD389174E9AE75DCB0D3C7DC66CA1C689075B8C4600AE538FC7FC25EB2FA6AEB27C98DA611637330459E7262B02000000
|
||||
random_padding_bytes = 735163AEA2B383D2EBD0AC816B28F8917E1839FC97142A60B876B633E3C2EF33429907DDB72AA767140458683AC22A999BD10FB9ECE9C27A6FEB746AF79344E71C65A3586F245E2B9989A7485B9D8CE41EF11909767BFCF0649835B6</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 = 978CD0DA71C89E58D5DD3A369FD23C91CDF29AE8DEF7D7FADC5303F2D7D0BF676E6408C20F9888167525245E891B2884D4894406FD34D0A3739BB89D8BEFC5982F4CE7D899CAD65156931C8048627A86C3549183D914CFFBCB3B39E2B719B1F243CEFBFEEB8E5EBCD0C343772500D27BA8CEB80A46FA4EEBD88435FDF979DF40938AC43C6947D55F7C3130122D5D90BAA23C03CDBD5EEDDF9D1F0D46054856E3A3F4A86E9BE4FF61E80FA5606A9A0D1F797DE334D6DE845B71C48544A5AC2ECEFC92F0194789C66085F6DBC1D81E6674A8CDAC6D1911BAEAE1279133C162A4091E04B85732AEBEC304C17DCD5A8637413EC2CAE8B00A06A2121179D4DBAACBB7</code></pre>
|
||||
<pre><code>encrypted_data = 8A2A79C21D9784430CEF751E4A40E5D5164F7FB8359E8AC36124DD9B62F67C90F461D7430A775B4F7CE86695EC96184E27A068E467F15DADB39811EE6B2D4FF09214E8464D15AFA5B041AD2C63A5DC4998483C0B8613F861F6418CB5747037186FCDB931024825C624468745C211F6411E1FAD46AF894557658CE235E1E2D0CFFE775BBC4B67420ABB5E39D0C4D662A9D40A5C0DEA36AC79B95187C0C4116D05C1F5C103735ADA2F61ECB182FAB923B941D2129268DF31C6C9648AD8EE23E64A6CE497C385EC5C29B55BCB4D6535DFED8120F0DF56465AA0DC5B47DC4459C9C586E373A527594CA7B276652791C513E36AED4110E5CF2A925AAC1F5B4C6D57F9</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 9C A0 09 00 FF 9A 9E 64
|
||||
0010 | 40 01 00 00 BE E4 12 D7 DA 60 3B 0B 6C 74 D6 0E
|
||||
0020 | C9 4A 04 D8 3A F2 02 7D 8C 0C 71 9D 73 8B 75 78
|
||||
0030 | 66 BA 31 F7 EF 43 97 39 04 42 56 A2 17 00 00 00
|
||||
0040 | 04 6F F4 E7 7F 00 00 00 85 FD 64 DE 85 1D 9D D0
|
||||
0050 | FE 00 01 00 97 8C D0 DA 71 C8 9E 58 D5 DD 3A 36
|
||||
0060 | 9F D2 3C 91 CD F2 9A E8 DE F7 D7 FA DC 53 03 F2
|
||||
0070 | D7 D0 BF 67 6E 64 08 C2 0F 98 88 16 75 25 24 5E
|
||||
0080 | 89 1B 28 84 D4 89 44 06 FD 34 D0 A3 73 9B B8 9D
|
||||
0090 | 8B EF C5 98 2F 4C E7 D8 99 CA D6 51 56 93 1C 80
|
||||
00A0 | 48 62 7A 86 C3 54 91 83 D9 14 CF FB CB 3B 39 E2
|
||||
00B0 | B7 19 B1 F2 43 CE FB FE EB 8E 5E BC D0 C3 43 77
|
||||
00C0 | 25 00 D2 7B A8 CE B8 0A 46 FA 4E EB D8 84 35 FD
|
||||
00D0 | F9 79 DF 40 93 8A C4 3C 69 47 D5 5F 7C 31 30 12
|
||||
00E0 | 2D 5D 90 BA A2 3C 03 CD BD 5E ED DF 9D 1F 0D 46
|
||||
00F0 | 05 48 56 E3 A3 F4 A8 6E 9B E4 FF 61 E8 0F A5 60
|
||||
0100 | 6A 9A 0D 1F 79 7D E3 34 D6 DE 84 5B 71 C4 85 44
|
||||
0110 | A5 AC 2E CE FC 92 F0 19 47 89 C6 60 85 F6 DB C1
|
||||
0120 | D8 1E 66 74 A8 CD AC 6D 19 11 BA EA E1 27 91 33
|
||||
0130 | C1 62 A4 09 1E 04 B8 57 32 AE BE C3 04 C1 7D CD
|
||||
0140 | 5A 86 37 41 3E C2 CA E8 B0 0A 06 A2 12 11 79 D4
|
||||
0150 | DB AA CB B7</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 64 71 04 00 ED 11 BD 64
|
||||
0010 | 40 01 00 00 BE E4 12 D7 7A 1F FF 53 21 A4 04 32
|
||||
0020 | 84 F5 F3 02 41 19 D9 50 AE CF 0E 9B D3 89 17 4E
|
||||
0030 | 9A E7 5D CB 0D 3C 7D C6 04 61 EF F0 17 00 00 00
|
||||
0040 | 04 6A 1E C8 DF 00 00 00 85 FD 64 DE 85 1D 9D D0
|
||||
0050 | FE 00 01 00 8A 2A 79 C2 1D 97 84 43 0C EF 75 1E
|
||||
0060 | 4A 40 E5 D5 16 4F 7F B8 35 9E 8A C3 61 24 DD 9B
|
||||
0070 | 62 F6 7C 90 F4 61 D7 43 0A 77 5B 4F 7C E8 66 95
|
||||
0080 | EC 96 18 4E 27 A0 68 E4 67 F1 5D AD B3 98 11 EE
|
||||
0090 | 6B 2D 4F F0 92 14 E8 46 4D 15 AF A5 B0 41 AD 2C
|
||||
00A0 | 63 A5 DC 49 98 48 3C 0B 86 13 F8 61 F6 41 8C B5
|
||||
00B0 | 74 70 37 18 6F CD B9 31 02 48 25 C6 24 46 87 45
|
||||
00C0 | C2 11 F6 41 1E 1F AD 46 AF 89 45 57 65 8C E2 35
|
||||
00D0 | E1 E2 D0 CF FE 77 5B BC 4B 67 42 0A BB 5E 39 D0
|
||||
00E0 | C4 D6 62 A9 D4 0A 5C 0D EA 36 AC 79 B9 51 87 C0
|
||||
00F0 | C4 11 6D 05 C1 F5 C1 03 73 5A DA 2F 61 EC B1 82
|
||||
0100 | FA B9 23 B9 41 D2 12 92 68 DF 31 C6 C9 64 8A D8
|
||||
0110 | EE 23 E6 4A 6C E4 97 C3 85 EC 5C 29 B5 5B CB 4D
|
||||
0120 | 65 35 DF ED 81 20 F0 DF 56 46 5A A0 DC 5B 47 DC
|
||||
0130 | 44 59 C9 C5 86 E3 73 A5 27 59 4C A7 B2 76 65 27
|
||||
0140 | 91 C5 13 E3 6A ED 41 10 E5 CF 2A 92 5A AC 1F 5B
|
||||
0150 | 4C 6D 57 F9</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 = 6A5F16CE16C2F010CF1F5B1305F4340A22E68A8BC48EC863A7F3FB907
|
|||
<tr>
|
||||
<td>message_id</td>
|
||||
<td>8, 8</td>
|
||||
<td><code>9CA00900FF9A9E64</code></td>
|
||||
<td><code>64710400ED11BD64</code></td>
|
||||
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() << 32) + (N*4)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -363,25 +363,25 @@ random_padding_bytes = 6A5F16CE16C2F010CF1F5B1305F4340A22E68A8BC48EC863A7F3FB907
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>24, 16</td>
|
||||
<td><code>DA603B0B6C74D60EC94A04D83AF2027D</code></td>
|
||||
<td><code>7A1FFF5321A4043284F5F3024119D950</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>8C0C719D738B757866BA31F7EF439739</code></td>
|
||||
<td><code>AECF0E9BD389174E9AE75DCB0D3C7DC6</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>p</td>
|
||||
<td>56, 8</td>
|
||||
<td><code>044256A217000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1112973847</td>
|
||||
<td><code>0461EFF017000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1643114519</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>046FF4E77F000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1878321023</td>
|
||||
<td><code>046A1EC8DF000000</code><br>TL byte deserialization <br>=> bigendian conversion to decimal<br>=> 1780402399</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 = 6A5F16CE16C2F010CF1F5B1305F4340A22E68A8BC48EC863A7F3FB907
|
|||
<tr>
|
||||
<td>encrypted_data</td>
|
||||
<td>80, 260</td>
|
||||
<td><code>FE000100978CD0DA71C89E58D5DD3A36</code> <code>9FD23C91CDF29AE8DEF7D7FADC5303F2</code> <code>D7D0BF676E6408C20F9888167525245E</code> <code>891B2884D4894406FD34D0A3739BB89D</code> <code>8BEFC5982F4CE7D899CAD65156931C80</code> <code>48627A86C3549183D914CFFBCB3B39E2</code> <code>B719B1F243CEFBFEEB8E5EBCD0C34377</code> <code>2500D27BA8CEB80A46FA4EEBD88435FD</code> <code>F979DF40938AC43C6947D55F7C313012</code> <code>2D5D90BAA23C03CDBD5EEDDF9D1F0D46</code> <code>054856E3A3F4A86E9BE4FF61E80FA560</code> <code>6A9A0D1F797DE334D6DE845B71C48544</code> <code>A5AC2ECEFC92F0194789C66085F6DBC1</code> <code>D81E6674A8CDAC6D1911BAEAE1279133</code> <code>C162A4091E04B85732AEBEC304C17DCD</code> <code>5A8637413EC2CAE8B00A06A2121179D4</code><br> <code>DBAACBB7</code></td>
|
||||
<td><code>FE0001008A2A79C21D9784430CEF751E</code> <code>4A40E5D5164F7FB8359E8AC36124DD9B</code> <code>62F67C90F461D7430A775B4F7CE86695</code> <code>EC96184E27A068E467F15DADB39811EE</code> <code>6B2D4FF09214E8464D15AFA5B041AD2C</code> <code>63A5DC4998483C0B8613F861F6418CB5</code> <code>747037186FCDB931024825C624468745</code> <code>C211F6411E1FAD46AF894557658CE235</code> <code>E1E2D0CFFE775BBC4B67420ABB5E39D0</code> <code>C4D662A9D40A5C0DEA36AC79B95187C0</code> <code>C4116D05C1F5C103735ADA2F61ECB182</code> <code>FAB923B941D2129268DF31C6C9648AD8</code> <code>EE23E64A6CE497C385EC5C29B55BCB4D</code> <code>6535DFED8120F0DF56465AA0DC5B47DC</code> <code>4459C9C586E373A527594CA7B2766527</code> <code>91C513E36AED4110E5CF2A925AAC1F5B</code><br> <code>4C6D57F9</code></td>
|
||||
<td>Value generated above</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -402,47 +402,47 @@ random_padding_bytes = 6A5F16CE16C2F010CF1F5B1305F4340A22E68A8BC48EC863A7F3FB907
|
|||
<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 98 C2 50 00 9B 9E 64
|
||||
0010 | 78 02 00 00 5C 07 E8 D0 DA 60 3B 0B 6C 74 D6 0E
|
||||
0020 | C9 4A 04 D8 3A F2 02 7D 8C 0C 71 9D 73 8B 75 78
|
||||
0030 | 66 BA 31 F7 EF 43 97 39 FE 50 02 00 A0 35 2C C0
|
||||
0040 | 87 EA 1E 38 08 20 F7 C9 46 61 88 32 08 B6 F3 9D
|
||||
0050 | 47 BA DA 5D C7 2B 94 D7 22 F6 F7 C4 19 4B D2 56
|
||||
0060 | B0 75 4F BD 65 E2 C2 CA 64 28 AB 69 7A 3C D2 25
|
||||
0070 | 5C 3C 28 96 7A 0B 83 3C 1B 51 C9 D5 73 F2 DE BC
|
||||
0080 | B9 AE 8E BF 03 F6 C8 63 55 7D 44 02 7F 39 60 8B
|
||||
0090 | 2C A0 2F C9 8F EF CD 0C 1F 31 54 95 E7 EC C8 B1
|
||||
00A0 | 7A 33 47 D6 6C FD E0 35 3D E7 EB 42 1F E0 63 B0
|
||||
00B0 | C2 E4 85 DC 3E F6 EB 7B AE 57 4B 21 DD DB F7 D2
|
||||
00C0 | 73 BF D0 8B 0A 17 CF B9 34 0D D2 C9 C4 B6 FF F2
|
||||
00D0 | 4E 02 DE 47 32 22 D0 86 9E D1 A2 2E C6 59 3F 3A
|
||||
00E0 | 6E B6 55 07 2A CA B4 54 DC 17 33 A8 BA 64 A2 FA
|
||||
00F0 | FC B9 67 9D 8F 1A 43 20 4C BB F3 59 60 5A FB A7
|
||||
0100 | 7F 4F 4B 89 86 D8 A8 4B 35 76 83 38 09 78 BB 66
|
||||
0110 | F7 15 8C 5A 89 ED 75 B1 07 99 8E 89 51 6D D9 33
|
||||
0120 | DE DE 35 D2 FA 4F 53 DF 49 29 54 1B 45 26 FB 13
|
||||
0130 | 49 38 1F 96 A8 57 EE FB 9D F2 65 84 FF 51 6F D0
|
||||
0140 | 6B 23 67 96 0A 4E 38 6D 7D FA 06 7E 60 30 41 DB
|
||||
0150 | 1A BD 27 48 28 BD 3D 5F B7 43 6D B2 B1 C2 5D 81
|
||||
0160 | 05 F2 10 8A 48 AE 0B F4 19 65 24 E6 83 EC 10 CC
|
||||
0170 | 3A B8 CD 58 35 8C 02 AC 41 D9 26 FF 1E CD 4A 5F
|
||||
0180 | 19 36 98 6B C9 73 21 BD 4C 88 ED 7B 5F 09 4B 1E
|
||||
0190 | 70 B7 2B 5E FC 1D 86 E9 82 43 05 19 52 35 F0 E0
|
||||
01A0 | 66 F2 DF A0 BB D2 48 8C C8 8B B5 7A C7 89 59 59
|
||||
01B0 | CB 1A FE BF B0 36 FB 92 00 E8 44 D2 60 31 A1 4A
|
||||
01C0 | BB F5 18 B0 89 3A FA 4C 29 D7 B0 6C 69 0D 5A 7F
|
||||
01D0 | D3 16 CC 92 08 17 D4 5E 7E FE BF EB B5 89 BA 99
|
||||
01E0 | F4 10 40 93 29 6E 99 99 B0 9E A6 6A 72 67 9A DD
|
||||
01F0 | BA CE C3 63 D1 50 E1 6D FB 8D 51 C4 6E 19 50 5D
|
||||
0200 | C1 53 97 32 DD D3 CF F3 51 BD CE B2 8A D3 79 3C
|
||||
0210 | 0D A3 08 D1 2A 31 3B D7 D2 66 BB BA 88 76 5E 20
|
||||
0220 | F3 39 22 08 58 43 97 68 07 2F 26 C4 AB EC CE 48
|
||||
0230 | A5 F8 99 C5 26 E5 26 6F 7A 4A 4E F2 F3 B0 8B 5F
|
||||
0240 | 53 AB 6B 45 90 F9 E0 DF 8B 44 10 05 C8 0C E4 72
|
||||
0250 | E2 68 31 F8 64 E0 A9 CE 06 C9 DF FE C4 E6 01 3A
|
||||
0260 | 26 B8 23 A8 3B A4 64 3D 5F DD B6 DE EA F7 5D A3
|
||||
0270 | 0C 87 AB FE 29 F4 71 DD 82 7B 39 9C 6E C5 9D 98
|
||||
0280 | CE EE 1F D4 30 19 63 95 88 5F DB F9</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 C4 B1 0B EE 11 BD 64
|
||||
0010 | A4 02 00 00 5C 07 E8 D0 7A 1F FF 53 21 A4 04 32
|
||||
0020 | 84 F5 F3 02 41 19 D9 50 AE CF 0E 9B D3 89 17 4E
|
||||
0030 | 9A E7 5D CB 0D 3C 7D C6 FE 50 02 00 A3 88 64 8C
|
||||
0040 | D5 DA 2B 14 23 28 E2 B5 A9 A7 88 4B AD 7E 83 96
|
||||
0050 | 68 D1 29 3E E3 13 51 F6 2C 68 2A 7F 57 E1 73 6E
|
||||
0060 | 0B 9B 54 6C FE 89 6B 13 22 5E 79 25 6F 4F 22 94
|
||||
0070 | EF 95 DE 2D 1C C0 02 3B 2C E2 37 6E 39 C7 67 43
|
||||
0080 | F2 B9 AB 75 22 B6 DE 54 F5 6F E3 EC 90 29 74 D1
|
||||
0090 | B8 24 D1 D9 D2 BF 23 FC F3 08 66 40 D3 E6 9B F1
|
||||
00A0 | 38 16 BE 72 DE 36 71 FE 80 D6 1C 6C 3A D3 37 08
|
||||
00B0 | F6 FF 83 DE 4C E6 D7 32 B6 D4 1B 31 DC B6 F3 03
|
||||
00C0 | 7A 58 29 84 C3 DF 6B 8B BE BA 87 16 C4 51 F2 62
|
||||
00D0 | 33 C5 D9 1B F7 A8 5E 2E A7 C3 E1 A5 40 F0 59 C3
|
||||
00E0 | F4 9A 56 31 AD 04 92 27 CD 5C 23 4E 86 15 5D 2B
|
||||
00F0 | 9A C4 5B 5C CE 99 5C 85 4B 88 05 CF 4C 83 3B BF
|
||||
0100 | FA E0 49 B7 28 F8 AB CD 8B 2B 85 94 1A 42 58 91
|
||||
0110 | 5D AD A8 E0 2F B2 6B A7 7A 1E B9 D4 FC 64 C3 B5
|
||||
0120 | 06 71 DA A1 07 F2 BB 3A B7 2B 2F 4E 13 BA 2D 40
|
||||
0130 | 4A AD 55 38 DC 16 49 39 E8 BD 33 A8 53 39 01 C0
|
||||
0140 | 5A C8 E2 0B 70 B7 B8 7A 88 11 A7 87 38 FF 02 77
|
||||
0150 | B1 57 85 33 0C 35 1E F6 97 96 8F 1F 8C E7 54 CC
|
||||
0160 | DD 86 12 7E D1 67 83 5C 9B AF 23 D7 8E 4C 49 E1
|
||||
0170 | 81 75 1D 49 BD 84 2B 8C 85 85 60 FB 1D A0 D4 24
|
||||
0180 | 43 1F 40 39 1B C1 16 31 E1 08 5D A2 B0 36 13 43
|
||||
0190 | 69 AD 9C A1 9D 6F 51 30 FA BA 5A EA F4 FD B2 0B
|
||||
01A0 | 19 DB 3F 95 1F 02 15 A3 64 C2 0F 09 2D 70 1F 3D
|
||||
01B0 | D0 9D 24 26 38 00 AA A4 66 61 23 EB 55 C9 CB B1
|
||||
01C0 | C3 6D AB 84 3A D2 A9 88 BE 11 97 73 EE 76 0D 7E
|
||||
01D0 | 9F 2C 9A A4 BB AD 38 44 19 7C 43 1B FE EC 91 33
|
||||
01E0 | 92 08 D4 1D A5 BA 2B EE 45 43 DC FE A6 84 9E 24
|
||||
01F0 | CC E5 CB 90 13 2A CC 47 5B EF 84 2A 61 CD DF 76
|
||||
0200 | E8 BF B9 DB 30 60 D8 85 04 0C 41 FD 20 A9 F6 CC
|
||||
0210 | 72 A0 9E 8D F3 C5 FC 54 42 59 79 69 06 04 8F 83
|
||||
0220 | A0 C0 BA B4 B8 EA 6E 42 1E 5B 4A 2F 3C 1E A1 9E
|
||||
0230 | DA 72 0D 98 3C A2 D3 10 0A 43 89 06 40 E3 18 08
|
||||
0240 | 39 2F 37 5C 60 2C C4 7F 39 A8 DD EE 81 1A 7D 28
|
||||
0250 | 6D 9D 6D A8 F6 87 FA DC 9F 81 E5 2C 9D 42 13 78
|
||||
0260 | 86 78 D4 47 73 30 AA 0A 6B 04 DC 05 D7 DF 5A 8D
|
||||
0270 | 6E FC 75 52 70 AC BC 90 D2 DA 36 73 BA 1A 2F 4A
|
||||
0280 | F5 ED 02 86 87 73 17 0E 8B 5A 63 C6</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 = 6A5F16CE16C2F010CF1F5B1305F4340A22E68A8BC48EC863A7F3FB907
|
|||
<tr>
|
||||
<td>message_id</td>
|
||||
<td>8, 8</td>
|
||||
<td><code>0198C250009B9E64</code></td>
|
||||
<td><code>01C4B10BEE11BD64</code></td>
|
||||
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() << 32) + (N*4)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>message_length</td>
|
||||
<td>16, 4</td>
|
||||
<td><code>78020000</code> (632 in decimal)</td>
|
||||
<td><code>A4020000</code> (676 in decimal)</td>
|
||||
<td>Message body length</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -482,19 +482,19 @@ random_padding_bytes = 6A5F16CE16C2F010CF1F5B1305F4340A22E68A8BC48EC863A7F3FB907
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>24, 16</td>
|
||||
<td><code>DA603B0B6C74D60EC94A04D83AF2027D</code></td>
|
||||
<td><code>7A1FFF5321A4043284F5F3024119D950</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>8C0C719D738B757866BA31F7EF439739</code></td>
|
||||
<td><code>AECF0E9BD389174E9AE75DCB0D3C7DC6</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>encrypted_answer</td>
|
||||
<td>56, 596</td>
|
||||
<td><code>FE500200A0352CC087EA1E380820F7C9</code> <code>4661883208B6F39D47BADA5DC72B94D7</code> <code>22F6F7C4194BD256B0754FBD65E2C2CA</code> <code>6428AB697A3CD2255C3C28967A0B833C</code> <code>1B51C9D573F2DEBCB9AE8EBF03F6C863</code> <code>557D44027F39608B2CA02FC98FEFCD0C</code> <code>1F315495E7ECC8B17A3347D66CFDE035</code> <code>3DE7EB421FE063B0C2E485DC3EF6EB7B</code> <code>AE574B21DDDBF7D273BFD08B0A17CFB9</code> <code>340DD2C9C4B6FFF24E02DE473222D086</code> <code>9ED1A22EC6593F3A6EB655072ACAB454</code> <code>DC1733A8BA64A2FAFCB9679D8F1A4320</code> <code>4CBBF359605AFBA77F4F4B8986D8A84B</code> <code>357683380978BB66F7158C5A89ED75B1</code> <code>07998E89516DD933DEDE35D2FA4F53DF</code> <code>4929541B4526FB1349381F96A857EEFB</code> <code>9DF26584FF516FD06B2367960A4E386D</code> <code>7DFA067E603041DB1ABD274828BD3D5F</code> <code>B7436DB2B1C25D8105F2108A48AE0BF4</code> <code>196524E683EC10CC3AB8CD58358C02AC</code> <code>41D926FF1ECD4A5F1936986BC97321BD</code> <code>4C88ED7B5F094B1E70B72B5EFC1D86E9</code> <code>824305195235F0E066F2DFA0BBD2488C</code> <code>C88BB57AC7895959CB1AFEBFB036FB92</code> <code>00E844D26031A14ABBF518B0893AFA4C</code> <code>29D7B06C690D5A7FD316CC920817D45E</code> <code>7EFEBFEBB589BA99F4104093296E9999</code> <code>B09EA66A72679ADDBACEC363D150E16D</code> <code>FB8D51C46E19505DC1539732DDD3CFF3</code> <code>51BDCEB28AD3793C0DA308D12A313BD7</code> <code>D266BBBA88765E20F339220858439768</code> <code>072F26C4ABECCE48A5F899C526E5266F</code> <code>7A4A4EF2F3B08B5F53AB6B4590F9E0DF</code> <code>8B441005C80CE472E26831F864E0A9CE</code> <code>06C9DFFEC4E6013A26B823A83BA4643D</code> <code>5FDDB6DEEAF75DA30C87ABFE29F471DD</code> <code>827B399C6EC59D98CEEE1FD430196395</code><br> <code>885FDBF9</code></td>
|
||||
<td><code>FE500200A388648CD5DA2B142328E2B5</code> <code>A9A7884BAD7E839668D1293EE31351F6</code> <code>2C682A7F57E1736E0B9B546CFE896B13</code> <code>225E79256F4F2294EF95DE2D1CC0023B</code> <code>2CE2376E39C76743F2B9AB7522B6DE54</code> <code>F56FE3EC902974D1B824D1D9D2BF23FC</code> <code>F3086640D3E69BF13816BE72DE3671FE</code> <code>80D61C6C3AD33708F6FF83DE4CE6D732</code> <code>B6D41B31DCB6F3037A582984C3DF6B8B</code> <code>BEBA8716C451F26233C5D91BF7A85E2E</code> <code>A7C3E1A540F059C3F49A5631AD049227</code> <code>CD5C234E86155D2B9AC45B5CCE995C85</code> <code>4B8805CF4C833BBFFAE049B728F8ABCD</code> <code>8B2B85941A4258915DADA8E02FB26BA7</code> <code>7A1EB9D4FC64C3B50671DAA107F2BB3A</code> <code>B72B2F4E13BA2D404AAD5538DC164939</code> <code>E8BD33A8533901C05AC8E20B70B7B87A</code> <code>8811A78738FF0277B15785330C351EF6</code> <code>97968F1F8CE754CCDD86127ED167835C</code> <code>9BAF23D78E4C49E181751D49BD842B8C</code> <code>858560FB1DA0D424431F40391BC11631</code> <code>E1085DA2B036134369AD9CA19D6F5130</code> <code>FABA5AEAF4FDB20B19DB3F951F0215A3</code> <code>64C20F092D701F3DD09D24263800AAA4</code> <code>666123EB55C9CBB1C36DAB843AD2A988</code> <code>BE119773EE760D7E9F2C9AA4BBAD3844</code> <code>197C431BFEEC91339208D41DA5BA2BEE</code> <code>4543DCFEA6849E24CCE5CB90132ACC47</code> <code>5BEF842A61CDDF76E8BFB9DB3060D885</code> <code>040C41FD20A9F6CC72A09E8DF3C5FC54</code> <code>4259796906048F83A0C0BAB4B8EA6E42</code> <code>1E5B4A2F3C1EA19EDA720D983CA2D310</code> <code>0A43890640E31808392F375C602CC47F</code> <code>39A8DDEE811A7D286D9D6DA8F687FADC</code> <code>9F81E52C9D4213788678D4477330AA0A</code> <code>6B04DC05D7DF5A8D6EFC755270ACBC90</code> <code>D2DA3673BA1A2F4AF5ED02868773170E</code><br> <code>8B5A63C6</code></td>
|
||||
<td>See below</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -502,20 +502,20 @@ random_padding_bytes = 6A5F16CE16C2F010CF1F5B1305F4340A22E68A8BC48EC863A7F3FB907
|
|||
<!-- 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 = A0352CC087EA1E380820F7C94661883208B6F39D47BADA5DC72B94D722F6F7C4194BD256B0754FBD65E2C2CA6428AB697A3CD2255C3C28967A0B833C1B51C9D573F2DEBCB9AE8EBF03F6C863557D44027F39608B2CA02FC98FEFCD0C1F315495E7ECC8B17A3347D66CFDE0353DE7EB421FE063B0C2E485DC3EF6EB7BAE574B21DDDBF7D273BFD08B0A17CFB9340DD2C9C4B6FFF24E02DE473222D0869ED1A22EC6593F3A6EB655072ACAB454DC1733A8BA64A2FAFCB9679D8F1A43204CBBF359605AFBA77F4F4B8986D8A84B357683380978BB66F7158C5A89ED75B107998E89516DD933DEDE35D2FA4F53DF4929541B4526FB1349381F96A857EEFB9DF26584FF516FD06B2367960A4E386D7DFA067E603041DB1ABD274828BD3D5FB7436DB2B1C25D8105F2108A48AE0BF4196524E683EC10CC3AB8CD58358C02AC41D926FF1ECD4A5F1936986BC97321BD4C88ED7B5F094B1E70B72B5EFC1D86E9824305195235F0E066F2DFA0BBD2488CC88BB57AC7895959CB1AFEBFB036FB9200E844D26031A14ABBF518B0893AFA4C29D7B06C690D5A7FD316CC920817D45E7EFEBFEBB589BA99F4104093296E9999B09EA66A72679ADDBACEC363D150E16DFB8D51C46E19505DC1539732DDD3CFF351BDCEB28AD3793C0DA308D12A313BD7D266BBBA88765E20F339220858439768072F26C4ABECCE48A5F899C526E5266F7A4A4EF2F3B08B5F53AB6B4590F9E0DF8B441005C80CE472E26831F864E0A9CE06C9DFFEC4E6013A26B823A83BA4643D5FDDB6DEEAF75DA30C87ABFE29F471DD827B399C6EC59D98CEEE1FD430196395885FDBF9
|
||||
tmp_aes_key = FD36AB8054D1E2F02F5205DC00729025F859AB708409CE4F32E82FDA951B0D7A
|
||||
tmp_aes_iv = 049A211296D24BE36D7FFA1E3C30904487A544973922E4930CD594630E6358A8</code></pre>
|
||||
<pre><code>encrypted_answer = A388648CD5DA2B142328E2B5A9A7884BAD7E839668D1293EE31351F62C682A7F57E1736E0B9B546CFE896B13225E79256F4F2294EF95DE2D1CC0023B2CE2376E39C76743F2B9AB7522B6DE54F56FE3EC902974D1B824D1D9D2BF23FCF3086640D3E69BF13816BE72DE3671FE80D61C6C3AD33708F6FF83DE4CE6D732B6D41B31DCB6F3037A582984C3DF6B8BBEBA8716C451F26233C5D91BF7A85E2EA7C3E1A540F059C3F49A5631AD049227CD5C234E86155D2B9AC45B5CCE995C854B8805CF4C833BBFFAE049B728F8ABCD8B2B85941A4258915DADA8E02FB26BA77A1EB9D4FC64C3B50671DAA107F2BB3AB72B2F4E13BA2D404AAD5538DC164939E8BD33A8533901C05AC8E20B70B7B87A8811A78738FF0277B15785330C351EF697968F1F8CE754CCDD86127ED167835C9BAF23D78E4C49E181751D49BD842B8C858560FB1DA0D424431F40391BC11631E1085DA2B036134369AD9CA19D6F5130FABA5AEAF4FDB20B19DB3F951F0215A364C20F092D701F3DD09D24263800AAA4666123EB55C9CBB1C36DAB843AD2A988BE119773EE760D7E9F2C9AA4BBAD3844197C431BFEEC91339208D41DA5BA2BEE4543DCFEA6849E24CCE5CB90132ACC475BEF842A61CDDF76E8BFB9DB3060D885040C41FD20A9F6CC72A09E8DF3C5FC544259796906048F83A0C0BAB4B8EA6E421E5B4A2F3C1EA19EDA720D983CA2D3100A43890640E31808392F375C602CC47F39A8DDEE811A7D286D9D6DA8F687FADC9F81E52C9D4213788678D4477330AA0A6B04DC05D7DF5A8D6EFC755270ACBC90D2DA3673BA1A2F4AF5ED02868773170E8B5A63C6
|
||||
tmp_aes_key = 85AA00CFCCA8B6329A0C9D212D490203901D497207ADA2F2C1B6E79C73805245
|
||||
tmp_aes_iv = 42A87B37C91087D651A5B460CD41CEDAADCA9BF58C11BCCFD4C568256CA1C689</code></pre>
|
||||
<!-- end server_DH_inner_data_input -->
|
||||
<p>Yielding:</p>
|
||||
<!-- start server_DH_inner_data_output -->
|
||||
<pre><code>answer_with_hash = 46A914334DFF3DF06D9A1E5330BF60A105E40B07BA0D89B5DA603B0B6C74D60EC94A04D83AF2027D8C0C719D738B757866BA31F7EF43973903000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE00010035D6639175B1FF6E0AC40189370B3067AF8D52CEA7087E49E01707B5E6112CB33327267BD526CDCD1E971B0488E8C93510E86049B25F640170B02BDE609E83050E5FAB0654C03837E7832018152B11928E0F2E4C3327DBE2717E123CC5994EA0A6034CED7EAD34D99CA90D8940B2065897EBF617B9B1662E682053CDC75A31FD6D7B27B1B8FE868C8139752A4848A5493DFC71477009E0653D185051A7D6F6C3A59C2A89EC8B9BCDD87CB849893D709261D690E3843565DEB19B76B21FB8A0A28DE3BEA19869F1D73346909D17666F94778077C599761176248536A8BB944F4F73C366BF70A04D13326D227999E146C830A473FC9B1F3525263FE30B7D82C2B7009B9E644AD2ABF1F215707B
|
||||
answer = BA0D89B5DA603B0B6C74D60EC94A04D83AF2027D8C0C719D738B757866BA31F7EF43973903000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE00010035D6639175B1FF6E0AC40189370B3067AF8D52CEA7087E49E01707B5E6112CB33327267BD526CDCD1E971B0488E8C93510E86049B25F640170B02BDE609E83050E5FAB0654C03837E7832018152B11928E0F2E4C3327DBE2717E123CC5994EA0A6034CED7EAD34D99CA90D8940B2065897EBF617B9B1662E682053CDC75A31FD6D7B27B1B8FE868C8139752A4848A5493DFC71477009E0653D185051A7D6F6C3A59C2A89EC8B9BCDD87CB849893D709261D690E3843565DEB19B76B21FB8A0A28DE3BEA19869F1D73346909D17666F94778077C599761176248536A8BB944F4F73C366BF70A04D13326D227999E146C830A473FC9B1F3525263FE30B7D82C2B7009B9E644AD2ABF1F215707B</code></pre>
|
||||
<pre><code>answer_with_hash = 31B3FAE5374F2B33BECE4463CD329053F28C37A6BA0D89B57A1FFF5321A4043284F5F3024119D950AECF0E9BD389174E9AE75DCB0D3C7DC603000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE00010058E1620D6674A2157FDB3E6673F00386E2344EEFABCE42C02CCD18FE7956945231BCFB649AD7DFBF69A59E39F0EAB71ED41D4EFE0B50E2AA83AA7FE0DAD6F0EC201870018B03E43D0A3D935B68B6C2094C63067674814889A48D693CCC539F1E7903466ECB3B483530D5AA25C6513AF4645AAAD8CCB05754915078058B4632C74C7ED016E8F7B6F3B0652F709DF778AD295D0814E1EBCDE34533426807A9EA10155E0B11938223B501A6BAE2E1B1F468E2626A2351BACAC6C7B4191F9C58982A2F8D9F42669762212CB5F8876BDE5C93D63E7337D1927B213474AD9F00476A65D0B500ACB9A7A35C83AB0BC5B83A2BDABC959F8D649AE2E5B77997DEF7A9652BEE11BD644BB9F4E72D93B8BA
|
||||
answer = BA0D89B57A1FFF5321A4043284F5F3024119D950AECF0E9BD389174E9AE75DCB0D3C7DC603000000FE000100C71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5BFE00010058E1620D6674A2157FDB3E6673F00386E2344EEFABCE42C02CCD18FE7956945231BCFB649AD7DFBF69A59E39F0EAB71ED41D4EFE0B50E2AA83AA7FE0DAD6F0EC201870018B03E43D0A3D935B68B6C2094C63067674814889A48D693CCC539F1E7903466ECB3B483530D5AA25C6513AF4645AAAD8CCB05754915078058B4632C74C7ED016E8F7B6F3B0652F709DF778AD295D0814E1EBCDE34533426807A9EA10155E0B11938223B501A6BAE2E1B1F468E2626A2351BACAC6C7B4191F9C58982A2F8D9F42669762212CB5F8876BDE5C93D63E7337D1927B213474AD9F00476A65D0B500ACB9A7A35C83AB0BC5B83A2BDABC959F8D649AE2E5B77997DEF7A9652BEE11BD644BB9F4E72D93B8BA</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 DA 60 3B 0B 6C 74 D6 0E C9 4A 04 D8
|
||||
0010 | 3A F2 02 7D 8C 0C 71 9D 73 8B 75 78 66 BA 31 F7
|
||||
0020 | EF 43 97 39 03 00 00 00 FE 00 01 00 C7 1C AE B9
|
||||
<pre><code>0000 | BA 0D 89 B5 7A 1F FF 53 21 A4 04 32 84 F5 F3 02
|
||||
0010 | 41 19 D9 50 AE CF 0E 9B D3 89 17 4E 9A E7 5D CB
|
||||
0020 | 0D 3C 7D C6 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 = BA0D89B5DA603B0B6C74D60EC94A04D83AF2027D8C0C719D738B757866BA31F7EF43973
|
|||
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 | 35 D6 63 91 75 B1 FF 6E 0A C4 01 89 37 0B 30 67
|
||||
0140 | AF 8D 52 CE A7 08 7E 49 E0 17 07 B5 E6 11 2C B3
|
||||
0150 | 33 27 26 7B D5 26 CD CD 1E 97 1B 04 88 E8 C9 35
|
||||
0160 | 10 E8 60 49 B2 5F 64 01 70 B0 2B DE 60 9E 83 05
|
||||
0170 | 0E 5F AB 06 54 C0 38 37 E7 83 20 18 15 2B 11 92
|
||||
0180 | 8E 0F 2E 4C 33 27 DB E2 71 7E 12 3C C5 99 4E A0
|
||||
0190 | A6 03 4C ED 7E AD 34 D9 9C A9 0D 89 40 B2 06 58
|
||||
01A0 | 97 EB F6 17 B9 B1 66 2E 68 20 53 CD C7 5A 31 FD
|
||||
01B0 | 6D 7B 27 B1 B8 FE 86 8C 81 39 75 2A 48 48 A5 49
|
||||
01C0 | 3D FC 71 47 70 09 E0 65 3D 18 50 51 A7 D6 F6 C3
|
||||
01D0 | A5 9C 2A 89 EC 8B 9B CD D8 7C B8 49 89 3D 70 92
|
||||
01E0 | 61 D6 90 E3 84 35 65 DE B1 9B 76 B2 1F B8 A0 A2
|
||||
01F0 | 8D E3 BE A1 98 69 F1 D7 33 46 90 9D 17 66 6F 94
|
||||
0200 | 77 80 77 C5 99 76 11 76 24 85 36 A8 BB 94 4F 4F
|
||||
0210 | 73 C3 66 BF 70 A0 4D 13 32 6D 22 79 99 E1 46 C8
|
||||
0220 | 30 A4 73 FC 9B 1F 35 25 26 3F E3 0B 7D 82 C2 B7
|
||||
0230 | 00 9B 9E 64</code></pre>
|
||||
0130 | 58 E1 62 0D 66 74 A2 15 7F DB 3E 66 73 F0 03 86
|
||||
0140 | E2 34 4E EF AB CE 42 C0 2C CD 18 FE 79 56 94 52
|
||||
0150 | 31 BC FB 64 9A D7 DF BF 69 A5 9E 39 F0 EA B7 1E
|
||||
0160 | D4 1D 4E FE 0B 50 E2 AA 83 AA 7F E0 DA D6 F0 EC
|
||||
0170 | 20 18 70 01 8B 03 E4 3D 0A 3D 93 5B 68 B6 C2 09
|
||||
0180 | 4C 63 06 76 74 81 48 89 A4 8D 69 3C CC 53 9F 1E
|
||||
0190 | 79 03 46 6E CB 3B 48 35 30 D5 AA 25 C6 51 3A F4
|
||||
01A0 | 64 5A AA D8 CC B0 57 54 91 50 78 05 8B 46 32 C7
|
||||
01B0 | 4C 7E D0 16 E8 F7 B6 F3 B0 65 2F 70 9D F7 78 AD
|
||||
01C0 | 29 5D 08 14 E1 EB CD E3 45 33 42 68 07 A9 EA 10
|
||||
01D0 | 15 5E 0B 11 93 82 23 B5 01 A6 BA E2 E1 B1 F4 68
|
||||
01E0 | E2 62 6A 23 51 BA CA C6 C7 B4 19 1F 9C 58 98 2A
|
||||
01F0 | 2F 8D 9F 42 66 97 62 21 2C B5 F8 87 6B DE 5C 93
|
||||
0200 | D6 3E 73 37 D1 92 7B 21 34 74 AD 9F 00 47 6A 65
|
||||
0210 | D0 B5 00 AC B9 A7 A3 5C 83 AB 0B C5 B8 3A 2B DA
|
||||
0220 | BC 95 9F 8D 64 9A E2 E5 B7 79 97 DE F7 A9 65 2B
|
||||
0230 | EE 11 BD 64</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 = BA0D89B5DA603B0B6C74D60EC94A04D83AF2027D8C0C719D738B757866BA31F7EF43973
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>4, 16</td>
|
||||
<td><code>DA603B0B6C74D60EC94A04D83AF2027D</code></td>
|
||||
<td><code>7A1FFF5321A4043284F5F3024119D950</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>20, 16</td>
|
||||
<td><code>8C0C719D738B757866BA31F7EF439739</code></td>
|
||||
<td><code>AECF0E9BD389174E9AE75DCB0D3C7DC6</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -594,13 +594,13 @@ answer = BA0D89B5DA603B0B6C74D60EC94A04D83AF2027D8C0C719D738B757866BA31F7EF43973
|
|||
<tr>
|
||||
<td>g_a</td>
|
||||
<td>300, 260</td>
|
||||
<td><code>FE00010035D6639175B1FF6E0AC40189</code> <code>370B3067AF8D52CEA7087E49E01707B5</code> <code>E6112CB33327267BD526CDCD1E971B04</code> <code>88E8C93510E86049B25F640170B02BDE</code> <code>609E83050E5FAB0654C03837E7832018</code> <code>152B11928E0F2E4C3327DBE2717E123C</code> <code>C5994EA0A6034CED7EAD34D99CA90D89</code> <code>40B2065897EBF617B9B1662E682053CD</code> <code>C75A31FD6D7B27B1B8FE868C8139752A</code> <code>4848A5493DFC71477009E0653D185051</code> <code>A7D6F6C3A59C2A89EC8B9BCDD87CB849</code> <code>893D709261D690E3843565DEB19B76B2</code> <code>1FB8A0A28DE3BEA19869F1D73346909D</code> <code>17666F94778077C599761176248536A8</code> <code>BB944F4F73C366BF70A04D13326D2279</code> <code>99E146C830A473FC9B1F3525263FE30B</code><br> <code>7D82C2B7</code></td>
|
||||
<td><code>FE00010058E1620D6674A2157FDB3E66</code> <code>73F00386E2344EEFABCE42C02CCD18FE</code> <code>7956945231BCFB649AD7DFBF69A59E39</code> <code>F0EAB71ED41D4EFE0B50E2AA83AA7FE0</code> <code>DAD6F0EC201870018B03E43D0A3D935B</code> <code>68B6C2094C63067674814889A48D693C</code> <code>CC539F1E7903466ECB3B483530D5AA25</code> <code>C6513AF4645AAAD8CCB0575491507805</code> <code>8B4632C74C7ED016E8F7B6F3B0652F70</code> <code>9DF778AD295D0814E1EBCDE345334268</code> <code>07A9EA10155E0B11938223B501A6BAE2</code> <code>E1B1F468E2626A2351BACAC6C7B4191F</code> <code>9C58982A2F8D9F42669762212CB5F887</code> <code>6BDE5C93D63E7337D1927B213474AD9F</code> <code>00476A65D0B500ACB9A7A35C83AB0BC5</code> <code>B83A2BDABC959F8D649AE2E5B77997DE</code><br> <code>F7A9652B</code></td>
|
||||
<td><code>g_a</code> diffie-hellman parameter</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_time</td>
|
||||
<td>560, 4</td>
|
||||
<td><code>009B9E64</code> (1688115968 in decimal)</td>
|
||||
<td><code>EE11BD64</code> (1690112494 in decimal)</td>
|
||||
<td>Server time</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -609,34 +609,34 @@ answer = BA0D89B5DA603B0B6C74D60EC94A04D83AF2027D8C0C719D738B757866BA31F7EF43973
|
|||
<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 = F7C5CD46D4A88DED59C1B412D39FEC78BD86A6DC2BF2C5C5D8AF305204158F14B3244D42FFCF2363DC0D25DC6C48A16A3A0E63813D9E87442CA3C2CF84DF848C540531FCDBAD8290A6B25E021EB9AAEEB702F6FB31DC39C48EF615BB0CBBEDE1958D8BF5DCC205CBED3A9DFCD597115163A131DFD4939E68EB2C6F097A5632A3773D5201783A3B6CDE805794F5CBEEFD9FCB8DEAEAD1C5BCADD6366C8A907FABE99A026E59E8521085CE6130123E80B72DFD5EF3D2C0BC880F52DEEF7404638D8053D464036BF7057A77BE75EDA78D3C82221BB131FE6ECB8C43F77DF1D04935F978BA40F3F59385D6D6C2E7782BFFB040AB60F28459EB68A42A904B55E8088C</code></pre>
|
||||
<pre><code>b = B3C37A78F0E2CF3DFD73058C307D5AFA60E8B7E1AB475A6D99655AB4C6357EF1DF004922FBCABDD23699358BEA3B90E08C8D9F1629D207C5A1783D3A04957514EAA13B6C32B406CD9FAF3BB68AE78E79F05AF658E042CBA669315BA3EAC969FE41C0EB1A48AE93A5B8903DD25B3C0512CEA54052EA3124A6E11FA2D09B2070D0FC35A04EC6A0FEA49DB3D8942678744332724A5AD2BB7C773AFFACF7A1E6471B671A5246DC06DD4E5D0CD59F849151A72E13C11FB8C223C219377281C2AB4B8636D4F70AF43DB553C28DF9800E22A09287024A4B7485AD4908364EF504A85BF61DAC712BD5E53FF9DF6031043A5183BD28A7753715A423C391ABA768EA5CF0EC</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 = 2545CE89DAD14BDF0F1E2E34F366124474E221B5C2019CF5240612B81798311E9ED33201DE78EA34B59DC0151E4CF820DEEC3850E1B08114B7599A1C99F28A85234ABCF8DC8BE8AB0CD1019EC56AB7BB2E05F07B7656338BE254ABB2F45AD42A86848E602B04A6B9CC9262780D4F87505A8B17191F53E72BDB00AB290B76810EB15C873183D72EC3D2CB411C3F4BDC7944E1CABF5571B152F7FC3CA1DA470977329DC49854BA62A85AE7645FECBD8183B5A4AAD06DFC56D4BA6106F81A45BEF32A9E4F56A213FB2A027B3ACDFDDDE6A6D57E68352C82F7C0D2108FC010725929CB7C88EE737F7B498D86134C7C7F2626F0357067A07813C0D3F2C86876CC1FF1</code></pre>
|
||||
<pre><code>g_b = AA82DBBD312351768B5F124ADFB02652BEE2FAF1F8FFC91AA6B0345E298872140BF61EFEC9CD11766ED91EF01F344035594C892977E472381070EBC0B7C7892928EA191C7540DE70A25AB8926787C0204DB502269A22DF61B19CD106CBD7AFEB48CB5DD797A1FFD2BBE9EA1BF799122792F96B5D1F10E5E7DD0A5F5C8AA09A3AA56B15CCA0F4D3CDBD9FB4ADD433FC63864D14131172AABD7F7835D0419525EC50BBB849F90EDDB0A979603B7DD896AEB4F5D52F4FDA5893250285C2CDFB60480F3D09BBD5D32DB68A565AABAE4042AA10173EF78DE1445897282AD6CE3F8CBFDF8F0D7A9F95EB171BFC8A3A009DAA20FAE28E5C0C165D2E4305DD7450E19CA5</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 DA 60 3B 0B 6C 74 D6 0E C9 4A 04 D8
|
||||
0010 | 3A F2 02 7D 8C 0C 71 9D 73 8B 75 78 66 BA 31 F7
|
||||
0020 | EF 43 97 39 00 00 00 00 00 00 00 00 FE 00 01 00
|
||||
0030 | 25 45 CE 89 DA D1 4B DF 0F 1E 2E 34 F3 66 12 44
|
||||
0040 | 74 E2 21 B5 C2 01 9C F5 24 06 12 B8 17 98 31 1E
|
||||
0050 | 9E D3 32 01 DE 78 EA 34 B5 9D C0 15 1E 4C F8 20
|
||||
0060 | DE EC 38 50 E1 B0 81 14 B7 59 9A 1C 99 F2 8A 85
|
||||
0070 | 23 4A BC F8 DC 8B E8 AB 0C D1 01 9E C5 6A B7 BB
|
||||
0080 | 2E 05 F0 7B 76 56 33 8B E2 54 AB B2 F4 5A D4 2A
|
||||
0090 | 86 84 8E 60 2B 04 A6 B9 CC 92 62 78 0D 4F 87 50
|
||||
00A0 | 5A 8B 17 19 1F 53 E7 2B DB 00 AB 29 0B 76 81 0E
|
||||
00B0 | B1 5C 87 31 83 D7 2E C3 D2 CB 41 1C 3F 4B DC 79
|
||||
00C0 | 44 E1 CA BF 55 71 B1 52 F7 FC 3C A1 DA 47 09 77
|
||||
00D0 | 32 9D C4 98 54 BA 62 A8 5A E7 64 5F EC BD 81 83
|
||||
00E0 | B5 A4 AA D0 6D FC 56 D4 BA 61 06 F8 1A 45 BE F3
|
||||
00F0 | 2A 9E 4F 56 A2 13 FB 2A 02 7B 3A CD FD DD E6 A6
|
||||
0100 | D5 7E 68 35 2C 82 F7 C0 D2 10 8F C0 10 72 59 29
|
||||
0110 | CB 7C 88 EE 73 7F 7B 49 8D 86 13 4C 7C 7F 26 26
|
||||
0120 | F0 35 70 67 A0 78 13 C0 D3 F2 C8 68 76 CC 1F F1</code></pre>
|
||||
<pre><code>0000 | 54 B6 43 66 7A 1F FF 53 21 A4 04 32 84 F5 F3 02
|
||||
0010 | 41 19 D9 50 AE CF 0E 9B D3 89 17 4E 9A E7 5D CB
|
||||
0020 | 0D 3C 7D C6 00 00 00 00 00 00 00 00 FE 00 01 00
|
||||
0030 | AA 82 DB BD 31 23 51 76 8B 5F 12 4A DF B0 26 52
|
||||
0040 | BE E2 FA F1 F8 FF C9 1A A6 B0 34 5E 29 88 72 14
|
||||
0050 | 0B F6 1E FE C9 CD 11 76 6E D9 1E F0 1F 34 40 35
|
||||
0060 | 59 4C 89 29 77 E4 72 38 10 70 EB C0 B7 C7 89 29
|
||||
0070 | 28 EA 19 1C 75 40 DE 70 A2 5A B8 92 67 87 C0 20
|
||||
0080 | 4D B5 02 26 9A 22 DF 61 B1 9C D1 06 CB D7 AF EB
|
||||
0090 | 48 CB 5D D7 97 A1 FF D2 BB E9 EA 1B F7 99 12 27
|
||||
00A0 | 92 F9 6B 5D 1F 10 E5 E7 DD 0A 5F 5C 8A A0 9A 3A
|
||||
00B0 | A5 6B 15 CC A0 F4 D3 CD BD 9F B4 AD D4 33 FC 63
|
||||
00C0 | 86 4D 14 13 11 72 AA BD 7F 78 35 D0 41 95 25 EC
|
||||
00D0 | 50 BB B8 49 F9 0E DD B0 A9 79 60 3B 7D D8 96 AE
|
||||
00E0 | B4 F5 D5 2F 4F DA 58 93 25 02 85 C2 CD FB 60 48
|
||||
00F0 | 0F 3D 09 BB D5 D3 2D B6 8A 56 5A AB AE 40 42 AA
|
||||
0100 | 10 17 3E F7 8D E1 44 58 97 28 2A D6 CE 3F 8C BF
|
||||
0110 | DF 8F 0D 7A 9F 95 EB 17 1B FC 8A 3A 00 9D AA 20
|
||||
0120 | FA E2 8E 5C 0C 16 5D 2E 43 05 DD 74 50 E1 9C A5</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 = BA0D89B5DA603B0B6C74D60EC94A04D83AF2027D8C0C719D738B757866BA31F7EF43973
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>4, 16</td>
|
||||
<td><code>DA603B0B6C74D60EC94A04D83AF2027D</code></td>
|
||||
<td><code>7A1FFF5321A4043284F5F3024119D950</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>20, 16</td>
|
||||
<td><code>8C0C719D738B757866BA31F7EF439739</code></td>
|
||||
<td><code>AECF0E9BD389174E9AE75DCB0D3C7DC6</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>g_b</td>
|
||||
<td>36, 260</td>
|
||||
<td><code>FE0001002545CE89DAD14BDF0F1E2E34</code> <code>F366124474E221B5C2019CF5240612B8</code> <code>1798311E9ED33201DE78EA34B59DC015</code> <code>1E4CF820DEEC3850E1B08114B7599A1C</code> <code>99F28A85234ABCF8DC8BE8AB0CD1019E</code> <code>C56AB7BB2E05F07B7656338BE254ABB2</code> <code>F45AD42A86848E602B04A6B9CC926278</code> <code>0D4F87505A8B17191F53E72BDB00AB29</code> <code>0B76810EB15C873183D72EC3D2CB411C</code> <code>3F4BDC7944E1CABF5571B152F7FC3CA1</code> <code>DA470977329DC49854BA62A85AE7645F</code> <code>ECBD8183B5A4AAD06DFC56D4BA6106F8</code> <code>1A45BEF32A9E4F56A213FB2A027B3ACD</code> <code>FDDDE6A6D57E68352C82F7C0D2108FC0</code> <code>10725929CB7C88EE737F7B498D86134C</code> <code>7C7F2626F0357067A07813C0D3F2C868</code><br> <code>76CC1FF1</code></td>
|
||||
<td><code>FE000100AA82DBBD312351768B5F124A</code> <code>DFB02652BEE2FAF1F8FFC91AA6B0345E</code> <code>298872140BF61EFEC9CD11766ED91EF0</code> <code>1F344035594C892977E472381070EBC0</code> <code>B7C7892928EA191C7540DE70A25AB892</code> <code>6787C0204DB502269A22DF61B19CD106</code> <code>CBD7AFEB48CB5DD797A1FFD2BBE9EA1B</code> <code>F799122792F96B5D1F10E5E7DD0A5F5C</code> <code>8AA09A3AA56B15CCA0F4D3CDBD9FB4AD</code> <code>D433FC63864D14131172AABD7F7835D0</code> <code>419525EC50BBB849F90EDDB0A979603B</code> <code>7DD896AEB4F5D52F4FDA5893250285C2</code> <code>CDFB60480F3D09BBD5D32DB68A565AAB</code> <code>AE4042AA10173EF78DE1445897282AD6</code> <code>CE3F8CBFDF8F0D7A9F95EB171BFC8A3A</code> <code>009DAA20FAE28E5C0C165D2E4305DD74</code><br> <code>50E19CA5</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 = BA0D89B5DA603B0B6C74D60EC94A04D83AF2027D8C0C719D738B757866BA31F7EF43973
|
|||
<!-- 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 = 54B64366DA603B0B6C74D60EC94A04D83AF2027D8C0C719D738B757866BA31F7EF4397390000000000000000FE0001002545CE89DAD14BDF0F1E2E34F366124474E221B5C2019CF5240612B81798311E9ED33201DE78EA34B59DC0151E4CF820DEEC3850E1B08114B7599A1C99F28A85234ABCF8DC8BE8AB0CD1019EC56AB7BB2E05F07B7656338BE254ABB2F45AD42A86848E602B04A6B9CC9262780D4F87505A8B17191F53E72BDB00AB290B76810EB15C873183D72EC3D2CB411C3F4BDC7944E1CABF5571B152F7FC3CA1DA470977329DC49854BA62A85AE7645FECBD8183B5A4AAD06DFC56D4BA6106F81A45BEF32A9E4F56A213FB2A027B3ACDFDDDE6A6D57E68352C82F7C0D2108FC010725929CB7C88EE737F7B498D86134C7C7F2626F0357067A07813C0D3F2C86876CC1FF1
|
||||
padding = BD8A6AC82FFB68885A48E0ED
|
||||
tmp_aes_key = FD36AB8054D1E2F02F5205DC00729025F859AB708409CE4F32E82FDA951B0D7A
|
||||
tmp_aes_iv = 049A211296D24BE36D7FFA1E3C30904487A544973922E4930CD594630E6358A8</code></pre>
|
||||
<pre><code>data = 54B643667A1FFF5321A4043284F5F3024119D950AECF0E9BD389174E9AE75DCB0D3C7DC60000000000000000FE000100AA82DBBD312351768B5F124ADFB02652BEE2FAF1F8FFC91AA6B0345E298872140BF61EFEC9CD11766ED91EF01F344035594C892977E472381070EBC0B7C7892928EA191C7540DE70A25AB8926787C0204DB502269A22DF61B19CD106CBD7AFEB48CB5DD797A1FFD2BBE9EA1BF799122792F96B5D1F10E5E7DD0A5F5C8AA09A3AA56B15CCA0F4D3CDBD9FB4ADD433FC63864D14131172AABD7F7835D0419525EC50BBB849F90EDDB0A979603B7DD896AEB4F5D52F4FDA5893250285C2CDFB60480F3D09BBD5D32DB68A565AABAE4042AA10173EF78DE1445897282AD6CE3F8CBFDF8F0D7A9F95EB171BFC8A3A009DAA20FAE28E5C0C165D2E4305DD7450E19CA5
|
||||
padding = 5BF0DB8A6C0EB02EAD86C9FD
|
||||
tmp_aes_key = 85AA00CFCCA8B6329A0C9D212D490203901D497207ADA2F2C1B6E79C73805245
|
||||
tmp_aes_iv = 42A87B37C91087D651A5B460CD41CEDAADCA9BF58C11BCCFD4C568256CA1C689</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 = E3B5716AC2E86342AD2E8C7B75FD17C713CE5C8559659F8301258D63D9101D1DB99EA9C1909315495C8776FD7885CA40AB860F38C8BD946F90CCEC63F3ED2A5A8F06F4E45BFDD0CC4A626AF74C299623B64E8E384BB7A66C36483EA667CE513FB5C2B9C7C635206E824F6BFC45A259CE0692745EBF3FDE3DEE350903FC0E2FF821DAECDF333B23F77866A444E2AC3B1BC8CC2EA38D4C2C3FF375FF70CFAF76E35BE863D54969CF4A887C8D6223874017B4B509CF3DE096E288512FBEF295D4DE4CC3CA6EAEA779B07100D8CC9E2EF7A6B40575CCC5EC93E32E7F8E4FD7332737F3B179573B4BEC13ABD868CC06A725ECFFC29494FE6AFFD3CEF2DE94681D4A3F19DDE0CF9BB0F13974443EA04D6CE173E0655BAFC847B5D55393BE982E00903B557B61FB38F15A88CADA345BC8B7820BB1C051C0A8B13AE70A5479E87D6BCA8A7AA73C306AF0FACD6760C566014DE790</code></pre>
|
||||
<pre><code>encrypted_data = E2E97CCBFC703FEB7A5C71C49B7649000C524EAA6DEBD9AE571B812FE10630D72AA1B5962057DEAD590AC00B0FF26851972BE0877D958E5245E6E091BDD648F2E06774BDECA6B32D6A75CF3C6A818245108EA00B1C54A537E1360A627515B9B4C66C2F653004DE0B00BB6A66D66F5A2A8784F1B4E15E9363CE3B711322F96EF48768899CFDC7D7DE0161A0C9BD98743AD2933871F030830B19AB065CCAB55D395415D7C7E34ADDA5D24A46B579434E95649925E67578134010F2C4B9952FC14BBDE42536DE735AA16C775AD6821BCB2624A20D9144E560ACB228E7ABB33AEFA254C6E0AEBDE86DE109B8CC92E484D0FD3922EC0E767ACF5AC5FD8F2A8C6825590BECD9A89580EDACCFF7BB4540D1EFD6F19C4C2432C7C8316F33CB180BE33E2B2E3DE65A4C2B02FAD0CE83D4894E283E2588C4B49AF451156B119AF45811F6FE8C26C0FB7B9D8B7FC811D78FEE70FA42</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 E8 30 0F 00 00 9B 9E 64
|
||||
0010 | 78 01 00 00 1F 5F 04 F5 DA 60 3B 0B 6C 74 D6 0E
|
||||
0020 | C9 4A 04 D8 3A F2 02 7D 8C 0C 71 9D 73 8B 75 78
|
||||
0030 | 66 BA 31 F7 EF 43 97 39 FE 50 01 00 E3 B5 71 6A
|
||||
0040 | C2 E8 63 42 AD 2E 8C 7B 75 FD 17 C7 13 CE 5C 85
|
||||
0050 | 59 65 9F 83 01 25 8D 63 D9 10 1D 1D B9 9E A9 C1
|
||||
0060 | 90 93 15 49 5C 87 76 FD 78 85 CA 40 AB 86 0F 38
|
||||
0070 | C8 BD 94 6F 90 CC EC 63 F3 ED 2A 5A 8F 06 F4 E4
|
||||
0080 | 5B FD D0 CC 4A 62 6A F7 4C 29 96 23 B6 4E 8E 38
|
||||
0090 | 4B B7 A6 6C 36 48 3E A6 67 CE 51 3F B5 C2 B9 C7
|
||||
00A0 | C6 35 20 6E 82 4F 6B FC 45 A2 59 CE 06 92 74 5E
|
||||
00B0 | BF 3F DE 3D EE 35 09 03 FC 0E 2F F8 21 DA EC DF
|
||||
00C0 | 33 3B 23 F7 78 66 A4 44 E2 AC 3B 1B C8 CC 2E A3
|
||||
00D0 | 8D 4C 2C 3F F3 75 FF 70 CF AF 76 E3 5B E8 63 D5
|
||||
00E0 | 49 69 CF 4A 88 7C 8D 62 23 87 40 17 B4 B5 09 CF
|
||||
00F0 | 3D E0 96 E2 88 51 2F BE F2 95 D4 DE 4C C3 CA 6E
|
||||
0100 | AE A7 79 B0 71 00 D8 CC 9E 2E F7 A6 B4 05 75 CC
|
||||
0110 | C5 EC 93 E3 2E 7F 8E 4F D7 33 27 37 F3 B1 79 57
|
||||
0120 | 3B 4B EC 13 AB D8 68 CC 06 A7 25 EC FF C2 94 94
|
||||
0130 | FE 6A FF D3 CE F2 DE 94 68 1D 4A 3F 19 DD E0 CF
|
||||
0140 | 9B B0 F1 39 74 44 3E A0 4D 6C E1 73 E0 65 5B AF
|
||||
0150 | C8 47 B5 D5 53 93 BE 98 2E 00 90 3B 55 7B 61 FB
|
||||
0160 | 38 F1 5A 88 CA DA 34 5B C8 B7 82 0B B1 C0 51 C0
|
||||
0170 | A8 B1 3A E7 0A 54 79 E8 7D 6B CA 8A 7A A7 3C 30
|
||||
0180 | 6A F0 FA CD 67 60 C5 66 01 4D E7 90</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 7C F4 09 00 EE 11 BD 64
|
||||
0010 | 78 01 00 00 1F 5F 04 F5 7A 1F FF 53 21 A4 04 32
|
||||
0020 | 84 F5 F3 02 41 19 D9 50 AE CF 0E 9B D3 89 17 4E
|
||||
0030 | 9A E7 5D CB 0D 3C 7D C6 FE 50 01 00 E2 E9 7C CB
|
||||
0040 | FC 70 3F EB 7A 5C 71 C4 9B 76 49 00 0C 52 4E AA
|
||||
0050 | 6D EB D9 AE 57 1B 81 2F E1 06 30 D7 2A A1 B5 96
|
||||
0060 | 20 57 DE AD 59 0A C0 0B 0F F2 68 51 97 2B E0 87
|
||||
0070 | 7D 95 8E 52 45 E6 E0 91 BD D6 48 F2 E0 67 74 BD
|
||||
0080 | EC A6 B3 2D 6A 75 CF 3C 6A 81 82 45 10 8E A0 0B
|
||||
0090 | 1C 54 A5 37 E1 36 0A 62 75 15 B9 B4 C6 6C 2F 65
|
||||
00A0 | 30 04 DE 0B 00 BB 6A 66 D6 6F 5A 2A 87 84 F1 B4
|
||||
00B0 | E1 5E 93 63 CE 3B 71 13 22 F9 6E F4 87 68 89 9C
|
||||
00C0 | FD C7 D7 DE 01 61 A0 C9 BD 98 74 3A D2 93 38 71
|
||||
00D0 | F0 30 83 0B 19 AB 06 5C CA B5 5D 39 54 15 D7 C7
|
||||
00E0 | E3 4A DD A5 D2 4A 46 B5 79 43 4E 95 64 99 25 E6
|
||||
00F0 | 75 78 13 40 10 F2 C4 B9 95 2F C1 4B BD E4 25 36
|
||||
0100 | DE 73 5A A1 6C 77 5A D6 82 1B CB 26 24 A2 0D 91
|
||||
0110 | 44 E5 60 AC B2 28 E7 AB B3 3A EF A2 54 C6 E0 AE
|
||||
0120 | BD E8 6D E1 09 B8 CC 92 E4 84 D0 FD 39 22 EC 0E
|
||||
0130 | 76 7A CF 5A C5 FD 8F 2A 8C 68 25 59 0B EC D9 A8
|
||||
0140 | 95 80 ED AC CF F7 BB 45 40 D1 EF D6 F1 9C 4C 24
|
||||
0150 | 32 C7 C8 31 6F 33 CB 18 0B E3 3E 2B 2E 3D E6 5A
|
||||
0160 | 4C 2B 02 FA D0 CE 83 D4 89 4E 28 3E 25 88 C4 B4
|
||||
0170 | 9A F4 51 15 6B 11 9A F4 58 11 F6 FE 8C 26 C0 FB
|
||||
0180 | 7B 9D 8B 7F C8 11 D7 8F EE 70 FA 42</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>E8300F00009B9E64</code></td>
|
||||
<td><code>7CF40900EE11BD64</code></td>
|
||||
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() << 32) + (N*4)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -764,19 +764,19 @@ encrypted_data := AES256_ige_encrypt (data_with_hash, tmp_aes_key, tmp_aes_iv);<
|
|||
<tr>
|
||||
<td>nonce</td>
|
||||
<td>24, 16</td>
|
||||
<td><code>DA603B0B6C74D60EC94A04D83AF2027D</code></td>
|
||||
<td><code>7A1FFF5321A4043284F5F3024119D950</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>8C0C719D738B757866BA31F7EF439739</code></td>
|
||||
<td><code>AECF0E9BD389174E9AE75DCB0D3C7DC6</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>encrypted_data</td>
|
||||
<td>56, 340</td>
|
||||
<td><code>FE500100E3B5716AC2E86342AD2E8C7B</code> <code>75FD17C713CE5C8559659F8301258D63</code> <code>D9101D1DB99EA9C1909315495C8776FD</code> <code>7885CA40AB860F38C8BD946F90CCEC63</code> <code>F3ED2A5A8F06F4E45BFDD0CC4A626AF7</code> <code>4C299623B64E8E384BB7A66C36483EA6</code> <code>67CE513FB5C2B9C7C635206E824F6BFC</code> <code>45A259CE0692745EBF3FDE3DEE350903</code> <code>FC0E2FF821DAECDF333B23F77866A444</code> <code>E2AC3B1BC8CC2EA38D4C2C3FF375FF70</code> <code>CFAF76E35BE863D54969CF4A887C8D62</code> <code>23874017B4B509CF3DE096E288512FBE</code> <code>F295D4DE4CC3CA6EAEA779B07100D8CC</code> <code>9E2EF7A6B40575CCC5EC93E32E7F8E4F</code> <code>D7332737F3B179573B4BEC13ABD868CC</code> <code>06A725ECFFC29494FE6AFFD3CEF2DE94</code> <code>681D4A3F19DDE0CF9BB0F13974443EA0</code> <code>4D6CE173E0655BAFC847B5D55393BE98</code> <code>2E00903B557B61FB38F15A88CADA345B</code> <code>C8B7820BB1C051C0A8B13AE70A5479E8</code> <code>7D6BCA8A7AA73C306AF0FACD6760C566</code><br> <code>014DE790</code></td>
|
||||
<td><code>FE500100E2E97CCBFC703FEB7A5C71C4</code> <code>9B7649000C524EAA6DEBD9AE571B812F</code> <code>E10630D72AA1B5962057DEAD590AC00B</code> <code>0FF26851972BE0877D958E5245E6E091</code> <code>BDD648F2E06774BDECA6B32D6A75CF3C</code> <code>6A818245108EA00B1C54A537E1360A62</code> <code>7515B9B4C66C2F653004DE0B00BB6A66</code> <code>D66F5A2A8784F1B4E15E9363CE3B7113</code> <code>22F96EF48768899CFDC7D7DE0161A0C9</code> <code>BD98743AD2933871F030830B19AB065C</code> <code>CAB55D395415D7C7E34ADDA5D24A46B5</code> <code>79434E95649925E67578134010F2C4B9</code> <code>952FC14BBDE42536DE735AA16C775AD6</code> <code>821BCB2624A20D9144E560ACB228E7AB</code> <code>B33AEFA254C6E0AEBDE86DE109B8CC92</code> <code>E484D0FD3922EC0E767ACF5AC5FD8F2A</code> <code>8C6825590BECD9A89580EDACCFF7BB45</code> <code>40D1EFD6F19C4C2432C7C8316F33CB18</code> <code>0BE33E2B2E3DE65A4C2B02FAD0CE83D4</code> <code>894E283E2588C4B49AF451156B119AF4</code> <code>5811F6FE8C26C0FB7B9D8B7FC811D78F</code><br> <code>EE70FA42</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 = 48892B997A14A133B6D5B234A7F9B19DCE70CB192B9238372639DD6230B1BCC8D31BBBCCFA7F00BBEF38303BAE50FFF3DC814333123CE6E5980EF4493A74F38AD6B05B6737E296ADF4C97C69C95C5EC840BC22694F4CBFC14598B28F83B5CD79FE881F6AB9615226DF63078688371B3CDD2F6E97B35D17E6710E29469E1476B596C1DE136F05D585290776B306D6946B1C33374A459ECB0E9BFBC5A43D145A6B37C276E94C840EA0950B0B2523744CD538817DBA33CD6C84175AEA8561EBA117D2589EFB30A304B0F7AF29FF141E6B3F6F9FA5CEFF31DF1166937EA07D850427B6D779BBAB5B062526D435206EA25158EABC659DE3DC5E4ABF0D93B87B35E5E7</code></pre>
|
||||
<pre><code>auth_key = 60C3EBE25C20992BC7E3AB95617D651DA3D04909117333817FE270070722B1D732F5BEEFCEDFA92E6B2E7619829B2DC6E843BED0E26EB0C21963A64F61B7C0E8BBBCA739634630C704CEF0DEB334EC3839E14B65AA525508151896944036827ED12E17F702B7BC6ECA0C16F8346C5824780ADF27C167C482EE15753FF6C6CAE89F278C394E33C983125CD61A64E2016442C3A4448DF3652189A9BBB24D0860620968BD8BFFC9A3096BBB25997DB160FC5FA57FD53FB72E4466C813AAEF820109AB7BB5E02821738471B9E1AD8E2B3985E1EA592AC3B35D9A0C90289D3149D944ADBB17C53DC758D5DF1C527F33E69DC45005FB8A04C2434E2CB30053C2C6A892</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 84 8C 9F 00 9B 9E 64
|
||||
0010 | 34 00 00 00 34 F7 CB 3B DA 60 3B 0B 6C 74 D6 0E
|
||||
0020 | C9 4A 04 D8 3A F2 02 7D 8C 0C 71 9D 73 8B 75 78
|
||||
0030 | 66 BA 31 F7 EF 43 97 39 B0 91 C6 77 C6 99 6C 09
|
||||
0040 | FF 59 F2 F9 AB 28 16 78</code></pre>
|
||||
<pre><code>0000 | 00 00 00 00 00 00 00 00 01 18 26 55 EE 11 BD 64
|
||||
0010 | 34 00 00 00 34 F7 CB 3B 7A 1F FF 53 21 A4 04 32
|
||||
0020 | 84 F5 F3 02 41 19 D9 50 AE CF 0E 9B D3 89 17 4E
|
||||
0030 | 9A E7 5D CB 0D 3C 7D C6 BA 1A A4 97 1D 49 9B B8
|
||||
0040 | 57 5C 32 8B 33 9D 8E 0A</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,7 +817,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>01848C9F009B9E64</code></td>
|
||||
<td><code>01182655EE11BD64</code></td>
|
||||
<td>Message ID generated as specified <a href="/mtproto/description#message-identifier-msg-id">here »</a> (unixtime() << 32) + (N*4)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -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>DA603B0B6C74D60EC94A04D83AF2027D</code></td>
|
||||
<td><code>7A1FFF5321A4043284F5F3024119D950</code></td>
|
||||
<td>Value generated by client in Step 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>server_nonce</td>
|
||||
<td>40, 16</td>
|
||||
<td><code>8C0C719D738B757866BA31F7EF439739</code></td>
|
||||
<td><code>AECF0E9BD389174E9AE75DCB0D3C7DC6</code></td>
|
||||
<td>Value received from server in Step 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>new_nonce_hash1</td>
|
||||
<td>56, 16</td>
|
||||
<td><code>B091C677C6996C09FF59F2F9AB281678</code></td>
|
||||
<td><code>BA1AA4971D499BB8575C328B339D8E0A</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>
|
||||
|
|
|
@ -46,75 +46,72 @@ rpc_result#f35c6d01 req_msg_id:long…">
|
|||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/mtproto" >Mobile Protocol</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/mtproto/service_messages" >Service Messages</a></li></ul></div>
|
||||
<h1 id="dev_page_title">Service Messages</h1>
|
||||
|
||||
<div id="dev_page_content"><h4><a class="anchor" href="#response-to-an-rpc-query" id="response-to-an-rpc-query" name="response-to-an-rpc-query"><i class="anchor-icon"></i></a>Response to an RPC query</h4>
|
||||
<div id="dev_page_content"><h4><a class="anchor" name="response-to-an-rpc-query" href="#response-to-an-rpc-query"><i class="anchor-icon"></i></a>Response to an RPC query</h4>
|
||||
<p>A response to an RPC query is normally wrapped as follows:</p>
|
||||
<pre><code>rpc_result#f35c6d01 req_msg_id:long result:Object = RpcResult;</code></pre>
|
||||
<p>Here req_msg_id is the identifier of the message sent by the other party and containing an RPC query. This way, the recipient knows that the result is a response to the specific RPC query in question.
|
||||
At the same time, this response serves as acknowledgment of the other party's receipt of the req_msg_id message.</p>
|
||||
<p>Here req_msg_id is the identifier of the message sent by the other party and containing an RPC query. This way, the recipient knows that the result is a response to the specific RPC query in question.<br>At the same time, this response serves as acknowledgment of the other party's receipt of the req_msg_id message.</p>
|
||||
<p>Note that the response to an RPC query must also be acknowledged. Most frequently, this coincides with the transmission of the next message (which may have a container attached to it carrying a service message with the acknowledgment).</p>
|
||||
<h4><a class="anchor" href="#rpc-error" id="rpc-error" name="rpc-error"><i class="anchor-icon"></i></a>RPC Error</h4>
|
||||
<h4><a class="anchor" name="rpc-error" href="#rpc-error"><i class="anchor-icon"></i></a>RPC Error</h4>
|
||||
<p>The result field returned in response to any RPC query may also contain an error message in the following format:</p>
|
||||
<pre><code>rpc_error#2144ca19 error_code:int error_message:string = RpcError;</code></pre>
|
||||
<h4><a class="anchor" href="#cancellation-of-an-rpc-query" id="cancellation-of-an-rpc-query" name="cancellation-of-an-rpc-query"><i class="anchor-icon"></i></a>Cancellation of an RPC Query</h4>
|
||||
<p>In certain situations, the client does not want to receive a response to an already transmitted RPC query, for example because the response turns out to be long and the client has decided to do without it because of insufficient link capacity. Simply interrupting the TCP connection will not have any effect because the server would re-send the missing response at the first opportunity. Therefore, the client needs a way to cancel receipt of the RPC response message, actually acknowledging its receipt prior to it being in fact received, which will settle the server down and prevent it from re-sending the response. However, the client does not know the RPC response's msg_id prior to receiving the response; the only thing it knows is the req_msg_id. i. e. the msg_id of the relevant RPC query. Therefore, a special query is used:</p>
|
||||
<h4><a class="anchor" name="cancellation-of-an-rpc-query" href="#cancellation-of-an-rpc-query"><i class="anchor-icon"></i></a>Cancellation of an RPC Query</h4>
|
||||
<p>In certain situations, the client does not want to receive a response to an already transmitted RPC query, for example because the response turns out to be long and the client has decided to do without it because of insufficient link capacity. Simply interrupting the TCP connection will not have any effect because the server would re-send the missing response at the first opportunity. Therefore, the client needs a way to cancel receipt of the RPC response message, actually acknowledging its receipt prior to it being in fact received, which will settle the server down and prevent it from re-sending the response. However, the client does not know the RPC response's msg_id prior to receiving the response; the only thing it knows is the req_msg_id. i. e. the msg_id of the relevant RPC query. Therefore, a special query is used:</p>
|
||||
<pre><code>rpc_drop_answer#58e4a740 req_msg_id:long = RpcDropAnswer;</code></pre>
|
||||
<p>The response to this query returns as one of the following messages wrapped in rpc_result and requiring an acknowledgment: </p>
|
||||
<pre><code>rpc_answer_unknown#5e2ad36e = RpcDropAnswer;
|
||||
rpc_answer_dropped_running#cd78e586 = RpcDropAnswer;
|
||||
rpc_answer_dropped#a43ad8b7 msg_id:long seq_no:int bytes:int = RpcDropAnswer;</code></pre>
|
||||
<p>The first version of the response is used if the server remembers nothing of the incoming req_msg_id (if it has already been responded to, for example). The second version is used if the response was canceled while the RPC query was being processed (where the RPC query itself was still fully processed); in this case, the same rpc_answer_dropped_running is also returned in response to the original query, and both of these responses require an acknowledgment from the client. The final version means that the RPC response was removed from the server's outgoing queue, and its msg_id, seq_no, and length in bytes are transmitted to the client.</p>
|
||||
<p>Note that rpc_answer_dropped_running and rpc_answer_dropped serve as acknowledgments of the server's receipt of the original query (the same one, the response to which we wish to forget). In addition, same as for any RPC queries, any response to rpc_drop_answer is an acknowledgment for rpc_drop_answer itself.</p>
|
||||
<p>The first version of the response is used if the server remembers nothing of the incoming req_msg_id (if it has already been responded to, for example). The second version is used if the response was canceled while the RPC query was being processed (where the RPC query itself was still fully processed); in this case, the same rpc_answer_dropped_running is also returned in response to the original query, and both of these responses require an acknowledgment from the client. The final version means that the RPC response was removed from the server's outgoing queue, and its msg_id, seq_no, and length in bytes are transmitted to the client.</p>
|
||||
<p>Note that rpc_answer_dropped_running and rpc_answer_dropped serve as acknowledgments of the server's receipt of the original query (the same one, the response to which we wish to forget). In addition, same as for any RPC queries, any response to rpc_drop_answer is an acknowledgment for rpc_drop_answer itself.</p>
|
||||
<p>As an alternative to using rpc_drop_answer, a new session may be created after the connection is reset and the old session is removed through destroy_session.</p>
|
||||
<h4><a class="anchor" href="#messages-associated-with-querying-changing-and-receiving-the-status-of-other-messages" id="messages-associated-with-querying-changing-and-receiving-the-status-of-other-messages" name="messages-associated-with-querying-changing-and-receiving-the-status-of-other-messages"><i class="anchor-icon"></i></a>Messages associated with querying, changing, and receiving the status of other messages</h4>
|
||||
<h4><a class="anchor" name="messages-associated-with-querying-changing-and-receiving-the-sta" href="#messages-associated-with-querying-changing-and-receiving-the-sta"><i class="anchor-icon"></i></a>Messages associated with querying, changing, and receiving the status of other messages</h4>
|
||||
<p>See <a href="/mtproto/service_messages_about_messages">Mobile Protocol: Service Messages about Messages</a></p>
|
||||
<h4><a class="anchor" href="#request-for-several-future-salts" id="request-for-several-future-salts" name="request-for-several-future-salts"><i class="anchor-icon"></i></a>Request for several future salts</h4>
|
||||
<h4><a class="anchor" name="request-for-several-future-salts" href="#request-for-several-future-salts"><i class="anchor-icon"></i></a>Request for several future salts</h4>
|
||||
<p>The client may at any time request from the server several (between 1 and 64) future server salts together with their validity periods. Having stored them in persistent memory, the client may use them to send messages in the future even if it changes sessions (a server salt is attached to the authorization key rather than being session-specific).</p>
|
||||
<pre><code>get_future_salts#b921bd04 num:int = FutureSalts;
|
||||
future_salt#0949d9dc valid_since:int valid_until:int salt:long = FutureSalt;
|
||||
future_salts#ae500895 req_msg_id:long now:int salts:vector<future_salt> = FutureSalts;</code></pre>
|
||||
<p>The client must check to see that the response's req_msg_id in fact coincides with msg_id of the query for get_future_salts. The server returns a maximum of num future server salts (may return fewer). The response serves as the acknowledgment of the query and does not require an acknowledgment itself.</p>
|
||||
<h4><a class="anchor" href="#ping-messages-pingpong" id="ping-messages-pingpong" name="ping-messages-pingpong"><i class="anchor-icon"></i></a>Ping Messages (PING/PONG)</h4>
|
||||
<p>The client must check to see that the response's req_msg_id in fact coincides with msg_id of the query for get_future_salts. The server returns a maximum of num future server salts (may return fewer). The response serves as the acknowledgment of the query and does not require an acknowledgment itself.</p>
|
||||
<h4><a class="anchor" name="ping-messages-ping-pong" href="#ping-messages-ping-pong"><i class="anchor-icon"></i></a>Ping Messages (PING/PONG)</h4>
|
||||
<pre><code>ping#7abe77ec ping_id:long = Pong;</code></pre>
|
||||
<p>A response is usually returned to the same connection:</p>
|
||||
<pre><code>pong#347773c5 msg_id:long ping_id:long = Pong;</code></pre>
|
||||
<p>These messages do not require acknowledgments. A pong is transmitted only in response to a ping while a ping can be initiated by either side.</p>
|
||||
<h4><a class="anchor" href="#deferred-connection-closure--ping" id="deferred-connection-closure--ping" name="deferred-connection-closure--ping"><i class="anchor-icon"></i></a>Deferred Connection Closure + PING</h4>
|
||||
<h4><a class="anchor" name="deferred-connection-closure-ping" href="#deferred-connection-closure-ping"><i class="anchor-icon"></i></a>Deferred Connection Closure + PING</h4>
|
||||
<pre><code>ping_delay_disconnect#f3427b8c ping_id:long disconnect_delay:int = Pong;</code></pre>
|
||||
<p>Works like ping. In addition, after this is received, the server starts a timer which will close the current connection disconnect_delay seconds later unless it receives a new message of the same type which automatically resets all previous timers. If the client sends these pings once every 60 seconds, for example, it may set disconnect_delay equal to 75 seconds. </p>
|
||||
<h4><a class="anchor" href="#request-to-destroy-session" id="request-to-destroy-session" name="request-to-destroy-session"><i class="anchor-icon"></i></a>Request to Destroy Session</h4>
|
||||
<h4><a class="anchor" name="request-to-destroy-session" href="#request-to-destroy-session"><i class="anchor-icon"></i></a>Request to Destroy Session</h4>
|
||||
<p>Used by the client to notify the server that it may forget the data from a different session belonging to the same user (i. e. with the same auth_key_id). The result of this being applied to the current session is undefined.</p>
|
||||
<pre><code>destroy_session#e7512126 session_id:long = DestroySessionRes;
|
||||
destroy_session_ok#e22045fc session_id:long = DestroySessionRes;
|
||||
destroy_session_none#62d350c9 session_id:long = DestroySessionRes;</code></pre>
|
||||
<h4><a class="anchor" href="#new-session-creation-notification" id="new-session-creation-notification" name="new-session-creation-notification"><i class="anchor-icon"></i></a>New Session Creation Notification</h4>
|
||||
<p>The server notifies the client that a new session (from the server's standpoint) had to be created to handle a client message. If, after this, the server receives a message with an even smaller msg_id within the same session, a similar notification will be generated for this msg_id as well. No such notifications are generated for high msg_id values.</p>
|
||||
<h4><a class="anchor" name="new-session-creation-notification" href="#new-session-creation-notification"><i class="anchor-icon"></i></a>New Session Creation Notification</h4>
|
||||
<p>The server notifies the client that a new session (from the server's standpoint) had to be created to handle a client message. If, after this, the server receives a message with an even smaller msg_id within the same session, a similar notification will be generated for this msg_id as well. No such notifications are generated for high msg_id values.</p>
|
||||
<pre><code>new_session_created#9ec20908 first_msg_id:long unique_id:long server_salt:long = NewSession</code></pre>
|
||||
<p>The unique_id parameter is generated by the server every time a session is (re-)created.</p>
|
||||
<p>This notification must be acknowledged by the client. It is necessary, for instance, for the client to understand that there is, in fact, a “gap” in the stream of long poll notifications received from the server (the user may have failed to receive notifications during some period of time).</p>
|
||||
<p>Notice that the server may unilaterally destroy (close) any existing client sessions with all pending messages and notifications, without sending any notifications. This happens, for example, if the session is inactive for a long time, and the server runs out of memory. If the client at some point decides to send new messages to the server using the old session, already forgotten by the server, such a "new session created" notification will be generated. The client is expected to handle such situations gracefully.</p>
|
||||
<h3><a class="anchor" href="#containers" id="containers" name="containers"><i class="anchor-icon"></i></a>Containers</h3>
|
||||
<p>Notice that the server may unilaterally destroy (close) any existing client sessions with all pending messages and notifications, without sending any notifications. This happens, for example, if the session is inactive for a long time, and the server runs out of memory. If the client at some point decides to send new messages to the server using the old session, already forgotten by the server, such a “new session created” notification will be generated. The client is expected to handle such situations gracefully.</p>
|
||||
<h3><a class="anchor" name="containers" href="#containers"><i class="anchor-icon"></i></a>Containers</h3>
|
||||
<p><em>Containers</em> are messages containing several other messages. Used for the ability to transmit several RPC queries and/or service messages at the same time, using HTTP or even TCP or UDP protocol. A container may only be accepted or rejected by the other party as a whole.</p>
|
||||
<h4><a class="anchor" href="#simple-container" id="simple-container" name="simple-container"><i class="anchor-icon"></i></a>Simple Container</h4>
|
||||
<h4><a class="anchor" name="simple-container" href="#simple-container"><i class="anchor-icon"></i></a>Simple Container</h4>
|
||||
<p>A simple container carries several messages as follows:</p>
|
||||
<pre><code>msg_container#73f1f8dc messages:vector message = MessageContainer;</code></pre>
|
||||
<p>Here message refers to any message together with its length and msg_id:</p>
|
||||
<pre><code>message msg_id:long seqno:int bytes:int body:Object = Message;</code></pre>
|
||||
<p><code>bytes</code> is the number of bytes in the body serialization.
|
||||
All messages in a container must have msg_id lower than that of the container itself. A container does not require an acknowledgment and may not carry other simple containers. When messages are re-sent, they may be combined into a container in a different manner or sent individually.</p>
|
||||
<p>MTProto container payloads have a limit of <code>2^15</code> bytes or <code>1020</code> messages, whichever limit is reached first.<br>
|
||||
Clients should group acknowledgments, state requests and message resend requests into three separate <a href="/mtproto/service_messages_about_messages#acknowledgment-of-receipt"><code>msgs_ack</code></a>, <a href="https://core.telegram.org/mtproto/service_messages_about_messages#request-for-message-status-information"><code>msgs_state_req</code></a>, <a href="/mtproto/service_messages_about_messages#explicit-request-to-re-send-messages"><code>msg_resend_req</code></a> service messages with at most 8192 IDs each; these three messages (+http_wait) will not be included in the <code>1020</code> message limit. </p>
|
||||
<p><code>bytes</code> is the number of bytes in the body serialization.<br>All messages in a container must have msg_id lower than that of the container itself. A container does not require an acknowledgment and may not carry other simple containers. When messages are re-sent, they may be combined into a container in a different manner or sent individually.</p>
|
||||
<p>MTProto container payloads have a limit of <code>2^15</code> bytes or <code>1020</code> messages, whichever limit is reached first.<br>Clients should group acknowledgments, state requests and message resend requests into three separate <a href="/mtproto/service_messages_about_messages#acknowledgment-of-receipt"><code>msgs_ack</code></a>, <a href="https://core.telegram.org/mtproto/service_messages_about_messages#request-for-message-status-information"><code>msgs_state_req</code></a>, <a href="/mtproto/service_messages_about_messages#explicit-request-to-re-send-messages"><code>msg_resend_req</code></a> service messages with at most 8192 IDs each; these three messages (+http_wait) will not be included in the <code>1020</code> message limit. </p>
|
||||
<p>Empty containers are also allowed. They are used by the server, for example, to respond to an HTTP request when the timeout specified in http_wait expires, and there are no messages to transmit. </p>
|
||||
<p><a href="https://github.com/tdlib/td/blob/master/td/mtproto/SessionConnection.cpp">Example implementation</a>. </p>
|
||||
<h4><a class="anchor" href="#message-copies" id="message-copies" name="message-copies"><i class="anchor-icon"></i></a>Message Copies</h4>
|
||||
<h4><a class="anchor" name="message-copies" href="#message-copies"><i class="anchor-icon"></i></a>Message Copies</h4>
|
||||
<p>In some situations, an old message with a msg_id that is no longer valid needs to be re-sent. Then, it is wrapped in a copy container:</p>
|
||||
<pre><code>msg_copy#e06046b2 orig_message:Message = MessageCopy;</code></pre>
|
||||
<p>Once received, the message is processed as if the wrapper were not there. However, if it is known for certain that the message orig_message.msg_id was received, then the new message is not processed (while at the same time, it and orig_message.msg_id are acknowledged). The value of orig_message.msg_id must be lower than the container's msg_id.</p>
|
||||
<p>Once received, the message is processed as if the wrapper were not there. However, if it is known for certain that the message orig_message.msg_id was received, then the new message is not processed (while at the same time, it and orig_message.msg_id are acknowledged). The value of orig_message.msg_id must be lower than the container's msg_id.</p>
|
||||
<p>This is not used at this time, because an old message can be wrapped in a simple container with the same result.</p>
|
||||
<h4><a class="anchor" href="#packed-object" id="packed-object" name="packed-object"><i class="anchor-icon"></i></a>Packed Object</h4>
|
||||
<h4><a class="anchor" name="packed-object" href="#packed-object"><i class="anchor-icon"></i></a>Packed Object</h4>
|
||||
<p>Used to replace any other object (or rather, a serialization thereof) with its archived (gzipped) representation:</p>
|
||||
<pre><code>gzip_packed#3072cfa1 packed_data:string = Object;</code></pre>
|
||||
<p>At the present time, it is supported in the body of an RPC response (i.e., as result in rpc_result) and generated by the server for a limited number of high-level queries. In addition, it may be used to transmit non-service messages (i. e. RPC queries) from client to server.</p>
|
||||
<h3><a class="anchor" href="#http-waitlong-poll" id="http-waitlong-poll" name="http-waitlong-poll"><i class="anchor-icon"></i></a>HTTP Wait/Long Poll</h3>
|
||||
<h3><a class="anchor" name="http-wait-long-poll" href="#http-wait-long-poll"><i class="anchor-icon"></i></a>HTTP Wait/Long Poll</h3>
|
||||
<p>The following special service query not requiring an acknowledgement (which must be transmitted only through an HTTP connection) is used to enable the server to send messages in the future to the client using HTTP protocol:</p>
|
||||
<pre><code>http_wait#9299359f max_delay:int wait_after:int max_wait:int = HttpWait;</code></pre>
|
||||
<p>When such a message (or a container carrying such a message) is received, the server either waits <code>max_delay</code> milliseconds, whereupon it forwards all the messages that it is holding on to the client if there is at least one message queued in session (if needed, by placing them into a container to which acknowledgments may also be added); or else waits no more than <code>max_wait</code> milliseconds until such a message is available. If a message never appears, an empty container is transmitted.</p>
|
||||
|
@ -122,7 +119,8 @@ Clients should group acknowledgments, state requests and message resend requests
|
|||
<p>At the same time, the <code>max_delay</code> parameter has higher priority than <code>wait_after</code>, and <code>max_wait</code> has higher priority than <code>max_delay</code>.</p>
|
||||
<p>This message does not require a response or an acknowledgement. If the container transmitted over HTTP carries several such messages, the behavior is undefined (in fact, the latest parameter will be used). </p>
|
||||
<p>If no <code>http_wait</code> is present in container, default values <code>max_delay=0</code> (milliseconds), <code>wait_after=0</code> (milliseconds), and <code>max_wait=25000</code> (milliseconds) are used. </p>
|
||||
<p>If the client's ping of the server takes a long time, it may make sense to set <code>max_delay</code> to a value that is comparable in magnitude to ping time.</p></div>
|
||||
<p>If the client's ping of the server takes a long time, it may make sense to set <code>max_delay</code> to a value that is comparable in magnitude to ping time.</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -91,7 +91,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/messageEntityMention">messageEntityMention</a></td>
|
||||
<td>Message entity <a href="/api/mentions">mentioning</a> the current user</td>
|
||||
<td>Message entity <a href="/api/mentions">mentioning</a> a user by <code>@username</code>; <a href="/constructor/messageEntityMentionName">messageEntityMentionName</a> can also be used to mention users by their ID.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/messageEntityHashtag">messageEntityHashtag</a></td>
|
||||
|
|
Loading…
Reference in a new issue