Update content of files

This commit is contained in:
GitHub Action 2021-06-22 12:43:15 +00:00
parent ebc02a847b
commit 9013eb0015
621 changed files with 51060 additions and 30859 deletions

View file

@ -0,0 +1,251 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>Telegram APIs</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="We offer two kinds of APIs for developers. The Bot API allows you to easily create programs that use Telegram messages for…">
<meta property="og:title" content="Telegram APIs">
<meta property="og:image" content="df8a0f9162ddfc1daf">
<meta property="og:description" content="We offer two kinds of APIs for developers. The Bot API allows you to easily create programs that use Telegram messages for…">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class="active"><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class=""><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"></div>
<h1 id="dev_page_title">Telegram APIs</h1>
<div id="dev_page_content"><p>We offer two kinds of APIs for developers. The <a href="#bot-api"><strong>Bot API</strong></a> allows you to easily create programs that use Telegram messages for an interface. The <a href="#tdlib-build-your-own-telegram"><strong>Telegram API and TDLib</strong></a> allow you to build your own customized Telegram clients. You are welcome to use both APIs free of charge.</p>
<p>You can also add <a href="/widgets"><strong>Telegram Widgets</strong></a> to your website.</p>
<p>Designers are welcome to create <a href="/animated_stickers"><strong>Animated Stickers</strong></a> or <a href="/themes"><strong>Custom Themes</strong></a> for Telegram.</p>
<hr>
<h3><a class="anchor" href="#bot-api" id="bot-api" name="bot-api"><i class="anchor-icon"></i></a>Bot API</h3>
<div>
<a href="/file/811140327/1/zlN4goPTupk/9ff2f2f01c4bd1b013" target="_blank"><img src="/file/811140934/1/tbDSLHSaijc/fdcc7b6d5fb3354adf" title="The Botfather. Click for hi-res picture" style="max-width: 200px;float:right"></a>
</div>
<p>This API allows you to connect bots to our system. <a href="/bots"><strong>Telegram Bots</strong></a> are special accounts that do not require an additional phone number to set up. These accounts serve as an interface for code running somewhere on your server.</p>
<p>To use this, you don't need to know anything about how our MTProto encryption protocol works — our intermediary server will handle all encryption and communication with the Telegram API for you. You communicate with this server via a simple HTTPS-interface that offers a simplified version of the Telegram API.</p>
<blockquote>
<p><a href="/bots"><strong>Learn more about the Bot API here »</strong></a></p>
</blockquote>
<p>Bot developers can also make use of our <a href="/bots/payments"><strong>Payments API</strong></a> to accept <strong>payments</strong> from Telegram users around the world.</p>
<hr>
<h3><a class="anchor" href="#tdlib--build-your-own-telegram" id="tdlib--build-your-own-telegram" name="tdlib--build-your-own-telegram"><i class="anchor-icon"></i></a>TDLib build your own Telegram</h3>
<p>Even if you're looking for maximum customization, you don't have to create your app from scratch. Try our <a href="https://core.telegram.org/tdlib"><strong>Telegram Database Library</strong></a> (or simply TDLib), a tool for third-party developers that makes it easy to build fast, secure and feature-rich Telegram apps.</p>
<p>TDLib takes care of all <strong>network implementation</strong> details, <strong>encryption</strong> and <strong>local data storage</strong>, so that you can dedicate more time to design, responsive interfaces and beautiful animations.</p>
<p>TDLib supports all Telegram features and makes developing Telegram apps a breeze on any platform. It can be used on Android, iOS, Windows, macOS, Linux and virtually any other system. The library is open source and compatible with virtually <strong>any programming language</strong>.</p>
<blockquote>
<p><a href="https://core.telegram.org/tdlib"><strong>Learn more about TDLib here »</strong></a></p>
</blockquote>
<hr>
<h3><a class="anchor" href="#telegram-api" id="telegram-api" name="telegram-api"><i class="anchor-icon"></i></a>Telegram API</h3>
<p>This API allows you to build your own customized Telegram clients. It is 100% open for all developers who wish to create Telegram applications on our platform. Feel free to study the open <a href="https://telegram.org/apps#source-code">source code</a> of existing Telegram applications for examples of how things work here. Don't forget to <a href="/api/obtaining_api_id">register</a> your application in our system. </p>
<ul>
<li><a href="#getting-started">Getting Started</a></li>
<li><a href="#security">Security</a></li>
<li><a href="#optimization">Optimization</a></li>
<li><a href="#api-methods">API methods</a></li>
</ul>
<h3><a class="anchor" href="#getting-started" id="getting-started" name="getting-started"><i class="anchor-icon"></i></a>Getting started</h3>
<h4><a class="anchor" href="#creating-an-application" id="creating-an-application" name="creating-an-application"><i class="anchor-icon"></i></a><a href="/api/obtaining_api_id">Creating an application</a></h4>
<p>How to get your application identifier and create a new Telegram app.</p>
<h4><a class="anchor" href="#user-authorization" id="user-authorization" name="user-authorization"><i class="anchor-icon"></i></a><a href="/api/auth">User authorization</a></h4>
<p>How to register a user's phone to start using the API.</p>
<h4><a class="anchor" href="#two-factor-authentication" id="two-factor-authentication" name="two-factor-authentication"><i class="anchor-icon"></i></a><a href="/api/srp">Two-factor authentication</a></h4>
<p>How to login to a user's account if they have enabled 2FA, how to change password.</p>
<h4><a class="anchor" href="#qr-code-login" id="qr-code-login" name="qr-code-login"><i class="anchor-icon"></i></a><a href="/api/qr-login">QR code login</a></h4>
<p><a href="https://en.wikipedia.org/wiki/QR_code">QR code</a> login flow</p>
<h4><a class="anchor" href="#error-handling" id="error-handling" name="error-handling"><i class="anchor-icon"></i></a><a href="/api/errors">Error handling</a></h4>
<p>How to handle API return errors correctly.</p>
<h4><a class="anchor" href="#handling-different-data-centers" id="handling-different-data-centers" name="handling-different-data-centers"><i class="anchor-icon"></i></a><a href="/api/datacenter">Handling different data centers</a></h4>
<p>How to connect to the closest DC access point for faster interaction with the API, and things to watch out for when developing a client.</p>
<h4><a class="anchor" href="#handling-updates" id="handling-updates" name="handling-updates"><i class="anchor-icon"></i></a><a href="/api/updates">Handling updates</a></h4>
<p>How to subscribe to updates and handle them properly.</p>
<h4><a class="anchor" href="#handling-push-notifications" id="handling-push-notifications" name="handling-push-notifications"><i class="anchor-icon"></i></a><a href="/api/push-updates">Handling PUSH-notifications</a></h4>
<p>How to subscribe and handle them properly.</p>
<h4><a class="anchor" href="#channels-supergroups-and-groups" id="channels-supergroups-and-groups" name="channels-supergroups-and-groups"><i class="anchor-icon"></i></a><a href="/api/channel">Channels, supergroups and groups</a></h4>
<p>How to handle channels, supergroups, groups, and what's the difference between them.</p>
<h4><a class="anchor" href="#channel-statistics" id="channel-statistics" name="channel-statistics"><i class="anchor-icon"></i></a><a href="/api/stats">Channel statistics</a></h4>
<p>Telegram offers detailed channel statistics for channels and supergroups. </p>
<h4><a class="anchor" href="#calling-methods" id="calling-methods" name="calling-methods"><i class="anchor-icon"></i></a><a href="/api/invoking">Calling methods</a></h4>
<p>Additional options for calling methods.</p>
<h4><a class="anchor" href="#uploading-and-downloading-files" id="uploading-and-downloading-files" name="uploading-and-downloading-files"><i class="anchor-icon"></i></a><a href="/api/files">Uploading and Downloading Files</a></h4>
<p>How to transfer large data batches correctly.</p>
<h4><a class="anchor" href="#pagination" id="pagination" name="pagination"><i class="anchor-icon"></i></a><a href="/api/offsets">Pagination</a></h4>
<p>How to fetch results from large lists of objects.</p>
<h4><a class="anchor" href="#client-configuration" id="client-configuration" name="client-configuration"><i class="anchor-icon"></i></a><a href="/api/config">Client configuration</a></h4>
<p>The MTProto API has multiple client configuration parameters that can be fetched with the appropriate methods. </p>
<h3><a class="anchor" href="#security" id="security" name="security"><i class="anchor-icon"></i></a>Security</h3>
<h4><a class="anchor" href="#secret-chats-end-to-end-encryption" id="secret-chats-end-to-end-encryption" name="secret-chats-end-to-end-encryption"><i class="anchor-icon"></i></a><a href="/api/end-to-end">Secret chats, end-to-end encryption</a></h4>
<p>End-to-end-encrypted messaging.</p>
<h4><a class="anchor" href="#security-guidelines" id="security-guidelines" name="security-guidelines"><i class="anchor-icon"></i></a><a href="/mtproto/security_guidelines">Security guidelines</a></h4>
<p>Important checks required in your client application.</p>
<h4><a class="anchor" href="#perfect-forward-secrecy" id="perfect-forward-secrecy" name="perfect-forward-secrecy"><i class="anchor-icon"></i></a><a href="/api/pfs">Perfect Forward Secrecy</a></h4>
<p>Binding temporary authorization key to permanent ones.</p>
<h4><a class="anchor" href="#end-to-end-encryption-in-voice-and-video-calls" id="end-to-end-encryption-in-voice-and-video-calls" name="end-to-end-encryption-in-voice-and-video-calls"><i class="anchor-icon"></i></a><a href="https://core.telegram.org/api/end-to-end/video-calls">End-to-End Encryption in Voice and Video Calls</a></h4>
<p>End-to-end-encrypted calls.</p>
<h3><a class="anchor" href="#optimization" id="optimization" name="optimization"><i class="anchor-icon"></i></a>Optimization</h3>
<h4><a class="anchor" href="#client-optimization" id="client-optimization" name="client-optimization"><i class="anchor-icon"></i></a><a href="/api/optimisation">Client optimization</a></h4>
<p>Ways to boost API interactions.</p>
<h3><a class="anchor" href="#api-methods" id="api-methods" name="api-methods"><i class="anchor-icon"></i></a>API methods</h3>
<h4><a class="anchor" href="#available-method-list" id="available-method-list" name="available-method-list"><i class="anchor-icon"></i></a><a href="/methods">Available method list</a></h4>
<p>A list of available high-level methods.</p>
<h4><a class="anchor" href="#api-tl-schema-as-json" id="api-tl-schema-as-json" name="api-tl-schema-as-json"><i class="anchor-icon"></i></a><a href="/schema">API TL-schema</a>, <a href="/schema/json">as JSON</a></h4>
<p>Text and JSON-presentation of types and methods used in API.</p>
<h4><a class="anchor" href="#available-layer-list" id="available-layer-list" name="available-layer-list"><i class="anchor-icon"></i></a><a href="/api/layers">Available layer list</a></h4>
<p>A list of available schema versions.</p>
<h3><a class="anchor" href="#other-articles" id="other-articles" name="other-articles"><i class="anchor-icon"></i></a>Other articles</h3>
<h4><a class="anchor" href="#working-with-bots-using-the-mtproto-api" id="working-with-bots-using-the-mtproto-api" name="working-with-bots-using-the-mtproto-api"><i class="anchor-icon"></i></a><a href="/api/bots">Working with bots, using the MTProto API</a></h4>
<p>How to work with bots using the MTProto API.</p>
<h3><a class="anchor" href="#commands" id="commands" name="commands"><i class="anchor-icon"></i></a><a href="/api/bots/commands">Commands</a></h3>
<p><a href="/bots">Bots</a> offer a set of commands that can be used by users in private, or in a chat. </p>
<h3><a class="anchor" href="#buttons" id="buttons" name="buttons"><i class="anchor-icon"></i></a><a href="/api/bots/buttons">Buttons</a></h3>
<p>Users can interact with your bot via <strong>buttons</strong> or even <strong>inline buttons</strong>, straight from inline <strong>messages</strong> in <strong>any</strong> chat. </p>
<h3><a class="anchor" href="#inline-queries" id="inline-queries" name="inline-queries"><i class="anchor-icon"></i></a><a href="/api/bots/inline">Inline queries</a></h3>
<p>Users can interact with your bot via <strong>inline queries</strong>, straight from the <strong>text input field</strong> in <strong>any</strong> chat. </p>
<h3><a class="anchor" href="#games" id="games" name="games"><i class="anchor-icon"></i></a><a href="/api/bots/games">Games</a></h3>
<p>Bots can offer users HTML5 games to play solo or to compete against each other in groups and one-on-one chats; how to work with games in the MTProto API.</p>
<h3><a class="anchor" href="#search--filters" id="search--filters" name="search--filters"><i class="anchor-icon"></i></a><a href="/api/search">Search &amp; filters</a></h3>
<p>Telegram allows applying detailed message filters while looking for messages in chats.
This allows the server to filter messages based on a text query, and even on their type, and this feature is often used by graphical clients to implement features like the chat gallery, chat profile pictures and more.</p>
<h3><a class="anchor" href="#polls" id="polls" name="polls"><i class="anchor-icon"></i></a><a href="/api/poll">Polls</a></h3>
<p>Telegram allows sending polls and quizes, that can be voted on by thousands, if not milions of users in chats and channels.</p>
<h4><a class="anchor" href="#admin-banned-and-default-rights-for-channels-supergroups-and-groups" id="admin-banned-and-default-rights-for-channels-supergroups-and-groups" name="admin-banned-and-default-rights-for-channels-supergroups-and-groups"><i class="anchor-icon"></i></a><a href="/api/rights">Admin, banned and default rights for channels, supergroups and groups</a></h4>
<p>How to handle admin permissions, granular bans and global permissions in channels, groups and supergroups.</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><a href="/api/channel">Groups</a> can be associated to a <a href="/api/channel">channel</a> as a <a href="https://telegram.org/blog/privacy-discussions-web-bots">discussion group</a>, to allow users to discuss about posts. </p>
<h4><a class="anchor" href="#channel-comments-and-message-threads" id="channel-comments-and-message-threads" name="channel-comments-and-message-threads"><i class="anchor-icon"></i></a><a href="/api/threads">Channel comments and message threads</a></h4>
<p>Telegram allows commenting on a <a href="/api/channel">channel post</a> or on a generic <a href="/api/channel">group message</a>, thanks to message threads.</p>
<h4><a class="anchor" href="#admin-log" id="admin-log" name="admin-log"><i class="anchor-icon"></i></a><a href="/api/recent-actions">Admin log</a></h4>
<p>Both supergroups and channels offer a so-called <a href="https://telegram.org/blog/admin-revolution">admin log</a>, a log of recent relevant supergroup and channel actions, like the modification of group/channel settings or information on behalf of an admin, user kicks and bans, and more. </p>
<h4><a class="anchor" href="#pinned-messages" id="pinned-messages" name="pinned-messages"><i class="anchor-icon"></i></a><a href="/api/pin">Pinned messages</a></h4>
<p>Telegram allows pinning multiple messages on top of a specific chat. </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>
<h4><a class="anchor" href="#scheduled-messages" id="scheduled-messages" name="scheduled-messages"><i class="anchor-icon"></i></a><a href="/api/scheduled-messages">Scheduled messages</a></h4>
<p>Telegram allows scheduling messages.</p>
<h4><a class="anchor" href="#live-geolocations" id="live-geolocations" name="live-geolocations"><i class="anchor-icon"></i></a><a href="/api/live-location">Live geolocations</a></h4>
<p>Telegram allows sending the live geolocation of a user in a chat, optionally setting a proximity alert. </p>
<h4><a class="anchor" href="#min-constructors" id="min-constructors" name="min-constructors"><i class="anchor-icon"></i></a><a href="/api/min">Min constructors</a></h4>
<p>Sometimes, <a href="/constructor/user">user</a> and <a href="/constructor/channel">channel</a> constructors met in group chat updates may not contain full info about the user: how to handle such constructors.</p>
<h4><a class="anchor" href="#account-deletion" id="account-deletion" name="account-deletion"><i class="anchor-icon"></i></a><a href="/api/account-deletion">Account deletion</a></h4>
<p>How to reset an account if the <a href="/api/srp">2FA</a> password was forgotten.</p>
<h4><a class="anchor" href="#telegram-passport" id="telegram-passport" name="telegram-passport"><i class="anchor-icon"></i></a><a href="/api/passport">Telegram Passport</a></h4>
<p>How to work with <a href="/api/passport">Telegram Passport</a> directly using the MTProto API.</p>
<h4><a class="anchor" href="#telegram-payments" id="telegram-payments" name="telegram-payments"><i class="anchor-icon"></i></a><a href="/api/payments">Telegram Payments</a></h4>
<p>How to work with Telegram Payments directly using the MTProto API.</p>
<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="#working-with-animated-emojis" id="working-with-animated-emojis" name="working-with-animated-emojis"><i class="anchor-icon"></i></a><a href="/api/animated-emojis">Working with animated emojis</a></h4>
<p>Graphical telegram clients should transform emojis into their respective animated version. </p>
<h4><a class="anchor" href="#working-with-animated-dice" id="working-with-animated-dice" name="working-with-animated-dice"><i class="anchor-icon"></i></a><a href="/api/dice">Working with animated dice</a></h4>
<p>Telegram supports sending <a href="https://telegram.org/blog/folders#and-one-more-thing">animated dice</a> emojis. </p>
<h4><a class="anchor" href="#message-drafts" id="message-drafts" name="message-drafts"><i class="anchor-icon"></i></a><a href="/api/drafts">Message drafts</a></h4>
<p>How to handle message drafts</p>
<h4><a class="anchor" href="#folders" id="folders" name="folders"><i class="anchor-icon"></i></a><a href="/api/folders">Folders</a></h4>
<p>Working with folders</p>
<h4><a class="anchor" href="#top-peer-rating" id="top-peer-rating" name="top-peer-rating"><i class="anchor-icon"></i></a><a href="/api/top-rating">Top peer rating</a></h4>
<p>If <a href="/method/contacts.toggleTopPeers">enabled</a>, the rating of <a href="/constructor/topPeer">top peers</a> indicates the relevance of a frequently used peer in a certain <a href="/type/TopPeerCategory">category</a> (frequently messaged users, frequently used bots, inline bots, frequently visited channels and so on).</p>
<h4><a class="anchor" href="#handling-file-references" id="handling-file-references" name="handling-file-references"><i class="anchor-icon"></i></a><a href="/api/file_reference">Handling file references</a></h4>
<p>How to handle file references.</p>
<h4><a class="anchor" href="#seamless-telegram-login" id="seamless-telegram-login" name="seamless-telegram-login"><i class="anchor-icon"></i></a><a href="/api/url-authorization">Seamless Telegram Login</a></h4>
<p>Handle Seamless Telegram Login URL authorization requests.</p>
<h4><a class="anchor" href="#web-events" id="web-events" name="web-events"><i class="anchor-icon"></i></a><a href="/api/web-events">Web events</a></h4>
<p>When interacting with HTML5 games and the websites of payment gateways, Telegram apps should expose the following JS APIs.</p></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script>backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>

View file

@ -2,12 +2,12 @@
<html class="">
<head>
<meta charset="utf-8">
<title>int</title>
<title>Animated Emojis</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="A basic bare type, the values of which correspond to single-element sequences, i.e. numbers from -2^31 to 2^31-1 which in this case represent themselves.">
<meta property="og:title" content="int">
<meta property="description" content="Graphical telegram clients should transform emojis into their respective animated version.">
<meta property="og:title" content="Animated Emojis">
<meta property="og:image" content="">
<meta property="og:description" content="A basic bare type, the values of which correspond to single-element sequences, i.e. numbers from -2^31 to 2^31-1 which in this case represent themselves.">
<meta property="og:description" content="Graphical telegram clients should transform emojis into their respective animated version.">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
@ -26,9 +26,9 @@
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class=""><a href="/api">API</a></li>
<li class="active"><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class="active"><a href="/schema">Schema</a></li>
<li class=""><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
@ -36,13 +36,43 @@
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/type/int" >int</a></li></ul></div>
<h1 id="dev_page_title">int</h1>
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/api/animated-emojis" >Animated Emojis</a></li></ul></div>
<h1 id="dev_page_title">Animated Emojis</h1>
<div id="dev_page_content"><p>A basic bare type, the values of which correspond to single-element sequences, i.e. numbers from -2^31 to 2^31-1 which in this case represent themselves.</p>
<p><a href="/mtproto/serialize">More on basic types »</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#binary-data-serialization" id="binary-data-serialization" name="binary-data-serialization"><i class="anchor-icon"></i></a><a href="/mtproto/serialize">Binary Data Serialization</a></h4></div>
<div id="dev_page_content"><p>Graphical telegram clients should transform emojis into their respective animated version. </p>
<pre><code><a href='/constructor/inputStickerSetAnimatedEmoji'>inputStickerSetAnimatedEmoji</a>#28703c8 = <a href='/type/InputStickerSet'>InputStickerSet</a>;
<a href='/constructor/messages.stickerSet'>messages.stickerSet</a>#b60a24a6 set:<a href='/type/StickerSet'>StickerSet</a> packs:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/StickerPack'>StickerPack</a>&gt; documents:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/Document'>Document</a>&gt; = <a href='/type/messages.StickerSet'>messages.StickerSet</a>;
---functions---
<a href='/method/messages.getStickerSet'>messages.getStickerSet</a>#2619a90e stickerset:<a href='/type/InputStickerSet'>InputStickerSet</a> = <a href='/type/messages.StickerSet'>messages.StickerSet</a>;</code></pre>
<p>On startup, clients should fetch the animated emoji stickerset by calling the <a href="/method/messages.getStickerSet">messages.getStickerSet</a> method, providing <a href="/constructor/inputStickerSetAnimatedEmoji">inputStickerSetAnimatedEmoji</a> to the <code>stickerset</code> field.<br>
The returned stickerset will contain a set of animated stickers, one for each of the supported emojis. </p>
<p>Clients should substitute messages containing only one instance of one of the allowed emojis with the respective animated sticker. </p>
<p>Animated emojis should loop only once when first sent or received, or when clicked. </p>
<p>For special <a href="/api/dice">dice emojis</a> like <img class="emoji" src="//telegram.org/img/emoji/40/F09F8EB2.png" width="20" height="20" alt="🎲" />, <img class="emoji" src="//telegram.org/img/emoji/40/F09F8EAF.png" width="20" height="20" alt="🎯" />, or <img class="emoji" src="//telegram.org/img/emoji/40/F09F8F80.png" width="20" height="20" alt="🏀" />, clients are supposed to behave differently both when sending and receiving such emojis: <a href="/api/dice">click here for more info »</a>.</p>
<h3><a class="anchor" href="#emojis-with-sounds" id="emojis-with-sounds" name="emojis-with-sounds"><i class="anchor-icon"></i></a>Emojis with sounds</h3>
<p>Certained animated emojis should play sound when clicked, as specified by <a href="/api/config#client-configuration">server-side configuration</a>. </p>
<p>The returned JSON object will contain the following map, with a list of file IDs to download:</p>
<pre><code> "emojies_sounds": {
"\ud83c\udf83": {
"id": "4956223179606458539",
"access_hash": "-2107001400913062971",
"file_reference_base64": "AF-4ApC7ukC0UWEPZN0TeSJURe7T"
},
"\u26b0": {
"id": "4956223179606458540",
"access_hash": "-1498869544183595185",
"file_reference_base64": "AF-4ApCLKMGt96WCvLm58kbqZHd3"
},
"\ud83e\udddf\u200d\u2642": {
"id": "4960929110848176331",
"access_hash": "3986395821757915468",
"file_reference_base64": "AF-4ApAedNln3IMEHH-SUQuH8L9g"
},
}</code></pre>
<p>The <a href="/api/file_reference">file reference field</a> should be base64-decoded before <a href="/api/files">downloading the file</a></p></div>
</div>

View file

@ -1,209 +0,0 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>User Authorization</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="How to register a user&#39;s phone to start using the API.">
<meta property="og:title" content="User Authorization">
<meta property="og:image" content="9ebfef6d534b708d3a">
<meta property="og:description" content="How to register a user&#39;s phone to start using the API.">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class="active"><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class=""><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/api/auth" >User Authorization</a></li></ul></div>
<h1 id="dev_page_title">User Authorization</h1>
<div id="dev_page_content"><!-- scroll_nav -->
<p>Authorization is associated with a clients encryption key identifier: <strong>auth_key_id</strong>. No additional parameters need to be passed into methods following authorization. </p>
<p>To log in as a <a href="/bots">bot</a>, follow <a href="/api/bots">these instructions »</a>.</p>
<h3><a class="anchor" href="#sending-a-verification-code" id="sending-a-verification-code" name="sending-a-verification-code"><i class="anchor-icon"></i></a>Sending a verification code</h3>
<p>Example implementations: <a href="https://github.com/DrKLO/Telegram/blob/master/TMessagesProj/src/main/java/org/telegram/ui/LoginActivity.java">telegram for android</a>, <a href="https://github.com/tdlib/td/tree/master/td/telegram/SendCodeHelper.cpp">tdlib</a>.</p>
<p>To show a nicely formatted and validated phone number field, the <a href="/constructor/help.countriesList">help.countriesList</a> constructor can be obtained using the <a href="/method/help.getCountriesList">help.getCountriesList</a> method.<br>
The <a href="/constructor/help.countriesList">help.countriesList</a> config is then used as described <a href="/api/config#country-information-and-login-phone-patterns">here »</a>. </p>
<p>Authorization requires that a text message containing an authorization code first be sent to the users phone.<br>
This may be done using the <a href="/method/auth.sendCode">auth.sendCode</a> method.
The system will automatically choose how to send the authorization code; there are four possible ways the code can arrive:</p>
<ul>
<li><a href="/constructor/auth.sentCodeTypeApp">Telegram code</a></li>
<li><a href="/constructor/auth.sentCodeTypeSms">SMS code</a></li>
<li><a href="/constructor/auth.sentCodeTypeCall">Phone call</a>: a synthesized voice will tell the user which verification code to input</li>
<li><a href="/constructor/auth.sentCodeTypeFlashCall">Flash phone call</a>: the code will be sent via a flash phone call, that will be closed immediately.
In the last case, the phone code will then be the phone number itself, just make sure that the phone number matches the specified pattern (see <a href="/constructor/auth.sentCodeTypeFlashCall">auth.sentCodeTypeFlashCall</a>).</li>
</ul>
<p>The <a href="/method/auth.sendCode">auth.sendCode</a> method also has parameters for enabling/disabling use of flash calls, and allows passing an SMS token that will be included in the sent SMS.
For example, the latter is required in newer versions of android, to use the <a href="https://developers.google.com/identity/sms-retriever/overview">android SMS receiver APIs</a>.</p>
<p>The returned <a href="/type/auth.SentCode">auth.SentCode</a> object will contain multiple parameters:</p>
<table class="table">
<tbody>
<tr>
<td><strong>flags</strong></td>
<td style="text-align: center;"><a href="/type/%23">#</a></td>
<td>Flags, see <a href="/mtproto/TL-combinators#conditional-fields">TL conditional fields</a></td>
</tr>
<tr>
<td><strong>type</strong></td>
<td style="text-align: center;"><a href="/type/auth.SentCodeType">auth.SentCodeType</a></td>
<td>Phone code type</td>
</tr>
<tr>
<td><strong>phone_code_hash</strong></td>
<td style="text-align: center;"><a href="/type/string">string</a></td>
<td>Phone code hash, to be stored and later re-used with <a href="/method/auth.signIn">auth.signIn</a></td>
</tr>
<tr>
<td><strong>next_type</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.1?<a href="/type/auth.CodeType">auth.CodeType</a></td>
<td>Phone code type that will be sent next, if the phone code is not received within <code>timeout</code> seconds: to send it use <a href="/method/auth.resendCode">auth.resendCode</a></td>
</tr>
<tr>
<td><strong>timeout</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.2?<a href="/type/int">int</a></td>
<td>Timeout for reception of the phone code</td>
</tr>
</tbody>
</table>
<p>If the message takes too long (<code>timeout</code> seconds) to arrive at the phone, the <a href="/method/auth.resendCode">auth.resendCode</a> method may be invoked to resend a code of type <code>next_type</code>.
If the same happens again, you can use <a href="/method/auth.resendCode">auth.resendCode</a> with the <code>next_type</code> returned by the previous call to <a href="/method/auth.resendCode">auth.resendCode</a>.
To cancel the verification code use <a href="/method/auth.cancelCode">auth.cancelCode</a>.</p>
<h3><a class="anchor" href="#sign-insign-up" id="sign-insign-up" name="sign-insign-up"><i class="anchor-icon"></i></a>Sign in/sign up</h3>
<p>When user enters verification code, the <a href="/method/auth.signIn">auth.signIn</a> method must be used to validate it and possibly sign user in.</p>
<p>If the code was entered correctly, but the method returns <a href="/constructor/auth.authorizationSignUpRequired">auth.authorizationSignUpRequired</a>, it means that account with this phone number doesn't exist yet: user needs to provide basic information, accept terms of service and then the new user registration method (<a href="/method/auth.signUp">auth.signUp</a>) must be invoked.</p>
<h3><a class="anchor" href="#2fa" id="2fa" name="2fa"><i class="anchor-icon"></i></a>2FA</h3>
<p>When trying to sign in using <a href="/method/auth.signIn">auth.signIn</a>, an <a href="/method/auth.signIn#possible-errors">error 400 SESSION_PASSWORD_NEEDED</a> may be returned, if the user has two-factor authentication enabled.
In this case, instructions for <a href="/api/srp">SRP 2FA authentication</a> must be followed.</p>
<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-phone-numbers" id="test-phone-numbers" name="test-phone-numbers"><i class="anchor-icon"></i></a>Test Phone Numbers</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 availble 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>
<blockquote>
<p>To help you with working on production DCs, logins with the same phone number with which the <code>api_id</code> was registered have more generous flood limits.</p>
</blockquote>
<h3><a class="anchor" href="#we-are-authorized" id="we-are-authorized" name="we-are-authorized"><i class="anchor-icon"></i></a>We are authorized</h3>
<p>As a result of authorization, the client key, <strong>auth_key_id</strong>, becomes associated with the user, and each subsequent API call with this key will be executed with that users identity. The authorization method itself returns the relevant user. It is best to immediately store the User ID locally in a binding with the key.</p>
<p>Only a small portion of the API methods are available to <strong>unauthorized</strong> users:</p>
<ul>
<li><a href="/method/auth.sendCode">auth.sendCode</a></li>
<li><a href="/method/auth.resendCode">auth.resendCode</a></li>
<li><a href="/method/account.getPassword">account.getPassword</a></li>
<li><a href="/method/auth.checkPassword">auth.checkPassword</a></li>
<li><a href="/method/auth.checkPhone">auth.checkPhone</a></li>
<li><a href="/method/auth.signUp">auth.signUp</a></li>
<li><a href="/method/auth.signIn">auth.signIn</a></li>
<li><a href="/method/auth.importAuthorization">auth.importAuthorization</a></li>
<li><a href="/method/help.getConfig">help.getConfig</a></li>
<li><a href="/method/help.getNearestDc">help.getNearestDc</a></li>
<li><a href="/method/help.getAppUpdate">help.getAppUpdate</a></li>
<li><a href="/method/help.getCdnConfig">help.getCdnConfig</a></li>
<li><a href="/method/langpack.getLangPack">langpack.getLangPack</a></li>
<li><a href="/method/langpack.getStrings">langpack.getStrings</a></li>
<li><a href="/method/langpack.getDifference">langpack.getDifference</a></li>
<li><a href="/method/langpack.getLanguages">langpack.getLanguages</a></li>
<li><a href="/method/langpack.getLanguage">langpack.getLanguage</a></li>
</ul>
<p>Other methods will result in an error: <a href="/api/errors#401-unauthorized"><strong>401 UNAUTHORIZED</strong></a>.</p></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script src="/js/jquery.min.js?1"></script>
<script src="/js/bootstrap.min.js"></script>
<script>window.initDevPageNav&&initDevPageNav();
backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>

View file

@ -2,12 +2,16 @@
<html class="">
<head>
<meta charset="utf-8">
<title>auth.sendCall</title>
<title>Bots</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Makes a voice call to the passed phone number. A robot will repeat the confirmation code from a previously sent SMS message.">
<meta property="og:title" content="auth.sendCall">
<meta property="description" content="Working with bots, using the MTProto API.
See here for more info about bots.
Please note that you can also use the simplified…">
<meta property="og:title" content="Bots">
<meta property="og:image" content="">
<meta property="og:description" content="Makes a voice call to the passed phone number. A robot will repeat the confirmation code from a previously sent SMS message.">
<meta property="og:description" content="Working with bots, using the MTProto API.
See here for more info about bots.
Please note that you can also use the simplified…">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
@ -36,70 +40,30 @@
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/methods" >All Methods</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/method/auth.sendCall" >auth.sendCall</a></li></ul></div>
<h1 id="dev_page_title">auth.sendCall</h1>
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/api/bots" >Bots</a></li></ul></div>
<h1 id="dev_page_title">Bots</h1>
<div id="dev_page_content"><p>Makes a voice call to the passed phone number. A robot will repeat the confirmation code from a previously sent SMS message.</p>
<p>{scheme}</p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<table class="table">
<thead>
<tr>
<th>Name</th>
<th style="text-align: center;">Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>phone_number</strong></td>
<td style="text-align: center;"><a href="/type/string">string</a></td>
<td>Phone number in the international format</td>
</tr>
<tr>
<td><strong>phone_code_hash</strong></td>
<td style="text-align: center;"><a href="/type/string">string</a></td>
<td>SMS-message ID</td>
</tr>
</tbody>
</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="#query-example" id="query-example" name="query-example"><i class="anchor-icon"></i></a>Query example</h3>
<pre><code>(auth.sendCall "79991234567" "2dc02d2cda9e615c84")
=
(boolTrue)
<div id="dev_page_content"><!-- scroll_nav -->
03c51564 3939370b 33323139 37363534 63643212 32643230 39616463 35313665 00343863 64e1a61b
=
997275b5</code></pre>
<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>PHONE_NUMBER_INVALID</td>
<td>Invalid phone number</td>
</tr>
<tr>
<td>400</td>
<td>PHONE_CODE_HASH_EMPTY</td>
<td><strong>phone_code_hash</strong> was not sent</td>
</tr>
<tr>
<td>400</td>
<td>PHONE_CODE_EXPIRED</td>
<td>SMS expired</td>
</tr>
</tbody>
</table></div>
<p>Working with bots, using the MTProto API.</p>
<p>See <a href="/bots">here</a> for more info about bots. </p>
<p>Please note that you can also use the simplified <a href="/bots/api">HTTP Bot API</a> to use bots, see <a href="/bots">here for more info »</a>.</p>
<h3><a class="anchor" href="#login" id="login" name="login"><i class="anchor-icon"></i></a>Login</h3>
<pre><code>---functions---
<a href='/method/auth.importBotAuthorization'>auth.importBotAuthorization</a>#67a3ff2c flags:<a href='/type/int'>int</a> api_id:<a href='/type/int'>int</a> api_hash:<a href='/type/string'>string</a> bot_auth_token:<a href='/type/string'>string</a> = <a href='/type/auth.Authorization'>auth.Authorization</a>;</code></pre>
<p>In order to login as a bot, instead of using the <a href="/api/auth">standard login code flow</a>, simply provide the <a href="/bots#creating-a-new-bot">bot token</a> generated by <a href="https://t.me/botfather">@botfather</a>.<br>
You must still provide your <a href="/api/obtaining_api_id#obtaining-api-id">API ID</a>, as per user logins. </p>
<p>After successful authorization, you will be able to use <a href="/methods">most MTProto API methods</a>, just as any normal user.<br>
Methods that can be called by bots will have a <strong>Bots can use this method</strong> notice. </p>
<h3><a class="anchor" href="#commands" id="commands" name="commands"><i class="anchor-icon"></i></a><a href="/api/bots/commands">Commands</a></h3>
<p><a href="/bots">Bots</a> offer a set of commands that can be used by users in private, or in a chat. </p>
<h3><a class="anchor" href="#buttons" id="buttons" name="buttons"><i class="anchor-icon"></i></a><a href="/api/bots/buttons">Buttons</a></h3>
<p>Users can interact with your bot via <strong>buttons</strong> or even <strong>inline buttons</strong>, straight from inline <strong>messages</strong> in <strong>any</strong> chat. </p>
<h3><a class="anchor" href="#inline-queries" id="inline-queries" name="inline-queries"><i class="anchor-icon"></i></a><a href="/api/bots/inline">Inline queries</a></h3>
<p>Users can interact with your bot via <strong>inline queries</strong>, straight from the <strong>text input field</strong> in <strong>any</strong> chat. </p>
<h3><a class="anchor" href="#games" id="games" name="games"><i class="anchor-icon"></i></a><a href="/api/bots/games">Games</a></h3>
<p>Bots can offer users HTML5 games to play solo or to compete against each other in groups and one-on-one chats; how to work with games in the MTProto API.</p></div>
</div>
@ -166,8 +130,11 @@
</div>
</div>
<script src="/js/main.js?42"></script>
<script>backToTopInit("Go up");
<script src="/js/jquery.min.js?1"></script>
<script src="/js/bootstrap.min.js"></script>
<script>window.initDevPageNav&&initDevPageNav();
backToTopInit("Go up");
removePreloadInit();
</script>
</body>

View file

@ -1,242 +0,0 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>Buttons</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Users can interact with your bot via buttons or even inline buttons, straight from inline messages in any chat. ">
<meta property="og:title" content="Buttons">
<meta property="og:image" content="">
<meta property="og:description" content="Users can interact with your bot via buttons or even inline buttons, straight from inline messages in any chat. ">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class="active"><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class=""><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/api/bots%2Fbuttons" >Buttons</a></li></ul></div>
<h1 id="dev_page_title">Buttons</h1>
<div id="dev_page_content"><!-- scroll_nav -->
<p>Users can interact with your bot via <strong>buttons</strong> or even <strong>inline buttons</strong>, straight from inline <strong>messages</strong> in <strong>any</strong> chat.<br>
This article describes the full button flow, using the MTProto API. </p>
<p>For a simplified description using the HTTP bot API, see <a href="/bots/#inline-keyboards-and-on-the-fly-updating">here »</a>. </p>
<h3><a class="anchor" href="#buttons" id="buttons" name="buttons"><i class="anchor-icon"></i></a>Buttons</h3>
<pre><code><a href='/constructor/keyboardButton'>keyboardButton</a>#a2fa4880 text:<a href='/type/string'>string</a> = <a href='/type/KeyboardButton'>KeyboardButton</a>;
<a href='/constructor/keyboardButtonUrl'>keyboardButtonUrl</a>#258aff05 text:<a href='/type/string'>string</a> url:<a href='/type/string'>string</a> = <a href='/type/KeyboardButton'>KeyboardButton</a>;
<a href='/constructor/keyboardButtonCallback'>keyboardButtonCallback</a>#35bbdb6b flags:<a href='/type/%23'>#</a> requires_password:flags.0?<a href='/constructor/true'>true</a> text:<a href='/type/string'>string</a> data:<a href='/type/bytes'>bytes</a> = <a href='/type/KeyboardButton'>KeyboardButton</a>;
<a href='/constructor/keyboardButtonRequestPhone'>keyboardButtonRequestPhone</a>#b16a6c29 text:<a href='/type/string'>string</a> = <a href='/type/KeyboardButton'>KeyboardButton</a>;
<a href='/constructor/keyboardButtonRequestGeoLocation'>keyboardButtonRequestGeoLocation</a>#fc796b3f text:<a href='/type/string'>string</a> = <a href='/type/KeyboardButton'>KeyboardButton</a>;
<a href='/constructor/keyboardButtonSwitchInline'>keyboardButtonSwitchInline</a>#568a748 flags:<a href='/type/%23'>#</a> same_peer:flags.0?<a href='/constructor/true'>true</a> text:<a href='/type/string'>string</a> query:<a href='/type/string'>string</a> = <a href='/type/KeyboardButton'>KeyboardButton</a>;
<a href='/constructor/keyboardButtonGame'>keyboardButtonGame</a>#50f41ccf text:<a href='/type/string'>string</a> = <a href='/type/KeyboardButton'>KeyboardButton</a>;
<a href='/constructor/keyboardButtonBuy'>keyboardButtonBuy</a>#afd93fbb text:<a href='/type/string'>string</a> = <a href='/type/KeyboardButton'>KeyboardButton</a>;
<a href='/constructor/keyboardButtonUrlAuth'>keyboardButtonUrlAuth</a>#10b78d29 flags:<a href='/type/%23'>#</a> text:<a href='/type/string'>string</a> fwd_text:flags.0?<a href='/type/string'>string</a> url:<a href='/type/string'>string</a> button_id:<a href='/type/int'>int</a> = <a href='/type/KeyboardButton'>KeyboardButton</a>;
<a href='/constructor/inputKeyboardButtonUrlAuth'>inputKeyboardButtonUrlAuth</a>#d02e7fd4 flags:<a href='/type/%23'>#</a> request_write_access:flags.0?<a href='/constructor/true'>true</a> text:<a href='/type/string'>string</a> fwd_text:flags.1?<a href='/type/string'>string</a> url:<a href='/type/string'>string</a> bot:<a href='/type/InputUser'>InputUser</a> = <a href='/type/KeyboardButton'>KeyboardButton</a>;
<a href='/constructor/keyboardButtonRequestPoll'>keyboardButtonRequestPoll</a>#bbc7515d flags:<a href='/type/%23'>#</a> quiz:flags.0?<a href='/type/Bool'>Bool</a> text:<a href='/type/string'>string</a> = <a href='/type/KeyboardButton'>KeyboardButton</a>;
<a href='/constructor/keyboardButtonRow'>keyboardButtonRow</a>#77608b83 buttons:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/KeyboardButton'>KeyboardButton</a>&gt; = <a href='/type/KeyboardButtonRow'>KeyboardButtonRow</a>;
<a href='/constructor/replyKeyboardHide'>replyKeyboardHide</a>#a03e5b85 flags:<a href='/type/%23'>#</a> selective:flags.2?<a href='/constructor/true'>true</a> = <a href='/type/ReplyMarkup'>ReplyMarkup</a>;
<a href='/constructor/replyKeyboardForceReply'>replyKeyboardForceReply</a>#f4108aa0 flags:<a href='/type/%23'>#</a> single_use:flags.1?<a href='/constructor/true'>true</a> selective:flags.2?<a href='/constructor/true'>true</a> = <a href='/type/ReplyMarkup'>ReplyMarkup</a>;
<a href='/constructor/replyKeyboardMarkup'>replyKeyboardMarkup</a>#3502758c flags:<a href='/type/%23'>#</a> resize:flags.0?<a href='/constructor/true'>true</a> single_use:flags.1?<a href='/constructor/true'>true</a> selective:flags.2?<a href='/constructor/true'>true</a> rows:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/KeyboardButtonRow'>KeyboardButtonRow</a>&gt; = <a href='/type/ReplyMarkup'>ReplyMarkup</a>;
<a href='/constructor/replyInlineMarkup'>replyInlineMarkup</a>#48a30254 rows:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/KeyboardButtonRow'>KeyboardButtonRow</a>&gt; = <a href='/type/ReplyMarkup'>ReplyMarkup</a>;
<a href='/constructor/message'>message</a>#58ae39c9 flags:<a href='/type/%23'>#</a> out:flags.1?<a href='/constructor/true'>true</a> mentioned:flags.4?<a href='/constructor/true'>true</a> media_unread:flags.5?<a href='/constructor/true'>true</a> silent:flags.13?<a href='/constructor/true'>true</a> post:flags.14?<a href='/constructor/true'>true</a> from_scheduled:flags.18?<a href='/constructor/true'>true</a> legacy:flags.19?<a href='/constructor/true'>true</a> edit_hide:flags.21?<a href='/constructor/true'>true</a> pinned:flags.24?<a href='/constructor/true'>true</a> id:<a href='/type/int'>int</a> from_id:flags.8?<a href='/type/Peer'>Peer</a> peer_id:<a href='/type/Peer'>Peer</a> fwd_from:flags.2?<a href='/type/MessageFwdHeader'>MessageFwdHeader</a> via_bot_id:flags.11?<a href='/type/int'>int</a> reply_to:flags.3?<a href='/type/MessageReplyHeader'>MessageReplyHeader</a> date:<a href='/type/int'>int</a> message:<a href='/type/string'>string</a> media:flags.9?<a href='/type/MessageMedia'>MessageMedia</a> reply_markup:flags.6?<a href='/type/ReplyMarkup'>ReplyMarkup</a> entities:flags.7?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/MessageEntity'>MessageEntity</a>&gt; views:flags.10?<a href='/type/int'>int</a> forwards:flags.10?<a href='/type/int'>int</a> replies:flags.23?<a href='/type/MessageReplies'>MessageReplies</a> edit_date:flags.15?<a href='/type/int'>int</a> post_author:flags.16?<a href='/type/string'>string</a> grouped_id:flags.17?<a href='/type/long'>long</a> restriction_reason:flags.22?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/RestrictionReason'>RestrictionReason</a>&gt; = <a href='/type/Message'>Message</a>;
---functions---
<a href='/method/messages.sendMessage'>messages.sendMessage</a>#520c3870 flags:<a href='/type/%23'>#</a> no_webpage:flags.1?<a href='/constructor/true'>true</a> silent:flags.5?<a href='/constructor/true'>true</a> background:flags.6?<a href='/constructor/true'>true</a> clear_draft:flags.7?<a href='/constructor/true'>true</a> peer:<a href='/type/InputPeer'>InputPeer</a> reply_to_msg_id:flags.0?<a href='/type/int'>int</a> message:<a href='/type/string'>string</a> random_id:<a href='/type/long'>long</a> reply_markup:flags.2?<a href='/type/ReplyMarkup'>ReplyMarkup</a> entities:flags.3?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/MessageEntity'>MessageEntity</a>&gt; schedule_date:flags.10?<a href='/type/int'>int</a> = <a href='/type/Updates'>Updates</a>;</code></pre>
<p>Bots can attach a <a href="/type/ReplyMarkup">ReplyMarkup</a> constructor to outgoing messages, to attach an <a href="/bots#inline-keyboards-and-on-the-fly-updating">inline keyboard</a> or a <a href="/bots#keyboards">custom reply keyboard</a>:</p>
<ul>
<li><a href="/constructor/replyKeyboardMarkup">replyKeyboardMarkup</a> - Sends a <a href="/bots#keyboards">custom reply keyboard</a>. <br> User clients receiving such a constructor should display a <a href="/bots#keyboards">special keyboard</a> with custom reply options.</li>
<li><a href="/constructor/replyKeyboardHide">replyKeyboardHide</a> - Hides the <a href="/bots#keyboards">custom reply keyboard</a>. <br> User clients receiving this constructor should hide the <a href="/bots#keyboards">custom reply keyboard</a> opened by <a href="/constructor/replyKeyboardMarkup">replyKeyboardMarkup</a></li>
<li><a href="/constructor/replyKeyboardForceReply">replyKeyboardForceReply</a> - Sends a <a href="/bots/api#forcereply">force reply</a> constructor <br> User clients receiving a message with this constructor should act as if the user had clicked on the reply button of the message, displaying the reply UI. </li>
<li><a href="/constructor/replyInlineMarkup">replyInlineMarkup</a> - Attaches an <a href="/bots#inline-keyboards-and-on-the-fly-updating">inline keyboard</a> to the message, allowing users to send callback data to the bot without sending actual messages to the current chat, see <a href="/bots#pressing-buttons">here for more info »</a>. </li>
</ul>
<h3><a class="anchor" href="#pressing-buttons" id="pressing-buttons" name="pressing-buttons"><i class="anchor-icon"></i></a>Pressing buttons</h3>
<pre><code><a href='/constructor/keyboardButton'>keyboardButton</a>#a2fa4880 text:<a href='/type/string'>string</a> = <a href='/type/KeyboardButton'>KeyboardButton</a>;
<a href='/constructor/keyboardButtonUrl'>keyboardButtonUrl</a>#258aff05 text:<a href='/type/string'>string</a> url:<a href='/type/string'>string</a> = <a href='/type/KeyboardButton'>KeyboardButton</a>;
<a href='/constructor/keyboardButtonCallback'>keyboardButtonCallback</a>#35bbdb6b flags:<a href='/type/%23'>#</a> requires_password:flags.0?<a href='/constructor/true'>true</a> text:<a href='/type/string'>string</a> data:<a href='/type/bytes'>bytes</a> = <a href='/type/KeyboardButton'>KeyboardButton</a>;
<a href='/constructor/keyboardButtonRequestPhone'>keyboardButtonRequestPhone</a>#b16a6c29 text:<a href='/type/string'>string</a> = <a href='/type/KeyboardButton'>KeyboardButton</a>;
<a href='/constructor/keyboardButtonRequestGeoLocation'>keyboardButtonRequestGeoLocation</a>#fc796b3f text:<a href='/type/string'>string</a> = <a href='/type/KeyboardButton'>KeyboardButton</a>;
<a href='/constructor/keyboardButtonRequestPoll'>keyboardButtonRequestPoll</a>#bbc7515d flags:<a href='/type/%23'>#</a> quiz:flags.0?<a href='/type/Bool'>Bool</a> text:<a href='/type/string'>string</a> = <a href='/type/KeyboardButton'>KeyboardButton</a>;
<a href='/constructor/keyboardButtonSwitchInline'>keyboardButtonSwitchInline</a>#568a748 flags:<a href='/type/%23'>#</a> same_peer:flags.0?<a href='/constructor/true'>true</a> text:<a href='/type/string'>string</a> query:<a href='/type/string'>string</a> = <a href='/type/KeyboardButton'>KeyboardButton</a>;
<a href='/constructor/keyboardButtonGame'>keyboardButtonGame</a>#50f41ccf text:<a href='/type/string'>string</a> = <a href='/type/KeyboardButton'>KeyboardButton</a>;
<a href='/constructor/keyboardButtonBuy'>keyboardButtonBuy</a>#afd93fbb text:<a href='/type/string'>string</a> = <a href='/type/KeyboardButton'>KeyboardButton</a>;
<a href='/constructor/keyboardButtonUrlAuth'>keyboardButtonUrlAuth</a>#10b78d29 flags:<a href='/type/%23'>#</a> text:<a href='/type/string'>string</a> fwd_text:flags.0?<a href='/type/string'>string</a> url:<a href='/type/string'>string</a> button_id:<a href='/type/int'>int</a> = <a href='/type/KeyboardButton'>KeyboardButton</a>;
// Used by bots to send a keyboardButtonUrlAuth
<a href='/constructor/inputKeyboardButtonUrlAuth'>inputKeyboardButtonUrlAuth</a>#d02e7fd4 flags:<a href='/type/%23'>#</a> request_write_access:flags.0?<a href='/constructor/true'>true</a> text:<a href='/type/string'>string</a> fwd_text:flags.1?<a href='/type/string'>string</a> url:<a href='/type/string'>string</a> bot:<a href='/type/InputUser'>InputUser</a> = <a href='/type/KeyboardButton'>KeyboardButton</a>;
<a href='/constructor/keyboardButtonRow'>keyboardButtonRow</a>#77608b83 buttons:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/KeyboardButton'>KeyboardButton</a>&gt; = <a href='/type/KeyboardButtonRow'>KeyboardButtonRow</a>;</code></pre>
<p>Both <a href="/bots#keyboards">reply</a> and <a href="/bots#inline-keyboards-and-on-the-fly-updating">inline</a> keyboards are composed of a vector of <a href="/constructor/keyboardButtonRow">rows</a>, each row containing a vector of <a href="/type/KeyboardButton">buttons</a>, for each column.<br>
Each row can have a different number of columns, and user clients should properly handle clicking buttons of every type. </p>
<p>Buttons available only in reply keyboards:</p>
<ul>
<li><a href="/constructor/keyboardButton">keyboardButton</a> - Send a message to the chat, replying to the message that attached the <a href="/bots#keyboard">reply keyboard</a></li>
<li><a href="/constructor/keyboardButtonRequestPhone">keyboardButtonRequestPhone</a> - Only in private chats, send the current user's contact to the chat, replying to the message that attached the <a href="/bots#keyboard">reply keyboard</a></li>
<li><a href="/constructor/keyboardButtonRequestGeoLocation">keyboardButtonRequestGeoLocation</a> - Only in private chats, send the current user's geolocation to the chat, replying to the message that attached the <a href="/bots#keyboard">reply keyboard</a></li>
<li><a href="/constructor/keyboardButtonRequestPoll">keyboardButtonRequestPoll</a> - Only in private chats, prompt the user to create and send a <a href="/api/poll">poll</a> (or a quiz poll, depending on the <code>quiz</code> flag), replying to the message that attached the <a href="/bots#keyboard">reply keyboard</a></li>
</ul>
<p>Buttons available only in inline keyboards:</p>
<ul>
<li><a href="/constructor/keyboardButtonUrl">keyboardButtonUrl</a> - Open the URL, showing a "Do you want to open this URL?" prompt (unless the URL is one of the <a href="https://github.com/DrKLO/Telegram/blob/002c01ecd37cd08ed07b3ed84d79318d091dfc85/TMessagesProj/src/main/java/org/telegram/messenger/browser/Browser.java#L351">internal URIs</a>, in which case the URL should be opened right away)</li>
<li><a href="/constructor/keyboardButtonCallback">keyboardButtonCallback</a> - Send the callback data to the bot, optionally providing the user's 2FA SRP payload for identity verification, see <a href="#callback-queries">here for more info »</a></li>
<li><a href="/constructor/keyboardButtonSwitchInline">keyboardButtonSwitchInline</a><ul>
<li>If <code>keyboardButtonSwitchInline.same_peer</code> is set, insert the bot's username and <code>keyboardButtonSwitchInline.query</code> in the current chat's input field, triggering an <a href="/api/bots/inline">inline query</a>.</li>
<li>If <code>keyboardButtonSwitchInline.same_peer</code> is not set, prompt the user to select one of their chats, and then insert the bot's username and <code>keyboardButtonSwitchInline.query</code> in the current chat's input field, triggering an <a href="/api/bots/inline">inline query</a>.</li>
</ul>
</li>
<li><a href="/constructor/keyboardButtonGame">keyboardButtonGame</a> - Open the <a href="/constructor/game">game</a> from the attached <a href="/constructor/messageMediaGame">messageMediaGame</a> constructor, for more info <a href="/api/bots/games">see here »</a></li>
<li><a href="/constructor/keyboardButtonBuy">keyboardButtonBuy</a> - Proceed to initiating the payment flow, for more info <a href="/api/payments">see here »</a></li>
<li><a href="/constructor/keyboardButtonUrlAuth">keyboardButtonUrlAuth</a> - Log into a website using the user's Telegram account, as specified <a href="/api/url-authorization">here »</a></li>
</ul>
<h3><a class="anchor" href="#callback-queries" id="callback-queries" name="callback-queries"><i class="anchor-icon"></i></a>Callback queries</h3>
<p><a href="/constructor/keyboardButtonCallback">keyboardButtonCallback</a> buttons can be used to send the specified <code>data</code> payload back to the bot, when they are clicked.<br>
Additionally, a bot can verify a user's identity by requiring they verify their 2FA password with <a href="/api/srp">SRP</a>. </p>
<h4><a class="anchor" href="#sending-a-callback-query" id="sending-a-callback-query" name="sending-a-callback-query"><i class="anchor-icon"></i></a>Sending a callback query</h4>
<pre><code><a href='/constructor/keyboardButtonGame'>keyboardButtonGame</a>#50f41ccf text:<a href='/type/string'>string</a> = <a href='/type/KeyboardButton'>KeyboardButton</a>;
<a href='/constructor/keyboardButtonCallback'>keyboardButtonCallback</a>#35bbdb6b flags:<a href='/type/%23'>#</a> requires_password:flags.0?<a href='/constructor/true'>true</a> text:<a href='/type/string'>string</a> data:<a href='/type/bytes'>bytes</a> = <a href='/type/KeyboardButton'>KeyboardButton</a>;
<a href='/constructor/messages.botCallbackAnswer'>messages.botCallbackAnswer</a>#36585ea4 flags:<a href='/type/%23'>#</a> alert:flags.1?<a href='/constructor/true'>true</a> has_url:flags.3?<a href='/constructor/true'>true</a> native_ui:flags.4?<a href='/constructor/true'>true</a> message:flags.0?<a href='/type/string'>string</a> url:flags.2?<a href='/type/string'>string</a> cache_time:<a href='/type/int'>int</a> = <a href='/type/messages.BotCallbackAnswer'>messages.BotCallbackAnswer</a>;
---functions---
<a href='/method/messages.getBotCallbackAnswer'>messages.getBotCallbackAnswer</a>#9342ca07 flags:<a href='/type/%23'>#</a> game:flags.1?<a href='/constructor/true'>true</a> peer:<a href='/type/InputPeer'>InputPeer</a> msg_id:<a href='/type/int'>int</a> data:flags.0?<a href='/type/bytes'>bytes</a> password:flags.2?<a href='/type/InputCheckPasswordSRP'>InputCheckPasswordSRP</a> = <a href='/type/messages.BotCallbackAnswer'>messages.BotCallbackAnswer</a>;</code></pre>
<p>When the user clicks on a <a href="/constructor/keyboardButtonCallback">keyboardButtonCallback</a> in a message sent by a bot, or generated by an <a href="/api/bots/inline">inline query</a>, <a href="/method/messages.getBotCallbackAnswer">messages.getBotCallbackAnswer</a> should be called, passing the peer and ID of the message.<br>
The same should happen when clicking on <a href="/constructor/keyboardButtonGame">keyboardButtonGame</a> buttons, with the difference that the <code>game</code> flag must be set instead of the <code>data</code> parameter. </p>
<p>Make sure to properly handle bot timeouts in the form of <code>BOT_RESPONSE_TIMEOUT</code> RPC errors, as the bot may be offline and unable to reply. </p>
<p>The returned <a href="/constructor/messages.botCallbackAnswer">messages.botCallbackAnswer</a> constructor contains:</p>
<ul>
<li><code>message</code> if specified, a message that should be shown in a non-blocking toast notification</li>
<li><code>alert</code> indicates whether the <code>message</code> should be shown as a dismissable prompt, instead of a simple toast notification</li>
<li><code>has_url</code> Whether an URL is present</li>
<li><code>url</code> if specified, the client should open the URL, without showing a confirmation prompt. <br> This is safe and allowed, because here, bots can only return: <ul>
<li>URLs to themselves with added query parameters (<code>t.me/bot?start=aaa</code>)</li>
<li>URLs to a valid game, if the bot has manually configured games, and the clicked button was a <a href="/constructor/keyboardButtonGame">keyboardButtonGame</a>. </li>
</ul>
</li>
<li><code>native_ui</code> whether to open game URLs in a WebView or in native UI.</li>
<li><code>cache_time</code> specifies for how long should this answer be cached, client-side</li>
</ul>
<h5><a class="anchor" href="#srp-verification" id="srp-verification" name="srp-verification"><i class="anchor-icon"></i></a>SRP verification</h5>
<p>If the <code>requires_password</code> flag is set, the <a href="/api/srp">SRP 2FA payload</a> must also be generated and attached to the query, to verify the identity of the user. </p>
<p><strong>Note that the bot will NOT be able to access your password or the SRP payload</strong>. </p>
<p>The SRP payload will be processed exclusively on the Telegram's servers, simply returning an RPC error without passing the query to the bot if the verification fails.<br>
This is just a way of verifying the identity of the user, mainly used by the official <a href="https://t.me/botfather">@botfather</a> bot to allow securely transferring the ownership of a bot to another user.</p>
<h4><a class="anchor" href="#answering-a-callback-query" id="answering-a-callback-query" name="answering-a-callback-query"><i class="anchor-icon"></i></a>Answering a callback query</h4>
<pre><code><a href='/constructor/updateBotCallbackQuery'>updateBotCallbackQuery</a>#e73547e1 flags:<a href='/type/%23'>#</a> query_id:<a href='/type/long'>long</a> user_id:<a href='/type/int'>int</a> peer:<a href='/type/Peer'>Peer</a> msg_id:<a href='/type/int'>int</a> chat_instance:<a href='/type/long'>long</a> data:flags.0?<a href='/type/bytes'>bytes</a> game_short_name:flags.1?<a href='/type/string'>string</a> = <a href='/type/Update'>Update</a>;
<a href='/constructor/updateInlineBotCallbackQuery'>updateInlineBotCallbackQuery</a>#f9d27a5a flags:<a href='/type/%23'>#</a> query_id:<a href='/type/long'>long</a> user_id:<a href='/type/int'>int</a> msg_id:<a href='/type/InputBotInlineMessageID'>InputBotInlineMessageID</a> chat_instance:<a href='/type/long'>long</a> data:flags.0?<a href='/type/bytes'>bytes</a> game_short_name:flags.1?<a href='/type/string'>string</a> = <a href='/type/Update'>Update</a>;
---functions---
<a href='/method/messages.setBotCallbackAnswer'>messages.setBotCallbackAnswer</a>#d58f130a flags:<a href='/type/%23'>#</a> alert:flags.1?<a href='/constructor/true'>true</a> query_id:<a href='/type/long'>long</a> message:flags.0?<a href='/type/string'>string</a> url:flags.2?<a href='/type/string'>string</a> cache_time:<a href='/type/int'>int</a> = <a href='/type/Bool'>Bool</a>;</code></pre>
<p>After the user invokes <a href="/method/messages.getBotCallbackAnswer">messages.getBotCallbackAnswer</a>, an <a href="/constructor/updateBotCallbackQuery">updateBotCallbackQuery</a> or <a href="/constructor/updateInlineBotCallbackQuery">updateInlineBotCallbackQuery</a> is generated and sent to the bot, depending on whether the query originated from a normal message sent by the bot, or from a message sent from an <a href="/api/bots/inline">inline query</a>. </p>
<p>Either way, bots must reply to the query as quickly as possible using <a href="/method/messages.setBotCallbackAnswer">messages.setBotCallbackAnswer</a>: </p>
<ul>
<li><code>query_id</code> is the <code>query_id</code> from <a href="/method/messages.getBotCallbackAnswer">messages.getBotCallbackAnswer</a>, an <a href="/constructor/updateBotCallbackQuery">updateBotCallbackQuery</a> or <a href="/constructor/updateInlineBotCallbackQuery">updateInlineBotCallbackQuery</a></li>
<li><code>message</code>, <code>alert</code>, <code>url</code> can contain messages and URLs to trigger different client behaviour, as <a href="#sending-a-callback-query">specified above »</a></li>
<li><code>cache_time</code> indicates the maximum amount of time in seconds that the result of the callback query may be cached by the <strong>client</strong>. </li>
</ul>
<p>If a <code>game_short_name</code> is present in the update, the bot should return the URL of the game with the specified name.<br>
The <a href="/method/messages.setBotCallbackAnswer">messages.setBotCallbackAnswer</a> method must be called anyway, even if no <code>message</code> or <code>url</code> is returned, to avoid timeouts on the client. </p></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script src="/js/jquery.min.js?1"></script>
<script src="/js/bootstrap.min.js"></script>
<script>window.initDevPageNav&&initDevPageNav();
backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>

View file

@ -1,171 +0,0 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>Games</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Bots can offer users HTML5 games to play solo or to compete against each other in groups and one-on-one chats. ">
<meta property="og:title" content="Games">
<meta property="og:image" content="">
<meta property="og:description" content="Bots can offer users HTML5 games to play solo or to compete against each other in groups and one-on-one chats. ">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class="active"><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class=""><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/api/bots%2Fgames" >Games</a></li></ul></div>
<h1 id="dev_page_title">Games</h1>
<div id="dev_page_content"><!-- scroll_nav -->
<p>Bots can offer users <a href="/bots/games">HTML5 games</a> to play solo or to compete against each other in groups and one-on-one chats. </p>
<h3><a class="anchor" href="#sending-a-game" id="sending-a-game" name="sending-a-game"><i class="anchor-icon"></i></a>Sending a game</h3>
<pre><code><a href='/constructor/inputUserSelf'>inputUserSelf</a>#f7c1b13f = <a href='/type/InputUser'>InputUser</a>;
<a href='/constructor/inputGameID'>inputGameID</a>#32c3e77 id:<a href='/type/long'>long</a> access_hash:<a href='/type/long'>long</a> = <a href='/type/InputGame'>InputGame</a>;
<a href='/constructor/inputGameShortName'>inputGameShortName</a>#c331e80a bot_id:<a href='/type/InputUser'>InputUser</a> short_name:<a href='/type/string'>string</a> = <a href='/type/InputGame'>InputGame</a>;
<a href='/constructor/inputMediaGame'>inputMediaGame</a>#d33f43f3 id:<a href='/type/InputGame'>InputGame</a> = <a href='/type/InputMedia'>InputMedia</a>;
<a href='/constructor/game'>game</a>#bdf9653b flags:<a href='/type/%23'>#</a> id:<a href='/type/long'>long</a> access_hash:<a href='/type/long'>long</a> short_name:<a href='/type/string'>string</a> title:<a href='/type/string'>string</a> description:<a href='/type/string'>string</a> photo:<a href='/type/Photo'>Photo</a> document:flags.0?<a href='/type/Document'>Document</a> = <a href='/type/Game'>Game</a>;
<a href='/constructor/messageMediaGame'>messageMediaGame</a>#fdb19008 game:<a href='/type/Game'>Game</a> = <a href='/type/MessageMedia'>MessageMedia</a>;
---functions---
<a href='/method/messages.sendMedia'>messages.sendMedia</a>#3491eba9 flags:<a href='/type/%23'>#</a> silent:flags.5?<a href='/constructor/true'>true</a> background:flags.6?<a href='/constructor/true'>true</a> clear_draft:flags.7?<a href='/constructor/true'>true</a> peer:<a href='/type/InputPeer'>InputPeer</a> reply_to_msg_id:flags.0?<a href='/type/int'>int</a> media:<a href='/type/InputMedia'>InputMedia</a> message:<a href='/type/string'>string</a> random_id:<a href='/type/long'>long</a> reply_markup:flags.2?<a href='/type/ReplyMarkup'>ReplyMarkup</a> entities:flags.3?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/MessageEntity'>MessageEntity</a>&gt; schedule_date:flags.10?<a href='/type/int'>int</a> = <a href='/type/Updates'>Updates</a>;</code></pre>
<p>Bots can directly send a game using <a href="/method/messages.sendMedia">messages.sendMedia</a>, providing:</p>
<ul>
<li>The bot's shortname obtained from <a href="https://t.me/botfather">@BotFather</a> to <code>inputGameShortName.short_name</code></li>
<li>The current bot's info to <code>inputGameShortName.bot_id</code></li>
</ul>
<p>The sent message will contain a <a href="/constructor/messageMediaGame">messageMediaGame</a> with a <a href="/constructor/game">game</a>, that can then be used by users to forward the game using sendMedia with <a href="/constructor/inputGameID">inputGameID</a>.</p>
<h3><a class="anchor" href="#starting-a-game" id="starting-a-game" name="starting-a-game"><i class="anchor-icon"></i></a>Starting a game</h3>
<p>Games are started clicking on the button, which triggers an callback query that returns the game URL, for more info <a href="/api/bots/buttons#callback-queries">see here &amp;raquo</a>.<br>
The game should then be opened in a WebView or in native UI (specified by the <code>native_ui</code> flag), exposing the <a href="/api/web-events">appropriate HTML5 APIs</a> in order to receive various JS game events directly from the code of the game, as described <a href="/api/web-events">here »</a>. </p>
<h3><a class="anchor" href="#setting-highscores" id="setting-highscores" name="setting-highscores"><i class="anchor-icon"></i></a>Setting highscores</h3>
<pre><code>---functions---
<a href='/method/messages.setGameScore'>messages.setGameScore</a>#8ef8ecc0 flags:<a href='/type/%23'>#</a> edit_message:flags.0?<a href='/constructor/true'>true</a> force:flags.1?<a href='/constructor/true'>true</a> peer:<a href='/type/InputPeer'>InputPeer</a> id:<a href='/type/int'>int</a> user_id:<a href='/type/InputUser'>InputUser</a> score:<a href='/type/int'>int</a> = <a href='/type/Updates'>Updates</a>;
<a href='/method/messages.setInlineGameScore'>messages.setInlineGameScore</a>#15ad9f64 flags:<a href='/type/%23'>#</a> edit_message:flags.0?<a href='/constructor/true'>true</a> force:flags.1?<a href='/constructor/true'>true</a> id:<a href='/type/InputBotInlineMessageID'>InputBotInlineMessageID</a> user_id:<a href='/type/InputUser'>InputUser</a> score:<a href='/type/int'>int</a> = <a href='/type/Bool'>Bool</a>;</code></pre>
<p>Games are supposed to report back to the MTProto API every time the user looses a game with a new highscore.<br>
Since games run in the browser, they cannot directly report data to the API using the bot token, which must be kept secret.<br>
Instead, they should send highscores to an intermediate server, that will then report scores using <a href="/method/messages.setGameScore">messages.setGameScore</a> or <a href="/method/messages.setInlineGameScore">messages.setInlineGameScore</a>, depending on the source of the game. </p>
<ul>
<li>The <code>edit_message</code> flag should be set if the game message should be automatically edited to include the current scoreboard</li>
<li>The <code>force</code> flag should be set if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters.</li>
</ul>
<h3><a class="anchor" href="#getting-highscores" id="getting-highscores" name="getting-highscores"><i class="anchor-icon"></i></a>Getting highscores</h3>
<pre><code><a href='/constructor/messageActionGameScore'>messageActionGameScore</a>#92a72876 game_id:<a href='/type/long'>long</a> score:<a href='/type/int'>int</a> = <a href='/type/MessageAction'>MessageAction</a>;
<a href='/constructor/messageService'>messageService</a>#286fa604 flags:<a href='/type/%23'>#</a> out:flags.1?<a href='/constructor/true'>true</a> mentioned:flags.4?<a href='/constructor/true'>true</a> media_unread:flags.5?<a href='/constructor/true'>true</a> silent:flags.13?<a href='/constructor/true'>true</a> post:flags.14?<a href='/constructor/true'>true</a> legacy:flags.19?<a href='/constructor/true'>true</a> id:<a href='/type/int'>int</a> from_id:flags.8?<a href='/type/Peer'>Peer</a> peer_id:<a href='/type/Peer'>Peer</a> reply_to:flags.3?<a href='/type/MessageReplyHeader'>MessageReplyHeader</a> date:<a href='/type/int'>int</a> action:<a href='/type/MessageAction'>MessageAction</a> = <a href='/type/Message'>Message</a>;
<a href='/constructor/highScore'>highScore</a>#58fffcd0 pos:<a href='/type/int'>int</a> user_id:<a href='/type/int'>int</a> score:<a href='/type/int'>int</a> = <a href='/type/HighScore'>HighScore</a>;
<a href='/constructor/messages.highScores'>messages.highScores</a>#9a3bfd99 scores:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/HighScore'>HighScore</a>&gt; users:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/User'>User</a>&gt; = <a href='/type/messages.HighScores'>messages.HighScores</a>;
---functions---
<a href='/method/messages.getGameHighScores'>messages.getGameHighScores</a>#e822649d peer:<a href='/type/InputPeer'>InputPeer</a> id:<a href='/type/int'>int</a> user_id:<a href='/type/InputUser'>InputUser</a> = <a href='/type/messages.HighScores'>messages.HighScores</a>;
<a href='/method/messages.getInlineGameHighScores'>messages.getInlineGameHighScores</a>#f635e1b id:<a href='/type/InputBotInlineMessageID'>InputBotInlineMessageID</a> user_id:<a href='/type/InputUser'>InputUser</a> = <a href='/type/messages.HighScores'>messages.HighScores</a>;</code></pre>
<p>Every time a highscore is reached, and the <code>edit_message</code> flag is set when reporting the score, a <a href="/constructor/messageService">messageService</a> with a <a href="/constructor/messageActionGameScore">messageActionGameScore</a> is generated, indicating that the highscore of a certain game has changed, thanks to a certain <code>user_id</code>.<br>
Our own current position of the scoreboard is also reported as <code>pos</code>. </p>
<p>When receiving such an update, graphical clients should refetch the scoreboard using <a href="/method/messages.getGameHighScores">messages.getGameHighScores</a> or <a href="/method/messages.getInlineGameHighScores">messages.getInlineGameHighScores</a>.</p></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script src="/js/jquery.min.js?1"></script>
<script src="/js/bootstrap.min.js"></script>
<script>window.initDevPageNav&&initDevPageNav();
backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>

View file

@ -0,0 +1,151 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>Working with Different Data Centers</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="How to connect to the closest DC access point for faster interaction with the API, and things to watch out for when developing a client.">
<meta property="og:title" content="Working with Different Data Centers">
<meta property="og:image" content="5bb32ac46255f88a6c">
<meta property="og:description" content="How to connect to the closest DC access point for faster interaction with the API, and things to watch out for when developing a client.">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class="active"><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class=""><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/api/datacenter" >Working with Different Data Centers</a></li></ul></div>
<h1 id="dev_page_title">Working with Different Data Centers</h1>
<div id="dev_page_content"><p>The servers are divided into several data centers (hereinafter “DCs”) in different parts of the world.
A complete list of proxy access points for these DCs may be obtained using <a href="/method/help.getConfig">help.getConfig</a>:</p>
<pre><code><a href='/constructor/dcOption'>dcOption</a>#18b7a10d flags:<a href='/type/%23'>#</a> ipv6:flags.0?<a href='/constructor/true'>true</a> media_only:flags.1?<a href='/constructor/true'>true</a> tcpo_only:flags.2?<a href='/constructor/true'>true</a> cdn:flags.3?<a href='/constructor/true'>true</a> static:flags.4?<a href='/constructor/true'>true</a> id:<a href='/type/int'>int</a> ip_address:<a href='/type/string'>string</a> port:<a href='/type/int'>int</a> secret:flags.10?<a href='/type/bytes'>bytes</a> = <a href='/type/DcOption'>DcOption</a>;
<a href='/constructor/config'>config</a>#330b4067 flags:<a href='/type/%23'>#</a> phonecalls_enabled:flags.1?<a href='/constructor/true'>true</a> default_p2p_contacts:flags.3?<a href='/constructor/true'>true</a> preload_featured_stickers:flags.4?<a href='/constructor/true'>true</a> ignore_phone_entities:flags.5?<a href='/constructor/true'>true</a> revoke_pm_inbox:flags.6?<a href='/constructor/true'>true</a> blocked_mode:flags.8?<a href='/constructor/true'>true</a> pfs_enabled:flags.13?<a href='/constructor/true'>true</a> date:<a href='/type/int'>int</a> expires:<a href='/type/int'>int</a> test_mode:<a href='/type/Bool'>Bool</a> this_dc:<a href='/type/int'>int</a> dc_options:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/DcOption'>DcOption</a>&gt; dc_txt_domain_name:<a href='/type/string'>string</a> chat_size_max:<a href='/type/int'>int</a> megagroup_size_max:<a href='/type/int'>int</a> forwarded_count_max:<a href='/type/int'>int</a> online_update_period_ms:<a href='/type/int'>int</a> offline_blur_timeout_ms:<a href='/type/int'>int</a> offline_idle_timeout_ms:<a href='/type/int'>int</a> online_cloud_timeout_ms:<a href='/type/int'>int</a> notify_cloud_delay_ms:<a href='/type/int'>int</a> notify_default_delay_ms:<a href='/type/int'>int</a> push_chat_period_ms:<a href='/type/int'>int</a> push_chat_limit:<a href='/type/int'>int</a> saved_gifs_limit:<a href='/type/int'>int</a> edit_time_limit:<a href='/type/int'>int</a> revoke_time_limit:<a href='/type/int'>int</a> revoke_pm_time_limit:<a href='/type/int'>int</a> rating_e_decay:<a href='/type/int'>int</a> stickers_recent_limit:<a href='/type/int'>int</a> stickers_faved_limit:<a href='/type/int'>int</a> channels_read_media_period:<a href='/type/int'>int</a> tmp_sessions:flags.0?<a href='/type/int'>int</a> pinned_dialogs_count_max:<a href='/type/int'>int</a> pinned_infolder_count_max:<a href='/type/int'>int</a> call_receive_timeout_ms:<a href='/type/int'>int</a> call_ring_timeout_ms:<a href='/type/int'>int</a> call_connect_timeout_ms:<a href='/type/int'>int</a> call_packet_timeout_ms:<a href='/type/int'>int</a> me_url_prefix:<a href='/type/string'>string</a> autoupdate_url_prefix:flags.7?<a href='/type/string'>string</a> gif_search_username:flags.9?<a href='/type/string'>string</a> venue_search_username:flags.10?<a href='/type/string'>string</a> img_search_username:flags.11?<a href='/type/string'>string</a> static_maps_provider:flags.12?<a href='/type/string'>string</a> caption_length_max:<a href='/type/int'>int</a> message_length_max:<a href='/type/int'>int</a> webfile_dc_id:<a href='/type/int'>int</a> suggested_lang_code:flags.2?<a href='/type/string'>string</a> lang_pack_version:flags.2?<a href='/type/int'>int</a> base_lang_pack_version:flags.2?<a href='/type/int'>int</a> = <a href='/type/Config'>Config</a>;
---functions---
<a href='/method/help.getConfig'>help.getConfig</a>#c4f9186b = <a href='/type/Config'>Config</a>;</code></pre>
<p>In this context, <strong>this_dc</strong> is the number of the current DC, <strong>dc_options</strong> is a list of all DCs available at the moment, each of which has an <strong>id</strong>, <strong>ip</strong>, and <strong>port</strong> for establishing a connection. Please note that <strong>ip</strong> and <strong>port</strong> may change frequently, based on proxy server load and the user's current location.</p>
<p>To optimize client communication with the API, each client must use the connection to the closest access point for its main queries (sending messages, getting contacts, etc.). Therefore, knowing how to select a DC is required before communicating with the API.</p>
<h3><a class="anchor" href="#registrationauthorization" id="registrationauthorization" name="registrationauthorization"><i class="anchor-icon"></i></a>Registration/Authorization</h3>
<p>The <a href="/method/auth.sendCode">auth.sendCode</a> method is the basic entry point when registering a new user or authorizing an existing user. 95% of all redirection cases to a different DC will occure when invoking this method.</p>
<p>The client does not yet know which DC it will be associated with; therefore, it establishes an encrypted connection to a random address and sends its query to that address.
Having received a <strong>phone_number</strong> from a client, we can find out whether or not it is registered in the system. If it is, then, if necessary, instead of sending a text message, we request that it establish a connection with a different DC first (PHONE_MIGRATE_X error).
If we do not yet have a user with this number, we examine its IP-address. We can use it to identify the closest DC. Again, if necessary, we redirect the user to a different DC (NETWORK_MIGRATE_X error).</p>
<h4><a class="anchor" href="#testing-redirects" id="testing-redirects" name="testing-redirects"><i class="anchor-icon"></i></a>Testing Redirects</h4>
<p>There are reserved phone number prefixes to test the correctness of the applications handling of redirects between DCs. Read more in <a href="https://core.telegram.org/api/auth#test-phone-numbers">User Authorization</a> article.</p>
<h3><a class="anchor" href="#file-access" id="file-access" name="file-access"><i class="anchor-icon"></i></a>File Access</h3>
<p>A file saved by a user with <a href="/method/upload.saveFilePart">upload.saveFilePart</a> will be available for direct download only from the DC where the query was executed. That is why each file has a <strong>dc_id</strong> parameter:</p>
<pre><code><a href='/constructor/document'>document</a>#1e87342b flags:<a href='/type/%23'>#</a> id:<a href='/type/long'>long</a> access_hash:<a href='/type/long'>long</a> file_reference:<a href='/type/bytes'>bytes</a> date:<a href='/type/int'>int</a> mime_type:<a href='/type/string'>string</a> size:<a href='/type/int'>int</a> thumbs:flags.0?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/PhotoSize'>PhotoSize</a>&gt; video_thumbs:flags.1?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/VideoSize'>VideoSize</a>&gt; dc_id:<a href='/type/int'>int</a> attributes:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/DocumentAttribute'>DocumentAttribute</a>&gt; = <a href='/type/Document'>Document</a>;
<a href='/constructor/photo'>photo</a>#fb197a65 flags:<a href='/type/%23'>#</a> has_stickers:flags.0?<a href='/constructor/true'>true</a> id:<a href='/type/long'>long</a> access_hash:<a href='/type/long'>long</a> file_reference:<a href='/type/bytes'>bytes</a> date:<a href='/type/int'>int</a> sizes:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/PhotoSize'>PhotoSize</a>&gt; video_sizes:flags.1?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/VideoSize'>VideoSize</a>&gt; dc_id:<a href='/type/int'>int</a> = <a href='/type/Photo'>Photo</a>;
<a href='/constructor/encryptedFile'>encryptedFile</a>#4a70994c id:<a href='/type/long'>long</a> access_hash:<a href='/type/long'>long</a> size:<a href='/type/int'>int</a> dc_id:<a href='/type/int'>int</a> key_fingerprint:<a href='/type/int'>int</a> = <a href='/type/EncryptedFile'>EncryptedFile</a>;
<a href='/constructor/userProfilePhoto'>userProfilePhoto</a>#69d3ab26 flags:<a href='/type/%23'>#</a> has_video:flags.0?<a href='/constructor/true'>true</a> photo_id:<a href='/type/long'>long</a> photo_small:<a href='/type/FileLocation'>FileLocation</a> photo_big:<a href='/type/FileLocation'>FileLocation</a> dc_id:<a href='/type/int'>int</a> = <a href='/type/UserProfilePhoto'>UserProfilePhoto</a>;
<a href='/constructor/chatPhoto'>chatPhoto</a>#d20b9f3c flags:<a href='/type/%23'>#</a> has_video:flags.0?<a href='/constructor/true'>true</a> photo_small:<a href='/type/FileLocation'>FileLocation</a> photo_big:<a href='/type/FileLocation'>FileLocation</a> dc_id:<a href='/type/int'>int</a> = <a href='/type/ChatPhoto'>ChatPhoto</a>;</code></pre>
<p>To download the file, an encrypted connection to DC <strong>dc_id</strong> must be established and used to execute the <a href="/method/upload.getFile">upload.getFile</a> query.
If an attempt is made to download the file over a wrong connection, the FILE_MIGRATE_X error will be returned.</p>
<p>Please note that encryption keys are not copied between DCs; therefore, the process of establishing an encrypted connection is started from the very beginning for each new DC. An issued auth_key can be associated with the current authorized user by using an <a href="#authorization-transfer">authorization transfer</a>.</p>
<h3><a class="anchor" href="#user-migration" id="user-migration" name="user-migration"><i class="anchor-icon"></i></a>User Migration</h3>
<p>During the process of working with the API, user information is accumulated in the DC with which the user is associated. This is the reason a user cannot be associated with a different DC by means of the client. However, in the future, during prolonged communication from an unusual location, we may decide that the users data must be moved to a different DC. After some time, the data will be copied and the association will be updated. Once this happens, when executing any query transmitted to the old DC, the API will return the USER_MIGRATE_X error. The client will then have to establish a connection with the new DC and repeat the query.</p>
<h3><a class="anchor" href="#authorization-transfer" id="authorization-transfer" name="authorization-transfer"><i class="anchor-icon"></i></a>Authorization Transfer</h3>
<p>The following methods can be used to eliminate the need for users to enter the code from a text message every time:</p>
<pre><code><a href='/constructor/auth.exportedAuthorization'>auth.exportedAuthorization</a>#df969c2d id:<a href='/type/int'>int</a> bytes:<a href='/type/bytes'>bytes</a> = <a href='/type/auth.ExportedAuthorization'>auth.ExportedAuthorization</a>;
<a href='/constructor/auth.authorization'>auth.authorization</a>#cd050916 flags:<a href='/type/%23'>#</a> tmp_sessions:flags.0?<a href='/type/int'>int</a> user:<a href='/type/User'>User</a> = <a href='/type/auth.Authorization'>auth.Authorization</a>;
---functions---
<a href='/method/auth.importAuthorization'>auth.importAuthorization</a>#e3ef9613 id:<a href='/type/int'>int</a> bytes:<a href='/type/bytes'>bytes</a> = <a href='/type/auth.Authorization'>auth.Authorization</a>;
<a href='/method/auth.exportAuthorization'>auth.exportAuthorization</a>#e5bfffcd dc_id:<a href='/type/int'>int</a> = <a href='/type/auth.ExportedAuthorization'>auth.ExportedAuthorization</a>;</code></pre>
<p><a href="/method/auth.exportAuthorization">auth.exportAuthorization</a> must be executed in the current DC (the DC with which a connection has already been established), passing in <strong>dc_id</strong> as the value for the new DC. The method should return the user identifier and a long string of random data. An import operation can be performed at the new DC by sending it what was received. Queries requiring authorization can then be successfully executed in the new DC.</p></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script>backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>

View file

@ -0,0 +1,149 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>Dice</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Telegram supports sending [animated dice](https://telegram.org/blog/folders#and-one-more-thing) emojis.">
<meta property="og:title" content="Dice">
<meta property="og:image" content="">
<meta property="og:description" content="Telegram supports sending [animated dice](https://telegram.org/blog/folders#and-one-more-thing) emojis.">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class="active"><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class=""><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/api/dice" >Dice</a></li></ul></div>
<h1 id="dev_page_title">Dice</h1>
<div id="dev_page_content"><p>Telegram supports sending <a href="https://telegram.org/blog/folders#and-one-more-thing">animated dice</a> emojis.<br>
This is implemented by using the dice constructors: </p>
<pre><code><a href='/constructor/inputMediaDice'>inputMediaDice</a>#e66fbf7b emoticon:<a href='/type/string'>string</a> = <a href='/type/InputMedia'>InputMedia</a>;
<a href='/constructor/messageMediaDice'>messageMediaDice</a>#3f7ee58b value:<a href='/type/int'>int</a> emoticon:<a href='/type/string'>string</a> = <a href='/type/MessageMedia'>MessageMedia</a>;
<a href='/constructor/inputStickerSetDice'>inputStickerSetDice</a>#e67f520e emoticon:<a href='/type/string'>string</a> = <a href='/type/InputStickerSet'>InputStickerSet</a>;
<a href='/constructor/messages.stickerSet'>messages.stickerSet</a>#b60a24a6 set:<a href='/type/StickerSet'>StickerSet</a> packs:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/StickerPack'>StickerPack</a>&gt; documents:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/Document'>Document</a>&gt; = <a href='/type/messages.StickerSet'>messages.StickerSet</a>;
---functions---
<a href='/method/messages.sendMedia'>messages.sendMedia</a>#3491eba9 flags:<a href='/type/%23'>#</a> silent:flags.5?<a href='/constructor/true'>true</a> background:flags.6?<a href='/constructor/true'>true</a> clear_draft:flags.7?<a href='/constructor/true'>true</a> peer:<a href='/type/InputPeer'>InputPeer</a> reply_to_msg_id:flags.0?<a href='/type/int'>int</a> media:<a href='/type/InputMedia'>InputMedia</a> message:<a href='/type/string'>string</a> random_id:<a href='/type/long'>long</a> reply_markup:flags.2?<a href='/type/ReplyMarkup'>ReplyMarkup</a> entities:flags.3?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/MessageEntity'>MessageEntity</a>&gt; schedule_date:flags.10?<a href='/type/int'>int</a> = <a href='/type/Updates'>Updates</a>;
<a href='/method/messages.getStickerSet'>messages.getStickerSet</a>#2619a90e stickerset:<a href='/type/InputStickerSet'>InputStickerSet</a> = <a href='/type/messages.StickerSet'>messages.StickerSet</a>;
<a href='/method/help.getAppConfig'>help.getAppConfig</a>#98914110 = <a href='/type/JSONValue'>JSONValue</a>;</code></pre>
<p>On startup, clients should fetch <a href="/api/config#client-configuration">app configuration using help.getAppConfig</a>.<br>
Then, for each dice emoji contained in the <code>emojies_send_dice</code> field, clients should fetch the dice emoji stickerset by calling the <a href="/method/messages.getStickerSet">messages.getStickerSet</a> method, providing the properly populated <a href="/constructor/inputStickerSetDice">inputStickerSetDice</a> to the <code>stickerset</code> field.<br>
The returned stickerset will contain a set of animated stickers, one for each of the dice outcomes, plus a first looping sticker that should be shown as preview to the user before actually sending the dice. </p>
<p>If a user attempts to send a single emoji from the ones specified in <code>emojies_send_dice</code>, the dice should be sent using <a href="/method/messages.sendMedia">messages.sendMedia</a>, providing the dice emoji to the <code>emoticon</code> field. </p>
<p>Incoming dice stickers will be received as a <a href="/constructor/messageMediaDice">messageMediaDice</a> constructor, along with a randomly generated server-side value, ranging from 1 to the maximum allowed value for this type of dice.<br>
Clients should display the correct dice animated sticker for the specified value: since dice values start from 1, and the first animated sticker in dice stickerset is the preview, <code>value</code> can be used to directly index the <code>documents</code> sticker array from the animated stickerset. </p>
<p>The <code>emojies_send_dice_success</code> configuration parameter contains more info about dice emojis other than the basic <img class="emoji" src="//telegram.org/img/emoji/40/F09F8EB2.png" width="20" height="20" alt="🎲" />: </p>
<pre><code> "emojies_send_dice_success": {
"\ud83c\udfaf": {
"value": 6,
"frame_start": 62
},
"\ud83c\udfc0": {
"value": 5,
"frame_start": 110
}
}</code></pre>
<p>For each of the dice emojis, a maximum "winning" value is specified, along with the frame number at which to show the fireworks <img class="emoji" src="//telegram.org/img/emoji/40/F09F8E86.png" width="20" height="20" alt="🎆" />.<br>
Please note that dice animated stickers should loop only once, right after being sent/received <strong>for the first time</strong>; clicking on the dice sticker should bring up a popup, inviting the user to send a new dice of the same type. </p></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script>backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>

View file

@ -2,12 +2,12 @@
<html class="">
<head>
<meta charset="utf-8">
<title>Commands</title>
<title>Discussion groups</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Bots offer a set of commands that can be used by users in private, or in a chat.">
<meta property="og:title" content="Commands">
<meta property="description" content="[Groups](/api/channel) can be associated to a [channel](/api/channel) as a [discussion group](https://telegram.org/blog/privacy-discussions-web-bots), to allow users to discuss about posts.">
<meta property="og:title" content="Discussion groups">
<meta property="og:image" content="">
<meta property="og:description" content="Bots offer a set of commands that can be used by users in private, or in a chat.">
<meta property="og:description" content="[Groups](/api/channel) can be associated to a [channel](/api/channel) as a [discussion group](https://telegram.org/blog/privacy-discussions-web-bots), to allow users to discuss about posts.">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
@ -36,32 +36,43 @@
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/api/bots%2Fcommands" >Commands</a></li></ul></div>
<h1 id="dev_page_title">Commands</h1>
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/api/discussion" >Discussion groups</a></li></ul></div>
<h1 id="dev_page_title">Discussion groups</h1>
<div id="dev_page_content"><!-- scroll_nav -->
<p><a href="/bots">Bots</a> offer a set of <a href="/bots/#commands">commands</a> that can be used by users in private, or in a chat. </p>
<p>For a simplified description using the HTTP bot API, see <a href="/bots/#commands">here »</a>. </p>
<h3><a class="anchor" href="#getting-commands" id="getting-commands" name="getting-commands"><i class="anchor-icon"></i></a>Getting commands</h3>
<pre><code><a href='/constructor/botCommand'>botCommand</a>#c27ac8c7 command:<a href='/type/string'>string</a> description:<a href='/type/string'>string</a> = <a href='/type/BotCommand'>BotCommand</a>;
<a href='/constructor/botInfo'>botInfo</a>#98e81d3a user_id:<a href='/type/int'>int</a> description:<a href='/type/string'>string</a> commands:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/BotCommand'>BotCommand</a>&gt; = <a href='/type/BotInfo'>BotInfo</a>;
<p><a href="/api/channel">Groups</a> can be associated to a <a href="/api/channel">channel</a> as a <a href="https://telegram.org/blog/privacy-discussions-web-bots">discussion group</a>, to allow users to discuss about posts. </p>
<pre><code><a href='/constructor/boolFalse'>boolFalse</a>#bc799737 = <a href='/type/Bool'>Bool</a>;
<a href='/constructor/boolTrue'>boolTrue</a>#997275b5 = <a href='/type/Bool'>Bool</a>;
<a href='/constructor/channelFull'>channelFull</a>#f0e6672a flags:<a href='/type/%23'>#</a> can_view_participants:flags.3?<a href='/constructor/true'>true</a> can_set_username:flags.6?<a href='/constructor/true'>true</a> can_set_stickers:flags.7?<a href='/constructor/true'>true</a> hidden_prehistory:flags.10?<a href='/constructor/true'>true</a> can_set_location:flags.16?<a href='/constructor/true'>true</a> has_scheduled:flags.19?<a href='/constructor/true'>true</a> can_view_stats:flags.20?<a href='/constructor/true'>true</a> blocked:flags.22?<a href='/constructor/true'>true</a> id:<a href='/type/int'>int</a> about:<a href='/type/string'>string</a> participants_count:flags.0?<a href='/type/int'>int</a> admins_count:flags.1?<a href='/type/int'>int</a> kicked_count:flags.2?<a href='/type/int'>int</a> banned_count:flags.2?<a href='/type/int'>int</a> online_count:flags.13?<a href='/type/int'>int</a> read_inbox_max_id:<a href='/type/int'>int</a> read_outbox_max_id:<a href='/type/int'>int</a> unread_count:<a href='/type/int'>int</a> chat_photo:<a href='/type/Photo'>Photo</a> notify_settings:<a href='/type/PeerNotifySettings'>PeerNotifySettings</a> exported_invite:<a href='/type/ExportedChatInvite'>ExportedChatInvite</a> bot_info:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/BotInfo'>BotInfo</a>&gt; migrated_from_chat_id:flags.4?<a href='/type/int'>int</a> migrated_from_max_id:flags.4?<a href='/type/int'>int</a> pinned_msg_id:flags.5?<a href='/type/int'>int</a> stickerset:flags.8?<a href='/type/StickerSet'>StickerSet</a> available_min_id:flags.9?<a href='/type/int'>int</a> folder_id:flags.11?<a href='/type/int'>int</a> linked_chat_id:flags.14?<a href='/type/int'>int</a> location:flags.15?<a href='/type/ChannelLocation'>ChannelLocation</a> slowmode_seconds:flags.17?<a href='/type/int'>int</a> slowmode_next_send_date:flags.18?<a href='/type/int'>int</a> stats_dc:flags.12?<a href='/type/int'>int</a> pts:<a href='/type/int'>int</a> = <a href='/type/ChatFull'>ChatFull</a>;
<a href='/constructor/userFull'>userFull</a>#edf17c12 flags:<a href='/type/%23'>#</a> blocked:flags.0?<a href='/constructor/true'>true</a> phone_calls_available:flags.4?<a href='/constructor/true'>true</a> phone_calls_private:flags.5?<a href='/constructor/true'>true</a> can_pin_message:flags.7?<a href='/constructor/true'>true</a> has_scheduled:flags.12?<a href='/constructor/true'>true</a> video_calls_available:flags.13?<a href='/constructor/true'>true</a> user:<a href='/type/User'>User</a> about:flags.1?<a href='/type/string'>string</a> settings:<a href='/type/PeerSettings'>PeerSettings</a> profile_photo:flags.2?<a href='/type/Photo'>Photo</a> notify_settings:<a href='/type/PeerNotifySettings'>PeerNotifySettings</a> bot_info:flags.3?<a href='/type/BotInfo'>BotInfo</a> pinned_msg_id:flags.6?<a href='/type/int'>int</a> common_chats_count:<a href='/type/int'>int</a> folder_id:flags.11?<a href='/type/int'>int</a> = <a href='/type/UserFull'>UserFull</a>;
<a href='/constructor/user'>user</a>#938458c1 flags:<a href='/type/%23'>#</a> self:flags.10?<a href='/constructor/true'>true</a> contact:flags.11?<a href='/constructor/true'>true</a> mutual_contact:flags.12?<a href='/constructor/true'>true</a> deleted:flags.13?<a href='/constructor/true'>true</a> bot:flags.14?<a href='/constructor/true'>true</a> bot_chat_history:flags.15?<a href='/constructor/true'>true</a> bot_nochats:flags.16?<a href='/constructor/true'>true</a> verified:flags.17?<a href='/constructor/true'>true</a> restricted:flags.18?<a href='/constructor/true'>true</a> min:flags.20?<a href='/constructor/true'>true</a> bot_inline_geo:flags.21?<a href='/constructor/true'>true</a> support:flags.23?<a href='/constructor/true'>true</a> scam:flags.24?<a href='/constructor/true'>true</a> apply_min_photo:flags.25?<a href='/constructor/true'>true</a> id:<a href='/type/int'>int</a> access_hash:flags.0?<a href='/type/long'>long</a> first_name:flags.1?<a href='/type/string'>string</a> last_name:flags.2?<a href='/type/string'>string</a> username:flags.3?<a href='/type/string'>string</a> phone:flags.4?<a href='/type/string'>string</a> photo:flags.5?<a href='/type/UserProfilePhoto'>UserProfilePhoto</a> status:flags.6?<a href='/type/UserStatus'>UserStatus</a> bot_info_version:flags.14?<a href='/type/int'>int</a> restriction_reason:flags.18?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/RestrictionReason'>RestrictionReason</a>&gt; bot_inline_placeholder:flags.19?<a href='/type/string'>string</a> lang_code:flags.22?<a href='/type/string'>string</a> = <a href='/type/User'>User</a>;</code></pre>
<p>The <a href="/constructor/botInfo">botInfo</a> constructors contained in the <a href="/constructor/userFull">userFull</a>, <a href="/constructor/chatFull">chatFull</a>, <a href="/constructor/channelFull">channelFull</a> contain a list of commands, and for groups, the ID and a description of each bot. </p>
<p>In graphical clients, when users begin a message with a <code>/</code>, a list of commands supported by all bots present in the current chat should be shown; the same should be done for one-to-one chats with the bot itself. </p>
<p>If the command list of a bot changes, the <code>bot_info_version</code> contained in the <a href="/constructor/user">user</a> constructor received in updates will change; this indicates that the client should refetch full bot information using <a href="/method/users.getFullUser">users.getFullUser</a>.</p>
<h3><a class="anchor" href="#setting-commands" id="setting-commands" name="setting-commands"><i class="anchor-icon"></i></a>Setting commands</h3>
<pre><code><a href='/constructor/botCommand'>botCommand</a>#c27ac8c7 command:<a href='/type/string'>string</a> description:<a href='/type/string'>string</a> = <a href='/type/BotCommand'>BotCommand</a>;
<a href='/constructor/messages.chats'>messages.chats</a>#64ff9fd5 chats:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/Chat'>Chat</a>&gt; = <a href='/type/messages.Chats'>messages.Chats</a>;
---functions---
<a href='/method/bots.setBotCommands'>bots.setBotCommands</a>#805d46f6 commands:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/BotCommand'>BotCommand</a>&gt; = <a href='/type/Bool'>Bool</a>;</code></pre>
<p>The command list can be changed by the owner of the bot through <a href="https://t.me/botfather">@botfather</a>, but bots can also change their own command list by invoking <a href="/method/bots.setBotCommands">bots.setBotCommands</a>.</p></div>
<a href='/method/channels.setDiscussionGroup'>channels.setDiscussionGroup</a>#40582bb2 broadcast:<a href='/type/InputChannel'>InputChannel</a> group:<a href='/type/InputChannel'>InputChannel</a> = <a href='/type/Bool'>Bool</a>;
<a href='/method/channels.getGroupsForDiscussion'>channels.getGroupsForDiscussion</a>#f5dad378 = <a href='/type/messages.Chats'>messages.Chats</a>;</code></pre>
<p>A discussion group can be associated to a channel using <a href="/method/channels.setDiscussionGroup">channels.setDiscussionGroup</a>.<br>
The discussion group can be accessed in the client by clicking on the discuss button of the channel, or by accessing the <a href="/api/threads">comment section</a> of a specific post; the discussion group ID is also present in the <code>linked_chat_id</code> field of the <a href="/constructor/channelFull">channelFull</a> constructor. </p>
<p>All messages sent to the channel will also be sent to the linked group (with sender peer <code>from_id</code> equal to the peer of the linked channel); those messages will also be automatically <a href="/api/pin">pinned</a> in the group.</p>
<h3><a class="anchor" href="#linking-a-discussion-group" id="linking-a-discussion-group" name="linking-a-discussion-group"><i class="anchor-icon"></i></a>Linking a discussion group</h3>
<p>To obtain a list of admined supergroups that a channel admin can possibly associate to a channel, use <a href="/method/channels.getGroupsForDiscussion">channels.getGroupsForDiscussion</a>.<br>
Returned <a href="/api/channel">legacy group chats</a> must be first <a href="/api/channel#migration">upgraded to supergroups</a> before they can be set as a discussion group.<br>
Before linking a supergroup to a channel, access to the supergroup's old messages must also be enabled using <a href="/method/channels.togglePreHistoryHidden">channels.togglePreHistoryHidden</a>. </p>
<p>To set a returned supergroup as a discussion group use <a href="/method/channels.setDiscussionGroup">channels.setDiscussionGroup</a>.</p>
<p>Schema: </p>
<pre><code><a href='/constructor/boolFalse'>boolFalse</a>#bc799737 = <a href='/type/Bool'>Bool</a>;
<a href='/constructor/boolTrue'>boolTrue</a>#997275b5 = <a href='/type/Bool'>Bool</a>;
<a href='/constructor/messages.chats'>messages.chats</a>#64ff9fd5 chats:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/Chat'>Chat</a>&gt; = <a href='/type/messages.Chats'>messages.Chats</a>;
---functions---
<a href='/method/channels.setDiscussionGroup'>channels.setDiscussionGroup</a>#40582bb2 broadcast:<a href='/type/InputChannel'>InputChannel</a> group:<a href='/type/InputChannel'>InputChannel</a> = <a href='/type/Bool'>Bool</a>;
<a href='/method/channels.getGroupsForDiscussion'>channels.getGroupsForDiscussion</a>#f5dad378 = <a href='/type/messages.Chats'>messages.Chats</a>;
<a href='/method/channels.togglePreHistoryHidden'>channels.togglePreHistoryHidden</a>#eabbb94c channel:<a href='/type/InputChannel'>InputChannel</a> enabled:<a href='/type/Bool'>Bool</a> = <a href='/type/Updates'>Updates</a>;</code></pre></div>
</div>

View file

@ -2,12 +2,12 @@
<html class="">
<head>
<meta charset="utf-8">
<title>string</title>
<title>Styled text with message entities</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="A basic bare type. Values of type string look differently depending on the length L of the string being serialized:">
<meta property="og:title" content="string">
<meta property="og:image" content="">
<meta property="og:description" content="A basic bare type. Values of type string look differently depending on the length L of the string being serialized:">
<meta property="description" content="How to create styled text with message entities">
<meta property="og:title" content="Styled text with message entities">
<meta property="og:image" content="d2441cad7ecfa0d622">
<meta property="og:description" content="How to create styled text with message entities">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
@ -26,9 +26,9 @@
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class=""><a href="/api">API</a></li>
<li class="active"><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class="active"><a href="/schema">Schema</a></li>
<li class=""><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
@ -36,21 +36,32 @@
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/type/string" >string</a></li></ul></div>
<h1 id="dev_page_title">string</h1>
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/api/entities" >Styled text with message entities</a></li></ul></div>
<h1 id="dev_page_title">Styled text with message entities</h1>
<div id="dev_page_content"><p>A basic bare type. Values of type <code>string</code> look differently depending on the length <code>L</code> of the string being serialized:</p>
<div id="dev_page_content"><p>Telegram supports styled text using <a href="/type/MessageEntity">message entities</a>.</p>
<p>A client that wants to send styled messages would simply have to integrate a <a href="https://en.wikipedia.org/wiki/Markdown">Markdown</a>/<a href="https://en.wikipedia.org/wiki/HTML">HTML</a> parser, and generate an array of message entities by iterating through the parsed tags.</p>
<p>Special care must be taken to consider the UTF-8 length of strings when generating message entities, see example implementations: <a href="https://github.com/tdlib/td/tree/master/td/telegram/MessageEntity.cpp">tdlib</a>, <a href="https://github.com/danog/MadelineProto/blob/master/src/danog/MadelineProto/TL/Conversion/BotAPI.php">MadelineProto</a>.</p>
<p>Nested entities are supported.<br>
For example the following HTML/Markdown aliases for message entities can be used:</p>
<ul>
<li>If <code>L &lt;= 253</code>, the serialization contains one byte with the value of <code>L</code>, then <code>L</code> bytes of the string followed by 0 to 3 characters containing 0, such that the overall length of the value be divisible by 4, whereupon all of this is interpreted as a sequence of <code>int(L/4)+1</code> 32-bit little-endian integers.</li>
<li>If <code>L &gt;= 254</code>, the serialization contains byte 254, followed by 3 bytes with the string length <code>L</code> in little-endian order, followed by <code>L</code> bytes of the string, further followed by 0 to 3 null padding bytes.</li>
<li><a href="https://core.telegram.org/constructor/messageEntityBold"><strong>messageEntityBold</strong></a> =&gt; <code>&lt;b&gt;bold&lt;/b&gt;</code>, <code>&lt;strong&gt;bold&lt;/strong&gt;</code>, <code>**bold**</code></li>
<li><a href="https://core.telegram.org/constructor/messageEntityItalic"><em>messageEntityItalic</em></a> =&gt; <code>&lt;i&gt;italic&lt;/i&gt;</code>, <code>&lt;em&gt;italic&lt;/em&gt;</code> <code>*italic*</code></li>
<li><a href="https://core.telegram.org/constructor/messageEntityCode"><code>messageEntityCode</code></a> =&gt; <code>&lt;code&gt;code&lt;/code&gt;</code>, <code>`code`</code></li>
<li><a href="https://core.telegram.org/constructor/messageEntityStrike"><del>messageEntityStrike</del></a> =&gt; <code>&lt;s&gt;strike&lt;/s&gt;</code>, <code>&lt;strike&gt;strike&lt;/strike&gt;</code>, <code>&lt;del&gt;strike&lt;/del&gt;</code>, <code>~~strike~~</code></li>
<li><a href="https://core.telegram.org/constructor/messageEntityUnderline"><u>messageEntityUnderline</u></a> =&gt; <code>&lt;u&gt;underline&lt;/u&gt;</code></li>
<li><a href="https://core.telegram.org/constructor/messageEntityPre"><code>messageEntityPre</code></a> =&gt; <code>&lt;pre language="c++"&gt;code&lt;/pre&gt;</code>, </li>
</ul>
<p>All strings passed to the API must be encoded in UTF-8. When arbitrary byte sequences have to be serialized, <a href="/type/bytes">bytes</a> alias is to be used.</p>
<p><a href="/mtproto/serialize">Further details on basic types»</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#bytes" id="bytes" name="bytes"><i class="anchor-icon"></i></a><a href="/type/bytes">bytes</a></h4>
<p>Basic bare type. It is an alias of the <strong><a href="/type/string">string</a></strong> type, with the difference that the value may contain arbitrary byte sequences, including invalid UTF-8 sequences.</p>
<p>When computing crc32 for a constructor or method it is necessary to replace all byte types with string types.</p>
<h4><a class="anchor" href="#binary-data-serialization" id="binary-data-serialization" name="binary-data-serialization"><i class="anchor-icon"></i></a><a href="/mtproto/serialize">Binary Data Serialization</a></h4></div>
<pre>
```c++
code
```
</pre>
<p>The following entities can also be used to <a href="/api/mentions">mention</a> users:</p>
<ul>
<li><a href="/constructor/inputMessageEntityMentionName">inputMessageEntityMentionName</a> =&gt; <a href="https://t.me/botfather">Mention a user</a></li>
<li><a href="/constructor/inputMessageEntityMentionName">messageEntityMention</a> =&gt; <a href="https://t.me/botfather">@botfather</a> (this mention is generated automatically server-side for @usernames in messages)</li>
</ul></div>
</div>

View file

@ -1,550 +0,0 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>Uploading and Downloading Files</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="How to transfer large data batches correctly.">
<meta property="og:title" content="Uploading and Downloading Files">
<meta property="og:image" content="1937a1be855ea8fce8">
<meta property="og:description" content="How to transfer large data batches correctly.">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class="active"><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class=""><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/api/files" >Uploading and Downloading Files</a></li></ul></div>
<h1 id="dev_page_title">Uploading and Downloading Files</h1>
<div id="dev_page_content"><!-- scroll_nav -->
<p>When working with the API, it is sometimes necessary to send a relatively large file to the server. For example, when sending a message with a photo/video attachment or when setting the current users profile picture.</p>
<h3><a class="anchor" href="#uploading-files" id="uploading-files" name="uploading-files"><i class="anchor-icon"></i></a>Uploading files</h3>
<p>There are a number of API methods to save files. The schema of the types and methods used is presented below:</p>
<pre><code><a href='/constructor/inputFile'>inputFile</a>#f52ff27f id:<a href='/type/long'>long</a> parts:<a href='/type/int'>int</a> name:<a href='/type/string'>string</a> md5_checksum:<a href='/type/string'>string</a> = <a href='/type/InputFile'>InputFile</a>;
<a href='/constructor/inputFileBig'>inputFileBig</a>#fa4f0bb5 id:<a href='/type/long'>long</a> parts:<a href='/type/int'>int</a> name:<a href='/type/string'>string</a> = <a href='/type/InputFile'>InputFile</a>;
<a href='/constructor/inputEncryptedFileUploaded'>inputEncryptedFileUploaded</a>#64bd0306 id:<a href='/type/long'>long</a> parts:<a href='/type/int'>int</a> md5_checksum:<a href='/type/string'>string</a> key_fingerprint:<a href='/type/int'>int</a> = <a href='/type/InputEncryptedFile'>InputEncryptedFile</a>;
<a href='/constructor/inputEncryptedFileBigUploaded'>inputEncryptedFileBigUploaded</a>#2dc173c8 id:<a href='/type/long'>long</a> parts:<a href='/type/int'>int</a> key_fingerprint:<a href='/type/int'>int</a> = <a href='/type/InputEncryptedFile'>InputEncryptedFile</a>;
<a href='/constructor/inputSecureFileUploaded'>inputSecureFileUploaded</a>#3334b0f0 id:<a href='/type/long'>long</a> parts:<a href='/type/int'>int</a> md5_checksum:<a href='/type/string'>string</a> file_hash:<a href='/type/bytes'>bytes</a> secret:<a href='/type/bytes'>bytes</a> = <a href='/type/InputSecureFile'>InputSecureFile</a>;
<a href='/constructor/inputSecureFile'>inputSecureFile</a>#5367e5be id:<a href='/type/long'>long</a> access_hash:<a href='/type/long'>long</a> = <a href='/type/InputSecureFile'>InputSecureFile</a>;
<a href='/constructor/inputMediaUploadedPhoto'>inputMediaUploadedPhoto</a>#1e287d04 flags:<a href='/type/%23'>#</a> file:<a href='/type/InputFile'>InputFile</a> stickers:flags.0?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/InputDocument'>InputDocument</a>&gt; ttl_seconds:flags.1?<a href='/type/int'>int</a> = <a href='/type/InputMedia'>InputMedia</a>;
<a href='/constructor/inputMediaUploadedDocument'>inputMediaUploadedDocument</a>#5b38c6c1 flags:<a href='/type/%23'>#</a> nosound_video:flags.3?<a href='/constructor/true'>true</a> force_file:flags.4?<a href='/constructor/true'>true</a> file:<a href='/type/InputFile'>InputFile</a> thumb:flags.2?<a href='/type/InputFile'>InputFile</a> mime_type:<a href='/type/string'>string</a> attributes:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/DocumentAttribute'>DocumentAttribute</a>&gt; stickers:flags.0?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/InputDocument'>InputDocument</a>&gt; ttl_seconds:flags.1?<a href='/type/int'>int</a> = <a href='/type/InputMedia'>InputMedia</a>;
<a href='/constructor/inputChatUploadedPhoto'>inputChatUploadedPhoto</a>#c642724e flags:<a href='/type/%23'>#</a> file:flags.0?<a href='/type/InputFile'>InputFile</a> video:flags.1?<a href='/type/InputFile'>InputFile</a> video_start_ts:flags.2?<a href='/type/double'>double</a> = <a href='/type/InputChatPhoto'>InputChatPhoto</a>;
---functions---
<a href='/method/messages.sendMedia'>messages.sendMedia</a>#3491eba9 flags:<a href='/type/%23'>#</a> silent:flags.5?<a href='/constructor/true'>true</a> background:flags.6?<a href='/constructor/true'>true</a> clear_draft:flags.7?<a href='/constructor/true'>true</a> peer:<a href='/type/InputPeer'>InputPeer</a> reply_to_msg_id:flags.0?<a href='/type/int'>int</a> media:<a href='/type/InputMedia'>InputMedia</a> message:<a href='/type/string'>string</a> random_id:<a href='/type/long'>long</a> reply_markup:flags.2?<a href='/type/ReplyMarkup'>ReplyMarkup</a> entities:flags.3?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/MessageEntity'>MessageEntity</a>&gt; schedule_date:flags.10?<a href='/type/int'>int</a> = <a href='/type/Updates'>Updates</a>;
<a href='/method/messages.uploadMedia'>messages.uploadMedia</a>#519bc2b1 peer:<a href='/type/InputPeer'>InputPeer</a> media:<a href='/type/InputMedia'>InputMedia</a> = <a href='/type/MessageMedia'>MessageMedia</a>;
<a href='/method/messages.sendEncryptedFile'>messages.sendEncryptedFile</a>#5559481d flags:<a href='/type/%23'>#</a> silent:flags.0?<a href='/constructor/true'>true</a> peer:<a href='/type/InputEncryptedChat'>InputEncryptedChat</a> random_id:<a href='/type/long'>long</a> data:<a href='/type/bytes'>bytes</a> file:<a href='/type/InputEncryptedFile'>InputEncryptedFile</a> = <a href='/type/messages.SentEncryptedMessage'>messages.SentEncryptedMessage</a>;
<a href='/method/photos.uploadProfilePhoto'>photos.uploadProfilePhoto</a>#89f30f69 flags:<a href='/type/%23'>#</a> file:flags.0?<a href='/type/InputFile'>InputFile</a> video:flags.1?<a href='/type/InputFile'>InputFile</a> video_start_ts:flags.2?<a href='/type/double'>double</a> = <a href='/type/photos.Photo'>photos.Photo</a>;
<a href='/method/upload.saveFilePart'>upload.saveFilePart</a>#b304a621 file_id:<a href='/type/long'>long</a> file_part:<a href='/type/int'>int</a> bytes:<a href='/type/bytes'>bytes</a> = <a href='/type/Bool'>Bool</a>;
<a href='/method/upload.saveBigFilePart'>upload.saveBigFilePart</a>#de7b673d file_id:<a href='/type/long'>long</a> file_part:<a href='/type/int'>int</a> file_total_parts:<a href='/type/int'>int</a> bytes:<a href='/type/bytes'>bytes</a> = <a href='/type/Bool'>Bool</a>;</code></pre>
<p>Before transmitting the contents of the file itself, the file has to be assigned a unique 64-bit client identifier: <strong>file_id</strong>.</p>
<p>The files binary content is then split into parts. All parts must have the same size ( <strong>part_size</strong> ) and the following conditions must be met:</p>
<ul>
<li><code>part_size % 1024 = 0</code> (divisible by 1KB)</li>
<li><code>524288 % part_size = 0</code> (512KB must be evenly divisible by <strong>part_size</strong>)</li>
</ul>
<p>The last part does not have to satisfy these conditions, provided its size is less than <strong>part_size</strong>.</p>
<p>Each part should have a sequence number, <strong>file_part</strong>, with a value ranging from 0 to 2,999.</p>
<p>After the file has been partitioned you need to choose a method for saving it on the server. Use <a href="/method/upload.saveBigFilePart">upload.saveBigFilePart</a> in case the full size of the file is more than <strong>10 MB</strong> and <a href="/method/upload.saveFilePart">upload.saveFilePart</a> for smaller files.</p>
<p>Each call saves a portion of the data in a temporary location on the server to be used later. The storage life of each portion of data is between several minutes and several hours (depending on how busy the storage area is). After this time, the file part will become unavailable. To increase the time efficiency of a file save operation, we recommend using a call queue, so X pieces of the file are being saved at any given moment in time. Each successful operation to save a part invokes the method call to save the next part. The value of X can be tuned to achieve maximum performance.</p>
<p>When using one of the methods mentioned above to save file parts, one of the following <a href="/api/errors#400-bad-request">data input errors</a> may be returned:</p>
<ul>
<li>FILE_PARTS_INVALID - Invalid number of parts. The value is not between <code>1..3000</code></li>
<li>FILE_PART_INVALID: The file part number is invalid. The value is not between <code>0 and 2,999</code>.</li>
<li>FILE_PART_TOO_BIG: The size limit (512 KB) for the content of the file part has been exceeded</li>
<li>FILE_PART_EMPTY: The file part sent is empty</li>
<li>FILE_PART_SIZE_INVALID - 512KB cannot be evenly divided by <strong>part_size</strong></li>
<li>FILE_PART_SIZE_CHANGED - The part size is different from the size of one of the previous parts in the same file</li>
</ul>
<p>While the parts are being uploaded, an <a href="https://en.wikipedia.org/wiki/MD5">MD5 hash</a> of the file contents can also be computed to be used later as the <strong>md5_checksum</strong> parameter in the <a href="/constructor/inputFile">inputFile</a> constructor (since it is checked only by the server, for encrypted secret chat files it must be generated from the encrypted file).
After the entire file is successfully saved, the final method may be called and passed the generated <a href="/type/InputFile">inputFile</a> object. In case the <a href="/method/upload.saveBigFilePart">upload.saveBigFilePart</a> method is used, the <a href="/constructor/inputFileBig">inputFileBig</a> constructor must be passed, in other cases use <a href="/constructor/inputFile">inputFile</a>.</p>
<ul>
<li><a href="/method/messages.sendMedia">messages.sendMedia</a> - Sends a media file to a chat</li>
<li><a href="/method/messages.uploadMedia">messages.uploadMedia</a> - Uploads a media file to a chat, without sending it, returning only a <a href="/type/MessageMedia">MessageMedia</a> constructor that can be used to later send the file to multiple chats, without reuploading it every time. </li>
<li><a href="/method/photos.uploadProfilePhoto">photos.uploadProfilePhoto</a> - Used to set a <a href="#uploading-profile-or-chat-pictures">profile or chat picture or video</a></li>
</ul>
<p>The file save operation may return one of the following <a href="/api/errors#400-bad-request">data input errors</a>:</p>
<ul>
<li>FILE_PARTS_INVALID: The number of file parts is invalid The value is not between 1 and 3,000.</li>
<li>FILE_PART_Х_MISSING: Part X (where X is a number) of the file is missing from storage. Try repeating the method call to resave the part.</li>
<li>MD5_CHECKSUM_INVALID: The files checksum did not match the <strong>md5_checksum</strong> parameter</li>
</ul>
<h4><a class="anchor" href="#albums-grouped-media" id="albums-grouped-media" name="albums-grouped-media"><i class="anchor-icon"></i></a>Albums, grouped media</h4>
<pre><code><a href='/constructor/inputMediaUploadedPhoto'>inputMediaUploadedPhoto</a>#1e287d04 flags:<a href='/type/%23'>#</a> file:<a href='/type/InputFile'>InputFile</a> stickers:flags.0?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/InputDocument'>InputDocument</a>&gt; ttl_seconds:flags.1?<a href='/type/int'>int</a> = <a href='/type/InputMedia'>InputMedia</a>;
<a href='/constructor/inputMediaUploadedDocument'>inputMediaUploadedDocument</a>#5b38c6c1 flags:<a href='/type/%23'>#</a> nosound_video:flags.3?<a href='/constructor/true'>true</a> force_file:flags.4?<a href='/constructor/true'>true</a> file:<a href='/type/InputFile'>InputFile</a> thumb:flags.2?<a href='/type/InputFile'>InputFile</a> mime_type:<a href='/type/string'>string</a> attributes:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/DocumentAttribute'>DocumentAttribute</a>&gt; stickers:flags.0?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/InputDocument'>InputDocument</a>&gt; ttl_seconds:flags.1?<a href='/type/int'>int</a> = <a href='/type/InputMedia'>InputMedia</a>;
<a href='/constructor/inputSingleMedia'>inputSingleMedia</a>#1cc6e91f flags:<a href='/type/%23'>#</a> media:<a href='/type/InputMedia'>InputMedia</a> random_id:<a href='/type/long'>long</a> message:<a href='/type/string'>string</a> entities:flags.0?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/MessageEntity'>MessageEntity</a>&gt; = <a href='/type/InputSingleMedia'>InputSingleMedia</a>;
---functions---
<a href='/method/messages.sendMultiMedia'>messages.sendMultiMedia</a>#cc0110cb flags:<a href='/type/%23'>#</a> silent:flags.5?<a href='/constructor/true'>true</a> background:flags.6?<a href='/constructor/true'>true</a> clear_draft:flags.7?<a href='/constructor/true'>true</a> peer:<a href='/type/InputPeer'>InputPeer</a> reply_to_msg_id:flags.0?<a href='/type/int'>int</a> multi_media:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/InputSingleMedia'>InputSingleMedia</a>&gt; schedule_date:flags.10?<a href='/type/int'>int</a> = <a href='/type/Updates'>Updates</a>;</code></pre>
<p>Telegram allows grouping photos into <a href="https://telegram.org/blog/albums-saved-messages">albums</a> and generic files (audio, docuemnts) into media groups. </p>
<p>To do this, <a href="/method/messages.sendMultiMedia">messages.sendMultiMedia</a> is used, wrapping each <a href="/type/InputMedia">InputMedia</a> constructor (uploaded or pre-existing, maximum 10 per media group) into an <a href="/constructor/inputSingleMedia">inputSingleMedia</a> constructor, optionally providing a custom per-file caption in <code>message</code>. </p>
<p>For photo albums, clients should display an album caption only if exactly one photo in the group has a caption, otherwise no album caption should be displayed, and only when viewing in detail a specific photo of the group the caption should be shown.<br>
Other grouped media can display a caption under each file. </p>
<h4><a class="anchor" href="#re-using-pre-uploaded-files" id="re-using-pre-uploaded-files" name="re-using-pre-uploaded-files"><i class="anchor-icon"></i></a>Re-using pre-uploaded files</h4>
<pre><code><a href='/constructor/document'>document</a>#1e87342b flags:<a href='/type/%23'>#</a> id:<a href='/type/long'>long</a> access_hash:<a href='/type/long'>long</a> file_reference:<a href='/type/bytes'>bytes</a> date:<a href='/type/int'>int</a> mime_type:<a href='/type/string'>string</a> size:<a href='/type/int'>int</a> thumbs:flags.0?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/PhotoSize'>PhotoSize</a>&gt; video_thumbs:flags.1?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/VideoSize'>VideoSize</a>&gt; dc_id:<a href='/type/int'>int</a> attributes:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/DocumentAttribute'>DocumentAttribute</a>&gt; = <a href='/type/Document'>Document</a>;
---functions---
<a href='/method/messages.getDocumentByHash'>messages.getDocumentByHash</a>#338e2464 sha256:<a href='/type/bytes'>bytes</a> size:<a href='/type/int'>int</a> mime_type:<a href='/type/string'>string</a> = <a href='/type/Document'>Document</a>;</code></pre>
<p>For some types of documents like GIFs, <a href="/method/messages.getDocumentByHash">messages.getDocumentByHash</a> can be used to search for the document on Telegram servers.
The SHA256 hash of the file is computed, and it is passed along with the file's mime type and size to the method: if the file type is correct and the file is found, a <a href="/constructor/document">document</a> is returned.</p>
<h3><a class="anchor" href="#uploading-profile-or-chat-pictures" id="uploading-profile-or-chat-pictures" name="uploading-profile-or-chat-pictures"><i class="anchor-icon"></i></a>Uploading profile or chat pictures</h3>
<pre><code><a href='/constructor/photo'>photo</a>#fb197a65 flags:<a href='/type/%23'>#</a> has_stickers:flags.0?<a href='/constructor/true'>true</a> id:<a href='/type/long'>long</a> access_hash:<a href='/type/long'>long</a> file_reference:<a href='/type/bytes'>bytes</a> date:<a href='/type/int'>int</a> sizes:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/PhotoSize'>PhotoSize</a>&gt; video_sizes:flags.1?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/VideoSize'>VideoSize</a>&gt; dc_id:<a href='/type/int'>int</a> = <a href='/type/Photo'>Photo</a>;
<a href='/constructor/photos.photo'>photos.photo</a>#20212ca8 photo:<a href='/type/Photo'>Photo</a> users:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/User'>User</a>&gt; = <a href='/type/photos.Photo'>photos.Photo</a>;
<a href='/constructor/inputPhoto'>inputPhoto</a>#3bb3b94a id:<a href='/type/long'>long</a> access_hash:<a href='/type/long'>long</a> file_reference:<a href='/type/bytes'>bytes</a> = <a href='/type/InputPhoto'>InputPhoto</a>;
<a href='/constructor/inputFile'>inputFile</a>#f52ff27f id:<a href='/type/long'>long</a> parts:<a href='/type/int'>int</a> name:<a href='/type/string'>string</a> md5_checksum:<a href='/type/string'>string</a> = <a href='/type/InputFile'>InputFile</a>;
<a href='/constructor/inputChatUploadedPhoto'>inputChatUploadedPhoto</a>#c642724e flags:<a href='/type/%23'>#</a> file:flags.0?<a href='/type/InputFile'>InputFile</a> video:flags.1?<a href='/type/InputFile'>InputFile</a> video_start_ts:flags.2?<a href='/type/double'>double</a> = <a href='/type/InputChatPhoto'>InputChatPhoto</a>;
<a href='/constructor/inputChatPhoto'>inputChatPhoto</a>#8953ad37 id:<a href='/type/InputPhoto'>InputPhoto</a> = <a href='/type/InputChatPhoto'>InputChatPhoto</a>;
---functions---
<a href='/method/photos.updateProfilePhoto'>photos.updateProfilePhoto</a>#72d4742c id:<a href='/type/InputPhoto'>InputPhoto</a> = <a href='/type/photos.Photo'>photos.Photo</a>;
<a href='/method/photos.uploadProfilePhoto'>photos.uploadProfilePhoto</a>#89f30f69 flags:<a href='/type/%23'>#</a> file:flags.0?<a href='/type/InputFile'>InputFile</a> video:flags.1?<a href='/type/InputFile'>InputFile</a> video_start_ts:flags.2?<a href='/type/double'>double</a> = <a href='/type/photos.Photo'>photos.Photo</a>;
<a href='/method/messages.editChatPhoto'>messages.editChatPhoto</a>#ca4c79d8 chat_id:<a href='/type/int'>int</a> photo:<a href='/type/InputChatPhoto'>InputChatPhoto</a> = <a href='/type/Updates'>Updates</a>;
<a href='/method/channels.editPhoto'>channels.editPhoto</a>#f12e57c9 channel:<a href='/type/InputChannel'>InputChannel</a> photo:<a href='/type/InputChatPhoto'>InputChatPhoto</a> = <a href='/type/Updates'>Updates</a>;</code></pre>
<p>User profile pictures can be uploaded using the <a href="/method/photos.updateProfilePhoto">photos.uploadProfilePhoto</a> method: the actual profile picture has to be <a href="#uploading-files">uploaded as for normal files</a>.<br>
<a href="/method/photos.updateProfilePhoto">photos.uploadProfilePhoto</a> can also be used to reupload previously uploaded profile pictures. </p>
<h4><a class="anchor" href="#animated-profile-pictures" id="animated-profile-pictures" name="animated-profile-pictures"><i class="anchor-icon"></i></a>Animated profile pictures</h4>
<p>Animated profile pictures are also supported, by populating the <code>video</code> constructor: square MPEG4 videos up to <code>1080x1080</code> are supported, <code>800x800</code> is the recommended resolution.<br>
The <code>video_start_ts</code> is a floating point UNIX timestamp in seconds, indicating the frame of the video that should be used as static preview. </p>
<p><a href="/api/channel">Chat, channel and supergroup</a> profile photos and videos can be uploaded using <a href="/method/messages.editChatPhoto">messages.editChatPhoto</a> (<a href="/api/channel">legacy groups</a>) or <a href="/method/channels.editPhoto">channels.editPhoto</a> (<a href="/api/channel">channels, supergroups</a>).<br>
Use the <a href="/constructor/inputChatPhoto">inputChatPhoto</a> to reuse previously uploaded profile pictures. </p>
<h3><a class="anchor" href="#downloading-files" id="downloading-files" name="downloading-files"><i class="anchor-icon"></i></a>Downloading files</h3>
<p>There are methods available to download files which have been successfully uploaded. The schema of the types and methods used is presented below:</p>
<pre><code><a href='/constructor/upload.file'>upload.file</a>#96a18d5 type:<a href='/type/storage.FileType'>storage.FileType</a> mtime:<a href='/type/int'>int</a> bytes:<a href='/type/bytes'>bytes</a> = <a href='/type/upload.File'>upload.File</a>;
<a href='/constructor/upload.fileCdnRedirect'>upload.fileCdnRedirect</a>#f18cda44 dc_id:<a href='/type/int'>int</a> file_token:<a href='/type/bytes'>bytes</a> encryption_key:<a href='/type/bytes'>bytes</a> encryption_iv:<a href='/type/bytes'>bytes</a> file_hashes:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/FileHash'>FileHash</a>&gt; = <a href='/type/upload.File'>upload.File</a>;
<a href='/constructor/storage.fileUnknown'>storage.fileUnknown</a>#aa963b05 = <a href='/type/storage.FileType'>storage.FileType</a>;
<a href='/constructor/storage.fileJpeg'>storage.fileJpeg</a>#7efe0e = <a href='/type/storage.FileType'>storage.FileType</a>;
<a href='/constructor/storage.fileGif'>storage.fileGif</a>#cae1aadf = <a href='/type/storage.FileType'>storage.FileType</a>;
<a href='/constructor/storage.filePng'>storage.filePng</a>#a4f63c0 = <a href='/type/storage.FileType'>storage.FileType</a>;
<a href='/constructor/storage.fileMp3'>storage.fileMp3</a>#528a0677 = <a href='/type/storage.FileType'>storage.FileType</a>;
<a href='/constructor/storage.fileMov'>storage.fileMov</a>#4b09ebbc = <a href='/type/storage.FileType'>storage.FileType</a>;
<a href='/constructor/storage.filePartial'>storage.filePartial</a>#40bc6f52 = <a href='/type/storage.FileType'>storage.FileType</a>;
<a href='/constructor/storage.fileMp4'>storage.fileMp4</a>#b3cea0e4 = <a href='/type/storage.FileType'>storage.FileType</a>;
<a href='/constructor/storage.fileWebp'>storage.fileWebp</a>#1081464c = <a href='/type/storage.FileType'>storage.FileType</a>;
---functions---
<a href='/method/upload.getFile'>upload.getFile</a>#b15a9afc flags:<a href='/type/%23'>#</a> precise:flags.0?<a href='/constructor/true'>true</a> cdn_supported:flags.1?<a href='/constructor/true'>true</a> location:<a href='/type/InputFileLocation'>InputFileLocation</a> offset:<a href='/type/int'>int</a> limit:<a href='/type/int'>int</a> = <a href='/type/upload.File'>upload.File</a>;</code></pre>
<p>Any file can be downloaded by calling <a href="/method/upload.getFile">upload.getFile</a>.
The data for the input parameter of the <a href="/type/InputFileLocation">InputFileLocation</a> type is generated as follows:</p>
<pre><code><a href='/constructor/inputFileLocation'>inputFileLocation</a>#dfdaabe1 volume_id:<a href='/type/long'>long</a> local_id:<a href='/type/int'>int</a> secret:<a href='/type/long'>long</a> file_reference:<a href='/type/bytes'>bytes</a> = <a href='/type/InputFileLocation'>InputFileLocation</a>;
<a href='/constructor/inputEncryptedFileLocation'>inputEncryptedFileLocation</a>#f5235d55 id:<a href='/type/long'>long</a> access_hash:<a href='/type/long'>long</a> = <a href='/type/InputFileLocation'>InputFileLocation</a>;
<a href='/constructor/inputDocumentFileLocation'>inputDocumentFileLocation</a>#bad07584 id:<a href='/type/long'>long</a> access_hash:<a href='/type/long'>long</a> file_reference:<a href='/type/bytes'>bytes</a> thumb_size:<a href='/type/string'>string</a> = <a href='/type/InputFileLocation'>InputFileLocation</a>;
<a href='/constructor/inputSecureFileLocation'>inputSecureFileLocation</a>#cbc7ee28 id:<a href='/type/long'>long</a> access_hash:<a href='/type/long'>long</a> = <a href='/type/InputFileLocation'>InputFileLocation</a>;
<a href='/constructor/inputTakeoutFileLocation'>inputTakeoutFileLocation</a>#29be5899 = <a href='/type/InputFileLocation'>InputFileLocation</a>;
<a href='/constructor/inputPhotoFileLocation'>inputPhotoFileLocation</a>#40181ffe id:<a href='/type/long'>long</a> access_hash:<a href='/type/long'>long</a> file_reference:<a href='/type/bytes'>bytes</a> thumb_size:<a href='/type/string'>string</a> = <a href='/type/InputFileLocation'>InputFileLocation</a>;
<a href='/constructor/inputPhotoLegacyFileLocation'>inputPhotoLegacyFileLocation</a>#d83466f3 id:<a href='/type/long'>long</a> access_hash:<a href='/type/long'>long</a> file_reference:<a href='/type/bytes'>bytes</a> volume_id:<a href='/type/long'>long</a> local_id:<a href='/type/int'>int</a> secret:<a href='/type/long'>long</a> = <a href='/type/InputFileLocation'>InputFileLocation</a>;
<a href='/constructor/inputPeerPhotoFileLocation'>inputPeerPhotoFileLocation</a>#27d69997 flags:<a href='/type/%23'>#</a> big:flags.0?<a href='/constructor/true'>true</a> peer:<a href='/type/InputPeer'>InputPeer</a> volume_id:<a href='/type/long'>long</a> local_id:<a href='/type/int'>int</a> = <a href='/type/InputFileLocation'>InputFileLocation</a>;
<a href='/constructor/inputStickerSetThumb'>inputStickerSetThumb</a>#dbaeae9 stickerset:<a href='/type/InputStickerSet'>InputStickerSet</a> volume_id:<a href='/type/long'>long</a> local_id:<a href='/type/int'>int</a> = <a href='/type/InputFileLocation'>InputFileLocation</a>;
<a href='/constructor/inputStickerSetEmpty'>inputStickerSetEmpty</a>#ffb62b95 = <a href='/type/InputStickerSet'>InputStickerSet</a>;
<a href='/constructor/inputStickerSetID'>inputStickerSetID</a>#9de7a269 id:<a href='/type/long'>long</a> access_hash:<a href='/type/long'>long</a> = <a href='/type/InputStickerSet'>InputStickerSet</a>;
<a href='/constructor/inputStickerSetShortName'>inputStickerSetShortName</a>#861cc8a0 short_name:<a href='/type/string'>string</a> = <a href='/type/InputStickerSet'>InputStickerSet</a>;
<a href='/constructor/inputPeerSelf'>inputPeerSelf</a>#7da07ec9 = <a href='/type/InputPeer'>InputPeer</a>;
<a href='/constructor/inputPeerChat'>inputPeerChat</a>#179be863 chat_id:<a href='/type/int'>int</a> = <a href='/type/InputPeer'>InputPeer</a>;
<a href='/constructor/inputPeerUser'>inputPeerUser</a>#7b8e7de6 user_id:<a href='/type/int'>int</a> access_hash:<a href='/type/long'>long</a> = <a href='/type/InputPeer'>InputPeer</a>;
<a href='/constructor/inputPeerChannel'>inputPeerChannel</a>#20adaef8 channel_id:<a href='/type/int'>int</a> access_hash:<a href='/type/long'>long</a> = <a href='/type/InputPeer'>InputPeer</a>;
<a href='/constructor/photo'>photo</a>#fb197a65 flags:<a href='/type/%23'>#</a> has_stickers:flags.0?<a href='/constructor/true'>true</a> id:<a href='/type/long'>long</a> access_hash:<a href='/type/long'>long</a> file_reference:<a href='/type/bytes'>bytes</a> date:<a href='/type/int'>int</a> sizes:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/PhotoSize'>PhotoSize</a>&gt; video_sizes:flags.1?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/VideoSize'>VideoSize</a>&gt; dc_id:<a href='/type/int'>int</a> = <a href='/type/Photo'>Photo</a>;
<a href='/constructor/document'>document</a>#1e87342b flags:<a href='/type/%23'>#</a> id:<a href='/type/long'>long</a> access_hash:<a href='/type/long'>long</a> file_reference:<a href='/type/bytes'>bytes</a> date:<a href='/type/int'>int</a> mime_type:<a href='/type/string'>string</a> size:<a href='/type/int'>int</a> thumbs:flags.0?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/PhotoSize'>PhotoSize</a>&gt; video_thumbs:flags.1?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/VideoSize'>VideoSize</a>&gt; dc_id:<a href='/type/int'>int</a> attributes:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/DocumentAttribute'>DocumentAttribute</a>&gt; = <a href='/type/Document'>Document</a>;
<a href='/constructor/photoSize'>photoSize</a>#77bfb61b type:<a href='/type/string'>string</a> location:<a href='/type/FileLocation'>FileLocation</a> w:<a href='/type/int'>int</a> h:<a href='/type/int'>int</a> size:<a href='/type/int'>int</a> = <a href='/type/PhotoSize'>PhotoSize</a>;
<a href='/constructor/photoCachedSize'>photoCachedSize</a>#e9a734fa type:<a href='/type/string'>string</a> location:<a href='/type/FileLocation'>FileLocation</a> w:<a href='/type/int'>int</a> h:<a href='/type/int'>int</a> bytes:<a href='/type/bytes'>bytes</a> = <a href='/type/PhotoSize'>PhotoSize</a>;</code></pre>
<ul>
<li>
<p>For photos, <a href="/constructor/inputPhotoFileLocation">inputPhotoFileLocation</a> is used:</p>
<ul>
<li><code>id</code>, <code>file_reference</code> and <code>access_hash</code> taken from the <a href="/constructor/photo">photo</a> constructor</li>
<li><code>thumb_size</code> taken from the <code>type</code> field of the desired <a href="/type/PhotoSize">PhotoSize</a> of the <a href="/constructor/photo">photo</a></li>
</ul>
</li>
<li>
<p>For profile pictures of users, channels, supergroups and groups, since in most occasions they are encountered as simple <a href="/constructor/fileLocationToBeDeprecated">fileLocationToBeDeprecated</a> constructors without an associated <a href="/constructor/photo">photo</a>, <a href="/constructor/inputPeerPhotoFileLocation">inputPeerPhotoFileLocation</a> has to be used:</p>
<ul>
<li><code>peer</code> is the identifier of the peer whose photo we want to download</li>
<li><code>volume_id</code> and <code>local_id</code> are extracted from the <a href="/constructor/fileLocationToBeDeprecated">fileLocationToBeDeprecated</a> of the desired quality (the logic for selecting the quality of profile pictures will be changed soon)</li>
</ul>
</li>
<li>
<p>For documents, <a href="/constructor/inputDocumentFileLocation">inputDocumentFileLocation</a> is used:</p>
<ul>
<li><code>id</code>, <code>file_reference</code> and <code>access_hash</code> taken from the <a href="/constructor/document">document</a> constructor</li>
<li>If downloading the thumbnail of a document, <code>thumb_size</code> should be taken from the <code>type</code> field of the desired <a href="/type/PhotoSize">PhotoSize</a> of the <a href="/constructor/photo">photo</a>; otherwise, provide an empty string.</li>
</ul>
</li>
<li>
<p>For encrypted secret chat and telegram passport documents, respectively <a href="/constructor/inputEncryptedFileLocation">inputEncryptedFileLocation</a> and <a href="/constructor/inputSecureFileLocation">inputSecureFileLocation</a> have to be used, with parameters extracted from <a href="/constructor/encryptedFile">encryptedFile</a> and <a href="/constructor/secureFile">secureFile</a> (<a href="/passport">passport docs</a>).</p>
</li>
<li>
<p>For previews of sticker sets, <a href="/constructor/inputStickerSetThumb">inputStickerSetThumb</a> is used (note: to download stickers and previews of stickers use the document method described above):</p>
<ul>
<li><code>stickerset</code> is set to the <a href="/type/InputStickerSet">InputStickerSet</a> constructor generated from the <a href="/type/StickerSet">StickerSet</a></li>
<li><code>volume_id</code> and <code>local_id</code> are extracted from the <a href="/constructor/fileLocationToBeDeprecated">fileLocationToBeDeprecated</a> from the <code>thumb</code> <a href="/type/PhotoSize">PhotoSize</a> of the <a href="/type/StickerSet">StickerSet</a> (the logic for downloading stickerset previews will be changed soon)</li>
</ul>
</li>
<li>
<p>For old <strong>deprecated</strong> photos, if the client has cached some old fileLocations with the <strong>deprecated</strong> <code>secret</code> identifier, <a href="/constructor/inputPhotoLegacyFileLocation">inputFileLocation</a> is used (this is mainly used for backwards compatiblity with bot API file IDs, all user clients must use the modern <a href="/constructor/inputPhotoFileLocation">inputPhotoFileLocation</a> file IDs): </p>
<ul>
<li>All fields are taken from the previously cached fileLocation except for <code>id</code>, <code>file_reference</code> and <code>access_hash</code> taken from the <a href="/constructor/photo">photo</a> constructor</li>
</ul>
</li>
</ul>
<p>The size of each file in bytes is available, which makes it possible to download the file in parts using the parameters <strong>offset</strong> and <strong>limit</strong>, similar to the way files are uploaded.</p>
<p>If <strong>precise</strong> flag is not specified, then </p>
<ul>
<li>The parameter <strong>offset</strong> must be divisible by 4 KB.</li>
<li>The parameter <strong>limit</strong> must be divisible by 4 KB.</li>
<li>1048576 (1 MB) must be divisible by <strong>limit</strong>.</li>
</ul>
<p>If <strong>precise</strong> is specified, then</p>
<ul>
<li>The parameter <strong>offset</strong> must be divisible by 1 KB.</li>
<li>The parameter <strong>limit</strong> must be divisible by 1 KB.</li>
<li><strong>limit</strong> must not exceed 1048576 (1 MB).</li>
</ul>
<p>In any case the requested part should be within one 1 MB chunk from the beginning of the file, i. e.</p>
<ul>
<li><strong>offset</strong> / (1024 * 1024) == (<strong>offset</strong> + <strong>limit</strong> - 1) / (1024 * 1024).</li>
</ul>
<p>The file download operation may return a <code>FILE_REFERENCE_EXPIRED</code> error (or another error starting with <code>FILE_REFERENCE_</code>): in this case, the <code>file_reference</code> field of the input location must be <a href="/api/file_reference">refreshed</a>.
The file download operation may return an <a href="/constructor/upload.fileCdnRedirect">upload.fileCdnRedirect</a> constructor: in this case, <a href="/cdn">these</a> instructions must be followed for downloading CDN files.
The file download operation may also return one of the following <a href="/api/errors#400-bad-request">data input errors</a>:</p>
<ul>
<li>FILE_ID_INVALID: The file address is invalid</li>
<li>OFFSET_INVALID: The <strong>offset</strong> value is invalid</li>
<li>LIMIT_INVALID: The <strong>limit</strong> value is invalid</li>
<li>FILE_MIGRATE_X: The file is in the datacenter No. X</li>
</ul>
<h4><a class="anchor" href="#verifying-downloaded-chunks" id="verifying-downloaded-chunks" name="verifying-downloaded-chunks"><i class="anchor-icon"></i></a>Verifying downloaded chunks</h4>
<pre><code><a href='/constructor/fileHash'>fileHash</a>#6242c773 offset:<a href='/type/int'>int</a> limit:<a href='/type/int'>int</a> hash:<a href='/type/bytes'>bytes</a> = <a href='/type/FileHash'>FileHash</a>;
---functions---
<a href='/method/upload.getFileHashes'>upload.getFileHashes</a>#c7025931 location:<a href='/type/InputFileLocation'>InputFileLocation</a> offset:<a href='/type/int'>int</a> = <a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/FileHash'>FileHash</a>&gt;;</code></pre>
<p>In order to confirm the integrity of the downloaded file, clients are recommended to verify hashes for each downloaded part, as for <a href="/cdn">CDN DCs</a>.
<a href="/method/upload.getFileHashes">upload.getFileHashes</a> contain <a href="/type/FileHash">FileHash</a> constructors. Each of these constructors contains the SHA-256 hash of a part of the file that starts with <code>offset</code> and takes <code>limit</code> bytes.</p>
<p>Before saving each portion of the data received from the DC into the file, the client can confirm that its hash matches the hash that was received from the master DC. If missing a hash for any file part, client developers must use the <a href="/method/upload.getFileHashes">upload.getFileHashes</a> method to obtain the missing hash.</p>
<h4><a class="anchor" href="#handling-audio-video-and-vector-previews" id="handling-audio-video-and-vector-previews" name="handling-audio-video-and-vector-previews"><i class="anchor-icon"></i></a>Handling audio, video and vector previews</h4>
<p>Scheme:</p>
<pre><code><a href='/constructor/photoSizeEmpty'>photoSizeEmpty</a>#e17e23c type:<a href='/type/string'>string</a> = <a href='/type/PhotoSize'>PhotoSize</a>;
<a href='/constructor/photoSize'>photoSize</a>#77bfb61b type:<a href='/type/string'>string</a> location:<a href='/type/FileLocation'>FileLocation</a> w:<a href='/type/int'>int</a> h:<a href='/type/int'>int</a> size:<a href='/type/int'>int</a> = <a href='/type/PhotoSize'>PhotoSize</a>;
<a href='/constructor/photoCachedSize'>photoCachedSize</a>#e9a734fa type:<a href='/type/string'>string</a> location:<a href='/type/FileLocation'>FileLocation</a> w:<a href='/type/int'>int</a> h:<a href='/type/int'>int</a> bytes:<a href='/type/bytes'>bytes</a> = <a href='/type/PhotoSize'>PhotoSize</a>;
<a href='/constructor/photoStrippedSize'>photoStrippedSize</a>#e0b0bc2e type:<a href='/type/string'>string</a> bytes:<a href='/type/bytes'>bytes</a> = <a href='/type/PhotoSize'>PhotoSize</a>;
<a href='/constructor/photoSizeProgressive'>photoSizeProgressive</a>#5aa86a51 type:<a href='/type/string'>string</a> location:<a href='/type/FileLocation'>FileLocation</a> w:<a href='/type/int'>int</a> h:<a href='/type/int'>int</a> sizes:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/int'>int</a>&gt; = <a href='/type/PhotoSize'>PhotoSize</a>;
<a href='/constructor/photoPathSize'>photoPathSize</a>#d8214d41 type:<a href='/type/string'>string</a> bytes:<a href='/type/bytes'>bytes</a> = <a href='/type/PhotoSize'>PhotoSize</a>;
<a href='/constructor/videoSize'>videoSize</a>#e831c556 flags:<a href='/type/%23'>#</a> type:<a href='/type/string'>string</a> location:<a href='/type/FileLocation'>FileLocation</a> w:<a href='/type/int'>int</a> h:<a href='/type/int'>int</a> size:<a href='/type/int'>int</a> video_start_ts:flags.0?<a href='/type/double'>double</a> = <a href='/type/VideoSize'>VideoSize</a>;
<a href='/constructor/document'>document</a>#1e87342b flags:<a href='/type/%23'>#</a> id:<a href='/type/long'>long</a> access_hash:<a href='/type/long'>long</a> file_reference:<a href='/type/bytes'>bytes</a> date:<a href='/type/int'>int</a> mime_type:<a href='/type/string'>string</a> size:<a href='/type/int'>int</a> thumbs:flags.0?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/PhotoSize'>PhotoSize</a>&gt; video_thumbs:flags.1?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/VideoSize'>VideoSize</a>&gt; dc_id:<a href='/type/int'>int</a> attributes:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/DocumentAttribute'>DocumentAttribute</a>&gt; = <a href='/type/Document'>Document</a>;
<a href='/constructor/photo'>photo</a>#fb197a65 flags:<a href='/type/%23'>#</a> has_stickers:flags.0?<a href='/constructor/true'>true</a> id:<a href='/type/long'>long</a> access_hash:<a href='/type/long'>long</a> file_reference:<a href='/type/bytes'>bytes</a> date:<a href='/type/int'>int</a> sizes:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/PhotoSize'>PhotoSize</a>&gt; video_sizes:flags.1?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/VideoSize'>VideoSize</a>&gt; dc_id:<a href='/type/int'>int</a> = <a href='/type/Photo'>Photo</a>;
<a href='/constructor/photo'>photo</a>#fb197a65 flags:<a href='/type/%23'>#</a> has_stickers:flags.0?<a href='/constructor/true'>true</a> id:<a href='/type/long'>long</a> access_hash:<a href='/type/long'>long</a> file_reference:<a href='/type/bytes'>bytes</a> date:<a href='/type/int'>int</a> sizes:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/PhotoSize'>PhotoSize</a>&gt; video_sizes:flags.1?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/VideoSize'>VideoSize</a>&gt; dc_id:<a href='/type/int'>int</a> = <a href='/type/Photo'>Photo</a>;</code></pre>
<p>Telegram attaches a vector of thumbnails with reduced resolution to all uploaded media.<br>
The server also generates a trimmed and scaled down video preview for videos, GIFs and animated profile pictures. </p>
<h4><a class="anchor" href="#image-thumbnail-types" id="image-thumbnail-types" name="image-thumbnail-types"><i class="anchor-icon"></i></a>Image thumbnail types</h4>
<p>Each photo preview has a specific <code>type</code>, indicating the resolution and image transform that was applied server-side. </p>
<table class="table">
<thead>
<tr>
<th>Type</th>
<th>Image filter</th>
<th>Size</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>s</code></td>
<td>box</td>
<td>100x100</td>
</tr>
<tr>
<td><code>m</code></td>
<td>box</td>
<td>320x320</td>
</tr>
<tr>
<td><code>x</code></td>
<td>box</td>
<td>800x800</td>
</tr>
<tr>
<td><code>y</code></td>
<td>box</td>
<td>1280x1280</td>
</tr>
<tr>
<td><code>w</code></td>
<td>box</td>
<td>2560x2560</td>
</tr>
<tr>
<td><code>a</code></td>
<td>crop</td>
<td>160x160</td>
</tr>
<tr>
<td><code>b</code></td>
<td>crop</td>
<td>320x320</td>
</tr>
<tr>
<td><code>c</code></td>
<td>crop</td>
<td>640x640</td>
</tr>
<tr>
<td><code>d</code></td>
<td>crop</td>
<td>1280x1280</td>
</tr>
</tbody>
</table>
<p>Special types:</p>
<table class="table">
<thead>
<tr>
<th>Type</th>
<th>Image filter</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>i</code></td>
<td>strip</td>
</tr>
<tr>
<td><code>j</code></td>
<td>outline</td>
</tr>
</tbody>
</table>
<h4><a class="anchor" href="#stripped-thumbnails" id="stripped-thumbnails" name="stripped-thumbnails"><i class="anchor-icon"></i></a>Stripped thumbnails</h4>
<pre><code><a href='/constructor/photoStrippedSize'>photoStrippedSize</a>#e0b0bc2e type:<a href='/type/string'>string</a> bytes:<a href='/type/bytes'>bytes</a> = <a href='/type/PhotoSize'>PhotoSize</a>;</code></pre>
<p>A <a href="/constructor/photoStrippedSize">photoStrippedSize</a> (with type <code>i</code>) is an extremely low-res thumbnail, embedded directly inside media location objects.<br>
It should be shown to the user in chat message previews, or while still downloading the most appropriately sized <a href="/constructor/photoSize">photoSize</a> through the media DCs as <a href="#downloading-files">described above</a>. </p>
<p>The stripped <code>bytes</code> payload should be inflated to a JPG payload as seen <a href="https://github.com/telegramdesktop/tdesktop/blob/1757dd856b84d23f83d4e562c94dde825f6eb40c/Telegram/SourceFiles/ui/image/image.cpp#L43">here »</a>.</p>
<h4><a class="anchor" href="#vector-thumbnails" id="vector-thumbnails" name="vector-thumbnails"><i class="anchor-icon"></i></a>Vector thumbnails</h4>
<pre><code><a href='/constructor/photoPathSize'>photoPathSize</a>#d8214d41 type:<a href='/type/string'>string</a> bytes:<a href='/type/bytes'>bytes</a> = <a href='/type/PhotoSize'>PhotoSize</a>;</code></pre>
<p>Messages with <a href="/animated_stickers">animated stickers</a> can have a compressed svg (&lt; 300 bytes) to show the outline of the sticker before fetching the actual lottie animation.
Animated sticker outlines will have a <code>j</code> type <a href="/constructor/photoPathSize">photoPathSize</a> thumbnail. </p>
<p>This specific vector thumbnail consists in an <a href="https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths">SVG path</a>, specially encoded to save space.<br>
This path will be the outline of the animated sticker, and should be shown to the user while downloading the actual sticker. </p>
<p>As for stripped sizes, the payload should be inflated using the following algorithm:</p>
<pre><code>encoded := photoPathSize.bytes
lookup := "AACAAAAHAAALMAAAQASTAVAAAZaacaaaahaaalmaaaqastava.az0123456789-,"
path := "M"
len := strlen(encoded)
for (i = 0; i &lt; len; i++) {
num := ord(encoded[i])
if (num &gt;= 128 + 64) {
path += lookup[num - 128 - 64]
} else {
if (num &gt;= 128) {
path += ','
} else if (num &gt;= 64) {
path += '-'
}
path += itoa(num &amp; 63)
}
}
path += "z"</code></pre>
<p><code>path</code> will contain the actual SVG path that can be directly inserted in the <code>d</code> attribute of an <a href="https://developer.mozilla.org/en-US/docs/Web/SVG/Element/path">svg &lt;path&gt; element</a>: </p>
<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
viewBox="0 0 512 512" xml:space="preserve"&gt;
&lt;path d="{$path}"/&gt;
&lt;/svg&gt;</code></pre>
<h4><a class="anchor" href="#video-types" id="video-types" name="video-types"><i class="anchor-icon"></i></a>Video types</h4>
<pre><code><a href='/constructor/videoSize'>videoSize</a>#e831c556 flags:<a href='/type/%23'>#</a> type:<a href='/type/string'>string</a> location:<a href='/type/FileLocation'>FileLocation</a> w:<a href='/type/int'>int</a> h:<a href='/type/int'>int</a> size:<a href='/type/int'>int</a> video_start_ts:flags.0?<a href='/type/double'>double</a> = <a href='/type/VideoSize'>VideoSize</a>;</code></pre>
<p>A <a href="/constructor/videoSize">videoSize</a> constructor is typically used for [animated profile pictures]() and video previews.</p>
<table class="table">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
<th>Format</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>u</code></td>
<td>Animated profile picture</td>
<td>MPEG4</td>
</tr>
<tr>
<td><code>v</code></td>
<td>Video preview</td>
<td>MPEG4</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#downloading-webfiles" id="downloading-webfiles" name="downloading-webfiles"><i class="anchor-icon"></i></a>Downloading webfiles</h3>
<p>Remote HTTP files sent by inline bots <a href="/type/BotInlineResult">in response to inline queries</a> and in other places are represented by <a href="/type/WebDocument">WebDocument</a> constructors.
When forwarding such remote HTTP files, they should be sent using <a href="/type/InputMedia">external InputMedia constructors</a>.
Remote HTTP files can only be downloaded directly by the client if contained in a <a href="/constructor/webDocumentNoProxy">webDocumentNoProxy</a> constructor: in this case, the file is deemed safe to download (this is the case for HTTPS files from certain trusted domains).</p>
<p>However, if the remote file is contained in a <a href="/constructor/webDocument">webDocument</a>, to avoid leaking sensitive information the file must be downloaded through telegram's servers.
This can be done in a manner similar to <a href="#downloading-files">normal files</a>, with the difference that <a href="/method/upload.getWebFile">upload.getWebFile</a> must be used, instead.</p>
<pre><code><a href='/constructor/upload.webFile'>upload.webFile</a>#21e753bc size:<a href='/type/int'>int</a> mime_type:<a href='/type/string'>string</a> file_type:<a href='/type/storage.FileType'>storage.FileType</a> mtime:<a href='/type/int'>int</a> bytes:<a href='/type/bytes'>bytes</a> = <a href='/type/upload.WebFile'>upload.WebFile</a>;
<a href='/constructor/storage.fileUnknown'>storage.fileUnknown</a>#aa963b05 = <a href='/type/storage.FileType'>storage.FileType</a>;
<a href='/constructor/storage.fileJpeg'>storage.fileJpeg</a>#7efe0e = <a href='/type/storage.FileType'>storage.FileType</a>;
<a href='/constructor/storage.fileGif'>storage.fileGif</a>#cae1aadf = <a href='/type/storage.FileType'>storage.FileType</a>;
<a href='/constructor/storage.filePng'>storage.filePng</a>#a4f63c0 = <a href='/type/storage.FileType'>storage.FileType</a>;
<a href='/constructor/storage.fileMp3'>storage.fileMp3</a>#528a0677 = <a href='/type/storage.FileType'>storage.FileType</a>;
<a href='/constructor/storage.fileMov'>storage.fileMov</a>#4b09ebbc = <a href='/type/storage.FileType'>storage.FileType</a>;
<a href='/constructor/storage.filePartial'>storage.filePartial</a>#40bc6f52 = <a href='/type/storage.FileType'>storage.FileType</a>;
<a href='/constructor/storage.fileMp4'>storage.fileMp4</a>#b3cea0e4 = <a href='/type/storage.FileType'>storage.FileType</a>;
<a href='/constructor/storage.fileWebp'>storage.fileWebp</a>#1081464c = <a href='/type/storage.FileType'>storage.FileType</a>;
---functions---
<a href='/method/upload.getWebFile'>upload.getWebFile</a>#24e6818d location:<a href='/type/InputWebFileLocation'>InputWebFileLocation</a> offset:<a href='/type/int'>int</a> limit:<a href='/type/int'>int</a> = <a href='/type/upload.WebFile'>upload.WebFile</a>;</code></pre>
<p>The <a href="/type/InputWebFileLocation">InputWebFileLocation</a> constructor is generated as follows.</p>
<pre><code><a href='/constructor/inputWebFileLocation'>inputWebFileLocation</a>#c239d686 url:<a href='/type/string'>string</a> access_hash:<a href='/type/long'>long</a> = <a href='/type/InputWebFileLocation'>InputWebFileLocation</a>;
<a href='/constructor/inputWebFileGeoPointLocation'>inputWebFileGeoPointLocation</a>#9f2221c9 geo_point:<a href='/type/InputGeoPoint'>InputGeoPoint</a> access_hash:<a href='/type/long'>long</a> w:<a href='/type/int'>int</a> h:<a href='/type/int'>int</a> zoom:<a href='/type/int'>int</a> scale:<a href='/type/int'>int</a> = <a href='/type/InputWebFileLocation'>InputWebFileLocation</a>;
<a href='/constructor/webDocument'>webDocument</a>#1c570ed1 url:<a href='/type/string'>string</a> access_hash:<a href='/type/long'>long</a> size:<a href='/type/int'>int</a> mime_type:<a href='/type/string'>string</a> attributes:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/DocumentAttribute'>DocumentAttribute</a>&gt; = <a href='/type/WebDocument'>WebDocument</a>;
<a href='/constructor/inputGeoPoint'>inputGeoPoint</a>#48222faf flags:<a href='/type/%23'>#</a> lat:<a href='/type/double'>double</a> long:<a href='/type/double'>double</a> accuracy_radius:flags.0?<a href='/type/int'>int</a> = <a href='/type/InputGeoPoint'>InputGeoPoint</a>;
<a href='/constructor/geoPoint'>geoPoint</a>#b2a2f663 flags:<a href='/type/%23'>#</a> long:<a href='/type/double'>double</a> lat:<a href='/type/double'>double</a> access_hash:<a href='/type/long'>long</a> accuracy_radius:flags.0?<a href='/type/int'>int</a> = <a href='/type/GeoPoint'>GeoPoint</a>;</code></pre>
<ul>
<li><a href="/constructor/inputWebFileLocation">inputWebFileLocation</a> is simply generated by taking the <code>url</code> and <code>access_hash</code> fields of the <a href="/constructor/webDocument">webDocument</a> constructor.</li>
<li><a href="/constructor/inputWebFileGeoPointLocation">inputWebFileGeoPointLocation</a> is used to download a server-generated image with the map preview from a <a href="/constructor/geoPoint">geoPoint</a>.<ul>
<li><code>geo_point</code> is generated from the <code>lat</code>, <code>long</code> <code>accuracy_radius</code> parameters of the <a href="/constructor/geoPoint">geoPoint</a></li>
<li><code>access_hash</code> is the access hash of the <a href="/constructor/geoPoint">geoPoint</a></li>
<li><code>w</code> - Map width in pixels before applying scale; 16-1024</li>
<li><code>h</code> - Map height in pixels before applying scale; 16-1024</li>
<li><code>zoom</code> - Map zoom level; 13-20</li>
<li><code>scale</code> - Map scale; 1-3</li>
</ul>
</li>
</ul>
<h3><a class="anchor" href="#general-considerations" id="general-considerations" name="general-considerations"><i class="anchor-icon"></i></a>General Considerations</h3>
<p>It is recommended that large queries (<a href="/method/upload.getFile">upload.getFile</a>, <a href="/method/upload.saveFilePart">upload.saveFilePart</a>, <a href="/method/upload.getWebFile">upload.getWebFile</a>) be handled through a separate session and a separate connection, in which no methods other than these should be executed. If this is done, then data transfer will cause less interference with <a href="/api/updates">getting updates</a> and other method calls.</p>
<h3><a class="anchor" href="#related-articles" id="related-articles" name="related-articles"><i class="anchor-icon"></i></a>Related articles</h3>
<h4><a class="anchor" href="#handling-file-references" id="handling-file-references" name="handling-file-references"><i class="anchor-icon"></i></a><a href="/api/file_reference">Handling file references</a></h4>
<p>How to handle file references.</p></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script src="/js/jquery.min.js?1"></script>
<script src="/js/bootstrap.min.js"></script>
<script>window.initDevPageNav&&initDevPageNav();
backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>

View file

@ -0,0 +1,155 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>Calling API Methods</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Additional options for calling methods.">
<meta property="og:title" content="Calling API Methods">
<meta property="og:image" content="5901cb4c908e540453">
<meta property="og:description" content="Additional options for calling methods.">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class="active"><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class=""><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/api/invoking" >Calling API Methods</a></li></ul></div>
<h1 id="dev_page_title">Calling API Methods</h1>
<div id="dev_page_content"><!-- scroll_nav -->
<h3><a class="anchor" href="#layers" id="layers" name="layers"><i class="anchor-icon"></i></a>Layers</h3>
<p>Versioning in the API is supported by so-called TL layers.</p>
<p>The need to add a new object constructor or to add/remove a field in a constructor creates a backwards compatibility problem for previous versions of API clients. After all, simply changing a constructor in a schema also changes its number. To address this problem, each schema update is separated into a layer.
A layer is a collection of updated methods or constructors in a TL schema. Each layer is numbered with sequentially increasing numbers starting with 2. The first layer is the base layer -- the TL schema without any changes.</p>
<p>There is helper method to let the API know that a client supports Layer <code>layer</code>:</p>
<pre><code>invokeWithLayer#da9b0d0d {X:Type} layer:int query:!X = X;</code></pre>
<p>The helper method <strong><a href="/method/invokeWithLayer">invokeWithLayer</a></strong> can be used only together with <a href="/method/initConnection">initConnection</a>: the present layer will be saved with all other parameters of the client and future calls will be using this saved value. <a href="#saving-client-info">See more below.</a>.</p>
<h4><a class="anchor" href="#list-of-available-layers" id="list-of-available-layers" name="list-of-available-layers"><i class="anchor-icon"></i></a><a href="/api/layers">List of Available Layers</a></h4>
<h3><a class="anchor" href="#saving-client-info" id="saving-client-info" name="saving-client-info"><i class="anchor-icon"></i></a>Saving Client Info</h3>
<p>It is possible to save information about the current client on the server in conjunction with an authorization key. This may help eliminate client-side problems with certain releases on certain devices or with certain localizations, as well as eliminate the need for sending layer information in each call.</p>
<p>The helper method <strong><a href="/method/initConnection">initConnection</a></strong> accepts client parameters. This method must be called when first calling the API after the application has restarted or in case the value of one of the parameters could have changed.</p>
<p><strong>initConnection</strong> must also be called after each <a href="/method/auth.bindTempAuthKey">auth.bindTempAuthKey</a>.</p>
<p>When calling this method, the current layer used by the client is also saved (the layer in which <a href="/method/initConnection">initConnection</a> was wrapped is used). After a successful call to <a href="/method/initConnection">initConnection</a> it is no longer necessary to wrap each API call in <strong>invokeWithLayerN</strong>.</p>
<h3><a class="anchor" href="#disabling-updates" id="disabling-updates" name="disabling-updates"><i class="anchor-icon"></i></a>Disabling updates</h3>
<pre><code>invokeWithoutUpdates#bf9459b7 {X:Type} query:!X = X;</code></pre>
<p><a href="/method/invokeWithoutUpdates">invokeWithoutUpdates</a> can be used to invoke a request without subscribing the used connection for <a href="/api/updates">updates</a> (this is enabled by default for <a href="/api/files">file queries</a>).</p>
<h3><a class="anchor" href="#sequential-calls" id="sequential-calls" name="sequential-calls"><i class="anchor-icon"></i></a>Sequential Calls</h3>
<p>Sometimes a client needs to transmit several send message method calls to the server all at once in a single message or in several consecutive messages. However, there is a chance that the server may execute these requests out of order (queries are handled by different servers to improve performance, which introduces a degree of randomness to the process).</p>
<p>There are helper methods for making several consecutive API calls without wasting time waiting for a response:</p>
<div class="richcode">
<p><a href="/method/invokeAfterMsg">invokeAfterMsg</a>#cb9f372d {X:Type} msg_id:long query:!X = X;<br>
<a href="/method/invokeAfterMsgs">invokeAfterMsgs</a>#3dc4b4f0 {X:Type} msg_ids:Vector<long> query:!X = X; </long></p>
</div>
<p>They may be used, for example, if a client attempts to send accumulated messages after the Internet connection has been restored after being absent for a long time. In this case, the 32-bit number <code>0xcb9f372d</code> must be added before the method number in each call, followed by a 64-bit message identifier, msg_id, which contains the previous call in the queue.
The second method is similar, except it takes several messages that must be waited for.</p>
<p>If the waiting period exceeds 0.5 seconds (this value may change in the future) and no result has appeared, the method will be executed just the same. If any of the queries returns an error, all its dependent queries will also return the <a href="/api/errors#400-bad-request">400 MSG_WAIT_FAILED</a> error.</p>
<h4><a class="anchor" href="#helper-method-sequence" id="helper-method-sequence" name="helper-method-sequence"><i class="anchor-icon"></i></a>Helper Method Sequence</h4>
<p><strong>Important:</strong> if the helper methods <strong>invokeAfterMsg</strong> / <strong>invokeAfterMsgs</strong> are used together with <strong>invokeWithLayerN</strong> or other helper methods, <strong>invokeAfterMsg</strong> / <strong>invokeAfterMsgs</strong> must always be the outermost wrapper.</p>
<h3><a class="anchor" href="#data-compression" id="data-compression" name="data-compression"><i class="anchor-icon"></i></a>Data Compression</h3>
<p>We recommend using gzip compression when making method calls in order to reduce the amount of network traffic.</p>
<p>The schema and constructor information are given in the <a href="/mtproto/service_messages#packed-object">protocol documentation</a>.</p>
<h4><a class="anchor" href="#data-compression-when-making-a-call" id="data-compression-when-making-a-call" name="data-compression-when-making-a-call"><i class="anchor-icon"></i></a>Data Compression when Making a Call</h4>
<p>Before transmitting a query, the string containing the entire body of the serialized high-level query (starting with the method number) must be compressed using gzip. If the resulting string is smaller than the original, it makes sense to transmit the <a href="/mtproto/service_messages#pakovannyy-obekt">gzip_packed</a> constructor.</p>
<p>There is no point in doing the above when transmitting binary multimedia data (photos, videos) or small messages (up to 255 bytes).</p>
<h4><a class="anchor" href="#uncompressing-data" id="uncompressing-data" name="uncompressing-data"><i class="anchor-icon"></i></a>Uncompressing Data</h4>
<p>By default, the server compresses the response to any call as well as <a href="/api/updates">updates</a>, in accordance with the rules stated above. If the <a href="/mtproto/service_messages#packed-object">gzip_packed</a> constructor is received as a response in rpc_result, then the string that follows must be extracted and uncompressed. Processing then continues on the resulting new string.</p></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script src="/js/jquery.min.js?1"></script>
<script src="/js/bootstrap.min.js"></script>
<script>window.initDevPageNav&&initDevPageNav();
backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>

File diff suppressed because it is too large Load diff

View file

@ -1,152 +0,0 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>Mentions</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="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.">
<meta property="og:title" content="Mentions">
<meta property="og:image" content="">
<meta property="og:description" content="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.">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class="active"><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class=""><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/api/mentions" >Mentions</a></li></ul></div>
<h1 id="dev_page_title">Mentions</h1>
<div id="dev_page_content"><!-- scroll_nav -->
<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>
<pre><code><a href='/constructor/messageEntityMention'>messageEntityMention</a>#fa04579d offset:<a href='/type/int'>int</a> length:<a href='/type/int'>int</a> = <a href='/type/MessageEntity'>MessageEntity</a>;
<a href='/constructor/messageEntityMentionName'>messageEntityMentionName</a>#352dca58 offset:<a href='/type/int'>int</a> length:<a href='/type/int'>int</a> user_id:<a href='/type/int'>int</a> = <a href='/type/MessageEntity'>MessageEntity</a>;
<a href='/constructor/inputMessageEntityMentionName'>inputMessageEntityMentionName</a>#208e68c9 offset:<a href='/type/int'>int</a> length:<a href='/type/int'>int</a> user_id:<a href='/type/InputUser'>InputUser</a> = <a href='/type/MessageEntity'>MessageEntity</a>;
<a href='/constructor/message'>message</a>#58ae39c9 flags:<a href='/type/%23'>#</a> out:flags.1?<a href='/constructor/true'>true</a> mentioned:flags.4?<a href='/constructor/true'>true</a> media_unread:flags.5?<a href='/constructor/true'>true</a> silent:flags.13?<a href='/constructor/true'>true</a> post:flags.14?<a href='/constructor/true'>true</a> from_scheduled:flags.18?<a href='/constructor/true'>true</a> legacy:flags.19?<a href='/constructor/true'>true</a> edit_hide:flags.21?<a href='/constructor/true'>true</a> pinned:flags.24?<a href='/constructor/true'>true</a> id:<a href='/type/int'>int</a> from_id:flags.8?<a href='/type/Peer'>Peer</a> peer_id:<a href='/type/Peer'>Peer</a> fwd_from:flags.2?<a href='/type/MessageFwdHeader'>MessageFwdHeader</a> via_bot_id:flags.11?<a href='/type/int'>int</a> reply_to:flags.3?<a href='/type/MessageReplyHeader'>MessageReplyHeader</a> date:<a href='/type/int'>int</a> message:<a href='/type/string'>string</a> media:flags.9?<a href='/type/MessageMedia'>MessageMedia</a> reply_markup:flags.6?<a href='/type/ReplyMarkup'>ReplyMarkup</a> entities:flags.7?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/MessageEntity'>MessageEntity</a>&gt; views:flags.10?<a href='/type/int'>int</a> forwards:flags.10?<a href='/type/int'>int</a> replies:flags.23?<a href='/type/MessageReplies'>MessageReplies</a> edit_date:flags.15?<a href='/type/int'>int</a> post_author:flags.16?<a href='/type/string'>string</a> grouped_id:flags.17?<a href='/type/long'>long</a> restriction_reason:flags.22?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/RestrictionReason'>RestrictionReason</a>&gt; = <a href='/type/Message'>Message</a>;
<a href='/constructor/channelParticipantsMentions'>channelParticipantsMentions</a>#e04b5ceb flags:<a href='/type/%23'>#</a> q:flags.0?<a href='/type/string'>string</a> top_msg_id:flags.1?<a href='/type/int'>int</a> = <a href='/type/ChannelParticipantsFilter'>ChannelParticipantsFilter</a>;
---functions---
<a href='/method/messages.sendMessage'>messages.sendMessage</a>#520c3870 flags:<a href='/type/%23'>#</a> no_webpage:flags.1?<a href='/constructor/true'>true</a> silent:flags.5?<a href='/constructor/true'>true</a> background:flags.6?<a href='/constructor/true'>true</a> clear_draft:flags.7?<a href='/constructor/true'>true</a> peer:<a href='/type/InputPeer'>InputPeer</a> reply_to_msg_id:flags.0?<a href='/type/int'>int</a> message:<a href='/type/string'>string</a> random_id:<a href='/type/long'>long</a> reply_markup:flags.2?<a href='/type/ReplyMarkup'>ReplyMarkup</a> entities:flags.3?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/MessageEntity'>MessageEntity</a>&gt; schedule_date:flags.10?<a href='/type/int'>int</a> = <a href='/type/Updates'>Updates</a>;
<a href='/method/channels.getParticipants'>channels.getParticipants</a>#123e05e9 channel:<a href='/type/InputChannel'>InputChannel</a> filter:<a href='/type/ChannelParticipantsFilter'>ChannelParticipantsFilter</a> offset:<a href='/type/int'>int</a> limit:<a href='/type/int'>int</a> hash:<a href='/type/int'>int</a> = <a href='/type/channels.ChannelParticipants'>channels.ChannelParticipants</a>;</code></pre>
<p>Mentions are implemented as <a href="/api/entities">message entities</a>, passed to the <a href="/method/messages.sendMessage">messages.sendMessage</a> method:</p>
<ul>
<li><a href="/constructor/inputMessageEntityMentionName">inputMessageEntityMentionName</a> - Used when sending messages, allows mentioning a user <a href="https://t.me/botfather">inline, even for users that don't have a @username</a></li>
<li><a href="/constructor/messageEntityMentionName">messageEntityMentionName</a> - Incoming message counterpart of <a href="/constructor/inputMessageEntityMentionName">inputMessageEntityMentionName</a></li>
<li><a href="/constructor/messageEntityMention">messageEntityMention</a> - <a href="https://t.me/botfather">@botfather</a> (this entity is generated automatically server-side for @usernames in messages, no need to provide it manually)</li>
</ul>
<p>Incoming <a href="/constructor/message">messages</a> mentioning to the current user will have the <code>mentioned</code> flag set, and will contain one or more <a href="/constructor/messageEntityMention">messageEntityMention</a> and <a href="/constructor/messageEntityMentionName">messageEntityMentionName</a> constructors. </p>
<p>Graphical clients can show a list of mentionable users when the user starts entering an <code>@</code> in the text bar; for this purpose, the <a href="/constructor/channelParticipantsMentions">channelParticipantsMentions</a> filter can be used in <a href="/method/channels.getParticipants">channels.getParticipants</a>.<br>
This filter can be enhanced by providing an additional query string <code>q</code> (anything the user enters after <code>@</code>); it will also return non-participant users, in case of channel users commenting in <a href="/api/discussion">post comment sections</a>. </p>
<h3><a class="anchor" href="#dialog-mentions" id="dialog-mentions" name="dialog-mentions"><i class="anchor-icon"></i></a>Dialog mentions</h3>
<pre><code><a href='/constructor/dialog'>dialog</a>#2c171f72 flags:<a href='/type/%23'>#</a> pinned:flags.2?<a href='/constructor/true'>true</a> unread_mark:flags.3?<a href='/constructor/true'>true</a> peer:<a href='/type/Peer'>Peer</a> top_message:<a href='/type/int'>int</a> read_inbox_max_id:<a href='/type/int'>int</a> read_outbox_max_id:<a href='/type/int'>int</a> unread_count:<a href='/type/int'>int</a> unread_mentions_count:<a href='/type/int'>int</a> notify_settings:<a href='/type/PeerNotifySettings'>PeerNotifySettings</a> pts:flags.0?<a href='/type/int'>int</a> draft:flags.1?<a href='/type/DraftMessage'>DraftMessage</a> folder_id:flags.4?<a href='/type/int'>int</a> = <a href='/type/Dialog'>Dialog</a>;
---functions---
<a href='/method/messages.getUnreadMentions'>messages.getUnreadMentions</a>#46578472 peer:<a href='/type/InputPeer'>InputPeer</a> offset_id:<a href='/type/int'>int</a> add_offset:<a href='/type/int'>int</a> limit:<a href='/type/int'>int</a> max_id:<a href='/type/int'>int</a> min_id:<a href='/type/int'>int</a> = <a href='/type/messages.Messages'>messages.Messages</a>;
<a href='/method/messages.readMentions'>messages.readMentions</a>#f0189d3 peer:<a href='/type/InputPeer'>InputPeer</a> = <a href='/type/messages.AffectedHistory'>messages.AffectedHistory</a>;</code></pre>
<p>Graphical clients are supposed to show a blue mention indicator next to the message counter of chats in the dialog list.<br>
The <a href="/constructor/dialog">dialog</a> constructor contains an <code>unread_mentions_count</code> field to isolate chats with unread mentions; the actual mention counter should be shown inside of the chat itself, above an <code>@</code> button that can be used, by clicking multiple times, to navigate back (using <a href="/method/messages.getUnreadMentions">messages.getUnreadMentions</a>) through the mention history. </p>
<p>When the last unread mention is read, or when long-clicking on the <code>@</code> button, all mentions for a chat should marked as read using <a href="/method/messages.readMentions">messages.readMentions</a>.</p></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script src="/js/jquery.min.js?1"></script>
<script src="/js/bootstrap.min.js"></script>
<script>window.initDevPageNav&&initDevPageNav();
backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>

View file

@ -0,0 +1,140 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>Creating your Telegram Application</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="How to get your application identifier and create a new Telegram app.">
<meta property="og:title" content="Creating your Telegram Application">
<meta property="og:image" content="06c229ff662379138f">
<meta property="og:description" content="How to get your application identifier and create a new Telegram app.">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class="active"><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class=""><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/api/obtaining_api_id" >Creating your Telegram Application</a></li></ul></div>
<h1 id="dev_page_title">Creating your Telegram Application</h1>
<div id="dev_page_content"><p>We welcome all developers to use our <a href="https://core.telegram.org/api#telegram-api">API</a> and source code to create Telegram-like messaging applications on our platform free of charge.</p>
<blockquote>
<p>In order to ensure consistency and security across the Telegram ecosystem,
<strong>all third-party client apps</strong> must comply with the <a href="/api/terms"><strong>API Terms of Service</strong></a>.</p>
</blockquote>
<h3><a class="anchor" href="#obtaining-api-id" id="obtaining-api-id" name="obtaining-api-id"><i class="anchor-icon"></i></a>Obtaining api_id</h3>
<p>In order to obtain an <strong>API id</strong> and develop your own application using the Telegram API you need to do the following:</p>
<ul>
<li>Sign up for Telegram using any application.</li>
<li>Log in to your Telegram core: <a href="https://my.telegram.org">https://my.telegram.org</a>.</li>
<li>Go to <a href="https://my.telegram.org/apps">'API development tools'</a> and fill out the form.</li>
<li>You will get basic addresses as well as the <strong>api_id</strong> and <strong>api_hash</strong> parameters required for user authorization.</li>
<li>For the moment each number can only have one api_id connected to it.</li>
</ul>
<p>We will be sending important developer notifications to the phone number that you use in this process, so please use an up-to-date number connected to your active Telegram account.</p>
<h3><a class="anchor" href="#using-the-api-id" id="using-the-api-id" name="using-the-api-id"><i class="anchor-icon"></i></a>Using the api_id</h3>
<p>Before using the MTProto Telegram API, please note that all API client libraries are strictly monitored to prevent abuse.</p>
<p>If you use the Telegram API for flooding, spamming, faking subscriber and view counters of channels, you <strong>will be banned forever</strong>. </p>
<p>Due to excessive abuse of the Telegram API, <strong>all accounts</strong> that sign up or log in using unofficial Telegram API clients are automatically put <strong>under observation</strong> to avoid violations of the <a href="/api/terms">Terms of Service</a>. </p>
<p>If you didn't violate the Terms of Service but your account does get banned after using the API, write to <a href="mailto:recover@telegram.org">recover@telegram.org</a> explaining what you intend to do with the API, asking to unban your account.<br>
Please note that emails are checked by a human, so automatically generated emails will be detected and banned.</p>
<h3><a class="anchor" href="#using-telegrams-open-source-code" id="using-telegrams-open-source-code" name="using-telegrams-open-source-code"><i class="anchor-icon"></i></a>Using Telegram's open source code</h3>
<p>Everyone is welcome to use our open source code. We have included a sample API id with the code. This API id is limited on the server side and is not suitable for apps released to end-users — using it for anything but testing purposes will result in the API_ID_PUBLISHED_FLOOD error for your users. It is necessary that you obtain your <strong>own API id</strong> before you publish your app.</p>
<blockquote>
<p>Please remember to publish your code as well in order to comply with the GNU GPL licences.</p>
</blockquote></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script>backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>

View file

@ -1,165 +0,0 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>Pagination in the API</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="How to fetch results from large lists of objects.">
<meta property="og:title" content="Pagination in the API">
<meta property="og:image" content="4dd378cd0f58b0b820">
<meta property="og:description" content="How to fetch results from large lists of objects.">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class="active"><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class=""><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/api/offsets" >Pagination in the API</a></li></ul></div>
<h1 id="dev_page_title">Pagination in the API</h1>
<div id="dev_page_content"><!-- scroll_nav -->
<p>Lots of Telegram API methods provide access to potentially large lists of objects, which requires pagination.</p>
<p>In order to fetch only relevant subset of results for each request there is a number of available input parameters. Here is a list in order how they are applied in API.</p>
<p>Typically, results are returned in antichronological order with descending object ID values.</p>
<h3><a class="anchor" href="#limit-parameter" id="limit-parameter" name="limit-parameter"><i class="anchor-icon"></i></a><code>limit</code> parameter</h3>
<p>A limit on the number of objects to be returned, typically between 1 and 100. When 0 is provided the limit will often default to an intermediate value like ~20.</p>
<h3><a class="anchor" href="#offset-based-pagination" id="offset-based-pagination" name="offset-based-pagination"><i class="anchor-icon"></i></a><code>offset</code>-based pagination</h3>
<p>For a few methods with mostly static data this parameter allows to skip <code>offset</code> elements from the beginning of list; negative values are ignored.</p>
<h3><a class="anchor" href="#offset-id-based-pagination" id="offset-id-based-pagination" name="offset-id-based-pagination"><i class="anchor-icon"></i></a><code>offset_id</code>-based pagination</h3>
<p>For most methods where results are real-time data (e.g. any chat history) <code>offset</code> value is not passed directly. Instead it is calculated from the passed <code>offset_id</code> and <code>add_offset</code> parameter values as <code>offsetFromID(offset_id) + add_offset</code>, where <code>offsetFromID(offset_id)</code> is a number of results from the beginning of list up to the result with ID <code>offset_id</code>, inclusive.</p>
<p>Sample use cases:</p>
<ul>
<li>
<p>Loading 20 messages, older than message with ID <code>MSGID</code>:</p>
<p>messages.getHistory({offset_id: MSGID, add_offset: 0, limit: 20})</p>
</li>
<li>
<p>Loading 20 messages, newer than message with ID <code>MSGID</code>:</p>
<p>messages.getHistory({offset_id: MSGID, add_offset: -20, limit: 20})</p>
</li>
<li>
<p>Loading 20 messages around message with ID <code>MSGID</code>:</p>
<p>messages.getHistory({offset_id: MSGID, add_offset: -10, limit: 20})</p>
</li>
</ul>
<h3><a class="anchor" href="#additional-filtering" id="additional-filtering" name="additional-filtering"><i class="anchor-icon"></i></a>Additional filtering</h3>
<p>There is a number of parameters, which are applied to the list after slicing with offset and limit, to reduce the result subset even more:</p>
<ul>
<li><strong>max_id</strong>: Can be used to only return results with ID strictly smaller than <code>max_id</code> (e.g. message ID)</li>
<li><strong>min_id</strong>: Can be used to only return results with ID strictly greater than <code>min_id</code>(e.g. message ID)</li>
<li><strong>max_date</strong>: Can be used to only return results that are older than <code>max_date</code>:</li>
<li><strong>min_date</strong>: Can be used to only return results with are newer than <code>min_date</code>:</li>
<li><strong>hash</strong>: See below.</li>
</ul>
<h3><a class="anchor" href="#hash-generation" id="hash-generation" name="hash-generation"><i class="anchor-icon"></i></a>Hash generation</h3>
<p>To further reduce the result subset, there is a mechanism to avoid fetching data if the resulting list hasn't changed from the one stored on client, similar to <a href="https://en.wikipedia.org/wiki/HTTP_ETag">ETag</a>.</p>
<p>When the client has cached results for API request, it can calculate the <code>hash</code> value for it by taking the result IDs (message IDs or other fields with name <code>id</code>) and using them to compute a 32-bit hash with the following algorithm:</p>
<pre><code>hash = 0
for id in ids:
hash = (((hash * 0x4F25) &amp; 0x7FFFFFFF) + id) &amp; 0x7FFFFFFF</code></pre>
<p>In some cases, the result container already has a <code>hash</code> field, that can be used instead.</p>
<p>When the client passes a correct value, the API will return one of <code>*NotModified</code> constructors, e.g. <a href="/constructor/messages.messagesNotModified">messages.messagesNotModified</a> instead of the actual results.</p>
<h3><a class="anchor" href="#example-methods" id="example-methods" name="example-methods"><i class="anchor-icon"></i></a>Example methods</h3>
<ul>
<li><a href="/method/messages.getHistory">messages.getHistory</a> supports all result navigation parameters including message ID hashes and except filters</li>
<li><a href="/method/channels.getParticipants">channels.getParticipants</a> supports simple navigation using <strong>limit</strong> and <strong>offset</strong>, along with filtering and <code>hash</code> reducing using the user IDs of returned participants</li>
</ul></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script src="/js/jquery.min.js?1"></script>
<script src="/js/bootstrap.min.js"></script>
<script>window.initDevPageNav&&initDevPageNav();
backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>

View file

@ -0,0 +1,366 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>Payments API</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="You can accept payments from Telegram users via Telegram Bots.
Note: This article is intended for MTProto API developers.…">
<meta property="og:title" content="Payments API">
<meta property="og:image" content="">
<meta property="og:description" content="You can accept payments from Telegram users via Telegram Bots.
Note: This article is intended for MTProto API developers.…">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class="active"><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class=""><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/api/payments" >Payments API</a></li></ul></div>
<h1 id="dev_page_title">Payments API</h1>
<div id="dev_page_content"><!-- scroll_nav -->
<p>You can accept payments from Telegram users via <a href="/bots">Telegram Bots</a>.</p>
<blockquote>
<p>Note: This article is intended for MTProto API developers. If you're looking for a general overview of Telegram Payments, check out the <a href="https://telegram.org/blog/payments">Telegram blog</a> and the <a href="/bots/payments">bot API payment manual</a>.</p>
</blockquote>
<h3><a class="anchor" href="#introducing-payments" id="introducing-payments" name="introducing-payments"><i class="anchor-icon"></i></a>Introducing Payments</h3>
<p>Telegram bots can accept payments for goods and services from users.
For more info on how payments work, check out the <a href="https://telegram.org/blog/payments">Telegram Blog</a> and the <a href="/bots/payments">bot API payment manual</a>.</p>
<p>This page will elaborate on the actions required to work with payments using the <strong>MTProto API</strong>.</p>
<blockquote>
<p>A simplified version of the process is available only for bots using the <a href="/bots/payments">bot API</a>.</p>
</blockquote>
<p>The first step for bots is <a href="/bots/payments#the-payments-api">enable payments as described here »</a>.</p>
<p>Then, we work with payments as follows.</p>
<h3><a class="anchor" href="#1-create-invoice" id="1-create-invoice" name="1-create-invoice"><i class="anchor-icon"></i></a>1. Create Invoice</h3>
<pre><code><a href='/constructor/inputWebDocument'>inputWebDocument</a>#9bed434d url:<a href='/type/string'>string</a> size:<a href='/type/int'>int</a> mime_type:<a href='/type/string'>string</a> attributes:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/DocumentAttribute'>DocumentAttribute</a>&gt; = <a href='/type/InputWebDocument'>InputWebDocument</a>;
<a href='/constructor/labeledPrice'>labeledPrice</a>#cb296bf8 label:<a href='/type/string'>string</a> amount:<a href='/type/long'>long</a> = <a href='/type/LabeledPrice'>LabeledPrice</a>;
<a href='/constructor/invoice'>invoice</a>#c30aa358 flags:<a href='/type/%23'>#</a> test:flags.0?<a href='/constructor/true'>true</a> name_requested:flags.1?<a href='/constructor/true'>true</a> phone_requested:flags.2?<a href='/constructor/true'>true</a> email_requested:flags.3?<a href='/constructor/true'>true</a> shipping_address_requested:flags.4?<a href='/constructor/true'>true</a> flexible:flags.5?<a href='/constructor/true'>true</a> phone_to_provider:flags.6?<a href='/constructor/true'>true</a> email_to_provider:flags.7?<a href='/constructor/true'>true</a> currency:<a href='/type/string'>string</a> prices:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/LabeledPrice'>LabeledPrice</a>&gt; = <a href='/type/Invoice'>Invoice</a>;
<a href='/constructor/inputMediaInvoice'>inputMediaInvoice</a>#f4e096c3 flags:<a href='/type/%23'>#</a> title:<a href='/type/string'>string</a> description:<a href='/type/string'>string</a> photo:flags.0?<a href='/type/InputWebDocument'>InputWebDocument</a> invoice:<a href='/type/Invoice'>Invoice</a> payload:<a href='/type/bytes'>bytes</a> provider:<a href='/type/string'>string</a> provider_data:<a href='/type/DataJSON'>DataJSON</a> start_param:<a href='/type/string'>string</a> = <a href='/type/InputMedia'>InputMedia</a>;
---functions---
<a href='/method/messages.sendMedia'>messages.sendMedia</a>#3491eba9 flags:<a href='/type/%23'>#</a> silent:flags.5?<a href='/constructor/true'>true</a> background:flags.6?<a href='/constructor/true'>true</a> clear_draft:flags.7?<a href='/constructor/true'>true</a> peer:<a href='/type/InputPeer'>InputPeer</a> reply_to_msg_id:flags.0?<a href='/type/int'>int</a> media:<a href='/type/InputMedia'>InputMedia</a> message:<a href='/type/string'>string</a> random_id:<a href='/type/long'>long</a> reply_markup:flags.2?<a href='/type/ReplyMarkup'>ReplyMarkup</a> entities:flags.3?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/MessageEntity'>MessageEntity</a>&gt; schedule_date:flags.10?<a href='/type/int'>int</a> = <a href='/type/Updates'>Updates</a>;</code></pre>
<p>The user contacts the bot and requests to purchase something.
The bot forms an <a href="/constructor/inputMediaInvoice">inputMediaInvoice</a> with an <a href="/constructor/invoice">invoice</a> constructor with a description of the goods or service, amount to be paid, as well as requested shipping info.
The <code>provider</code> parameter of the <a href="/constructor/inputMediaInvoice">inputMediaInvoice</a> constructor is where you put the token value that <a href="/bots/payments#the-payments-api">you've obtained earlier via Botfather</a>. It is possible for one merchant bot to use several different tokens for different users or different goods and services.</p>
<p>Use the <a href="/method/messages.sendMedia">messages.sendMedia</a> method to send the <a href="/constructor/invoice">invoice</a>.
You can also attach an inline keyboard to the message using the <code>reply_markup</code> field: if provided, the first button must be a <a href="/constructor/keyboardButtonBuy">keyboardButtonBuy</a> button. Otherwise, an inline keyboard will be generated automatically, with a <code>Pay 'total price'</code> <a href="/constructor/keyboardButtonBuy">keyboardButtonBuy</a> as only button.</p>
<p>An invoice message with a pay button can only be sent to a private chat with the user. Groups and channels are not supported.</p>
<h3><a class="anchor" href="#2-order-information" id="2-order-information" name="2-order-information"><i class="anchor-icon"></i></a>2. Order information</h3>
<h4><a class="anchor" href="#21-invoice-message" id="21-invoice-message" name="21-invoice-message"><i class="anchor-icon"></i></a>2.1 Invoice message</h4>
<pre><code><a href='/constructor/keyboardButtonBuy'>keyboardButtonBuy</a>#afd93fbb text:<a href='/type/string'>string</a> = <a href='/type/KeyboardButton'>KeyboardButton</a>;
<a href='/constructor/keyboardButtonRow'>keyboardButtonRow</a>#77608b83 buttons:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/KeyboardButton'>KeyboardButton</a>&gt; = <a href='/type/KeyboardButtonRow'>KeyboardButtonRow</a>;
<a href='/constructor/replyInlineMarkup'>replyInlineMarkup</a>#48a30254 rows:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/KeyboardButtonRow'>KeyboardButtonRow</a>&gt; = <a href='/type/ReplyMarkup'>ReplyMarkup</a>;
<a href='/constructor/webDocument'>webDocument</a>#1c570ed1 url:<a href='/type/string'>string</a> access_hash:<a href='/type/long'>long</a> size:<a href='/type/int'>int</a> mime_type:<a href='/type/string'>string</a> attributes:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/DocumentAttribute'>DocumentAttribute</a>&gt; = <a href='/type/WebDocument'>WebDocument</a>;
<a href='/constructor/webDocumentNoProxy'>webDocumentNoProxy</a>#f9c8bcc6 url:<a href='/type/string'>string</a> size:<a href='/type/int'>int</a> mime_type:<a href='/type/string'>string</a> attributes:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/DocumentAttribute'>DocumentAttribute</a>&gt; = <a href='/type/WebDocument'>WebDocument</a>;
<a href='/constructor/messageMediaInvoice'>messageMediaInvoice</a>#84551347 flags:<a href='/type/%23'>#</a> shipping_address_requested:flags.1?<a href='/constructor/true'>true</a> test:flags.3?<a href='/constructor/true'>true</a> title:<a href='/type/string'>string</a> description:<a href='/type/string'>string</a> photo:flags.0?<a href='/type/WebDocument'>WebDocument</a> receipt_msg_id:flags.2?<a href='/type/int'>int</a> currency:<a href='/type/string'>string</a> total_amount:<a href='/type/long'>long</a> start_param:<a href='/type/string'>string</a> = <a href='/type/MessageMedia'>MessageMedia</a>;
<a href='/constructor/message'>message</a>#58ae39c9 flags:<a href='/type/%23'>#</a> out:flags.1?<a href='/constructor/true'>true</a> mentioned:flags.4?<a href='/constructor/true'>true</a> media_unread:flags.5?<a href='/constructor/true'>true</a> silent:flags.13?<a href='/constructor/true'>true</a> post:flags.14?<a href='/constructor/true'>true</a> from_scheduled:flags.18?<a href='/constructor/true'>true</a> legacy:flags.19?<a href='/constructor/true'>true</a> edit_hide:flags.21?<a href='/constructor/true'>true</a> pinned:flags.24?<a href='/constructor/true'>true</a> id:<a href='/type/int'>int</a> from_id:flags.8?<a href='/type/Peer'>Peer</a> peer_id:<a href='/type/Peer'>Peer</a> fwd_from:flags.2?<a href='/type/MessageFwdHeader'>MessageFwdHeader</a> via_bot_id:flags.11?<a href='/type/int'>int</a> reply_to:flags.3?<a href='/type/MessageReplyHeader'>MessageReplyHeader</a> date:<a href='/type/int'>int</a> message:<a href='/type/string'>string</a> media:flags.9?<a href='/type/MessageMedia'>MessageMedia</a> reply_markup:flags.6?<a href='/type/ReplyMarkup'>ReplyMarkup</a> entities:flags.7?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/MessageEntity'>MessageEntity</a>&gt; views:flags.10?<a href='/type/int'>int</a> forwards:flags.10?<a href='/type/int'>int</a> replies:flags.23?<a href='/type/MessageReplies'>MessageReplies</a> edit_date:flags.15?<a href='/type/int'>int</a> post_author:flags.16?<a href='/type/string'>string</a> grouped_id:flags.17?<a href='/type/long'>long</a> restriction_reason:flags.22?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/RestrictionReason'>RestrictionReason</a>&gt; = <a href='/type/Message'>Message</a>;
<a href='/constructor/updateNewMessage'>updateNewMessage</a>#1f2b0afd message:<a href='/type/Message'>Message</a> pts:<a href='/type/int'>int</a> pts_count:<a href='/type/int'>int</a> = <a href='/type/Update'>Update</a>;</code></pre>
<p>The user receives an <a href="/constructor/updateNewMessage">updateNewMessage</a> constructor from the bot, containing a <a href="/constructor/messageMediaInvoice">messageMediaInvoice</a> constructor with basic info about the product.</p>
<p>The <a href="/constructor/message">message</a> will also have a <a href="/constructor/replyInlineMarkup">replyInlineMarkup</a> keyboard attached to it.
The the first button of the keyboard will always be a <a href="/constructor/keyboardButtonBuy">keyboardButtonBuy</a> button.</p>
<h4><a class="anchor" href="#22-getting-invoice-info-about-the-product" id="22-getting-invoice-info-about-the-product" name="22-getting-invoice-info-about-the-product"><i class="anchor-icon"></i></a>2.2 Getting invoice info about the product</h4>
<pre><code><a href='/constructor/invoice'>invoice</a>#c30aa358 flags:<a href='/type/%23'>#</a> test:flags.0?<a href='/constructor/true'>true</a> name_requested:flags.1?<a href='/constructor/true'>true</a> phone_requested:flags.2?<a href='/constructor/true'>true</a> email_requested:flags.3?<a href='/constructor/true'>true</a> shipping_address_requested:flags.4?<a href='/constructor/true'>true</a> flexible:flags.5?<a href='/constructor/true'>true</a> phone_to_provider:flags.6?<a href='/constructor/true'>true</a> email_to_provider:flags.7?<a href='/constructor/true'>true</a> currency:<a href='/type/string'>string</a> prices:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/LabeledPrice'>LabeledPrice</a>&gt; = <a href='/type/Invoice'>Invoice</a>;
<a href='/constructor/paymentRequestedInfo'>paymentRequestedInfo</a>#909c3f94 flags:<a href='/type/%23'>#</a> name:flags.0?<a href='/type/string'>string</a> phone:flags.1?<a href='/type/string'>string</a> email:flags.2?<a href='/type/string'>string</a> shipping_address:flags.3?<a href='/type/PostAddress'>PostAddress</a> = <a href='/type/PaymentRequestedInfo'>PaymentRequestedInfo</a>;
<a href='/constructor/paymentSavedCredentialsCard'>paymentSavedCredentialsCard</a>#cdc27a1f id:<a href='/type/string'>string</a> title:<a href='/type/string'>string</a> = <a href='/type/PaymentSavedCredentials'>PaymentSavedCredentials</a>;
<a href='/constructor/payments.paymentForm'>payments.paymentForm</a>#3f56aea3 flags:<a href='/type/%23'>#</a> can_save_credentials:flags.2?<a href='/constructor/true'>true</a> password_missing:flags.3?<a href='/constructor/true'>true</a> bot_id:<a href='/type/int'>int</a> invoice:<a href='/type/Invoice'>Invoice</a> provider_id:<a href='/type/int'>int</a> url:<a href='/type/string'>string</a> native_provider:flags.4?<a href='/type/string'>string</a> native_params:flags.4?<a href='/type/DataJSON'>DataJSON</a> saved_info:flags.0?<a href='/type/PaymentRequestedInfo'>PaymentRequestedInfo</a> saved_credentials:flags.1?<a href='/type/PaymentSavedCredentials'>PaymentSavedCredentials</a> users:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/User'>User</a>&gt; = <a href='/type/payments.PaymentForm'>payments.PaymentForm</a>;
---functions---
<a href='/method/payments.getPaymentForm'>payments.getPaymentForm</a>#99f09745 msg_id:<a href='/type/int'>int</a> = <a href='/type/payments.PaymentForm'>payments.PaymentForm</a>;</code></pre>
<p>If the user clicks on the <a href="/constructor/keyboardButtonBuy">keyboardButtonBuy</a> button, the client proceeds to call <a href="/method/payments.getPaymentForm">payments.getPaymentForm</a> with the message ID of the invoice preview message to get the <a href="/constructor/payments.paymentForm">payment form</a>.</p>
<p>The returned form will contain fields that should be passed to the payment provider along with the full <a href="/constructor/invoice">invoice</a>.
The payment form also contains info about previously saved payment credentials and order information (name, phone number, email, shipping address &amp; so on).</p>
<p>The full <a href="/constructor/invoice">invoice</a> contains info about the information required for the order, the price and the currency, and whether this is a <code>test</code> order.</p>
<h4><a class="anchor" href="#23-verifying-information" id="23-verifying-information" name="23-verifying-information"><i class="anchor-icon"></i></a>2.3 Verifying information</h4>
<pre><code><a href='/constructor/invoice'>invoice</a>#c30aa358 flags:<a href='/type/%23'>#</a> test:flags.0?<a href='/constructor/true'>true</a> name_requested:flags.1?<a href='/constructor/true'>true</a> phone_requested:flags.2?<a href='/constructor/true'>true</a> email_requested:flags.3?<a href='/constructor/true'>true</a> shipping_address_requested:flags.4?<a href='/constructor/true'>true</a> flexible:flags.5?<a href='/constructor/true'>true</a> phone_to_provider:flags.6?<a href='/constructor/true'>true</a> email_to_provider:flags.7?<a href='/constructor/true'>true</a> currency:<a href='/type/string'>string</a> prices:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/LabeledPrice'>LabeledPrice</a>&gt; = <a href='/type/Invoice'>Invoice</a>;
<a href='/constructor/postAddress'>postAddress</a>#1e8caaeb street_line1:<a href='/type/string'>string</a> street_line2:<a href='/type/string'>string</a> city:<a href='/type/string'>string</a> state:<a href='/type/string'>string</a> country_iso2:<a href='/type/string'>string</a> post_code:<a href='/type/string'>string</a> = <a href='/type/PostAddress'>PostAddress</a>;
<a href='/constructor/paymentRequestedInfo'>paymentRequestedInfo</a>#909c3f94 flags:<a href='/type/%23'>#</a> name:flags.0?<a href='/type/string'>string</a> phone:flags.1?<a href='/type/string'>string</a> email:flags.2?<a href='/type/string'>string</a> shipping_address:flags.3?<a href='/type/PostAddress'>PostAddress</a> = <a href='/type/PaymentRequestedInfo'>PaymentRequestedInfo</a>;
<a href='/constructor/payments.validatedRequestedInfo'>payments.validatedRequestedInfo</a>#d1451883 flags:<a href='/type/%23'>#</a> id:flags.0?<a href='/type/string'>string</a> shipping_options:flags.1?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/ShippingOption'>ShippingOption</a>&gt; = <a href='/type/payments.ValidatedRequestedInfo'>payments.ValidatedRequestedInfo</a>;
---functions---
<a href='/method/payments.validateRequestedInfo'>payments.validateRequestedInfo</a>#770a8e74 flags:<a href='/type/%23'>#</a> save:flags.0?<a href='/constructor/true'>true</a> msg_id:<a href='/type/int'>int</a> info:<a href='/type/PaymentRequestedInfo'>PaymentRequestedInfo</a> = <a href='/type/payments.ValidatedRequestedInfo'>payments.ValidatedRequestedInfo</a>;</code></pre>
<p>If any data at all is requested by the <a href="/constructor/invoice"><strong>invoice</strong></a> (<code>name_requested</code>, <code>phone_requested</code>, <code>email_requested</code>, <code>shipping_address_requested</code>), the user must call <a href="/method/payments.validateRequestedInfo">payments.validateRequestedInfo</a>, providing the required data (as usual, <code>msg_id</code> is the ID of the invoice message).
The user can choose to save order information for future use by setting the <code>save</code> flag.
Data can be autofilled as described in <a href="#2-3-1-autofill">autofill</a>.</p>
<p>If no errors are found in the submitted info, the <a href="/constructor/payments.ValidatedRequestedInfo">response</a> of the method will contain an <code>id</code> flag, to be used later to complete the payment.</p>
<p>If the <code>flexible</code> flag of the invoice is set, calling the <a href="/method/payments.validateRequestedInfo">payments.validateRequestedInfo</a> method will send a <a href="/constructor/updateBotShippingQuery">shipping query update</a> to the bot, to which the bot will reply with the available shipping options for the specified address <a href="#2-4-select-delivery-option">as described here »</a>.
The return value in this case will also contain a <code>shipping_options</code> field with the available shipping options.</p>
<p>If any errors are found in the submmitted data, a <a href="/constructor/updateServiceNotification">service notification</a> will be sent to the user, with a description of the error from the bot.</p>
<h4><a class="anchor" href="#231-autofill" id="231-autofill" name="231-autofill"><i class="anchor-icon"></i></a>2.3.1 Autofill</h4>
<pre><code><a href='/constructor/payments.savedInfo'>payments.savedInfo</a>#fb8fe43c flags:<a href='/type/%23'>#</a> has_saved_credentials:flags.1?<a href='/constructor/true'>true</a> saved_info:flags.0?<a href='/type/PaymentRequestedInfo'>PaymentRequestedInfo</a> = <a href='/type/payments.SavedInfo'>payments.SavedInfo</a>;
---functions---
<a href='/method/payments.getSavedInfo'>payments.getSavedInfo</a>#227d824b = <a href='/type/payments.SavedInfo'>payments.SavedInfo</a>;
<a href='/method/payments.clearSavedInfo'>payments.clearSavedInfo</a>#d83d70c1 flags:<a href='/type/%23'>#</a> credentials:flags.0?<a href='/constructor/true'>true</a> info:flags.1?<a href='/constructor/true'>true</a> = <a href='/type/Bool'>Bool</a>;</code></pre>
<p>The requested fields can be autofilled with the info provided in the <code>saved_info</code> field of the <a href="/constructor/payments.paymentForm">payment form</a>, or with the info fetched manually using <a href="/method/payments.getSavedInfo">payments.getSavedInfo</a>.</p>
<p>Saved order information can also be cleared using <a href="/method/payments.clearSavedInfo">payments.clearSavedInfo</a>.</p>
<h4><a class="anchor" href="#24-select-delivery-option" id="24-select-delivery-option" name="24-select-delivery-option"><i class="anchor-icon"></i></a>2.4 Select delivery option</h4>
<pre><code><a href='/constructor/labeledPrice'>labeledPrice</a>#cb296bf8 label:<a href='/type/string'>string</a> amount:<a href='/type/long'>long</a> = <a href='/type/LabeledPrice'>LabeledPrice</a>;
<a href='/constructor/shippingOption'>shippingOption</a>#b6213cdf id:<a href='/type/string'>string</a> title:<a href='/type/string'>string</a> prices:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/LabeledPrice'>LabeledPrice</a>&gt; = <a href='/type/ShippingOption'>ShippingOption</a>;
<a href='/constructor/updateBotShippingQuery'>updateBotShippingQuery</a>#e0cdc940 query_id:<a href='/type/long'>long</a> user_id:<a href='/type/int'>int</a> payload:<a href='/type/bytes'>bytes</a> shipping_address:<a href='/type/PostAddress'>PostAddress</a> = <a href='/type/Update'>Update</a>;
---functions---
<a href='/method/messages.setBotShippingResults'>messages.setBotShippingResults</a>#e5f672fa flags:<a href='/type/%23'>#</a> query_id:<a href='/type/long'>long</a> error:flags.0?<a href='/type/string'>string</a> shipping_options:flags.1?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/ShippingOption'>ShippingOption</a>&gt; = <a href='/type/Bool'>Bool</a>;</code></pre>
<p>If a shipping address was requested and the bot included the parameter <code>flexible</code>, when the user <a href="#2-3-verifying-information">validates order information</a> the Telegram API will send an <a href="/constructor/updateBotShippingQuery">updateBotShippingQuery</a> to the bot.
The bot must respond using <a href="/method/messages.setBotShippingResults">messages.setBotShippingResults</a> either with a list of possible delivery options and the relevant delivery prices, or with an error (for example, if delivery to the specified address is not possible).</p>
<p>The returned shipping options or the shipping error will be returned to the user while <a href="#2-3-verifying-information">validating order information</a>.</p>
<h3><a class="anchor" href="#3-payment" id="3-payment" name="3-payment"><i class="anchor-icon"></i></a>3. Payment</h3>
<pre><code><a href='/constructor/inputPaymentCredentialsSaved'>inputPaymentCredentialsSaved</a>#c10eb2cf id:<a href='/type/string'>string</a> tmp_password:<a href='/type/bytes'>bytes</a> = <a href='/type/InputPaymentCredentials'>InputPaymentCredentials</a>;
<a href='/constructor/inputPaymentCredentials'>inputPaymentCredentials</a>#3417d728 flags:<a href='/type/%23'>#</a> save:flags.0?<a href='/constructor/true'>true</a> data:<a href='/type/DataJSON'>DataJSON</a> = <a href='/type/InputPaymentCredentials'>InputPaymentCredentials</a>;
<a href='/constructor/inputPaymentCredentialsApplePay'>inputPaymentCredentialsApplePay</a>#aa1c39f payment_data:<a href='/type/DataJSON'>DataJSON</a> = <a href='/type/InputPaymentCredentials'>InputPaymentCredentials</a>;
<a href='/constructor/inputPaymentCredentialsAndroidPay'>inputPaymentCredentialsAndroidPay</a>#ca05d50e payment_token:<a href='/type/DataJSON'>DataJSON</a> google_transaction_id:<a href='/type/string'>string</a> = <a href='/type/InputPaymentCredentials'>InputPaymentCredentials</a>;
<a href='/constructor/payments.paymentForm'>payments.paymentForm</a>#3f56aea3 flags:<a href='/type/%23'>#</a> can_save_credentials:flags.2?<a href='/constructor/true'>true</a> password_missing:flags.3?<a href='/constructor/true'>true</a> bot_id:<a href='/type/int'>int</a> invoice:<a href='/type/Invoice'>Invoice</a> provider_id:<a href='/type/int'>int</a> url:<a href='/type/string'>string</a> native_provider:flags.4?<a href='/type/string'>string</a> native_params:flags.4?<a href='/type/DataJSON'>DataJSON</a> saved_info:flags.0?<a href='/type/PaymentRequestedInfo'>PaymentRequestedInfo</a> saved_credentials:flags.1?<a href='/type/PaymentSavedCredentials'>PaymentSavedCredentials</a> users:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/User'>User</a>&gt; = <a href='/type/payments.PaymentForm'>payments.PaymentForm</a>;</code></pre>
<h4><a class="anchor" href="#31-web-payment" id="31-web-payment" name="31-web-payment"><i class="anchor-icon"></i></a>3.1 Web payment</h4>
<pre><code><a href='/constructor/inputPaymentCredentials'>inputPaymentCredentials</a>#3417d728 flags:<a href='/type/%23'>#</a> save:flags.0?<a href='/constructor/true'>true</a> data:<a href='/type/DataJSON'>DataJSON</a> = <a href='/type/InputPaymentCredentials'>InputPaymentCredentials</a>;
<a href='/constructor/payments.paymentForm'>payments.paymentForm</a>#3f56aea3 flags:<a href='/type/%23'>#</a> can_save_credentials:flags.2?<a href='/constructor/true'>true</a> password_missing:flags.3?<a href='/constructor/true'>true</a> bot_id:<a href='/type/int'>int</a> invoice:<a href='/type/Invoice'>Invoice</a> provider_id:<a href='/type/int'>int</a> url:<a href='/type/string'>string</a> native_provider:flags.4?<a href='/type/string'>string</a> native_params:flags.4?<a href='/type/DataJSON'>DataJSON</a> saved_info:flags.0?<a href='/type/PaymentRequestedInfo'>PaymentRequestedInfo</a> saved_credentials:flags.1?<a href='/type/PaymentSavedCredentials'>PaymentSavedCredentials</a> users:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/User'>User</a>&gt; = <a href='/type/payments.PaymentForm'>payments.PaymentForm</a>;</code></pre>
<p>Typically, payment takes place by opening the <code>url</code> in the specified <a href="/constructor/payments.paymentForm">payment form</a>, which leads to a payment form on the website of the payment gateway.
Once the user finishes entering their payment credentials, a <a href="/api/web-events"><code>payment_form_submit</code> web event</a> is generated by the payment gateway, containing <code>data</code> and <code>title</code> JSON fields.</p>
<p>The <code>title</code> is used by the client app to represent the payment credentials (typically a censored version of credit card information).
The <code>data</code> is used to generate an <a href="/constructor/inputPaymentCredentials">inputPaymentCredentials</a> constructor.
Eventually, you can set the <code>save</code> flag to save the credit card info for future use, only if <a href="/api/srp">2FA</a> is enabled.</p>
<p>Telegram <strong>does not</strong> have access to your card information. Credit card details will be handled only by the payment system.</p>
<h4><a class="anchor" href="#32-native-payment" id="32-native-payment" name="32-native-payment"><i class="anchor-icon"></i></a>3.2 Native payment</h4>
<pre><code><a href='/constructor/inputPaymentCredentials'>inputPaymentCredentials</a>#3417d728 flags:<a href='/type/%23'>#</a> save:flags.0?<a href='/constructor/true'>true</a> data:<a href='/type/DataJSON'>DataJSON</a> = <a href='/type/InputPaymentCredentials'>InputPaymentCredentials</a>;
<a href='/constructor/payments.paymentForm'>payments.paymentForm</a>#3f56aea3 flags:<a href='/type/%23'>#</a> can_save_credentials:flags.2?<a href='/constructor/true'>true</a> password_missing:flags.3?<a href='/constructor/true'>true</a> bot_id:<a href='/type/int'>int</a> invoice:<a href='/type/Invoice'>Invoice</a> provider_id:<a href='/type/int'>int</a> url:<a href='/type/string'>string</a> native_provider:flags.4?<a href='/type/string'>string</a> native_params:flags.4?<a href='/type/DataJSON'>DataJSON</a> saved_info:flags.0?<a href='/type/PaymentRequestedInfo'>PaymentRequestedInfo</a> saved_credentials:flags.1?<a href='/type/PaymentSavedCredentials'>PaymentSavedCredentials</a> users:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/User'>User</a>&gt; = <a href='/type/payments.PaymentForm'>payments.PaymentForm</a>;</code></pre>
<p>Most telegram apps support working natively with the native APIs of some payment providers, without opening the website of the payment and receiving a JS event.</p>
<p>This is done using the JSON <code>native_params</code> parameters field of the <a href="/constructor/payments.paymentForm">payments.paymentForm</a> constructor, which contains an object, which can contain one or more of the following fields:</p>
<ul>
<li><code>publishable_key</code>: Stripe API publishable key</li>
<li><code>apple_pay_merchant_id</code>: Apple Pay merchant ID</li>
<li><code>android_pay_public_key</code>: Android Pay public key</li>
<li><code>android_pay_bgcolor</code>: Android Pay form background color</li>
<li><code>android_pay_inverse</code>: Whether to use the dark theme in the Android Pay form</li>
<li><code>need_country</code>: True, if the user country must be provided,</li>
<li><code>need_zip</code>: True, if the user ZIP/postal code must be provided,</li>
<li><code>need_cardholder_name</code>: True, if the cardholder name must be provided</li>
</ul>
<p>The payment gateway to use is decided based on the value of the <code>native_provider</code> field.</p>
<h5><a class="anchor" href="#321-stripe" id="321-stripe" name="321-stripe"><i class="anchor-icon"></i></a>3.2.1 Stripe</h5>
<pre><code><a href='/constructor/inputPaymentCredentials'>inputPaymentCredentials</a>#3417d728 flags:<a href='/type/%23'>#</a> save:flags.0?<a href='/constructor/true'>true</a> data:<a href='/type/DataJSON'>DataJSON</a> = <a href='/type/InputPaymentCredentials'>InputPaymentCredentials</a>;
<a href='/constructor/payments.paymentForm'>payments.paymentForm</a>#3f56aea3 flags:<a href='/type/%23'>#</a> can_save_credentials:flags.2?<a href='/constructor/true'>true</a> password_missing:flags.3?<a href='/constructor/true'>true</a> bot_id:<a href='/type/int'>int</a> invoice:<a href='/type/Invoice'>Invoice</a> provider_id:<a href='/type/int'>int</a> url:<a href='/type/string'>string</a> native_provider:flags.4?<a href='/type/string'>string</a> native_params:flags.4?<a href='/type/DataJSON'>DataJSON</a> saved_info:flags.0?<a href='/type/PaymentRequestedInfo'>PaymentRequestedInfo</a> saved_credentials:flags.1?<a href='/type/PaymentSavedCredentials'>PaymentSavedCredentials</a> users:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/User'>User</a>&gt; = <a href='/type/payments.PaymentForm'>payments.PaymentForm</a>;</code></pre>
<p>If the <code>native_provider</code> field is set and equal to <code>stripe</code>, the client can make use of the <a href="https://stripe.com/docs/api/tokens/object">native Stripe token APIs</a> with the <code>publishable_key</code> from the <code>native_params</code> to add a payment method to Stripe, and then use the token <code>type</code> and <code>id</code> to generate a JSON object:</p>
<pre><code>{"type":"token.type", "id":"token.id"}"</code></pre>
<p>The generated JSON object can then be passed to the <code>data</code> field of the <a href="/constructor/inputPaymentCredentials">inputPaymentCredentials</a>.
Eventually, you can set the <code>save</code> flag to save the credit card info for future use, only if <a href="/api/srp">2FA</a> is enabled.</p>
<p>Telegram <strong>does not</strong> have access to your card information. Credit card details will be handled only by the payment system.</p>
<p>Example implementation: <a href="https://github.com/DrKLO/Telegram">Telegram for Android</a>.</p>
<h4><a class="anchor" href="#33-apple-pay" id="33-apple-pay" name="33-apple-pay"><i class="anchor-icon"></i></a>3.3 Apple pay</h4>
<pre><code><a href='/constructor/inputPaymentCredentialsApplePay'>inputPaymentCredentialsApplePay</a>#aa1c39f payment_data:<a href='/type/DataJSON'>DataJSON</a> = <a href='/type/InputPaymentCredentials'>InputPaymentCredentials</a>;</code></pre>
<p>On iOS devices, Apple Pay can be used to generate payment data, which is then sent using the <a href="/constructor/inputPaymentCredentialsApplePay">inputPaymentCredentialsApplePay</a> constructor.</p>
<p>Example implementation: <a href="https://github.com/TelegramMessenger/Telegram-iOS/">Telegram for iOS</a>.</p>
<h4><a class="anchor" href="#34-android-pay" id="34-android-pay" name="34-android-pay"><i class="anchor-icon"></i></a>3.4 Android pay</h4>
<pre><code><a href='/constructor/inputPaymentCredentialsAndroidPay'>inputPaymentCredentialsAndroidPay</a>#ca05d50e payment_token:<a href='/type/DataJSON'>DataJSON</a> google_transaction_id:<a href='/type/string'>string</a> = <a href='/type/InputPaymentCredentials'>InputPaymentCredentials</a>;</code></pre>
<p>On Android devices, Google Pay can be used to generate payment data, which is then sent using the <a href="/constructor/inputPaymentCredentialsApplePay">inputPaymentCredentialsAndroidPay</a> constructor.</p>
<p>Example implementation: <a href="https://github.com/DrKLO/Telegram/blob/ff5735503e068a6f1cada09b977f633df7caf98d/TMessagesProj/src/main/java/org/telegram/ui/PaymentFormActivity.java">Telegram for Android</a>.</p>
<h4><a class="anchor" href="#35-using-saved-payment-credentials" id="35-using-saved-payment-credentials" name="35-using-saved-payment-credentials"><i class="anchor-icon"></i></a>3.5 Using saved payment credentials</h4>
<pre><code><a href='/constructor/inputPaymentCredentialsSaved'>inputPaymentCredentialsSaved</a>#c10eb2cf id:<a href='/type/string'>string</a> tmp_password:<a href='/type/bytes'>bytes</a> = <a href='/type/InputPaymentCredentials'>InputPaymentCredentials</a>;
<a href='/constructor/paymentSavedCredentialsCard'>paymentSavedCredentialsCard</a>#cdc27a1f id:<a href='/type/string'>string</a> title:<a href='/type/string'>string</a> = <a href='/type/PaymentSavedCredentials'>PaymentSavedCredentials</a>;
<a href='/constructor/payments.paymentForm'>payments.paymentForm</a>#3f56aea3 flags:<a href='/type/%23'>#</a> can_save_credentials:flags.2?<a href='/constructor/true'>true</a> password_missing:flags.3?<a href='/constructor/true'>true</a> bot_id:<a href='/type/int'>int</a> invoice:<a href='/type/Invoice'>Invoice</a> provider_id:<a href='/type/int'>int</a> url:<a href='/type/string'>string</a> native_provider:flags.4?<a href='/type/string'>string</a> native_params:flags.4?<a href='/type/DataJSON'>DataJSON</a> saved_info:flags.0?<a href='/type/PaymentRequestedInfo'>PaymentRequestedInfo</a> saved_credentials:flags.1?<a href='/type/PaymentSavedCredentials'>PaymentSavedCredentials</a> users:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/User'>User</a>&gt; = <a href='/type/payments.PaymentForm'>payments.PaymentForm</a>;
<a href='/constructor/account.tmpPassword'>account.tmpPassword</a>#db64fd34 tmp_password:<a href='/type/bytes'>bytes</a> valid_until:<a href='/type/int'>int</a> = <a href='/type/account.TmpPassword'>account.TmpPassword</a>;
---functions---
<a href='/method/account.getTmpPassword'>account.getTmpPassword</a>#449e0b51 password:<a href='/type/InputCheckPasswordSRP'>InputCheckPasswordSRP</a> period:<a href='/type/int'>int</a> = <a href='/type/account.TmpPassword'>account.TmpPassword</a>;</code></pre>
<p>To reuse saved payment methods, the <code>saved_credentials</code> field of the <a href="/constructor/payments.paymentForm">payment form</a> is used.
The <code>title</code> of the <a href="/constructor/paymentSavedCredentialsCard">paymentSavedCredentialsCard</a> can be used to preview a censored version of credit card info.
The <code>id</code> field is provided by the payment provider directly to the Telegram servers when saving the payment method, and identifies the payment method.
Full credit card info <strong>is not</strong> saved on Telegram Servers, and cannot be fetched by the user.</p>
<p>In order to <strong>use</strong> the saved payment method, <a href="/api/srp">2FA</a> must be enabled: the user must verify their identity by entering their <a href="/api/srp">2FA</a> password, which is then used as described in the <a href="/api/srp">SRP docs</a> to generate SRP parameters which must be passed to <a href="/method/account.getTmpPassword">account.getTmpPassword</a>.</p>
<p>The generated temporary password can then be used to make payments using the saved credentials using the <a href="/constructor/inputPaymentCredentialsSaved">inputPaymentCredentialsSaved</a> constructor.</p>
<ul>
<li>The <code>id</code> field is the <a href="/constructor/paymentSavedCredentialsCard">paymentSavedCredentialsCard</a> <code>id</code>.</li>
<li>The <code>tmp_password</code> is the temporary payment password generated by the server, if the user provided a correct <a href="/api/srp">2FA password</a>.</li>
</ul>
<p>Example implementation: <a href="https://github.com/DrKLO/Telegram">Telegram for Android</a>.</p>
<h3><a class="anchor" href="#4-pre-checkout" id="4-pre-checkout" name="4-pre-checkout"><i class="anchor-icon"></i></a>4. Pre-Checkout</h3>
<pre><code><a href='/constructor/inputPaymentCredentialsSaved'>inputPaymentCredentialsSaved</a>#c10eb2cf id:<a href='/type/string'>string</a> tmp_password:<a href='/type/bytes'>bytes</a> = <a href='/type/InputPaymentCredentials'>InputPaymentCredentials</a>;
<a href='/constructor/inputPaymentCredentials'>inputPaymentCredentials</a>#3417d728 flags:<a href='/type/%23'>#</a> save:flags.0?<a href='/constructor/true'>true</a> data:<a href='/type/DataJSON'>DataJSON</a> = <a href='/type/InputPaymentCredentials'>InputPaymentCredentials</a>;
<a href='/constructor/inputPaymentCredentialsApplePay'>inputPaymentCredentialsApplePay</a>#aa1c39f payment_data:<a href='/type/DataJSON'>DataJSON</a> = <a href='/type/InputPaymentCredentials'>InputPaymentCredentials</a>;
<a href='/constructor/inputPaymentCredentialsAndroidPay'>inputPaymentCredentialsAndroidPay</a>#ca05d50e payment_token:<a href='/type/DataJSON'>DataJSON</a> google_transaction_id:<a href='/type/string'>string</a> = <a href='/type/InputPaymentCredentials'>InputPaymentCredentials</a>;
<a href='/constructor/payments.paymentResult'>payments.paymentResult</a>#4e5f810d updates:<a href='/type/Updates'>Updates</a> = <a href='/type/payments.PaymentResult'>payments.PaymentResult</a>;
<a href='/constructor/payments.paymentVerificationNeeded'>payments.paymentVerificationNeeded</a>#d8411139 url:<a href='/type/string'>string</a> = <a href='/type/payments.PaymentResult'>payments.PaymentResult</a>;
---functions---
<a href='/method/payments.sendPaymentForm'>payments.sendPaymentForm</a>#2b8879b3 flags:<a href='/type/%23'>#</a> msg_id:<a href='/type/int'>int</a> requested_info_id:flags.0?<a href='/type/string'>string</a> shipping_option_id:flags.1?<a href='/type/string'>string</a> credentials:<a href='/type/InputPaymentCredentials'>InputPaymentCredentials</a> = <a href='/type/payments.PaymentResult'>payments.PaymentResult</a>;</code></pre>
<p>After <a href="#2-3-verifying-information">verifying order information</a>, the final step for the client is to call <a href="/method/payments.sendPaymentForm">payments.sendPaymentForm</a>, with the following parameters:</p>
<ul>
<li>The <code>msg_id</code> is set to the ID of the invoice message</li>
<li><code>requested_info_id</code> is set to the <code>id</code> of the <a href="#2-3-verifying-information">verified order information</a>, if it was requested</li>
<li><code>shipping_option_id</code> is set to the <a href="#2-5-select-delivery-option">selected delivery option</a>, if shipping was requested.</li>
<li><code>credentials</code> are the payment credentials generated by the payment provider, required to complete the order.</li>
</ul>
<p>Payment method info can also be saved to the Telegram Servers and reused, by setting the <code>save</code> flag of <a href="/constructor/inputPaymentCredentials">inputPaymentCredentials</a> when sending the form.
This is only possible on accounts with <a href="/api/srp">2FA</a> enabled.</p>
<p>The bot then <a href="#4-1-receiving-pre-checkout-query">replies to the received precheckout query</a>, finally the user <a href="#5-checkout">proceeds to checkout</a>.</p>
<p>Please note that if the result of the method is a <a href="/constructor/payments.paymentVerificationNeeded">payments.paymentVerificationNeeded</a>, before <a href="#5-checkout">proceeding to checkout</a> the payment provider requires the user to verify his identity by opening the provided <code>url</code> and following instructions.
Once the user finishes working with the webpage, the client can <a href="#5-checkout">proceed to checkout</a>.</p>
<p>Eventual errors are returned in the form of RPC errors, with the description of the error by the bot contained in <a href="/constructor/updateServiceNotification">service updates</a>.</p>
<h4><a class="anchor" href="#41-receiving-pre-checkout-query" id="41-receiving-pre-checkout-query" name="41-receiving-pre-checkout-query"><i class="anchor-icon"></i></a>4.1 Receiving pre-checkout query</h4>
<pre><code><a href='/constructor/paymentRequestedInfo'>paymentRequestedInfo</a>#909c3f94 flags:<a href='/type/%23'>#</a> name:flags.0?<a href='/type/string'>string</a> phone:flags.1?<a href='/type/string'>string</a> email:flags.2?<a href='/type/string'>string</a> shipping_address:flags.3?<a href='/type/PostAddress'>PostAddress</a> = <a href='/type/PaymentRequestedInfo'>PaymentRequestedInfo</a>;
<a href='/constructor/updateBotPrecheckoutQuery'>updateBotPrecheckoutQuery</a>#5d2f3aa9 flags:<a href='/type/%23'>#</a> query_id:<a href='/type/long'>long</a> user_id:<a href='/type/int'>int</a> payload:<a href='/type/bytes'>bytes</a> info:flags.0?<a href='/type/PaymentRequestedInfo'>PaymentRequestedInfo</a> shipping_option_id:flags.1?<a href='/type/string'>string</a> currency:<a href='/type/string'>string</a> total_amount:<a href='/type/long'>long</a> = <a href='/type/Update'>Update</a>;
---functions---
<a href='/method/messages.setBotPrecheckoutResults'>messages.setBotPrecheckoutResults</a>#9c2dd95 flags:<a href='/type/%23'>#</a> success:flags.1?<a href='/constructor/true'>true</a> query_id:<a href='/type/long'>long</a> error:flags.0?<a href='/type/string'>string</a> = <a href='/type/Bool'>Bool</a>;</code></pre>
<p>The user enters their payment information as described above and presses the final pay button.
At this moment the Telegram API sends an <a href="/constructor/updateBotPrecheckoutQuery">updateBotPrecheckoutQuery</a> constructor that contains all the available information about the order to the bot.
The bot must reply using <a href="/method/messages.setBotPrecheckoutResults">messages.setBotPrecheckoutResults</a> <strong>within 10 seconds</strong> after receiving this update or the transaction is canceled.</p>
<p>The bot may return an error if it cant process the order for any reason. We highly recommend specifying a reason for failure to complete the order in human readable form (e.g. "Sorry, were all out of rubber ducks! Would you be interested in a steel bear instead?"). Telegram will display this reason to the user.</p>
<h3><a class="anchor" href="#5-checkout" id="5-checkout" name="5-checkout"><i class="anchor-icon"></i></a>5. Checkout</h3>
<pre><code><a href='/constructor/keyboardButtonBuy'>keyboardButtonBuy</a>#afd93fbb text:<a href='/type/string'>string</a> = <a href='/type/KeyboardButton'>KeyboardButton</a>;
<a href='/constructor/keyboardButtonRow'>keyboardButtonRow</a>#77608b83 buttons:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/KeyboardButton'>KeyboardButton</a>&gt; = <a href='/type/KeyboardButtonRow'>KeyboardButtonRow</a>;
<a href='/constructor/replyInlineMarkup'>replyInlineMarkup</a>#48a30254 rows:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/KeyboardButtonRow'>KeyboardButtonRow</a>&gt; = <a href='/type/ReplyMarkup'>ReplyMarkup</a>;
<a href='/constructor/messageMediaInvoice'>messageMediaInvoice</a>#84551347 flags:<a href='/type/%23'>#</a> shipping_address_requested:flags.1?<a href='/constructor/true'>true</a> test:flags.3?<a href='/constructor/true'>true</a> title:<a href='/type/string'>string</a> description:<a href='/type/string'>string</a> photo:flags.0?<a href='/type/WebDocument'>WebDocument</a> receipt_msg_id:flags.2?<a href='/type/int'>int</a> currency:<a href='/type/string'>string</a> total_amount:<a href='/type/long'>long</a> start_param:<a href='/type/string'>string</a> = <a href='/type/MessageMedia'>MessageMedia</a>;
<a href='/constructor/message'>message</a>#58ae39c9 flags:<a href='/type/%23'>#</a> out:flags.1?<a href='/constructor/true'>true</a> mentioned:flags.4?<a href='/constructor/true'>true</a> media_unread:flags.5?<a href='/constructor/true'>true</a> silent:flags.13?<a href='/constructor/true'>true</a> post:flags.14?<a href='/constructor/true'>true</a> from_scheduled:flags.18?<a href='/constructor/true'>true</a> legacy:flags.19?<a href='/constructor/true'>true</a> edit_hide:flags.21?<a href='/constructor/true'>true</a> pinned:flags.24?<a href='/constructor/true'>true</a> id:<a href='/type/int'>int</a> from_id:flags.8?<a href='/type/Peer'>Peer</a> peer_id:<a href='/type/Peer'>Peer</a> fwd_from:flags.2?<a href='/type/MessageFwdHeader'>MessageFwdHeader</a> via_bot_id:flags.11?<a href='/type/int'>int</a> reply_to:flags.3?<a href='/type/MessageReplyHeader'>MessageReplyHeader</a> date:<a href='/type/int'>int</a> message:<a href='/type/string'>string</a> media:flags.9?<a href='/type/MessageMedia'>MessageMedia</a> reply_markup:flags.6?<a href='/type/ReplyMarkup'>ReplyMarkup</a> entities:flags.7?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/MessageEntity'>MessageEntity</a>&gt; views:flags.10?<a href='/type/int'>int</a> forwards:flags.10?<a href='/type/int'>int</a> replies:flags.23?<a href='/type/MessageReplies'>MessageReplies</a> edit_date:flags.15?<a href='/type/int'>int</a> post_author:flags.16?<a href='/type/string'>string</a> grouped_id:flags.17?<a href='/type/long'>long</a> restriction_reason:flags.22?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/RestrictionReason'>RestrictionReason</a>&gt; = <a href='/type/Message'>Message</a>;
<a href='/constructor/updateNewMessage'>updateNewMessage</a>#1f2b0afd message:<a href='/type/Message'>Message</a> pts:<a href='/type/int'>int</a> pts_count:<a href='/type/int'>int</a> = <a href='/type/Update'>Update</a>;
<a href='/constructor/payments.paymentReceipt'>payments.paymentReceipt</a>#500911e1 flags:<a href='/type/%23'>#</a> date:<a href='/type/int'>int</a> bot_id:<a href='/type/int'>int</a> invoice:<a href='/type/Invoice'>Invoice</a> provider_id:<a href='/type/int'>int</a> info:flags.0?<a href='/type/PaymentRequestedInfo'>PaymentRequestedInfo</a> shipping:flags.1?<a href='/type/ShippingOption'>ShippingOption</a> currency:<a href='/type/string'>string</a> total_amount:<a href='/type/long'>long</a> credentials_title:<a href='/type/string'>string</a> users:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/User'>User</a>&gt; = <a href='/type/payments.PaymentReceipt'>payments.PaymentReceipt</a>;
---functions---
<a href='/method/payments.getPaymentReceipt'>payments.getPaymentReceipt</a>#a092a980 msg_id:<a href='/type/int'>int</a> = <a href='/type/payments.PaymentReceipt'>payments.PaymentReceipt</a>;</code></pre>
<p>In case the bot confirms the order, Telegram requests the payment provider to complete the transaction. If the payment information was entered correctly and the payment goes through, the Telegram API will modify the invoice message and send a service message as described below. Once your bot receives this message, it should proceed with delivering the goods or services purchased by the user.</p>
<p>If all is OK, the user receives a <a href="/constructor/payments.paymentResult">payments.paymentResult</a> in reply to the <a href="/method/payments.sendPaymentForm">payments.sendPaymentForm</a> query, containing info about the updated invoice message in the form of an <a href="/constructor/updateEditMessage">updateEditMessage</a>.</p>
<p>The invoice message will be updated as follows: the attached <a href="/constructor/messageMediaInvoice">messageMediaInvoice</a> will now have a <code>receipt_msg_id</code> field.
Clients should treat invoice messages with a <code>receipt_msg_id</code> field as receipt messages, <strong>locally</strong> modifying the label of the <a href="/constructor/keyboardButtonBuy">keyboardButtonBuy</a> button to a localized version of the word <code>Receipt</code>.
From this point, clicking on the <code>Receipt</code> button should trigger a call to <a href="/method/payments.getPaymentReceipt">payments.getPaymentReceipt</a>, providing the <code>receipt_msg_id</code> to the <code>msg_id</code> field, which will return info about the transaction.</p>
<p>The payment will also generate one service message of type <a href="/constructor/messageActionPaymentSent">messageActionPaymentSent</a> or <a href="/constructor/messageActionPaymentSentMe">messageActionPaymentSentMe</a>, replying to the invoice.
For bots, the service message will be of type <a href="/constructor/messageActionPaymentSentMe">messageActionPaymentSentMe</a>, for users it will be a <a href="/constructor/messageActionPaymentSent">messageActionPaymentSent</a>.</p>
<pre><code><a href='/constructor/messageActionPaymentSentMe'>messageActionPaymentSentMe</a>#8f31b327 flags:<a href='/type/%23'>#</a> currency:<a href='/type/string'>string</a> total_amount:<a href='/type/long'>long</a> payload:<a href='/type/bytes'>bytes</a> info:flags.0?<a href='/type/PaymentRequestedInfo'>PaymentRequestedInfo</a> shipping_option_id:flags.1?<a href='/type/string'>string</a> charge:<a href='/type/PaymentCharge'>PaymentCharge</a> = <a href='/type/MessageAction'>MessageAction</a>;
<a href='/constructor/messageActionPaymentSent'>messageActionPaymentSent</a>#40699cd0 currency:<a href='/type/string'>string</a> total_amount:<a href='/type/long'>long</a> = <a href='/type/MessageAction'>MessageAction</a>;</code></pre></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script src="/js/jquery.min.js?1"></script>
<script src="/js/bootstrap.min.js"></script>
<script>window.initDevPageNav&&initDevPageNav();
backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>

View file

@ -0,0 +1,138 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>Perfect Forward Secrecy</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Binding temporary authorization key to permanent ones.">
<meta property="og:title" content="Perfect Forward Secrecy">
<meta property="og:image" content="a2b9f721d645a85533">
<meta property="og:description" content="Binding temporary authorization key to permanent ones.">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class="active"><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class=""><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/api/pfs" >Perfect Forward Secrecy</a></li></ul></div>
<h1 id="dev_page_title">Perfect Forward Secrecy</h1>
<div id="dev_page_content"><h5><a class="anchor" href="#related-articles" id="related-articles" name="related-articles"><i class="anchor-icon"></i></a>Related articles</h5>
<p><div class="dev_page_nav_wrap"></p>
<ul>
<li><a href="/api/end-to-end/pfs">Perfect Forward Secrecy in Secret Chats</a></li>
<li><a href="/mtproto/security_guidelines">Security guidelines for developers</a></li>
</ul>
<p></div></p>
<blockquote>
<p><em>This article is about Perfect Forward Secrecy in cloud chats, see also <a href="/api/end-to-end/pfs">PFS in Secret Chats</a>.</em></p>
</blockquote>
<hr>
<p>Telegram supports Perfect Forward Secrecy (PFS).</p>
<p>To make this possible, the client generates a permanent authorization key using <strong>p_q_inner_data</strong> and a temporary key using <strong>p_q_inner_data_temp</strong>. (See <a href="/mtproto/auth_key">Creating an Authorization Key</a> for more info.) These 2 operations may be done in parallel and even using the same connection. The client must save an <strong>expires_at</strong> unix timestamp <code>expires_at = time + expires_in</code>.</p>
<p><strong>Important</strong>: in order to achieve PFS, the client must <strong>never</strong> use the permanent auth_key_id directly. Every message that is sent to MTProto, must be encrypted by a <strong>temp_auth_key_id</strong>, that was bound to the <strong>perm_auth_key_id</strong>.</p>
<p>An unbound <strong>temp_auth_key_id</strong> may only be used with the following methods:</p>
<ul>
<li><a href="/method/auth.bindTempAuthKey">auth.bindTempAuthKey</a></li>
<li><a href="/method/help.getConfig">help.getConfig</a></li>
<li><a href="/method/help.getNearestDc">help.getNearestDc</a></li>
</ul>
<p>In order to bind a temporary authorization key to the permanent key the client creates a <a href="/method/auth.bindTempAuthKey#binding-message-contents">special binding message</a> and executes the <a href="/method/auth.bindTempAuthKey">auth.bindTempAuthKey</a> method using <strong>temp_auth_key</strong>. Once <strong>auth.bindTempAuthKey</strong> has been executed successfully, the client may signUp / signIn using other auth.* methods and continue using the API as usual; the client must also <a href="/api/invoking#saving-client-info">rewrite client info</a> using <a href="/method/initConnection">initConnection</a> after each binding. Each permanent key may only be bound to <strong>one</strong> temporary key at a time, binding a new temporary key overwrites the previous one.</p>
<p>Once the temporary key expires, the client needs to generate a new temporary key using <strong>p_q_inner_data_temp</strong>. Then it needs to re-bind that new temporary key to the initial permanent key. A new key can also be generated in advance, so that the client has a new key ready by the time the old one has expired.</p>
<p>For additional security, the client can store the temporary authorization key in RAM only and never save it in persistent storage.</p>
<p>A temporary authorization key may expire at any moment before <strong>expires_at</strong>, since such keys are also stored only in the RAM on the server-side. Be prepared to handle resulting MTProto errors correctly (non-existent auth_key_id results in a 404 error).</p></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script>backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>

View file

@ -0,0 +1,985 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>Handling PUSH-notifications</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="How to subscribe to and handle PUSH notifications ">
<meta property="og:title" content="Handling PUSH-notifications">
<meta property="og:image" content="f171b7d56879c20c22">
<meta property="og:description" content="How to subscribe to and handle PUSH notifications ">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class="active"><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class=""><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/api/push-updates" >Handling PUSH-notifications</a></li></ul></div>
<h1 id="dev_page_title">Handling PUSH-notifications</h1>
<div id="dev_page_content"><!-- scroll_nav -->
<h3><a class="anchor" href="#configuring-the-application" id="configuring-the-application" name="configuring-the-application"><i class="anchor-icon"></i></a>Configuring the application</h3>
<p>To be able to send APNS notifications to Apple servers or GCM notifications to Google servers, application certificates (APNS) or an application key (GCM) must be specified in the <a href="/myapp">application settings</a>.</p>
<h3><a class="anchor" href="#subscribing-to-notifications" id="subscribing-to-notifications" name="subscribing-to-notifications"><i class="anchor-icon"></i></a>Subscribing to notifications</h3>
<p>To subscribe to notifications, the client must invoke the <a href="/method/account.registerDevice">account.registerDevice</a> query, passing in <strong>token_type</strong> and <strong>token</strong> as parameters that identify the current device. It is useful to repeat this query at least once every 24 hours or when restarting the application. Use <a href="/method/account.unregisterDevice">account.unregisterDevice</a> to unsubscribe.</p>
<p>The following modes are supported:</p>
<ul>
<li><code>1</code> - APNS (device token for apple push)</li>
<li><code>2</code> - FCM (firebase token for google firebase)</li>
<li><code>3</code> - MPNS (channel URI for microsoft push)</li>
<li><code>4</code> - Deprecated: Simple push (endpoint for firefox's simple push API)</li>
<li><code>5</code> - Ubuntu phone (token for ubuntu push)</li>
<li><code>6</code> - Blackberry (token for blackberry push)</li>
<li><code>7</code> - MTProto separate session</li>
<li><code>8</code> - WNS (windows push)</li>
<li><code>9</code> - APNS VoIP (token for apple push VoIP)</li>
<li><code>10</code> - Web push (web push, see below)</li>
<li><code>11</code> - MPNS VoIP (token for microsoft push VoIP)</li>
<li><code>12</code> - Tizen (token for tizen push)</li>
</ul>
<p>For <code>10</code> web push, the token must be a JSON-encoded object with the following keys:</p>
<ul>
<li><code>endpoint</code>: Absolute URL exposed by the push service where the application server can send push messages</li>
<li><code>keys</code>: P-256 elliptic curve Diffie-Hellman parameters in the following object<ul>
<li><code>p256dh</code>: Base64url-encoded P-256 elliptic curve Diffie-Hellman public key</li>
<li><code>auth</code>: Base64url-encoded authentication secret</li>
</ul>
</li>
</ul>
<h3><a class="anchor" href="#notification-encryption" id="notification-encryption" name="notification-encryption"><i class="anchor-icon"></i></a>Notification encryption</h3>
<p>For FCM and APNS VoIP, an optional encryption key used to encrypt push notifications can be passed to <a href="/method/account.registerDevice">account.registerDevice</a> (<code>secret</code>). This key (<code>auth_key</code>) is used to encrypt the payloads using <a href="/mtproto/description">MTProto v2</a>.</p>
<p>The FCM payload will be a JSON payload, containing a <code>p</code> field with the base64-encoded encrypted <a href="/mtproto/description">MTProto payload</a>. After decryption, the result will be a JSON object, prefixed by a 32-bit little-endian integer with the length of the JSON payload. As usual, make sure to follow all security checks as described in the <a href="/mtproto/description#important-checks">MTProto docs</a>.</p>
<p><a href="https://github.com/DrKLO/Telegram/blob/ff5735503e068a6f1cada09b977f633df7caf98d/TMessagesProj/src/main/java/org/telegram/messenger/GcmPushListenerService.java#L563">Example implementation</a>.</p>
<p>As mentioned <a href="#subscribing-to-notifications">above</a>, payloads can also be encrypted using <a href="https://tools.ietf.org/html/rfc8291">P-256 Elliptic Curve Diffie-Hellman when using web push</a>.</p>
<h3><a class="anchor" href="#notification-structure" id="notification-structure" name="notification-structure"><i class="anchor-icon"></i></a>Notification structure</h3>
<p>An (<a href="#notification-encryption">optionally encrypted</a>) notification is provided as a JSON object in the following format:</p>
<pre><code>{
"data": {
"loc_key": "CHAT_MESSAGE_CONTACT",
"loc_args": ["John Doe", "My magical group", "Contact Exchange"],
"user_id": 14124122,
"custom": {
"chat_id": 241233,
"msg_id": 123
},
"sound": "sound1.mp3",
}
}</code></pre>
<p>Each notification has several parameters that describe it.</p>
<h4><a class="anchor" href="#notification-type" id="notification-type" name="notification-type"><i class="anchor-icon"></i></a>Notification type</h4>
<p><strong>data.loc_key</strong> - A string literal in the form <code>/[A-Z_0-9]+/</code>, which summarizes the notification. For example, <code>CHAT_MESSAGE_TEXT</code>.</p>
<h4><a class="anchor" href="#notification-text-arguments" id="notification-text-arguments" name="notification-text-arguments"><i class="anchor-icon"></i></a>Notification text arguments</h4>
<p><strong>data.loc_args</strong> - A list or arguments which, when inserted into a template, produce a readable notification.</p>
<h4><a class="anchor" href="#custom-parameters" id="custom-parameters" name="custom-parameters"><i class="anchor-icon"></i></a>Custom parameters</h4>
<p><strong>data.custom</strong> - Parameters which are be passed into the application when a notification is opened.</p>
<h4><a class="anchor" href="#sound" id="sound" name="sound"><i class="anchor-icon"></i></a>Sound</h4>
<p><strong>data.sound</strong> - The name of an audio file to be played.</p>
<h4><a class="anchor" href="#user-id" id="user-id" name="user-id"><i class="anchor-icon"></i></a>User id</h4>
<p><strong>data.user_id</strong> - ID of the account to which the PUSH notification should be delivered, in case of clients with multiple accounts active and running.</p>
<h3><a class="anchor" href="#processing-notifications" id="processing-notifications" name="processing-notifications"><i class="anchor-icon"></i></a>Processing notifications</h3>
<p>In principle, <strong>data.loc_key</strong>, <strong>data.custom</strong>, and an Internet connection are sufficient to generate a notification. Obviously, if possible, when generating a visual notification you need not use all of the transmitted data and may rely on the information already stored on the client. But if a user or a chat is not cached locally, the values passed in loc_args may also be used. <strong>data.user_id</strong> is the ID of the account to which the PUSH notification should be delivered, in case of clients with multiple accounts active and running.</p>
<h3><a class="anchor" href="#service-notifications" id="service-notifications" name="service-notifications"><i class="anchor-icon"></i></a>Service notifications</h3>
<p>The following notifications can be used to update app settings.</p>
<table class="table">
<thead>
<tr>
<th>Type</th>
<th>Extra custom arguments</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>DC_UPDATE</td>
<td><strong>dc</strong> - number of the data-center<br><strong>addr</strong> - server address with port number in the format <code>111.112.113.114:443</code></td>
<td>In case the client gets this notification, it is necessary to add the received server address to the list of possible addresses. In case the address of the first DC was passed (<code>dc=1</code>), it is recommended to call it immediately using <a href="/method/help.getConfig">help.getConfig</a> to update dc-configuration.</td>
</tr>
<tr>
<td>MESSAGE_DELETED</td>
<td><strong>channel_id</strong>: For <a href="/api/channel">channels and supergroups</a>, <a href="/api/channel">Channel/supergroup</a> identifier<br><strong>chat_id</strong>: For <a href="/api/channel">chats</a>, <a href="/api/channel">Chat</a> identifier<br><strong>from_id</strong>: For PMs, Author identifier<br><strong>messages</strong>: Comma-separated IDs of messages that were deleted</td>
<td>Messages were deleted, remove multiple notifications for this chat</td>
</tr>
<tr>
<td>READ_HISTORY</td>
<td><strong>channel_id</strong>: For <a href="/api/channel">channels and supergroups</a>, <a href="/api/channel">Channel/supergroup</a> identifier<br><strong>chat_id</strong>: For <a href="/api/channel">chats</a>, <a href="/api/channel">Chat</a> identifier<br><strong>from_id</strong>: For PMs, Author identifier<br><strong>max_id</strong>: Maximum ID of read messages</td>
<td>Message history was read, remove multiple notifications for this chat</td>
</tr>
<tr>
<td>GEO_LIVE_PENDING</td>
<td> </td>
<td>Any of the live locations currently being shared should be updated</td>
</tr>
<tr>
<td>SESSION_REVOKE</td>
<td> </td>
<td>Logout and remove DB for specified session by <strong>data.user_id</strong>, only apply if coming from an <a href="#notification-encryption">MTProto-encrypted payload</a></td>
</tr>
<tr>
<td>MESSAGE_MUTED</td>
<td> </td>
<td>Sent rarely, every 10th message in chats or once per 15 sec in PM, to update badge or download messages</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#possible-notifications" id="possible-notifications" name="possible-notifications"><i class="anchor-icon"></i></a>Possible Notifications</h3>
<table class="table">
<thead>
<tr>
<th>Type</th>
<th>Template example</th>
<th>Arguments</th>
<th>Extra custom arguments</th>
</tr>
</thead>
<tbody>
<tr>
<td>MESSAGE_PLAYLIST</td>
<td>{1} sent you {2} music files</td>
<td>1. User name<br>2. Number of audio files that were sent</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>from_id</strong>: Author identifier<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>MESSAGE_DOCS</td>
<td>{1} sent you {2} files</td>
<td>1. User name<br>2. Number of documents that were sent</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media (related to the first message)<br><strong>chat_from_id</strong>: Groups only, message author identifier (related to the first message)<br><strong>edit_date</strong>: When was the message last edited (related to the first message)<br><strong>from_id</strong>: Author identifier (related to the first message)<br><strong>mention</strong>: Whether the user was mentioned in the message (related to the first message)<br><strong>msg_id</strong>: ID of the message (related to the first message)<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued) (related to the first message)</td>
</tr>
<tr>
<td>CHAT_MESSAGE_PLAYLIST</td>
<td>{1} sent {3} music files to the group {2}</td>
<td>1. User name<br>2. Group name<br>3. Number of audio files that were sent</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>chat_id</strong>: <a href="/api/channel">Chat</a> identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>CHAT_MESSAGE_DOCS</td>
<td>{1} sent {3} files to the group {2}</td>
<td>1. User name<br>2. Group name<br>3. Number of documents that were sent</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media (related to the first message)<br><strong>chat_from_id</strong>: Groups only, message author identifier (related to the first message)<br><strong>chat_id</strong>: <a href="/api/channel">Chat</a> identifier (related to the first message)<br><strong>edit_date</strong>: When was the message last edited (related to the first message)<br><strong>mention</strong>: Whether the user was mentioned in the message (related to the first message)<br><strong>msg_id</strong>: ID of the message (related to the first message)<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued) (related to the first message)</td>
</tr>
<tr>
<td>CHANNEL_MESSAGE_PLAYLIST</td>
<td>{1} posted {2} music files</td>
<td>1. Channel name<br>2. Number of audio files that were posted</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>channel_id</strong>: <a href="/api/channel">Channel/supergroup</a> identifier<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>CHANNEL_MESSAGE_DOCS</td>
<td>{1} posted {2} files</td>
<td>1. Channel name<br>2. Number of documents that were posted</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media (related to the first message)<br><strong>channel_id</strong>: <a href="/api/channel">Channel/supergroup</a> identifier (related to the first message)<br><strong>chat_from_id</strong>: Groups only, message author identifier (related to the first message)<br><strong>edit_date</strong>: When was the message last edited (related to the first message)<br><strong>mention</strong>: Whether the user was mentioned in the message (related to the first message)<br><strong>msg_id</strong>: ID of the message (related to the first message)<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued) (related to the first message)</td>
</tr>
<tr>
<td>MESSAGE_TEXT</td>
<td>{1}: {2}</td>
<td>1. Message author<br>2. Message body</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>from_id</strong>: Author identifier<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>scheduled</strong>: Whether this is a scheduled message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>MESSAGE_NOTEXT</td>
<td>{1} sent you a message</td>
<td>1. Message author</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>from_id</strong>: Author identifier<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>scheduled</strong>: Whether this is a scheduled message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>MESSAGE_PHOTO</td>
<td>{1} sent you a photo</td>
<td>1. Message author</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>from_id</strong>: Author identifier<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>scheduled</strong>: Whether this is a scheduled message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>MESSAGE_PHOTO_SECRET</td>
<td>{1} sent you a self-destructing photo</td>
<td>1. User name</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>from_id</strong>: Author identifier<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>scheduled</strong>: Whether this is a scheduled message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>MESSAGE_VIDEO</td>
<td>{1} sent you a video</td>
<td>1. Message author</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>from_id</strong>: Author identifier<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>scheduled</strong>: Whether this is a scheduled message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>MESSAGE_VIDEO_SECRET</td>
<td>{1} sent you a self-destructing video</td>
<td>1. User name</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>from_id</strong>: Author identifier<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>scheduled</strong>: Whether this is a scheduled message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>MESSAGE_SCREENSHOT</td>
<td>{1} took a screenshot</td>
<td>1. User name</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>from_id</strong>: Author identifier<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>scheduled</strong>: Whether this is a scheduled message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>MESSAGE_ROUND</td>
<td>{1} sent you a video message</td>
<td>1. User name</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>from_id</strong>: Author identifier<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>scheduled</strong>: Whether this is a scheduled message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>MESSAGE_DOC</td>
<td>{1} sent you a file</td>
<td>1. User name</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>from_id</strong>: Author identifier<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>scheduled</strong>: Whether this is a scheduled message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>MESSAGE_STICKER</td>
<td>{1} sent you a {2}sticker</td>
<td>1. User name<br>2. Sticker emoji with included trailing space or empty string</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>from_id</strong>: Author identifier<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>scheduled</strong>: Whether this is a scheduled message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>MESSAGE_AUDIO</td>
<td>{1} sent you a voice message</td>
<td>1. Message author</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>from_id</strong>: Author identifier<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>scheduled</strong>: Whether this is a scheduled message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>MESSAGE_CONTACT</td>
<td>{1} shared a contact {2} with you</td>
<td>1. User name<br>2. Contact name</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>from_id</strong>: Author identifier<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>scheduled</strong>: Whether this is a scheduled message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>MESSAGE_QUIZ</td>
<td>{1} sent you a quiz {2}</td>
<td>1. User name<br>2. Quiz name</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>from_id</strong>: Author identifier<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>scheduled</strong>: Whether this is a scheduled message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>MESSAGE_GEO</td>
<td>{1} sent you a map</td>
<td>1. Message author</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>from_id</strong>: Author identifier<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>scheduled</strong>: Whether this is a scheduled message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>MESSAGE_GEOLIVE</td>
<td>{1} started sharing their live location</td>
<td>1. User name</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>from_id</strong>: Author identifier<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>scheduled</strong>: Whether this is a scheduled message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>MESSAGE_POLL</td>
<td>{1} sent you a poll {2}</td>
<td>1. User name<br>2. Poll name</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>from_id</strong>: Author identifier<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>scheduled</strong>: Whether this is a scheduled message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>MESSAGE_GIF</td>
<td>{1} sent you a GIF</td>
<td>1. User name</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>from_id</strong>: Author identifier<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>scheduled</strong>: Whether this is a scheduled message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>MESSAGE_GAME</td>
<td>{1} invited you to play {2}</td>
<td>1. User name<br>2. Game name</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>from_id</strong>: Author identifier<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>scheduled</strong>: Whether this is a scheduled message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>MESSAGE_GAME_SCORE</td>
<td>{1} scored {3} in game {2}</td>
<td>1. User name<br>2. Game name<br>3. Score</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>from_id</strong>: Author identifier<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>scheduled</strong>: Whether this is a scheduled message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>MESSAGE_INVOICE</td>
<td>{1} sent you an invoice for {2}</td>
<td>1. User name<br>2. Product</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>from_id</strong>: Author identifier<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>scheduled</strong>: Whether this is a scheduled message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>MESSAGE_FWDS</td>
<td>{1} forwarded you {2} messages</td>
<td>1. User name<br>2. Number of messages that were forwarded</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media (related to the first message)<br><strong>chat_from_id</strong>: Groups only, message author identifier (related to the first message)<br><strong>edit_date</strong>: When was the message last edited (related to the first message)<br><strong>from_id</strong>: Author identifier (related to the first message)<br><strong>mention</strong>: Whether the user was mentioned in the message (related to the first message)<br><strong>msg_id</strong>: ID of the message (related to the first message)<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued) (related to the first message)</td>
</tr>
<tr>
<td>MESSAGE_PHOTOS</td>
<td>{1} sent you {2} photos</td>
<td>1. User name<br>2. Number of photos that were sent</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media (related to the first message)<br><strong>chat_from_id</strong>: Groups only, message author identifier (related to the first message)<br><strong>edit_date</strong>: When was the message last edited (related to the first message)<br><strong>from_id</strong>: Author identifier (related to the first message)<br><strong>mention</strong>: Whether the user was mentioned in the message (related to the first message)<br><strong>msg_id</strong>: ID of the message (related to the first message)<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued) (related to the first message)</td>
</tr>
<tr>
<td>MESSAGE_VIDEOS</td>
<td>{1} sent you {2} videos</td>
<td>1. User name<br>2. Number of videos that were sent</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media (related to the first message)<br><strong>chat_from_id</strong>: Groups only, message author identifier (related to the first message)<br><strong>edit_date</strong>: When was the message last edited (related to the first message)<br><strong>from_id</strong>: Author identifier (related to the first message)<br><strong>mention</strong>: Whether the user was mentioned in the message (related to the first message)<br><strong>msg_id</strong>: ID of the message (related to the first message)<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued) (related to the first message)</td>
</tr>
<tr>
<td>MESSAGES</td>
<td>{1} sent you an album</td>
<td>1. User name</td>
<td><strong>from_id</strong>: author identifier</td>
</tr>
<tr>
<td>CHANNEL_MESSAGE_TEXT</td>
<td>{1}: {2}</td>
<td>1. Channel name<br>2. Message body</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>channel_id</strong>: <a href="/api/channel">Channel/supergroup</a> identifier<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>scheduled</strong>: Whether this is a scheduled message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>CHANNEL_MESSAGE_NOTEXT</td>
<td>{1} posted a message</td>
<td>1. Channel name</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>channel_id</strong>: <a href="/api/channel">Channel/supergroup</a> identifier<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>scheduled</strong>: Whether this is a scheduled message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>CHANNEL_MESSAGE_PHOTO</td>
<td>{1} posted a photo</td>
<td>1. Channel name</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>channel_id</strong>: <a href="/api/channel">Channel/supergroup</a> identifier<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>scheduled</strong>: Whether this is a scheduled message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>CHANNEL_MESSAGE_VIDEO</td>
<td>{1} posted a video</td>
<td>1. Channel name</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>channel_id</strong>: <a href="/api/channel">Channel/supergroup</a> identifier<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>scheduled</strong>: Whether this is a scheduled message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>CHANNEL_MESSAGE_ROUND</td>
<td>{1} posted a video message</td>
<td>1. Channel name</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>channel_id</strong>: <a href="/api/channel">Channel/supergroup</a> identifier<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>scheduled</strong>: Whether this is a scheduled message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>CHANNEL_MESSAGE_DOC</td>
<td>{1} posted a file</td>
<td>1. Message author</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>channel_id</strong>: <a href="/api/channel">Channel/supergroup</a> identifier<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>scheduled</strong>: Whether this is a scheduled message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>CHANNEL_MESSAGE_STICKER</td>
<td>{1} posted a {2}sticker</td>
<td>1. Channel name<br>2. Sticker emoji with included trailing space or empty string</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>channel_id</strong>: <a href="/api/channel">Channel/supergroup</a> identifier<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>scheduled</strong>: Whether this is a scheduled message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>CHANNEL_MESSAGE_AUDIO</td>
<td>{1} posted a voice message</td>
<td>1. Message author</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>channel_id</strong>: <a href="/api/channel">Channel/supergroup</a> identifier<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>scheduled</strong>: Whether this is a scheduled message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>CHANNEL_MESSAGE_CONTACT</td>
<td>{1} posted a contact {2}</td>
<td>1. Message author<br>2. Contact name</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>channel_id</strong>: <a href="/api/channel">Channel/supergroup</a> identifier<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>scheduled</strong>: Whether this is a scheduled message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>CHANNEL_MESSAGE_GEO</td>
<td>{1} posted a map</td>
<td>1. Channel name</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>channel_id</strong>: <a href="/api/channel">Channel/supergroup</a> identifier<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>scheduled</strong>: Whether this is a scheduled message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>CHANNEL_MESSAGE_GEOLIVE</td>
<td>{1} posted a live location</td>
<td>1. Channel name</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>channel_id</strong>: <a href="/api/channel">Channel/supergroup</a> identifier<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>scheduled</strong>: Whether this is a scheduled message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>CHANNEL_MESSAGE_POLL</td>
<td>{1} posted a poll {2}</td>
<td>1. Channel name<br>2. Poll name</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>channel_id</strong>: <a href="/api/channel">Channel/supergroup</a> identifier<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>scheduled</strong>: Whether this is a scheduled message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>CHANNEL_MESSAGE_QUIZ</td>
<td>{1} posted a quiz {2}</td>
<td>1. Channel name<br>2. Quiz name</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>channel_id</strong>: <a href="/api/channel">Channel/supergroup</a> identifier<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>scheduled</strong>: Whether this is a scheduled message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>CHANNEL_MESSAGE_GIF</td>
<td>{1} posted a GIF</td>
<td>1. Channel name</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>channel_id</strong>: <a href="/api/channel">Channel/supergroup</a> identifier<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>scheduled</strong>: Whether this is a scheduled message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>CHANNEL_MESSAGE_GAME</td>
<td>{1} invited you to play {2}</td>
<td>1. Message author<br>2. Game name</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>channel_id</strong>: <a href="/api/channel">Channel/supergroup</a> identifier<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>scheduled</strong>: Whether this is a scheduled message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>CHANNEL_MESSAGE_GAME_SCORE</td>
<td>{1} scored {3} in game {2}</td>
<td>1. User<br>2. Game name<br>3. Score</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>channel_id</strong>: <a href="/api/channel">Channel/supergroup</a> identifier<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>scheduled</strong>: Whether this is a scheduled message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>CHANNEL_MESSAGE_FWDS</td>
<td>{1} posted {2} forwarded messages</td>
<td>1. Message author<br>2. Number of forwarded messages</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media (related to the first message)<br><strong>channel_id</strong>: <a href="/api/channel">Channel/supergroup</a> identifier (related to the first message)<br><strong>chat_from_id</strong>: Groups only, message author identifier (related to the first message)<br><strong>edit_date</strong>: When was the message last edited (related to the first message)<br><strong>mention</strong>: Whether the user was mentioned in the message (related to the first message)<br><strong>msg_id</strong>: ID of the message (related to the first message)<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued) (related to the first message)</td>
</tr>
<tr>
<td>CHANNEL_MESSAGE_PHOTOS</td>
<td>{1} posted {2} photos</td>
<td>1. Channel name<br>2. Number of photos that was sent</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media (related to the first message)<br><strong>channel_id</strong>: <a href="/api/channel">Channel/supergroup</a> identifier (related to the first message)<br><strong>chat_from_id</strong>: Groups only, message author identifier (related to the first message)<br><strong>edit_date</strong>: When was the message last edited (related to the first message)<br><strong>mention</strong>: Whether the user was mentioned in the message (related to the first message)<br><strong>msg_id</strong>: ID of the message (related to the first message)<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued) (related to the first message)</td>
</tr>
<tr>
<td>CHANNEL_MESSAGE_VIDEOS</td>
<td>{1} posted {2} videos</td>
<td>1. Channel name<br>2. Number of videos that were posted</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media (related to the first message)<br><strong>channel_id</strong>: <a href="/api/channel">Channel/supergroup</a> identifier (related to the first message)<br><strong>chat_from_id</strong>: Groups only, message author identifier (related to the first message)<br><strong>edit_date</strong>: When was the message last edited (related to the first message)<br><strong>mention</strong>: Whether the user was mentioned in the message (related to the first message)<br><strong>msg_id</strong>: ID of the message (related to the first message)<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued) (related to the first message)</td>
</tr>
<tr>
<td>CHANNEL_MESSAGES</td>
<td>{1} posted an album</td>
<td>1. Message author</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media (related to the first message)<br><strong>channel_id</strong>: <a href="/api/channel">Channel/supergroup</a> identifier (related to the first message)<br><strong>chat_from_id</strong>: Groups only, message author identifier (related to the first message)<br><strong>edit_date</strong>: When was the message last edited (related to the first message)<br><strong>mention</strong>: Whether the user was mentioned in the message (related to the first message)<br><strong>msg_id</strong>: ID of the message (related to the first message)<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued) (related to the first message)</td>
</tr>
<tr>
<td>CHAT_MESSAGE_TEXT</td>
<td>{1}@{2}: {3}</td>
<td>1. Message author<br>2. Chat name<br>3. Message body</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>chat_id</strong>: <a href="/api/channel">Chat</a> identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>scheduled</strong>: Whether this is a scheduled message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>CHAT_MESSAGE_NOTEXT</td>
<td>{1} sent a message to the group {2}</td>
<td>1. Message author<br>2. Chat name</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>chat_id</strong>: <a href="/api/channel">Chat</a> identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>scheduled</strong>: Whether this is a scheduled message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>CHAT_MESSAGE_PHOTO</td>
<td>{1} sent a photo to the group {2}</td>
<td>1. Message author<br>2. Chat name</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>chat_id</strong>: <a href="/api/channel">Chat</a> identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>scheduled</strong>: Whether this is a scheduled message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>CHAT_MESSAGE_VIDEO</td>
<td>{1} sent a video to the group {2}</td>
<td>1. Message author<br>2. Chat name</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>chat_id</strong>: <a href="/api/channel">Chat</a> identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>scheduled</strong>: Whether this is a scheduled message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>CHAT_MESSAGE_ROUND</td>
<td>{1} sent a video message to the group {2}</td>
<td>1. User name<br>2. Group name</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>chat_id</strong>: <a href="/api/channel">Chat</a> identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>scheduled</strong>: Whether this is a scheduled message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>CHAT_MESSAGE_DOC</td>
<td>{1} sent a file to the group {2}</td>
<td>1. User name<br>2. Group name</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>chat_id</strong>: <a href="/api/channel">Chat</a> identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>scheduled</strong>: Whether this is a scheduled message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>CHAT_MESSAGE_STICKER</td>
<td>{1} sent a {3}sticker to the group {2}</td>
<td>1. User name<br>2. Group name<br>3. Sticker emoji with included trailing space or empty string</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>chat_id</strong>: <a href="/api/channel">Chat</a> identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>scheduled</strong>: Whether this is a scheduled message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>CHAT_MESSAGE_AUDIO</td>
<td>{1} sent a voice message to the group {2}</td>
<td>1. Message author<br>2. Chat name</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>chat_id</strong>: <a href="/api/channel">Chat</a> identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>scheduled</strong>: Whether this is a scheduled message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>CHAT_MESSAGE_CONTACT</td>
<td>{1} shared a contact {3} in the group {2}</td>
<td>1. User name<br>2. Group name<br>3. Contact name</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>chat_id</strong>: <a href="/api/channel">Chat</a> identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>scheduled</strong>: Whether this is a scheduled message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>CHAT_MESSAGE_GEO</td>
<td>{1} sent a map to the group {2}</td>
<td>1. Message author<br>2. Chat name</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>chat_id</strong>: <a href="/api/channel">Chat</a> identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>scheduled</strong>: Whether this is a scheduled message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>CHAT_MESSAGE_GEOLIVE</td>
<td>{1} started sharing their live location with {2}</td>
<td>1. User name<br>2. Group name</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>chat_id</strong>: <a href="/api/channel">Chat</a> identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>scheduled</strong>: Whether this is a scheduled message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>CHAT_MESSAGE_POLL</td>
<td>{1} sent a poll {3} to the group {2}</td>
<td>1. User name<br>2. Group name<br>3. Poll name</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>chat_id</strong>: <a href="/api/channel">Chat</a> identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>scheduled</strong>: Whether this is a scheduled message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>CHAT_MESSAGE_QUIZ</td>
<td>{1} sent a quiz {3} to the group {2}</td>
<td>1. User name<br>2. Group name<br>3. Quiz name</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>chat_id</strong>: <a href="/api/channel">Chat</a> identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>scheduled</strong>: Whether this is a scheduled message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>CHAT_MESSAGE_GIF</td>
<td>{1} sent a GIF to the group {2}</td>
<td>1. User name<br>2. Group name</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>chat_id</strong>: <a href="/api/channel">Chat</a> identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>scheduled</strong>: Whether this is a scheduled message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>CHAT_MESSAGE_GAME</td>
<td>{1} invited the group {2} to play {3}.</td>
<td>1. User name<br>2. Group name<br>3. Game name</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>chat_id</strong>: <a href="/api/channel">Chat</a> identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>scheduled</strong>: Whether this is a scheduled message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>CHAT_MESSAGE_GAME_SCORE</td>
<td>{1} scored {4} in game {3} in the group {2}</td>
<td>1. User name<br>2. Group name<br>3. Game name<br>4. Score</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>chat_id</strong>: <a href="/api/channel">Chat</a> identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>scheduled</strong>: Whether this is a scheduled message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>CHAT_MESSAGE_INVOICE</td>
<td>{1} sent an invoice to the group {2} for {3}</td>
<td>1. User name<br>2. Group name<br>3. Product name</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>chat_id</strong>: <a href="/api/channel">Chat</a> identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>scheduled</strong>: Whether this is a scheduled message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>CHAT_CREATED</td>
<td>{1} invited you to the group {2}</td>
<td>1. Message author<br>2. Chat name</td>
<td><strong>chat_id</strong>: chat identifier</td>
</tr>
<tr>
<td>CHAT_TITLE_EDITED</td>
<td>{1} edited the group's {2} name</td>
<td>1. User name<br>2. Group name</td>
<td><strong>chat_id</strong>: chat identifier</td>
</tr>
<tr>
<td>CHAT_PHOTO_EDITED</td>
<td>{1} edited the group's {2} photo</td>
<td>1. Message author<br>2. Chat name</td>
<td><strong>chat_from_id</strong>: Message author identifier<br><strong>chat_id</strong>: chat identifier<br><strong>msg_id</strong>: ID of the message</td>
</tr>
<tr>
<td>CHAT_ADD_MEMBER</td>
<td>{1} invited {3} to the group {2}</td>
<td>1. Message author<br>2. Chat name<br>3. New participant name</td>
<td><strong>chat_id</strong>: chat identifier</td>
</tr>
<tr>
<td>CHAT_ADD_YOU</td>
<td>{1} invited you to the group {2}</td>
<td>1. User name<br>2. Group name</td>
<td><strong>chat_id</strong>: chat identifier</td>
</tr>
<tr>
<td>CHAT_DELETE_MEMBER</td>
<td>{1} kicked {3} from the group {2}</td>
<td>1. Message author<br>2. Chat name<br>3. Dropped participant name</td>
<td><strong>chat_id</strong>: chat identifier</td>
</tr>
<tr>
<td>CHAT_DELETE_YOU</td>
<td>{1} kicked you from the group {2}</td>
<td>1. Message author<br>2. Chat name</td>
<td><strong>chat_id</strong>: chat identifier</td>
</tr>
<tr>
<td>CHAT_LEFT</td>
<td>{1} has left the group {2}</td>
<td>1. Message author<br>2. Chat name</td>
<td><strong>chat_id</strong>: chat identifier</td>
</tr>
<tr>
<td>CHAT_RETURNED</td>
<td>{1} has returned to the group {2}</td>
<td>1. Message author<br>2. Chat name</td>
<td><strong>chat_id</strong>: chat identifier</td>
</tr>
<tr>
<td>CHAT_JOINED</td>
<td>{1} has joined the group {2}</td>
<td>1. User name<br>2. Group name</td>
<td><strong>chat_id</strong>: chat identifier</td>
</tr>
<tr>
<td>CHAT_MESSAGE_FWDS</td>
<td>{1} forwarded {3} messages to the group {2}</td>
<td>1. User name<br>2. Group name<br>3. Number of messages that were forwarded</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media (related to the first message)<br><strong>chat_from_id</strong>: Groups only, message author identifier (related to the first message)<br><strong>chat_id</strong>: <a href="/api/channel">Chat</a> identifier (related to the first message)<br><strong>edit_date</strong>: When was the message last edited (related to the first message)<br><strong>mention</strong>: Whether the user was mentioned in the message (related to the first message)<br><strong>msg_id</strong>: ID of the message (related to the first message)<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued) (related to the first message)</td>
</tr>
<tr>
<td>CHAT_MESSAGE_PHOTOS</td>
<td>{1} sent {3} photos to the group {2}</td>
<td>1. User name<br>2. Group name<br>3. Number of photos that were sent</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media (related to the first message)<br><strong>chat_from_id</strong>: Groups only, message author identifier (related to the first message)<br><strong>chat_id</strong>: <a href="/api/channel">Chat</a> identifier (related to the first message)<br><strong>edit_date</strong>: When was the message last edited (related to the first message)<br><strong>mention</strong>: Whether the user was mentioned in the message (related to the first message)<br><strong>msg_id</strong>: ID of the message (related to the first message)<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued) (related to the first message)</td>
</tr>
<tr>
<td>CHAT_MESSAGE_VIDEOS</td>
<td>{1} sent {3} videos to the group {2}</td>
<td>1. User name<br>2. Group name<br>3. Number of videos that were sent</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media (related to the first message)<br><strong>chat_from_id</strong>: Groups only, message author identifier (related to the first message)<br><strong>chat_id</strong>: <a href="/api/channel">Chat</a> identifier (related to the first message)<br><strong>edit_date</strong>: When was the message last edited (related to the first message)<br><strong>mention</strong>: Whether the user was mentioned in the message (related to the first message)<br><strong>msg_id</strong>: ID of the message (related to the first message)<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued) (related to the first message)</td>
</tr>
<tr>
<td>CHAT_MESSAGES</td>
<td>{1} sent an album to the group {2}</td>
<td>1. User name<br>2. Group name</td>
<td><strong>chat_from_id</strong>: Message author identifier<br><strong>chat_id</strong>: chat identifier<br><strong>mention</strong>: Whether the user was mentioned in the message</td>
</tr>
<tr>
<td>PINNED_TEXT</td>
<td>{1} pinned "{2}"</td>
<td>1. User name<br>2. Message body</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>channel_id</strong>: For <a href="/api/channel">channels and supergroups</a>, <a href="/api/channel">Channel/supergroup</a> identifier<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>chat_id</strong>: For <a href="/api/channel">chats</a>, <a href="/api/channel">Chat</a> identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>from_id</strong>: For PMs, Author identifier<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>PINNED_TEXT</td>
<td>{1} pinned "{3}" in the group {2}</td>
<td>1. User name<br>2. Group name<br>3. Message body</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>channel_id</strong>: For <a href="/api/channel">channels and supergroups</a>, <a href="/api/channel">Channel/supergroup</a> identifier<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>chat_id</strong>: For <a href="/api/channel">chats</a>, <a href="/api/channel">Chat</a> identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>from_id</strong>: For PMs, Author identifier<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>PINNED_NOTEXT</td>
<td>{1} pinned a message</td>
<td>1. User name</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>channel_id</strong>: For <a href="/api/channel">channels and supergroups</a>, <a href="/api/channel">Channel/supergroup</a> identifier<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>chat_id</strong>: For <a href="/api/channel">chats</a>, <a href="/api/channel">Chat</a> identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>from_id</strong>: For PMs, Author identifier<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>PINNED_NOTEXT</td>
<td>{1} pinned a message in the group {2}</td>
<td>1. User name<br>2. Group name</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>channel_id</strong>: For <a href="/api/channel">channels and supergroups</a>, <a href="/api/channel">Channel/supergroup</a> identifier<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>chat_id</strong>: For <a href="/api/channel">chats</a>, <a href="/api/channel">Chat</a> identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>from_id</strong>: For PMs, Author identifier<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>PINNED_PHOTO</td>
<td>{1} pinned a photo</td>
<td>1. User name</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>channel_id</strong>: For <a href="/api/channel">channels and supergroups</a>, <a href="/api/channel">Channel/supergroup</a> identifier<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>chat_id</strong>: For <a href="/api/channel">chats</a>, <a href="/api/channel">Chat</a> identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>from_id</strong>: For PMs, Author identifier<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>PINNED_PHOTO</td>
<td>{1} pinned a photo in the group {2}</td>
<td>1. User name<br>2. Group name</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>channel_id</strong>: For <a href="/api/channel">channels and supergroups</a>, <a href="/api/channel">Channel/supergroup</a> identifier<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>chat_id</strong>: For <a href="/api/channel">chats</a>, <a href="/api/channel">Chat</a> identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>from_id</strong>: For PMs, Author identifier<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>PINNED_VIDEO</td>
<td>{1} pinned a video</td>
<td>1. User name</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>channel_id</strong>: For <a href="/api/channel">channels and supergroups</a>, <a href="/api/channel">Channel/supergroup</a> identifier<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>chat_id</strong>: For <a href="/api/channel">chats</a>, <a href="/api/channel">Chat</a> identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>from_id</strong>: For PMs, Author identifier<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>PINNED_VIDEO</td>
<td>{1} pinned a video in the group {2}</td>
<td>1. User name<br>2. Group name</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>channel_id</strong>: For <a href="/api/channel">channels and supergroups</a>, <a href="/api/channel">Channel/supergroup</a> identifier<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>chat_id</strong>: For <a href="/api/channel">chats</a>, <a href="/api/channel">Chat</a> identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>from_id</strong>: For PMs, Author identifier<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>PINNED_ROUND</td>
<td>{1} pinned a video message</td>
<td>1. User name</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>channel_id</strong>: For <a href="/api/channel">channels and supergroups</a>, <a href="/api/channel">Channel/supergroup</a> identifier<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>chat_id</strong>: For <a href="/api/channel">chats</a>, <a href="/api/channel">Chat</a> identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>from_id</strong>: For PMs, Author identifier<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>PINNED_ROUND</td>
<td>{1} pinned a video message in the group {2}</td>
<td>1. User name<br>2. Group name</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>channel_id</strong>: For <a href="/api/channel">channels and supergroups</a>, <a href="/api/channel">Channel/supergroup</a> identifier<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>chat_id</strong>: For <a href="/api/channel">chats</a>, <a href="/api/channel">Chat</a> identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>from_id</strong>: For PMs, Author identifier<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>PINNED_DOC</td>
<td>{1} pinned a file</td>
<td>1. User name</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>channel_id</strong>: For <a href="/api/channel">channels and supergroups</a>, <a href="/api/channel">Channel/supergroup</a> identifier<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>chat_id</strong>: For <a href="/api/channel">chats</a>, <a href="/api/channel">Chat</a> identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>from_id</strong>: For PMs, Author identifier<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>PINNED_DOC</td>
<td>{1} pinned a file in the group {2}</td>
<td>1. User name<br>2. Group name</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>channel_id</strong>: For <a href="/api/channel">channels and supergroups</a>, <a href="/api/channel">Channel/supergroup</a> identifier<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>chat_id</strong>: For <a href="/api/channel">chats</a>, <a href="/api/channel">Chat</a> identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>from_id</strong>: For PMs, Author identifier<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>PINNED_STICKER</td>
<td>{1} pinned a {2}sticker</td>
<td>1. User name<br>2. Sticker emoji with included trailing space or empty string</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>channel_id</strong>: For <a href="/api/channel">channels and supergroups</a>, <a href="/api/channel">Channel/supergroup</a> identifier<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>chat_id</strong>: For <a href="/api/channel">chats</a>, <a href="/api/channel">Chat</a> identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>from_id</strong>: For PMs, Author identifier<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>PINNED_STICKER</td>
<td>{1} pinned a {3}sticker in the group {2}</td>
<td>1. User name<br>2. Group name<br>3. Sticker emoji with included trailing space or empty string</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>channel_id</strong>: For <a href="/api/channel">channels and supergroups</a>, <a href="/api/channel">Channel/supergroup</a> identifier<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>chat_id</strong>: For <a href="/api/channel">chats</a>, <a href="/api/channel">Chat</a> identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>from_id</strong>: For PMs, Author identifier<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>PINNED_AUDIO</td>
<td>{1} pinned a voice message</td>
<td>1. User name</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>channel_id</strong>: For <a href="/api/channel">channels and supergroups</a>, <a href="/api/channel">Channel/supergroup</a> identifier<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>chat_id</strong>: For <a href="/api/channel">chats</a>, <a href="/api/channel">Chat</a> identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>from_id</strong>: For PMs, Author identifier<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>PINNED_AUDIO</td>
<td>{1} pinned a voice message in the group {2}</td>
<td>1. User name<br>2. Group name</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>channel_id</strong>: For <a href="/api/channel">channels and supergroups</a>, <a href="/api/channel">Channel/supergroup</a> identifier<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>chat_id</strong>: For <a href="/api/channel">chats</a>, <a href="/api/channel">Chat</a> identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>from_id</strong>: For PMs, Author identifier<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>PINNED_CONTACT</td>
<td>{1} pinned a contact {2}</td>
<td>1. User name<br>2. Contact name</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>channel_id</strong>: For <a href="/api/channel">channels and supergroups</a>, <a href="/api/channel">Channel/supergroup</a> identifier<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>chat_id</strong>: For <a href="/api/channel">chats</a>, <a href="/api/channel">Chat</a> identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>from_id</strong>: For PMs, Author identifier<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>PINNED_CONTACT</td>
<td>{1} pinned a contact {3} in the group {2}</td>
<td>1. User name<br>2. Group name<br>3. Contact name</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>channel_id</strong>: For <a href="/api/channel">channels and supergroups</a>, <a href="/api/channel">Channel/supergroup</a> identifier<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>chat_id</strong>: For <a href="/api/channel">chats</a>, <a href="/api/channel">Chat</a> identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>from_id</strong>: For PMs, Author identifier<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>PINNED_GEO</td>
<td>{1} pinned a map</td>
<td>1. User name</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>channel_id</strong>: For <a href="/api/channel">channels and supergroups</a>, <a href="/api/channel">Channel/supergroup</a> identifier<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>chat_id</strong>: For <a href="/api/channel">chats</a>, <a href="/api/channel">Chat</a> identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>from_id</strong>: For PMs, Author identifier<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>PINNED_GEO</td>
<td>{1} pinned a map in the group {2}</td>
<td>1. User name<br>2. Group name</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>channel_id</strong>: For <a href="/api/channel">channels and supergroups</a>, <a href="/api/channel">Channel/supergroup</a> identifier<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>chat_id</strong>: For <a href="/api/channel">chats</a>, <a href="/api/channel">Chat</a> identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>from_id</strong>: For PMs, Author identifier<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>PINNED_GEOLIVE</td>
<td>{1} pinned a live location</td>
<td>1. User name</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>channel_id</strong>: For <a href="/api/channel">channels and supergroups</a>, <a href="/api/channel">Channel/supergroup</a> identifier<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>chat_id</strong>: For <a href="/api/channel">chats</a>, <a href="/api/channel">Chat</a> identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>from_id</strong>: For PMs, Author identifier<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>PINNED_GEOLIVE</td>
<td>{1} pinned a live location in the group {2}</td>
<td>1. User name<br>2. Group name</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>channel_id</strong>: For <a href="/api/channel">channels and supergroups</a>, <a href="/api/channel">Channel/supergroup</a> identifier<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>chat_id</strong>: For <a href="/api/channel">chats</a>, <a href="/api/channel">Chat</a> identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>from_id</strong>: For PMs, Author identifier<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>PINNED_POLL</td>
<td>{1} pinned a poll {2}</td>
<td>1. User name<br>2. Poll name</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>channel_id</strong>: For <a href="/api/channel">channels and supergroups</a>, <a href="/api/channel">Channel/supergroup</a> identifier<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>chat_id</strong>: For <a href="/api/channel">chats</a>, <a href="/api/channel">Chat</a> identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>from_id</strong>: For PMs, Author identifier<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>PINNED_POLL</td>
<td>{1} pinned a poll {3} in the group {2}</td>
<td>1. User name<br>2. Group name<br>3. Poll name</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>channel_id</strong>: For <a href="/api/channel">channels and supergroups</a>, <a href="/api/channel">Channel/supergroup</a> identifier<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>chat_id</strong>: For <a href="/api/channel">chats</a>, <a href="/api/channel">Chat</a> identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>from_id</strong>: For PMs, Author identifier<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>PINNED_QUIZ</td>
<td>{1} pinned a quiz {2}</td>
<td>1. User name<br>2. Quiz name</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>channel_id</strong>: For <a href="/api/channel">channels and supergroups</a>, <a href="/api/channel">Channel/supergroup</a> identifier<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>chat_id</strong>: For <a href="/api/channel">chats</a>, <a href="/api/channel">Chat</a> identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>from_id</strong>: For PMs, Author identifier<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>PINNED_QUIZ</td>
<td>{1} pinned a quiz {3} in the group {2}</td>
<td>1. User name<br>2. Group name<br>3. Quiz name</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>channel_id</strong>: For <a href="/api/channel">channels and supergroups</a>, <a href="/api/channel">Channel/supergroup</a> identifier<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>chat_id</strong>: For <a href="/api/channel">chats</a>, <a href="/api/channel">Chat</a> identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>from_id</strong>: For PMs, Author identifier<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>PINNED_GAME</td>
<td>{1} pinned a game</td>
<td>1. User name</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>channel_id</strong>: For <a href="/api/channel">channels and supergroups</a>, <a href="/api/channel">Channel/supergroup</a> identifier<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>chat_id</strong>: For <a href="/api/channel">chats</a>, <a href="/api/channel">Chat</a> identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>from_id</strong>: For PMs, Author identifier<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>PINNED_GAME</td>
<td>{1} pinned a game in the group {2}</td>
<td>1. User name<br>2. Group name</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>channel_id</strong>: For <a href="/api/channel">channels and supergroups</a>, <a href="/api/channel">Channel/supergroup</a> identifier<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>chat_id</strong>: For <a href="/api/channel">chats</a>, <a href="/api/channel">Chat</a> identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>from_id</strong>: For PMs, Author identifier<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>PINNED_GAME_SCORE</td>
<td>{1} pinned a game score</td>
<td>1. User name</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>channel_id</strong>: For <a href="/api/channel">channels and supergroups</a>, <a href="/api/channel">Channel/supergroup</a> identifier<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>chat_id</strong>: For <a href="/api/channel">chats</a>, <a href="/api/channel">Chat</a> identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>from_id</strong>: For PMs, Author identifier<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>PINNED_GAME_SCORE</td>
<td>{1} pinned a game score in the group {2}</td>
<td>1. User name<br>2. Group name</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>channel_id</strong>: For <a href="/api/channel">channels and supergroups</a>, <a href="/api/channel">Channel/supergroup</a> identifier<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>chat_id</strong>: For <a href="/api/channel">chats</a>, <a href="/api/channel">Chat</a> identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>from_id</strong>: For PMs, Author identifier<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>PINNED_INVOICE</td>
<td>{1} pinned an invoice</td>
<td>1. User name</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>channel_id</strong>: For <a href="/api/channel">channels and supergroups</a>, <a href="/api/channel">Channel/supergroup</a> identifier<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>chat_id</strong>: For <a href="/api/channel">chats</a>, <a href="/api/channel">Chat</a> identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>from_id</strong>: For PMs, Author identifier<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>PINNED_INVOICE</td>
<td>{1} pinned an invoice in the group {2}</td>
<td>1. User name<br>2. Group name</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>channel_id</strong>: For <a href="/api/channel">channels and supergroups</a>, <a href="/api/channel">Channel/supergroup</a> identifier<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>chat_id</strong>: For <a href="/api/channel">chats</a>, <a href="/api/channel">Chat</a> identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>from_id</strong>: For PMs, Author identifier<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>PINNED_GIF</td>
<td>{1} pinned a GIF</td>
<td>1. User name</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>channel_id</strong>: For <a href="/api/channel">channels and supergroups</a>, <a href="/api/channel">Channel/supergroup</a> identifier<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>chat_id</strong>: For <a href="/api/channel">chats</a>, <a href="/api/channel">Chat</a> identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>from_id</strong>: For PMs, Author identifier<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>PINNED_GIF</td>
<td>{1} pinned a GIF in the group {2}</td>
<td>1. User name<br>2. Group name</td>
<td><strong>attachb64</strong>: Base64-encoded version of the attached media<br><strong>channel_id</strong>: For <a href="/api/channel">channels and supergroups</a>, <a href="/api/channel">Channel/supergroup</a> identifier<br><strong>chat_from_id</strong>: Groups only, message author identifier<br><strong>chat_id</strong>: For <a href="/api/channel">chats</a>, <a href="/api/channel">Chat</a> identifier<br><strong>edit_date</strong>: When was the message last edited<br><strong>from_id</strong>: For PMs, Author identifier<br><strong>mention</strong>: Whether the user was mentioned in the message<br><strong>msg_id</strong>: ID of the message<br><strong>silent</strong>: Whether the message was posted silently (no notification should be issued)</td>
</tr>
<tr>
<td>CONTACT_JOINED</td>
<td>{1} joined Telegram!</td>
<td>1. Contact name</td>
<td><strong>contact_id</strong>: contact identifier</td>
</tr>
<tr>
<td>AUTH_UNKNOWN</td>
<td>New login from unrecognized device {1}</td>
<td>1. Device name</td>
<td> </td>
</tr>
<tr>
<td>AUTH_REGION</td>
<td>New login from unrecognized device {1}, location: {2}</td>
<td>1. Device name<br>2. Location</td>
<td> </td>
</tr>
<tr>
<td>ENCRYPTION_REQUEST</td>
<td>You have a new message</td>
<td> </td>
<td><strong>encryption_id</strong>: secret chat identifier</td>
</tr>
<tr>
<td>ENCRYPTION_ACCEPT</td>
<td>You have a new message</td>
<td> </td>
<td><strong>encryption_id</strong>: secret chat identifier</td>
</tr>
<tr>
<td>ENCRYPTED_MESSAGE</td>
<td>You have a new message</td>
<td> </td>
<td><strong>encryption_id</strong>: secret chat identifier<br><strong>random_id</strong>: message identifier</td>
</tr>
<tr>
<td>LOCKED_MESSAGE</td>
<td>You have a new message</td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>PHONE_CALL_REQUEST</td>
<td>{1} is calling you!</td>
<td>1. User name</td>
<td><strong>call_ah</strong>: Call access hash<br><strong>call_id</strong>: Call ID</td>
</tr>
<tr>
<td>PHONE_CALL_MISSED</td>
<td>You missed a call from {1}</td>
<td>1. User name</td>
<td> </td>
</tr>
<tr>
<td>MESSAGE_ANNOUNCEMENT</td>
<td>{1}</td>
<td>1. Announcement</td>
<td><strong>announcement</strong>: Announcement: roughly equivalent to a message received from the service notifications (Telegram Notifications, id <code>777000</code>) user, but must be delivered via push notifications, without contacting the API.</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script src="/js/jquery.min.js?1"></script>
<script src="/js/bootstrap.min.js"></script>
<script>window.initDevPageNav&&initDevPageNav();
backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>

View file

@ -0,0 +1,154 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>Admin log</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Both supergroups and channels offer a so-called [admin log](https://telegram.org/blog/admin-revolution), a log of recent relevant supergroup and channel actions, like the modification of group/channel settings or information on behalf of an admin, user kicks and bans, and more.">
<meta property="og:title" content="Admin log">
<meta property="og:image" content="">
<meta property="og:description" content="Both supergroups and channels offer a so-called [admin log](https://telegram.org/blog/admin-revolution), a log of recent relevant supergroup and channel actions, like the modification of group/channel settings or information on behalf of an admin, user kicks and bans, and more.">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class="active"><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class=""><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/api/recent-actions" >Admin log</a></li></ul></div>
<h1 id="dev_page_title">Admin log</h1>
<div id="dev_page_content"><!-- scroll_nav -->
<p>Both supergroups and channels offer a so-called <a href="https://telegram.org/blog/admin-revolution">admin log</a>, a log of recent relevant supergroup and channel actions, like the modification of group/channel settings or information on behalf of an admin, user kicks and bans, and more. </p>
<pre><code><a href='/constructor/channelAdminLogEventActionChangeTitle'>channelAdminLogEventActionChangeTitle</a>#e6dfb825 prev_value:<a href='/type/string'>string</a> new_value:<a href='/type/string'>string</a> = <a href='/type/ChannelAdminLogEventAction'>ChannelAdminLogEventAction</a>;
<a href='/constructor/channelAdminLogEventActionChangeAbout'>channelAdminLogEventActionChangeAbout</a>#55188a2e prev_value:<a href='/type/string'>string</a> new_value:<a href='/type/string'>string</a> = <a href='/type/ChannelAdminLogEventAction'>ChannelAdminLogEventAction</a>;
<a href='/constructor/channelAdminLogEventActionChangeUsername'>channelAdminLogEventActionChangeUsername</a>#6a4afc38 prev_value:<a href='/type/string'>string</a> new_value:<a href='/type/string'>string</a> = <a href='/type/ChannelAdminLogEventAction'>ChannelAdminLogEventAction</a>;
<a href='/constructor/channelAdminLogEventActionChangePhoto'>channelAdminLogEventActionChangePhoto</a>#434bd2af prev_photo:<a href='/type/Photo'>Photo</a> new_photo:<a href='/type/Photo'>Photo</a> = <a href='/type/ChannelAdminLogEventAction'>ChannelAdminLogEventAction</a>;
<a href='/constructor/channelAdminLogEventActionToggleInvites'>channelAdminLogEventActionToggleInvites</a>#1b7907ae new_value:<a href='/type/Bool'>Bool</a> = <a href='/type/ChannelAdminLogEventAction'>ChannelAdminLogEventAction</a>;
<a href='/constructor/channelAdminLogEventActionToggleSignatures'>channelAdminLogEventActionToggleSignatures</a>#26ae0971 new_value:<a href='/type/Bool'>Bool</a> = <a href='/type/ChannelAdminLogEventAction'>ChannelAdminLogEventAction</a>;
<a href='/constructor/channelAdminLogEventActionUpdatePinned'>channelAdminLogEventActionUpdatePinned</a>#e9e82c18 message:<a href='/type/Message'>Message</a> = <a href='/type/ChannelAdminLogEventAction'>ChannelAdminLogEventAction</a>;
<a href='/constructor/channelAdminLogEventActionEditMessage'>channelAdminLogEventActionEditMessage</a>#709b2405 prev_message:<a href='/type/Message'>Message</a> new_message:<a href='/type/Message'>Message</a> = <a href='/type/ChannelAdminLogEventAction'>ChannelAdminLogEventAction</a>;
<a href='/constructor/channelAdminLogEventActionDeleteMessage'>channelAdminLogEventActionDeleteMessage</a>#42e047bb message:<a href='/type/Message'>Message</a> = <a href='/type/ChannelAdminLogEventAction'>ChannelAdminLogEventAction</a>;
<a href='/constructor/channelAdminLogEventActionParticipantJoin'>channelAdminLogEventActionParticipantJoin</a>#183040d3 = <a href='/type/ChannelAdminLogEventAction'>ChannelAdminLogEventAction</a>;
<a href='/constructor/channelAdminLogEventActionParticipantLeave'>channelAdminLogEventActionParticipantLeave</a>#f89777f2 = <a href='/type/ChannelAdminLogEventAction'>ChannelAdminLogEventAction</a>;
<a href='/constructor/channelAdminLogEventActionParticipantInvite'>channelAdminLogEventActionParticipantInvite</a>#e31c34d8 participant:<a href='/type/ChannelParticipant'>ChannelParticipant</a> = <a href='/type/ChannelAdminLogEventAction'>ChannelAdminLogEventAction</a>;
<a href='/constructor/channelAdminLogEventActionParticipantToggleBan'>channelAdminLogEventActionParticipantToggleBan</a>#e6d83d7e prev_participant:<a href='/type/ChannelParticipant'>ChannelParticipant</a> new_participant:<a href='/type/ChannelParticipant'>ChannelParticipant</a> = <a href='/type/ChannelAdminLogEventAction'>ChannelAdminLogEventAction</a>;
<a href='/constructor/channelAdminLogEventActionParticipantToggleAdmin'>channelAdminLogEventActionParticipantToggleAdmin</a>#d5676710 prev_participant:<a href='/type/ChannelParticipant'>ChannelParticipant</a> new_participant:<a href='/type/ChannelParticipant'>ChannelParticipant</a> = <a href='/type/ChannelAdminLogEventAction'>ChannelAdminLogEventAction</a>;
<a href='/constructor/channelAdminLogEventActionChangeStickerSet'>channelAdminLogEventActionChangeStickerSet</a>#b1c3caa7 prev_stickerset:<a href='/type/InputStickerSet'>InputStickerSet</a> new_stickerset:<a href='/type/InputStickerSet'>InputStickerSet</a> = <a href='/type/ChannelAdminLogEventAction'>ChannelAdminLogEventAction</a>;
<a href='/constructor/channelAdminLogEventActionTogglePreHistoryHidden'>channelAdminLogEventActionTogglePreHistoryHidden</a>#5f5c95f1 new_value:<a href='/type/Bool'>Bool</a> = <a href='/type/ChannelAdminLogEventAction'>ChannelAdminLogEventAction</a>;
<a href='/constructor/channelAdminLogEventActionDefaultBannedRights'>channelAdminLogEventActionDefaultBannedRights</a>#2df5fc0a prev_banned_rights:<a href='/type/ChatBannedRights'>ChatBannedRights</a> new_banned_rights:<a href='/type/ChatBannedRights'>ChatBannedRights</a> = <a href='/type/ChannelAdminLogEventAction'>ChannelAdminLogEventAction</a>;
<a href='/constructor/channelAdminLogEventActionStopPoll'>channelAdminLogEventActionStopPoll</a>#8f079643 message:<a href='/type/Message'>Message</a> = <a href='/type/ChannelAdminLogEventAction'>ChannelAdminLogEventAction</a>;
<a href='/constructor/channelAdminLogEventActionChangeLinkedChat'>channelAdminLogEventActionChangeLinkedChat</a>#a26f881b prev_value:<a href='/type/int'>int</a> new_value:<a href='/type/int'>int</a> = <a href='/type/ChannelAdminLogEventAction'>ChannelAdminLogEventAction</a>;
<a href='/constructor/channelAdminLogEventActionChangeLocation'>channelAdminLogEventActionChangeLocation</a>#e6b76ae prev_value:<a href='/type/ChannelLocation'>ChannelLocation</a> new_value:<a href='/type/ChannelLocation'>ChannelLocation</a> = <a href='/type/ChannelAdminLogEventAction'>ChannelAdminLogEventAction</a>;
<a href='/constructor/channelAdminLogEventActionToggleSlowMode'>channelAdminLogEventActionToggleSlowMode</a>#53909779 prev_value:<a href='/type/int'>int</a> new_value:<a href='/type/int'>int</a> = <a href='/type/ChannelAdminLogEventAction'>ChannelAdminLogEventAction</a>;
<a href='/constructor/channelAdminLogEvent'>channelAdminLogEvent</a>#3b5a3e40 id:<a href='/type/long'>long</a> date:<a href='/type/int'>int</a> user_id:<a href='/type/int'>int</a> action:<a href='/type/ChannelAdminLogEventAction'>ChannelAdminLogEventAction</a> = <a href='/type/ChannelAdminLogEvent'>ChannelAdminLogEvent</a>;
<a href='/constructor/channels.adminLogResults'>channels.adminLogResults</a>#ed8af74d events:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/ChannelAdminLogEvent'>ChannelAdminLogEvent</a>&gt; chats:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/Chat'>Chat</a>&gt; users:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/User'>User</a>&gt; = <a href='/type/channels.AdminLogResults'>channels.AdminLogResults</a>;
<a href='/constructor/channelAdminLogEventsFilter'>channelAdminLogEventsFilter</a>#ea107ae4 flags:<a href='/type/%23'>#</a> join:flags.0?<a href='/constructor/true'>true</a> leave:flags.1?<a href='/constructor/true'>true</a> invite:flags.2?<a href='/constructor/true'>true</a> ban:flags.3?<a href='/constructor/true'>true</a> unban:flags.4?<a href='/constructor/true'>true</a> kick:flags.5?<a href='/constructor/true'>true</a> unkick:flags.6?<a href='/constructor/true'>true</a> promote:flags.7?<a href='/constructor/true'>true</a> demote:flags.8?<a href='/constructor/true'>true</a> info:flags.9?<a href='/constructor/true'>true</a> settings:flags.10?<a href='/constructor/true'>true</a> pinned:flags.11?<a href='/constructor/true'>true</a> edit:flags.12?<a href='/constructor/true'>true</a> delete:flags.13?<a href='/constructor/true'>true</a> = <a href='/type/ChannelAdminLogEventsFilter'>ChannelAdminLogEventsFilter</a>;
---functions---
<a href='/method/channels.getAdminLog'>channels.getAdminLog</a>#33ddf480 flags:<a href='/type/%23'>#</a> channel:<a href='/type/InputChannel'>InputChannel</a> q:<a href='/type/string'>string</a> events_filter:flags.0?<a href='/type/ChannelAdminLogEventsFilter'>ChannelAdminLogEventsFilter</a> admins:flags.1?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/InputUser'>InputUser</a>&gt; max_id:<a href='/type/long'>long</a> min_id:<a href='/type/long'>long</a> limit:<a href='/type/int'>int</a> = <a href='/type/channels.AdminLogResults'>channels.AdminLogResults</a>;</code></pre>
<p><a href="/method/channels.getAdminLog">channels.getAdminLog</a> can be used to list recent admin activity.<br>
A <a href="/constructor/channelAdminLogEventsFilter">channelAdminLogEventsFilter</a> can be used to filter out actions of a certain type, and the <code>admins</code> field can be used to show only actions by certain admins.<br>
<code>q</code> can also be used to filter only logs matching a query string. </p></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script src="/js/jquery.min.js?1"></script>
<script src="/js/bootstrap.min.js"></script>
<script>window.initDevPageNav&&initDevPageNav();
backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>

View file

@ -0,0 +1,179 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>Search</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Telegram allows applying detailed message filters while looking for messages in chats.">
<meta property="og:title" content="Search">
<meta property="og:image" content="">
<meta property="og:description" content="Telegram allows applying detailed message filters while looking for messages in chats.">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class="active"><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class=""><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/api/search" >Search</a></li></ul></div>
<h1 id="dev_page_title">Search</h1>
<div id="dev_page_content"><!-- scroll_nav -->
<p>Telegram allows applying detailed message filters while looking for messages in chats.</p>
<h3><a class="anchor" href="#search-filters" id="search-filters" name="search-filters"><i class="anchor-icon"></i></a>Search filters</h3>
<pre><code><a href='/constructor/inputMessagesFilterEmpty'>inputMessagesFilterEmpty</a>#57e2f66c = <a href='/type/MessagesFilter'>MessagesFilter</a>;
<a href='/constructor/inputMessagesFilterPhotos'>inputMessagesFilterPhotos</a>#9609a51c = <a href='/type/MessagesFilter'>MessagesFilter</a>;
<a href='/constructor/inputMessagesFilterVideo'>inputMessagesFilterVideo</a>#9fc00e65 = <a href='/type/MessagesFilter'>MessagesFilter</a>;
<a href='/constructor/inputMessagesFilterPhotoVideo'>inputMessagesFilterPhotoVideo</a>#56e9f0e4 = <a href='/type/MessagesFilter'>MessagesFilter</a>;
<a href='/constructor/inputMessagesFilterDocument'>inputMessagesFilterDocument</a>#9eddf188 = <a href='/type/MessagesFilter'>MessagesFilter</a>;
<a href='/constructor/inputMessagesFilterUrl'>inputMessagesFilterUrl</a>#7ef0dd87 = <a href='/type/MessagesFilter'>MessagesFilter</a>;
<a href='/constructor/inputMessagesFilterGif'>inputMessagesFilterGif</a>#ffc86587 = <a href='/type/MessagesFilter'>MessagesFilter</a>;
<a href='/constructor/inputMessagesFilterVoice'>inputMessagesFilterVoice</a>#50f5c392 = <a href='/type/MessagesFilter'>MessagesFilter</a>;
<a href='/constructor/inputMessagesFilterMusic'>inputMessagesFilterMusic</a>#3751b49e = <a href='/type/MessagesFilter'>MessagesFilter</a>;
<a href='/constructor/inputMessagesFilterChatPhotos'>inputMessagesFilterChatPhotos</a>#3a20ecb8 = <a href='/type/MessagesFilter'>MessagesFilter</a>;
<a href='/constructor/inputMessagesFilterPhoneCalls'>inputMessagesFilterPhoneCalls</a>#80c99768 flags:<a href='/type/%23'>#</a> missed:flags.0?<a href='/constructor/true'>true</a> = <a href='/type/MessagesFilter'>MessagesFilter</a>;
<a href='/constructor/inputMessagesFilterRoundVoice'>inputMessagesFilterRoundVoice</a>#7a7c17a4 = <a href='/type/MessagesFilter'>MessagesFilter</a>;
<a href='/constructor/inputMessagesFilterRoundVideo'>inputMessagesFilterRoundVideo</a>#b549da53 = <a href='/type/MessagesFilter'>MessagesFilter</a>;
<a href='/constructor/inputMessagesFilterMyMentions'>inputMessagesFilterMyMentions</a>#c1f8e69a = <a href='/type/MessagesFilter'>MessagesFilter</a>;
<a href='/constructor/inputMessagesFilterGeo'>inputMessagesFilterGeo</a>#e7026d0d = <a href='/type/MessagesFilter'>MessagesFilter</a>;
<a href='/constructor/inputMessagesFilterContacts'>inputMessagesFilterContacts</a>#e062db83 = <a href='/type/MessagesFilter'>MessagesFilter</a>;
<a href='/constructor/inputMessagesFilterPinned'>inputMessagesFilterPinned</a>#1bb00451 = <a href='/type/MessagesFilter'>MessagesFilter</a>;
<a href='/constructor/messages.messages'>messages.messages</a>#8c718e87 messages:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/Message'>Message</a>&gt; chats:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/Chat'>Chat</a>&gt; users:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/User'>User</a>&gt; = <a href='/type/messages.Messages'>messages.Messages</a>;
<a href='/constructor/messages.messagesSlice'>messages.messagesSlice</a>#3a54685e flags:<a href='/type/%23'>#</a> inexact:flags.1?<a href='/constructor/true'>true</a> count:<a href='/type/int'>int</a> next_rate:flags.0?<a href='/type/int'>int</a> offset_id_offset:flags.2?<a href='/type/int'>int</a> messages:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/Message'>Message</a>&gt; chats:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/Chat'>Chat</a>&gt; users:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/User'>User</a>&gt; = <a href='/type/messages.Messages'>messages.Messages</a>;
<a href='/constructor/messages.channelMessages'>messages.channelMessages</a>#64479808 flags:<a href='/type/%23'>#</a> inexact:flags.1?<a href='/constructor/true'>true</a> pts:<a href='/type/int'>int</a> count:<a href='/type/int'>int</a> offset_id_offset:flags.2?<a href='/type/int'>int</a> messages:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/Message'>Message</a>&gt; chats:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/Chat'>Chat</a>&gt; users:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/User'>User</a>&gt; = <a href='/type/messages.Messages'>messages.Messages</a>;
<a href='/constructor/messages.messagesNotModified'>messages.messagesNotModified</a>#74535f21 count:<a href='/type/int'>int</a> = <a href='/type/messages.Messages'>messages.Messages</a>;
---functions---
<a href='/method/messages.search'>messages.search</a>#c352eec flags:<a href='/type/%23'>#</a> peer:<a href='/type/InputPeer'>InputPeer</a> q:<a href='/type/string'>string</a> from_id:flags.0?<a href='/type/InputPeer'>InputPeer</a> top_msg_id:flags.1?<a href='/type/int'>int</a> filter:<a href='/type/MessagesFilter'>MessagesFilter</a> min_date:<a href='/type/int'>int</a> max_date:<a href='/type/int'>int</a> offset_id:<a href='/type/int'>int</a> add_offset:<a href='/type/int'>int</a> limit:<a href='/type/int'>int</a> max_id:<a href='/type/int'>int</a> min_id:<a href='/type/int'>int</a> hash:<a href='/type/int'>int</a> = <a href='/type/messages.Messages'>messages.Messages</a>;
<a href='/method/messages.searchGlobal'>messages.searchGlobal</a>#4bc6589a flags:<a href='/type/%23'>#</a> folder_id:flags.0?<a href='/type/int'>int</a> q:<a href='/type/string'>string</a> filter:<a href='/type/MessagesFilter'>MessagesFilter</a> min_date:<a href='/type/int'>int</a> max_date:<a href='/type/int'>int</a> offset_rate:<a href='/type/int'>int</a> offset_peer:<a href='/type/InputPeer'>InputPeer</a> offset_id:<a href='/type/int'>int</a> limit:<a href='/type/int'>int</a> = <a href='/type/messages.Messages'>messages.Messages</a>;</code></pre>
<p>When using <a href="/method/messages.search">messages.search</a> or <a href="/method/messages.searchGlobal">messages.searchGlobal</a>, a certain message filter may be applied.<br>
This allows the server to filter messages based on a text query, and even on their type, and this feature is often used by graphical clients to implement features like the chat gallery, chat profile pictures and more.
Available filters:</p>
<ul>
<li><a href="/constructor/inputMessagesFilterPhotos">inputMessagesFilterPhotos</a> - Returns only photos, used for implementing the chat photo gallery, and when scrolling left or right while viewing a photo</li>
<li><a href="/constructor/inputMessagesFilterVideo">inputMessagesFilterVideo</a> - Returns only videos, used for implementing the chat video gallery, and when scrolling left or right while viewing a video</li>
<li><a href="/constructor/inputMessagesFilterPhotoVideo">inputMessagesFilterPhotoVideo</a> - Return only videos and photos, used for implementing the chat media gallery</li>
<li><a href="/constructor/inputMessagesFilterDocument">inputMessagesFilterDocument</a> - Return only videos and photos, used for implementing the chat document gallery</li>
<li><a href="/constructor/inputMessagesFilterUrl">inputMessagesFilterUrl</a> - Return only messages with links, used for implementing the chat link gallery</li>
<li><a href="/constructor/inputMessagesFilterGif">inputMessagesFilterGif</a> - Return only GIFs, used for implementing the chat GIF gallery</li>
<li><a href="/constructor/inputMessagesFilterVoice">inputMessagesFilterVoice</a> - Return only voice messages, used for implementing the chat voice message gallery, and to consecutively play voice messages in a chat</li>
<li><a href="/constructor/inputMessagesFilterMusic">inputMessagesFilterMusic</a> - Return only music files, used for implementing the chat music gallery</li>
<li><a href="/constructor/inputMessagesFilterChatPhotos">inputMessagesFilterChatPhotos</a> - Return only chat photos, used to allow scrolling through the profile picture history of a group</li>
<li><a href="/constructor/inputMessagesFilterPhoneCalls">inputMessagesFilterPhoneCalls</a> - Return only phone calls, used with <a href="/method/messages.searchGlobal">messages.searchGlobal</a> to implement the call tab, with the phone call history</li>
<li><a href="/constructor/inputMessagesFilterRoundVoice">inputMessagesFilterRoundVoice</a> - Return only round videos and voice messages, used to consecutively play round videos and voice messages in a chat</li>
<li><a href="/constructor/inputMessagesFilterRoundVideo">inputMessagesFilterRoundVideo</a> - Return only round videos, used to consecutively play round videos in a chat</li>
<li><a href="/constructor/inputMessagesFilterMyMentions">inputMessagesFilterMyMentions</a> - Return only messages mentioning me, can be used to display the <a href="/api/mentions">mention history</a> or, combined with another filter or query, return only messages that satisfy a certain criteria, and contain a mention.</li>
<li><a href="/constructor/inputMessagesFilterGeo">inputMessagesFilterGeo</a> - Return only geolocations, is used to fetch all recent valid <a href="/api/live-location">geolocations or live locations</a> sent in a group, to display them all in a single map</li>
<li><a href="/constructor/inputMessagesFilterContacts">inputMessagesFilterContacts</a> - Return only contacts</li>
<li><a href="/constructor/inputMessagesFilterPinned">inputMessagesFilterPinned</a> - Returns only <a href="/api/pin">pinned messages</a>, used for implementing the pinned message list</li>
</ul>
<p>The returned <a href="/type/messages.Messages">messages.Messages</a> constructors contain parameters for <a href="/api/offsets">pagination</a>, the messages themselves and two <code>offset_id_offset</code>/<code>count</code> parameters that can be used to display a <code>progress/total</code> counter like <code>photo 134 of 200</code>.<br>
For example, when displaying the chat photo gallery, we could display a <code>photo ${offset_id_offset} of ${count}</code> indicator on top.</p>
<h4><a class="anchor" href="#search-counters" id="search-counters" name="search-counters"><i class="anchor-icon"></i></a>Search counters</h4>
<pre><code><a href='/constructor/messages.searchCounter'>messages.searchCounter</a>#e844ebff flags:<a href='/type/%23'>#</a> inexact:flags.1?<a href='/constructor/true'>true</a> filter:<a href='/type/MessagesFilter'>MessagesFilter</a> count:<a href='/type/int'>int</a> = <a href='/type/messages.SearchCounter'>messages.SearchCounter</a>;
---functions---
<a href='/method/messages.getSearchCounters'>messages.getSearchCounters</a>#732eef00 peer:<a href='/type/InputPeer'>InputPeer</a> filters:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/MessagesFilter'>MessagesFilter</a>&gt; = <a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/messages.SearchCounter'>messages.SearchCounter</a>&gt;;</code></pre>
<p>Chat counters with filters can also be returned without fetching the actual messages, as seen in the scheme above.</p></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script src="/js/jquery.min.js?1"></script>
<script src="/js/bootstrap.min.js"></script>
<script>window.initDevPageNav&&initDevPageNav();
backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>

View file

@ -0,0 +1,140 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>Telegram API Terms of Service</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="We welcome all developers to use our API and source code to create Telegram-like messaging applications on our platform…">
<meta property="og:title" content="Telegram API Terms of Service">
<meta property="og:image" content="">
<meta property="og:description" content="We welcome all developers to use our API and source code to create Telegram-like messaging applications on our platform…">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class="active"><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class=""><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/api/terms" >Telegram API Terms of Service</a></li></ul></div>
<h1 id="dev_page_title">Telegram API Terms of Service</h1>
<div id="dev_page_content"><!-- scroll_nav -->
<p>We welcome all developers to use our API and source code to <a href="/api/obtaining_api_id">create Telegram-like messaging applications</a> on our platform free of charge. In order to ensure consistency and security across the Telegram ecosystem, all third-party client apps must comply with the following Terms of Service.</p>
<h4><a class="anchor" href="#1-privacy--security" id="1-privacy--security" name="1-privacy--security"><i class="anchor-icon"></i></a>1. Privacy &amp; Security</h4>
<p><strong>1.1.</strong> Telegram is a privacy-oriented platform. All client apps must, therefore, guard their users' privacy with utmost care and comply with our <a href="https://core.telegram.org/mtproto/security_guidelines">Security Guidelines</a>.<br>
<strong>1.2.</strong> Developers are welcome to add new features or improve and extend existing Telegram features provided that these modifications do not violate these Terms of Service.<br>
<strong>1.3.</strong> As a client developer, you must make sure that all the basic features of the main Telegram apps function correctly and in an expected way both in your app and when users of your app communicate with other Telegram users. It is forbidden to force users of other Telegram clients to download your app in order to view certain messages and content sent using your app.<br>
<strong>1.4.</strong> It is forbidden to interfere with the basic functionality of Telegram. This includes but is not limited to: making actions on behalf of the user without the user's knowledge and consent, preventing self-destructing content from disappearing, preventing last seen and online statuses from being displayed correctly, tampering with the 'read' statuses of messages (e.g. implementing a 'ghost mode'), preventing typing statuses from being sent/displayed, etc. </p>
<h4><a class="anchor" href="#2-transparency" id="2-transparency" name="2-transparency"><i class="anchor-icon"></i></a>2. Transparency</h4>
<p><strong>2.1.</strong> You must <a href="/api/obtaining_api_id#obtaining-api-id">obtain your own api_id</a> for your application.<br>
<strong>2.2.</strong> We offer our API free of charge, but your users must be aware of the fact that your app uses the Telegram API and is part of the Telegram ecosystem. This fact must be featured prominently in the app's description in the app stores and in the in-app intro if your app has it.<br>
<strong>2.3.</strong> To avoid confusion, the title of your app must not include the word “Telegram”. An exception can be made if the word “Telegram” is preceded with the word “Unofficial” in the title.<br>
<strong>2.4.</strong> You must not use the official Telegram logo for your app. Both the Telegram brand and its logo are registered trademarks protected by law in almost every country. </p>
<h4><a class="anchor" href="#3-advertising--monetization" id="3-advertising--monetization" name="3-advertising--monetization"><i class="anchor-icon"></i></a>3. Advertising &amp; Monetization</h4>
<p><strong>3.1.</strong> Developers are allowed to monetize their coding efforts through advertising or other legitimate means.<br>
<strong>3.2.</strong> If you decide to monetize your app, you must clearly mention all the methods of monetization that are used in your app in all its app store descriptions. </p>
<h4><a class="anchor" href="#4-breach-of-terms" id="4-breach-of-terms" name="4-breach-of-terms"><i class="anchor-icon"></i></a>4. Breach of terms</h4>
<p><strong>4.1.</strong> If your app violates these terms, we will notify the Telegram account responsible for the app about the breach of terms.<br>
<strong>4.2.</strong> If you do not update the app to fix the highlighted issues within <strong>10</strong> days, we will have to discontinue your access to Telegram API and contact the app stores about the removal of your apps that are using the Telegram API in violation of these terms. </p>
<p>We reserve the right to expand these terms and guidelines as the need arises. We will inform client developers of such changes via an in-app notification to their accounts connected to the app in question. </p>
<blockquote>
<p><a href="https://core.telegram.org/api/obtaining_api_id">Back to Creating Your Telegram Application »</a></p>
</blockquote></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script src="/js/jquery.min.js?1"></script>
<script src="/js/bootstrap.min.js"></script>
<script>window.initDevPageNav&&initDevPageNav();
backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>

View file

@ -1,145 +0,0 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>Top peer rating</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="If enabled, the rating of top peers indicates the relevance of a frequently used peer in a certain category (frequently messaged users, frequently used bots, inline bots, frequently visited channels and so on).">
<meta property="og:title" content="Top peer rating">
<meta property="og:image" content="34465abeb3bc2c4844">
<meta property="og:description" content="If enabled, the rating of top peers indicates the relevance of a frequently used peer in a certain category (frequently messaged users, frequently used bots, inline bots, frequently visited channels and so on).">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class="active"><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class=""><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/api/top-rating" >Top peer rating</a></li></ul></div>
<h1 id="dev_page_title">Top peer rating</h1>
<div id="dev_page_content"><p>If <a href="/method/contacts.toggleTopPeers">enabled</a>, the rating of <a href="/constructor/topPeer">top peers</a> indicates the relevance of a frequently used peer in a certain <a href="/type/TopPeerCategory">category</a> (frequently messaged users, frequently used bots, inline bots, frequently visited channels and so on).</p>
<p>Schema: </p>
<pre><code><a href='/constructor/topPeer'>topPeer</a>#edcdc05b peer:<a href='/type/Peer'>Peer</a> rating:<a href='/type/double'>double</a> = <a href='/type/TopPeer'>TopPeer</a>;
<a href='/constructor/topPeerCategoryBotsPM'>topPeerCategoryBotsPM</a>#ab661b5b = <a href='/type/TopPeerCategory'>TopPeerCategory</a>;
<a href='/constructor/topPeerCategoryBotsInline'>topPeerCategoryBotsInline</a>#148677e2 = <a href='/type/TopPeerCategory'>TopPeerCategory</a>;
<a href='/constructor/topPeerCategoryCorrespondents'>topPeerCategoryCorrespondents</a>#637b7ed = <a href='/type/TopPeerCategory'>TopPeerCategory</a>;
<a href='/constructor/topPeerCategoryGroups'>topPeerCategoryGroups</a>#bd17a14a = <a href='/type/TopPeerCategory'>TopPeerCategory</a>;
<a href='/constructor/topPeerCategoryChannels'>topPeerCategoryChannels</a>#161d9628 = <a href='/type/TopPeerCategory'>TopPeerCategory</a>;
<a href='/constructor/topPeerCategoryPhoneCalls'>topPeerCategoryPhoneCalls</a>#1e76a78c = <a href='/type/TopPeerCategory'>TopPeerCategory</a>;
<a href='/constructor/topPeerCategoryForwardUsers'>topPeerCategoryForwardUsers</a>#a8406ca9 = <a href='/type/TopPeerCategory'>TopPeerCategory</a>;
<a href='/constructor/topPeerCategoryForwardChats'>topPeerCategoryForwardChats</a>#fbeec0f0 = <a href='/type/TopPeerCategory'>TopPeerCategory</a>;
<a href='/constructor/topPeerCategoryPeers'>topPeerCategoryPeers</a>#fb834291 category:<a href='/type/TopPeerCategory'>TopPeerCategory</a> count:<a href='/type/int'>int</a> peers:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/TopPeer'>TopPeer</a>&gt; = <a href='/type/TopPeerCategoryPeers'>TopPeerCategoryPeers</a>;
<a href='/constructor/contacts.topPeersNotModified'>contacts.topPeersNotModified</a>#de266ef5 = <a href='/type/contacts.TopPeers'>contacts.TopPeers</a>;
<a href='/constructor/contacts.topPeers'>contacts.topPeers</a>#70b772a8 categories:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/TopPeerCategoryPeers'>TopPeerCategoryPeers</a>&gt; chats:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/Chat'>Chat</a>&gt; users:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/User'>User</a>&gt; = <a href='/type/contacts.TopPeers'>contacts.TopPeers</a>;
<a href='/constructor/contacts.topPeersDisabled'>contacts.topPeersDisabled</a>#b52c939d = <a href='/type/contacts.TopPeers'>contacts.TopPeers</a>;
---functions---
<a href='/method/contacts.getTopPeers'>contacts.getTopPeers</a>#d4982db5 flags:<a href='/type/%23'>#</a> correspondents:flags.0?<a href='/constructor/true'>true</a> bots_pm:flags.1?<a href='/constructor/true'>true</a> bots_inline:flags.2?<a href='/constructor/true'>true</a> phone_calls:flags.3?<a href='/constructor/true'>true</a> forward_users:flags.4?<a href='/constructor/true'>true</a> forward_chats:flags.5?<a href='/constructor/true'>true</a> groups:flags.10?<a href='/constructor/true'>true</a> channels:flags.15?<a href='/constructor/true'>true</a> offset:<a href='/type/int'>int</a> limit:<a href='/type/int'>int</a> hash:<a href='/type/int'>int</a> = <a href='/type/contacts.TopPeers'>contacts.TopPeers</a>;</code></pre>
<p>The rate delta is computed by taking the time delta between the last time the user used a certain peer and the last time the rating for that peer was received and dividing it by the <a href="/constructor/config">exponential decay from config</a>.</p>
<p>Example:
Client-side, every time a user opens chat <code>123456789</code> the following operation must be done on the cached top peer info.</p>
<ul>
<li><code>dateOpened</code> indicates when was the peer used</li>
<li><code>normalizeRate</code> is an arbitrary time in the recent past.
When ratings are received from the server using <a href="/method/contacts.getTopPeers">contacts.getTopPeers</a> and the scheme described above, it is the time when they were received.</li>
</ul>
<pre><code>topPeer.rating += e^((dateOpened - normalizeRate) / config.rating_e_decay)</code></pre></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script>backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>

View file

@ -0,0 +1,177 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>Web events</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="How telegram apps interact with webpages">
<meta property="og:title" content="Web events">
<meta property="og:image" content="">
<meta property="og:description" content="How telegram apps interact with webpages">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class="active"><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class=""><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/api/web-events" >Web events</a></li></ul></div>
<h1 id="dev_page_title">Web events</h1>
<div id="dev_page_content"><!-- scroll_nav -->
<p>When interacting with HTML5 games and the websites of payment gateways, Telegram apps should expose APIs to allow receiving data and events from the websites.</p>
<h3><a class="anchor" href="#event-apis" id="event-apis" name="event-apis"><i class="anchor-icon"></i></a>Event APIs</h3>
<p>Games and payment gateways can generate events that are meant to be received by the Telegram apps.
Typically events are generated by using the <code>postEvent</code> method of the <a href="https://github.com/TelegramMessenger/GamingCommunication/blob/master/games.js">GamingCommunication library</a>.
The <code>postEvent</code> function will try sending the event to the Telegram app in a number of different ways.</p>
<h4><a class="anchor" href="#webviewproxy" id="webviewproxy" name="webviewproxy"><i class="anchor-icon"></i></a>WebviewProxy</h4>
<p>In mobile apps, the event receiver API should be typically exposed as a <code>window.TelegramWebviewProxy</code> object with a <code>postEvent</code> method.</p>
<pre><code>window.TelegramWebviewProxy.postEvent(eventType, eventData)</code></pre>
<h4><a class="anchor" href="#windowexternal" id="windowexternal" name="windowexternal"><i class="anchor-icon"></i></a>window.external</h4>
<p>Alternatively, a <code>window.external.notify</code> method can be exposed, accepting a string JSON payload with the event type and payload:</p>
<pre><code>window.external.notify(JSON.stringify({eventType: eventType, eventData: eventData}));</code></pre>
<h4><a class="anchor" href="#postmessage-api" id="postmessage-api" name="postmessage-api"><i class="anchor-icon"></i></a>postMessage API</h4>
<p>Finally, web MTProto clients that need to open a game or process a payment in an iframe can use the <a href="https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage">postMessage API</a> to receive events from iframes.
The <a href="https://github.com/TelegramMessenger/GamingCommunication/blob/master/games.js">GamingCommunication library</a> by defaultwill use <code>'*'</code> as <code>targetOrigin</code>, sending messages to parent pages regardless of the origin of the embedder.</p>
<pre><code>window.parent.postMessage(JSON.stringify({eventType: eventType, eventData: eventData}), targetOrigin);</code></pre>
<h4><a class="anchor" href="#event-types" id="event-types" name="event-types"><i class="anchor-icon"></i></a>Event types</h4>
<p><code>eventType</code> is a simple string indicating the event type, and <code>eventData</code> is a payload with an object that will be parsed by the Telegram app.</p>
<table class="table">
<thead>
<tr>
<th>eventType</th>
<th>eventData</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>payment_form_submit</code></td>
<td>JSON object with <code>data</code> and <code>title</code> fields</td>
<td><code>title</code> is the censored credit card title.<br><code>data</code> is a service-specific JSON payload with information about the payment credentials provided by the user to the payment system.<br><strong>Neither Telegram, nor bots will have access to your credit card information.</strong><br>Credit card details will be handled only by the payment system.</td>
</tr>
<tr>
<td><code>share_score</code></td>
<td>null</td>
<td>Will be called by games when the user explicitly clicks on the <strong>share score</strong> button to share the game, along with his score.<br>Typically done by using <a href="/method/messages.forwardMessages">messages.forwardMessages</a> on the game message with the <code>with_my_score</code> flag.</td>
</tr>
<tr>
<td><code>share_game</code></td>
<td>null</td>
<td>Will be called by games when the user explicitly clicks on the <strong>share game</strong> button to share the game, without sharing his score.<br>Typically done by using <a href="/method/messages.forwardMessages">messages.forwardMessages</a> on the game message without the <code>with_my_score</code> flag, or by sharing the game's short URL.</td>
</tr>
<tr>
<td><code>game_over</code></td>
<td>null</td>
<td>Can be called by games when the user loses a game</td>
</tr>
<tr>
<td><code>game_loaded</code></td>
<td>null</td>
<td>Can be called by games once the game fully loads</td>
</tr>
<tr>
<td><code>resize_frame</code></td>
<td>JSON object with <code>height</code> field</td>
<td>Called by supported pages inside of <a href="https://instantview.telegram.org">IV</a> iframe embeds, indicates the new size of the embed frame.</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script src="/js/jquery.min.js?1"></script>
<script src="/js/bootstrap.min.js"></script>
<script>window.initDevPageNav&&initDevPageNav();
backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>

View file

@ -0,0 +1,230 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>Introducing Bot API 2.0</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Howdy&#33; This text assumes that youre familiar with Telegrams bot platform.
If this is not the case, kindly check out our…">
<meta property="og:title" content="Introducing Bot API 2.0">
<meta property="og:image" content="4cffbe607dd6ff44bc">
<meta property="og:description" content="Howdy&#33; This text assumes that youre familiar with Telegrams bot platform.
If this is not the case, kindly check out our…">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class=""><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class=""><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"></div>
<h1 id="dev_page_title">Introducing Bot API 2.0</h1>
<div id="dev_page_content"><!-- scroll_nav -->
<blockquote>
<p>Howdy! This text assumes that youre familiar with Telegrams bot platform.<br>If this is not the case, kindly check out our <a href="/bots"><strong>Introduction to Bots</strong></a>.</p>
</blockquote>
<p>Today were introducing the biggest change to Telegrams Bot Platform since June 2015. These new tools will help you create fluid and intuitive interfaces for your bots. And bots are becoming a lot more capable. They can now send any type of content supported on Telegram, provide location-based services and integrate with other services deeply based on users&#39; phone numbers.</p>
<p>If you&#39;d like a more concise changelog, you can find one in the <a href="/bots/api#recent-changes"><strong>Bot API Manual</strong></a>.</p>
<h3><a class="anchor" name="new-inline-keyboards" href="#new-inline-keyboards"><i class="anchor-icon"></i></a>New Inline Keyboards</h3>
<p>To begin with, we&#39;re adding a new type of keyboard that is integrated directly into the message it belongs to. Inline keyboards are available for messages sent both in chat mode and inline mode.</p>
<div><center>
<a href="/file/811140217/1/NkRCCLeQZVc/17a804837802700ea4" target="_blank"><img src="/file/811140217/1/NkRCCLeQZVc/17a804837802700ea4" title="Callback buttons in @music" style="width: 295px; padding: 10px 20px;" /></a>
<a href="/file/811140659/1/RRJyulbtLBY/ea6163411c7eb4f4dc" target="_blank"><img src="/file/811140659/1/RRJyulbtLBY/ea6163411c7eb4f4dc" title="More callback buttons in @music" style="width: 295px; padding: 10px 20px;" /></a>
</center><br>
</div>
<p>Unlike with custom reply keyboards, pressing buttons on inline keyboards doesn&#39;t result in messages sent to the chat. Instead, inline keyboards support buttons that work behind the scenes: <a href="#callback-buttons">callback buttons</a>, <a href="#url-buttons">URL buttons</a> and <a href="#switch-to-inline-buttons">switch to inline buttons</a>.</p>
<blockquote>
<p><a href="/bots/api#inlinekeyboardmarkup">Manual: Inline keyboards »</a></p>
</blockquote>
<h4><a class="anchor" name="callback-buttons" href="#callback-buttons"><i class="anchor-icon"></i></a>Callback buttons</h4>
<p>When a user presses a <strong>callback button</strong>, no messages are sent to the chat. Instead, your bot simply receives the relevant query. Upon receiving the query, your bot can display some <a href="/bots/api#answercallbackquery">result in a notification</a> at the top of the chat screen or in an alert.</p>
<div><center>
<a href="/file/811140423/1/6BVlO7dWPeo/64d0d842ff73ff3dc8" target="_blank"><img src="/file/811140423/1/6BVlO7dWPeo/64d0d842ff73ff3dc8" title="Notification at the top" style="width:295px; padding:10px 20px"/></a></center><br>
</div>
<p><strong>Sample bot</strong><br><a href="https://telegram.me/music">@music</a> This sample music bot uses inline callback buttons to flip pages and reload random results.</p>
<p>Read on to <a href="#updating-messages">updating messages</a> to find out how callback buttons can get even cooler.</p>
<h4><a class="anchor" name="url-buttons" href="#url-buttons"><i class="anchor-icon"></i></a>URL buttons</h4>
<p>Buttons of this type have a small arrow icon to help the user understand that tapping on a <strong>URL button</strong> will open an external link. Naturally, we&#39;ll show them a confirmation alert before opening the link in the browser.</p>
<div><center>
<a href="/file/811140999/1/2JSoUVlWKa0/4fad2e2743dc8eda04" target="_blank"><img src="/file/811140999/1/2JSoUVlWKa0/4fad2e2743dc8eda04" title="URL button" style="width:295px; padding:10px 20px"/></a></center>
</div>
<h4><a class="anchor" name="switch-to-inline-buttons" href="#switch-to-inline-buttons"><i class="anchor-icon"></i></a>Switch to Inline buttons</h4>
<p>Pressing a switch to inline button prompts the user to select a chat, opens it and inserts the bot&#39;s username into the input field. You can also pass a query that will be inserted along with the username this way your users will immediately get some inline results they can share.</p>
<div><center>
<a href="/file/811140659/1/RRJyulbtLBY/ea6163411c7eb4f4dc" target="_blank"><img src="/file/811140659/1/RRJyulbtLBY/ea6163411c7eb4f4dc" title="More callback buttons in @music" style="width: 295px; padding: 10px 20px;" /></a></center><br>
</div>
<p><strong>Sample bot</strong><br><a href="https://telegram.me/sticker">@sticker</a> This sticker search bot offers a <a href="#switch-to-inline-buttons">switch to inline button</a> to teach users how to use it in inline mode. </p>
<h3><a class="anchor" name="updating-messages" href="#updating-messages"><i class="anchor-icon"></i></a>Updating Messages</h3>
<p>Since inline keyboards dont send additional messages to the chat, it made sense to give bots a way of manipulating their existing messages, so that they dont have to send a new message each time they need to update something. This helps reduce clutter and build more fluid interfaces.</p>
<div class="smartphone_video_player_wrap">
<div class="smartphone_video_player_iphone">
<video class="smartphone_video_player tl_blog_vid_autoplay" onclick="videoTogglePlay(this)" poster="/resources/video/cover/Music.png" loop controls muted>
<source src="/resources/video/Music.mp4" type="video/mp4">
</video>
</div>
</div>
<p><strong>Sample bot</strong><br><a href="https://telegram.me/music">@music</a> Watch how the music bot updates its messages with search results when you press the navigation buttons.</p>
<blockquote>
<p><a href="/bots/api#updating-messages">Manual: Updating messages »</a></p>
</blockquote>
<h3><a class="anchor" name="locations-and-numbers" href="#locations-and-numbers"><i class="anchor-icon"></i></a>Locations and Numbers</h3>
<p>Some bots need extra data from the user to work properly. For example, knowing the users location helps provide more relevant geo-specific results. The users phone number can be very useful for integrations with other services, like banks, etc.</p>
<p>We&#39;ve added an easy way for bots to ask the user for their <strong>location</strong> and <strong>phone number</strong> using special buttons. Note that both phone number and location request buttons will only work in private chats.</p>
<div><center>
<a href="/file/811140587/2/jaowDLZg2l0/5ba3f7d7fd5c6c28dc" target="_blank"><img src="/file/811140587/2/jaowDLZg2l0/5ba3f7d7fd5c6c28dc" title="Phone number and location sharing buttons" style="width: 295px; padding: 10px 20px;" /></a></center><br>
</div>
<p>When these buttons are pressed, Telegram clients will display a confirmation alert that tells the user what&#39;s about to happen.</p>
<blockquote>
<p><a href="/bots/api#keyboardbutton">Manual: Number and location buttons »</a></p>
</blockquote>
<p>Inline bots can also request location data from their users. Use the <code>/setinlinegeo</code> command with <a href="https://telegram.me/botfather">@BotFather</a> to enable this. Your bot will ask the user for permission to access their location whenever they send an inline request.</p>
<p><strong>Sample bot</strong><br><a href="https://telegram.me/foursquare">@foursquare</a> This bot will ask for permission to access the user&#39;s location, then provide geo-targeted results.</p>
<h3><a class="anchor" name="inline-bots-2-0" href="#inline-bots-2-0"><i class="anchor-icon"></i></a>Inline Bots 2.0</h3>
<p>Speaking of inline bots, they are also getting a major upgrade today.</p>
<h4><a class="anchor" name="new-types-of-content" href="#new-types-of-content"><i class="anchor-icon"></i></a>New types of content</h4>
<p>Inline bots now support <strong>all types of content</strong> available in Telegram (19 in all), they are now capable of sending stickers, videos, music, locations, documents and more. </p>
<div><center>
<a href="/file/811140994/2/fvw-q_CRaBQ/c618325e119b0a8229" target="_blank"><img src="/file/811140994/2/fvw-q_CRaBQ/c618325e119b0a8229" title="All kinds of inline content" style="width: 295px; padding: 10px 20px;" /></a></center><br>
</div>
<p><strong>Sample bots</strong><br><a href="https://telegram.me/sticker">@sticker</a> This sticker bot will accept one or more emoji and search for relevant stickers.<br><a href="https://telegram.me/music">@music</a> The music bot allows users to send mp3 tracks from a database of public domain classical music.</p>
<blockquote>
<p><a href="/bots/api#inlinequeryresult">Manual: Types of inline content »</a></p>
</blockquote>
<h4><a class="anchor" name="switching-between-inline-mode-and-private-chat" href="#switching-between-inline-mode-and-private-chat"><i class="anchor-icon"></i></a>Switching between inline mode and private chat</h4>
<p>Some inline bots can benefit from an initial setup process, like connecting them to an account on an external service (e.g., YouTube). We&#39;ve added an easy way of switching between the private chat with a bot and whatever chat the user wants to share inline results in.</p>
<div><center>
<a href="/file/811140951/1/FD93gAgDVDI/8d8bdd16e6a7b40c12" target="_blank"><img src="/file/811140951/1/FD93gAgDVDI/8d8bdd16e6a7b40c12" title="Switch to PM button" style="width: 295px; padding: 10px 20px;" /></a></center><br>
</div>
<p>You can now display a special Switch to PM button above the inline results (or instead of them). This button will open a private chat with the bot and pass a parameter of your choosing, so that you can prompt the user for the relevant setup actions. Once done, you can use an inline keyboard with a <a href="/bots/api#inlinekeyboardmarkup"><em>switch_inline_query</em></a> button to send the user back to the original chat. </p>
<p><strong>Sample bots</strong><br><a href="https://telegram.me/youtube">@youtube</a> Shows a Sign in to YouTube button, then suggests personalized results.</p>
<blockquote>
<p><a href="/bots/api#answerinlinequery">Manual: Switch to PM</a></p>
</blockquote>
<h4><a class="anchor" name="better-inline-ui" href="#better-inline-ui"><i class="anchor-icon"></i></a>Better inline UI</h4>
<p>Since sending content via inline bots works differently from sending ordinary messages, weve changed the interface a little. Theres hardly a more effective way of explaining that theres no need to hit Send&#39;:</p>
<div><center>
<a href="/file/811140558/1/POjp00-nHqE/50d0312845a05e6da9" target="_blank"><img src="/file/811140558/1/POjp00-nHqE/50d0312845a05e6da9" title="New input field" style="width: 295px; padding: 10px 20px;" /></a></center><br>
</div>
<p>Tapping on the cross icon once will clear the query, tapping twice will give the Send button back to the user.</p>
<h3><a class="anchor" name="group-admins" href="#group-admins"><i class="anchor-icon"></i></a>Group Admins</h3>
<p>As a dessert, were beginning to roll out tools that will allow you to create bot solutions for group admins. As the first step, weve added methods to remove members from groups and supergroups.</p>
<blockquote>
<p><a href="/bots/api#kickchatmember">Manual: Group management »</a></p>
</blockquote>
<p>And that&#39;s about it for now. Stay tuned for more updates and subscribe to our official <a href="https://telegram.me/botnews">@Botnews</a> channel on Telegram.</p>
<blockquote>
<p><a href="/bots/api#recent-changes">Read the full changelog for this update »</a></p>
</blockquote>
</div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script src="/js/jquery.min.js?1"></script>
<script src="/js/bootstrap.min.js"></script>
<script>window.initDevPageNav&&initDevPageNav();
backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>

View file

@ -1,185 +0,0 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>Gaming Platform</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Bots can offer their users HTML5 games to play solo or to compete against each other in groups and one-on-one chats. Games…">
<meta property="og:title" content="Gaming Platform">
<meta property="og:image" content="https://core.telegram.org/file/811140063/2/hlfJUWy75wU.82563/ea57853b3d4d9ab22f">
<meta property="og:description" content="Bots can offer their users HTML5 games to play solo or to compete against each other in groups and one-on-one chats. Games…">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class=""><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class=""><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/bots" >Telegram Bots</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/bots/games" >Gaming Platform</a></li></ul></div>
<h1 id="dev_page_title">Gaming Platform</h1>
<div id="dev_page_content"><!-- scroll_nav -->
<div class="dev_side_image">
<a href="/file/811140373/1/0_42vz9chLs.975647/383dca94f028b1872c" target="_blank"><img src="/file/811140063/2/hlfJUWy75wU.82563/ea57853b3d4d9ab22f" title="Gaming Platform Poster">
</a></div>
<p>Bots can offer their users <strong>HTML5 games</strong> to play solo or to compete against each other in groups and one-on-one chats. Games are a new type of content on Telegram that your bot can send to users.</p>
<div><center>
<a href="/file/811140035/2/cIULSr61vi4.78261/127282e0bbd66ce3a9" target="_blank"><img src="/file/811140035/2/cIULSr61vi4.78261/127282e0bbd66ce3a9" title="Game in a chat" style="width: 295px; padding: 10px 10px;" /></a></center><br>
</div>
<blockquote>
<p>This introduction is meant for <strong>bot developers</strong>. <a href="https://telegram.org/blog/games"><strong>Click here</strong></a>, in case you&#39;d like something more user-friendly.<br>Check out the <a href="https://telegram.me/gamebot"><strong>@gamebot</strong></a> and <a href="https://telegram.me/gamee"><strong>@gamee</strong></a> bots for examples of what you can do using the new Gaming Platform.</p>
</blockquote>
<h3><a class="anchor" name="creating-a-game" href="#creating-a-game"><i class="anchor-icon"></i></a>Creating a Game</h3>
<p>To get started, send the <code>/newgame</code> command to <a href="https://telegram.me/botfather">@BotFather</a>.You will be prompted for a description text and a photo. You can also upload an optional GIF animation that demostrates your game to the users to make messages with the game more attractive (check out <a href="https://telegram.me/gamebot?game=Lumberjack">Lumberjack</a> or <a href="https://telegram.me/gamebot?game=Corsairs">Corsairs</a> for examples).</p>
<h3><a class="anchor" name="launching-the-game" href="#launching-the-game"><i class="anchor-icon"></i></a>Launching the Game</h3>
<p>Once the game is created, your bot can send it to chats as regular messages, or offer them via <a href="/bots/inline">inline mode</a>. The game message will always have an <a href="/bots/api#inlinekeyboardmarkup">inline</a> <strong>Play button</strong>.</p>
<p>When this button is pressed, your bot gets a callback query that indicates the requested game. You provide the correct URL for this particular user and the app automatically opens the game in the in-app browser.</p>
<h3><a class="anchor" name="adding-buttons" href="#adding-buttons"><i class="anchor-icon"></i></a>Adding Buttons</h3>
<p>If you send the game message without any buttons, it will automatically have a &#39;Play <em>GameName</em>&#39; button. You can manually add multiple buttons to your game message. Please note that the first button in the first row <strong>must always</strong> be the one that launches the game. You can add more buttons: e.g., for a description of the rules, or a button that links to the game&#39;s official community.</p>
<h3><a class="anchor" name="tracking-high-scores" href="#tracking-high-scores"><i class="anchor-icon"></i></a>Tracking High Scores</h3>
<p>The message with your game will also display high scores for the current chat. When a new high score is set, a service message will be sent to the chat and the message with the current scoreboard will be updated. You can also request the necessary data for building in-game high score tables.</p>
<div><center>
<br>
<a href="/file/811140022/1/m7-46hgmwbI.91190/ad7033bcb879270a69" target="_blank"><img src="/file/811140022/1/m7-46hgmwbI.91190/ad7033bcb879270a69" title="In-game high scores for Lumberjack" style="width: 295px; padding: 0px 20px;" /></a>
<a href="/file/811140594/2/WS2fB3n2UGA.149087/270057ff677339717e" target="_blank"><img src="/file/811140594/2/WS2fB3n2UGA.149087/270057ff677339717e" title="Message with the score in the chat" style="width: 295px; padding: 0px 20px;" /></a><br><br>
<br><br></center></div>
<h3><a class="anchor" name="sharing-your-game-to-telegram-chats" href="#sharing-your-game-to-telegram-chats"><i class="anchor-icon"></i></a>Sharing Your Game to Telegram Chats</h3>
<p>There are many way for users to spread your game virally if they like it. The interface will always have the standard system button for sharing the game in the top right corner:</p>
<div><center>
<a href="/file/811140766/2/_wJtf-Zib5I.25531/774eb9b59898526d26" target="_blank"><img src="/file/811140766/2/_wJtf-Zib5I.25531/774eb9b59898526d26" title="Standard share button: iOS" style="width: 295px; padding: 15px 20px;" /></a>
<a href="/file/811140557/3/ddi8K6x0obQ.34056/a1ca60069b70a81646" target="_blank"><img src="/file/811140557/3/ddi8K6x0obQ.34056/a1ca60069b70a81646" title="Standard share button: Android" style="width: 295px; padding: 15px 20px;" /></a><br><br>
</center></div>
<p>You can also create an additional <strong>Share</strong> button inside your HTML page. Pressing this button will send the game to a desired chat along with the user&#39;s best score in the game.</p>
<div><center>
<a href="/file/811140189/2/SLwHmToemfg.91233/a242854be2b500b4cb" target="_blank"><img src="/file/811140189/2/SLwHmToemfg.91233/a242854be2b500b4cb" title="Gamee: share button" style="width: 295px; padding: 15px 20px;" /></a>
<a href="/file/811140978/1/JoBvEad8JaM.148942/dcd741b65b446781b4" target="_blank"><img src="/file/811140978/1/JoBvEad8JaM.148942/dcd741b65b446781b4" title="Shared game with 'just scored'" style="width: 295px; padding: 15px 20px;" /></a>
<br><br></center></div>
<p>To add the sharing button, include <a href="https://telegram.org/js/games.js">this script</a> at the end of the <code>&lt;body&gt;</code> tag on your page:</p>
<pre><code>&lt;script src=&quot;https://telegram.org/js/games.js&quot;&gt;&lt;/script&gt;</code></pre>
<p>Then use the method <code>TelegramGameProxy.shareScore()</code> to call the sharing option.</p>
<blockquote>
<p>Warning: Do not call this method without consent and <strong>direct action</strong> from the user.</p>
</blockquote>
<p><strong>Example:</strong></p>
<pre><code>&lt;button onclick=&quot;TelegramGameProxy.shareScore()&quot;&gt;Share score&lt;/button&gt;</code></pre>
<p>This library will only work when launched from inside Telegram, so please don&#39;t use it on ordinary web pages. </p>
<h3><a class="anchor" name="using-url-parameters" href="#using-url-parameters"><i class="anchor-icon"></i></a>Using URL Parameters</h3>
<p>If your URL is using a fragment identifier, please note that Telegram Apps could add certain service parameters to the fragment id. The names for such parameters will start in <code>tg</code> (you can check the code that adds them <a href="https://github.com/TelegramMessenger/GamingCommunication/blob/master/games.js#L54">here</a>). Use the <code>TelegramGameProxy.initParams</code> object if you need to read your own parameters from the fragment id.</p>
<h3><a class="anchor" name="creating-a-great-html5-experience" href="#creating-a-great-html5-experience"><i class="anchor-icon"></i></a>Creating a Great HTML5 Experience</h3>
<p>Please make sure that your HTML5 page is responsive and works well on all Telegram apps and supported platforms. If you find it impossible to support certain conditions or platforms, don&#39;t leave your users hanging and at least provide a notification.</p>
<blockquote>
<p>See the <a href="/bots/api#games">Bot API Manual</a> for the relevant methods and objects.</p>
</blockquote>
</div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script src="/js/jquery.min.js?1"></script>
<script src="/js/bootstrap.min.js"></script>
<script>window.initDevPageNav&&initDevPageNav();
backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>

View file

@ -1,247 +0,0 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>Bot Code Examples</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="If you want to learn more about Telegram bots, start with our Introduction to Bots »
Check out the FAQ, if you have questions.…">
<meta property="og:title" content="Bot Code Examples">
<meta property="og:image" content="">
<meta property="og:description" content="If you want to learn more about Telegram bots, start with our Introduction to Bots »
Check out the FAQ, if you have questions.…">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class=""><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class=""><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/bots" >Telegram Bots</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/bots/samples" >Bot Code Examples</a></li></ul></div>
<h1 id="dev_page_title">Bot Code Examples</h1>
<div id="dev_page_content"><blockquote>
<p>If you want to learn more about Telegram bots, start with our <a href="/bots"><strong>Introduction to Bots »</strong></a><br>Check out the <a href="/bots/faq"><strong>FAQ</strong></a>, if you have questions.</p>
</blockquote>
<p>Many members of our community are building bots and libraries and publishing their source code. We collect these examples here. Ping us on <a href="https://telegram.me/botsupport">BotSupport</a> if you&#39;ve built a bot and would like to share its code with others.</p>
<h4><a class="anchor" name="php" href="#php"><i class="anchor-icon"></i></a>PHP</h4>
<ul>
<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>
<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>
<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>
<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>
<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>
<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>
<li><p><strong>PHP Telegram Bot</strong>. Telegram bot as it should be.<br><a href="https://github.com/formapro/telegram-bot-php">https://github.com/formapro/telegram-bot-php</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>
<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>
<li><p><strong>TelegramBotApiBundle</strong>. A symfony wrapper bundle for Telegram Bot API.<br><a href="https://github.com/borsaco/TelegramBotApiBundle">https://github.com/borsaco/TelegramBotApiBundle</a></p>
</li>
</ul>
<h4><a class="anchor" name="node-js" href="#node-js"><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>
<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>
<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>
<li><p><strong>telegram-bot-api</strong>. Node.js library for Telegram Bot API.<br><a href="https://github.com/mast/telegram-bot-api">https://github.com/mast/telegram-bot-api</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>
<li><p><strong>tgapi</strong>. Reactive and with full Flow coverage Telegram Bot API JS implementation.<br><a href="https://github.com/bigslycat/tgapi">https://github.com/bigslycat/tgapi</a></p>
</li>
<li><p><strong>Botgram</strong>. Practical Telegram Bot microframework.<br><a href="https://github.com/botgram/botgram">https://github.com/botgram/botgram</a></p>
</li>
</ul>
<h4><a class="anchor" name="rust" href="#rust"><i class="anchor-icon"></i></a>Rust</h4>
<ul>
<li><p><strong>teloxide</strong>. An elegant Telegram bots framework for Rust.<br><a href="https://github.com/teloxide/teloxide">https://github.com/teloxide/teloxide</a></p>
</li>
<li><p><strong>Telebot</strong>. Write Telegram bots in Rust with Tokio and Futures.<br><a href="https://github.com/bytesnake/telebot">https://github.com/bytesnake/telebot</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>
<li><p><strong>telegram-bot</strong>. Rust Library for creating a Telegram Bot.<br><a href="https://github.com/telegram-rs/telegram-bot">https://github.com/telegram-rs/telegram-bot</a></p>
</li>
</ul>
<h4><a class="anchor" name="python" href="#python"><i class="anchor-icon"></i></a>Python</h4>
<ul>
<li><p><strong>python-telegram-bot</strong>. A wrapper you can&#39;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>
<li><p><strong>pyTelegramBotAPI</strong>. Python Telegram Bot API.<br><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>
</ul>
<h4><a class="anchor" name="ruby" href="#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>
<li><p><strong>telegram-bot-ruby</strong>. Ruby wrapper for Telegram&#39;s Bot API.<br><a href="https://github.com/atipugin/telegram-bot-ruby">https://github.com/atipugin/telegram-bot-ruby</a></p>
</li>
<li><p><strong>TelegramBot</strong>. A charismatic Ruby client for Telegram&#39;s Bot API.<br><a href="https://github.com/eljojo/telegram_bot">https://github.com/eljojo/telegram_bot</a></p>
</li>
</ul>
<h4><a class="anchor" name="swift" href="#swift"><i class="anchor-icon"></i></a>Swift</h4>
<ul>
<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>
<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>
<li><p><strong>SwiftyBot</strong>. Swift + Vapor + Telegram.<br><a href="https://github.com/FabrizioBrancati/SwiftyBot">https://github.com/FabrizioBrancati/SwiftyBot</a></p>
</li>
</ul>
<h4><a class="anchor" name="kotlin" href="#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>
<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>
<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>
<li><p><strong>Telegraff</strong>. Kotlin DSL for Telegram Bots.<br><a href="https://github.com/ruslanys/telegraff">https://github.com/ruslanys/telegraff</a></p>
</li>
</ul>
<h4><a class="anchor" name="java" href="#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>
<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>
</ul>
<h4><a class="anchor" name="go" href="#go"><i class="anchor-icon"></i></a>Go</h4>
<ul>
<li><p><strong>go-telegram-bot-api</strong>. Golang 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>
<li><p><strong>telebot</strong>. A Telegram bot framework in Go.<br><a href="https://github.com/tucnak/telebot">https://github.com/tucnak/telebot</a></p>
</li>
</ul>
<h4><a class="anchor" name="other-languages" href="#other-languages"><i class="anchor-icon"></i></a>Other Languages</h4>
<ul>
<li><p>C#. <strong>Telegram.bot</strong>. Library.<br><a href="https://github.com/TelegramBots/Telegram.Bot">https://github.com/TelegramBots/Telegram.Bot</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>
<li><p>C++. <strong>tgbot-cpp</strong>. C++ library for Telegram Bot API.<br><a href="https://github.com/reo7sp/tgbot-cpp">https://github.com/reo7sp/tgbot-cpp</a></p>
</li>
<li><p>Dart. <strong>TeleDart</strong>. A Dart library interfacing with the latest Telegram Bot API.<br><a href="https://github.com/DinoLeung/TeleDart">https://github.com/DinoLeung/TeleDart</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>
<li><p>OCaml. <strong>TelegraML</strong>. An OCaml library for creating bots for Telegram.<br><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>
<li><p>Scala. <strong>canoe</strong>. Functional Telegram Bot API for Scala.<br><a href="https://github.com/augustjune/canoe">https://github.com/augustjune/canoe</a></p>
</li>
<li><p>Scala. <strong>bot4s.telegram</strong>. 100% idiomatic Scala wrapper for the Telegram Bot API.<br><a href="https://github.com/bot4s/telegram">https://github.com/bot4s/telegram</a></p>
</li>
<li><p>Perl. <strong>Telegram Bot</strong>. A genuine Perl 6 client for the Telegram&#39;s Bot API.<br><a href="https://github.com/GildedHonour/TelegramBot">https://github.com/GildedHonour/TelegramBot</a></p>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script>backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>

View file

@ -2,12 +2,12 @@
<html class="">
<head>
<meta charset="utf-8">
<title>wallPaperNoFile</title>
<title>account.contentSettings</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="No file wallpaper">
<meta property="og:title" content="wallPaperNoFile">
<meta property="description" content="Sensitive content settings">
<meta property="og:title" content="account.contentSettings">
<meta property="og:image" content="">
<meta property="og:description" content="No file wallpaper">
<meta property="og:description" content="Sensitive content settings">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
@ -36,10 +36,10 @@
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/wallPaperNoFile" >wallPaperNoFile</a></li></ul></div>
<h1 id="dev_page_title">wallPaperNoFile</h1>
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/account.contentSettings" >account.contentSettings</a></li></ul></div>
<h1 id="dev_page_title">account.contentSettings</h1>
<div id="dev_page_content"><p>No file wallpaper</p>
<div id="dev_page_content"><p>Sensitive content settings</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
@ -52,7 +52,7 @@
</li>
</ul>
</div>
<pre class="page_scheme"><code><a href="/constructor/wallPaperNoFile" class="current_page_link" >wallPaperNoFile</a>#8af40b25 flags:<a href="/type/%23" >#</a> default:flags.1?true dark:flags.4?true settings:flags.2?<a href="/type/WallPaperSettings" >WallPaperSettings</a> = <a href="/type/WallPaper" >WallPaper</a>;</code></pre></p>
<pre class="page_scheme"><code><a href="/constructor/account.contentSettings" class="current_page_link" >account.contentSettings</a>#57e28221 flags:<a href="/type/%23" >#</a> sensitive_enabled:flags.0?true sensitive_can_change:flags.1?true = <a href="/type/account.ContentSettings" >account.ContentSettings</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<table class="table">
<thead>
@ -69,24 +69,19 @@
<td>Flags, see <a href="/mtproto/TL-combinators#conditional-fields">TL conditional fields</a></td>
</tr>
<tr>
<td><strong>default</strong></td>
<td><strong>sensitive_enabled</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.0?<a href="/constructor/true">true</a></td>
<td>Whether viewing of sensitive (NSFW) content is enabled</td>
</tr>
<tr>
<td><strong>sensitive_can_change</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.1?<a href="/constructor/true">true</a></td>
<td>Whether this is the default wallpaper</td>
</tr>
<tr>
<td><strong>dark</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.4?<a href="/constructor/true">true</a></td>
<td>Dark mode</td>
</tr>
<tr>
<td><strong>settings</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.2?<a href="/type/WallPaperSettings">WallPaperSettings</a></td>
<td>Wallpaper settings</td>
<td>Whether the current client can change the sensitive content settings to view NSFW content</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/WallPaper">WallPaper</a></p></div>
<p><a href="/type/account.ContentSettings">account.ContentSettings</a></p></div>
</div>

View file

@ -2,12 +2,12 @@
<html class="">
<head>
<meta charset="utf-8">
<title>account.authorizationForm</title>
<title>account.passwordInputSettings</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Telegram Passport authorization form">
<meta property="og:title" content="account.authorizationForm">
<meta property="description" content="Settings for setting up a new password">
<meta property="og:title" content="account.passwordInputSettings">
<meta property="og:image" content="">
<meta property="og:description" content="Telegram Passport authorization form">
<meta property="og:description" content="Settings for setting up a new password">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
@ -36,10 +36,10 @@
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/account.authorizationForm" >account.authorizationForm</a></li></ul></div>
<h1 id="dev_page_title">account.authorizationForm</h1>
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/account.passwordInputSettings" >account.passwordInputSettings</a></li></ul></div>
<h1 id="dev_page_title">account.passwordInputSettings</h1>
<div id="dev_page_content"><p><a href="/passport">Telegram Passport</a> authorization form</p>
<div id="dev_page_content"><p>Settings for setting up a new password</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
@ -52,7 +52,7 @@
</li>
</ul>
</div>
<pre class="page_scheme"><code><a href="/constructor/account.authorizationForm" class="current_page_link" >account.authorizationForm</a>#ad2e1cd8 flags:<a href="/type/%23" >#</a> required_types:<a href="/type/Vector%20t" >Vector</a>&lt;<a href="/type/SecureRequiredType" >SecureRequiredType</a>&gt; values:<a href="/type/Vector%20t" >Vector</a>&lt;<a href="/type/SecureValue" >SecureValue</a>&gt; errors:<a href="/type/Vector%20t" >Vector</a>&lt;<a href="/type/SecureValueError" >SecureValueError</a>&gt; users:<a href="/type/Vector%20t" >Vector</a>&lt;<a href="/type/User" >User</a>&gt; privacy_policy_url:flags.0?<a href="/type/string" >string</a> = <a href="/type/account.AuthorizationForm" >account.AuthorizationForm</a>;</code></pre></p>
<pre class="page_scheme"><code><a href="/constructor/account.passwordInputSettings" class="current_page_link" >account.passwordInputSettings</a>#c23727c9 flags:<a href="/type/%23" >#</a> new_algo:flags.0?<a href="/type/PasswordKdfAlgo" >PasswordKdfAlgo</a> new_password_hash:flags.0?<a href="/type/bytes" >bytes</a> hint:flags.0?<a href="/type/string" >string</a> email:flags.1?<a href="/type/string" >string</a> new_secure_settings:flags.2?<a href="/type/SecureSecretSettings" >SecureSecretSettings</a> = <a href="/type/account.PasswordInputSettings" >account.PasswordInputSettings</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<table class="table">
<thead>
@ -69,35 +69,37 @@
<td>Flags, see <a href="/mtproto/TL-combinators#conditional-fields">TL conditional fields</a></td>
</tr>
<tr>
<td><strong>required_types</strong></td>
<td style="text-align: center;"><a href="/type/Vector%20t">Vector</a>&lt;<a href="/type/SecureRequiredType">SecureRequiredType</a>&gt;</td>
<td>Required <a href="/passport">Telegram Passport</a> documents</td>
<td><strong>new_algo</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.0?<a href="/type/PasswordKdfAlgo">PasswordKdfAlgo</a></td>
<td>The <a href="/api/srp">SRP algorithm</a> to use</td>
</tr>
<tr>
<td><strong>values</strong></td>
<td style="text-align: center;"><a href="/type/Vector%20t">Vector</a>&lt;<a href="/type/SecureValue">SecureValue</a>&gt;</td>
<td>Already submitted <a href="/passport">Telegram Passport</a> documents</td>
<td><strong>new_password_hash</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.0?<a href="/type/bytes">bytes</a></td>
<td>The <a href="/api/srp">computed password hash</a></td>
</tr>
<tr>
<td><strong>errors</strong></td>
<td style="text-align: center;"><a href="/type/Vector%20t">Vector</a>&lt;<a href="/type/SecureValueError">SecureValueError</a>&gt;</td>
<td><a href="/passport">Telegram Passport</a> errors</td>
</tr>
<tr>
<td><strong>users</strong></td>
<td style="text-align: center;"><a href="/type/Vector%20t">Vector</a>&lt;<a href="/type/User">User</a>&gt;</td>
<td>Info about the bot to which the form will be submitted</td>
</tr>
<tr>
<td><strong>privacy_policy_url</strong></td>
<td><strong>hint</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.0?<a href="/type/string">string</a></td>
<td>URL of the service's privacy policy</td>
<td>Text hint for the password</td>
</tr>
<tr>
<td><strong>email</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.1?<a href="/type/string">string</a></td>
<td>Password recovery email</td>
</tr>
<tr>
<td><strong>new_secure_settings</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.2?<a href="/type/SecureSecretSettings">SecureSecretSettings</a></td>
<td>Telegram <a href="/passport">passport</a> settings</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/account.AuthorizationForm">account.AuthorizationForm</a></p>
<p><a href="/type/account.PasswordInputSettings">account.PasswordInputSettings</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#two-factor-authentication" id="two-factor-authentication" name="two-factor-authentication"><i class="anchor-icon"></i></a><a href="/api/srp">Two-factor authentication</a></h4>
<p>How to login to a user's account if they have enabled 2FA, how to change password.</p>
<h4><a class="anchor" href="#telegram-passport-manual" id="telegram-passport-manual" name="telegram-passport-manual"><i class="anchor-icon"></i></a><a href="/passport">Telegram Passport Manual</a></h4></div>
</div>

View file

@ -1,161 +0,0 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>account.sentChangePhoneCode</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Sent change phone code
Parameters
phone_code_hash
string
Change phone code hash
send_call_timeout
int
Call timeout
Type…">
<meta property="og:title" content="account.sentChangePhoneCode">
<meta property="og:image" content="">
<meta property="og:description" content="Sent change phone code
Parameters
phone_code_hash
string
Change phone code hash
send_call_timeout
int
Call timeout
Type…">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class=""><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class="active"><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/account.sentChangePhoneCode" >account.sentChangePhoneCode</a></li></ul></div>
<h1 id="dev_page_title">account.sentChangePhoneCode</h1>
<div id="dev_page_content"><p>Sent change phone code</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 121 <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="?layer=1">1 &ndash; Base layer</a></li><li><a href="?layer=2">2 &ndash; New userpic notifications</a></li><li><a href="?layer=3">3 &ndash; Send message can trigger link change</a></li><li><a href="?layer=4">4 &ndash; Check-in chats</a></li><li><a href="?layer=5">5 &ndash; Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 &ndash; Foursquare integration</a></li><li><a href="?layer=7">7 &ndash; Added wallPaperSolid</a></li><li><a href="?layer=8">8 &ndash; Added end-to-end encryption</a></li><li><a href="?layer=9">9 &ndash; Improved big files upload perfomance</a></li><li><a href="?layer=10">10 &ndash; Improved chat participants updates</a></li><li><a href="?layer=11">11 &ndash; Improved secret chats</a></li><li><a href="?layer=12">12 &ndash; New dynamic support</a></li><li><a href="?layer=13">13 &ndash; Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 &ndash; Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 &ndash; Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 &ndash; Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 &ndash; Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 &ndash; Added usernames</a></li><li><a href="?layer=23">23 &ndash; Stickers for secret chats</a></li><li><a href="?layer=105">105 &ndash; Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 &ndash; Login with QR code</a></li><li><a href="?layer=109">109 &ndash; Polls v2</a></li><li><a href="?layer=110">110 &ndash; People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 &ndash; Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 &ndash; Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 &ndash; PSA</a></li><li><a href="?layer=114">114 &ndash; Video thumbs for GIFs</a></li><li><a href="?layer=115">115 &ndash; Peek Channel Invite</a></li><li><a href="?layer=116">116 &ndash; Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 &ndash; WebRTC Phone Calls</a></li><li><a href="?layer=118">118 &ndash; Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 &ndash; Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 &ndash; Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121"><strong>121 &ndash; SVG-based Outlines for Stickers</strong></a></li>
<li class="divider"></li>
<li><a href="/api/layers">More...</a></li>
</ul>
</li>
</ul>
</div>
<pre class="page_scheme"><code>Constructor schema is available as of layer 50. <a href="?layer=50">Switch »</a></code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<table class="table">
<tbody>
<tr>
<td><strong>phone_code_hash</strong></td>
<td style="text-align: center;"><a href="/type/string">string</a></td>
<td>Change phone code hash</td>
</tr>
<tr>
<td><strong>send_call_timeout</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>Call timeout</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/account.SentChangePhoneCode">account.SentChangePhoneCode</a></p></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script>backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>

View file

@ -2,12 +2,12 @@
<html class="">
<head>
<meta charset="utf-8">
<title>auth.loginTokenMigrateTo</title>
<title>account.tmpPassword</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Repeat the query to the specified DC">
<meta property="og:title" content="auth.loginTokenMigrateTo">
<meta property="description" content="Temporary payment password">
<meta property="og:title" content="account.tmpPassword">
<meta property="og:image" content="">
<meta property="og:description" content="Repeat the query to the specified DC">
<meta property="og:description" content="Temporary payment password">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
@ -36,10 +36,10 @@
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/auth.loginTokenMigrateTo" >auth.loginTokenMigrateTo</a></li></ul></div>
<h1 id="dev_page_title">auth.loginTokenMigrateTo</h1>
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/account.tmpPassword" >account.tmpPassword</a></li></ul></div>
<h1 id="dev_page_title">account.tmpPassword</h1>
<div id="dev_page_content"><p>Repeat the query to the specified DC</p>
<div id="dev_page_content"><p>Temporary payment password</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
@ -52,7 +52,7 @@
</li>
</ul>
</div>
<pre class="page_scheme"><code><a href="/constructor/auth.loginTokenMigrateTo" class="current_page_link" >auth.loginTokenMigrateTo</a>#68e9916 dc_id:<a href="/type/int" >int</a> token:<a href="/type/bytes" >bytes</a> = <a href="/type/auth.LoginToken" >auth.LoginToken</a>;</code></pre></p>
<pre class="page_scheme"><code><a href="/constructor/account.tmpPassword" class="current_page_link" >account.tmpPassword</a>#db64fd34 tmp_password:<a href="/type/bytes" >bytes</a> valid_until:<a href="/type/int" >int</a> = <a href="/type/account.TmpPassword" >account.TmpPassword</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<table class="table">
<thead>
@ -64,19 +64,19 @@
</thead>
<tbody>
<tr>
<td><strong>dc_id</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>DC ID</td>
<td><strong>tmp_password</strong></td>
<td style="text-align: center;"><a href="/type/bytes">bytes</a></td>
<td>Temporary password</td>
</tr>
<tr>
<td><strong>token</strong></td>
<td style="text-align: center;"><a href="/type/bytes">bytes</a></td>
<td>Token to use for login</td>
<td><strong>valid_until</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>Validity period</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/auth.LoginToken">auth.LoginToken</a></p></div>
<p><a href="/type/account.TmpPassword">account.TmpPassword</a></p></div>
</div>

View file

@ -0,0 +1,155 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>account.wallPapers</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Installed wallpapers">
<meta property="og:title" content="account.wallPapers">
<meta property="og:image" content="">
<meta property="og:description" content="Installed wallpapers">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class=""><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class="active"><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/account.wallPapers" >account.wallPapers</a></li></ul></div>
<h1 id="dev_page_title">account.wallPapers</h1>
<div id="dev_page_content"><p>Installed wallpapers</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 121 <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="?layer=1">1 &ndash; Base layer</a></li><li><a href="?layer=2">2 &ndash; New userpic notifications</a></li><li><a href="?layer=3">3 &ndash; Send message can trigger link change</a></li><li><a href="?layer=4">4 &ndash; Check-in chats</a></li><li><a href="?layer=5">5 &ndash; Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 &ndash; Foursquare integration</a></li><li><a href="?layer=7">7 &ndash; Added wallPaperSolid</a></li><li><a href="?layer=8">8 &ndash; Added end-to-end encryption</a></li><li><a href="?layer=9">9 &ndash; Improved big files upload perfomance</a></li><li><a href="?layer=10">10 &ndash; Improved chat participants updates</a></li><li><a href="?layer=11">11 &ndash; Improved secret chats</a></li><li><a href="?layer=12">12 &ndash; New dynamic support</a></li><li><a href="?layer=13">13 &ndash; Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 &ndash; Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 &ndash; Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 &ndash; Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 &ndash; Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 &ndash; Added usernames</a></li><li><a href="?layer=23">23 &ndash; Stickers for secret chats</a></li><li><a href="?layer=105">105 &ndash; Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 &ndash; Login with QR code</a></li><li><a href="?layer=109">109 &ndash; Polls v2</a></li><li><a href="?layer=110">110 &ndash; People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 &ndash; Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 &ndash; Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 &ndash; PSA</a></li><li><a href="?layer=114">114 &ndash; Video thumbs for GIFs</a></li><li><a href="?layer=115">115 &ndash; Peek Channel Invite</a></li><li><a href="?layer=116">116 &ndash; Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 &ndash; WebRTC Phone Calls</a></li><li><a href="?layer=118">118 &ndash; Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 &ndash; Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 &ndash; Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121"><strong>121 &ndash; SVG-based Outlines for Stickers</strong></a></li>
<li class="divider"></li>
<li><a href="/api/layers">More...</a></li>
</ul>
</li>
</ul>
</div>
<pre class="page_scheme"><code><a href="/constructor/account.wallPapers" class="current_page_link" >account.wallPapers</a>#702b65a9 hash:<a href="/type/int" >int</a> wallpapers:<a href="/type/Vector%20t" >Vector</a>&lt;<a href="/type/WallPaper" >WallPaper</a>&gt; = <a href="/type/account.WallPapers" >account.WallPapers</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<table class="table">
<thead>
<tr>
<th>Name</th>
<th style="text-align: center;">Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>hash</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td><a href="/api/offsets#hash-generation">Hash for pagination, for more info click here</a></td>
</tr>
<tr>
<td><strong>wallpapers</strong></td>
<td style="text-align: center;"><a href="/type/Vector%20t">Vector</a>&lt;<a href="/type/WallPaper">WallPaper</a>&gt;</td>
<td>Wallpapers</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/account.WallPapers">account.WallPapers</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#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></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script>backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>

View file

@ -0,0 +1,155 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>auth.authorizationSignUpRequired</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="An account with this phone number doesn&#39;t exist on telegram: the user has to enter basic information and sign up">
<meta property="og:title" content="auth.authorizationSignUpRequired">
<meta property="og:image" content="">
<meta property="og:description" content="An account with this phone number doesn&#39;t exist on telegram: the user has to enter basic information and sign up">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class=""><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class="active"><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/auth.authorizationSignUpRequired" >auth.authorizationSignUpRequired</a></li></ul></div>
<h1 id="dev_page_title">auth.authorizationSignUpRequired</h1>
<div id="dev_page_content"><p>An account with this phone number doesn't exist on telegram: the user has to <a href="/api/auth">enter basic information and sign up</a></p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 121 <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="?layer=1">1 &ndash; Base layer</a></li><li><a href="?layer=2">2 &ndash; New userpic notifications</a></li><li><a href="?layer=3">3 &ndash; Send message can trigger link change</a></li><li><a href="?layer=4">4 &ndash; Check-in chats</a></li><li><a href="?layer=5">5 &ndash; Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 &ndash; Foursquare integration</a></li><li><a href="?layer=7">7 &ndash; Added wallPaperSolid</a></li><li><a href="?layer=8">8 &ndash; Added end-to-end encryption</a></li><li><a href="?layer=9">9 &ndash; Improved big files upload perfomance</a></li><li><a href="?layer=10">10 &ndash; Improved chat participants updates</a></li><li><a href="?layer=11">11 &ndash; Improved secret chats</a></li><li><a href="?layer=12">12 &ndash; New dynamic support</a></li><li><a href="?layer=13">13 &ndash; Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 &ndash; Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 &ndash; Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 &ndash; Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 &ndash; Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 &ndash; Added usernames</a></li><li><a href="?layer=23">23 &ndash; Stickers for secret chats</a></li><li><a href="?layer=105">105 &ndash; Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 &ndash; Login with QR code</a></li><li><a href="?layer=109">109 &ndash; Polls v2</a></li><li><a href="?layer=110">110 &ndash; People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 &ndash; Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 &ndash; Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 &ndash; PSA</a></li><li><a href="?layer=114">114 &ndash; Video thumbs for GIFs</a></li><li><a href="?layer=115">115 &ndash; Peek Channel Invite</a></li><li><a href="?layer=116">116 &ndash; Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 &ndash; WebRTC Phone Calls</a></li><li><a href="?layer=118">118 &ndash; Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 &ndash; Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 &ndash; Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121"><strong>121 &ndash; SVG-based Outlines for Stickers</strong></a></li>
<li class="divider"></li>
<li><a href="/api/layers">More...</a></li>
</ul>
</li>
</ul>
</div>
<pre class="page_scheme"><code><a href="/constructor/auth.authorizationSignUpRequired" class="current_page_link" >auth.authorizationSignUpRequired</a>#44747e9a flags:<a href="/type/%23" >#</a> terms_of_service:flags.0?<a href="/type/help.TermsOfService" >help.TermsOfService</a> = <a href="/type/auth.Authorization" >auth.Authorization</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<table class="table">
<thead>
<tr>
<th>Name</th>
<th style="text-align: center;">Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>flags</strong></td>
<td style="text-align: center;"><a href="/type/%23">#</a></td>
<td>Flags, see <a href="/mtproto/TL-combinators#conditional-fields">TL conditional fields</a></td>
</tr>
<tr>
<td><strong>terms_of_service</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.0?<a href="/type/help.TermsOfService">help.TermsOfService</a></td>
<td>Telegram's terms of service: the user must read and accept the terms of service before signing up to telegram</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/auth.Authorization">auth.Authorization</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#user-authorization" id="user-authorization" name="user-authorization"><i class="anchor-icon"></i></a><a href="/api/auth">User Authorization</a></h4>
<p>How to register a user's phone to start using the API.</p></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script>backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>

View file

@ -0,0 +1,132 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>auth.codeTypeFlashCall</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Type of verification code that will be sent next if you call the resendCode method: SMS code">
<meta property="og:title" content="auth.codeTypeFlashCall">
<meta property="og:image" content="">
<meta property="og:description" content="Type of verification code that will be sent next if you call the resendCode method: SMS code">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class=""><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class="active"><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/auth.codeTypeFlashCall" >auth.codeTypeFlashCall</a></li></ul></div>
<h1 id="dev_page_title">auth.codeTypeFlashCall</h1>
<div id="dev_page_content"><p>Type of verification code that will be sent next if you call the resendCode method: SMS code</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 121 <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="?layer=1">1 &ndash; Base layer</a></li><li><a href="?layer=2">2 &ndash; New userpic notifications</a></li><li><a href="?layer=3">3 &ndash; Send message can trigger link change</a></li><li><a href="?layer=4">4 &ndash; Check-in chats</a></li><li><a href="?layer=5">5 &ndash; Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 &ndash; Foursquare integration</a></li><li><a href="?layer=7">7 &ndash; Added wallPaperSolid</a></li><li><a href="?layer=8">8 &ndash; Added end-to-end encryption</a></li><li><a href="?layer=9">9 &ndash; Improved big files upload perfomance</a></li><li><a href="?layer=10">10 &ndash; Improved chat participants updates</a></li><li><a href="?layer=11">11 &ndash; Improved secret chats</a></li><li><a href="?layer=12">12 &ndash; New dynamic support</a></li><li><a href="?layer=13">13 &ndash; Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 &ndash; Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 &ndash; Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 &ndash; Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 &ndash; Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 &ndash; Added usernames</a></li><li><a href="?layer=23">23 &ndash; Stickers for secret chats</a></li><li><a href="?layer=105">105 &ndash; Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 &ndash; Login with QR code</a></li><li><a href="?layer=109">109 &ndash; Polls v2</a></li><li><a href="?layer=110">110 &ndash; People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 &ndash; Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 &ndash; Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 &ndash; PSA</a></li><li><a href="?layer=114">114 &ndash; Video thumbs for GIFs</a></li><li><a href="?layer=115">115 &ndash; Peek Channel Invite</a></li><li><a href="?layer=116">116 &ndash; Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 &ndash; WebRTC Phone Calls</a></li><li><a href="?layer=118">118 &ndash; Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 &ndash; Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 &ndash; Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121"><strong>121 &ndash; SVG-based Outlines for Stickers</strong></a></li>
<li class="divider"></li>
<li><a href="/api/layers">More...</a></li>
</ul>
</li>
</ul>
</div>
<pre class="page_scheme"><code><a href="/constructor/auth.codeTypeFlashCall" class="current_page_link" >auth.codeTypeFlashCall</a>#226ccefb = <a href="/type/auth.CodeType" >auth.CodeType</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<p>This constructor does not require any parameters.</p>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/auth.CodeType">auth.CodeType</a></p></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script>backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>

View file

@ -2,12 +2,12 @@
<html class="">
<head>
<meta charset="utf-8">
<title>userStatusLastMonth</title>
<title>auth.codeTypeSms</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Online status: last seen last month">
<meta property="og:title" content="userStatusLastMonth">
<meta property="description" content="Type of verification code that will be sent next if you call the resendCode method: SMS code">
<meta property="og:title" content="auth.codeTypeSms">
<meta property="og:image" content="">
<meta property="og:description" content="Online status: last seen last month">
<meta property="og:description" content="Type of verification code that will be sent next if you call the resendCode method: SMS code">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
@ -36,10 +36,10 @@
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/userStatusLastMonth" >userStatusLastMonth</a></li></ul></div>
<h1 id="dev_page_title">userStatusLastMonth</h1>
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/auth.codeTypeSms" >auth.codeTypeSms</a></li></ul></div>
<h1 id="dev_page_title">auth.codeTypeSms</h1>
<div id="dev_page_content"><p>Online status: last seen last month</p>
<div id="dev_page_content"><p>Type of verification code that will be sent next if you call the resendCode method: SMS code</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
@ -52,11 +52,11 @@
</li>
</ul>
</div>
<pre class="page_scheme"><code><a href="/constructor/userStatusLastMonth" class="current_page_link" >userStatusLastMonth</a>#77ebc742 = <a href="/type/UserStatus" >UserStatus</a>;</code></pre></p>
<pre class="page_scheme"><code><a href="/constructor/auth.codeTypeSms" class="current_page_link" >auth.codeTypeSms</a>#72a3158c = <a href="/type/auth.CodeType" >auth.CodeType</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<p>This constructor does not require any parameters.</p>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/UserStatus">UserStatus</a></p></div>
<p><a href="/type/auth.CodeType">auth.CodeType</a></p></div>
</div>

View file

@ -2,12 +2,12 @@
<html class="">
<head>
<meta charset="utf-8">
<title>upload.cdnFile</title>
<title>auth.exportedAuthorization</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Represent a chunk of a CDN file.">
<meta property="og:title" content="upload.cdnFile">
<meta property="description" content="Data for copying of authorization between data centres.">
<meta property="og:title" content="auth.exportedAuthorization">
<meta property="og:image" content="">
<meta property="og:description" content="Represent a chunk of a CDN file.">
<meta property="og:description" content="Data for copying of authorization between data centres.">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
@ -36,10 +36,10 @@
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/upload.cdnFile" >upload.cdnFile</a></li></ul></div>
<h1 id="dev_page_title">upload.cdnFile</h1>
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/auth.exportedAuthorization" >auth.exportedAuthorization</a></li></ul></div>
<h1 id="dev_page_title">auth.exportedAuthorization</h1>
<div id="dev_page_content"><p>Represent a chunk of a <a href="/cdn">CDN</a> file.</p>
<div id="dev_page_content"><p>Data for copying of authorization between data centres.</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
@ -52,7 +52,7 @@
</li>
</ul>
</div>
<pre class="page_scheme"><code><a href="/constructor/upload.cdnFile" class="current_page_link" >upload.cdnFile</a>#a99fca4f bytes:<a href="/type/bytes" >bytes</a> = <a href="/type/upload.CdnFile" >upload.CdnFile</a>;</code></pre></p>
<pre class="page_scheme"><code><a href="/constructor/auth.exportedAuthorization" class="current_page_link" >auth.exportedAuthorization</a>#df969c2d id:<a href="/type/int" >int</a> bytes:<a href="/type/bytes" >bytes</a> = <a href="/type/auth.ExportedAuthorization" >auth.ExportedAuthorization</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<table class="table">
<thead>
@ -64,16 +64,19 @@
</thead>
<tbody>
<tr>
<td><strong>id</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>current user identifier</td>
</tr>
<tr>
<td><strong>bytes</strong></td>
<td style="text-align: center;"><a href="/type/bytes">bytes</a></td>
<td>The data</td>
<td>authorizes key</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/upload.CdnFile">upload.CdnFile</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#encrypted-cdns-for-speed-and-security" id="encrypted-cdns-for-speed-and-security" name="encrypted-cdns-for-speed-and-security"><i class="anchor-icon"></i></a><a href="/cdn">Encrypted CDNs for Speed and Security</a></h4></div>
<p><a href="/type/auth.ExportedAuthorization">auth.ExportedAuthorization</a></p></div>
</div>

View file

@ -0,0 +1,187 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>autoDownloadSettings</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Autodownload settings">
<meta property="og:title" content="autoDownloadSettings">
<meta property="og:image" content="">
<meta property="og:description" content="Autodownload settings">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class=""><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class="active"><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/autoDownloadSettings" >autoDownloadSettings</a></li></ul></div>
<h1 id="dev_page_title">autoDownloadSettings</h1>
<div id="dev_page_content"><p>Autodownload settings</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 121 <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="?layer=1">1 &ndash; Base layer</a></li><li><a href="?layer=2">2 &ndash; New userpic notifications</a></li><li><a href="?layer=3">3 &ndash; Send message can trigger link change</a></li><li><a href="?layer=4">4 &ndash; Check-in chats</a></li><li><a href="?layer=5">5 &ndash; Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 &ndash; Foursquare integration</a></li><li><a href="?layer=7">7 &ndash; Added wallPaperSolid</a></li><li><a href="?layer=8">8 &ndash; Added end-to-end encryption</a></li><li><a href="?layer=9">9 &ndash; Improved big files upload perfomance</a></li><li><a href="?layer=10">10 &ndash; Improved chat participants updates</a></li><li><a href="?layer=11">11 &ndash; Improved secret chats</a></li><li><a href="?layer=12">12 &ndash; New dynamic support</a></li><li><a href="?layer=13">13 &ndash; Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 &ndash; Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 &ndash; Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 &ndash; Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 &ndash; Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 &ndash; Added usernames</a></li><li><a href="?layer=23">23 &ndash; Stickers for secret chats</a></li><li><a href="?layer=105">105 &ndash; Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 &ndash; Login with QR code</a></li><li><a href="?layer=109">109 &ndash; Polls v2</a></li><li><a href="?layer=110">110 &ndash; People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 &ndash; Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 &ndash; Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 &ndash; PSA</a></li><li><a href="?layer=114">114 &ndash; Video thumbs for GIFs</a></li><li><a href="?layer=115">115 &ndash; Peek Channel Invite</a></li><li><a href="?layer=116">116 &ndash; Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 &ndash; WebRTC Phone Calls</a></li><li><a href="?layer=118">118 &ndash; Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 &ndash; Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 &ndash; Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121"><strong>121 &ndash; SVG-based Outlines for Stickers</strong></a></li>
<li class="divider"></li>
<li><a href="/api/layers">More...</a></li>
</ul>
</li>
</ul>
</div>
<pre class="page_scheme"><code><a href="/constructor/autoDownloadSettings" class="current_page_link" >autoDownloadSettings</a>#e04232f3 flags:<a href="/type/%23" >#</a> disabled:flags.0?true video_preload_large:flags.1?true audio_preload_next:flags.2?true phonecalls_less_data:flags.3?true photo_size_max:<a href="/type/int" >int</a> video_size_max:<a href="/type/int" >int</a> file_size_max:<a href="/type/int" >int</a> video_upload_maxbitrate:<a href="/type/int" >int</a> = <a href="/type/AutoDownloadSettings" >AutoDownloadSettings</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<table class="table">
<thead>
<tr>
<th>Name</th>
<th style="text-align: center;">Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>flags</strong></td>
<td style="text-align: center;"><a href="/type/%23">#</a></td>
<td>Flags, see <a href="/mtproto/TL-combinators#conditional-fields">TL conditional fields</a></td>
</tr>
<tr>
<td><strong>disabled</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.0?<a href="/constructor/true">true</a></td>
<td>Disable automatic media downloads?</td>
</tr>
<tr>
<td><strong>video_preload_large</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.1?<a href="/constructor/true">true</a></td>
<td>Whether to preload the first seconds of videos larger than the specified limit</td>
</tr>
<tr>
<td><strong>audio_preload_next</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.2?<a href="/constructor/true">true</a></td>
<td>Whether to preload the next audio track when you're listening to music</td>
</tr>
<tr>
<td><strong>phonecalls_less_data</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.3?<a href="/constructor/true">true</a></td>
<td>Whether to enable data saving mode in phone calls</td>
</tr>
<tr>
<td><strong>photo_size_max</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>Maximum size of photos to preload</td>
</tr>
<tr>
<td><strong>video_size_max</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>Maximum size of videos to preload</td>
</tr>
<tr>
<td><strong>file_size_max</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>Maximum size of other files to preload</td>
</tr>
<tr>
<td><strong>video_upload_maxbitrate</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>Maximum suggested bitrate for <strong>uploading</strong> videos</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/AutoDownloadSettings">AutoDownloadSettings</a></p></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script>backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>

View file

@ -2,12 +2,12 @@
<html class="">
<head>
<meta charset="utf-8">
<title>updateContactsReset</title>
<title>baseThemeClassic</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="All contacts were deleted">
<meta property="og:title" content="updateContactsReset">
<meta property="description" content="Classic theme">
<meta property="og:title" content="baseThemeClassic">
<meta property="og:image" content="">
<meta property="og:description" content="All contacts were deleted">
<meta property="og:description" content="Classic theme">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
@ -36,10 +36,10 @@
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/updateContactsReset" >updateContactsReset</a></li></ul></div>
<h1 id="dev_page_title">updateContactsReset</h1>
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/baseThemeClassic" >baseThemeClassic</a></li></ul></div>
<h1 id="dev_page_title">baseThemeClassic</h1>
<div id="dev_page_content"><p>All contacts were deleted</p>
<div id="dev_page_content"><p>Classic theme</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
@ -52,11 +52,11 @@
</li>
</ul>
</div>
<pre class="page_scheme"><code><a href="/constructor/updateContactsReset" class="current_page_link" >updateContactsReset</a>#7084a7be = <a href="/type/Update" >Update</a>;</code></pre></p>
<pre class="page_scheme"><code><a href="/constructor/baseThemeClassic" class="current_page_link" >baseThemeClassic</a>#c3a12462 = <a href="/type/BaseTheme" >BaseTheme</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<p>This constructor does not require any parameters.</p>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/Update">Update</a></p></div>
<p><a href="/type/BaseTheme">BaseTheme</a></p></div>
</div>

View file

@ -2,12 +2,12 @@
<html class="">
<head>
<meta charset="utf-8">
<title>baseThemeDay</title>
<title>baseThemeNight</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Day theme">
<meta property="og:title" content="baseThemeDay">
<meta property="description" content="Night theme">
<meta property="og:title" content="baseThemeNight">
<meta property="og:image" content="">
<meta property="og:description" content="Day theme">
<meta property="og:description" content="Night theme">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
@ -36,10 +36,10 @@
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/baseThemeDay" >baseThemeDay</a></li></ul></div>
<h1 id="dev_page_title">baseThemeDay</h1>
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/baseThemeNight" >baseThemeNight</a></li></ul></div>
<h1 id="dev_page_title">baseThemeNight</h1>
<div id="dev_page_content"><p>Day theme</p>
<div id="dev_page_content"><p>Night theme</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
@ -52,7 +52,7 @@
</li>
</ul>
</div>
<pre class="page_scheme"><code><a href="/constructor/baseThemeDay" class="current_page_link" >baseThemeDay</a>#fbd81688 = <a href="/type/BaseTheme" >BaseTheme</a>;</code></pre></p>
<pre class="page_scheme"><code><a href="/constructor/baseThemeNight" class="current_page_link" >baseThemeNight</a>#b7b31ea8 = <a href="/type/BaseTheme" >BaseTheme</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<p>This constructor does not require any parameters.</p>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>

View file

@ -2,12 +2,12 @@
<html class="">
<head>
<meta charset="utf-8">
<title>inputChannelEmpty</title>
<title>boolTrue</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Represents the absence of a channel">
<meta property="og:title" content="inputChannelEmpty">
<meta property="description" content="The constructor can be interpreted as a booleantrue value.">
<meta property="og:title" content="boolTrue">
<meta property="og:image" content="">
<meta property="og:description" content="Represents the absence of a channel">
<meta property="og:description" content="The constructor can be interpreted as a booleantrue value.">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
@ -36,10 +36,10 @@
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/inputChannelEmpty" >inputChannelEmpty</a></li></ul></div>
<h1 id="dev_page_title">inputChannelEmpty</h1>
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/boolTrue" >boolTrue</a></li></ul></div>
<h1 id="dev_page_title">boolTrue</h1>
<div id="dev_page_content"><p>Represents the absence of a channel</p>
<div id="dev_page_content"><p>The constructor can be interpreted as a <strong>boolean</strong><code>true</code> value.</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
@ -52,11 +52,11 @@
</li>
</ul>
</div>
<pre class="page_scheme"><code><a href="/constructor/inputChannelEmpty" class="current_page_link" >inputChannelEmpty</a>#ee8c1e86 = <a href="/type/InputChannel" >InputChannel</a>;</code></pre></p>
<pre class="page_scheme"><code><a href="/constructor/boolTrue" class="current_page_link" >boolTrue</a>#997275b5 = <a href="/type/Bool" >Bool</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<p>This constructor does not require any parameters.</p>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/InputChannel">InputChannel</a></p></div>
<p><a href="/type/Bool">Bool</a></p></div>
</div>

View file

@ -0,0 +1,157 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>botInfo</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Info about bots (available bot commands, etc)">
<meta property="og:title" content="botInfo">
<meta property="og:image" content="">
<meta property="og:description" content="Info about bots (available bot commands, etc)">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class=""><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class="active"><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/botInfo" >botInfo</a></li></ul></div>
<h1 id="dev_page_title">botInfo</h1>
<div id="dev_page_content"><p>Info about bots (available bot commands, etc)</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 121 <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="?layer=1">1 &ndash; Base layer</a></li><li><a href="?layer=2">2 &ndash; New userpic notifications</a></li><li><a href="?layer=3">3 &ndash; Send message can trigger link change</a></li><li><a href="?layer=4">4 &ndash; Check-in chats</a></li><li><a href="?layer=5">5 &ndash; Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 &ndash; Foursquare integration</a></li><li><a href="?layer=7">7 &ndash; Added wallPaperSolid</a></li><li><a href="?layer=8">8 &ndash; Added end-to-end encryption</a></li><li><a href="?layer=9">9 &ndash; Improved big files upload perfomance</a></li><li><a href="?layer=10">10 &ndash; Improved chat participants updates</a></li><li><a href="?layer=11">11 &ndash; Improved secret chats</a></li><li><a href="?layer=12">12 &ndash; New dynamic support</a></li><li><a href="?layer=13">13 &ndash; Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 &ndash; Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 &ndash; Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 &ndash; Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 &ndash; Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 &ndash; Added usernames</a></li><li><a href="?layer=23">23 &ndash; Stickers for secret chats</a></li><li><a href="?layer=105">105 &ndash; Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 &ndash; Login with QR code</a></li><li><a href="?layer=109">109 &ndash; Polls v2</a></li><li><a href="?layer=110">110 &ndash; People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 &ndash; Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 &ndash; Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 &ndash; PSA</a></li><li><a href="?layer=114">114 &ndash; Video thumbs for GIFs</a></li><li><a href="?layer=115">115 &ndash; Peek Channel Invite</a></li><li><a href="?layer=116">116 &ndash; Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 &ndash; WebRTC Phone Calls</a></li><li><a href="?layer=118">118 &ndash; Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 &ndash; Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 &ndash; Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121"><strong>121 &ndash; SVG-based Outlines for Stickers</strong></a></li>
<li class="divider"></li>
<li><a href="/api/layers">More...</a></li>
</ul>
</li>
</ul>
</div>
<pre class="page_scheme"><code><a href="/constructor/botInfo" class="current_page_link" >botInfo</a>#98e81d3a user_id:<a href="/type/int" >int</a> description:<a href="/type/string" >string</a> commands:<a href="/type/Vector%20t" >Vector</a>&lt;<a href="/type/BotCommand" >BotCommand</a>&gt; = <a href="/type/BotInfo" >BotInfo</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<table class="table">
<thead>
<tr>
<th>Name</th>
<th style="text-align: center;">Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>user_id</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>ID of the bot</td>
</tr>
<tr>
<td><strong>description</strong></td>
<td style="text-align: center;"><a href="/type/string">string</a></td>
<td>Description of the bot</td>
</tr>
<tr>
<td><strong>commands</strong></td>
<td style="text-align: center;"><a href="/type/Vector%20t">Vector</a>&lt;<a href="/type/BotCommand">BotCommand</a>&gt;</td>
<td>Bot commands that can be used in the chat</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/BotInfo">BotInfo</a></p></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script>backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>

View file

@ -2,12 +2,12 @@
<html class="">
<head>
<meta charset="utf-8">
<title>videoSize</title>
<title>botInlineMessageMediaAuto</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Animated profile picture in MPEG4 format">
<meta property="og:title" content="videoSize">
<meta property="description" content="Send whatever media is attached to the botInlineMediaResult">
<meta property="og:title" content="botInlineMessageMediaAuto">
<meta property="og:image" content="">
<meta property="og:description" content="Animated profile picture in MPEG4 format">
<meta property="og:description" content="Send whatever media is attached to the botInlineMediaResult">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
@ -36,10 +36,10 @@
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/videoSize" >videoSize</a></li></ul></div>
<h1 id="dev_page_title">videoSize</h1>
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/botInlineMessageMediaAuto" >botInlineMessageMediaAuto</a></li></ul></div>
<h1 id="dev_page_title">botInlineMessageMediaAuto</h1>
<div id="dev_page_content"><p><a href="/api/files#animated-profile-pictures">Animated profile picture</a> in MPEG4 format</p>
<div id="dev_page_content"><p>Send whatever media is attached to the <a href="/constructor/botInlineMediaResult">botInlineMediaResult</a></p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
@ -52,7 +52,7 @@
</li>
</ul>
</div>
<pre class="page_scheme"><code><a href="/constructor/videoSize" class="current_page_link" >videoSize</a>#e831c556 flags:<a href="/type/%23" >#</a> type:<a href="/type/string" >string</a> location:<a href="/type/FileLocation" >FileLocation</a> w:<a href="/type/int" >int</a> h:<a href="/type/int" >int</a> size:<a href="/type/int" >int</a> video_start_ts:flags.0?<a href="/type/double" >double</a> = <a href="/type/VideoSize" >VideoSize</a>;</code></pre></p>
<pre class="page_scheme"><code><a href="/constructor/botInlineMessageMediaAuto" class="current_page_link" >botInlineMessageMediaAuto</a>#764cf810 flags:<a href="/type/%23" >#</a> message:<a href="/type/string" >string</a> entities:flags.1?<a href="/type/Vector%20t" >Vector</a>&lt;<a href="/type/MessageEntity" >MessageEntity</a>&gt; reply_markup:flags.2?<a href="/type/ReplyMarkup" >ReplyMarkup</a> = <a href="/type/BotInlineMessage" >BotInlineMessage</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<table class="table">
<thead>
@ -69,42 +69,29 @@
<td>Flags, see <a href="/mtproto/TL-combinators#conditional-fields">TL conditional fields</a></td>
</tr>
<tr>
<td><strong>type</strong></td>
<td><strong>message</strong></td>
<td style="text-align: center;"><a href="/type/string">string</a></td>
<td><code>u</code> for animated profile pictures, and <code>v</code> for trimmed and downscaled video previews</td>
<td>Caption</td>
</tr>
<tr>
<td><strong>location</strong></td>
<td style="text-align: center;"><a href="/type/FileLocation">FileLocation</a></td>
<td>File location</td>
<td><strong>entities</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.1?<a href="/type/Vector%20t">Vector</a>&lt;<a href="/type/MessageEntity">MessageEntity</a>&gt;</td>
<td><a href="/api/entities">Message entities for styled text</a></td>
</tr>
<tr>
<td><strong>w</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>Video width</td>
</tr>
<tr>
<td><strong>h</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>Video height</td>
</tr>
<tr>
<td><strong>size</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>File size</td>
</tr>
<tr>
<td><strong>video_start_ts</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.0?<a href="/type/double">double</a></td>
<td>Timestamp that should be shown as static preview to the user (seconds)</td>
<td><strong>reply_markup</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.2?<a href="/type/ReplyMarkup">ReplyMarkup</a></td>
<td>Inline keyboard</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/VideoSize">VideoSize</a></p>
<p><a href="/type/BotInlineMessage">BotInlineMessage</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#uploading-and-downloading-files" id="uploading-and-downloading-files" name="uploading-and-downloading-files"><i class="anchor-icon"></i></a><a href="/api/files">Uploading and Downloading Files</a></h4>
<p>How to transfer large data batches correctly.</p></div>
<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="#botinlinemediaresult" id="botinlinemediaresult" name="botinlinemediaresult"><i class="anchor-icon"></i></a><a href="/constructor/botInlineMediaResult">botInlineMediaResult</a></h4>
<p>Media result</p></div>
</div>

View file

@ -2,12 +2,12 @@
<html class="">
<head>
<meta charset="utf-8">
<title>keyboardButtonRequestPoll</title>
<title>botInlineMessageMediaContact</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="A button that allows the user to create and send a poll when pressed; available only in private">
<meta property="og:title" content="keyboardButtonRequestPoll">
<meta property="description" content="Send a contact">
<meta property="og:title" content="botInlineMessageMediaContact">
<meta property="og:image" content="">
<meta property="og:description" content="A button that allows the user to create and send a poll when pressed; available only in private">
<meta property="og:description" content="Send a contact">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
@ -36,10 +36,10 @@
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/keyboardButtonRequestPoll" >keyboardButtonRequestPoll</a></li></ul></div>
<h1 id="dev_page_title">keyboardButtonRequestPoll</h1>
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/botInlineMessageMediaContact" >botInlineMessageMediaContact</a></li></ul></div>
<h1 id="dev_page_title">botInlineMessageMediaContact</h1>
<div id="dev_page_content"><p>A button that allows the user to create and send a poll when pressed; available only in private</p>
<div id="dev_page_content"><p>Send a contact</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
@ -52,7 +52,7 @@
</li>
</ul>
</div>
<pre class="page_scheme"><code><a href="/constructor/keyboardButtonRequestPoll" class="current_page_link" >keyboardButtonRequestPoll</a>#bbc7515d flags:<a href="/type/%23" >#</a> quiz:flags.0?<a href="/type/Bool" >Bool</a> text:<a href="/type/string" >string</a> = <a href="/type/KeyboardButton" >KeyboardButton</a>;</code></pre></p>
<pre class="page_scheme"><code><a href="/constructor/botInlineMessageMediaContact" class="current_page_link" >botInlineMessageMediaContact</a>#18d1cdc2 flags:<a href="/type/%23" >#</a> phone_number:<a href="/type/string" >string</a> first_name:<a href="/type/string" >string</a> last_name:<a href="/type/string" >string</a> vcard:<a href="/type/string" >string</a> reply_markup:flags.2?<a href="/type/ReplyMarkup" >ReplyMarkup</a> = <a href="/type/BotInlineMessage" >BotInlineMessage</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<table class="table">
<thead>
@ -69,19 +69,34 @@
<td>Flags, see <a href="/mtproto/TL-combinators#conditional-fields">TL conditional fields</a></td>
</tr>
<tr>
<td><strong>quiz</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.0?<a href="/type/Bool">Bool</a></td>
<td>If set, only quiz polls can be sent</td>
<td><strong>phone_number</strong></td>
<td style="text-align: center;"><a href="/type/string">string</a></td>
<td>Phone number</td>
</tr>
<tr>
<td><strong>text</strong></td>
<td><strong>first_name</strong></td>
<td style="text-align: center;"><a href="/type/string">string</a></td>
<td>Button text</td>
<td>First name</td>
</tr>
<tr>
<td><strong>last_name</strong></td>
<td style="text-align: center;"><a href="/type/string">string</a></td>
<td>Last name</td>
</tr>
<tr>
<td><strong>vcard</strong></td>
<td style="text-align: center;"><a href="/type/string">string</a></td>
<td>VCard info</td>
</tr>
<tr>
<td><strong>reply_markup</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.2?<a href="/type/ReplyMarkup">ReplyMarkup</a></td>
<td>Inline keyboard</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/KeyboardButton">KeyboardButton</a></p></div>
<p><a href="/type/BotInlineMessage">BotInlineMessage</a></p></div>
</div>

View file

@ -2,12 +2,12 @@
<html class="">
<head>
<meta charset="utf-8">
<title>inputMediaPoll</title>
<title>botInlineMessageText</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="A poll">
<meta property="og:title" content="inputMediaPoll">
<meta property="description" content="Send a simple text message">
<meta property="og:title" content="botInlineMessageText">
<meta property="og:image" content="">
<meta property="og:description" content="A poll">
<meta property="og:description" content="Send a simple text message">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
@ -36,10 +36,10 @@
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/inputMediaPoll" >inputMediaPoll</a></li></ul></div>
<h1 id="dev_page_title">inputMediaPoll</h1>
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/botInlineMessageText" >botInlineMessageText</a></li></ul></div>
<h1 id="dev_page_title">botInlineMessageText</h1>
<div id="dev_page_content"><p>A poll</p>
<div id="dev_page_content"><p>Send a simple text message</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
@ -52,7 +52,7 @@
</li>
</ul>
</div>
<pre class="page_scheme"><code><a href="/constructor/inputMediaPoll" class="current_page_link" >inputMediaPoll</a>#f94e5f1 flags:<a href="/type/%23" >#</a> poll:<a href="/type/Poll" >Poll</a> correct_answers:flags.0?<a href="/type/Vector%20t" >Vector</a>&lt;<a href="/type/bytes" >bytes</a>&gt; solution:flags.1?<a href="/type/string" >string</a> solution_entities:flags.1?<a href="/type/Vector%20t" >Vector</a>&lt;<a href="/type/MessageEntity" >MessageEntity</a>&gt; = <a href="/type/InputMedia" >InputMedia</a>;</code></pre></p>
<pre class="page_scheme"><code><a href="/constructor/botInlineMessageText" class="current_page_link" >botInlineMessageText</a>#8c7f65e2 flags:<a href="/type/%23" >#</a> no_webpage:flags.0?true message:<a href="/type/string" >string</a> entities:flags.1?<a href="/type/Vector%20t" >Vector</a>&lt;<a href="/type/MessageEntity" >MessageEntity</a>&gt; reply_markup:flags.2?<a href="/type/ReplyMarkup" >ReplyMarkup</a> = <a href="/type/BotInlineMessage" >BotInlineMessage</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<table class="table">
<thead>
@ -69,29 +69,29 @@
<td>Flags, see <a href="/mtproto/TL-combinators#conditional-fields">TL conditional fields</a></td>
</tr>
<tr>
<td><strong>poll</strong></td>
<td style="text-align: center;"><a href="/type/Poll">Poll</a></td>
<td>The poll to send</td>
<td><strong>no_webpage</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.0?<a href="/constructor/true">true</a></td>
<td>Disable webpage preview</td>
</tr>
<tr>
<td><strong>correct_answers</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.0?<a href="/type/Vector%20t">Vector</a>&lt;<a href="/type/bytes">bytes</a>&gt;</td>
<td>Correct answer IDs (for quiz polls)</td>
<td><strong>message</strong></td>
<td style="text-align: center;"><a href="/type/string">string</a></td>
<td>The message</td>
</tr>
<tr>
<td><strong>solution</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.1?<a href="/type/string">string</a></td>
<td>Explanation of quiz solution</td>
</tr>
<tr>
<td><strong>solution_entities</strong></td>
<td><strong>entities</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.1?<a href="/type/Vector%20t">Vector</a>&lt;<a href="/type/MessageEntity">MessageEntity</a>&gt;</td>
<td><a href="/api/entities">Message entities for styled text</a></td>
</tr>
<tr>
<td><strong>reply_markup</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.2?<a href="/type/ReplyMarkup">ReplyMarkup</a></td>
<td>Inline keyboard</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/InputMedia">InputMedia</a></p>
<p><a href="/type/BotInlineMessage">BotInlineMessage</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#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></div>

View file

@ -2,12 +2,12 @@
<html class="">
<head>
<meta charset="utf-8">
<title>cdnConfig</title>
<title>cdnPublicKey</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Configuration for CDN file downloads.">
<meta property="og:title" content="cdnConfig">
<meta property="description" content="Public key to use only during handshakes to CDN DCs.">
<meta property="og:title" content="cdnPublicKey">
<meta property="og:image" content="">
<meta property="og:description" content="Configuration for CDN file downloads.">
<meta property="og:description" content="Public key to use only during handshakes to CDN DCs.">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
@ -36,10 +36,10 @@
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/cdnConfig" >cdnConfig</a></li></ul></div>
<h1 id="dev_page_title">cdnConfig</h1>
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/cdnPublicKey" >cdnPublicKey</a></li></ul></div>
<h1 id="dev_page_title">cdnPublicKey</h1>
<div id="dev_page_content"><p>Configuration for <a href="/cdn">CDN</a> file downloads.</p>
<div id="dev_page_content"><p>Public key to use <strong>only</strong> during handshakes to <a href="/cdn">CDN</a> DCs.</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
@ -52,7 +52,7 @@
</li>
</ul>
</div>
<pre class="page_scheme"><code><a href="/constructor/cdnConfig" class="current_page_link" >cdnConfig</a>#5725e40a public_keys:<a href="/type/Vector%20t" >Vector</a>&lt;<a href="/type/CdnPublicKey" >CdnPublicKey</a>&gt; = <a href="/type/CdnConfig" >CdnConfig</a>;</code></pre></p>
<pre class="page_scheme"><code><a href="/constructor/cdnPublicKey" class="current_page_link" >cdnPublicKey</a>#c982eaba dc_id:<a href="/type/int" >int</a> public_key:<a href="/type/string" >string</a> = <a href="/type/CdnPublicKey" >CdnPublicKey</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<table class="table">
<thead>
@ -64,14 +64,19 @@
</thead>
<tbody>
<tr>
<td><strong>public_keys</strong></td>
<td style="text-align: center;"><a href="/type/Vector%20t">Vector</a>&lt;<a href="/type/CdnPublicKey">CdnPublicKey</a>&gt;</td>
<td>Vector of public keys to use <strong>only</strong> during handshakes to <a href="/cdn">CDN</a> DCs.</td>
<td><strong>dc_id</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td><a href="/cdn">CDN DC</a> ID</td>
</tr>
<tr>
<td><strong>public_key</strong></td>
<td style="text-align: center;"><a href="/type/string">string</a></td>
<td>RSA public key</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/CdnConfig">CdnConfig</a></p>
<p><a href="/type/CdnPublicKey">CdnPublicKey</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#encrypted-cdns-for-speed-and-security" id="encrypted-cdns-for-speed-and-security" name="encrypted-cdns-for-speed-and-security"><i class="anchor-icon"></i></a><a href="/cdn">Encrypted CDNs for Speed and Security</a></h4></div>

View file

@ -0,0 +1,152 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>channelAdminLogEventActionChangeAbout</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="The description was changed">
<meta property="og:title" content="channelAdminLogEventActionChangeAbout">
<meta property="og:image" content="">
<meta property="og:description" content="The description was changed">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class=""><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class="active"><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/channelAdminLogEventActionChangeAbout" >channelAdminLogEventActionChangeAbout</a></li></ul></div>
<h1 id="dev_page_title">channelAdminLogEventActionChangeAbout</h1>
<div id="dev_page_content"><p>The description was changed</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 121 <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="?layer=1">1 &ndash; Base layer</a></li><li><a href="?layer=2">2 &ndash; New userpic notifications</a></li><li><a href="?layer=3">3 &ndash; Send message can trigger link change</a></li><li><a href="?layer=4">4 &ndash; Check-in chats</a></li><li><a href="?layer=5">5 &ndash; Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 &ndash; Foursquare integration</a></li><li><a href="?layer=7">7 &ndash; Added wallPaperSolid</a></li><li><a href="?layer=8">8 &ndash; Added end-to-end encryption</a></li><li><a href="?layer=9">9 &ndash; Improved big files upload perfomance</a></li><li><a href="?layer=10">10 &ndash; Improved chat participants updates</a></li><li><a href="?layer=11">11 &ndash; Improved secret chats</a></li><li><a href="?layer=12">12 &ndash; New dynamic support</a></li><li><a href="?layer=13">13 &ndash; Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 &ndash; Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 &ndash; Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 &ndash; Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 &ndash; Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 &ndash; Added usernames</a></li><li><a href="?layer=23">23 &ndash; Stickers for secret chats</a></li><li><a href="?layer=105">105 &ndash; Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 &ndash; Login with QR code</a></li><li><a href="?layer=109">109 &ndash; Polls v2</a></li><li><a href="?layer=110">110 &ndash; People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 &ndash; Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 &ndash; Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 &ndash; PSA</a></li><li><a href="?layer=114">114 &ndash; Video thumbs for GIFs</a></li><li><a href="?layer=115">115 &ndash; Peek Channel Invite</a></li><li><a href="?layer=116">116 &ndash; Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 &ndash; WebRTC Phone Calls</a></li><li><a href="?layer=118">118 &ndash; Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 &ndash; Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 &ndash; Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121"><strong>121 &ndash; SVG-based Outlines for Stickers</strong></a></li>
<li class="divider"></li>
<li><a href="/api/layers">More...</a></li>
</ul>
</li>
</ul>
</div>
<pre class="page_scheme"><code><a href="/constructor/channelAdminLogEventActionChangeAbout" class="current_page_link" >channelAdminLogEventActionChangeAbout</a>#55188a2e prev_value:<a href="/type/string" >string</a> new_value:<a href="/type/string" >string</a> = <a href="/type/ChannelAdminLogEventAction" >ChannelAdminLogEventAction</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<table class="table">
<thead>
<tr>
<th>Name</th>
<th style="text-align: center;">Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>prev_value</strong></td>
<td style="text-align: center;"><a href="/type/string">string</a></td>
<td>Previous description</td>
</tr>
<tr>
<td><strong>new_value</strong></td>
<td style="text-align: center;"><a href="/type/string">string</a></td>
<td>New description</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/ChannelAdminLogEventAction">ChannelAdminLogEventAction</a></p></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script>backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>

View file

@ -2,12 +2,12 @@
<html class="">
<head>
<meta charset="utf-8">
<title>messageEntityEmail</title>
<title>channelAdminLogEventActionChangeLinkedChat</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Message entity representing an email@example.com.">
<meta property="og:title" content="messageEntityEmail">
<meta property="description" content="The linked chat was changed">
<meta property="og:title" content="channelAdminLogEventActionChangeLinkedChat">
<meta property="og:image" content="">
<meta property="og:description" content="Message entity representing an email@example.com.">
<meta property="og:description" content="The linked chat was changed">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
@ -36,10 +36,10 @@
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/messageEntityEmail" >messageEntityEmail</a></li></ul></div>
<h1 id="dev_page_title">messageEntityEmail</h1>
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/channelAdminLogEventActionChangeLinkedChat" >channelAdminLogEventActionChangeLinkedChat</a></li></ul></div>
<h1 id="dev_page_title">channelAdminLogEventActionChangeLinkedChat</h1>
<div id="dev_page_content"><p>Message entity representing an <a href="mailto:email@example.com">email@example.com</a>.</p>
<div id="dev_page_content"><p>The linked chat was changed</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
@ -52,7 +52,7 @@
</li>
</ul>
</div>
<pre class="page_scheme"><code><a href="/constructor/messageEntityEmail" class="current_page_link" >messageEntityEmail</a>#64e475c2 offset:<a href="/type/int" >int</a> length:<a href="/type/int" >int</a> = <a href="/type/MessageEntity" >MessageEntity</a>;</code></pre></p>
<pre class="page_scheme"><code><a href="/constructor/channelAdminLogEventActionChangeLinkedChat" class="current_page_link" >channelAdminLogEventActionChangeLinkedChat</a>#a26f881b prev_value:<a href="/type/int" >int</a> new_value:<a href="/type/int" >int</a> = <a href="/type/ChannelAdminLogEventAction" >ChannelAdminLogEventAction</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<table class="table">
<thead>
@ -64,19 +64,19 @@
</thead>
<tbody>
<tr>
<td><strong>offset</strong></td>
<td><strong>prev_value</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>Offset of message entity within message (in UTF-8 codepoints)</td>
<td>Previous linked chat</td>
</tr>
<tr>
<td><strong>length</strong></td>
<td><strong>new_value</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>Length of message entity within message (in UTF-8 codepoints)</td>
<td>New linked chat</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/MessageEntity">MessageEntity</a></p></div>
<p><a href="/type/ChannelAdminLogEventAction">ChannelAdminLogEventAction</a></p></div>
</div>

View file

@ -0,0 +1,152 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>channelAdminLogEventActionChangeStickerSet</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="The supergroup&#39;s stickerset was changed">
<meta property="og:title" content="channelAdminLogEventActionChangeStickerSet">
<meta property="og:image" content="">
<meta property="og:description" content="The supergroup&#39;s stickerset was changed">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class=""><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class="active"><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/channelAdminLogEventActionChangeStickerSet" >channelAdminLogEventActionChangeStickerSet</a></li></ul></div>
<h1 id="dev_page_title">channelAdminLogEventActionChangeStickerSet</h1>
<div id="dev_page_content"><p>The supergroup's stickerset was changed</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 121 <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="?layer=1">1 &ndash; Base layer</a></li><li><a href="?layer=2">2 &ndash; New userpic notifications</a></li><li><a href="?layer=3">3 &ndash; Send message can trigger link change</a></li><li><a href="?layer=4">4 &ndash; Check-in chats</a></li><li><a href="?layer=5">5 &ndash; Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 &ndash; Foursquare integration</a></li><li><a href="?layer=7">7 &ndash; Added wallPaperSolid</a></li><li><a href="?layer=8">8 &ndash; Added end-to-end encryption</a></li><li><a href="?layer=9">9 &ndash; Improved big files upload perfomance</a></li><li><a href="?layer=10">10 &ndash; Improved chat participants updates</a></li><li><a href="?layer=11">11 &ndash; Improved secret chats</a></li><li><a href="?layer=12">12 &ndash; New dynamic support</a></li><li><a href="?layer=13">13 &ndash; Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 &ndash; Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 &ndash; Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 &ndash; Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 &ndash; Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 &ndash; Added usernames</a></li><li><a href="?layer=23">23 &ndash; Stickers for secret chats</a></li><li><a href="?layer=105">105 &ndash; Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 &ndash; Login with QR code</a></li><li><a href="?layer=109">109 &ndash; Polls v2</a></li><li><a href="?layer=110">110 &ndash; People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 &ndash; Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 &ndash; Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 &ndash; PSA</a></li><li><a href="?layer=114">114 &ndash; Video thumbs for GIFs</a></li><li><a href="?layer=115">115 &ndash; Peek Channel Invite</a></li><li><a href="?layer=116">116 &ndash; Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 &ndash; WebRTC Phone Calls</a></li><li><a href="?layer=118">118 &ndash; Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 &ndash; Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 &ndash; Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121"><strong>121 &ndash; SVG-based Outlines for Stickers</strong></a></li>
<li class="divider"></li>
<li><a href="/api/layers">More...</a></li>
</ul>
</li>
</ul>
</div>
<pre class="page_scheme"><code><a href="/constructor/channelAdminLogEventActionChangeStickerSet" class="current_page_link" >channelAdminLogEventActionChangeStickerSet</a>#b1c3caa7 prev_stickerset:<a href="/type/InputStickerSet" >InputStickerSet</a> new_stickerset:<a href="/type/InputStickerSet" >InputStickerSet</a> = <a href="/type/ChannelAdminLogEventAction" >ChannelAdminLogEventAction</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<table class="table">
<thead>
<tr>
<th>Name</th>
<th style="text-align: center;">Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>prev_stickerset</strong></td>
<td style="text-align: center;"><a href="/type/InputStickerSet">InputStickerSet</a></td>
<td>Previous stickerset</td>
</tr>
<tr>
<td><strong>new_stickerset</strong></td>
<td style="text-align: center;"><a href="/type/InputStickerSet">InputStickerSet</a></td>
<td>New stickerset</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/ChannelAdminLogEventAction">ChannelAdminLogEventAction</a></p></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script>backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>

View file

@ -0,0 +1,155 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>channelAdminLogEventActionDefaultBannedRights</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="The default banned rights were modified">
<meta property="og:title" content="channelAdminLogEventActionDefaultBannedRights">
<meta property="og:image" content="">
<meta property="og:description" content="The default banned rights were modified">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class=""><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class="active"><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/channelAdminLogEventActionDefaultBannedRights" >channelAdminLogEventActionDefaultBannedRights</a></li></ul></div>
<h1 id="dev_page_title">channelAdminLogEventActionDefaultBannedRights</h1>
<div id="dev_page_content"><p>The default banned rights were modified</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 121 <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="?layer=1">1 &ndash; Base layer</a></li><li><a href="?layer=2">2 &ndash; New userpic notifications</a></li><li><a href="?layer=3">3 &ndash; Send message can trigger link change</a></li><li><a href="?layer=4">4 &ndash; Check-in chats</a></li><li><a href="?layer=5">5 &ndash; Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 &ndash; Foursquare integration</a></li><li><a href="?layer=7">7 &ndash; Added wallPaperSolid</a></li><li><a href="?layer=8">8 &ndash; Added end-to-end encryption</a></li><li><a href="?layer=9">9 &ndash; Improved big files upload perfomance</a></li><li><a href="?layer=10">10 &ndash; Improved chat participants updates</a></li><li><a href="?layer=11">11 &ndash; Improved secret chats</a></li><li><a href="?layer=12">12 &ndash; New dynamic support</a></li><li><a href="?layer=13">13 &ndash; Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 &ndash; Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 &ndash; Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 &ndash; Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 &ndash; Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 &ndash; Added usernames</a></li><li><a href="?layer=23">23 &ndash; Stickers for secret chats</a></li><li><a href="?layer=105">105 &ndash; Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 &ndash; Login with QR code</a></li><li><a href="?layer=109">109 &ndash; Polls v2</a></li><li><a href="?layer=110">110 &ndash; People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 &ndash; Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 &ndash; Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 &ndash; PSA</a></li><li><a href="?layer=114">114 &ndash; Video thumbs for GIFs</a></li><li><a href="?layer=115">115 &ndash; Peek Channel Invite</a></li><li><a href="?layer=116">116 &ndash; Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 &ndash; WebRTC Phone Calls</a></li><li><a href="?layer=118">118 &ndash; Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 &ndash; Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 &ndash; Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121"><strong>121 &ndash; SVG-based Outlines for Stickers</strong></a></li>
<li class="divider"></li>
<li><a href="/api/layers">More...</a></li>
</ul>
</li>
</ul>
</div>
<pre class="page_scheme"><code><a href="/constructor/channelAdminLogEventActionDefaultBannedRights" class="current_page_link" >channelAdminLogEventActionDefaultBannedRights</a>#2df5fc0a prev_banned_rights:<a href="/type/ChatBannedRights" >ChatBannedRights</a> new_banned_rights:<a href="/type/ChatBannedRights" >ChatBannedRights</a> = <a href="/type/ChannelAdminLogEventAction" >ChannelAdminLogEventAction</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<table class="table">
<thead>
<tr>
<th>Name</th>
<th style="text-align: center;">Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>prev_banned_rights</strong></td>
<td style="text-align: center;"><a href="/type/ChatBannedRights">ChatBannedRights</a></td>
<td>Previous global <a href="/api/rights">banned rights</a></td>
</tr>
<tr>
<td><strong>new_banned_rights</strong></td>
<td style="text-align: center;"><a href="/type/ChatBannedRights">ChatBannedRights</a></td>
<td>New glboal <a href="/api/rights">banned rights</a>.</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/ChannelAdminLogEventAction">ChannelAdminLogEventAction</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#admin-banned-default-rights" id="admin-banned-default-rights" name="admin-banned-default-rights"><i class="anchor-icon"></i></a><a href="/api/rights">Admin, banned, default rights</a></h4>
<p>How to handle admin permissions, granular bans and global permissions in channels, groups and supergroups.</p></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script>backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>

View file

@ -0,0 +1,147 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>channelAdminLogEventActionDeleteMessage</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="A message was deleted">
<meta property="og:title" content="channelAdminLogEventActionDeleteMessage">
<meta property="og:image" content="">
<meta property="og:description" content="A message was deleted">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class=""><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class="active"><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/channelAdminLogEventActionDeleteMessage" >channelAdminLogEventActionDeleteMessage</a></li></ul></div>
<h1 id="dev_page_title">channelAdminLogEventActionDeleteMessage</h1>
<div id="dev_page_content"><p>A message was deleted</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 121 <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="?layer=1">1 &ndash; Base layer</a></li><li><a href="?layer=2">2 &ndash; New userpic notifications</a></li><li><a href="?layer=3">3 &ndash; Send message can trigger link change</a></li><li><a href="?layer=4">4 &ndash; Check-in chats</a></li><li><a href="?layer=5">5 &ndash; Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 &ndash; Foursquare integration</a></li><li><a href="?layer=7">7 &ndash; Added wallPaperSolid</a></li><li><a href="?layer=8">8 &ndash; Added end-to-end encryption</a></li><li><a href="?layer=9">9 &ndash; Improved big files upload perfomance</a></li><li><a href="?layer=10">10 &ndash; Improved chat participants updates</a></li><li><a href="?layer=11">11 &ndash; Improved secret chats</a></li><li><a href="?layer=12">12 &ndash; New dynamic support</a></li><li><a href="?layer=13">13 &ndash; Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 &ndash; Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 &ndash; Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 &ndash; Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 &ndash; Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 &ndash; Added usernames</a></li><li><a href="?layer=23">23 &ndash; Stickers for secret chats</a></li><li><a href="?layer=105">105 &ndash; Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 &ndash; Login with QR code</a></li><li><a href="?layer=109">109 &ndash; Polls v2</a></li><li><a href="?layer=110">110 &ndash; People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 &ndash; Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 &ndash; Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 &ndash; PSA</a></li><li><a href="?layer=114">114 &ndash; Video thumbs for GIFs</a></li><li><a href="?layer=115">115 &ndash; Peek Channel Invite</a></li><li><a href="?layer=116">116 &ndash; Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 &ndash; WebRTC Phone Calls</a></li><li><a href="?layer=118">118 &ndash; Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 &ndash; Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 &ndash; Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121"><strong>121 &ndash; SVG-based Outlines for Stickers</strong></a></li>
<li class="divider"></li>
<li><a href="/api/layers">More...</a></li>
</ul>
</li>
</ul>
</div>
<pre class="page_scheme"><code><a href="/constructor/channelAdminLogEventActionDeleteMessage" class="current_page_link" >channelAdminLogEventActionDeleteMessage</a>#42e047bb message:<a href="/type/Message" >Message</a> = <a href="/type/ChannelAdminLogEventAction" >ChannelAdminLogEventAction</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<table class="table">
<thead>
<tr>
<th>Name</th>
<th style="text-align: center;">Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>message</strong></td>
<td style="text-align: center;"><a href="/type/Message">Message</a></td>
<td>The message that was deleted</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/ChannelAdminLogEventAction">ChannelAdminLogEventAction</a></p></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script>backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>

View file

@ -0,0 +1,152 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>channelAdminLogEventActionEditMessage</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="A message was edited">
<meta property="og:title" content="channelAdminLogEventActionEditMessage">
<meta property="og:image" content="">
<meta property="og:description" content="A message was edited">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class=""><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class="active"><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/channelAdminLogEventActionEditMessage" >channelAdminLogEventActionEditMessage</a></li></ul></div>
<h1 id="dev_page_title">channelAdminLogEventActionEditMessage</h1>
<div id="dev_page_content"><p>A message was edited</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 121 <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="?layer=1">1 &ndash; Base layer</a></li><li><a href="?layer=2">2 &ndash; New userpic notifications</a></li><li><a href="?layer=3">3 &ndash; Send message can trigger link change</a></li><li><a href="?layer=4">4 &ndash; Check-in chats</a></li><li><a href="?layer=5">5 &ndash; Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 &ndash; Foursquare integration</a></li><li><a href="?layer=7">7 &ndash; Added wallPaperSolid</a></li><li><a href="?layer=8">8 &ndash; Added end-to-end encryption</a></li><li><a href="?layer=9">9 &ndash; Improved big files upload perfomance</a></li><li><a href="?layer=10">10 &ndash; Improved chat participants updates</a></li><li><a href="?layer=11">11 &ndash; Improved secret chats</a></li><li><a href="?layer=12">12 &ndash; New dynamic support</a></li><li><a href="?layer=13">13 &ndash; Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 &ndash; Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 &ndash; Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 &ndash; Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 &ndash; Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 &ndash; Added usernames</a></li><li><a href="?layer=23">23 &ndash; Stickers for secret chats</a></li><li><a href="?layer=105">105 &ndash; Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 &ndash; Login with QR code</a></li><li><a href="?layer=109">109 &ndash; Polls v2</a></li><li><a href="?layer=110">110 &ndash; People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 &ndash; Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 &ndash; Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 &ndash; PSA</a></li><li><a href="?layer=114">114 &ndash; Video thumbs for GIFs</a></li><li><a href="?layer=115">115 &ndash; Peek Channel Invite</a></li><li><a href="?layer=116">116 &ndash; Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 &ndash; WebRTC Phone Calls</a></li><li><a href="?layer=118">118 &ndash; Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 &ndash; Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 &ndash; Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121"><strong>121 &ndash; SVG-based Outlines for Stickers</strong></a></li>
<li class="divider"></li>
<li><a href="/api/layers">More...</a></li>
</ul>
</li>
</ul>
</div>
<pre class="page_scheme"><code><a href="/constructor/channelAdminLogEventActionEditMessage" class="current_page_link" >channelAdminLogEventActionEditMessage</a>#709b2405 prev_message:<a href="/type/Message" >Message</a> new_message:<a href="/type/Message" >Message</a> = <a href="/type/ChannelAdminLogEventAction" >ChannelAdminLogEventAction</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<table class="table">
<thead>
<tr>
<th>Name</th>
<th style="text-align: center;">Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>prev_message</strong></td>
<td style="text-align: center;"><a href="/type/Message">Message</a></td>
<td>Old message</td>
</tr>
<tr>
<td><strong>new_message</strong></td>
<td style="text-align: center;"><a href="/type/Message">Message</a></td>
<td>New message</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/ChannelAdminLogEventAction">ChannelAdminLogEventAction</a></p></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script>backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>

View file

@ -0,0 +1,147 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>channelAdminLogEventActionParticipantInvite</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="A user was invited to the group">
<meta property="og:title" content="channelAdminLogEventActionParticipantInvite">
<meta property="og:image" content="">
<meta property="og:description" content="A user was invited to the group">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class=""><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class="active"><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/channelAdminLogEventActionParticipantInvite" >channelAdminLogEventActionParticipantInvite</a></li></ul></div>
<h1 id="dev_page_title">channelAdminLogEventActionParticipantInvite</h1>
<div id="dev_page_content"><p>A user was invited to the group</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 121 <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="?layer=1">1 &ndash; Base layer</a></li><li><a href="?layer=2">2 &ndash; New userpic notifications</a></li><li><a href="?layer=3">3 &ndash; Send message can trigger link change</a></li><li><a href="?layer=4">4 &ndash; Check-in chats</a></li><li><a href="?layer=5">5 &ndash; Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 &ndash; Foursquare integration</a></li><li><a href="?layer=7">7 &ndash; Added wallPaperSolid</a></li><li><a href="?layer=8">8 &ndash; Added end-to-end encryption</a></li><li><a href="?layer=9">9 &ndash; Improved big files upload perfomance</a></li><li><a href="?layer=10">10 &ndash; Improved chat participants updates</a></li><li><a href="?layer=11">11 &ndash; Improved secret chats</a></li><li><a href="?layer=12">12 &ndash; New dynamic support</a></li><li><a href="?layer=13">13 &ndash; Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 &ndash; Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 &ndash; Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 &ndash; Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 &ndash; Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 &ndash; Added usernames</a></li><li><a href="?layer=23">23 &ndash; Stickers for secret chats</a></li><li><a href="?layer=105">105 &ndash; Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 &ndash; Login with QR code</a></li><li><a href="?layer=109">109 &ndash; Polls v2</a></li><li><a href="?layer=110">110 &ndash; People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 &ndash; Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 &ndash; Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 &ndash; PSA</a></li><li><a href="?layer=114">114 &ndash; Video thumbs for GIFs</a></li><li><a href="?layer=115">115 &ndash; Peek Channel Invite</a></li><li><a href="?layer=116">116 &ndash; Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 &ndash; WebRTC Phone Calls</a></li><li><a href="?layer=118">118 &ndash; Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 &ndash; Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 &ndash; Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121"><strong>121 &ndash; SVG-based Outlines for Stickers</strong></a></li>
<li class="divider"></li>
<li><a href="/api/layers">More...</a></li>
</ul>
</li>
</ul>
</div>
<pre class="page_scheme"><code><a href="/constructor/channelAdminLogEventActionParticipantInvite" class="current_page_link" >channelAdminLogEventActionParticipantInvite</a>#e31c34d8 participant:<a href="/type/ChannelParticipant" >ChannelParticipant</a> = <a href="/type/ChannelAdminLogEventAction" >ChannelAdminLogEventAction</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<table class="table">
<thead>
<tr>
<th>Name</th>
<th style="text-align: center;">Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>participant</strong></td>
<td style="text-align: center;"><a href="/type/ChannelParticipant">ChannelParticipant</a></td>
<td>The user that was invited</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/ChannelAdminLogEventAction">ChannelAdminLogEventAction</a></p></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script>backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>

View file

@ -0,0 +1,132 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>channelAdminLogEventActionParticipantLeave</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="A user left the channel/supergroup (in the case of big groups, info of the user that has joined isn&#39;t shown)">
<meta property="og:title" content="channelAdminLogEventActionParticipantLeave">
<meta property="og:image" content="">
<meta property="og:description" content="A user left the channel/supergroup (in the case of big groups, info of the user that has joined isn&#39;t shown)">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class=""><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class="active"><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/channelAdminLogEventActionParticipantLeave" >channelAdminLogEventActionParticipantLeave</a></li></ul></div>
<h1 id="dev_page_title">channelAdminLogEventActionParticipantLeave</h1>
<div id="dev_page_content"><p>A user left the channel/supergroup (in the case of big groups, info of the user that has joined isn't shown)</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 121 <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="?layer=1">1 &ndash; Base layer</a></li><li><a href="?layer=2">2 &ndash; New userpic notifications</a></li><li><a href="?layer=3">3 &ndash; Send message can trigger link change</a></li><li><a href="?layer=4">4 &ndash; Check-in chats</a></li><li><a href="?layer=5">5 &ndash; Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 &ndash; Foursquare integration</a></li><li><a href="?layer=7">7 &ndash; Added wallPaperSolid</a></li><li><a href="?layer=8">8 &ndash; Added end-to-end encryption</a></li><li><a href="?layer=9">9 &ndash; Improved big files upload perfomance</a></li><li><a href="?layer=10">10 &ndash; Improved chat participants updates</a></li><li><a href="?layer=11">11 &ndash; Improved secret chats</a></li><li><a href="?layer=12">12 &ndash; New dynamic support</a></li><li><a href="?layer=13">13 &ndash; Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 &ndash; Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 &ndash; Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 &ndash; Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 &ndash; Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 &ndash; Added usernames</a></li><li><a href="?layer=23">23 &ndash; Stickers for secret chats</a></li><li><a href="?layer=105">105 &ndash; Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 &ndash; Login with QR code</a></li><li><a href="?layer=109">109 &ndash; Polls v2</a></li><li><a href="?layer=110">110 &ndash; People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 &ndash; Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 &ndash; Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 &ndash; PSA</a></li><li><a href="?layer=114">114 &ndash; Video thumbs for GIFs</a></li><li><a href="?layer=115">115 &ndash; Peek Channel Invite</a></li><li><a href="?layer=116">116 &ndash; Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 &ndash; WebRTC Phone Calls</a></li><li><a href="?layer=118">118 &ndash; Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 &ndash; Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 &ndash; Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121"><strong>121 &ndash; SVG-based Outlines for Stickers</strong></a></li>
<li class="divider"></li>
<li><a href="/api/layers">More...</a></li>
</ul>
</li>
</ul>
</div>
<pre class="page_scheme"><code><a href="/constructor/channelAdminLogEventActionParticipantLeave" class="current_page_link" >channelAdminLogEventActionParticipantLeave</a>#f89777f2 = <a href="/type/ChannelAdminLogEventAction" >ChannelAdminLogEventAction</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<p>This constructor does not require any parameters.</p>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/ChannelAdminLogEventAction">ChannelAdminLogEventAction</a></p></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script>backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>

View file

@ -0,0 +1,147 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>channelAdminLogEventActionToggleInvites</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Invites were enabled/disabled">
<meta property="og:title" content="channelAdminLogEventActionToggleInvites">
<meta property="og:image" content="">
<meta property="og:description" content="Invites were enabled/disabled">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class=""><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class="active"><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/channelAdminLogEventActionToggleInvites" >channelAdminLogEventActionToggleInvites</a></li></ul></div>
<h1 id="dev_page_title">channelAdminLogEventActionToggleInvites</h1>
<div id="dev_page_content"><p>Invites were enabled/disabled</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 121 <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="?layer=1">1 &ndash; Base layer</a></li><li><a href="?layer=2">2 &ndash; New userpic notifications</a></li><li><a href="?layer=3">3 &ndash; Send message can trigger link change</a></li><li><a href="?layer=4">4 &ndash; Check-in chats</a></li><li><a href="?layer=5">5 &ndash; Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 &ndash; Foursquare integration</a></li><li><a href="?layer=7">7 &ndash; Added wallPaperSolid</a></li><li><a href="?layer=8">8 &ndash; Added end-to-end encryption</a></li><li><a href="?layer=9">9 &ndash; Improved big files upload perfomance</a></li><li><a href="?layer=10">10 &ndash; Improved chat participants updates</a></li><li><a href="?layer=11">11 &ndash; Improved secret chats</a></li><li><a href="?layer=12">12 &ndash; New dynamic support</a></li><li><a href="?layer=13">13 &ndash; Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 &ndash; Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 &ndash; Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 &ndash; Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 &ndash; Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 &ndash; Added usernames</a></li><li><a href="?layer=23">23 &ndash; Stickers for secret chats</a></li><li><a href="?layer=105">105 &ndash; Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 &ndash; Login with QR code</a></li><li><a href="?layer=109">109 &ndash; Polls v2</a></li><li><a href="?layer=110">110 &ndash; People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 &ndash; Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 &ndash; Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 &ndash; PSA</a></li><li><a href="?layer=114">114 &ndash; Video thumbs for GIFs</a></li><li><a href="?layer=115">115 &ndash; Peek Channel Invite</a></li><li><a href="?layer=116">116 &ndash; Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 &ndash; WebRTC Phone Calls</a></li><li><a href="?layer=118">118 &ndash; Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 &ndash; Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 &ndash; Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121"><strong>121 &ndash; SVG-based Outlines for Stickers</strong></a></li>
<li class="divider"></li>
<li><a href="/api/layers">More...</a></li>
</ul>
</li>
</ul>
</div>
<pre class="page_scheme"><code><a href="/constructor/channelAdminLogEventActionToggleInvites" class="current_page_link" >channelAdminLogEventActionToggleInvites</a>#1b7907ae new_value:<a href="/type/Bool" >Bool</a> = <a href="/type/ChannelAdminLogEventAction" >ChannelAdminLogEventAction</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<table class="table">
<thead>
<tr>
<th>Name</th>
<th style="text-align: center;">Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>new_value</strong></td>
<td style="text-align: center;"><a href="/type/Bool">Bool</a></td>
<td>New value</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/ChannelAdminLogEventAction">ChannelAdminLogEventAction</a></p></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script>backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>

View file

@ -0,0 +1,147 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>channelAdminLogEventActionToggleSignatures</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Channel signatures were enabled/disabled">
<meta property="og:title" content="channelAdminLogEventActionToggleSignatures">
<meta property="og:image" content="">
<meta property="og:description" content="Channel signatures were enabled/disabled">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class=""><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class="active"><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/channelAdminLogEventActionToggleSignatures" >channelAdminLogEventActionToggleSignatures</a></li></ul></div>
<h1 id="dev_page_title">channelAdminLogEventActionToggleSignatures</h1>
<div id="dev_page_content"><p>Channel signatures were enabled/disabled</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 121 <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="?layer=1">1 &ndash; Base layer</a></li><li><a href="?layer=2">2 &ndash; New userpic notifications</a></li><li><a href="?layer=3">3 &ndash; Send message can trigger link change</a></li><li><a href="?layer=4">4 &ndash; Check-in chats</a></li><li><a href="?layer=5">5 &ndash; Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 &ndash; Foursquare integration</a></li><li><a href="?layer=7">7 &ndash; Added wallPaperSolid</a></li><li><a href="?layer=8">8 &ndash; Added end-to-end encryption</a></li><li><a href="?layer=9">9 &ndash; Improved big files upload perfomance</a></li><li><a href="?layer=10">10 &ndash; Improved chat participants updates</a></li><li><a href="?layer=11">11 &ndash; Improved secret chats</a></li><li><a href="?layer=12">12 &ndash; New dynamic support</a></li><li><a href="?layer=13">13 &ndash; Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 &ndash; Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 &ndash; Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 &ndash; Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 &ndash; Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 &ndash; Added usernames</a></li><li><a href="?layer=23">23 &ndash; Stickers for secret chats</a></li><li><a href="?layer=105">105 &ndash; Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 &ndash; Login with QR code</a></li><li><a href="?layer=109">109 &ndash; Polls v2</a></li><li><a href="?layer=110">110 &ndash; People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 &ndash; Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 &ndash; Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 &ndash; PSA</a></li><li><a href="?layer=114">114 &ndash; Video thumbs for GIFs</a></li><li><a href="?layer=115">115 &ndash; Peek Channel Invite</a></li><li><a href="?layer=116">116 &ndash; Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 &ndash; WebRTC Phone Calls</a></li><li><a href="?layer=118">118 &ndash; Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 &ndash; Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 &ndash; Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121"><strong>121 &ndash; SVG-based Outlines for Stickers</strong></a></li>
<li class="divider"></li>
<li><a href="/api/layers">More...</a></li>
</ul>
</li>
</ul>
</div>
<pre class="page_scheme"><code><a href="/constructor/channelAdminLogEventActionToggleSignatures" class="current_page_link" >channelAdminLogEventActionToggleSignatures</a>#26ae0971 new_value:<a href="/type/Bool" >Bool</a> = <a href="/type/ChannelAdminLogEventAction" >ChannelAdminLogEventAction</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<table class="table">
<thead>
<tr>
<th>Name</th>
<th style="text-align: center;">Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>new_value</strong></td>
<td style="text-align: center;"><a href="/type/Bool">Bool</a></td>
<td>New value</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/ChannelAdminLogEventAction">ChannelAdminLogEventAction</a></p></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script>backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>

View file

@ -2,12 +2,12 @@
<html class="">
<head>
<meta charset="utf-8">
<title>message</title>
<title>channelFull</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="A message">
<meta property="og:title" content="message">
<meta property="description" content="Full info about a channel/supergroup">
<meta property="og:title" content="channelFull">
<meta property="og:image" content="">
<meta property="og:description" content="A message">
<meta property="og:description" content="Full info about a channel/supergroup">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
@ -36,10 +36,10 @@
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/message" >message</a></li></ul></div>
<h1 id="dev_page_title">message</h1>
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/channelFull" >channelFull</a></li></ul></div>
<h1 id="dev_page_title">channelFull</h1>
<div id="dev_page_content"><p>A message</p>
<div id="dev_page_content"><p>Full info about a <a href="/api/channel">channel/supergroup</a></p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
@ -52,7 +52,7 @@
</li>
</ul>
</div>
<pre class="page_scheme"><code><a href="/constructor/message" class="current_page_link" >message</a>#58ae39c9 flags:<a href="/type/%23" >#</a> out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true post:flags.14?true from_scheduled:flags.18?true legacy:flags.19?true edit_hide:flags.21?true pinned:flags.24?true id:<a href="/type/int" >int</a> from_id:flags.8?<a href="/type/Peer" >Peer</a> peer_id:<a href="/type/Peer" >Peer</a> fwd_from:flags.2?<a href="/type/MessageFwdHeader" >MessageFwdHeader</a> via_bot_id:flags.11?<a href="/type/int" >int</a> reply_to:flags.3?<a href="/type/MessageReplyHeader" >MessageReplyHeader</a> date:<a href="/type/int" >int</a> message:<a href="/type/string" >string</a> media:flags.9?<a href="/type/MessageMedia" >MessageMedia</a> reply_markup:flags.6?<a href="/type/ReplyMarkup" >ReplyMarkup</a> entities:flags.7?<a href="/type/Vector%20t" >Vector</a>&lt;<a href="/type/MessageEntity" >MessageEntity</a>&gt; views:flags.10?<a href="/type/int" >int</a> forwards:flags.10?<a href="/type/int" >int</a> replies:flags.23?<a href="/type/MessageReplies" >MessageReplies</a> edit_date:flags.15?<a href="/type/int" >int</a> post_author:flags.16?<a href="/type/string" >string</a> grouped_id:flags.17?<a href="/type/long" >long</a> restriction_reason:flags.22?<a href="/type/Vector%20t" >Vector</a>&lt;<a href="/type/RestrictionReason" >RestrictionReason</a>&gt; = <a href="/type/Message" >Message</a>;</code></pre></p>
<pre class="page_scheme"><code><a href="/constructor/channelFull" class="current_page_link" >channelFull</a>#f0e6672a flags:<a href="/type/%23" >#</a> can_view_participants:flags.3?true can_set_username:flags.6?true can_set_stickers:flags.7?true hidden_prehistory:flags.10?true can_set_location:flags.16?true has_scheduled:flags.19?true can_view_stats:flags.20?true blocked:flags.22?true id:<a href="/type/int" >int</a> about:<a href="/type/string" >string</a> participants_count:flags.0?<a href="/type/int" >int</a> admins_count:flags.1?<a href="/type/int" >int</a> kicked_count:flags.2?<a href="/type/int" >int</a> banned_count:flags.2?<a href="/type/int" >int</a> online_count:flags.13?<a href="/type/int" >int</a> read_inbox_max_id:<a href="/type/int" >int</a> read_outbox_max_id:<a href="/type/int" >int</a> unread_count:<a href="/type/int" >int</a> chat_photo:<a href="/type/Photo" >Photo</a> notify_settings:<a href="/type/PeerNotifySettings" >PeerNotifySettings</a> exported_invite:<a href="/type/ExportedChatInvite" >ExportedChatInvite</a> bot_info:<a href="/type/Vector%20t" >Vector</a>&lt;<a href="/type/BotInfo" >BotInfo</a>&gt; migrated_from_chat_id:flags.4?<a href="/type/int" >int</a> migrated_from_max_id:flags.4?<a href="/type/int" >int</a> pinned_msg_id:flags.5?<a href="/type/int" >int</a> stickerset:flags.8?<a href="/type/StickerSet" >StickerSet</a> available_min_id:flags.9?<a href="/type/int" >int</a> folder_id:flags.11?<a href="/type/int" >int</a> linked_chat_id:flags.14?<a href="/type/int" >int</a> location:flags.15?<a href="/type/ChannelLocation" >ChannelLocation</a> slowmode_seconds:flags.17?<a href="/type/int" >int</a> slowmode_next_send_date:flags.18?<a href="/type/int" >int</a> stats_dc:flags.12?<a href="/type/int" >int</a> pts:<a href="/type/int" >int</a> = <a href="/type/ChatFull" >ChatFull</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<table class="table">
<thead>
@ -69,159 +69,196 @@
<td>Flags, see <a href="/mtproto/TL-combinators#conditional-fields">TL conditional fields</a></td>
</tr>
<tr>
<td><strong>out</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.1?<a href="/constructor/true">true</a></td>
<td>Is this an outgoing message</td>
<td><strong>can_view_participants</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.3?<a href="/constructor/true">true</a></td>
<td>Can we vew the participant list?</td>
</tr>
<tr>
<td><strong>mentioned</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.4?<a href="/constructor/true">true</a></td>
<td>Whether we were <a href="/api/mentions">mentioned</a> in this message</td>
<td><strong>can_set_username</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.6?<a href="/constructor/true">true</a></td>
<td>Can we set the channel's username?</td>
</tr>
<tr>
<td><strong>media_unread</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.5?<a href="/constructor/true">true</a></td>
<td>Whether there are unread media attachments in this message</td>
<td><strong>can_set_stickers</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.7?<a href="/constructor/true">true</a></td>
<td>Can we <a href="/method/channels.setStickers">associate</a> a stickerpack to the supergroup?</td>
</tr>
<tr>
<td><strong>silent</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.13?<a href="/constructor/true">true</a></td>
<td>Whether this is a silent message (no notification triggered)</td>
<td><strong>hidden_prehistory</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.10?<a href="/constructor/true">true</a></td>
<td>Is the history before we joined hidden to us?</td>
</tr>
<tr>
<td><strong>post</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.14?<a href="/constructor/true">true</a></td>
<td>Whether this is a channel post</td>
<td><strong>can_set_location</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.16?<a href="/constructor/true">true</a></td>
<td>Can we set the geolocation of this group (for geogroups)</td>
</tr>
<tr>
<td><strong>from_scheduled</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.18?<a href="/constructor/true">true</a></td>
<td>Whether this is a <a href="/api/scheduled-messages">scheduled message</a></td>
</tr>
<tr>
<td><strong>legacy</strong></td>
<td><strong>has_scheduled</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.19?<a href="/constructor/true">true</a></td>
<td>This is a legacy message: it has to be refetched with the new layer</td>
<td>Whether scheduled messages are available</td>
</tr>
<tr>
<td><strong>edit_hide</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.21?<a href="/constructor/true">true</a></td>
<td>Whether the message should be shown as not modified to the user, even if an edit date is present</td>
<td><strong>can_view_stats</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.20?<a href="/constructor/true">true</a></td>
<td>Can the user view <a href="/api/stats">channel/supergroup statistics</a></td>
</tr>
<tr>
<td><strong>pinned</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.24?<a href="/constructor/true">true</a></td>
<td>Whether this message is <a href="/api/pin">pinned</a></td>
<td><strong>blocked</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.22?<a href="/constructor/true">true</a></td>
<td>Whether any anonymous admin of this supergroup was blocked: if set, you won't receive messages from anonymous group admins in <a href="/api/discussion">discussion replies via @replies</a></td>
</tr>
<tr>
<td><strong>id</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>ID of the message</td>
<td>ID of the channel</td>
</tr>
<tr>
<td><strong>from_id</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.8?<a href="/type/Peer">Peer</a></td>
<td>ID of the sender of the message</td>
</tr>
<tr>
<td><strong>peer_id</strong></td>
<td style="text-align: center;"><a href="/type/Peer">Peer</a></td>
<td>Peer ID, the chat where this message was sent</td>
</tr>
<tr>
<td><strong>fwd_from</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.2?<a href="/type/MessageFwdHeader">MessageFwdHeader</a></td>
<td>Info about forwarded messages</td>
</tr>
<tr>
<td><strong>via_bot_id</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.11?<a href="/type/int">int</a></td>
<td>ID of the inline bot that generated the message</td>
</tr>
<tr>
<td><strong>reply_to</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.3?<a href="/type/MessageReplyHeader">MessageReplyHeader</a></td>
<td>Reply information</td>
</tr>
<tr>
<td><strong>date</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>Date of the message</td>
</tr>
<tr>
<td><strong>message</strong></td>
<td><strong>about</strong></td>
<td style="text-align: center;"><a href="/type/string">string</a></td>
<td>The message</td>
<td>Info about the channel</td>
</tr>
<tr>
<td><strong>media</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.9?<a href="/type/MessageMedia">MessageMedia</a></td>
<td>Media attachment</td>
<td><strong>participants_count</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.0?<a href="/type/int">int</a></td>
<td>Number of participants of the channel</td>
</tr>
<tr>
<td><strong>reply_markup</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.6?<a href="/type/ReplyMarkup">ReplyMarkup</a></td>
<td>Reply markup (bot/inline keyboards)</td>
<td><strong>admins_count</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.1?<a href="/type/int">int</a></td>
<td>Number of channel admins</td>
</tr>
<tr>
<td><strong>entities</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.7?<a href="/type/Vector%20t">Vector</a>&lt;<a href="/type/MessageEntity">MessageEntity</a>&gt;</td>
<td>Message <a href="/api/entities">entities</a> for styled text</td>
<td><strong>kicked_count</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.2?<a href="/type/int">int</a></td>
<td>Number of users <a href="/api/rights">kicked</a> from the channel</td>
</tr>
<tr>
<td><strong>views</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.10?<a href="/type/int">int</a></td>
<td>View count for channel posts</td>
<td><strong>banned_count</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.2?<a href="/type/int">int</a></td>
<td>Number of users <a href="/api/rights">banned</a> from the channel</td>
</tr>
<tr>
<td><strong>forwards</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.10?<a href="/type/int">int</a></td>
<td>Forward counter</td>
<td><strong>online_count</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.13?<a href="/type/int">int</a></td>
<td>Number of users currently online</td>
</tr>
<tr>
<td><strong>replies</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.23?<a href="/type/MessageReplies">MessageReplies</a></td>
<td>Info about <a href="/api/threads">post comments (for channels) or message replies (for groups)</a></td>
<td><strong>read_inbox_max_id</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>Position up to which all incoming messages are read.</td>
</tr>
<tr>
<td><strong>edit_date</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.15?<a href="/type/int">int</a></td>
<td>Last edit date of this message</td>
<td><strong>read_outbox_max_id</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>Position up to which all outgoing messages are read.</td>
</tr>
<tr>
<td><strong>post_author</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.16?<a href="/type/string">string</a></td>
<td>Name of the author of this message for channel posts (with signatures enabled)</td>
<td><strong>unread_count</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>Count of unread messages</td>
</tr>
<tr>
<td><strong>grouped_id</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.17?<a href="/type/long">long</a></td>
<td>Multiple media messages sent using <a href="/method/messages.sendMultiMedia">messages.sendMultiMedia</a> with the same grouped ID indicate an <a href="/api/files#albums-grouped-media">album or media group</a></td>
<td><strong>chat_photo</strong></td>
<td style="text-align: center;"><a href="/type/Photo">Photo</a></td>
<td>Channel picture</td>
</tr>
<tr>
<td><strong>restriction_reason</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.22?<a href="/type/Vector%20t">Vector</a>&lt;<a href="/type/RestrictionReason">RestrictionReason</a>&gt;</td>
<td>Contains the reason why access to this message must be restricted.</td>
<td><strong>notify_settings</strong></td>
<td style="text-align: center;"><a href="/type/PeerNotifySettings">PeerNotifySettings</a></td>
<td>Notification settings</td>
</tr>
<tr>
<td><strong>exported_invite</strong></td>
<td style="text-align: center;"><a href="/type/ExportedChatInvite">ExportedChatInvite</a></td>
<td>Invite link</td>
</tr>
<tr>
<td><strong>bot_info</strong></td>
<td style="text-align: center;"><a href="/type/Vector%20t">Vector</a>&lt;<a href="/type/BotInfo">BotInfo</a>&gt;</td>
<td>Info about bots in the channel/supergrup</td>
</tr>
<tr>
<td><strong>migrated_from_chat_id</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.4?<a href="/type/int">int</a></td>
<td>The chat ID from which this group was <a href="/api/channel">migrated</a></td>
</tr>
<tr>
<td><strong>migrated_from_max_id</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.4?<a href="/type/int">int</a></td>
<td>The message ID in the original chat at which this group was <a href="/api/channel">migrated</a></td>
</tr>
<tr>
<td><strong>pinned_msg_id</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.5?<a href="/type/int">int</a></td>
<td>Message ID of the last <a href="/api/pin">pinned message</a></td>
</tr>
<tr>
<td><strong>stickerset</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.8?<a href="/type/StickerSet">StickerSet</a></td>
<td>Associated stickerset</td>
</tr>
<tr>
<td><strong>available_min_id</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.9?<a href="/type/int">int</a></td>
<td>Identifier of a maximum unavailable message in a channel due to hidden history.</td>
</tr>
<tr>
<td><strong>folder_id</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.11?<a href="/type/int">int</a></td>
<td><a href="/api/folders#peer-folders">Peer folder ID, for more info click here</a></td>
</tr>
<tr>
<td><strong>linked_chat_id</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.14?<a href="/type/int">int</a></td>
<td>ID of the linked <a href="/api/discussion">discussion chat</a> for channels</td>
</tr>
<tr>
<td><strong>location</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.15?<a href="/type/ChannelLocation">ChannelLocation</a></td>
<td>Location of the geogroup</td>
</tr>
<tr>
<td><strong>slowmode_seconds</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.17?<a href="/type/int">int</a></td>
<td>If specified, users in supergroups will only be able to send one message every <code>slowmode_seconds</code> seconds</td>
</tr>
<tr>
<td><strong>slowmode_next_send_date</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.18?<a href="/type/int">int</a></td>
<td>Indicates when the user will be allowed to send another message in the supergroup (unixdate)</td>
</tr>
<tr>
<td><strong>stats_dc</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.12?<a href="/type/int">int</a></td>
<td>If set, specifies the DC to use for fetching channel statistics</td>
</tr>
<tr>
<td><strong>pts</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>Latest <a href="/api/updates">PTS</a> for this channel</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/Message">Message</a></p>
<p><a href="/type/ChatFull">ChatFull</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#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>
<h4><a class="anchor" href="#scheduled-messages" id="scheduled-messages" name="scheduled-messages"><i class="anchor-icon"></i></a><a href="/api/scheduled-messages">Scheduled messages</a></h4>
<p>Telegram allows scheduling messages</p>
<h4><a class="anchor" href="#channelssetstickers" id="channelssetstickers" name="channelssetstickers"><i class="anchor-icon"></i></a><a href="/method/channels.setStickers">channels.setStickers</a></h4>
<p>Associate a stickerset to the supergroup</p>
<h4><a class="anchor" href="#channel-statistics" id="channel-statistics" name="channel-statistics"><i class="anchor-icon"></i></a><a href="/api/stats">Channel statistics</a></h4>
<p>Telegram offers detailed channel statistics for channels and supergroups.</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><a href="/api/channel">Groups</a> can be associated to a <a href="/api/channel">channel</a> as a <a href="https://telegram.org/blog/privacy-discussions-web-bots">discussion group</a>, to allow users to discuss about posts.</p>
<h4><a class="anchor" href="#admin-banned-default-rights" id="admin-banned-default-rights" name="admin-banned-default-rights"><i class="anchor-icon"></i></a><a href="/api/rights">Admin, banned, default rights</a></h4>
<p>How to handle admin permissions, granular bans and global permissions in channels, groups and supergroups.</p>
<h4><a class="anchor" href="#channels" id="channels" name="channels"><i class="anchor-icon"></i></a><a href="/api/channel">Channels</a></h4>
<p>How to handle channels, supergroups, groups, and what's the difference between them.</p>
<h4><a class="anchor" href="#pinned-messages" id="pinned-messages" name="pinned-messages"><i class="anchor-icon"></i></a><a href="/api/pin">Pinned messages</a></h4>
<p>Telegram allows pinning multiple messages on top of a specific chat.</p>
<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="#threads" id="threads" name="threads"><i class="anchor-icon"></i></a><a href="/api/threads">Threads</a></h4>
<p>Telegram allows commenting on a <a href="/api/channel">channel post</a> or on a generic <a href="/api/channel">supergroup message</a>, thanks to message threads.</p>
<h4><a class="anchor" href="#messagessendmultimedia" id="messagessendmultimedia" name="messagessendmultimedia"><i class="anchor-icon"></i></a><a href="/method/messages.sendMultiMedia">messages.sendMultiMedia</a></h4>
<p>Send an <a href="/api/files#albums-grouped-media">album or grouped media</a></p>
<h4><a class="anchor" href="#uploading-and-downloading-files" id="uploading-and-downloading-files" name="uploading-and-downloading-files"><i class="anchor-icon"></i></a><a href="/api/files">Uploading and Downloading Files</a></h4>
<p>How to transfer large data batches correctly.</p></div>
<h4><a class="anchor" href="#folders" id="folders" name="folders"><i class="anchor-icon"></i></a><a href="/api/folders">Folders</a></h4>
<p>Telegram allows placing chats into folders, based on their type, mute status, or other custom criteria, thanks to folder blacklists and whitelists.</p>
<h4><a class="anchor" href="#working-with-updates" id="working-with-updates" name="working-with-updates"><i class="anchor-icon"></i></a><a href="/api/updates">Working with Updates</a></h4>
<p>How to subscribe to updates and handle them properly.</p></div>
</div>

View file

@ -0,0 +1,152 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>channelParticipant</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Channel/supergroup participant">
<meta property="og:title" content="channelParticipant">
<meta property="og:image" content="">
<meta property="og:description" content="Channel/supergroup participant">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class=""><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class="active"><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/channelParticipant" >channelParticipant</a></li></ul></div>
<h1 id="dev_page_title">channelParticipant</h1>
<div id="dev_page_content"><p>Channel/supergroup participant</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 121 <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="?layer=1">1 &ndash; Base layer</a></li><li><a href="?layer=2">2 &ndash; New userpic notifications</a></li><li><a href="?layer=3">3 &ndash; Send message can trigger link change</a></li><li><a href="?layer=4">4 &ndash; Check-in chats</a></li><li><a href="?layer=5">5 &ndash; Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 &ndash; Foursquare integration</a></li><li><a href="?layer=7">7 &ndash; Added wallPaperSolid</a></li><li><a href="?layer=8">8 &ndash; Added end-to-end encryption</a></li><li><a href="?layer=9">9 &ndash; Improved big files upload perfomance</a></li><li><a href="?layer=10">10 &ndash; Improved chat participants updates</a></li><li><a href="?layer=11">11 &ndash; Improved secret chats</a></li><li><a href="?layer=12">12 &ndash; New dynamic support</a></li><li><a href="?layer=13">13 &ndash; Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 &ndash; Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 &ndash; Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 &ndash; Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 &ndash; Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 &ndash; Added usernames</a></li><li><a href="?layer=23">23 &ndash; Stickers for secret chats</a></li><li><a href="?layer=105">105 &ndash; Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 &ndash; Login with QR code</a></li><li><a href="?layer=109">109 &ndash; Polls v2</a></li><li><a href="?layer=110">110 &ndash; People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 &ndash; Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 &ndash; Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 &ndash; PSA</a></li><li><a href="?layer=114">114 &ndash; Video thumbs for GIFs</a></li><li><a href="?layer=115">115 &ndash; Peek Channel Invite</a></li><li><a href="?layer=116">116 &ndash; Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 &ndash; WebRTC Phone Calls</a></li><li><a href="?layer=118">118 &ndash; Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 &ndash; Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 &ndash; Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121"><strong>121 &ndash; SVG-based Outlines for Stickers</strong></a></li>
<li class="divider"></li>
<li><a href="/api/layers">More...</a></li>
</ul>
</li>
</ul>
</div>
<pre class="page_scheme"><code><a href="/constructor/channelParticipant" class="current_page_link" >channelParticipant</a>#15ebac1d user_id:<a href="/type/int" >int</a> date:<a href="/type/int" >int</a> = <a href="/type/ChannelParticipant" >ChannelParticipant</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<table class="table">
<thead>
<tr>
<th>Name</th>
<th style="text-align: center;">Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>user_id</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>Pariticipant user ID</td>
</tr>
<tr>
<td><strong>date</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>Date joined</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/ChannelParticipant">ChannelParticipant</a></p></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script>backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>

View file

@ -0,0 +1,190 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>channelParticipantAdmin</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Admin">
<meta property="og:title" content="channelParticipantAdmin">
<meta property="og:image" content="">
<meta property="og:description" content="Admin">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class=""><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class="active"><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/channelParticipantAdmin" >channelParticipantAdmin</a></li></ul></div>
<h1 id="dev_page_title">channelParticipantAdmin</h1>
<div id="dev_page_content"><p>Admin</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 121 <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="?layer=1">1 &ndash; Base layer</a></li><li><a href="?layer=2">2 &ndash; New userpic notifications</a></li><li><a href="?layer=3">3 &ndash; Send message can trigger link change</a></li><li><a href="?layer=4">4 &ndash; Check-in chats</a></li><li><a href="?layer=5">5 &ndash; Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 &ndash; Foursquare integration</a></li><li><a href="?layer=7">7 &ndash; Added wallPaperSolid</a></li><li><a href="?layer=8">8 &ndash; Added end-to-end encryption</a></li><li><a href="?layer=9">9 &ndash; Improved big files upload perfomance</a></li><li><a href="?layer=10">10 &ndash; Improved chat participants updates</a></li><li><a href="?layer=11">11 &ndash; Improved secret chats</a></li><li><a href="?layer=12">12 &ndash; New dynamic support</a></li><li><a href="?layer=13">13 &ndash; Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 &ndash; Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 &ndash; Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 &ndash; Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 &ndash; Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 &ndash; Added usernames</a></li><li><a href="?layer=23">23 &ndash; Stickers for secret chats</a></li><li><a href="?layer=105">105 &ndash; Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 &ndash; Login with QR code</a></li><li><a href="?layer=109">109 &ndash; Polls v2</a></li><li><a href="?layer=110">110 &ndash; People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 &ndash; Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 &ndash; Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 &ndash; PSA</a></li><li><a href="?layer=114">114 &ndash; Video thumbs for GIFs</a></li><li><a href="?layer=115">115 &ndash; Peek Channel Invite</a></li><li><a href="?layer=116">116 &ndash; Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 &ndash; WebRTC Phone Calls</a></li><li><a href="?layer=118">118 &ndash; Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 &ndash; Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 &ndash; Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121"><strong>121 &ndash; SVG-based Outlines for Stickers</strong></a></li>
<li class="divider"></li>
<li><a href="/api/layers">More...</a></li>
</ul>
</li>
</ul>
</div>
<pre class="page_scheme"><code><a href="/constructor/channelParticipantAdmin" class="current_page_link" >channelParticipantAdmin</a>#ccbebbaf flags:<a href="/type/%23" >#</a> can_edit:flags.0?true self:flags.1?true user_id:<a href="/type/int" >int</a> inviter_id:flags.1?<a href="/type/int" >int</a> promoted_by:<a href="/type/int" >int</a> date:<a href="/type/int" >int</a> admin_rights:<a href="/type/ChatAdminRights" >ChatAdminRights</a> rank:flags.2?<a href="/type/string" >string</a> = <a href="/type/ChannelParticipant" >ChannelParticipant</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<table class="table">
<thead>
<tr>
<th>Name</th>
<th style="text-align: center;">Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>flags</strong></td>
<td style="text-align: center;"><a href="/type/%23">#</a></td>
<td>Flags, see <a href="/mtproto/TL-combinators#conditional-fields">TL conditional fields</a></td>
</tr>
<tr>
<td><strong>can_edit</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.0?<a href="/constructor/true">true</a></td>
<td>Can this admin promote other admins with the same permissions?</td>
</tr>
<tr>
<td><strong>self</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.1?<a href="/constructor/true">true</a></td>
<td>Is this the current user</td>
</tr>
<tr>
<td><strong>user_id</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>Admin user ID</td>
</tr>
<tr>
<td><strong>inviter_id</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.1?<a href="/type/int">int</a></td>
<td>User that invited the admin to the channel/group</td>
</tr>
<tr>
<td><strong>promoted_by</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>User that promoted the user to admin</td>
</tr>
<tr>
<td><strong>date</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>When did the user join</td>
</tr>
<tr>
<td><strong>admin_rights</strong></td>
<td style="text-align: center;"><a href="/type/ChatAdminRights">ChatAdminRights</a></td>
<td>Admin <a href="/api/rights">rights</a></td>
</tr>
<tr>
<td><strong>rank</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.2?<a href="/type/string">string</a></td>
<td>The role (rank) of the admin in the group: just an arbitrary string, <code>admin</code> by default</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/ChannelParticipant">ChannelParticipant</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#admin-banned-default-rights" id="admin-banned-default-rights" name="admin-banned-default-rights"><i class="anchor-icon"></i></a><a href="/api/rights">Admin, banned, default rights</a></h4>
<p>How to handle admin permissions, granular bans and global permissions in channels, groups and supergroups.</p></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script>backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>

View file

@ -2,12 +2,12 @@
<html class="">
<head>
<meta charset="utf-8">
<title>updateChannelParticipant</title>
<title>channelParticipantBanned</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="A participant has left, joined, was banned or admined in a channel or supergroup.">
<meta property="og:title" content="updateChannelParticipant">
<meta property="description" content="Banned/kicked user">
<meta property="og:title" content="channelParticipantBanned">
<meta property="og:image" content="">
<meta property="og:description" content="A participant has left, joined, was banned or admined in a channel or supergroup.">
<meta property="og:description" content="Banned/kicked user">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
@ -36,10 +36,10 @@
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/updateChannelParticipant" >updateChannelParticipant</a></li></ul></div>
<h1 id="dev_page_title">updateChannelParticipant</h1>
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/channelParticipantBanned" >channelParticipantBanned</a></li></ul></div>
<h1 id="dev_page_title">channelParticipantBanned</h1>
<div id="dev_page_content"><p>A participant has left, joined, was banned or admined in a <a href="/api/channel">channel or supergroup</a>.</p>
<div id="dev_page_content"><p>Banned/kicked user</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
@ -52,7 +52,7 @@
</li>
</ul>
</div>
<pre class="page_scheme"><code>Constructor schema is available as of layer 124. <a href="?layer=124">Switch »</a></code></pre></p>
<pre class="page_scheme"><code><a href="/constructor/channelParticipantBanned" class="current_page_link" >channelParticipantBanned</a>#1c0facaf flags:<a href="/type/%23" >#</a> left:flags.0?true user_id:<a href="/type/int" >int</a> kicked_by:<a href="/type/int" >int</a> date:<a href="/type/int" >int</a> banned_rights:<a href="/type/ChatBannedRights" >ChatBannedRights</a> = <a href="/type/ChannelParticipant" >ChannelParticipant</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<table class="table">
<thead>
@ -69,44 +69,37 @@
<td>Flags, see <a href="/mtproto/TL-combinators#conditional-fields">TL conditional fields</a></td>
</tr>
<tr>
<td><strong>channel_id</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>Channel ID</td>
</tr>
<tr>
<td><strong>date</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>Date of the event</td>
<td><strong>left</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.0?<a href="/constructor/true">true</a></td>
<td>Whether the user has left the group</td>
</tr>
<tr>
<td><strong>user_id</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>User in question</td>
<td>User ID</td>
</tr>
<tr>
<td><strong>prev_participant</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.0?<a href="/type/ChannelParticipant">ChannelParticipant</a></td>
<td>Previous participant status</td>
</tr>
<tr>
<td><strong>new_participant</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.1?<a href="/type/ChannelParticipant">ChannelParticipant</a></td>
<td>New participant status</td>
</tr>
<tr>
<td><strong>qts</strong></td>
<td><strong>kicked_by</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td><a href="/api/updates">PTS</a></td>
<td>User was kicked by the specified admin</td>
</tr>
<tr>
<td><strong>date</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>When did the user join the group</td>
</tr>
<tr>
<td><strong>banned_rights</strong></td>
<td style="text-align: center;"><a href="/type/ChatBannedRights">ChatBannedRights</a></td>
<td>Banned <a href="/api/rights">rights</a></td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/Update">Update</a></p>
<p><a href="/type/ChannelParticipant">ChannelParticipant</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#working-with-updates" id="working-with-updates" name="working-with-updates"><i class="anchor-icon"></i></a><a href="/api/updates">Working with Updates</a></h4>
<p>How to subscribe to updates and handle them properly.</p>
<h4><a class="anchor" href="#channels" id="channels" name="channels"><i class="anchor-icon"></i></a><a href="/api/channel">Channels</a></h4>
<p>How to handle channels, supergroups, groups, and what's the difference between them.</p></div>
<h4><a class="anchor" href="#admin-banned-default-rights" id="admin-banned-default-rights" name="admin-banned-default-rights"><i class="anchor-icon"></i></a><a href="/api/rights">Admin, banned, default rights</a></h4>
<p>How to handle admin permissions, granular bans and global permissions in channels, groups and supergroups.</p></div>
</div>

View file

@ -2,12 +2,12 @@
<html class="">
<head>
<meta charset="utf-8">
<title>nearestDc</title>
<title>channelParticipantSelf</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Nearest data centre, according to geo-ip.">
<meta property="og:title" content="nearestDc">
<meta property="description" content="Myself">
<meta property="og:title" content="channelParticipantSelf">
<meta property="og:image" content="">
<meta property="og:description" content="Nearest data centre, according to geo-ip.">
<meta property="og:description" content="Myself">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
@ -36,10 +36,10 @@
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/nearestDc" >nearestDc</a></li></ul></div>
<h1 id="dev_page_title">nearestDc</h1>
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/channelParticipantSelf" >channelParticipantSelf</a></li></ul></div>
<h1 id="dev_page_title">channelParticipantSelf</h1>
<div id="dev_page_content"><p>Nearest data centre, according to geo-ip.</p>
<div id="dev_page_content"><p>Myself</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
@ -52,7 +52,7 @@
</li>
</ul>
</div>
<pre class="page_scheme"><code><a href="/constructor/nearestDc" class="current_page_link" >nearestDc</a>#8e1a1775 country:<a href="/type/string" >string</a> this_dc:<a href="/type/int" >int</a> nearest_dc:<a href="/type/int" >int</a> = <a href="/type/NearestDc" >NearestDc</a>;</code></pre></p>
<pre class="page_scheme"><code><a href="/constructor/channelParticipantSelf" class="current_page_link" >channelParticipantSelf</a>#a3289a6d user_id:<a href="/type/int" >int</a> inviter_id:<a href="/type/int" >int</a> date:<a href="/type/int" >int</a> = <a href="/type/ChannelParticipant" >ChannelParticipant</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<table class="table">
<thead>
@ -64,24 +64,24 @@
</thead>
<tbody>
<tr>
<td><strong>country</strong></td>
<td style="text-align: center;"><a href="/type/string">string</a></td>
<td>Country code determined by geo-ip</td>
<td><strong>user_id</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>User ID</td>
</tr>
<tr>
<td><strong>this_dc</strong></td>
<td><strong>inviter_id</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>Number of current data centre</td>
<td>User that invited me to the channel/supergroup</td>
</tr>
<tr>
<td><strong>nearest_dc</strong></td>
<td><strong>date</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>Number of nearest data centre</td>
<td>When did I join the channel/supergroup</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/NearestDc">NearestDc</a></p></div>
<p><a href="/type/ChannelParticipant">ChannelParticipant</a></p></div>
</div>

View file

@ -1,161 +0,0 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>channelParticipantsMentions</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="This filter is used when looking for supergroup members to mention. This filter will automatically remove anonymous admins, and return even non-participant users that replied to a specific thread through the comment section of a channel.">
<meta property="og:title" content="channelParticipantsMentions">
<meta property="og:image" content="">
<meta property="og:description" content="This filter is used when looking for supergroup members to mention. This filter will automatically remove anonymous admins, and return even non-participant users that replied to a specific thread through the comment section of a channel.">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class=""><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class="active"><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/channelParticipantsMentions" >channelParticipantsMentions</a></li></ul></div>
<h1 id="dev_page_title">channelParticipantsMentions</h1>
<div id="dev_page_content"><p>This filter is used when looking for supergroup members to mention.<br>
This filter will automatically remove anonymous admins, and return even non-participant users that replied to a specific <a href="/api/threads">thread</a> through the <a href="/api/threads#channel-comments">comment section</a> of a channel.</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 121 <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="?layer=1">1 &ndash; Base layer</a></li><li><a href="?layer=2">2 &ndash; New userpic notifications</a></li><li><a href="?layer=3">3 &ndash; Send message can trigger link change</a></li><li><a href="?layer=4">4 &ndash; Check-in chats</a></li><li><a href="?layer=5">5 &ndash; Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 &ndash; Foursquare integration</a></li><li><a href="?layer=7">7 &ndash; Added wallPaperSolid</a></li><li><a href="?layer=8">8 &ndash; Added end-to-end encryption</a></li><li><a href="?layer=9">9 &ndash; Improved big files upload perfomance</a></li><li><a href="?layer=10">10 &ndash; Improved chat participants updates</a></li><li><a href="?layer=11">11 &ndash; Improved secret chats</a></li><li><a href="?layer=12">12 &ndash; New dynamic support</a></li><li><a href="?layer=13">13 &ndash; Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 &ndash; Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 &ndash; Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 &ndash; Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 &ndash; Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 &ndash; Added usernames</a></li><li><a href="?layer=23">23 &ndash; Stickers for secret chats</a></li><li><a href="?layer=105">105 &ndash; Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 &ndash; Login with QR code</a></li><li><a href="?layer=109">109 &ndash; Polls v2</a></li><li><a href="?layer=110">110 &ndash; People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 &ndash; Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 &ndash; Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 &ndash; PSA</a></li><li><a href="?layer=114">114 &ndash; Video thumbs for GIFs</a></li><li><a href="?layer=115">115 &ndash; Peek Channel Invite</a></li><li><a href="?layer=116">116 &ndash; Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 &ndash; WebRTC Phone Calls</a></li><li><a href="?layer=118">118 &ndash; Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 &ndash; Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 &ndash; Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121"><strong>121 &ndash; SVG-based Outlines for Stickers</strong></a></li>
<li class="divider"></li>
<li><a href="/api/layers">More...</a></li>
</ul>
</li>
</ul>
</div>
<pre class="page_scheme"><code><a href="/constructor/channelParticipantsMentions" class="current_page_link" >channelParticipantsMentions</a>#e04b5ceb flags:<a href="/type/%23" >#</a> q:flags.0?<a href="/type/string" >string</a> top_msg_id:flags.1?<a href="/type/int" >int</a> = <a href="/type/ChannelParticipantsFilter" >ChannelParticipantsFilter</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<table class="table">
<thead>
<tr>
<th>Name</th>
<th style="text-align: center;">Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>flags</strong></td>
<td style="text-align: center;"><a href="/type/%23">#</a></td>
<td>Flags, see <a href="/mtproto/TL-combinators#conditional-fields">TL conditional fields</a></td>
</tr>
<tr>
<td><strong>q</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.0?<a href="/type/string">string</a></td>
<td>Filter by user name or username</td>
</tr>
<tr>
<td><strong>top_msg_id</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.1?<a href="/type/int">int</a></td>
<td>Look only for users that posted in this <a href="/api/threads">thread</a></td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/ChannelParticipantsFilter">ChannelParticipantsFilter</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#threads" id="threads" name="threads"><i class="anchor-icon"></i></a><a href="/api/threads">Threads</a></h4>
<p>Telegram allows commenting on a <a href="/api/channel">channel post</a> or on a generic <a href="/api/channel">supergroup message</a>, thanks to message threads.</p></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script>backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>

View file

@ -0,0 +1,147 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>channelParticipantsSearch</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Query participants by name">
<meta property="og:title" content="channelParticipantsSearch">
<meta property="og:image" content="">
<meta property="og:description" content="Query participants by name">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class=""><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class="active"><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/channelParticipantsSearch" >channelParticipantsSearch</a></li></ul></div>
<h1 id="dev_page_title">channelParticipantsSearch</h1>
<div id="dev_page_content"><p>Query participants by name</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 121 <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="?layer=1">1 &ndash; Base layer</a></li><li><a href="?layer=2">2 &ndash; New userpic notifications</a></li><li><a href="?layer=3">3 &ndash; Send message can trigger link change</a></li><li><a href="?layer=4">4 &ndash; Check-in chats</a></li><li><a href="?layer=5">5 &ndash; Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 &ndash; Foursquare integration</a></li><li><a href="?layer=7">7 &ndash; Added wallPaperSolid</a></li><li><a href="?layer=8">8 &ndash; Added end-to-end encryption</a></li><li><a href="?layer=9">9 &ndash; Improved big files upload perfomance</a></li><li><a href="?layer=10">10 &ndash; Improved chat participants updates</a></li><li><a href="?layer=11">11 &ndash; Improved secret chats</a></li><li><a href="?layer=12">12 &ndash; New dynamic support</a></li><li><a href="?layer=13">13 &ndash; Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 &ndash; Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 &ndash; Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 &ndash; Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 &ndash; Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 &ndash; Added usernames</a></li><li><a href="?layer=23">23 &ndash; Stickers for secret chats</a></li><li><a href="?layer=105">105 &ndash; Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 &ndash; Login with QR code</a></li><li><a href="?layer=109">109 &ndash; Polls v2</a></li><li><a href="?layer=110">110 &ndash; People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 &ndash; Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 &ndash; Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 &ndash; PSA</a></li><li><a href="?layer=114">114 &ndash; Video thumbs for GIFs</a></li><li><a href="?layer=115">115 &ndash; Peek Channel Invite</a></li><li><a href="?layer=116">116 &ndash; Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 &ndash; WebRTC Phone Calls</a></li><li><a href="?layer=118">118 &ndash; Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 &ndash; Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 &ndash; Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121"><strong>121 &ndash; SVG-based Outlines for Stickers</strong></a></li>
<li class="divider"></li>
<li><a href="/api/layers">More...</a></li>
</ul>
</li>
</ul>
</div>
<pre class="page_scheme"><code><a href="/constructor/channelParticipantsSearch" class="current_page_link" >channelParticipantsSearch</a>#656ac4b q:<a href="/type/string" >string</a> = <a href="/type/ChannelParticipantsFilter" >ChannelParticipantsFilter</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<table class="table">
<thead>
<tr>
<th>Name</th>
<th style="text-align: center;">Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>q</strong></td>
<td style="text-align: center;"><a href="/type/string">string</a></td>
<td>Search query</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/ChannelParticipantsFilter">ChannelParticipantsFilter</a></p></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script>backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>

View file

@ -2,12 +2,12 @@
<html class="">
<head>
<meta charset="utf-8">
<title>messages.inactiveChats</title>
<title>channels.adminLogResults</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Inactive chat list">
<meta property="og:title" content="messages.inactiveChats">
<meta property="description" content="Admin log events">
<meta property="og:title" content="channels.adminLogResults">
<meta property="og:image" content="">
<meta property="og:description" content="Inactive chat list">
<meta property="og:description" content="Admin log events">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
@ -36,10 +36,10 @@
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/messages.inactiveChats" >messages.inactiveChats</a></li></ul></div>
<h1 id="dev_page_title">messages.inactiveChats</h1>
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/channels.adminLogResults" >channels.adminLogResults</a></li></ul></div>
<h1 id="dev_page_title">channels.adminLogResults</h1>
<div id="dev_page_content"><p>Inactive chat list</p>
<div id="dev_page_content"><p>Admin log events</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
@ -52,7 +52,7 @@
</li>
</ul>
</div>
<pre class="page_scheme"><code><a href="/constructor/messages.inactiveChats" class="current_page_link" >messages.inactiveChats</a>#a927fec5 dates:<a href="/type/Vector%20t" >Vector</a>&lt;<a href="/type/int" >int</a>&gt; chats:<a href="/type/Vector%20t" >Vector</a>&lt;<a href="/type/Chat" >Chat</a>&gt; users:<a href="/type/Vector%20t" >Vector</a>&lt;<a href="/type/User" >User</a>&gt; = <a href="/type/messages.InactiveChats" >messages.InactiveChats</a>;</code></pre></p>
<pre class="page_scheme"><code><a href="/constructor/channels.adminLogResults" class="current_page_link" >channels.adminLogResults</a>#ed8af74d events:<a href="/type/Vector%20t" >Vector</a>&lt;<a href="/type/ChannelAdminLogEvent" >ChannelAdminLogEvent</a>&gt; chats:<a href="/type/Vector%20t" >Vector</a>&lt;<a href="/type/Chat" >Chat</a>&gt; users:<a href="/type/Vector%20t" >Vector</a>&lt;<a href="/type/User" >User</a>&gt; = <a href="/type/channels.AdminLogResults" >channels.AdminLogResults</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<table class="table">
<thead>
@ -64,24 +64,24 @@
</thead>
<tbody>
<tr>
<td><strong>dates</strong></td>
<td style="text-align: center;"><a href="/type/Vector%20t">Vector</a>&lt;<a href="/type/int">int</a>&gt;</td>
<td>When was the chat last active</td>
<td><strong>events</strong></td>
<td style="text-align: center;"><a href="/type/Vector%20t">Vector</a>&lt;<a href="/type/ChannelAdminLogEvent">ChannelAdminLogEvent</a>&gt;</td>
<td>Admin log events</td>
</tr>
<tr>
<td><strong>chats</strong></td>
<td style="text-align: center;"><a href="/type/Vector%20t">Vector</a>&lt;<a href="/type/Chat">Chat</a>&gt;</td>
<td>Chat list</td>
<td>Chats mentioned in events</td>
</tr>
<tr>
<td><strong>users</strong></td>
<td style="text-align: center;"><a href="/type/Vector%20t">Vector</a>&lt;<a href="/type/User">User</a>&gt;</td>
<td>Users mentioned in the chat list</td>
<td>Users mentioned in events</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/messages.InactiveChats">messages.InactiveChats</a></p></div>
<p><a href="/type/channels.AdminLogResults">channels.AdminLogResults</a></p></div>
</div>

View file

@ -2,12 +2,12 @@
<html class="">
<head>
<meta charset="utf-8">
<title>messages.highScores</title>
<title>channels.channelParticipant</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Highscores in a game">
<meta property="og:title" content="messages.highScores">
<meta property="description" content="Represents a channel participant">
<meta property="og:title" content="channels.channelParticipant">
<meta property="og:image" content="">
<meta property="og:description" content="Highscores in a game">
<meta property="og:description" content="Represents a channel participant">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
@ -36,10 +36,10 @@
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/messages.highScores" >messages.highScores</a></li></ul></div>
<h1 id="dev_page_title">messages.highScores</h1>
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/channels.channelParticipant" >channels.channelParticipant</a></li></ul></div>
<h1 id="dev_page_title">channels.channelParticipant</h1>
<div id="dev_page_content"><p>Highscores in a game</p>
<div id="dev_page_content"><p>Represents a channel participant</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
@ -52,7 +52,7 @@
</li>
</ul>
</div>
<pre class="page_scheme"><code><a href="/constructor/messages.highScores" class="current_page_link" >messages.highScores</a>#9a3bfd99 scores:<a href="/type/Vector%20t" >Vector</a>&lt;<a href="/type/HighScore" >HighScore</a>&gt; users:<a href="/type/Vector%20t" >Vector</a>&lt;<a href="/type/User" >User</a>&gt; = <a href="/type/messages.HighScores" >messages.HighScores</a>;</code></pre></p>
<pre class="page_scheme"><code><a href="/constructor/channels.channelParticipant" class="current_page_link" >channels.channelParticipant</a>#d0d9b163 participant:<a href="/type/ChannelParticipant" >ChannelParticipant</a> users:<a href="/type/Vector%20t" >Vector</a>&lt;<a href="/type/User" >User</a>&gt; = <a href="/type/channels.ChannelParticipant" >channels.ChannelParticipant</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<table class="table">
<thead>
@ -64,19 +64,19 @@
</thead>
<tbody>
<tr>
<td><strong>scores</strong></td>
<td style="text-align: center;"><a href="/type/Vector%20t">Vector</a>&lt;<a href="/type/HighScore">HighScore</a>&gt;</td>
<td>Highscores</td>
<td><strong>participant</strong></td>
<td style="text-align: center;"><a href="/type/ChannelParticipant">ChannelParticipant</a></td>
<td>The channel participant</td>
</tr>
<tr>
<td><strong>users</strong></td>
<td style="text-align: center;"><a href="/type/Vector%20t">Vector</a>&lt;<a href="/type/User">User</a>&gt;</td>
<td>Users, associated to the highscores</td>
<td>Users</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/messages.HighScores">messages.HighScores</a></p></div>
<p><a href="/type/channels.ChannelParticipant">channels.ChannelParticipant</a></p></div>
</div>

View file

@ -0,0 +1,152 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>chatForbidden</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="A group to which the user has no access. E.g., because the user was kicked from the group.">
<meta property="og:title" content="chatForbidden">
<meta property="og:image" content="">
<meta property="og:description" content="A group to which the user has no access. E.g., because the user was kicked from the group.">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class=""><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class="active"><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/chatForbidden" >chatForbidden</a></li></ul></div>
<h1 id="dev_page_title">chatForbidden</h1>
<div id="dev_page_content"><p>A group to which the user has no access. E.g., because the user was kicked from the group.</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 121 <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="?layer=1">1 &ndash; Base layer</a></li><li><a href="?layer=2">2 &ndash; New userpic notifications</a></li><li><a href="?layer=3">3 &ndash; Send message can trigger link change</a></li><li><a href="?layer=4">4 &ndash; Check-in chats</a></li><li><a href="?layer=5">5 &ndash; Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 &ndash; Foursquare integration</a></li><li><a href="?layer=7">7 &ndash; Added wallPaperSolid</a></li><li><a href="?layer=8">8 &ndash; Added end-to-end encryption</a></li><li><a href="?layer=9">9 &ndash; Improved big files upload perfomance</a></li><li><a href="?layer=10">10 &ndash; Improved chat participants updates</a></li><li><a href="?layer=11">11 &ndash; Improved secret chats</a></li><li><a href="?layer=12">12 &ndash; New dynamic support</a></li><li><a href="?layer=13">13 &ndash; Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 &ndash; Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 &ndash; Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 &ndash; Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 &ndash; Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 &ndash; Added usernames</a></li><li><a href="?layer=23">23 &ndash; Stickers for secret chats</a></li><li><a href="?layer=105">105 &ndash; Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 &ndash; Login with QR code</a></li><li><a href="?layer=109">109 &ndash; Polls v2</a></li><li><a href="?layer=110">110 &ndash; People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 &ndash; Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 &ndash; Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 &ndash; PSA</a></li><li><a href="?layer=114">114 &ndash; Video thumbs for GIFs</a></li><li><a href="?layer=115">115 &ndash; Peek Channel Invite</a></li><li><a href="?layer=116">116 &ndash; Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 &ndash; WebRTC Phone Calls</a></li><li><a href="?layer=118">118 &ndash; Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 &ndash; Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 &ndash; Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121"><strong>121 &ndash; SVG-based Outlines for Stickers</strong></a></li>
<li class="divider"></li>
<li><a href="/api/layers">More...</a></li>
</ul>
</li>
</ul>
</div>
<pre class="page_scheme"><code><a href="/constructor/chatForbidden" class="current_page_link" >chatForbidden</a>#7328bdb id:<a href="/type/int" >int</a> title:<a href="/type/string" >string</a> = <a href="/type/Chat" >Chat</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<table class="table">
<thead>
<tr>
<th>Name</th>
<th style="text-align: center;">Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>id</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>User identifier</td>
</tr>
<tr>
<td><strong>title</strong></td>
<td style="text-align: center;"><a href="/type/string">string</a></td>
<td>Group name</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/Chat">Chat</a></p></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script>backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>

View file

@ -2,12 +2,12 @@
<html class="">
<head>
<meta charset="utf-8">
<title>peerSettings</title>
<title>chatInvite</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Peer settings">
<meta property="og:title" content="peerSettings">
<meta property="description" content="Chat invite info">
<meta property="og:title" content="chatInvite">
<meta property="og:image" content="">
<meta property="og:description" content="Peer settings">
<meta property="og:description" content="Chat invite info">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
@ -36,10 +36,10 @@
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/peerSettings" >peerSettings</a></li></ul></div>
<h1 id="dev_page_title">peerSettings</h1>
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/chatInvite" >chatInvite</a></li></ul></div>
<h1 id="dev_page_title">chatInvite</h1>
<div id="dev_page_content"><p>Peer settings</p>
<div id="dev_page_content"><p>Chat invite info</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
@ -52,7 +52,7 @@
</li>
</ul>
</div>
<pre class="page_scheme"><code><a href="/constructor/peerSettings" class="current_page_link" >peerSettings</a>#733f2961 flags:<a href="/type/%23" >#</a> report_spam:flags.0?true add_contact:flags.1?true block_contact:flags.2?true share_contact:flags.3?true need_contacts_exception:flags.4?true report_geo:flags.5?true autoarchived:flags.7?true invite_members:flags.8?true geo_distance:flags.6?<a href="/type/int" >int</a> = <a href="/type/PeerSettings" >PeerSettings</a>;</code></pre></p>
<pre class="page_scheme"><code><a href="/constructor/chatInvite" class="current_page_link" >chatInvite</a>#dfc2f58e flags:<a href="/type/%23" >#</a> channel:flags.0?true broadcast:flags.1?true public:flags.2?true megagroup:flags.3?true title:<a href="/type/string" >string</a> photo:<a href="/type/Photo" >Photo</a> participants_count:<a href="/type/int" >int</a> participants:flags.4?<a href="/type/Vector%20t" >Vector</a>&lt;<a href="/type/User" >User</a>&gt; = <a href="/type/ChatInvite" >ChatInvite</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<table class="table">
<thead>
@ -69,52 +69,52 @@
<td>Flags, see <a href="/mtproto/TL-combinators#conditional-fields">TL conditional fields</a></td>
</tr>
<tr>
<td><strong>report_spam</strong></td>
<td><strong>channel</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.0?<a href="/constructor/true">true</a></td>
<td>Whether we can still report the user for spam</td>
<td>Whether this is a <a href="/api/channel">channel/supergroup</a> or a <a href="/api/channel">normal group</a></td>
</tr>
<tr>
<td><strong>add_contact</strong></td>
<td><strong>broadcast</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.1?<a href="/constructor/true">true</a></td>
<td>Whether we can add the user as contact</td>
<td>Whether this is a <a href="/api/channel">channel</a></td>
</tr>
<tr>
<td><strong>block_contact</strong></td>
<td><strong>public</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.2?<a href="/constructor/true">true</a></td>
<td>Whether we can block the user</td>
<td>Whether this is a public <a href="/api/channel">channel/supergroup</a></td>
</tr>
<tr>
<td><strong>share_contact</strong></td>
<td><strong>megagroup</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.3?<a href="/constructor/true">true</a></td>
<td>Whether we can share the user's contact</td>
<td>Whether this is a <a href="/api/channel">supergroup</a></td>
</tr>
<tr>
<td><strong>need_contacts_exception</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.4?<a href="/constructor/true">true</a></td>
<td>Whether a special exception for contacts is needed</td>
<td><strong>title</strong></td>
<td style="text-align: center;"><a href="/type/string">string</a></td>
<td>Chat/supergroup/channel title</td>
</tr>
<tr>
<td><strong>report_geo</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.5?<a href="/constructor/true">true</a></td>
<td>Whether we can report a geogroup is irrelevant for this location</td>
<td><strong>photo</strong></td>
<td style="text-align: center;"><a href="/type/Photo">Photo</a></td>
<td>Chat/supergroup/channel photo</td>
</tr>
<tr>
<td><strong>autoarchived</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.7?<a href="/constructor/true">true</a></td>
<td>Whether this peer was automatically archived according to <a href="/constructor/globalPrivacySettings">privacy settings</a></td>
<td><strong>participants_count</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>Participant count</td>
</tr>
<tr>
<td><strong>geo_distance</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.6?<a href="/type/int">int</a></td>
<td>Distance in meters between us and this peer</td>
<td><strong>participants</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.4?<a href="/type/Vector%20t">Vector</a>&lt;<a href="/type/User">User</a>&gt;</td>
<td>A few of the participants that are in the group</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/PeerSettings">PeerSettings</a></p>
<p><a href="/type/ChatInvite">ChatInvite</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#globalprivacysettings" id="globalprivacysettings" name="globalprivacysettings"><i class="anchor-icon"></i></a><a href="/constructor/globalPrivacySettings">globalPrivacySettings</a></h4>
<p>Global privacy settings</p></div>
<h4><a class="anchor" href="#channels" id="channels" name="channels"><i class="anchor-icon"></i></a><a href="/api/channel">Channels</a></h4>
<p>How to handle channels, supergroups, groups, and what's the difference between them.</p></div>
</div>

View file

@ -2,12 +2,12 @@
<html class="">
<head>
<meta charset="utf-8">
<title>inputChatPhotoEmpty</title>
<title>chatInviteEmpty</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Empty constructor, remove group photo.">
<meta property="og:title" content="inputChatPhotoEmpty">
<meta property="description" content="No info is associated to the chat invite">
<meta property="og:title" content="chatInviteEmpty">
<meta property="og:image" content="">
<meta property="og:description" content="Empty constructor, remove group photo.">
<meta property="og:description" content="No info is associated to the chat invite">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
@ -36,10 +36,10 @@
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/inputChatPhotoEmpty" >inputChatPhotoEmpty</a></li></ul></div>
<h1 id="dev_page_title">inputChatPhotoEmpty</h1>
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/chatInviteEmpty" >chatInviteEmpty</a></li></ul></div>
<h1 id="dev_page_title">chatInviteEmpty</h1>
<div id="dev_page_content"><p>Empty constructor, remove group photo.</p>
<div id="dev_page_content"><p>No info is associated to the chat invite</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
@ -52,11 +52,11 @@
</li>
</ul>
</div>
<pre class="page_scheme"><code><a href="/constructor/inputChatPhotoEmpty" class="current_page_link" >inputChatPhotoEmpty</a>#1ca48f57 = <a href="/type/InputChatPhoto" >InputChatPhoto</a>;</code></pre></p>
<pre class="page_scheme"><code><a href="/constructor/chatInviteEmpty" class="current_page_link" >chatInviteEmpty</a>#69df3769 = <a href="/type/ExportedChatInvite" >ExportedChatInvite</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<p>This constructor does not require any parameters.</p>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/InputChatPhoto">InputChatPhoto</a></p></div>
<p><a href="/type/ExportedChatInvite">ExportedChatInvite</a></p></div>
</div>

View file

@ -2,12 +2,12 @@
<html class="">
<head>
<meta charset="utf-8">
<title>help.supportName</title>
<title>chatInviteExported</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Localized name for telegram support">
<meta property="og:title" content="help.supportName">
<meta property="description" content="Exported chat invite">
<meta property="og:title" content="chatInviteExported">
<meta property="og:image" content="">
<meta property="og:description" content="Localized name for telegram support">
<meta property="og:description" content="Exported chat invite">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
@ -36,10 +36,10 @@
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/help.supportName" >help.supportName</a></li></ul></div>
<h1 id="dev_page_title">help.supportName</h1>
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/chatInviteExported" >chatInviteExported</a></li></ul></div>
<h1 id="dev_page_title">chatInviteExported</h1>
<div id="dev_page_content"><p>Localized name for telegram support</p>
<div id="dev_page_content"><p>Exported chat invite</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
@ -52,7 +52,7 @@
</li>
</ul>
</div>
<pre class="page_scheme"><code><a href="/constructor/help.supportName" class="current_page_link" >help.supportName</a>#8c05f1c9 name:<a href="/type/string" >string</a> = <a href="/type/help.SupportName" >help.SupportName</a>;</code></pre></p>
<pre class="page_scheme"><code><a href="/constructor/chatInviteExported" class="current_page_link" >chatInviteExported</a>#fc2e05bc link:<a href="/type/string" >string</a> = <a href="/type/ExportedChatInvite" >ExportedChatInvite</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<table class="table">
<thead>
@ -64,14 +64,14 @@
</thead>
<tbody>
<tr>
<td><strong>name</strong></td>
<td><strong>link</strong></td>
<td style="text-align: center;"><a href="/type/string">string</a></td>
<td>Localized name</td>
<td>Chat invitation link</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/help.SupportName">help.SupportName</a></p></div>
<p><a href="/type/ExportedChatInvite">ExportedChatInvite</a></p></div>
</div>

View file

@ -0,0 +1,157 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>chatParticipantAdmin</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Chat admin">
<meta property="og:title" content="chatParticipantAdmin">
<meta property="og:image" content="">
<meta property="og:description" content="Chat admin">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class=""><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class="active"><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/chatParticipantAdmin" >chatParticipantAdmin</a></li></ul></div>
<h1 id="dev_page_title">chatParticipantAdmin</h1>
<div id="dev_page_content"><p>Chat admin</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 121 <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="?layer=1">1 &ndash; Base layer</a></li><li><a href="?layer=2">2 &ndash; New userpic notifications</a></li><li><a href="?layer=3">3 &ndash; Send message can trigger link change</a></li><li><a href="?layer=4">4 &ndash; Check-in chats</a></li><li><a href="?layer=5">5 &ndash; Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 &ndash; Foursquare integration</a></li><li><a href="?layer=7">7 &ndash; Added wallPaperSolid</a></li><li><a href="?layer=8">8 &ndash; Added end-to-end encryption</a></li><li><a href="?layer=9">9 &ndash; Improved big files upload perfomance</a></li><li><a href="?layer=10">10 &ndash; Improved chat participants updates</a></li><li><a href="?layer=11">11 &ndash; Improved secret chats</a></li><li><a href="?layer=12">12 &ndash; New dynamic support</a></li><li><a href="?layer=13">13 &ndash; Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 &ndash; Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 &ndash; Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 &ndash; Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 &ndash; Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 &ndash; Added usernames</a></li><li><a href="?layer=23">23 &ndash; Stickers for secret chats</a></li><li><a href="?layer=105">105 &ndash; Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 &ndash; Login with QR code</a></li><li><a href="?layer=109">109 &ndash; Polls v2</a></li><li><a href="?layer=110">110 &ndash; People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 &ndash; Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 &ndash; Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 &ndash; PSA</a></li><li><a href="?layer=114">114 &ndash; Video thumbs for GIFs</a></li><li><a href="?layer=115">115 &ndash; Peek Channel Invite</a></li><li><a href="?layer=116">116 &ndash; Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 &ndash; WebRTC Phone Calls</a></li><li><a href="?layer=118">118 &ndash; Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 &ndash; Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 &ndash; Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121"><strong>121 &ndash; SVG-based Outlines for Stickers</strong></a></li>
<li class="divider"></li>
<li><a href="/api/layers">More...</a></li>
</ul>
</li>
</ul>
</div>
<pre class="page_scheme"><code><a href="/constructor/chatParticipantAdmin" class="current_page_link" >chatParticipantAdmin</a>#e2d6e436 user_id:<a href="/type/int" >int</a> inviter_id:<a href="/type/int" >int</a> date:<a href="/type/int" >int</a> = <a href="/type/ChatParticipant" >ChatParticipant</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<table class="table">
<thead>
<tr>
<th>Name</th>
<th style="text-align: center;">Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>user_id</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>ID of a group member that is admin</td>
</tr>
<tr>
<td><strong>inviter_id</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>ID of the user that added the member to the group</td>
</tr>
<tr>
<td><strong>date</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>Date when the user was added</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/ChatParticipant">ChatParticipant</a></p></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script>backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>

View file

@ -0,0 +1,132 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>chatPhotoEmpty</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Group photo is not set.">
<meta property="og:title" content="chatPhotoEmpty">
<meta property="og:image" content="">
<meta property="og:description" content="Group photo is not set.">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class=""><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class="active"><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/chatPhotoEmpty" >chatPhotoEmpty</a></li></ul></div>
<h1 id="dev_page_title">chatPhotoEmpty</h1>
<div id="dev_page_content"><p>Group photo is not set.</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 121 <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="?layer=1">1 &ndash; Base layer</a></li><li><a href="?layer=2">2 &ndash; New userpic notifications</a></li><li><a href="?layer=3">3 &ndash; Send message can trigger link change</a></li><li><a href="?layer=4">4 &ndash; Check-in chats</a></li><li><a href="?layer=5">5 &ndash; Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 &ndash; Foursquare integration</a></li><li><a href="?layer=7">7 &ndash; Added wallPaperSolid</a></li><li><a href="?layer=8">8 &ndash; Added end-to-end encryption</a></li><li><a href="?layer=9">9 &ndash; Improved big files upload perfomance</a></li><li><a href="?layer=10">10 &ndash; Improved chat participants updates</a></li><li><a href="?layer=11">11 &ndash; Improved secret chats</a></li><li><a href="?layer=12">12 &ndash; New dynamic support</a></li><li><a href="?layer=13">13 &ndash; Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 &ndash; Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 &ndash; Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 &ndash; Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 &ndash; Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 &ndash; Added usernames</a></li><li><a href="?layer=23">23 &ndash; Stickers for secret chats</a></li><li><a href="?layer=105">105 &ndash; Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 &ndash; Login with QR code</a></li><li><a href="?layer=109">109 &ndash; Polls v2</a></li><li><a href="?layer=110">110 &ndash; People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 &ndash; Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 &ndash; Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 &ndash; PSA</a></li><li><a href="?layer=114">114 &ndash; Video thumbs for GIFs</a></li><li><a href="?layer=115">115 &ndash; Peek Channel Invite</a></li><li><a href="?layer=116">116 &ndash; Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 &ndash; WebRTC Phone Calls</a></li><li><a href="?layer=118">118 &ndash; Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 &ndash; Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 &ndash; Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121"><strong>121 &ndash; SVG-based Outlines for Stickers</strong></a></li>
<li class="divider"></li>
<li><a href="/api/layers">More...</a></li>
</ul>
</li>
</ul>
</div>
<pre class="page_scheme"><code><a href="/constructor/chatPhotoEmpty" class="current_page_link" >chatPhotoEmpty</a>#37c1011c = <a href="/type/ChatPhoto" >ChatPhoto</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<p>This constructor does not require any parameters.</p>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/ChatPhoto">ChatPhoto</a></p></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script>backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>

View file

@ -0,0 +1,152 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>contact</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="A contact of the current user that is registered in the system.">
<meta property="og:title" content="contact">
<meta property="og:image" content="">
<meta property="og:description" content="A contact of the current user that is registered in the system.">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class=""><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class="active"><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/contact" >contact</a></li></ul></div>
<h1 id="dev_page_title">contact</h1>
<div id="dev_page_content"><p>A contact of the current user that is registered in the system.</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 121 <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="?layer=1">1 &ndash; Base layer</a></li><li><a href="?layer=2">2 &ndash; New userpic notifications</a></li><li><a href="?layer=3">3 &ndash; Send message can trigger link change</a></li><li><a href="?layer=4">4 &ndash; Check-in chats</a></li><li><a href="?layer=5">5 &ndash; Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 &ndash; Foursquare integration</a></li><li><a href="?layer=7">7 &ndash; Added wallPaperSolid</a></li><li><a href="?layer=8">8 &ndash; Added end-to-end encryption</a></li><li><a href="?layer=9">9 &ndash; Improved big files upload perfomance</a></li><li><a href="?layer=10">10 &ndash; Improved chat participants updates</a></li><li><a href="?layer=11">11 &ndash; Improved secret chats</a></li><li><a href="?layer=12">12 &ndash; New dynamic support</a></li><li><a href="?layer=13">13 &ndash; Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 &ndash; Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 &ndash; Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 &ndash; Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 &ndash; Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 &ndash; Added usernames</a></li><li><a href="?layer=23">23 &ndash; Stickers for secret chats</a></li><li><a href="?layer=105">105 &ndash; Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 &ndash; Login with QR code</a></li><li><a href="?layer=109">109 &ndash; Polls v2</a></li><li><a href="?layer=110">110 &ndash; People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 &ndash; Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 &ndash; Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 &ndash; PSA</a></li><li><a href="?layer=114">114 &ndash; Video thumbs for GIFs</a></li><li><a href="?layer=115">115 &ndash; Peek Channel Invite</a></li><li><a href="?layer=116">116 &ndash; Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 &ndash; WebRTC Phone Calls</a></li><li><a href="?layer=118">118 &ndash; Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 &ndash; Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 &ndash; Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121"><strong>121 &ndash; SVG-based Outlines for Stickers</strong></a></li>
<li class="divider"></li>
<li><a href="/api/layers">More...</a></li>
</ul>
</li>
</ul>
</div>
<pre class="page_scheme"><code><a href="/constructor/contact" class="current_page_link" >contact</a>#f911c994 user_id:<a href="/type/int" >int</a> mutual:<a href="/type/Bool" >Bool</a> = <a href="/type/Contact" >Contact</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<table class="table">
<thead>
<tr>
<th>Name</th>
<th style="text-align: center;">Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>user_id</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>User identifier</td>
</tr>
<tr>
<td><strong>mutual</strong></td>
<td style="text-align: center;"><a href="/type/Bool">Bool</a></td>
<td>Current user is in the user's contact list</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/Contact">Contact</a></p></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script>backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>

View file

@ -2,12 +2,12 @@
<html class="">
<head>
<meta charset="utf-8">
<title>Updates</title>
<title>contacts.blockedSlice</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Full constructor of updates">
<meta property="og:title" content="Updates">
<meta property="description" content="Incomplete list of blocked users.">
<meta property="og:title" content="contacts.blockedSlice">
<meta property="og:image" content="">
<meta property="og:description" content="Full constructor of updates">
<meta property="og:description" content="Incomplete list of blocked users.">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
@ -36,10 +36,10 @@
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/updates" >Updates</a></li></ul></div>
<h1 id="dev_page_title">Updates</h1>
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/contacts.blockedSlice" >contacts.blockedSlice</a></li></ul></div>
<h1 id="dev_page_title">contacts.blockedSlice</h1>
<div id="dev_page_content"><p>Full constructor of updates</p>
<div id="dev_page_content"><p>Incomplete list of blocked users.</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
@ -52,7 +52,7 @@
</li>
</ul>
</div>
<pre class="page_scheme"><code><a href="/constructor/updates" class="current_page_link" >updates</a>#74ae4240 updates:<a href="/type/Vector%20t" >Vector</a>&lt;<a href="/type/Update" >Update</a>&gt; users:<a href="/type/Vector%20t" >Vector</a>&lt;<a href="/type/User" >User</a>&gt; chats:<a href="/type/Vector%20t" >Vector</a>&lt;<a href="/type/Chat" >Chat</a>&gt; date:<a href="/type/int" >int</a> seq:<a href="/type/int" >int</a> = <a href="/type/Updates" >Updates</a>;</code></pre></p>
<pre class="page_scheme"><code><a href="/constructor/contacts.blockedSlice" class="current_page_link" >contacts.blockedSlice</a>#e1664194 count:<a href="/type/int" >int</a> blocked:<a href="/type/Vector%20t" >Vector</a>&lt;<a href="/type/PeerBlocked" >PeerBlocked</a>&gt; chats:<a href="/type/Vector%20t" >Vector</a>&lt;<a href="/type/Chat" >Chat</a>&gt; users:<a href="/type/Vector%20t" >Vector</a>&lt;<a href="/type/User" >User</a>&gt; = <a href="/type/contacts.Blocked" >contacts.Blocked</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<table class="table">
<thead>
@ -64,34 +64,29 @@
</thead>
<tbody>
<tr>
<td><strong>updates</strong></td>
<td style="text-align: center;"><a href="/type/Vector%20t">Vector</a>&lt;<a href="/type/Update">Update</a>&gt;</td>
<td>List of updates</td>
<td><strong>count</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>Total number of elements in the list</td>
</tr>
<tr>
<td><strong>users</strong></td>
<td style="text-align: center;"><a href="/type/Vector%20t">Vector</a>&lt;<a href="/type/User">User</a>&gt;</td>
<td>List of users mentioned in updates</td>
<td><strong>blocked</strong></td>
<td style="text-align: center;"><a href="/type/Vector%20t">Vector</a>&lt;<a href="/type/PeerBlocked">PeerBlocked</a>&gt;</td>
<td>List of blocked users</td>
</tr>
<tr>
<td><strong>chats</strong></td>
<td style="text-align: center;"><a href="/type/Vector%20t">Vector</a>&lt;<a href="/type/Chat">Chat</a>&gt;</td>
<td>List of chats mentioned in updates</td>
<td>Blocked chats</td>
</tr>
<tr>
<td><strong>date</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>Current date</td>
</tr>
<tr>
<td><strong>seq</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>Total number of sent updates</td>
<td><strong>users</strong></td>
<td style="text-align: center;"><a href="/type/Vector%20t">Vector</a>&lt;<a href="/type/User">User</a>&gt;</td>
<td>List of users</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/Updates">Updates</a></p></div>
<p><a href="/type/contacts.Blocked">contacts.Blocked</a></p></div>
</div>

View file

@ -2,12 +2,12 @@
<html class="">
<head>
<meta charset="utf-8">
<title>messages.messages</title>
<title>contacts.contacts</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Full list of messages with auxilary data.">
<meta property="og:title" content="messages.messages">
<meta property="description" content="The current user&#39;s contact list and info on users.">
<meta property="og:title" content="contacts.contacts">
<meta property="og:image" content="">
<meta property="og:description" content="Full list of messages with auxilary data.">
<meta property="og:description" content="The current user&#39;s contact list and info on users.">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
@ -36,10 +36,10 @@
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/messages.messages" >messages.messages</a></li></ul></div>
<h1 id="dev_page_title">messages.messages</h1>
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/contacts.contacts" >contacts.contacts</a></li></ul></div>
<h1 id="dev_page_title">contacts.contacts</h1>
<div id="dev_page_content"><p>Full list of messages with auxilary data.</p>
<div id="dev_page_content"><p>The current user's contact list and info on users.</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
@ -52,7 +52,7 @@
</li>
</ul>
</div>
<pre class="page_scheme"><code><a href="/constructor/messages.messages" class="current_page_link" >messages.messages</a>#8c718e87 messages:<a href="/type/Vector%20t" >Vector</a>&lt;<a href="/type/Message" >Message</a>&gt; chats:<a href="/type/Vector%20t" >Vector</a>&lt;<a href="/type/Chat" >Chat</a>&gt; users:<a href="/type/Vector%20t" >Vector</a>&lt;<a href="/type/User" >User</a>&gt; = <a href="/type/messages.Messages" >messages.Messages</a>;</code></pre></p>
<pre class="page_scheme"><code><a href="/constructor/contacts.contacts" class="current_page_link" >contacts.contacts</a>#eae87e42 contacts:<a href="/type/Vector%20t" >Vector</a>&lt;<a href="/type/Contact" >Contact</a>&gt; saved_count:<a href="/type/int" >int</a> users:<a href="/type/Vector%20t" >Vector</a>&lt;<a href="/type/User" >User</a>&gt; = <a href="/type/contacts.Contacts" >contacts.Contacts</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<table class="table">
<thead>
@ -64,24 +64,24 @@
</thead>
<tbody>
<tr>
<td><strong>messages</strong></td>
<td style="text-align: center;"><a href="/type/Vector%20t">Vector</a>&lt;<a href="/type/Message">Message</a>&gt;</td>
<td>List of messages</td>
<td><strong>contacts</strong></td>
<td style="text-align: center;"><a href="/type/Vector%20t">Vector</a>&lt;<a href="/type/Contact">Contact</a>&gt;</td>
<td>Contact list</td>
</tr>
<tr>
<td><strong>chats</strong></td>
<td style="text-align: center;"><a href="/type/Vector%20t">Vector</a>&lt;<a href="/type/Chat">Chat</a>&gt;</td>
<td>List of chats mentioned in dialogs</td>
<td><strong>saved_count</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>Number of contacts that were saved successfully</td>
</tr>
<tr>
<td><strong>users</strong></td>
<td style="text-align: center;"><a href="/type/Vector%20t">Vector</a>&lt;<a href="/type/User">User</a>&gt;</td>
<td>List of users mentioned in messages and chats</td>
<td>User list</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/messages.Messages">messages.Messages</a></p></div>
<p><a href="/type/contacts.Contacts">contacts.Contacts</a></p></div>
</div>

View file

@ -2,12 +2,12 @@
<html class="">
<head>
<meta charset="utf-8">
<title>updateUserName</title>
<title>contacts.importedContacts</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Changes the user&#39;s first name, last name and username.">
<meta property="og:title" content="updateUserName">
<meta property="description" content="Info on succesfully imported contacts.">
<meta property="og:title" content="contacts.importedContacts">
<meta property="og:image" content="">
<meta property="og:description" content="Changes the user&#39;s first name, last name and username.">
<meta property="og:description" content="Info on succesfully imported contacts.">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
@ -36,10 +36,10 @@
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/updateUserName" >updateUserName</a></li></ul></div>
<h1 id="dev_page_title">updateUserName</h1>
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/contacts.importedContacts" >contacts.importedContacts</a></li></ul></div>
<h1 id="dev_page_title">contacts.importedContacts</h1>
<div id="dev_page_content"><p>Changes the user's first name, last name and username.</p>
<div id="dev_page_content"><p>Info on succesfully imported contacts.</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
@ -52,7 +52,7 @@
</li>
</ul>
</div>
<pre class="page_scheme"><code><a href="/constructor/updateUserName" class="current_page_link" >updateUserName</a>#a7332b73 user_id:<a href="/type/int" >int</a> first_name:<a href="/type/string" >string</a> last_name:<a href="/type/string" >string</a> username:<a href="/type/string" >string</a> = <a href="/type/Update" >Update</a>;</code></pre></p>
<pre class="page_scheme"><code><a href="/constructor/contacts.importedContacts" class="current_page_link" >contacts.importedContacts</a>#77d01c3b imported:<a href="/type/Vector%20t" >Vector</a>&lt;<a href="/type/ImportedContact" >ImportedContact</a>&gt; popular_invites:<a href="/type/Vector%20t" >Vector</a>&lt;<a href="/type/PopularContact" >PopularContact</a>&gt; retry_contacts:<a href="/type/Vector%20t" >Vector</a>&lt;<a href="/type/long" >long</a>&gt; users:<a href="/type/Vector%20t" >Vector</a>&lt;<a href="/type/User" >User</a>&gt; = <a href="/type/contacts.ImportedContacts" >contacts.ImportedContacts</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<table class="table">
<thead>
@ -64,32 +64,30 @@
</thead>
<tbody>
<tr>
<td><strong>user_id</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>User identifier</td>
<td><strong>imported</strong></td>
<td style="text-align: center;"><a href="/type/Vector%20t">Vector</a>&lt;<a href="/type/ImportedContact">ImportedContact</a>&gt;</td>
<td>List of succesfully imported contacts</td>
</tr>
<tr>
<td><strong>first_name</strong></td>
<td style="text-align: center;"><a href="/type/string">string</a></td>
<td>New first name. Corresponds to the new value of <strong>real_first_name</strong> field of the <a href="/constructor/userFull">userFull</a> constructor.</td>
<td><strong>popular_invites</strong></td>
<td style="text-align: center;"><a href="/type/Vector%20t">Vector</a>&lt;<a href="/type/PopularContact">PopularContact</a>&gt;</td>
<td>Popular contacts</td>
</tr>
<tr>
<td><strong>last_name</strong></td>
<td style="text-align: center;"><a href="/type/string">string</a></td>
<td>New last name. Corresponds to the new value of <strong>real_last_name</strong> field of the <a href="/constructor/userFull">userFull</a> constructor.</td>
<td><strong>retry_contacts</strong></td>
<td style="text-align: center;"><a href="/type/Vector%20t">Vector</a>&lt;<a href="/type/long">long</a>&gt;</td>
<td>List of contact ids that could not be imported due to system limitation and will need to be imported at a later date.<br>Parameter added in <a href="/api/layers#layer-13">Layer 13</a></td>
</tr>
<tr>
<td><strong>username</strong></td>
<td style="text-align: center;"><a href="/type/string">string</a></td>
<td>New username.<br>Parameter added in <a href="/api/layers#layer-18">Layer 18</a>.</td>
<td><strong>users</strong></td>
<td style="text-align: center;"><a href="/type/Vector%20t">Vector</a>&lt;<a href="/type/User">User</a>&gt;</td>
<td>List of users</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/Update">Update</a></p>
<p><a href="/type/contacts.ImportedContacts">contacts.ImportedContacts</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#userfull" id="userfull" name="userfull"><i class="anchor-icon"></i></a><a href="/constructor/userFull">userFull</a></h4>
<p>Extended user info</p>
<h4><a class="anchor" href="#layers" id="layers" name="layers"><i class="anchor-icon"></i></a><a href="/api/layers">Layers</a></h4>
<p>Below you will find information on scheme changes. For more details on the use of layers, see <a href="/api/invoking#layers">Invoking API methods</a>.</p></div>

View file

@ -2,12 +2,12 @@
<html class="">
<head>
<meta charset="utf-8">
<title>messageService</title>
<title>dcOption</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Indicates a service message">
<meta property="og:title" content="messageService">
<meta property="description" content="Data centre">
<meta property="og:title" content="dcOption">
<meta property="og:image" content="">
<meta property="og:description" content="Indicates a service message">
<meta property="og:description" content="Data centre">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
@ -36,10 +36,10 @@
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/messageService" >messageService</a></li></ul></div>
<h1 id="dev_page_title">messageService</h1>
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/dcOption" >dcOption</a></li></ul></div>
<h1 id="dev_page_title">dcOption</h1>
<div id="dev_page_content"><p>Indicates a service message</p>
<div id="dev_page_content"><p>Data centre</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
@ -52,7 +52,7 @@
</li>
</ul>
</div>
<pre class="page_scheme"><code><a href="/constructor/messageService" class="current_page_link" >messageService</a>#286fa604 flags:<a href="/type/%23" >#</a> out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true post:flags.14?true legacy:flags.19?true id:<a href="/type/int" >int</a> from_id:flags.8?<a href="/type/Peer" >Peer</a> peer_id:<a href="/type/Peer" >Peer</a> reply_to:flags.3?<a href="/type/MessageReplyHeader" >MessageReplyHeader</a> date:<a href="/type/int" >int</a> action:<a href="/type/MessageAction" >MessageAction</a> = <a href="/type/Message" >Message</a>;</code></pre></p>
<pre class="page_scheme"><code><a href="/constructor/dcOption" class="current_page_link" >dcOption</a>#18b7a10d flags:<a href="/type/%23" >#</a> ipv6:flags.0?true media_only:flags.1?true tcpo_only:flags.2?true cdn:flags.3?true static:flags.4?true id:<a href="/type/int" >int</a> ip_address:<a href="/type/string" >string</a> port:<a href="/type/int" >int</a> secret:flags.10?<a href="/type/bytes" >bytes</a> = <a href="/type/DcOption" >DcOption</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<table class="table">
<thead>
@ -69,69 +69,59 @@
<td>Flags, see <a href="/mtproto/TL-combinators#conditional-fields">TL conditional fields</a></td>
</tr>
<tr>
<td><strong>out</strong></td>
<td><strong>ipv6</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.0?<a href="/constructor/true">true</a></td>
<td>Whether the specified IP is an IPv6 address</td>
</tr>
<tr>
<td><strong>media_only</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.1?<a href="/constructor/true">true</a></td>
<td>Whether the message is outgoing</td>
<td>Whether this DC should only be used to <a href="/api/files">download or upload files</a></td>
</tr>
<tr>
<td><strong>mentioned</strong></td>
<td><strong>tcpo_only</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.2?<a href="/constructor/true">true</a></td>
<td>Whether this DC only supports connection with <a href="/mtproto/mtproto-transports#transport-obfuscation">transport obfuscation</a></td>
</tr>
<tr>
<td><strong>cdn</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.3?<a href="/constructor/true">true</a></td>
<td>Whether this is a <a href="/cdn">CDN DC</a>.</td>
</tr>
<tr>
<td><strong>static</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.4?<a href="/constructor/true">true</a></td>
<td>Whether we were mentioned in the message</td>
</tr>
<tr>
<td><strong>media_unread</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.5?<a href="/constructor/true">true</a></td>
<td>Whether the message contains unread media</td>
</tr>
<tr>
<td><strong>silent</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.13?<a href="/constructor/true">true</a></td>
<td>Whether the message is silent</td>
</tr>
<tr>
<td><strong>post</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.14?<a href="/constructor/true">true</a></td>
<td>Whether it's a channel post</td>
</tr>
<tr>
<td><strong>legacy</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.19?<a href="/constructor/true">true</a></td>
<td>This is a legacy message: it has to be refetched with the new layer</td>
<td>If set, this IP should be used when connecting through a proxy</td>
</tr>
<tr>
<td><strong>id</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>Message ID</td>
<td>DC ID</td>
</tr>
<tr>
<td><strong>from_id</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.8?<a href="/type/Peer">Peer</a></td>
<td>ID of the sender of this message</td>
<td><strong>ip_address</strong></td>
<td style="text-align: center;"><a href="/type/string">string</a></td>
<td>IP address of DC</td>
</tr>
<tr>
<td><strong>peer_id</strong></td>
<td style="text-align: center;"><a href="/type/Peer">Peer</a></td>
<td>Sender of service message</td>
</tr>
<tr>
<td><strong>reply_to</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.3?<a href="/type/MessageReplyHeader">MessageReplyHeader</a></td>
<td>Reply (thread) information</td>
</tr>
<tr>
<td><strong>date</strong></td>
<td><strong>port</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>Message date</td>
<td>Port</td>
</tr>
<tr>
<td><strong>action</strong></td>
<td style="text-align: center;"><a href="/type/MessageAction">MessageAction</a></td>
<td>Event connected with the service message</td>
<td><strong>secret</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.10?<a href="/type/bytes">bytes</a></td>
<td>If the <code>tcpo_only</code> flag is set, specifies the secret to use when connecting using <a href="/mtproto/mtproto-transports#transport-obfuscation">transport obfuscation</a></td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/Message">Message</a></p></div>
<p><a href="/type/DcOption">DcOption</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#uploading-and-downloading-files" id="uploading-and-downloading-files" name="uploading-and-downloading-files"><i class="anchor-icon"></i></a><a href="/api/files">Uploading and Downloading Files</a></h4>
<p>How to transfer large data batches correctly.</p>
<h4><a class="anchor" href="#mtproto-transports" id="mtproto-transports" name="mtproto-transports"><i class="anchor-icon"></i></a><a href="/mtproto/mtproto-transports">MTProto transports</a></h4>
<h4><a class="anchor" href="#encrypted-cdns-for-speed-and-security" id="encrypted-cdns-for-speed-and-security" name="encrypted-cdns-for-speed-and-security"><i class="anchor-icon"></i></a><a href="/cdn">Encrypted CDNs for Speed and Security</a></h4></div>
</div>

View file

@ -0,0 +1,217 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>decryptedMessage</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Contents of an encrypted message.">
<meta property="og:title" content="decryptedMessage">
<meta property="og:image" content="">
<meta property="og:description" content="Contents of an encrypted message.">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class=""><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class="active"><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/decryptedMessage" >decryptedMessage</a></li></ul></div>
<h1 id="dev_page_title">decryptedMessage</h1>
<div id="dev_page_content"><p>Contents of an encrypted message.</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 121 <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="?layer=1">1 &ndash; Base layer</a></li><li><a href="?layer=2">2 &ndash; New userpic notifications</a></li><li><a href="?layer=3">3 &ndash; Send message can trigger link change</a></li><li><a href="?layer=4">4 &ndash; Check-in chats</a></li><li><a href="?layer=5">5 &ndash; Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 &ndash; Foursquare integration</a></li><li><a href="?layer=7">7 &ndash; Added wallPaperSolid</a></li><li><a href="?layer=8">8 &ndash; Added end-to-end encryption</a></li><li><a href="?layer=9">9 &ndash; Improved big files upload perfomance</a></li><li><a href="?layer=10">10 &ndash; Improved chat participants updates</a></li><li><a href="?layer=11">11 &ndash; Improved secret chats</a></li><li><a href="?layer=12">12 &ndash; New dynamic support</a></li><li><a href="?layer=13">13 &ndash; Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 &ndash; Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 &ndash; Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 &ndash; Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 &ndash; Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 &ndash; Added usernames</a></li><li><a href="?layer=23">23 &ndash; Stickers for secret chats</a></li><li><a href="?layer=105">105 &ndash; Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 &ndash; Login with QR code</a></li><li><a href="?layer=109">109 &ndash; Polls v2</a></li><li><a href="?layer=110">110 &ndash; People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 &ndash; Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 &ndash; Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 &ndash; PSA</a></li><li><a href="?layer=114">114 &ndash; Video thumbs for GIFs</a></li><li><a href="?layer=115">115 &ndash; Peek Channel Invite</a></li><li><a href="?layer=116">116 &ndash; Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 &ndash; WebRTC Phone Calls</a></li><li><a href="?layer=118">118 &ndash; Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 &ndash; Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 &ndash; Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121"><strong>121 &ndash; SVG-based Outlines for Stickers</strong></a></li>
<li class="divider"></li>
<li><a href="/api/layers">More...</a></li>
</ul>
</li>
</ul>
</div>
<pre class="page_scheme"><code>===8===
<a href="/constructor/decryptedMessage" class="current_page_link" >decryptedMessage</a>#1f814f1f random_id:<a href="/type/long" >long</a> random_bytes:<a href="/type/bytes" >bytes</a> message:<a href="/type/string" >string</a> media:<a href="/type/DecryptedMessageMedia" >DecryptedMessageMedia</a> = <a href="/type/DecryptedMessage" >DecryptedMessage</a>;
===17===
<a href="/constructor/decryptedMessage" class="current_page_link" >decryptedMessage</a>#204d3878 random_id:<a href="/type/long" >long</a> ttl:<a href="/type/int" >int</a> message:<a href="/type/string" >string</a> media:<a href="/type/DecryptedMessageMedia" >DecryptedMessageMedia</a> = <a href="/type/DecryptedMessage" >DecryptedMessage</a>;
===45===
<a href="/constructor/decryptedMessage" class="current_page_link" >decryptedMessage</a>#36b091de flags:<a href="/type/%23" >#</a> random_id:<a href="/type/long" >long</a> ttl:<a href="/type/int" >int</a> message:<a href="/type/string" >string</a> media:flags.9?<a href="/type/DecryptedMessageMedia" >DecryptedMessageMedia</a> entities:flags.7?<a href="/type/Vector%20t" >Vector</a>&lt;<a href="/type/MessageEntity" >MessageEntity</a>&gt; via_bot_name:flags.11?<a href="/type/string" >string</a> reply_to_random_id:flags.3?<a href="/type/long" >long</a> = <a href="/type/DecryptedMessage" >DecryptedMessage</a>;
===73===
<a href="/constructor/decryptedMessage" class="current_page_link" >decryptedMessage</a>#91cc4674 flags:<a href="/type/%23" >#</a> no_webpage:flags.1?true silent:flags.5?true random_id:<a href="/type/long" >long</a> ttl:<a href="/type/int" >int</a> message:<a href="/type/string" >string</a> media:flags.9?<a href="/type/DecryptedMessageMedia" >DecryptedMessageMedia</a> entities:flags.7?<a href="/type/Vector%20t" >Vector</a>&lt;<a href="/type/MessageEntity" >MessageEntity</a>&gt; via_bot_name:flags.11?<a href="/type/string" >string</a> reply_to_random_id:flags.3?<a href="/type/long" >long</a> grouped_id:flags.17?<a href="/type/long" >long</a> = <a href="/type/DecryptedMessage" >DecryptedMessage</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<table class="table">
<thead>
<tr>
<th>Name</th>
<th style="text-align: center;">Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>flags</strong></td>
<td style="text-align: center;"><a href="/type/%23">#</a></td>
<td>Flags, see <a href="/mtproto/TL-combinators#conditional-fields">TL conditional fields</a> (added in layer 45)</td>
</tr>
<tr>
<td><strong>no_webpage</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.1?<a href="/constructor/true">true</a></td>
<td>Whether the webpage preview is disabled</td>
</tr>
<tr>
<td><strong>silent</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.5?<a href="/constructor/true">true</a></td>
<td>Whether this is a silent message (no notification triggered)</td>
</tr>
<tr>
<td><strong>random_id</strong></td>
<td style="text-align: center;"><a href="/type/long">long</a></td>
<td>Random message ID, assigned by the author of message.<br>Must be equal to the ID passed to sending method.</td>
</tr>
<tr>
<td><strong>ttl</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>Message lifetime. Has higher priority than <a href="/constructor/decryptedMessageActionSetMessageTTL">decryptedMessageActionSetMessageTTL</a>.<br>Parameter added in <a href="/api/layers#layer-17">Layer 17</a>.</td>
</tr>
<tr>
<td><strong>message</strong></td>
<td style="text-align: center;"><a href="/type/string">string</a></td>
<td>Message text</td>
</tr>
<tr>
<td><strong>media</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.9?<a href="/type/DecryptedMessageMedia">DecryptedMessageMedia</a></td>
<td>Media content</td>
</tr>
<tr>
<td><strong>entities</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.7?<a href="/type/Vector%20t">Vector</a>&lt;<a href="/type/MessageEntity">MessageEntity</a>&gt;</td>
<td>Message <a href="/api/entities">entities</a> for styled text (parameter added in layer 45)</td>
</tr>
<tr>
<td><strong>via_bot_name</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.11?<a href="/type/string">string</a></td>
<td>Specifies the ID of the inline bot that generated the message (parameter added in layer 45)</td>
</tr>
<tr>
<td><strong>reply_to_random_id</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.3?<a href="/type/long">long</a></td>
<td>Random message ID of the message this message replies to (parameter added in layer 45)</td>
</tr>
<tr>
<td><strong>grouped_id</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.17?<a href="/type/long">long</a></td>
<td>Random group ID, assigned by the author of message.<br>Multiple encrypted messages with a photo attached and with the same group ID indicate an <a href="/api/files#albums-grouped-media">album or grouped media</a> (parameter added in layer 45)</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/DecryptedMessage">DecryptedMessage</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#decryptedmessageactionsetmessagettl" id="decryptedmessageactionsetmessagettl" name="decryptedmessageactionsetmessagettl"><i class="anchor-icon"></i></a><a href="/constructor/decryptedMessageActionSetMessageTTL">decryptedMessageActionSetMessageTTL</a></h4>
<p>Setting of a message lifetime after reading.</p>
<p>Upon receiving such message the client shall start deleting of all messages of an encrypted chat <strong>ttl_seconds</strong> seconds after the messages were read by user.</p>
<h4><a class="anchor" href="#layers" id="layers" name="layers"><i class="anchor-icon"></i></a><a href="/api/layers">Layers</a></h4>
<p>Below you will find information on scheme changes. For more details on the use of layers, see <a href="/api/invoking#layers">Invoking API methods</a>.</p>
<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="#uploading-and-downloading-files" id="uploading-and-downloading-files" name="uploading-and-downloading-files"><i class="anchor-icon"></i></a><a href="/api/files">Uploading and Downloading Files</a></h4>
<p>How to transfer large data batches correctly.</p></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script>backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>

View file

@ -0,0 +1,155 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>decryptedMessageActionRequestKey</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Request rekeying, see rekeying process">
<meta property="og:title" content="decryptedMessageActionRequestKey">
<meta property="og:image" content="">
<meta property="og:description" content="Request rekeying, see rekeying process">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class=""><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class="active"><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/decryptedMessageActionRequestKey" >decryptedMessageActionRequestKey</a></li></ul></div>
<h1 id="dev_page_title">decryptedMessageActionRequestKey</h1>
<div id="dev_page_content"><p>Request rekeying, see <a href="/api/end-to-end/pfs">rekeying process</a></p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 121 <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="?layer=1">1 &ndash; Base layer</a></li><li><a href="?layer=2">2 &ndash; New userpic notifications</a></li><li><a href="?layer=3">3 &ndash; Send message can trigger link change</a></li><li><a href="?layer=4">4 &ndash; Check-in chats</a></li><li><a href="?layer=5">5 &ndash; Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 &ndash; Foursquare integration</a></li><li><a href="?layer=7">7 &ndash; Added wallPaperSolid</a></li><li><a href="?layer=8">8 &ndash; Added end-to-end encryption</a></li><li><a href="?layer=9">9 &ndash; Improved big files upload perfomance</a></li><li><a href="?layer=10">10 &ndash; Improved chat participants updates</a></li><li><a href="?layer=11">11 &ndash; Improved secret chats</a></li><li><a href="?layer=12">12 &ndash; New dynamic support</a></li><li><a href="?layer=13">13 &ndash; Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 &ndash; Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 &ndash; Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 &ndash; Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 &ndash; Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 &ndash; Added usernames</a></li><li><a href="?layer=23">23 &ndash; Stickers for secret chats</a></li><li><a href="?layer=105">105 &ndash; Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 &ndash; Login with QR code</a></li><li><a href="?layer=109">109 &ndash; Polls v2</a></li><li><a href="?layer=110">110 &ndash; People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 &ndash; Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 &ndash; Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 &ndash; PSA</a></li><li><a href="?layer=114">114 &ndash; Video thumbs for GIFs</a></li><li><a href="?layer=115">115 &ndash; Peek Channel Invite</a></li><li><a href="?layer=116">116 &ndash; Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 &ndash; WebRTC Phone Calls</a></li><li><a href="?layer=118">118 &ndash; Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 &ndash; Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 &ndash; Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121"><strong>121 &ndash; SVG-based Outlines for Stickers</strong></a></li>
<li class="divider"></li>
<li><a href="/api/layers">More...</a></li>
</ul>
</li>
</ul>
</div>
<pre class="page_scheme"><code>===20===
<a href="/constructor/decryptedMessageActionRequestKey" class="current_page_link" >decryptedMessageActionRequestKey</a>#f3c9611b exchange_id:<a href="/type/long" >long</a> g_a:<a href="/type/bytes" >bytes</a> = <a href="/type/DecryptedMessageAction" >DecryptedMessageAction</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<table class="table">
<thead>
<tr>
<th>Name</th>
<th style="text-align: center;">Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>exchange_id</strong></td>
<td style="text-align: center;"><a href="/type/long">long</a></td>
<td>Exchange ID</td>
</tr>
<tr>
<td><strong>g_a</strong></td>
<td style="text-align: center;"><a href="/type/bytes">bytes</a></td>
<td>g_a, see <a href="/api/end-to-end/pfs">rekeying process</a></td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/DecryptedMessageAction">DecryptedMessageAction</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#perfect-forward-secrecy" id="perfect-forward-secrecy" name="perfect-forward-secrecy"><i class="anchor-icon"></i></a><a href="/api/end-to-end/pfs">Perfect Forward Secrecy</a></h4></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script>backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>

View file

@ -2,12 +2,12 @@
<html class="">
<head>
<meta charset="utf-8">
<title>decryptedMessageActionReadMessages</title>
<title>decryptedMessageActionSetMessageTTL</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Messages marked as read.">
<meta property="og:title" content="decryptedMessageActionReadMessages">
<meta property="description" content="Setting of a message lifetime after reading.">
<meta property="og:title" content="decryptedMessageActionSetMessageTTL">
<meta property="og:image" content="">
<meta property="og:description" content="Messages marked as read.">
<meta property="og:description" content="Setting of a message lifetime after reading.">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
@ -36,10 +36,11 @@
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/decryptedMessageActionReadMessages" >decryptedMessageActionReadMessages</a></li></ul></div>
<h1 id="dev_page_title">decryptedMessageActionReadMessages</h1>
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/decryptedMessageActionSetMessageTTL" >decryptedMessageActionSetMessageTTL</a></li></ul></div>
<h1 id="dev_page_title">decryptedMessageActionSetMessageTTL</h1>
<div id="dev_page_content"><p>Messages marked as read.</p>
<div id="dev_page_content"><p>Setting of a message lifetime after reading.</p>
<p>Upon receiving such message the client shall start deleting of all messages of an encrypted chat <strong>ttl_seconds</strong> seconds after the messages were read by user.</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
@ -53,7 +54,7 @@
</ul>
</div>
<pre class="page_scheme"><code>===8===
<a href="/constructor/decryptedMessageActionReadMessages" class="current_page_link" >decryptedMessageActionReadMessages</a>#c4f40be random_ids:<a href="/type/Vector%20t" >Vector</a>&lt;<a href="/type/long" >long</a>&gt; = <a href="/type/DecryptedMessageAction" >DecryptedMessageAction</a>;</code></pre></p>
<a href="/constructor/decryptedMessageActionSetMessageTTL" class="current_page_link" >decryptedMessageActionSetMessageTTL</a>#a1733aec ttl_seconds:<a href="/type/int" >int</a> = <a href="/type/DecryptedMessageAction" >DecryptedMessageAction</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<table class="table">
<thead>
@ -65,9 +66,9 @@
</thead>
<tbody>
<tr>
<td><strong>random_ids</strong></td>
<td style="text-align: center;"><a href="/type/Vector%20t">Vector</a>&lt;<a href="/type/long">long</a>&gt;</td>
<td>List of message IDs</td>
<td><strong>ttl_seconds</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>Lifetime in seconds</td>
</tr>
</tbody>
</table>

View file

@ -1,148 +0,0 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>decryptedMessageActionTyping</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="User is preparing a message: typing, recording, uploading, etc.">
<meta property="og:title" content="decryptedMessageActionTyping">
<meta property="og:image" content="">
<meta property="og:description" content="User is preparing a message: typing, recording, uploading, etc.">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class=""><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class="active"><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/decryptedMessageActionTyping" >decryptedMessageActionTyping</a></li></ul></div>
<h1 id="dev_page_title">decryptedMessageActionTyping</h1>
<div id="dev_page_content"><p>User is preparing a message: typing, recording, uploading, etc.</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 121 <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="?layer=1">1 &ndash; Base layer</a></li><li><a href="?layer=2">2 &ndash; New userpic notifications</a></li><li><a href="?layer=3">3 &ndash; Send message can trigger link change</a></li><li><a href="?layer=4">4 &ndash; Check-in chats</a></li><li><a href="?layer=5">5 &ndash; Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 &ndash; Foursquare integration</a></li><li><a href="?layer=7">7 &ndash; Added wallPaperSolid</a></li><li><a href="?layer=8">8 &ndash; Added end-to-end encryption</a></li><li><a href="?layer=9">9 &ndash; Improved big files upload perfomance</a></li><li><a href="?layer=10">10 &ndash; Improved chat participants updates</a></li><li><a href="?layer=11">11 &ndash; Improved secret chats</a></li><li><a href="?layer=12">12 &ndash; New dynamic support</a></li><li><a href="?layer=13">13 &ndash; Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 &ndash; Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 &ndash; Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 &ndash; Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 &ndash; Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 &ndash; Added usernames</a></li><li><a href="?layer=23">23 &ndash; Stickers for secret chats</a></li><li><a href="?layer=105">105 &ndash; Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 &ndash; Login with QR code</a></li><li><a href="?layer=109">109 &ndash; Polls v2</a></li><li><a href="?layer=110">110 &ndash; People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 &ndash; Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 &ndash; Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 &ndash; PSA</a></li><li><a href="?layer=114">114 &ndash; Video thumbs for GIFs</a></li><li><a href="?layer=115">115 &ndash; Peek Channel Invite</a></li><li><a href="?layer=116">116 &ndash; Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 &ndash; WebRTC Phone Calls</a></li><li><a href="?layer=118">118 &ndash; Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 &ndash; Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 &ndash; Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121"><strong>121 &ndash; SVG-based Outlines for Stickers</strong></a></li>
<li class="divider"></li>
<li><a href="/api/layers">More...</a></li>
</ul>
</li>
</ul>
</div>
<pre class="page_scheme"><code>===17===
<a href="/constructor/decryptedMessageActionTyping" class="current_page_link" >decryptedMessageActionTyping</a>#ccb27641 action:<a href="/type/SendMessageAction" >SendMessageAction</a> = <a href="/type/DecryptedMessageAction" >DecryptedMessageAction</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<table class="table">
<thead>
<tr>
<th>Name</th>
<th style="text-align: center;">Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>action</strong></td>
<td style="text-align: center;"><a href="/type/SendMessageAction">SendMessageAction</a></td>
<td>Type of action</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/DecryptedMessageAction">DecryptedMessageAction</a></p></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script>backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>

View file

@ -1,173 +0,0 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>decryptedMessageLayer</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Sets the layer number for the contents of an encrypted message.">
<meta property="og:title" content="decryptedMessageLayer">
<meta property="og:image" content="">
<meta property="og:description" content="Sets the layer number for the contents of an encrypted message.">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class=""><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class="active"><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/decryptedMessageLayer" >decryptedMessageLayer</a></li></ul></div>
<h1 id="dev_page_title">decryptedMessageLayer</h1>
<div id="dev_page_content"><p>Sets the layer number for the contents of an encrypted message.</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 121 <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="?layer=1">1 &ndash; Base layer</a></li><li><a href="?layer=2">2 &ndash; New userpic notifications</a></li><li><a href="?layer=3">3 &ndash; Send message can trigger link change</a></li><li><a href="?layer=4">4 &ndash; Check-in chats</a></li><li><a href="?layer=5">5 &ndash; Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 &ndash; Foursquare integration</a></li><li><a href="?layer=7">7 &ndash; Added wallPaperSolid</a></li><li><a href="?layer=8">8 &ndash; Added end-to-end encryption</a></li><li><a href="?layer=9">9 &ndash; Improved big files upload perfomance</a></li><li><a href="?layer=10">10 &ndash; Improved chat participants updates</a></li><li><a href="?layer=11">11 &ndash; Improved secret chats</a></li><li><a href="?layer=12">12 &ndash; New dynamic support</a></li><li><a href="?layer=13">13 &ndash; Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 &ndash; Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 &ndash; Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 &ndash; Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 &ndash; Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 &ndash; Added usernames</a></li><li><a href="?layer=23">23 &ndash; Stickers for secret chats</a></li><li><a href="?layer=105">105 &ndash; Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 &ndash; Login with QR code</a></li><li><a href="?layer=109">109 &ndash; Polls v2</a></li><li><a href="?layer=110">110 &ndash; People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 &ndash; Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 &ndash; Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 &ndash; PSA</a></li><li><a href="?layer=114">114 &ndash; Video thumbs for GIFs</a></li><li><a href="?layer=115">115 &ndash; Peek Channel Invite</a></li><li><a href="?layer=116">116 &ndash; Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 &ndash; WebRTC Phone Calls</a></li><li><a href="?layer=118">118 &ndash; Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 &ndash; Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 &ndash; Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121"><strong>121 &ndash; SVG-based Outlines for Stickers</strong></a></li>
<li class="divider"></li>
<li><a href="/api/layers">More...</a></li>
</ul>
</li>
</ul>
</div>
<pre class="page_scheme"><code>===17===
<a href="/constructor/decryptedMessageLayer" class="current_page_link" >decryptedMessageLayer</a>#1be31789 random_bytes:<a href="/type/bytes" >bytes</a> layer:<a href="/type/int" >int</a> in_seq_no:<a href="/type/int" >int</a> out_seq_no:<a href="/type/int" >int</a> message:<a href="/type/DecryptedMessage" >DecryptedMessage</a> = <a href="/type/DecryptedMessageLayer" >DecryptedMessageLayer</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<table class="table">
<thead>
<tr>
<th>Name</th>
<th style="text-align: center;">Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>random_bytes</strong></td>
<td style="text-align: center;"><a href="/type/bytes">bytes</a></td>
<td>Set of random bytes to prevent content recognition in short encrypted messages.<br>Clients are required to check that there are at least 15 random bytes included in each message. Messages with less than 15 random bytes must be ignored.<br>Parameter moved here from <a href="/constructor/decryptedMessage">decryptedMessage</a> in <a href="/api/layers#layer-17">Layer 17</a>.</td>
</tr>
<tr>
<td><strong>layer</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>Layer number. Mimimal value - <strong>17</strong> (the layer in which the constructor was added).</td>
</tr>
<tr>
<td><strong>in_seq_no</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>2x the number of messages in the sender's inbox (including deleted and service messages), incremented by 1 if current user was not the chat creator<br>Parameter added in <a href="/api/layers#layer-17">Layer 17</a>.</td>
</tr>
<tr>
<td><strong>out_seq_no</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>2x the number of messages in the recipient's inbox (including deleted and service messages), incremented by 1 if current user was the chat creator<br>Parameter added in <a href="/api/layers#layer-17">Layer 17</a>.</td>
</tr>
<tr>
<td><strong>message</strong></td>
<td style="text-align: center;"><a href="/type/DecryptedMessage">DecryptedMessage</a></td>
<td>The content of message itself</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/DecryptedMessageLayer">DecryptedMessageLayer</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#decryptedmessage" id="decryptedmessage" name="decryptedmessage"><i class="anchor-icon"></i></a><a href="/constructor/decryptedMessage">decryptedMessage</a></h4>
<p>Contents of an encrypted message.</p>
<h4><a class="anchor" href="#layers" id="layers" name="layers"><i class="anchor-icon"></i></a><a href="/api/layers">Layers</a></h4>
<p>Below you will find information on scheme changes. For more details on the use of layers, see <a href="/api/invoking#layers">Invoking API methods</a>.</p></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script>backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>

View file

@ -2,12 +2,12 @@
<html class="">
<head>
<meta charset="utf-8">
<title>updates.state</title>
<title>decryptedMessageMediaAudio</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Updates state.">
<meta property="og:title" content="updates.state">
<meta property="description" content="Audio file attached to a secret chat message.">
<meta property="og:title" content="decryptedMessageMediaAudio">
<meta property="og:image" content="">
<meta property="og:description" content="Updates state.">
<meta property="og:description" content="Audio file attached to a secret chat message.">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
@ -36,10 +36,10 @@
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/updates.state" >updates.state</a></li></ul></div>
<h1 id="dev_page_title">updates.state</h1>
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/decryptedMessageMediaAudio" >decryptedMessageMediaAudio</a></li></ul></div>
<h1 id="dev_page_title">decryptedMessageMediaAudio</h1>
<div id="dev_page_content"><p>Updates state.</p>
<div id="dev_page_content"><p>Audio file attached to a secret chat message.</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
@ -52,7 +52,11 @@
</li>
</ul>
</div>
<pre class="page_scheme"><code><a href="/constructor/updates.state" class="current_page_link" >updates.state</a>#a56c2a3e pts:<a href="/type/int" >int</a> qts:<a href="/type/int" >int</a> date:<a href="/type/int" >int</a> seq:<a href="/type/int" >int</a> unread_count:<a href="/type/int" >int</a> = <a href="/type/updates.State" >updates.State</a>;</code></pre></p>
<pre class="page_scheme"><code>===8===
<a href="/constructor/decryptedMessageMediaAudio" class="current_page_link" >decryptedMessageMediaAudio</a>#6080758f duration:<a href="/type/int" >int</a> size:<a href="/type/int" >int</a> key:<a href="/type/bytes" >bytes</a> iv:<a href="/type/bytes" >bytes</a> = <a href="/type/DecryptedMessageMedia" >DecryptedMessageMedia</a>;
===17===
<a href="/constructor/decryptedMessageMediaAudio" class="current_page_link" >decryptedMessageMediaAudio</a>#57e0a9cb duration:<a href="/type/int" >int</a> mime_type:<a href="/type/string" >string</a> size:<a href="/type/int" >int</a> key:<a href="/type/bytes" >bytes</a> iv:<a href="/type/bytes" >bytes</a> = <a href="/type/DecryptedMessageMedia" >DecryptedMessageMedia</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<table class="table">
<thead>
@ -64,37 +68,35 @@
</thead>
<tbody>
<tr>
<td><strong>pts</strong></td>
<td><strong>duration</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>Number of events occured in a text box</td>
<td>Audio duration in seconds</td>
</tr>
<tr>
<td><strong>qts</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>Position in a sequence of updates in secret chats. For further detailes refer to article <a href="/api/end-to-end">secret chats</a><br>Parameter was added in <a href="/api/layers#layer-8">eigth layer</a>.</td>
<td><strong>mime_type</strong></td>
<td style="text-align: center;"><a href="/type/string">string</a></td>
<td>MIME-type of the audio file<br>Parameter added in <a href="/api/layers#layer-13">Layer 13</a>.</td>
</tr>
<tr>
<td><strong>date</strong></td>
<td><strong>size</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>Date of condition</td>
<td>File size</td>
</tr>
<tr>
<td><strong>seq</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>Number of sent updates</td>
<td><strong>key</strong></td>
<td style="text-align: center;"><a href="/type/bytes">bytes</a></td>
<td>Key to decrypt the attached media file</td>
</tr>
<tr>
<td><strong>unread_count</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>Number of unread messages</td>
<td><strong>iv</strong></td>
<td style="text-align: center;"><a href="/type/bytes">bytes</a></td>
<td>Initialization vector</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/updates.State">updates.State</a></p>
<p><a href="/type/DecryptedMessageMedia">DecryptedMessageMedia</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#end-to-end-encryption-secret-chats" id="end-to-end-encryption-secret-chats" name="end-to-end-encryption-secret-chats"><i class="anchor-icon"></i></a><a href="/api/end-to-end">End-to-End Encryption, Secret Chats</a></h4>
<p>New feature for end-to-end-encrypted messaging.</p>
<h4><a class="anchor" href="#layers" id="layers" name="layers"><i class="anchor-icon"></i></a><a href="/api/layers">Layers</a></h4>
<p>Below you will find information on scheme changes. For more details on the use of layers, see <a href="/api/invoking#layers">Invoking API methods</a>.</p></div>

View file

@ -0,0 +1,163 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>decryptedMessageMediaContact</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Contact attached to an encrypted message.">
<meta property="og:title" content="decryptedMessageMediaContact">
<meta property="og:image" content="">
<meta property="og:description" content="Contact attached to an encrypted message.">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class=""><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class="active"><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/decryptedMessageMediaContact" >decryptedMessageMediaContact</a></li></ul></div>
<h1 id="dev_page_title">decryptedMessageMediaContact</h1>
<div id="dev_page_content"><p>Contact attached to an encrypted message.</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 121 <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="?layer=1">1 &ndash; Base layer</a></li><li><a href="?layer=2">2 &ndash; New userpic notifications</a></li><li><a href="?layer=3">3 &ndash; Send message can trigger link change</a></li><li><a href="?layer=4">4 &ndash; Check-in chats</a></li><li><a href="?layer=5">5 &ndash; Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 &ndash; Foursquare integration</a></li><li><a href="?layer=7">7 &ndash; Added wallPaperSolid</a></li><li><a href="?layer=8">8 &ndash; Added end-to-end encryption</a></li><li><a href="?layer=9">9 &ndash; Improved big files upload perfomance</a></li><li><a href="?layer=10">10 &ndash; Improved chat participants updates</a></li><li><a href="?layer=11">11 &ndash; Improved secret chats</a></li><li><a href="?layer=12">12 &ndash; New dynamic support</a></li><li><a href="?layer=13">13 &ndash; Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 &ndash; Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 &ndash; Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 &ndash; Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 &ndash; Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 &ndash; Added usernames</a></li><li><a href="?layer=23">23 &ndash; Stickers for secret chats</a></li><li><a href="?layer=105">105 &ndash; Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 &ndash; Login with QR code</a></li><li><a href="?layer=109">109 &ndash; Polls v2</a></li><li><a href="?layer=110">110 &ndash; People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 &ndash; Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 &ndash; Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 &ndash; PSA</a></li><li><a href="?layer=114">114 &ndash; Video thumbs for GIFs</a></li><li><a href="?layer=115">115 &ndash; Peek Channel Invite</a></li><li><a href="?layer=116">116 &ndash; Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 &ndash; WebRTC Phone Calls</a></li><li><a href="?layer=118">118 &ndash; Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 &ndash; Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 &ndash; Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121"><strong>121 &ndash; SVG-based Outlines for Stickers</strong></a></li>
<li class="divider"></li>
<li><a href="/api/layers">More...</a></li>
</ul>
</li>
</ul>
</div>
<pre class="page_scheme"><code>===8===
<a href="/constructor/decryptedMessageMediaContact" class="current_page_link" >decryptedMessageMediaContact</a>#588a0a97 phone_number:<a href="/type/string" >string</a> first_name:<a href="/type/string" >string</a> last_name:<a href="/type/string" >string</a> user_id:<a href="/type/int" >int</a> = <a href="/type/DecryptedMessageMedia" >DecryptedMessageMedia</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<table class="table">
<thead>
<tr>
<th>Name</th>
<th style="text-align: center;">Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>phone_number</strong></td>
<td style="text-align: center;"><a href="/type/string">string</a></td>
<td>Phone number</td>
</tr>
<tr>
<td><strong>first_name</strong></td>
<td style="text-align: center;"><a href="/type/string">string</a></td>
<td>Contact's first name</td>
</tr>
<tr>
<td><strong>last_name</strong></td>
<td style="text-align: center;"><a href="/type/string">string</a></td>
<td>Contact's last name</td>
</tr>
<tr>
<td><strong>user_id</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>Telegram User ID of signed-up contact</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/DecryptedMessageMedia">DecryptedMessageMedia</a></p></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script>backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>

View file

@ -0,0 +1,191 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>decryptedMessageMediaDocument</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Document attached to a message in a secret chat.">
<meta property="og:title" content="decryptedMessageMediaDocument">
<meta property="og:image" content="">
<meta property="og:description" content="Document attached to a message in a secret chat.">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class=""><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class="active"><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/decryptedMessageMediaDocument" >decryptedMessageMediaDocument</a></li></ul></div>
<h1 id="dev_page_title">decryptedMessageMediaDocument</h1>
<div id="dev_page_content"><p>Document attached to a message in a secret chat.</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 121 <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="?layer=1">1 &ndash; Base layer</a></li><li><a href="?layer=2">2 &ndash; New userpic notifications</a></li><li><a href="?layer=3">3 &ndash; Send message can trigger link change</a></li><li><a href="?layer=4">4 &ndash; Check-in chats</a></li><li><a href="?layer=5">5 &ndash; Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 &ndash; Foursquare integration</a></li><li><a href="?layer=7">7 &ndash; Added wallPaperSolid</a></li><li><a href="?layer=8">8 &ndash; Added end-to-end encryption</a></li><li><a href="?layer=9">9 &ndash; Improved big files upload perfomance</a></li><li><a href="?layer=10">10 &ndash; Improved chat participants updates</a></li><li><a href="?layer=11">11 &ndash; Improved secret chats</a></li><li><a href="?layer=12">12 &ndash; New dynamic support</a></li><li><a href="?layer=13">13 &ndash; Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 &ndash; Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 &ndash; Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 &ndash; Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 &ndash; Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 &ndash; Added usernames</a></li><li><a href="?layer=23">23 &ndash; Stickers for secret chats</a></li><li><a href="?layer=105">105 &ndash; Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 &ndash; Login with QR code</a></li><li><a href="?layer=109">109 &ndash; Polls v2</a></li><li><a href="?layer=110">110 &ndash; People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 &ndash; Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 &ndash; Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 &ndash; PSA</a></li><li><a href="?layer=114">114 &ndash; Video thumbs for GIFs</a></li><li><a href="?layer=115">115 &ndash; Peek Channel Invite</a></li><li><a href="?layer=116">116 &ndash; Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 &ndash; WebRTC Phone Calls</a></li><li><a href="?layer=118">118 &ndash; Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 &ndash; Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 &ndash; Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121"><strong>121 &ndash; SVG-based Outlines for Stickers</strong></a></li>
<li class="divider"></li>
<li><a href="/api/layers">More...</a></li>
</ul>
</li>
</ul>
</div>
<pre class="page_scheme"><code>===8===
<a href="/constructor/decryptedMessageMediaDocument" class="current_page_link" >decryptedMessageMediaDocument</a>#b095434b thumb:<a href="/type/bytes" >bytes</a> thumb_w:<a href="/type/int" >int</a> thumb_h:<a href="/type/int" >int</a> file_name:<a href="/type/string" >string</a> mime_type:<a href="/type/string" >string</a> size:<a href="/type/int" >int</a> key:<a href="/type/bytes" >bytes</a> iv:<a href="/type/bytes" >bytes</a> = <a href="/type/DecryptedMessageMedia" >DecryptedMessageMedia</a>;
===45===
<a href="/constructor/decryptedMessageMediaDocument" class="current_page_link" >decryptedMessageMediaDocument</a>#7afe8ae2 thumb:<a href="/type/bytes" >bytes</a> thumb_w:<a href="/type/int" >int</a> thumb_h:<a href="/type/int" >int</a> mime_type:<a href="/type/string" >string</a> size:<a href="/type/int" >int</a> key:<a href="/type/bytes" >bytes</a> iv:<a href="/type/bytes" >bytes</a> attributes:<a href="/type/Vector%20t" >Vector</a>&lt;<a href="/type/DocumentAttribute" >DocumentAttribute</a>&gt; caption:<a href="/type/string" >string</a> = <a href="/type/DecryptedMessageMedia" >DecryptedMessageMedia</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<table class="table">
<thead>
<tr>
<th>Name</th>
<th style="text-align: center;">Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>thumb</strong></td>
<td style="text-align: center;"><a href="/type/bytes">bytes</a></td>
<td>Thumbnail-file contents (JPEG-file, quality 55, set in a 90x90 square)</td>
</tr>
<tr>
<td><strong>thumb_w</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>Thumbnail width</td>
</tr>
<tr>
<td><strong>thumb_h</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>Thumbnail height</td>
</tr>
<tr>
<td><strong>mime_type</strong></td>
<td style="text-align: center;"><a href="/type/string">string</a></td>
<td>File MIME-type</td>
</tr>
<tr>
<td><strong>size</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>Document size</td>
</tr>
<tr>
<td><strong>key</strong></td>
<td style="text-align: center;"><a href="/type/bytes">bytes</a></td>
<td>Key to decrypt the attached document file</td>
</tr>
<tr>
<td><strong>iv</strong></td>
<td style="text-align: center;"><a href="/type/bytes">bytes</a></td>
<td>Initialization</td>
</tr>
<tr>
<td><strong>attributes</strong></td>
<td style="text-align: center;"><a href="/type/Vector%20t">Vector</a>&lt;<a href="/type/DocumentAttribute">DocumentAttribute</a>&gt;</td>
<td>Document attributes for media types</td>
</tr>
<tr>
<td><strong>caption</strong></td>
<td style="text-align: center;"><a href="/type/string">string</a></td>
<td>Caption</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/DecryptedMessageMedia">DecryptedMessageMedia</a></p></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script>backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>

View file

@ -2,12 +2,12 @@
<html class="">
<head>
<meta charset="utf-8">
<title>secureFile</title>
<title>decryptedMessageMediaExternalDocument</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Secure passport file, for more info see the passport docs »">
<meta property="og:title" content="secureFile">
<meta property="description" content="Non-e2e documented forwarded from non-secret chat">
<meta property="og:title" content="decryptedMessageMediaExternalDocument">
<meta property="og:image" content="">
<meta property="og:description" content="Secure passport file, for more info see the passport docs »">
<meta property="og:description" content="Non-e2e documented forwarded from non-secret chat">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
@ -36,10 +36,10 @@
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/secureFile" >secureFile</a></li></ul></div>
<h1 id="dev_page_title">secureFile</h1>
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/decryptedMessageMediaExternalDocument" >decryptedMessageMediaExternalDocument</a></li></ul></div>
<h1 id="dev_page_title">decryptedMessageMediaExternalDocument</h1>
<div id="dev_page_content"><p>Secure <a href="/passport">passport</a> file, for more info <a href="/passport/encryption#inputsecurefile">see the passport docs »</a></p>
<div id="dev_page_content"><p>Non-e2e documented forwarded from non-secret chat</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
@ -52,7 +52,8 @@
</li>
</ul>
</div>
<pre class="page_scheme"><code><a href="/constructor/secureFile" class="current_page_link" >secureFile</a>#e0277a62 id:<a href="/type/long" >long</a> access_hash:<a href="/type/long" >long</a> size:<a href="/type/int" >int</a> dc_id:<a href="/type/int" >int</a> date:<a href="/type/int" >int</a> file_hash:<a href="/type/bytes" >bytes</a> secret:<a href="/type/bytes" >bytes</a> = <a href="/type/SecureFile" >SecureFile</a>;</code></pre></p>
<pre class="page_scheme"><code>===23===
<a href="/constructor/decryptedMessageMediaExternalDocument" class="current_page_link" >decryptedMessageMediaExternalDocument</a>#fa95b0dd id:<a href="/type/long" >long</a> access_hash:<a href="/type/long" >long</a> date:<a href="/type/int" >int</a> mime_type:<a href="/type/string" >string</a> size:<a href="/type/int" >int</a> thumb:<a href="/type/PhotoSize" >PhotoSize</a> dc_id:<a href="/type/int" >int</a> attributes:<a href="/type/Vector%20t" >Vector</a>&lt;<a href="/type/DocumentAttribute" >DocumentAttribute</a>&gt; = <a href="/type/DecryptedMessageMedia" >DecryptedMessageMedia</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<table class="table">
<thead>
@ -66,17 +67,32 @@
<tr>
<td><strong>id</strong></td>
<td style="text-align: center;"><a href="/type/long">long</a></td>
<td>ID</td>
<td>Document ID</td>
</tr>
<tr>
<td><strong>access_hash</strong></td>
<td style="text-align: center;"><a href="/type/long">long</a></td>
<td>Access hash</td>
<td>access hash</td>
</tr>
<tr>
<td><strong>date</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>Date</td>
</tr>
<tr>
<td><strong>mime_type</strong></td>
<td style="text-align: center;"><a href="/type/string">string</a></td>
<td>Mime type</td>
</tr>
<tr>
<td><strong>size</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>File size</td>
<td>Size</td>
</tr>
<tr>
<td><strong>thumb</strong></td>
<td style="text-align: center;"><a href="/type/PhotoSize">PhotoSize</a></td>
<td>Thumbnail</td>
</tr>
<tr>
<td><strong>dc_id</strong></td>
@ -84,27 +100,14 @@
<td>DC ID</td>
</tr>
<tr>
<td><strong>date</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>Date of upload</td>
</tr>
<tr>
<td><strong>file_hash</strong></td>
<td style="text-align: center;"><a href="/type/bytes">bytes</a></td>
<td>File hash</td>
</tr>
<tr>
<td><strong>secret</strong></td>
<td style="text-align: center;"><a href="/type/bytes">bytes</a></td>
<td>Secret</td>
<td><strong>attributes</strong></td>
<td style="text-align: center;"><a href="/type/Vector%20t">Vector</a>&lt;<a href="/type/DocumentAttribute">DocumentAttribute</a>&gt;</td>
<td>Attributes for media types</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/SecureFile">SecureFile</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#telegram-passport-manual" id="telegram-passport-manual" name="telegram-passport-manual"><i class="anchor-icon"></i></a><a href="/passport">Telegram Passport Manual</a></h4>
<h4><a class="anchor" href="#telegram-passport-encryption-details" id="telegram-passport-encryption-details" name="telegram-passport-encryption-details"><i class="anchor-icon"></i></a><a href="/passport/encryption">Telegram Passport Encryption Details</a></h4></div>
<p><a href="/type/DecryptedMessageMedia">DecryptedMessageMedia</a></p></div>
</div>

View file

@ -0,0 +1,148 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>decryptedMessageMediaWebPage</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Webpage preview">
<meta property="og:title" content="decryptedMessageMediaWebPage">
<meta property="og:image" content="">
<meta property="og:description" content="Webpage preview">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class=""><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class="active"><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/decryptedMessageMediaWebPage" >decryptedMessageMediaWebPage</a></li></ul></div>
<h1 id="dev_page_title">decryptedMessageMediaWebPage</h1>
<div id="dev_page_content"><p>Webpage preview</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 121 <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="?layer=1">1 &ndash; Base layer</a></li><li><a href="?layer=2">2 &ndash; New userpic notifications</a></li><li><a href="?layer=3">3 &ndash; Send message can trigger link change</a></li><li><a href="?layer=4">4 &ndash; Check-in chats</a></li><li><a href="?layer=5">5 &ndash; Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 &ndash; Foursquare integration</a></li><li><a href="?layer=7">7 &ndash; Added wallPaperSolid</a></li><li><a href="?layer=8">8 &ndash; Added end-to-end encryption</a></li><li><a href="?layer=9">9 &ndash; Improved big files upload perfomance</a></li><li><a href="?layer=10">10 &ndash; Improved chat participants updates</a></li><li><a href="?layer=11">11 &ndash; Improved secret chats</a></li><li><a href="?layer=12">12 &ndash; New dynamic support</a></li><li><a href="?layer=13">13 &ndash; Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 &ndash; Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 &ndash; Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 &ndash; Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 &ndash; Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 &ndash; Added usernames</a></li><li><a href="?layer=23">23 &ndash; Stickers for secret chats</a></li><li><a href="?layer=105">105 &ndash; Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 &ndash; Login with QR code</a></li><li><a href="?layer=109">109 &ndash; Polls v2</a></li><li><a href="?layer=110">110 &ndash; People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 &ndash; Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 &ndash; Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 &ndash; PSA</a></li><li><a href="?layer=114">114 &ndash; Video thumbs for GIFs</a></li><li><a href="?layer=115">115 &ndash; Peek Channel Invite</a></li><li><a href="?layer=116">116 &ndash; Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 &ndash; WebRTC Phone Calls</a></li><li><a href="?layer=118">118 &ndash; Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 &ndash; Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 &ndash; Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121"><strong>121 &ndash; SVG-based Outlines for Stickers</strong></a></li>
<li class="divider"></li>
<li><a href="/api/layers">More...</a></li>
</ul>
</li>
</ul>
</div>
<pre class="page_scheme"><code>===45===
<a href="/constructor/decryptedMessageMediaWebPage" class="current_page_link" >decryptedMessageMediaWebPage</a>#e50511d8 url:<a href="/type/string" >string</a> = <a href="/type/DecryptedMessageMedia" >DecryptedMessageMedia</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<table class="table">
<thead>
<tr>
<th>Name</th>
<th style="text-align: center;">Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>url</strong></td>
<td style="text-align: center;"><a href="/type/string">string</a></td>
<td>URL of webpage</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/DecryptedMessageMedia">DecryptedMessageMedia</a></p></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script>backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>

View file

@ -1,163 +0,0 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>disabledFeature</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="A disabled feature
Parameters
feature
string
The feature that was disabled
description
string
Description
Type
DisabledFeature">
<meta property="og:title" content="disabledFeature">
<meta property="og:image" content="">
<meta property="og:description" content="A disabled feature
Parameters
feature
string
The feature that was disabled
description
string
Description
Type
DisabledFeature">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class=""><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class="active"><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/disabledFeature" >disabledFeature</a></li></ul></div>
<h1 id="dev_page_title">disabledFeature</h1>
<div id="dev_page_content"><p>A disabled feature</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 121 <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="?layer=1">1 &ndash; Base layer</a></li><li><a href="?layer=2">2 &ndash; New userpic notifications</a></li><li><a href="?layer=3">3 &ndash; Send message can trigger link change</a></li><li><a href="?layer=4">4 &ndash; Check-in chats</a></li><li><a href="?layer=5">5 &ndash; Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 &ndash; Foursquare integration</a></li><li><a href="?layer=7">7 &ndash; Added wallPaperSolid</a></li><li><a href="?layer=8">8 &ndash; Added end-to-end encryption</a></li><li><a href="?layer=9">9 &ndash; Improved big files upload perfomance</a></li><li><a href="?layer=10">10 &ndash; Improved chat participants updates</a></li><li><a href="?layer=11">11 &ndash; Improved secret chats</a></li><li><a href="?layer=12">12 &ndash; New dynamic support</a></li><li><a href="?layer=13">13 &ndash; Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 &ndash; Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 &ndash; Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 &ndash; Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 &ndash; Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 &ndash; Added usernames</a></li><li><a href="?layer=23">23 &ndash; Stickers for secret chats</a></li><li><a href="?layer=105">105 &ndash; Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 &ndash; Login with QR code</a></li><li><a href="?layer=109">109 &ndash; Polls v2</a></li><li><a href="?layer=110">110 &ndash; People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 &ndash; Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 &ndash; Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 &ndash; PSA</a></li><li><a href="?layer=114">114 &ndash; Video thumbs for GIFs</a></li><li><a href="?layer=115">115 &ndash; Peek Channel Invite</a></li><li><a href="?layer=116">116 &ndash; Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 &ndash; WebRTC Phone Calls</a></li><li><a href="?layer=118">118 &ndash; Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 &ndash; Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 &ndash; Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121"><strong>121 &ndash; SVG-based Outlines for Stickers</strong></a></li>
<li class="divider"></li>
<li><a href="/api/layers">More...</a></li>
</ul>
</li>
</ul>
</div>
<pre class="page_scheme"><code>Constructor schema is available as of layer 76. <a href="?layer=76">Switch »</a></code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<table class="table">
<tbody>
<tr>
<td><strong>feature</strong></td>
<td style="text-align: center;"><a href="/type/string">string</a></td>
<td>The feature that was disabled</td>
</tr>
<tr>
<td><strong>description</strong></td>
<td style="text-align: center;"><a href="/type/string">string</a></td>
<td>Description</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/DisabledFeature">DisabledFeature</a></p></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script>backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>

View file

@ -0,0 +1,200 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>document</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Document">
<meta property="og:title" content="document">
<meta property="og:image" content="">
<meta property="og:description" content="Document">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class=""><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class="active"><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/document" >document</a></li></ul></div>
<h1 id="dev_page_title">document</h1>
<div id="dev_page_content"><p>Document</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 121 <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="?layer=1">1 &ndash; Base layer</a></li><li><a href="?layer=2">2 &ndash; New userpic notifications</a></li><li><a href="?layer=3">3 &ndash; Send message can trigger link change</a></li><li><a href="?layer=4">4 &ndash; Check-in chats</a></li><li><a href="?layer=5">5 &ndash; Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 &ndash; Foursquare integration</a></li><li><a href="?layer=7">7 &ndash; Added wallPaperSolid</a></li><li><a href="?layer=8">8 &ndash; Added end-to-end encryption</a></li><li><a href="?layer=9">9 &ndash; Improved big files upload perfomance</a></li><li><a href="?layer=10">10 &ndash; Improved chat participants updates</a></li><li><a href="?layer=11">11 &ndash; Improved secret chats</a></li><li><a href="?layer=12">12 &ndash; New dynamic support</a></li><li><a href="?layer=13">13 &ndash; Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 &ndash; Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 &ndash; Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 &ndash; Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 &ndash; Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 &ndash; Added usernames</a></li><li><a href="?layer=23">23 &ndash; Stickers for secret chats</a></li><li><a href="?layer=105">105 &ndash; Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 &ndash; Login with QR code</a></li><li><a href="?layer=109">109 &ndash; Polls v2</a></li><li><a href="?layer=110">110 &ndash; People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 &ndash; Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 &ndash; Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 &ndash; PSA</a></li><li><a href="?layer=114">114 &ndash; Video thumbs for GIFs</a></li><li><a href="?layer=115">115 &ndash; Peek Channel Invite</a></li><li><a href="?layer=116">116 &ndash; Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 &ndash; WebRTC Phone Calls</a></li><li><a href="?layer=118">118 &ndash; Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 &ndash; Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 &ndash; Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121"><strong>121 &ndash; SVG-based Outlines for Stickers</strong></a></li>
<li class="divider"></li>
<li><a href="/api/layers">More...</a></li>
</ul>
</li>
</ul>
</div>
<pre class="page_scheme"><code><a href="/constructor/document" class="current_page_link" >document</a>#1e87342b flags:<a href="/type/%23" >#</a> id:<a href="/type/long" >long</a> access_hash:<a href="/type/long" >long</a> file_reference:<a href="/type/bytes" >bytes</a> date:<a href="/type/int" >int</a> mime_type:<a href="/type/string" >string</a> size:<a href="/type/int" >int</a> thumbs:flags.0?<a href="/type/Vector%20t" >Vector</a>&lt;<a href="/type/PhotoSize" >PhotoSize</a>&gt; video_thumbs:flags.1?<a href="/type/Vector%20t" >Vector</a>&lt;<a href="/type/VideoSize" >VideoSize</a>&gt; dc_id:<a href="/type/int" >int</a> attributes:<a href="/type/Vector%20t" >Vector</a>&lt;<a href="/type/DocumentAttribute" >DocumentAttribute</a>&gt; = <a href="/type/Document" >Document</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<table class="table">
<thead>
<tr>
<th>Name</th>
<th style="text-align: center;">Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>flags</strong></td>
<td style="text-align: center;"><a href="/type/%23">#</a></td>
<td>Flags, see <a href="/mtproto/TL-combinators#conditional-fields">TL conditional fields</a></td>
</tr>
<tr>
<td><strong>id</strong></td>
<td style="text-align: center;"><a href="/type/long">long</a></td>
<td>Document ID</td>
</tr>
<tr>
<td><strong>access_hash</strong></td>
<td style="text-align: center;"><a href="/type/long">long</a></td>
<td>Check sum, dependant on document ID</td>
</tr>
<tr>
<td><strong>file_reference</strong></td>
<td style="text-align: center;"><a href="/type/bytes">bytes</a></td>
<td><a href="/api/file_reference">File reference</a></td>
</tr>
<tr>
<td><strong>date</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>Creation date</td>
</tr>
<tr>
<td><strong>mime_type</strong></td>
<td style="text-align: center;"><a href="/type/string">string</a></td>
<td>MIME type</td>
</tr>
<tr>
<td><strong>size</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>Size</td>
</tr>
<tr>
<td><strong>thumbs</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.0?<a href="/type/Vector%20t">Vector</a>&lt;<a href="/type/PhotoSize">PhotoSize</a>&gt;</td>
<td>Thumbnails</td>
</tr>
<tr>
<td><strong>video_thumbs</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.1?<a href="/type/Vector%20t">Vector</a>&lt;<a href="/type/VideoSize">VideoSize</a>&gt;</td>
<td>Video thumbnails</td>
</tr>
<tr>
<td><strong>dc_id</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>DC ID</td>
</tr>
<tr>
<td><strong>attributes</strong></td>
<td style="text-align: center;"><a href="/type/Vector%20t">Vector</a>&lt;<a href="/type/DocumentAttribute">DocumentAttribute</a>&gt;</td>
<td>Attributes</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/Document">Document</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#file-references" id="file-references" name="file-references"><i class="anchor-icon"></i></a><a href="/api/file_reference">File references</a></h4>
<p>How to handle file references.</p></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script>backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>

View file

@ -0,0 +1,132 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>documentAttributeAnimated</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Defines an animated GIF">
<meta property="og:title" content="documentAttributeAnimated">
<meta property="og:image" content="">
<meta property="og:description" content="Defines an animated GIF">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class=""><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class="active"><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/documentAttributeAnimated" >documentAttributeAnimated</a></li></ul></div>
<h1 id="dev_page_title">documentAttributeAnimated</h1>
<div id="dev_page_content"><p>Defines an animated GIF</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 121 <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="?layer=1">1 &ndash; Base layer</a></li><li><a href="?layer=2">2 &ndash; New userpic notifications</a></li><li><a href="?layer=3">3 &ndash; Send message can trigger link change</a></li><li><a href="?layer=4">4 &ndash; Check-in chats</a></li><li><a href="?layer=5">5 &ndash; Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 &ndash; Foursquare integration</a></li><li><a href="?layer=7">7 &ndash; Added wallPaperSolid</a></li><li><a href="?layer=8">8 &ndash; Added end-to-end encryption</a></li><li><a href="?layer=9">9 &ndash; Improved big files upload perfomance</a></li><li><a href="?layer=10">10 &ndash; Improved chat participants updates</a></li><li><a href="?layer=11">11 &ndash; Improved secret chats</a></li><li><a href="?layer=12">12 &ndash; New dynamic support</a></li><li><a href="?layer=13">13 &ndash; Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 &ndash; Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 &ndash; Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 &ndash; Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 &ndash; Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 &ndash; Added usernames</a></li><li><a href="?layer=23">23 &ndash; Stickers for secret chats</a></li><li><a href="?layer=105">105 &ndash; Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 &ndash; Login with QR code</a></li><li><a href="?layer=109">109 &ndash; Polls v2</a></li><li><a href="?layer=110">110 &ndash; People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 &ndash; Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 &ndash; Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 &ndash; PSA</a></li><li><a href="?layer=114">114 &ndash; Video thumbs for GIFs</a></li><li><a href="?layer=115">115 &ndash; Peek Channel Invite</a></li><li><a href="?layer=116">116 &ndash; Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 &ndash; WebRTC Phone Calls</a></li><li><a href="?layer=118">118 &ndash; Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 &ndash; Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 &ndash; Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121"><strong>121 &ndash; SVG-based Outlines for Stickers</strong></a></li>
<li class="divider"></li>
<li><a href="/api/layers">More...</a></li>
</ul>
</li>
</ul>
</div>
<pre class="page_scheme"><code><a href="/constructor/documentAttributeAnimated" class="current_page_link" >documentAttributeAnimated</a>#11b58939 = <a href="/type/DocumentAttribute" >DocumentAttribute</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<p>This constructor does not require any parameters.</p>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/DocumentAttribute">DocumentAttribute</a></p></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script>backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>

View file

@ -2,12 +2,12 @@
<html class="">
<head>
<meta charset="utf-8">
<title>documentAttributeAudio</title>
<title>documentAttributeVideo</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Represents an audio file">
<meta property="og:title" content="documentAttributeAudio">
<meta property="description" content="Defines a video">
<meta property="og:title" content="documentAttributeVideo">
<meta property="og:image" content="">
<meta property="og:description" content="Represents an audio file">
<meta property="og:description" content="Defines a video">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
@ -36,10 +36,10 @@
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/documentAttributeAudio" >documentAttributeAudio</a></li></ul></div>
<h1 id="dev_page_title">documentAttributeAudio</h1>
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/documentAttributeVideo" >documentAttributeVideo</a></li></ul></div>
<h1 id="dev_page_title">documentAttributeVideo</h1>
<div id="dev_page_content"><p>Represents an audio file</p>
<div id="dev_page_content"><p>Defines a video</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
@ -52,7 +52,7 @@
</li>
</ul>
</div>
<pre class="page_scheme"><code><a href="/constructor/documentAttributeAudio" class="current_page_link" >documentAttributeAudio</a>#9852f9c6 flags:<a href="/type/%23" >#</a> voice:flags.10?true duration:<a href="/type/int" >int</a> title:flags.0?<a href="/type/string" >string</a> performer:flags.1?<a href="/type/string" >string</a> waveform:flags.2?<a href="/type/bytes" >bytes</a> = <a href="/type/DocumentAttribute" >DocumentAttribute</a>;</code></pre></p>
<pre class="page_scheme"><code><a href="/constructor/documentAttributeVideo" class="current_page_link" >documentAttributeVideo</a>#ef02ce6 flags:<a href="/type/%23" >#</a> round_message:flags.0?true supports_streaming:flags.1?true duration:<a href="/type/int" >int</a> w:<a href="/type/int" >int</a> h:<a href="/type/int" >int</a> = <a href="/type/DocumentAttribute" >DocumentAttribute</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<table class="table">
<thead>
@ -69,9 +69,14 @@
<td>Flags, see <a href="/mtproto/TL-combinators#conditional-fields">TL conditional fields</a></td>
</tr>
<tr>
<td><strong>voice</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.10?<a href="/constructor/true">true</a></td>
<td>Whether this is a voice message</td>
<td><strong>round_message</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.0?<a href="/constructor/true">true</a></td>
<td>Whether this is a round video</td>
</tr>
<tr>
<td><strong>supports_streaming</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.1?<a href="/constructor/true">true</a></td>
<td>Whether the video supports streaming</td>
</tr>
<tr>
<td><strong>duration</strong></td>
@ -79,19 +84,14 @@
<td>Duration in seconds</td>
</tr>
<tr>
<td><strong>title</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.0?<a href="/type/string">string</a></td>
<td>Name of song</td>
<td><strong>w</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>Video width</td>
</tr>
<tr>
<td><strong>performer</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.1?<a href="/type/string">string</a></td>
<td>Performer</td>
</tr>
<tr>
<td><strong>waveform</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.2?<a href="/type/bytes">bytes</a></td>
<td>Waveform</td>
<td><strong>h</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>Video height</td>
</tr>
</tbody>
</table>

View file

@ -0,0 +1,147 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>documentEmpty</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Empty constructor, document doesn&#39;t exist.">
<meta property="og:title" content="documentEmpty">
<meta property="og:image" content="">
<meta property="og:description" content="Empty constructor, document doesn&#39;t exist.">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class=""><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class="active"><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/documentEmpty" >documentEmpty</a></li></ul></div>
<h1 id="dev_page_title">documentEmpty</h1>
<div id="dev_page_content"><p>Empty constructor, document doesn't exist.</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 121 <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="?layer=1">1 &ndash; Base layer</a></li><li><a href="?layer=2">2 &ndash; New userpic notifications</a></li><li><a href="?layer=3">3 &ndash; Send message can trigger link change</a></li><li><a href="?layer=4">4 &ndash; Check-in chats</a></li><li><a href="?layer=5">5 &ndash; Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 &ndash; Foursquare integration</a></li><li><a href="?layer=7">7 &ndash; Added wallPaperSolid</a></li><li><a href="?layer=8">8 &ndash; Added end-to-end encryption</a></li><li><a href="?layer=9">9 &ndash; Improved big files upload perfomance</a></li><li><a href="?layer=10">10 &ndash; Improved chat participants updates</a></li><li><a href="?layer=11">11 &ndash; Improved secret chats</a></li><li><a href="?layer=12">12 &ndash; New dynamic support</a></li><li><a href="?layer=13">13 &ndash; Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 &ndash; Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 &ndash; Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 &ndash; Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 &ndash; Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 &ndash; Added usernames</a></li><li><a href="?layer=23">23 &ndash; Stickers for secret chats</a></li><li><a href="?layer=105">105 &ndash; Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 &ndash; Login with QR code</a></li><li><a href="?layer=109">109 &ndash; Polls v2</a></li><li><a href="?layer=110">110 &ndash; People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 &ndash; Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 &ndash; Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 &ndash; PSA</a></li><li><a href="?layer=114">114 &ndash; Video thumbs for GIFs</a></li><li><a href="?layer=115">115 &ndash; Peek Channel Invite</a></li><li><a href="?layer=116">116 &ndash; Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 &ndash; WebRTC Phone Calls</a></li><li><a href="?layer=118">118 &ndash; Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 &ndash; Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 &ndash; Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121"><strong>121 &ndash; SVG-based Outlines for Stickers</strong></a></li>
<li class="divider"></li>
<li><a href="/api/layers">More...</a></li>
</ul>
</li>
</ul>
</div>
<pre class="page_scheme"><code><a href="/constructor/documentEmpty" class="current_page_link" >documentEmpty</a>#36f8c871 id:<a href="/type/long" >long</a> = <a href="/type/Document" >Document</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<table class="table">
<thead>
<tr>
<th>Name</th>
<th style="text-align: center;">Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>id</strong></td>
<td style="text-align: center;"><a href="/type/long">long</a></td>
<td>Document ID or <code>0</code></td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/Document">Document</a></p></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script>backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>

View file

@ -2,12 +2,12 @@
<html class="">
<head>
<meta charset="utf-8">
<title>webPageNotModified</title>
<title>draftMessageEmpty</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="The preview of the webpage hasn&#39;t changed">
<meta property="og:title" content="webPageNotModified">
<meta property="description" content="Empty draft">
<meta property="og:title" content="draftMessageEmpty">
<meta property="og:image" content="">
<meta property="og:description" content="The preview of the webpage hasn&#39;t changed">
<meta property="og:description" content="Empty draft">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
@ -36,10 +36,10 @@
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/webPageNotModified" >webPageNotModified</a></li></ul></div>
<h1 id="dev_page_title">webPageNotModified</h1>
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/draftMessageEmpty" >draftMessageEmpty</a></li></ul></div>
<h1 id="dev_page_title">draftMessageEmpty</h1>
<div id="dev_page_content"><p>The preview of the webpage hasn't changed</p>
<div id="dev_page_content"><p>Empty draft</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
@ -52,7 +52,7 @@
</li>
</ul>
</div>
<pre class="page_scheme"><code><a href="/constructor/webPageNotModified" class="current_page_link" >webPageNotModified</a>#7311ca11 flags:<a href="/type/%23" >#</a> cached_page_views:flags.0?<a href="/type/int" >int</a> = <a href="/type/WebPage" >WebPage</a>;</code></pre></p>
<pre class="page_scheme"><code><a href="/constructor/draftMessageEmpty" class="current_page_link" >draftMessageEmpty</a>#1b0c841a flags:<a href="/type/%23" >#</a> date:flags.0?<a href="/type/int" >int</a> = <a href="/type/DraftMessage" >DraftMessage</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<table class="table">
<thead>
@ -69,14 +69,14 @@
<td>Flags, see <a href="/mtproto/TL-combinators#conditional-fields">TL conditional fields</a></td>
</tr>
<tr>
<td><strong>cached_page_views</strong></td>
<td><strong>date</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.0?<a href="/type/int">int</a></td>
<td>Page view count</td>
<td>When was the draft last updated</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/WebPage">WebPage</a></p></div>
<p><a href="/type/DraftMessage">DraftMessage</a></p></div>
</div>

View file

@ -2,12 +2,12 @@
<html class="">
<head>
<meta charset="utf-8">
<title>inputThemeSlug</title>
<title>emojiLanguage</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Theme by theme ID">
<meta property="og:title" content="inputThemeSlug">
<meta property="description" content="Emoji language">
<meta property="og:title" content="emojiLanguage">
<meta property="og:image" content="">
<meta property="og:description" content="Theme by theme ID">
<meta property="og:description" content="Emoji language">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
@ -36,10 +36,10 @@
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/inputThemeSlug" >inputThemeSlug</a></li></ul></div>
<h1 id="dev_page_title">inputThemeSlug</h1>
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/emojiLanguage" >emojiLanguage</a></li></ul></div>
<h1 id="dev_page_title">emojiLanguage</h1>
<div id="dev_page_content"><p>Theme by theme ID</p>
<div id="dev_page_content"><p>Emoji language</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
@ -52,7 +52,7 @@
</li>
</ul>
</div>
<pre class="page_scheme"><code><a href="/constructor/inputThemeSlug" class="current_page_link" >inputThemeSlug</a>#f5890df1 slug:<a href="/type/string" >string</a> = <a href="/type/InputTheme" >InputTheme</a>;</code></pre></p>
<pre class="page_scheme"><code><a href="/constructor/emojiLanguage" class="current_page_link" >emojiLanguage</a>#b3fb5361 lang_code:<a href="/type/string" >string</a> = <a href="/type/EmojiLanguage" >EmojiLanguage</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<table class="table">
<thead>
@ -64,14 +64,14 @@
</thead>
<tbody>
<tr>
<td><strong>slug</strong></td>
<td><strong>lang_code</strong></td>
<td style="text-align: center;"><a href="/type/string">string</a></td>
<td>Unique theme ID</td>
<td>Language code</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/InputTheme">InputTheme</a></p></div>
<p><a href="/type/EmojiLanguage">EmojiLanguage</a></p></div>
</div>

View file

@ -2,12 +2,12 @@
<html class="">
<head>
<meta charset="utf-8">
<title>encryptedChatWaiting</title>
<title>encryptedChat</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Chat waiting for approval of second participant.">
<meta property="og:title" content="encryptedChatWaiting">
<meta property="description" content="Encrypted chat">
<meta property="og:title" content="encryptedChat">
<meta property="og:image" content="">
<meta property="og:description" content="Chat waiting for approval of second participant.">
<meta property="og:description" content="Encrypted chat">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
@ -36,10 +36,10 @@
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/encryptedChatWaiting" >encryptedChatWaiting</a></li></ul></div>
<h1 id="dev_page_title">encryptedChatWaiting</h1>
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/encryptedChat" >encryptedChat</a></li></ul></div>
<h1 id="dev_page_title">encryptedChat</h1>
<div id="dev_page_content"><p>Chat waiting for approval of second participant.</p>
<div id="dev_page_content"><p>Encrypted chat</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
@ -52,7 +52,7 @@
</li>
</ul>
</div>
<pre class="page_scheme"><code><a href="/constructor/encryptedChatWaiting" class="current_page_link" >encryptedChatWaiting</a>#3bf703dc id:<a href="/type/int" >int</a> access_hash:<a href="/type/long" >long</a> date:<a href="/type/int" >int</a> admin_id:<a href="/type/int" >int</a> participant_id:<a href="/type/int" >int</a> = <a href="/type/EncryptedChat" >EncryptedChat</a>;</code></pre></p>
<pre class="page_scheme"><code><a href="/constructor/encryptedChat" class="current_page_link" >encryptedChat</a>#fa56ce36 id:<a href="/type/int" >int</a> access_hash:<a href="/type/long" >long</a> date:<a href="/type/int" >int</a> admin_id:<a href="/type/int" >int</a> participant_id:<a href="/type/int" >int</a> g_a_or_b:<a href="/type/bytes" >bytes</a> key_fingerprint:<a href="/type/long" >long</a> = <a href="/type/EncryptedChat" >EncryptedChat</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<table class="table">
<thead>
@ -71,12 +71,12 @@
<tr>
<td><strong>access_hash</strong></td>
<td style="text-align: center;"><a href="/type/long">long</a></td>
<td>Checking sum depending on user ID</td>
<td>Check sum dependant on the user ID</td>
</tr>
<tr>
<td><strong>date</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>Date of chat creation</td>
<td>Date chat was created</td>
</tr>
<tr>
<td><strong>admin_id</strong></td>
@ -86,7 +86,17 @@
<tr>
<td><strong>participant_id</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>ID of second chat participant</td>
<td>ID of the second chat participant</td>
</tr>
<tr>
<td><strong>g_a_or_b</strong></td>
<td style="text-align: center;"><a href="/type/bytes">bytes</a></td>
<td><code>B = g ^ b mod p</code>, if the currently authorized user is the chat's creator,<br>or <code>A = g ^ a mod p</code> otherwise<br>See <a href="https://en.wikipedia.org/wiki/Diffie%E2%80%93Hellman_key_exchange">Wikipedia</a> for more info</td>
</tr>
<tr>
<td><strong>key_fingerprint</strong></td>
<td style="text-align: center;"><a href="/type/long">long</a></td>
<td>64-bit fingerprint of received key</td>
</tr>
</tbody>
</table>

View file

@ -2,12 +2,12 @@
<html class="">
<head>
<meta charset="utf-8">
<title>inputPeerChat</title>
<title>encryptedChatDiscarded</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Defines a chat for further interaction.">
<meta property="og:title" content="inputPeerChat">
<meta property="description" content="Discarded or deleted chat.">
<meta property="og:title" content="encryptedChatDiscarded">
<meta property="og:image" content="">
<meta property="og:description" content="Defines a chat for further interaction.">
<meta property="og:description" content="Discarded or deleted chat.">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
@ -36,10 +36,10 @@
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/inputPeerChat" >inputPeerChat</a></li></ul></div>
<h1 id="dev_page_title">inputPeerChat</h1>
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/encryptedChatDiscarded" >encryptedChatDiscarded</a></li></ul></div>
<h1 id="dev_page_title">encryptedChatDiscarded</h1>
<div id="dev_page_content"><p>Defines a chat for further interaction.</p>
<div id="dev_page_content"><p>Discarded or deleted chat.</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
@ -52,7 +52,7 @@
</li>
</ul>
</div>
<pre class="page_scheme"><code><a href="/constructor/inputPeerChat" class="current_page_link" >inputPeerChat</a>#179be863 chat_id:<a href="/type/int" >int</a> = <a href="/type/InputPeer" >InputPeer</a>;</code></pre></p>
<pre class="page_scheme"><code><a href="/constructor/encryptedChatDiscarded" class="current_page_link" >encryptedChatDiscarded</a>#13d6dd27 id:<a href="/type/int" >int</a> = <a href="/type/EncryptedChat" >EncryptedChat</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<table class="table">
<thead>
@ -64,14 +64,14 @@
</thead>
<tbody>
<tr>
<td><strong>chat_id</strong></td>
<td><strong>id</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>Chat idientifier</td>
<td>Chat ID</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/InputPeer">InputPeer</a></p></div>
<p><a href="/type/EncryptedChat">EncryptedChat</a></p></div>
</div>

View file

@ -2,12 +2,12 @@
<html class="">
<head>
<meta charset="utf-8">
<title>chatOnlines</title>
<title>encryptedChatEmpty</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Number of online users in a chat">
<meta property="og:title" content="chatOnlines">
<meta property="description" content="Empty constructor.">
<meta property="og:title" content="encryptedChatEmpty">
<meta property="og:image" content="">
<meta property="og:description" content="Number of online users in a chat">
<meta property="og:description" content="Empty constructor.">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
@ -36,10 +36,10 @@
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/chatOnlines" >chatOnlines</a></li></ul></div>
<h1 id="dev_page_title">chatOnlines</h1>
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/encryptedChatEmpty" >encryptedChatEmpty</a></li></ul></div>
<h1 id="dev_page_title">encryptedChatEmpty</h1>
<div id="dev_page_content"><p>Number of online users in a chat</p>
<div id="dev_page_content"><p>Empty constructor.</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
@ -52,7 +52,7 @@
</li>
</ul>
</div>
<pre class="page_scheme"><code><a href="/constructor/chatOnlines" class="current_page_link" >chatOnlines</a>#f041e250 onlines:<a href="/type/int" >int</a> = <a href="/type/ChatOnlines" >ChatOnlines</a>;</code></pre></p>
<pre class="page_scheme"><code><a href="/constructor/encryptedChatEmpty" class="current_page_link" >encryptedChatEmpty</a>#ab7ec0a0 id:<a href="/type/int" >int</a> = <a href="/type/EncryptedChat" >EncryptedChat</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<table class="table">
<thead>
@ -64,14 +64,14 @@
</thead>
<tbody>
<tr>
<td><strong>onlines</strong></td>
<td><strong>id</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>Number of online users</td>
<td>Chat ID</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/ChatOnlines">ChatOnlines</a></p></div>
<p><a href="/type/EncryptedChat">EncryptedChat</a></p></div>
</div>

View file

@ -0,0 +1,185 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>encryptedChatRequested</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Request to create an encrypted chat.">
<meta property="og:title" content="encryptedChatRequested">
<meta property="og:image" content="">
<meta property="og:description" content="Request to create an encrypted chat.">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class=""><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class="active"><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/encryptedChatRequested" >encryptedChatRequested</a></li></ul></div>
<h1 id="dev_page_title">encryptedChatRequested</h1>
<div id="dev_page_content"><p>Request to create an encrypted chat.</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 121 <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="?layer=1">1 &ndash; Base layer</a></li><li><a href="?layer=2">2 &ndash; New userpic notifications</a></li><li><a href="?layer=3">3 &ndash; Send message can trigger link change</a></li><li><a href="?layer=4">4 &ndash; Check-in chats</a></li><li><a href="?layer=5">5 &ndash; Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 &ndash; Foursquare integration</a></li><li><a href="?layer=7">7 &ndash; Added wallPaperSolid</a></li><li><a href="?layer=8">8 &ndash; Added end-to-end encryption</a></li><li><a href="?layer=9">9 &ndash; Improved big files upload perfomance</a></li><li><a href="?layer=10">10 &ndash; Improved chat participants updates</a></li><li><a href="?layer=11">11 &ndash; Improved secret chats</a></li><li><a href="?layer=12">12 &ndash; New dynamic support</a></li><li><a href="?layer=13">13 &ndash; Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 &ndash; Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 &ndash; Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 &ndash; Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 &ndash; Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 &ndash; Added usernames</a></li><li><a href="?layer=23">23 &ndash; Stickers for secret chats</a></li><li><a href="?layer=105">105 &ndash; Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 &ndash; Login with QR code</a></li><li><a href="?layer=109">109 &ndash; Polls v2</a></li><li><a href="?layer=110">110 &ndash; People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 &ndash; Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 &ndash; Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 &ndash; PSA</a></li><li><a href="?layer=114">114 &ndash; Video thumbs for GIFs</a></li><li><a href="?layer=115">115 &ndash; Peek Channel Invite</a></li><li><a href="?layer=116">116 &ndash; Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 &ndash; WebRTC Phone Calls</a></li><li><a href="?layer=118">118 &ndash; Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 &ndash; Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 &ndash; Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121"><strong>121 &ndash; SVG-based Outlines for Stickers</strong></a></li>
<li class="divider"></li>
<li><a href="/api/layers">More...</a></li>
</ul>
</li>
</ul>
</div>
<pre class="page_scheme"><code><a href="/constructor/encryptedChatRequested" class="current_page_link" >encryptedChatRequested</a>#62718a82 flags:<a href="/type/%23" >#</a> folder_id:flags.0?<a href="/type/int" >int</a> id:<a href="/type/int" >int</a> access_hash:<a href="/type/long" >long</a> date:<a href="/type/int" >int</a> admin_id:<a href="/type/int" >int</a> participant_id:<a href="/type/int" >int</a> g_a:<a href="/type/bytes" >bytes</a> = <a href="/type/EncryptedChat" >EncryptedChat</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<table class="table">
<thead>
<tr>
<th>Name</th>
<th style="text-align: center;">Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>flags</strong></td>
<td style="text-align: center;"><a href="/type/%23">#</a></td>
<td>Flags, see <a href="/mtproto/TL-combinators#conditional-fields">TL conditional fields</a></td>
</tr>
<tr>
<td><strong>folder_id</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.0?<a href="/type/int">int</a></td>
<td><a href="/api/folders#peer-folders">Peer folder ID, for more info click here</a></td>
</tr>
<tr>
<td><strong>id</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>Chat ID</td>
</tr>
<tr>
<td><strong>access_hash</strong></td>
<td style="text-align: center;"><a href="/type/long">long</a></td>
<td>Check sum depending on user ID</td>
</tr>
<tr>
<td><strong>date</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>Chat creation date</td>
</tr>
<tr>
<td><strong>admin_id</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>Chat creator ID</td>
</tr>
<tr>
<td><strong>participant_id</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>ID of second chat participant</td>
</tr>
<tr>
<td><strong>g_a</strong></td>
<td style="text-align: center;"><a href="/type/bytes">bytes</a></td>
<td><code>A = g ^ a mod p</code>, see <a href="https://en.wikipedia.org/wiki/Diffie%E2%80%93Hellman_key_exchange">Wikipedia</a></td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/EncryptedChat">EncryptedChat</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#folders" id="folders" name="folders"><i class="anchor-icon"></i></a><a href="/api/folders">Folders</a></h4>
<p>Telegram allows placing chats into folders, based on their type, mute status, or other custom criteria, thanks to folder blacklists and whitelists.</p></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script>backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>

View file

@ -2,32 +2,12 @@
<html class="">
<head>
<meta charset="utf-8">
<title>fileLocation</title>
<title>encryptedFile</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="File location.
Parameters
Name
Type
Description
dc_id
int
Number of the data center holding the file
volume_id
long
Server…">
<meta property="og:title" content="fileLocation">
<meta property="description" content="Encrypted file.">
<meta property="og:title" content="encryptedFile">
<meta property="og:image" content="">
<meta property="og:description" content="File location.
Parameters
Name
Type
Description
dc_id
int
Number of the data center holding the file
volume_id
long
Server…">
<meta property="og:description" content="Encrypted file.">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
@ -56,10 +36,10 @@ Server…">
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/fileLocation" >fileLocation</a></li></ul></div>
<h1 id="dev_page_title">fileLocation</h1>
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/encryptedFile" >encryptedFile</a></li></ul></div>
<h1 id="dev_page_title">encryptedFile</h1>
<div id="dev_page_content"><p>File location.</p>
<div id="dev_page_content"><p>Encrypted file.</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
@ -72,7 +52,7 @@ Server…">
</li>
</ul>
</div>
<pre class="page_scheme"><code>Constructor schema is available as of layer 86. <a href="?layer=86">Switch »</a></code></pre></p>
<pre class="page_scheme"><code><a href="/constructor/encryptedFile" class="current_page_link" >encryptedFile</a>#4a70994c id:<a href="/type/long" >long</a> access_hash:<a href="/type/long" >long</a> size:<a href="/type/int" >int</a> dc_id:<a href="/type/int" >int</a> key_fingerprint:<a href="/type/int" >int</a> = <a href="/type/EncryptedFile" >EncryptedFile</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<table class="table">
<thead>
@ -84,29 +64,34 @@ Server…">
</thead>
<tbody>
<tr>
<td><strong>dc_id</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>Number of the data center holding the file</td>
</tr>
<tr>
<td><strong>volume_id</strong></td>
<td><strong>id</strong></td>
<td style="text-align: center;"><a href="/type/long">long</a></td>
<td>Server volume</td>
</tr>
<tr>
<td><strong>local_id</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>File ID</td>
</tr>
<tr>
<td><strong>secret</strong></td>
<td><strong>access_hash</strong></td>
<td style="text-align: center;"><a href="/type/long">long</a></td>
<td>Checksum to access the file</td>
<td>Checking sum depending on user ID</td>
</tr>
<tr>
<td><strong>size</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>File size in bytes</td>
</tr>
<tr>
<td><strong>dc_id</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>Number of data centre</td>
</tr>
<tr>
<td><strong>key_fingerprint</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>32-bit fingerprint of key used for file encryption</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/FileLocation">FileLocation</a></p></div>
<p><a href="/type/EncryptedFile">EncryptedFile</a></p></div>
</div>

View file

@ -2,12 +2,12 @@
<html class="">
<head>
<meta charset="utf-8">
<title>updateReadHistoryOutbox</title>
<title>encryptedMessageService</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Outgoing messages were read">
<meta property="og:title" content="updateReadHistoryOutbox">
<meta property="description" content="Encrypted service message">
<meta property="og:title" content="encryptedMessageService">
<meta property="og:image" content="">
<meta property="og:description" content="Outgoing messages were read">
<meta property="og:description" content="Encrypted service message">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
@ -36,10 +36,10 @@
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/updateReadHistoryOutbox" >updateReadHistoryOutbox</a></li></ul></div>
<h1 id="dev_page_title">updateReadHistoryOutbox</h1>
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/encryptedMessageService" >encryptedMessageService</a></li></ul></div>
<h1 id="dev_page_title">encryptedMessageService</h1>
<div id="dev_page_content"><p>Outgoing messages were read</p>
<div id="dev_page_content"><p>Encrypted service message</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
@ -52,7 +52,7 @@
</li>
</ul>
</div>
<pre class="page_scheme"><code><a href="/constructor/updateReadHistoryOutbox" class="current_page_link" >updateReadHistoryOutbox</a>#2f2f21bf peer:<a href="/type/Peer" >Peer</a> max_id:<a href="/type/int" >int</a> pts:<a href="/type/int" >int</a> pts_count:<a href="/type/int" >int</a> = <a href="/type/Update" >Update</a>;</code></pre></p>
<pre class="page_scheme"><code><a href="/constructor/encryptedMessageService" class="current_page_link" >encryptedMessageService</a>#23734b06 random_id:<a href="/type/long" >long</a> chat_id:<a href="/type/int" >int</a> date:<a href="/type/int" >int</a> bytes:<a href="/type/bytes" >bytes</a> = <a href="/type/EncryptedMessage" >EncryptedMessage</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<table class="table">
<thead>
@ -64,32 +64,32 @@
</thead>
<tbody>
<tr>
<td><strong>peer</strong></td>
<td style="text-align: center;"><a href="/type/Peer">Peer</a></td>
<td>Peer</td>
<td><strong>random_id</strong></td>
<td style="text-align: center;"><a href="/type/long">long</a></td>
<td>Random message ID, assigned by the author of message</td>
</tr>
<tr>
<td><strong>max_id</strong></td>
<td><strong>chat_id</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>Maximum ID of read outgoing messages</td>
<td>ID of encrypted chat</td>
</tr>
<tr>
<td><strong>pts</strong></td>
<td><strong>date</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td><a href="/api/updates">Event count after generation</a></td>
<td>Date of sending</td>
</tr>
<tr>
<td><strong>pts_count</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td><a href="/api/updates">Number of events that were generated</a></td>
<td><strong>bytes</strong></td>
<td style="text-align: center;"><a href="/type/bytes">bytes</a></td>
<td>TL-serialising of <a href="/type/DecryptedMessage">DecryptedMessage</a> type, encrypted with the key creatied at stage of chat initialization</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/Update">Update</a></p>
<p><a href="/type/EncryptedMessage">EncryptedMessage</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#working-with-updates" id="working-with-updates" name="working-with-updates"><i class="anchor-icon"></i></a><a href="/api/updates">Working with Updates</a></h4>
<p>How to subscribe to updates and handle them properly.</p></div>
<h4><a class="anchor" href="#decryptedmessage" id="decryptedmessage" name="decryptedmessage"><i class="anchor-icon"></i></a><a href="/type/DecryptedMessage">DecryptedMessage</a></h4>
<p>Object describes the contents of an encrypted message.</p></div>
</div>

View file

@ -2,12 +2,12 @@
<html class="">
<head>
<meta charset="utf-8">
<title>inputDialogPeerFolder</title>
<title>folderPeer</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="All peers in a peer folder">
<meta property="og:title" content="inputDialogPeerFolder">
<meta property="description" content="Peer in a folder">
<meta property="og:title" content="folderPeer">
<meta property="og:image" content="">
<meta property="og:description" content="All peers in a peer folder">
<meta property="og:description" content="Peer in a folder">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
@ -36,10 +36,10 @@
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/inputDialogPeerFolder" >inputDialogPeerFolder</a></li></ul></div>
<h1 id="dev_page_title">inputDialogPeerFolder</h1>
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/folderPeer" >folderPeer</a></li></ul></div>
<h1 id="dev_page_title">folderPeer</h1>
<div id="dev_page_content"><p>All peers in a <a href="/api/folders#peer-folders">peer folder</a></p>
<div id="dev_page_content"><p>Peer in a folder</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
@ -52,7 +52,7 @@
</li>
</ul>
</div>
<pre class="page_scheme"><code><a href="/constructor/inputDialogPeerFolder" class="current_page_link" >inputDialogPeerFolder</a>#64600527 folder_id:<a href="/type/int" >int</a> = <a href="/type/InputDialogPeer" >InputDialogPeer</a>;</code></pre></p>
<pre class="page_scheme"><code><a href="/constructor/folderPeer" class="current_page_link" >folderPeer</a>#e9baa668 peer:<a href="/type/Peer" >Peer</a> folder_id:<a href="/type/int" >int</a> = <a href="/type/FolderPeer" >FolderPeer</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<table class="table">
<thead>
@ -64,6 +64,11 @@
</thead>
<tbody>
<tr>
<td><strong>peer</strong></td>
<td style="text-align: center;"><a href="/type/Peer">Peer</a></td>
<td>Folder peer info</td>
</tr>
<tr>
<td><strong>folder_id</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td><a href="/api/folders#peer-folders">Peer folder ID, for more info click here</a></td>
@ -71,7 +76,7 @@
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/InputDialogPeer">InputDialogPeer</a></p>
<p><a href="/type/FolderPeer">FolderPeer</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#folders" id="folders" name="folders"><i class="anchor-icon"></i></a><a href="/api/folders">Folders</a></h4>
<p>Telegram allows placing chats into folders, based on their type, mute status, or other custom criteria, thanks to folder blacklists and whitelists.</p></div>

View file

@ -2,12 +2,12 @@
<html class="">
<head>
<meta charset="utf-8">
<title>help.termsOfService</title>
<title>help.deepLinkInfo</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Info about the latest telegram Terms Of Service">
<meta property="og:title" content="help.termsOfService">
<meta property="description" content="Deep linking info">
<meta property="og:title" content="help.deepLinkInfo">
<meta property="og:image" content="">
<meta property="og:description" content="Info about the latest telegram Terms Of Service">
<meta property="og:description" content="Deep linking info">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
@ -36,10 +36,10 @@
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/help.termsOfService" >help.termsOfService</a></li></ul></div>
<h1 id="dev_page_title">help.termsOfService</h1>
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/help.deepLinkInfo" >help.deepLinkInfo</a></li></ul></div>
<h1 id="dev_page_title">help.deepLinkInfo</h1>
<div id="dev_page_content"><p>Info about the latest telegram Terms Of Service</p>
<div id="dev_page_content"><p>Deep linking info</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
@ -52,7 +52,7 @@
</li>
</ul>
</div>
<pre class="page_scheme"><code><a href="/constructor/help.termsOfService" class="current_page_link" >help.termsOfService</a>#780a0310 flags:<a href="/type/%23" >#</a> popup:flags.0?true id:<a href="/type/DataJSON" >DataJSON</a> text:<a href="/type/string" >string</a> entities:<a href="/type/Vector%20t" >Vector</a>&lt;<a href="/type/MessageEntity" >MessageEntity</a>&gt; min_age_confirm:flags.1?<a href="/type/int" >int</a> = <a href="/type/help.TermsOfService" >help.TermsOfService</a>;</code></pre></p>
<pre class="page_scheme"><code><a href="/constructor/help.deepLinkInfo" class="current_page_link" >help.deepLinkInfo</a>#6a4ee832 flags:<a href="/type/%23" >#</a> update_app:flags.0?true message:<a href="/type/string" >string</a> entities:flags.1?<a href="/type/Vector%20t" >Vector</a>&lt;<a href="/type/MessageEntity" >MessageEntity</a>&gt; = <a href="/type/help.DeepLinkInfo" >help.DeepLinkInfo</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<table class="table">
<thead>
@ -69,34 +69,24 @@
<td>Flags, see <a href="/mtproto/TL-combinators#conditional-fields">TL conditional fields</a></td>
</tr>
<tr>
<td><strong>popup</strong></td>
<td><strong>update_app</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.0?<a href="/constructor/true">true</a></td>
<td>Whether a prompt must be showed to the user, in order to accept the new terms.</td>
<td>An update of the app is required to parse this link</td>
</tr>
<tr>
<td><strong>id</strong></td>
<td style="text-align: center;"><a href="/type/DataJSON">DataJSON</a></td>
<td>ID of the new terms</td>
</tr>
<tr>
<td><strong>text</strong></td>
<td><strong>message</strong></td>
<td style="text-align: center;"><a href="/type/string">string</a></td>
<td>Text of the new terms</td>
<td>Message to show to the user</td>
</tr>
<tr>
<td><strong>entities</strong></td>
<td style="text-align: center;"><a href="/type/Vector%20t">Vector</a>&lt;<a href="/type/MessageEntity">MessageEntity</a>&gt;</td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.1?<a href="/type/Vector%20t">Vector</a>&lt;<a href="/type/MessageEntity">MessageEntity</a>&gt;</td>
<td><a href="/api/entities">Message entities for styled text</a></td>
</tr>
<tr>
<td><strong>min_age_confirm</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.1?<a href="/type/int">int</a></td>
<td>Minimum age required to sign up to telegram, the user must confirm that they is older than the minimum age.</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/help.TermsOfService">help.TermsOfService</a></p>
<p><a href="/type/help.DeepLinkInfo">help.DeepLinkInfo</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#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></div>

Some files were not shown because too many files have changed in this diff Show more