mirror of
https://github.com/MarshalX/telegram-crawler.git
synced 2024-12-29 15:59:13 +01:00
Update content of files
This commit is contained in:
parent
4aed325132
commit
99ea795716
276 changed files with 31625 additions and 46129 deletions
253
data/core.telegram.org/api.html
Normal file
253
data/core.telegram.org/api.html
Normal file
|
@ -0,0 +1,253 @@
|
|||
<!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?215" 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 & 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="#imported-messages" id="imported-messages" name="imported-messages"><i class="anchor-icon"></i></a><a href="/api/import">Imported messages</a></h4>
|
||||
<p>Telegram allows importing messages and media from foreign chat apps.</p>
|
||||
<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?43"></script>
|
||||
|
||||
<script>backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
422
data/core.telegram.org/api/config.html
Normal file
422
data/core.telegram.org/api/config.html
Normal file
|
@ -0,0 +1,422 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Client configuration</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="The MTProto API has multiple configuration parameters that can be fetched with the appropriate methods.">
|
||||
<meta property="og:title" content="Client configuration">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="The MTProto API has multiple configuration parameters that can be fetched with the appropriate 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?215" 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/config" >Client configuration</a></li></ul></div>
|
||||
<h1 id="dev_page_title">Client configuration</h1>
|
||||
|
||||
<div id="dev_page_content"><!-- scroll_nav -->
|
||||
|
||||
<p>The MTProto API has multiple configuration parameters that can be fetched with the appropriate methods. </p>
|
||||
<h3><a class="anchor" href="#mtproto-configuration" id="mtproto-configuration" name="mtproto-configuration"><i class="anchor-icon"></i></a>MTProto configuration</h3>
|
||||
<pre><code><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><<a href='/type/DcOption'>DcOption</a>> 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>;
|
||||
<a href='/constructor/nearestDc'>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>;
|
||||
|
||||
---functions---
|
||||
|
||||
<a href='/method/help.getConfig'>help.getConfig</a>#c4f9186b = <a href='/type/Config'>Config</a>;
|
||||
<a href='/method/help.getNearestDc'>help.getNearestDc</a>#1fb33026 = <a href='/type/NearestDc'>NearestDc</a>;</code></pre>
|
||||
<p>The huge <a href="/constructor/config">config</a> constructor contains lots of useful information, from chat and message size limitations, to privacy settings, online status refresh interval and timeout, VoIP configuration, default inline bot usernames for GIF, image and venue lookup, and lots of other global and user-specific information, check out the <a href="/constructor/config">constructor page</a> for more information.</p>
|
||||
<h3><a class="anchor" href="#client-configuration" id="client-configuration" name="client-configuration"><i class="anchor-icon"></i></a>Client configuration</h3>
|
||||
<pre><code><a href='/constructor/jsonObjectValue'>jsonObjectValue</a>#c0de1bd9 key:<a href='/type/string'>string</a> value:<a href='/type/JSONValue'>JSONValue</a> = <a href='/type/JSONObjectValue'>JSONObjectValue</a>;
|
||||
|
||||
<a href='/constructor/jsonNull'>jsonNull</a>#3f6d7b68 = <a href='/type/JSONValue'>JSONValue</a>;
|
||||
<a href='/constructor/jsonBool'>jsonBool</a>#c7345e6a value:<a href='/type/Bool'>Bool</a> = <a href='/type/JSONValue'>JSONValue</a>;
|
||||
<a href='/constructor/jsonNumber'>jsonNumber</a>#2be0dfa4 value:<a href='/type/double'>double</a> = <a href='/type/JSONValue'>JSONValue</a>;
|
||||
<a href='/constructor/jsonString'>jsonString</a>#b71e767a value:<a href='/type/string'>string</a> = <a href='/type/JSONValue'>JSONValue</a>;
|
||||
<a href='/constructor/jsonArray'>jsonArray</a>#f7444763 value:<a href='/type/Vector%20t'>Vector</a><<a href='/type/JSONValue'>JSONValue</a>> = <a href='/type/JSONValue'>JSONValue</a>;
|
||||
<a href='/constructor/jsonObject'>jsonObject</a>#99c1d49d value:<a href='/type/Vector%20t'>Vector</a><<a href='/type/JSONObjectValue'>JSONObjectValue</a>> = <a href='/type/JSONValue'>JSONValue</a>;
|
||||
|
||||
---functions---
|
||||
|
||||
<a href='/method/help.getAppConfig'>help.getAppConfig</a>#98914110 = <a href='/type/JSONValue'>JSONValue</a>;</code></pre>
|
||||
<p>The <a href="/method/help.getAppConfig">help.getAppConfig</a> method returns a JSON object containing rapidly evolving, client-specific configuration parameters.<br>
|
||||
While <a href="/method/help.getConfig">help.getConfig</a> returns MTProto-specific configuration with information about server-side limitations and other MTProto-related information, <a href="/method/help.getAppConfig">help.getAppConfig</a> returns configuration parameters useful for graphical Telegram clients.</p>
|
||||
<p>Typical fields included in the resulting JSON object are: </p>
|
||||
<ul>
|
||||
<li><code>emojies_animated_zoom</code> - <a href="/api/animated-emojis">Animated emojis</a> and <a href="/api/dice">animated dice</a> should be scaled by this factor before being shown to the user (float)</li>
|
||||
<li><code>keep_alive_service</code> - Whether app clients should start a keepalive service to keep the app running and fetch updates even when the app is closed (boolean)</li>
|
||||
<li><code>background_connection</code> - Whether app clients should start a background TCP connection for MTProto update fetching (boolean)</li>
|
||||
<li><code>emojies_send_dice</code> - A list of supported <a href="/api/dice">animated dice</a> stickers (array of strings).</li>
|
||||
<li><code>emojies_send_dice_success</code> - For <a href="/api/dice">animated dice</a> emojis other than the basic <img class="emoji" src="//telegram.org/img/emoji/40/F09F8EB2.png" width="20" height="20" alt="🎲" />, indicates the winning dice value and the final frame of the animated sticker, at which to show the fireworks <img class="emoji" src="//telegram.org/img/emoji/40/F09F8E86.png" width="20" height="20" alt="🎆" /> (object with emoji keys and object values, containing <code>value</code> and <code>frame_start</code> float values)</li>
|
||||
<li><code>emojies_sounds</code> - A map of soundbites to be played when the user clicks on the specified <a href="/api/animated-emojis">animated emoji</a>; the <a href="/api/file_reference">file reference field</a> should be base64-decoded before <a href="/api/files">downloading the file</a> (map of <a href="/api/files">file IDs</a>, with emoji string keys)</li>
|
||||
<li><code>gif_search_branding</code> - Specifies the name of the service providing GIF search through <a href="#mtproto-configuration">gif_search_username</a> (string)</li>
|
||||
<li><code>gif_search_emojies</code> - Specifies a list of emojies that should be suggested as search term in a bar above the GIF search box (array of string emojis)</li>
|
||||
<li><code>stickers_emoji_suggest_only_api</code> - Specifies that the app should not display local sticker suggestions for emojis at all and just use the result of <a href="/method/messages.getStickers">messages.getStickers</a> (bool)</li>
|
||||
<li><code>stickers_emoji_cache_time</code> - Specifies the validity period of the local cache of <a href="/method/messages.getStickers">messages.getStickers</a>, also relevant when generating the <a href="/api/offsets#hash-generation">pagination hash</a> when invoking the method. (int)</li>
|
||||
<li><code>qr_login_camera</code> - Whether the Settings->Devices menu should show an option to scan a <a href="/api/qr-login">QR login code</a> (boolean)</li>
|
||||
<li><code>qr_login_code</code> - Whether the login screen should show a <a href="/api/qr-login">QR code login option</a>, possibly as default login method (string, "disabled", "primary" or "secondary")</li>
|
||||
<li><code>dialog_filters_enabled</code> - Whether clients should show an option for managing <a href="/api/folders">dialog filters AKA folders</a> (boolean)</li>
|
||||
<li><code>dialog_filters_tooltip</code> - Whether clients should actively show a tooltip, inviting the user to configure <a href="/api/folders">dialog filters AKA folders</a>; typically this happens when the chat list is long enough to start getting cluttered. (boolean)</li>
|
||||
<li><code>autoarchive_setting_available</code> - Whether clients <em>can</em> invoke <a href="/method/account.setGlobalPrivacySettings">account.setGlobalPrivacySettings</a> with <a href="/constructor/globalPrivacySettings"><code>globalPrivacySettings.archive_and_mute_new_noncontact_peers = boolTrue</code></a>, to automatically archive and mute new incoming chats from non-contacts. (boolean)</li>
|
||||
<li><code>pending_suggestions</code> - Contains a list of suggestions that should be actively shown as a tooltip to the user. (Array of strings, possible values shown <a href="#suggestions">in the suggestions section »</a>. </li>
|
||||
<li><code>url_auth_domains</code> - A list of domains that support automatic login with manual user confirmation, <a href="/api/url-authorization#link-url-authorization">click here for more info on URL authorization »</a>. (array of strings)</li>
|
||||
<li><code>autologin_domains</code> - A list of Telegram domains that support automatic login with no user confirmation, <a href="/api/url-authorization#link-url-authorization">click here for more info on URL authorization »</a>. (array of strings)</li>
|
||||
<li><code>autologin_token</code> - Autologin token, <a href="/api/url-authorization#link-url-authorization">click here for more info on URL authorization »</a>. (string)</li>
|
||||
<li><code>round_video_encoding</code> - Contains a set of recommended codec parameters for round videos. </li>
|
||||
<li><code>chat_read_mark_size_threshold</code> - Per-user read receipts, fetchable using <a href="/method/messages.getMessageReadParticipants">messages.getMessageReadParticipants</a> will be available in groups with less than <code>chat_read_mark_size_threshold</code> participants. (int)</li>
|
||||
<li><code>chat_read_mark_expire_period</code> - To protect user privacy, read receipts are only stored for <code>chat_read_mark_expire_period</code> seconds after the message was sent. (int)</li>
|
||||
</ul>
|
||||
<p>Example value: </p>
|
||||
<pre><code class="language-json">{
|
||||
"test": 1,
|
||||
"emojies_animated_zoom": 0.625,
|
||||
"emojies_send_dice": [
|
||||
"\ud83c\udfb2",
|
||||
"\ud83c\udfaf",
|
||||
"\ud83c\udfc0",
|
||||
"\u26bd",
|
||||
"\u26bd\ufe0f",
|
||||
"\ud83c\udfb0",
|
||||
"\ud83c\udfb3"
|
||||
],
|
||||
"emojies_send_dice_success": {
|
||||
"\ud83c\udfaf": {
|
||||
"value": 6,
|
||||
"frame_start": 62
|
||||
},
|
||||
"\ud83c\udfc0": {
|
||||
"value": 5,
|
||||
"frame_start": 110
|
||||
},
|
||||
"\u26bd": {
|
||||
"value": 5,
|
||||
"frame_start": 110
|
||||
},
|
||||
"\u26bd\ufe0f": {
|
||||
"value": 5,
|
||||
"frame_start": 110
|
||||
},
|
||||
"\ud83c\udfb0": {
|
||||
"value": 64,
|
||||
"frame_start": 110
|
||||
},
|
||||
"\ud83c\udfb3": {
|
||||
"value": 6,
|
||||
"frame_start": 110
|
||||
}
|
||||
},
|
||||
"emojies_sounds": {
|
||||
"\ud83c\udf83": {
|
||||
"id": "4956223179606458539",
|
||||
"access_hash": "-2107001400913062971",
|
||||
"file_reference_base64": "AGFhvoKbftK5O9K9RpgN1ZtgSzWy"
|
||||
},
|
||||
"\u26b0": {
|
||||
"id": "4956223179606458540",
|
||||
"access_hash": "-1498869544183595185",
|
||||
"file_reference_base64": "AGFhvoJIm8Uz0qSMIdm3AsKlK7wJ"
|
||||
},
|
||||
"\ud83e\udddf\u200d\u2642": {
|
||||
"id": "4960929110848176331",
|
||||
"access_hash": "3986395821757915468",
|
||||
"file_reference_base64": "AGFhvoLtXSSIclmvfg6ePz3KsHQF"
|
||||
},
|
||||
"\ud83e\udddf": {
|
||||
"id": "4960929110848176332",
|
||||
"access_hash": "-8929417974289765626",
|
||||
"file_reference_base64": "AGFhvoImaz5Umt4GvMUD5nocIu0W"
|
||||
},
|
||||
"\ud83e\udddf\u200d\u2640": {
|
||||
"id": "4960929110848176333",
|
||||
"access_hash": "9161696144162881753",
|
||||
"file_reference_base64": "AGFhvoIm1QZsb48xlpRfh4Mq7EMG"
|
||||
},
|
||||
"\ud83c\udf51": {
|
||||
"id": "4963180910661861548",
|
||||
"access_hash": "-7431729439735063448",
|
||||
"file_reference_base64": "AGFhvoKLrwl_WKr5LR0Jjs7o3RyT"
|
||||
},
|
||||
"\ud83c\udf8a": {
|
||||
"id": "5094064004578410732",
|
||||
"access_hash": "8518192996098758509",
|
||||
"file_reference_base64": "AGFhvoKMNffRV2J3vKED0O6d8e42"
|
||||
},
|
||||
"\ud83c\udf84": {
|
||||
"id": "5094064004578410733",
|
||||
"access_hash": "-4142643820629256996",
|
||||
"file_reference_base64": "AGFhvoJ1ulPBbXEURlTZWwJFx6xZ"
|
||||
},
|
||||
"\ud83e\uddbe": {
|
||||
"id": "5094064004578410734",
|
||||
"access_hash": "-8934384022571962340",
|
||||
"file_reference_base64": "AGFhvoL4zdMRmYv9z3L8KPaX4JQL"
|
||||
}
|
||||
},
|
||||
"gif_search_branding": "tenor",
|
||||
"gif_search_emojies": [
|
||||
"\ud83d\udc4d",
|
||||
"\ud83d\ude18",
|
||||
"\ud83d\ude0d",
|
||||
"\ud83d\ude21",
|
||||
"\ud83e\udd73",
|
||||
"\ud83d\ude02",
|
||||
"\ud83d\ude2e",
|
||||
"\ud83d\ude44",
|
||||
"\ud83d\ude0e",
|
||||
"\ud83d\udc4e"
|
||||
],
|
||||
"stickers_emoji_suggest_only_api": false,
|
||||
"stickers_emoji_cache_time": 86400,
|
||||
"qr_login_camera": false,
|
||||
"qr_login_code": "disabled",
|
||||
"dialog_filters_enabled": true,
|
||||
"dialog_filters_tooltip": false,
|
||||
"autoarchive_setting_available": false,
|
||||
"pending_suggestions": [
|
||||
"AUTOARCHIVE_POPULAR",
|
||||
"VALIDATE_PASSWORD",
|
||||
"VALIDATE_PHONE_NUMBER",
|
||||
"NEWCOMER_TICKS"
|
||||
],
|
||||
"autologin_token": "string",
|
||||
"autologin_domains": [
|
||||
"instantview.telegram.org",
|
||||
"translations.telegram.org",
|
||||
"contest.dev",
|
||||
"contest.com",
|
||||
"bugs.telegram.org",
|
||||
"suggestions.telegram.org",
|
||||
"themes.telegram.org"
|
||||
],
|
||||
"url_auth_domains": [
|
||||
"somedomain.telegram.org"
|
||||
],
|
||||
"round_video_encoding": {
|
||||
"diameter": 384,
|
||||
"video_bitrate": 1000,
|
||||
"audio_bitrate": 64,
|
||||
"max_size": 12582912
|
||||
},
|
||||
"chat_read_mark_size_threshold": 50,
|
||||
"chat_read_mark_expire_period": 604800
|
||||
}</code></pre>
|
||||
<h3><a class="anchor" href="#suggestions" id="suggestions" name="suggestions"><i class="anchor-icon"></i></a>Suggestions</h3>
|
||||
<p>The API can return a set of useful suggestions for users of graphical clients. </p>
|
||||
<h4><a class="anchor" href="#basic-suggestions" id="basic-suggestions" name="basic-suggestions"><i class="anchor-icon"></i></a>Basic suggestions</h4>
|
||||
<pre><code><a href='/constructor/jsonObjectValue'>jsonObjectValue</a>#c0de1bd9 key:<a href='/type/string'>string</a> value:<a href='/type/JSONValue'>JSONValue</a> = <a href='/type/JSONObjectValue'>JSONObjectValue</a>;
|
||||
|
||||
<a href='/constructor/jsonNull'>jsonNull</a>#3f6d7b68 = <a href='/type/JSONValue'>JSONValue</a>;
|
||||
<a href='/constructor/jsonBool'>jsonBool</a>#c7345e6a value:<a href='/type/Bool'>Bool</a> = <a href='/type/JSONValue'>JSONValue</a>;
|
||||
<a href='/constructor/jsonNumber'>jsonNumber</a>#2be0dfa4 value:<a href='/type/double'>double</a> = <a href='/type/JSONValue'>JSONValue</a>;
|
||||
<a href='/constructor/jsonString'>jsonString</a>#b71e767a value:<a href='/type/string'>string</a> = <a href='/type/JSONValue'>JSONValue</a>;
|
||||
<a href='/constructor/jsonArray'>jsonArray</a>#f7444763 value:<a href='/type/Vector%20t'>Vector</a><<a href='/type/JSONValue'>JSONValue</a>> = <a href='/type/JSONValue'>JSONValue</a>;
|
||||
<a href='/constructor/jsonObject'>jsonObject</a>#99c1d49d value:<a href='/type/Vector%20t'>Vector</a><<a href='/type/JSONObjectValue'>JSONObjectValue</a>> = <a href='/type/JSONValue'>JSONValue</a>;
|
||||
|
||||
---functions---
|
||||
|
||||
<a href='/method/help.getAppConfig'>help.getAppConfig</a>#98914110 = <a href='/type/JSONValue'>JSONValue</a>;</code></pre>
|
||||
<p>The <a href="/method/help.getAppConfig">help.getAppConfig</a> method returns a JSON object containing rapidly evolving, client-specific configuration parameters.<br>
|
||||
A full list of these parameters can be seen in the <a href="#client-configuration">Client Configuration section »</a>, but we're mostly interested in the <code>pending_suggestions</code> and <code>autoarchive_setting_available</code> fields of the returned JSON object: </p>
|
||||
<ul>
|
||||
<li><code>autoarchive_setting_available</code> - Whether clients <em>can</em> invoke <a href="/method/account.setGlobalPrivacySettings">account.setGlobalPrivacySettings</a> with <a href="/constructor/globalPrivacySettings"><code>globalPrivacySettings.archive_and_mute_new_noncontact_peers = boolTrue</code></a>, to automatically archive and mute new incoming chats from non-contacts. (boolean)</li>
|
||||
<li><code>pending_suggestions</code> - Contains a list of suggestions that should be actively shown as a tooltip to the user. Array of strings, possible values shown below:<ul>
|
||||
<li><code>"AUTOARCHIVE_POPULAR"</code> - Users <em>should</em> invoke <a href="/method/account.setGlobalPrivacySettings">account.setGlobalPrivacySettings</a> with <a href="/constructor/globalPrivacySettings"><code>globalPrivacySettings.archive_and_mute_new_noncontact_peers = boolTrue</code></a>, to automatically archive and mute new incoming chats from non-contacts.</li>
|
||||
<li><code>"VALIDATE_PASSWORD"</code> - Users should make sure they still remember their <a href="/api/srp">2-step verification password</a>.</li>
|
||||
<li><code>"VALIDATE_PHONE_NUMBER"</code> - Users should check whether their <a href="/api/auth">authorization phone number</a> is correct and change the phone number if it is inaccessible.</li>
|
||||
<li><code>"NEWCOMER_TICKS"</code> - Show the user a hint about the meaning of one and two ticks on sent messages.</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#channel-suggestions" id="channel-suggestions" name="channel-suggestions"><i class="anchor-icon"></i></a>Channel suggestions</h4>
|
||||
<pre><code><a href='/constructor/messages.chatFull'>messages.chatFull</a>#e5d7d19c full_chat:<a href='/type/ChatFull'>ChatFull</a> chats:<a href='/type/Vector%20t'>Vector</a><<a href='/type/Chat'>Chat</a>> users:<a href='/type/Vector%20t'>Vector</a><<a href='/type/User'>User</a>> = <a href='/type/messages.ChatFull'>messages.ChatFull</a>;
|
||||
|
||||
<a href='/constructor/channelFull'>channelFull</a>#e9b27a17 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/long'>long</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:flags.23?<a href='/type/ExportedChatInvite'>ExportedChatInvite</a> bot_info:<a href='/type/Vector%20t'>Vector</a><<a href='/type/BotInfo'>BotInfo</a>> migrated_from_chat_id:flags.4?<a href='/type/long'>long</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/long'>long</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> call:flags.21?<a href='/type/InputGroupCall'>InputGroupCall</a> ttl_period:flags.24?<a href='/type/int'>int</a> pending_suggestions:flags.25?<a href='/type/Vector%20t'>Vector</a><<a href='/type/string'>string</a>> groupcall_default_join_as:flags.26?<a href='/type/Peer'>Peer</a> theme_emoticon:flags.27?<a href='/type/string'>string</a> = <a href='/type/ChatFull'>ChatFull</a>;
|
||||
|
||||
---functions---
|
||||
|
||||
<a href='/method/channels.getFullChannel'>channels.getFullChannel</a>#8736a09 channel:<a href='/type/InputChannel'>InputChannel</a> = <a href='/type/messages.ChatFull'>messages.ChatFull</a>;</code></pre>
|
||||
<p>Some <a href="/api/channel">channel/supergroup</a>-related suggestions can also be contained in the <code>pending_suggestions</code> field of the <a href="/constructor/channelFull">channelFull</a> constructor, returned by <a href="/method/channels.getFullChannel">channels.getFullChannel</a>.<br>
|
||||
Here's a list of possible suggestions: </p>
|
||||
<ul>
|
||||
<li><code>CONVERT_GIGAGROUP</code> - The <a href="/api/channel">supergroup</a> has many participants: the admin should call <a href="/method/channels.convertToGigagroup">channels.convertToGigagroup</a> to convert it to a gigagroup.</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#dismissing-suggestions" id="dismissing-suggestions" name="dismissing-suggestions"><i class="anchor-icon"></i></a>Dismissing suggestions</h4>
|
||||
<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>;
|
||||
|
||||
---functions---
|
||||
|
||||
<a href='/method/help.dismissSuggestion'>help.dismissSuggestion</a>#f50dbaa1 peer:<a href='/type/InputPeer'>InputPeer</a> suggestion:<a href='/type/string'>string</a> = <a href='/type/Bool'>Bool</a>;</code></pre>
|
||||
<p><a href="/method/help.dismissSuggestion">help.dismissSuggestion</a> can be used to dismiss a suggestion.<br>
|
||||
Pass <a href="/constructor/inputPeerEmpty">inputPeerEmpty</a> to <code>peer</code> for <a href="#basic-suggestions">basic suggestions</a> and the <a href="/api/channel">channel/supergroup</a>'s peer for <a href="#channel-suggestions">channel suggestions</a>.</p>
|
||||
<h3><a class="anchor" href="#app-specific-configuration" id="app-specific-configuration" name="app-specific-configuration"><i class="anchor-icon"></i></a>App-specific configuration</h3>
|
||||
<pre><code><a href='/constructor/help.appUpdate'>help.appUpdate</a>#ccbbce30 flags:<a href='/type/%23'>#</a> can_not_skip:flags.0?<a href='/constructor/true'>true</a> id:<a href='/type/int'>int</a> version:<a href='/type/string'>string</a> text:<a href='/type/string'>string</a> entities:<a href='/type/Vector%20t'>Vector</a><<a href='/type/MessageEntity'>MessageEntity</a>> document:flags.1?<a href='/type/Document'>Document</a> url:flags.2?<a href='/type/string'>string</a> sticker:flags.3?<a href='/type/Document'>Document</a> = <a href='/type/help.AppUpdate'>help.AppUpdate</a>;
|
||||
<a href='/constructor/help.noAppUpdate'>help.noAppUpdate</a>#c45a6536 = <a href='/type/help.AppUpdate'>help.AppUpdate</a>;
|
||||
|
||||
<a href='/constructor/updates'>updates</a>#74ae4240 updates:<a href='/type/Vector%20t'>Vector</a><<a href='/type/Update'>Update</a>> users:<a href='/type/Vector%20t'>Vector</a><<a href='/type/User'>User</a>> chats:<a href='/type/Vector%20t'>Vector</a><<a href='/type/Chat'>Chat</a>> date:<a href='/type/int'>int</a> seq:<a href='/type/int'>int</a> = <a href='/type/Updates'>Updates</a>;
|
||||
<a href='/constructor/updateServiceNotification'>updateServiceNotification</a>#ebe46819 flags:<a href='/type/%23'>#</a> popup:flags.0?<a href='/constructor/true'>true</a> inbox_date:flags.1?<a href='/type/int'>int</a> type:<a href='/type/string'>string</a> message:<a href='/type/string'>string</a> media:<a href='/type/MessageMedia'>MessageMedia</a> entities:<a href='/type/Vector%20t'>Vector</a><<a href='/type/MessageEntity'>MessageEntity</a>> = <a href='/type/Update'>Update</a>;
|
||||
|
||||
<a href='/constructor/help.inviteText'>help.inviteText</a>#18cb9f78 message:<a href='/type/string'>string</a> = <a href='/type/help.InviteText'>help.InviteText</a>;
|
||||
|
||||
---functions---
|
||||
|
||||
<a href='/method/help.getAppUpdate'>help.getAppUpdate</a>#522d5a7d source:<a href='/type/string'>string</a> = <a href='/type/help.AppUpdate'>help.AppUpdate</a>;
|
||||
<a href='/method/help.getAppChangelog'>help.getAppChangelog</a>#9010ef6f prev_app_version:<a href='/type/string'>string</a> = <a href='/type/Updates'>Updates</a>;
|
||||
|
||||
<a href='/method/help.getInviteText'>help.getInviteText</a>#4d392343 = <a href='/type/help.InviteText'>help.InviteText</a>;</code></pre>
|
||||
<ul>
|
||||
<li><a href="/method/help.getAppUpdate">help.getAppUpdate</a> - Get info about an application update, can contain the updated application binary in the attached document</li>
|
||||
<li><a href="/method/help.getAppChangelog">help.getAppChangelog</a> - Get a list of service messages with app-specific changelogs</li>
|
||||
<li><a href="/method/help.getInviteText">help.getInviteText</a> - Returns a localized invitation message that can be sent via SMS to contacts that haven't signed up to Telegram yet</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" href="#terms-of-service" id="terms-of-service" name="terms-of-service"><i class="anchor-icon"></i></a>Terms of service</h3>
|
||||
<pre><code><a href='/constructor/help.termsOfServiceUpdateEmpty'>help.termsOfServiceUpdateEmpty</a>#e3309f7f expires:<a href='/type/int'>int</a> = <a href='/type/help.TermsOfServiceUpdate'>help.TermsOfServiceUpdate</a>;
|
||||
<a href='/constructor/help.termsOfServiceUpdate'>help.termsOfServiceUpdate</a>#28ecf961 expires:<a href='/type/int'>int</a> terms_of_service:<a href='/type/help.TermsOfService'>help.TermsOfService</a> = <a href='/type/help.TermsOfServiceUpdate'>help.TermsOfServiceUpdate</a>;
|
||||
|
||||
<a href='/constructor/help.termsOfService'>help.termsOfService</a>#780a0310 flags:<a href='/type/%23'>#</a> popup:flags.0?<a href='/constructor/true'>true</a> id:<a href='/type/DataJSON'>DataJSON</a> text:<a href='/type/string'>string</a> entities:<a href='/type/Vector%20t'>Vector</a><<a href='/type/MessageEntity'>MessageEntity</a>> min_age_confirm:flags.1?<a href='/type/int'>int</a> = <a href='/type/help.TermsOfService'>help.TermsOfService</a>;
|
||||
|
||||
<a href='/constructor/auth.authorizationSignUpRequired'>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>;
|
||||
|
||||
---functions---
|
||||
|
||||
<a href='/method/help.getTermsOfServiceUpdate'>help.getTermsOfServiceUpdate</a>#2ca51fd1 = <a href='/type/help.TermsOfServiceUpdate'>help.TermsOfServiceUpdate</a>;
|
||||
<a href='/method/help.acceptTermsOfService'>help.acceptTermsOfService</a>#ee72f79a id:<a href='/type/DataJSON'>DataJSON</a> = <a href='/type/Bool'>Bool</a>;
|
||||
|
||||
<a href='/method/auth.signIn'>auth.signIn</a>#bcd51581 phone_number:<a href='/type/string'>string</a> phone_code_hash:<a href='/type/string'>string</a> phone_code:<a href='/type/string'>string</a> = <a href='/type/auth.Authorization'>auth.Authorization</a>;
|
||||
|
||||
<a href='/method/account.deleteAccount'>account.deleteAccount</a>#418d4e0b reason:<a href='/type/string'>string</a> = <a href='/type/Bool'>Bool</a>;</code></pre>
|
||||
<p>These methods can be used for managing consent to Telegram's <a href="https://telegram.org/tos">Terms Of Service</a>. </p>
|
||||
<p>Typically, before a user <a href="/api/auth#sign-insign-up">signs up</a> by invoking <a href="/method/auth.signUp">auth.signUp</a>, apps should show a pop-up (if the <code>popup</code> flag of the <a href="/constructor/help.termsOfService">help.termsOfService</a> method is set), asking the user to accept Telegram's terms of service; in case of denial, the user is to be returned to the initial page of the login flow. </p>
|
||||
<p>When signing up for the first time, the <a href="/constructor/help.termsOfService">help.termsOfService</a> is to be obtained from the <a href="/constructor/auth.authorizationSignUpRequired">auth.authorizationSignUpRequired</a> constructor returned by the <a href="/method/auth.signIn">auth.signIn</a>. </p>
|
||||
<p>After signing up, or when logging in as an existing user, apps are supposed to call <a href="/method/help.getTermsOfServiceUpdate">help.getTermsOfServiceUpdate</a> to check for any updates to the Terms of Service; this call should be repeated after <code>expires</code> seconds have elapsed.<br>
|
||||
If an update to the Terms Of Service is available, clients are supposed to show a consent popup; if accepted, clients should call <a href="/method/help.acceptTermsOfService">help.acceptTermsOfService</a>, providing the <a href="/constructor/help.termsOfService">termsOfService <code>id</code> JSON object</a>; in case of denial, clients are to delete the account using <a href="/method/account.deleteAccount">account.deleteAccount</a>, providing <code>Decline ToS update</code> as deletion <code>reason</code>. </p>
|
||||
<p>Example implementation: <a href="https://github.com/DrKLO/Telegram/blob/dbf81a34affcd1c24d78e1403347ea8b3a186154/TMessagesProj/src/main/java/org/telegram/ui/LoginActivity.java#L3510">android (signup)</a>, <a href="https://github.com/DrKLO/Telegram/blob/ed9e38da5b3b6ca80a7cb719a000d310d07497b0/TMessagesProj/src/main/java/org/telegram/ui/Components/TermsOfServiceView.java">android (after login)</a></p>
|
||||
<h3><a class="anchor" href="#telegram-support-info" id="telegram-support-info" name="telegram-support-info"><i class="anchor-icon"></i></a>Telegram support info</h3>
|
||||
<pre><code><a href='/constructor/user'>user</a>#3ff6ecb0 flags:<a href='/type/%23'>#</a> self:flags.10?<a href='/constructor/true'>true</a> contact:flags.11?<a href='/constructor/true'>true</a> mutual_contact:flags.12?<a href='/constructor/true'>true</a> deleted:flags.13?<a href='/constructor/true'>true</a> bot:flags.14?<a href='/constructor/true'>true</a> bot_chat_history:flags.15?<a href='/constructor/true'>true</a> bot_nochats:flags.16?<a href='/constructor/true'>true</a> verified:flags.17?<a href='/constructor/true'>true</a> restricted:flags.18?<a href='/constructor/true'>true</a> min:flags.20?<a href='/constructor/true'>true</a> bot_inline_geo:flags.21?<a href='/constructor/true'>true</a> support:flags.23?<a href='/constructor/true'>true</a> scam:flags.24?<a href='/constructor/true'>true</a> apply_min_photo:flags.25?<a href='/constructor/true'>true</a> fake:flags.26?<a href='/constructor/true'>true</a> id:<a href='/type/long'>long</a> access_hash:flags.0?<a href='/type/long'>long</a> first_name:flags.1?<a href='/type/string'>string</a> last_name:flags.2?<a href='/type/string'>string</a> username:flags.3?<a href='/type/string'>string</a> phone:flags.4?<a href='/type/string'>string</a> photo:flags.5?<a href='/type/UserProfilePhoto'>UserProfilePhoto</a> status:flags.6?<a href='/type/UserStatus'>UserStatus</a> bot_info_version:flags.14?<a href='/type/int'>int</a> restriction_reason:flags.18?<a href='/type/Vector%20t'>Vector</a><<a href='/type/RestrictionReason'>RestrictionReason</a>> bot_inline_placeholder:flags.19?<a href='/type/string'>string</a> lang_code:flags.22?<a href='/type/string'>string</a> = <a href='/type/User'>User</a>;
|
||||
|
||||
<a href='/constructor/help.support'>help.support</a>#17c6b5f6 phone_number:<a href='/type/string'>string</a> user:<a href='/type/User'>User</a> = <a href='/type/help.Support'>help.Support</a>;
|
||||
<a href='/constructor/help.supportName'>help.supportName</a>#8c05f1c9 name:<a href='/type/string'>string</a> = <a href='/type/help.SupportName'>help.SupportName</a>;
|
||||
|
||||
---functions---
|
||||
|
||||
<a href='/method/help.getSupport'>help.getSupport</a>#9cdf08cd = <a href='/type/help.Support'>help.Support</a>;
|
||||
<a href='/method/help.getSupportName'>help.getSupportName</a>#d360e72c = <a href='/type/help.SupportName'>help.SupportName</a>;</code></pre>
|
||||
<p>These methods can be used for fetching info about Telegram's support user, that users can use to get support and ask questions about the app. </p>
|
||||
<ul>
|
||||
<li><a href="/method/help.getSupport">help.getSupport</a> - Will return the <a href="/constructor/user">user</a> object that can be used for contacting support.</li>
|
||||
<li><a href="/method/help.getSupportName">help.getSupportName</a> - Will return a localized name for the support chat.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" href="#country-information-and-login-phone-patterns" id="country-information-and-login-phone-patterns" name="country-information-and-login-phone-patterns"><i class="anchor-icon"></i></a>Country information and login phone patterns</h3>
|
||||
<pre><code><a href='/constructor/help.countryCode'>help.countryCode</a>#4203c5ef flags:<a href='/type/%23'>#</a> country_code:<a href='/type/string'>string</a> prefixes:flags.0?<a href='/type/Vector%20t'>Vector</a><<a href='/type/string'>string</a>> patterns:flags.1?<a href='/type/Vector%20t'>Vector</a><<a href='/type/string'>string</a>> = <a href='/type/help.CountryCode'>help.CountryCode</a>;
|
||||
|
||||
<a href='/constructor/help.country'>help.country</a>#c3878e23 flags:<a href='/type/%23'>#</a> hidden:flags.0?<a href='/constructor/true'>true</a> iso2:<a href='/type/string'>string</a> default_name:<a href='/type/string'>string</a> name:flags.1?<a href='/type/string'>string</a> country_codes:<a href='/type/Vector%20t'>Vector</a><<a href='/type/help.CountryCode'>help.CountryCode</a>> = <a href='/type/help.Country'>help.Country</a>;
|
||||
|
||||
<a href='/constructor/help.countriesListNotModified'>help.countriesListNotModified</a>#93cc1f32 = <a href='/type/help.CountriesList'>help.CountriesList</a>;
|
||||
<a href='/constructor/help.countriesList'>help.countriesList</a>#87d0759e countries:<a href='/type/Vector%20t'>Vector</a><<a href='/type/help.Country'>help.Country</a>> hash:<a href='/type/int'>int</a> = <a href='/type/help.CountriesList'>help.CountriesList</a>;
|
||||
|
||||
---functions---
|
||||
<a href='/method/help.getCountriesList'>help.getCountriesList</a>#735787a8 lang_code:<a href='/type/string'>string</a> hash:<a href='/type/int'>int</a> = <a href='/type/help.CountriesList'>help.CountriesList</a>;</code></pre>
|
||||
<p><a href="/method/help.getCountriesList">help.getCountriesList</a> can be used to fetch a list of localized names for all available countries and phone code patterns for logging in. </p>
|
||||
<p>The phone code pattern should be used when showing the <a href="/api/auth">login</a> screen, or when changing phone number: for example, a pattern value of <code>XXX XXX XXX</code> with <code>country_code</code> <code>+39</code> indicates that the phone field for login should accept a spaced pattern like <code>+39 123 456 789</code>.<br>
|
||||
Also, the beginning of the national part of the phone number (<code>123 456 789</code>) should match one of the <code>prefixes</code>, if any were returned. </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?43"></script>
|
||||
<script src="/js/jquery.min.js?1"></script>
|
||||
<script src="/js/bootstrap.min.js?1"></script>
|
||||
|
||||
<script>window.initDevPageNav&&initDevPageNav();
|
||||
backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
244
data/core.telegram.org/api/end-to-end.html
Normal file
244
data/core.telegram.org/api/end-to-end.html
Normal file
|
@ -0,0 +1,244 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>End-to-End Encryption, Secret Chats</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="New feature for end-to-end-encrypted messaging.">
|
||||
<meta property="og:title" content="End-to-End Encryption, Secret Chats">
|
||||
<meta property="og:image" content="842181036bcb572cf0">
|
||||
<meta property="og:description" content="New feature for end-to-end-encrypted messaging.">
|
||||
<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?215" 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/end-to-end" >End-to-End Encryption, Secret Chats</a></li></ul></div>
|
||||
<h1 id="dev_page_title">End-to-End Encryption, Secret Chats</h1>
|
||||
|
||||
<div id="dev_page_content"><!-- scroll_nav -->
|
||||
|
||||
<blockquote>
|
||||
<p>This article on MTProto's End-to-End encryption is meant for <strong>advanced users</strong>.
|
||||
If you want to learn more about <a href="https://telegram.org/faq#secret-chats">Secret Chats</a> from a less intimidating source, kindly see our <a href="https://telegram.org/faq#secret-chats">general FAQ</a>.</p>
|
||||
</blockquote>
|
||||
<blockquote>
|
||||
<p>Note that as of version 4.6, major Telegram clients are using <strong>MTProto 2.0</strong>.
|
||||
MTProto v.1.0 is deprecated and is currently being phased out.</p>
|
||||
</blockquote>
|
||||
<hr>
|
||||
<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="/mtproto/security_guidelines">Security guidelines for developers</a></li>
|
||||
<li><a href="/api/end-to-end/pfs">Perfect Forward Secrecy in Secret Chats</a></li>
|
||||
<li><a href="/api/end-to-end/seq_no">Sequence numbers in Secret Chats</a></li>
|
||||
<li><a href="/schema/end-to-end">End-to-End TL Schema</a></li>
|
||||
</ul>
|
||||
<p></div></p>
|
||||
<hr>
|
||||
<p>Secret Chats are one-on-one chats wherein messages are encrypted with a key held only by the chat’s participants. Note that the <a href="/schema/end-to-end">schema</a> for these end-to-end encrypted Secret Chats is different from what is used for <a href="/mtproto">cloud chats</a>:</p>
|
||||
<div>
|
||||
<a href="/file/811140633/4/hHw6Zy2DPyQ.109500/cabc10049a7190694f" target="_blank"><img src="/file/811140633/4/hHw6Zy2DPyQ.109500/cabc10049a7190694f" title="End-to-end encryption in MTProto 2.0 (Secret Chats)" class="dev_page_image" style="max-width: 600px"></a>
|
||||
</div>
|
||||
<h4><a class="anchor" href="#a-note-on-mtproto-20" id="a-note-on-mtproto-20" name="a-note-on-mtproto-20"><i class="anchor-icon"></i></a>A note on MTProto 2.0</h4>
|
||||
<p>This article describes the end-to-end encryption layer in the MTProto protocol version <strong>2.0</strong>.
|
||||
The principal differences from version 1.0 (<a href="/api/end-to-end_v1">described here</a> for reference) are as follows:</p>
|
||||
<ul>
|
||||
<li>SHA-256 is used instead of SHA-1;</li>
|
||||
<li>Padding bytes are involved in the computation of msg_key;</li>
|
||||
<li>msg_key depends not only on the message to be encrypted, but on a portion of the secret chat key as well;</li>
|
||||
<li>12..1024 padding bytes are used instead of 0..15 padding bytes in v.1.0.</li>
|
||||
</ul>
|
||||
<p>See also: <a href="https://core.telegram.org/mtproto">MTProto 2.0: Cloud Chats, server-client encryption</a></p>
|
||||
<h3><a class="anchor" href="#key-generation" id="key-generation" name="key-generation"><i class="anchor-icon"></i></a>Key Generation</h3>
|
||||
<p>Keys are generated using the <a href="https://en.wikipedia.org/wiki/Diffie%E2%80%93Hellman_key_exchange">Diffie-Hellman protocol</a>.</p>
|
||||
<p>Let us consider the following scenario: User <strong>A</strong> would like to initiate end-to-end encrypted communication with User <strong>B</strong>.</p>
|
||||
<h4><a class="anchor" href="#sending-a-request" id="sending-a-request" name="sending-a-request"><i class="anchor-icon"></i></a>Sending a Request</h4>
|
||||
<p>User <strong>A</strong> executes <a href="/method/messages.getDhConfig">messages.getDhConfig</a> to obtain the Diffie-Hellman parameters: a prime <strong>p</strong>, and a high order element <strong>g</strong>.</p>
|
||||
<p>Executing this method before each new key generation procedure is of vital importance. It makes sense to cache the values of the parameters together with the version in order to avoid having to receive all of the values every time. If the version stored on the client is still up-to-date, the server will return the constructor <a href="/constructor/messages.dhConfigNotModified">messages.dhConfigNotModified</a>.</p>
|
||||
<p>Client is expected to check whether <strong>p</strong> is a safe 2048-bit prime (meaning that both <strong>p</strong> and <strong>(p-1)/2</strong> are prime, and that 2^2047 < p < 2^2048), and that <strong>g</strong> generates a cyclic subgroup of prime order <strong>(p-1)/2</strong>, i.e. is a quadratic residue <strong>mod p</strong>. Since <strong>g</strong> is always equal to 2, 3, 4, 5, 6 or 7, this is easily done using quadratic reciprocity law, yielding a simple condition on <strong>p mod 4g</strong> -- namely, <strong>p mod 8 = 7</strong> for <strong>g = 2</strong>; <strong>p mod 3 = 2</strong> for <strong>g = 3</strong>; no extra condition for <strong>g = 4</strong>; <strong>p mod 5 = 1 or 4</strong> for <strong>g = 5</strong>; <strong>p mod 24 = 19 or 23</strong> for <strong>g = 6</strong>; and <strong>p mod 7 = 3, 5 or 6</strong> for <strong>g = 7</strong>. After <strong>g</strong> and <strong>p</strong> have been checked by the client, it makes sense to cache the result, so as to avoid repeating lengthy computations in future. This cache might be shared with one used for <a href="/mtproto/auth_key">Authorization Key generation</a>.</p>
|
||||
<p>If the client needs additional entropy for the random number generator, it can pass the <strong>random_length</strong> parameter (random_length> 0) so the server generates its own random sequence <strong>random</strong> of the appropriate length.
|
||||
<strong>Important</strong>: using the server’s random sequence in its raw form may be unsafe, it must be combined with a client sequence.</p>
|
||||
<p>Client <strong>A</strong> computes a 2048-bit number <strong>a</strong> (using sufficient entropy or the server’s <strong>random</strong>; see above) and executes <a href="/method/messages.requestEncryption">messages.requestEncryption</a> after passing in <code>g_a := pow(g, a) mod dh_prime</code>.</p>
|
||||
<p>User <strong>B</strong> receives the update <a href="/constructor/updateEncryption">updateEncryption</a> for all associated authorization keys (all authorized devices) with the chat constructor <a href="/constructor/encryptedChatRequested">encryptedChatRequested</a>. The user must be shown basic information about User <strong>A</strong> and must be prompted to accept or reject the request.</p>
|
||||
<p>Both clients are to check that <strong>g</strong>, <strong>g_a</strong> and <strong>g_b</strong> are greater than one and smaller than <strong>p-1</strong>. We recommend checking that <strong>g_a</strong> and <strong>g_b</strong> are between <strong>2^{2048-64}</strong> and <strong>p - 2^{2048-64}</strong> as well.</p>
|
||||
<h4><a class="anchor" href="#accepting-a-request" id="accepting-a-request" name="accepting-a-request"><i class="anchor-icon"></i></a>Accepting a Request</h4>
|
||||
<p>After User <strong>B</strong> confirms the creation of a secret chat with <strong>A</strong> in the client interface, Client <strong>B</strong> also receives up-to-date configuration parameters for the Diffie-Hellman method. Thereafter, it generates a random 2048-bit number, <strong>b</strong>, using rules similar to those for <strong>a</strong>. </p>
|
||||
<p>Having received <strong>g_a</strong> from the update with <a href="/constructor/encryptedChatRequested">encryptedChatRequested</a>, it can immediately generate the final shared key: <code>key = (pow(g_a, b) mod dh_prime)</code>. If key length < 256 bytes, add several leading zero bytes as padding — so that the key is exactly 256 bytes long. Its fingerprint, <strong>key_fingerprint</strong>, is equal to the 64 last bits of SHA1 (key). </p>
|
||||
<p><strong>Note 1:</strong> in this particular case SHA1 is used here even for MTProto 2.0 secret chats. </p>
|
||||
<p><strong>Note 2:</strong> this fingerprint is used as a sanity check for the key exchange procedure to detect bugs when developing client software — it is not connected to the key visualization used on the clients as means of external authentication in secret chats. <a href="/api/end-to-end/pfs#key-visualization">Key visualizations</a> on the clients are generated using the first 128 bits of SHA1(initial key) followed by the first 160 bits of SHA256(key used when secret chat was updated to layer 46).</p>
|
||||
<p>Client <strong>B</strong> executes <a href="/method/messages.acceptEncryption">messages.acceptEncryption</a> after passing it <code>g_b := pow(g, b) mod dh_prime</code> and <strong>key_fingerprint</strong>.</p>
|
||||
<p>For all of Client <strong>B’s</strong> authorized devices, except the current one, <a href="/constructor/updateEncryption">updateEncryption</a> updates are sent with the constructor <a href="/constructor/encryptedChatDiscarded">encryptedChatDiscarded</a>. Thereafter, the only device that will be able to access the secret chat is Device <strong>B</strong>, which made the call to <a href="/method/messages.acceptEncryption">messages.acceptEncryption</a>.</p>
|
||||
<p>User <strong>A</strong> will be sent an <a href="/constructor/updateEncryption">updateEncryption</a> update with the constructor <a href="/constructor/encryptedChat">encryptedChat</a>, for the authorization key that initiated the chat.</p>
|
||||
<p>With <strong>g_b</strong> from the update, Client <strong>A</strong> can also compute the shared key <code>key = (pow(g_b, a) mod dh_prime)</code>. If key length < 256 bytes, add several leading zero bytes as padding — so that the key is exactly 256 bytes long. If the fingerprint for the received key is identical to the one that was passed to <a href="/constructor/encryptedChat">encryptedChat</a>, incoming messages can be sent and processed. Otherwise, <a href="/method/messages.discardEncryption">messages.discardEncryption</a> must be executed and the user notified.</p>
|
||||
<h4><a class="anchor" href="#perfect-forward-secrecy" id="perfect-forward-secrecy" name="perfect-forward-secrecy"><i class="anchor-icon"></i></a>Perfect Forward Secrecy</h4>
|
||||
<p>In order to keep past communications safe, official Telegram clients will initiate re-keying once a key has been used to decrypt and encrypt more than 100 messages, or has been in use for more than one week, provided the key has been used to encrypt at least one message. Old keys are then securely discarded and cannot be reconstructed, even with access to the new keys currently in use.</p>
|
||||
<blockquote>
|
||||
<p>The re-keying protocol is further described in this article: <a href="/api/end-to-end/pfs">Perfect Forward Secrecy in Secret Chats</a>.</p>
|
||||
</blockquote>
|
||||
<p>Please note that your client must support Forward Secrecy in Secret Chats to be compatible with official Telegram clients. </p>
|
||||
<h3><a class="anchor" href="#sending-and-receiving-messages-in-a-secret-chat" id="sending-and-receiving-messages-in-a-secret-chat" name="sending-and-receiving-messages-in-a-secret-chat"><i class="anchor-icon"></i></a>Sending and Receiving Messages in a Secret Chat</h3>
|
||||
<h4><a class="anchor" href="#serialization-and-encryption-of-outgoing-messages" id="serialization-and-encryption-of-outgoing-messages" name="serialization-and-encryption-of-outgoing-messages"><i class="anchor-icon"></i></a>Serialization and Encryption of Outgoing Messages</h4>
|
||||
<p>A TL object of type <a href="/type/DecryptedMessage">DecryptedMessage</a> is created and contains the message in plain text. For backward compatibility, the object must be wrapped in the constructor <a href="/constructor/decryptedMessageLayer">decryptedMessageLayer</a> with an indication of the supported layer (starting with 46).</p>
|
||||
<blockquote>
|
||||
<p>The TL-Schema for the contents of end-to-end encrypted messages is available <a href="/schema/end-to-end">here »</a></p>
|
||||
</blockquote>
|
||||
<p>The resulting construct is serialized as an array of bytes using generic TL rules. The resulting array is prepended by 4 bytes containing the array length not counting these 4 bytes. </p>
|
||||
<p>The byte array is padded with 12 to 1024 random padding bytes to make its length divisible by 16 bytes. (In the older MTProto 1.0 encryption, only 0 to 15 padding bytes were used.)</p>
|
||||
<p>Message key, <strong>msg_key</strong>, is computed as the 128 middle bits of the SHA256 of the data obtained in the previous step, prepended by 32 bytes from the shared key <strong>key</strong>. (For the older MTProto 1.0 encryption, <strong>msg_key</strong> was computed differently, as the 128 lower bits of SHA1 of the data obtained in the previous steps, <em>excluding the padding bytes</em>.)</p>
|
||||
<p>For MTProto 2.0, the AES key <strong>aes_key</strong> and initialization vector <strong>aes_iv</strong> are computed ( <strong>key</strong> is the shared key obtained during <a href="#key-generation">Key Generation</a> ) as follows:</p>
|
||||
<ul>
|
||||
<li>msg_key_large = SHA256 (substr (key, 88+x, 32) + plaintext + random_padding);</li>
|
||||
<li>msg_key = substr (msg_key_large, 8, 16);</li>
|
||||
<li>sha256_a = SHA256 (msg_key + substr (key, x, 36));</li>
|
||||
<li>sha256_b = SHA256 (substr (key, 40+x, 36) + msg_key);</li>
|
||||
<li>aes_key = substr (sha256_a, 0, 8) + substr (sha256_b, 8, 16) + substr (sha256_a, 24, 8);</li>
|
||||
<li>aes_iv = substr (sha256_b, 0, 8) + substr (sha256_a, 8, 16) + substr (sha256_b, 24, 8);</li>
|
||||
</ul>
|
||||
<p>For MTProto 2.0, <strong>x=0</strong> for messages from the originator of the secret chat, <strong>x=8</strong> for the messages in the opposite direction.</p>
|
||||
<p><em>For the obsolete MTProto 1.0, msg_key, aes_key, and aes_iv were computed differently (see <a href="/api/end-to-end_v1#serialization-and-encryption-of-outgoing-messages">this document</a> for reference).</em></p>
|
||||
<p>Data is encrypted with a 256-bit key, <strong>aes_key</strong>, and a 256-bit initialization vector, <strong>aes-iv</strong>, using AES-256 encryption with infinite garble extension (IGE). Encryption key fingerprint <strong>key_fingerprint</strong> and the message key <strong>msg_key</strong> are added at the top of the resulting byte array.</p>
|
||||
<p>Encrypted data is embedded into a <a href="/method/messages.sendEncrypted">messages.sendEncrypted</a> API call and passed to Telegram server for delivery to the other party of the Secret Chat.</p>
|
||||
<h4><a class="anchor" href="#upgrading-to-mtproto-20-from-mtproto-10" id="upgrading-to-mtproto-20-from-mtproto-10" name="upgrading-to-mtproto-20-from-mtproto-10"><i class="anchor-icon"></i></a>Upgrading to MTProto 2.0 from MTProto 1.0</h4>
|
||||
<p>As soon as both parties in a secret chat are using at least Layer 73, they should only use MTProto 2.0 for all outgoing messages. Some of the first received messages may use MTProto 1.0, if a sufficiently high starting layer has not been negotiated during the creation of the secret chat. After the first message encrypted with MTProto 2.0 (or the first message with Layer 73 or higher) is received, all messages with higher <a href="#sequence-numbers">sequence numbers</a> must be encrypted with MTProto 2.0 as well.</p>
|
||||
<p>As long as the current layer is lower than 73, each party should try to decrypt received messages with MTProto 1.0, and if this is not successfull (msg_key does not match), try MTProto 2.0. Once the first MTProto 2.0-encrypted message arrives (or the layer is upgraded to 73), there is no need to try MTProto 1.0 decryption for any of the further messages (unless the client is still waiting for some gaps to be closed).</p>
|
||||
<h4><a class="anchor" href="#decrypting-an-incoming-message" id="decrypting-an-incoming-message" name="decrypting-an-incoming-message"><i class="anchor-icon"></i></a>Decrypting an Incoming Message</h4>
|
||||
<p>The steps above are performed in reverse order.
|
||||
When an encrypted message is received, you <strong>must</strong> check that msg_key is <strong>in fact</strong> equal to the 128 middle bits of the SHA256 hash of the decrypted message, prepended by 32 bytes taken from the shared <strong>key</strong>.
|
||||
If the message layer is greater than the one supported by the client, the user must be notified that the client version is out of date and prompted to update.</p>
|
||||
<h4><a class="anchor" href="#sequence-numbers" id="sequence-numbers" name="sequence-numbers"><i class="anchor-icon"></i></a>Sequence numbers</h4>
|
||||
<p>It is necessary to interpret all messages in their original order to protect against possible manipulations. Secret chats support a special mechanism for handling seq_no counters independently from the server.</p>
|
||||
<blockquote>
|
||||
<p>Proper handling of these counters is further described in this article: <a href="/api/end-to-end/seq_no">Sequence numbers in Secret Chats</a>.</p>
|
||||
</blockquote>
|
||||
<p>Please note that your client must support sequence numbers in Secret Chats to be compatible with official Telegram clients. </p>
|
||||
<h4><a class="anchor" href="#sending-encrypted-files" id="sending-encrypted-files" name="sending-encrypted-files"><i class="anchor-icon"></i></a>Sending Encrypted Files</h4>
|
||||
<p>All files sent to secret chats are encrypted with one-time keys that are in no way related to the chat’s shared key. Before an encrypted file is sent, it is assumed that the encrypted file’s address will be attached to the outside of an encrypted message using the <strong>file</strong> parameter of the <a href="/method/messages.sendEncryptedFile">messages.sendEncryptedFile</a> method and that the key for direct decryption will be sent in the body of the message (the <strong>key</strong> parameter in the constructors <a href="/constructor/decryptedMessageMediaPhoto">decryptedMessageMediaPhoto</a>, <a href="/constructor/decryptedMessageMediaPhoto">decryptedMessageMediaVideo</a> and <a href="/constructor/decryptedMessageMediaPhoto">decryptedMessageMediaFile</a>.</p>
|
||||
<p>Prior to a file being sent to a secret chat, 2 random 256-bit numbers are computed which will serve as the AES key and initialization vector used to encrypt the file. AES-256 encryption with infinite garble extension (IGE) is used in like manner.</p>
|
||||
<p>The key fingerprint is computed as follows:</p>
|
||||
<ul>
|
||||
<li>digest = md5(key + iv)</li>
|
||||
<li>fingerprint = substr(digest, 0, 4) XOR substr(digest, 4, 4)</li>
|
||||
</ul>
|
||||
<p>The encrypted contents of a file are stored on the server in much the same way as those of a <a href="/api/files">file in cloud chats</a>: piece by piece using calls to <a href="/method/upload.saveFilePart">upload.saveFilePart</a>.
|
||||
A subsequent call to <a href="/method/messages.sendEncryptedFile">messages.sendEncryptedFile</a> will assign an identifier to the stored file and send the address together with the message. The recipient will receive an update with <a href="/constructor/encryptedMessage">encryptedMessage</a>, and the <strong>file</strong> parameter will contain file information.</p>
|
||||
<p>Incoming and outgoing encrypted files can be forwarded to other secret chats using the constructor <a href="/constructor/inputEncryptedFile">inputEncryptedFile</a> to avoid saving the same content on the server twice.</p>
|
||||
<h4><a class="anchor" href="#working-with-an-update-box" id="working-with-an-update-box" name="working-with-an-update-box"><i class="anchor-icon"></i></a>Working with an Update Box</h4>
|
||||
<p>Secret chats are associated with specific devices (or rather with <a href="/mtproto/description#creating-an-authorization-key">authorization keys</a>), not users. A conventional message box, which uses <strong>pts</strong> to describe the client’s status, is not suitable, because it is designed for long-term message storage and message access from different devices.</p>
|
||||
<p>An additional temporary message queue is introduced as a solution to this problem. When an update regarding a message from a secret chat is sent, a new value of <strong>qts</strong> is sent, which helps reconstruct the difference if there has been a long break in the connection or in case of loss of an update.</p>
|
||||
<p>As the number of events increases, the value of <strong>qts</strong> increases by 1 with each new event. The initial value may not (and will not) be equal to 0.</p>
|
||||
<p>The fact that events from the temporary queue have been received and stored by the client is acknowledged explicitly by a call to the <a href="/method/messages.receivedQueue">messages.receivedQueue</a> method or implicitly by a call to <a href="/method/updates.getDifference">updates.getDifference</a> (the value of <strong>qts</strong> passed, not the final state). All messages acknowledged as delivered by the client, as well as any messages older than 7 days, may (and will) be deleted from the server.</p>
|
||||
<p>Upon de-authorization, the event queue of the corresponding device will be forcibly cleared, and the value of <strong>qts</strong> will become irrelevant.</p>
|
||||
<h2><a class="anchor" href="#updating-to-new-layers" id="updating-to-new-layers" name="updating-to-new-layers"><i class="anchor-icon"></i></a>Updating to new layers</h2>
|
||||
<p>Your client should always store the maximal layer that is known to be supported by the client on the other side of a secret chat. When the secret chat is first created, this value should be initialized to 46. This remote layer value must always be updated immediately after receiving <em>any</em> packet containing information of an upper layer, i.e.:</p>
|
||||
<ul>
|
||||
<li>any secret chat message containing <em>layer_no</em> in its <code>decryptedMessageLayer</code> with <em>layer</em>>=46, or</li>
|
||||
<li>a <a href="/constructor/decryptedMessageActionNotifyLayer">decryptedMessageActionNotifyLayer</a> service message, wrapped as if it were the <a href="/constructor/decryptedMessageService">decryptedMessageService</a> constructor of the obsolete layer 8 (constructor <code>decryptedMessageService#aa48327d</code>).</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#notifying-the-remote-client-about-your-local-layer" id="notifying-the-remote-client-about-your-local-layer" name="notifying-the-remote-client-about-your-local-layer"><i class="anchor-icon"></i></a>Notifying the remote client about your local layer</h4>
|
||||
<p>In order to notify the remote client of your local layer, your client must send a message of the <code>decryptedMessageActionNotifyLayer</code> type. This notification must be wrapped in a constructor of an appropriate layer.</p>
|
||||
<p>There are two cases when your client must notify the remote client about its local layer:</p>
|
||||
<ol>
|
||||
<li>As soon as a new secret chat has been created, immediately after the secret key has been successfully exchanged.</li>
|
||||
<li>Immediately after the local client has been updated to support a new secret chat layer. In this case notifications must be sent to <strong>all</strong> currently existing secret chats. Note that this is only necessary when updating to new layers that contain changes in the secret chats implementation (e.g. you don’t need to do this when your client is updated from Layer 46 to Layer 47).</li>
|
||||
</ol></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?43"></script>
|
||||
<script src="/js/jquery.min.js?1"></script>
|
||||
<script src="/js/bootstrap.min.js?1"></script>
|
||||
|
||||
<script>window.initDevPageNav&&initDevPageNav();
|
||||
backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
215
data/core.telegram.org/api/end-to-end/video-calls.html
Normal file
215
data/core.telegram.org/api/end-to-end/video-calls.html
Normal file
|
@ -0,0 +1,215 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>End-to-End Encrypted Voice and Video Calls</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="This article describes the end-to-end encryption used for Telegram voice and video calls.
|
||||
Related Articles
|
||||
End-to-End Encryption…">
|
||||
<meta property="og:title" content="End-to-End Encrypted Voice and Video Calls">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="This article describes the end-to-end encryption used for Telegram voice and video calls.
|
||||
Related Articles
|
||||
End-to-End Encryption…">
|
||||
<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?215" 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/end-to-end%2Fvideo-calls" >End-to-End Encrypted Voice and Video Calls</a></li></ul></div>
|
||||
<h1 id="dev_page_title">End-to-End Encrypted Voice and Video Calls</h1>
|
||||
|
||||
<div id="dev_page_content"><p>This article describes the end-to-end encryption used for Telegram <strong>voice</strong> and <strong>video calls</strong>.</p>
|
||||
<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">End-to-End Encryption in Secret Chats</a></li>
|
||||
<li><a href="/mtproto/security_guidelines">Security Guidelines for Client Developers</a>
|
||||
</div></li>
|
||||
</ul>
|
||||
<hr>
|
||||
<h2><a class="anchor" href="#establishing-calls" id="establishing-calls" name="establishing-calls"><i class="anchor-icon"></i></a>Establishing Calls</h2>
|
||||
<p>Before a call is ready, some preliminary actions have to be performed. The calling party needs to contact the party to be called and check whether it is ready to accept the call. Besides that, the parties have to negotiate the protocols to be used, learn the IP addresses of each other or of the Telegram relay servers to be used (so-called <em>reflectors</em>), and generate a one-time encryption key for this voice call with the aid of <em>Diffie--Hellman key exchange</em>. All of this is accomplished in parallel with the aid of several Telegram API methods and related notifications. This document covers details related to key generation, encryption and security.</p>
|
||||
<h2><a class="anchor" href="#key-generation" id="key-generation" name="key-generation"><i class="anchor-icon"></i></a>Key Generation</h2>
|
||||
<p>The Diffie-Hellman key exchange, as well as the whole protocol used to create a new voice call, is quite similar to the one used for <a href="/api/end-to-end#key-generation">Secret Chats</a>. We recommend studying the linked article before proceeding.</p>
|
||||
<p>However, we have introduced some important changes to facilitate the <a href="#key-verification">key verification process</a>. Below is the entire exchange between the two communicating parties, the Caller (A) and the Callee (B), through the Telegram servers (S).</p>
|
||||
<ul>
|
||||
<li><em>A</em> executes <a href="/method/messages.getDhConfig">messages.getDhConfig</a> to find out the 2048-bit Diffie-Hellman prime <em>p</em> and generator <em>g</em>. The client is expected to check whether <em>p</em> is a safe prime and perform all the <a href="/api/end-to-end#sending-a-request">security checks</a> necessary for secret chats.</li>
|
||||
<li><em>A</em> chooses a random value of <em>a</em>, 1 < a < p-1, and computes <em>g_a:=power(g,a) mod p</em> (a 256-byte number) and <em>g_a_hash:=SHA256(g_a)</em> (32 bytes long).</li>
|
||||
<li><em>A</em> invokes (sends to server <em>S</em>) <a href="/method/phone.requestCall">phone.requestCall</a>, which has the field <code>g_a_hash:bytes</code>, among others. For this call, this field is to be filled with <em>g_a_hash</em>, <strong>not</strong> <em>g_a</em> itself.</li>
|
||||
<li>The Server <em>S</em> performs privacy checks and sends an <a href="/constructor/updatePhoneCall">updatePhoneCall</a> update with a <a href="/constructor/phoneCallRequested">phoneCallRequested</a> constructor to all of <em>B</em>'s active devices. This update, apart from the identity of <em>A</em> and other relevant parameters, contains the <em>g_a_hash</em> field, filled with the value obtained from <em>A</em>.</li>
|
||||
<li><em>B</em> accepts the call on one of their devices, stores the received value of <em>g_a_hash</em> for this instance of the voice call creation protocol, chooses a random value of <em>b</em>, 1 < b < p-1, computes <em>g_b:=power(g,b) mod p</em>, performs all the required security checks, and invokes the <a href="/method/phone.acceptCall">phone.acceptCall</a> method, which has a <em>g_b:bytes</em> field (among others), to be filled with the value of <em>g_b</em> itself (not its hash).</li>
|
||||
<li>The Server <em>S</em> sends an <a href="/constructor/updatePhoneCall">updatePhoneCall</a> with the <a href="/constructor/phoneCallDiscarded">phoneCallDiscarded</a> constructor to all other devices <em>B</em> has authorized, to prevent accepting the same call on any of the other devices. From this point on, the server <em>S</em> works only with that of <em>B</em>'s devices which has invoked <a href="/method/phone.acceptCall">phone.acceptCall</a> first.</li>
|
||||
<li>The Server <em>S</em> sends to <em>A</em> an <a href="/constructor/updatePhoneCall">updatePhoneCall</a> update with <a href="/constructor/phoneCallAccepted">phoneCallAccepted</a> constructor, containing the value of <em>g_b</em> received from <em>B</em>.</li>
|
||||
<li><em>A</em> performs all the usual security checks on <em>g_b</em> and <em>a</em>, computes the Diffie--Hellman key <em>key:=power(g_b,a) mod p</em> and its fingerprint <em>key_fingerprint:long</em>, equal to the lower 64 bits of <em>SHA1(key)</em>, the same as with secret chats. Then <em>A</em> invokes the <a href="/method/phone.confirmCall">phone.confirmCall</a> method, containing <code>g_a:bytes</code> and <code>key_fingerprint:long</code>.</li>
|
||||
<li>The Server <em>S</em> sends to <em>B</em> an <a href="/constructor/updatePhoneCall">updatePhoneCall</a> update with the <a href="/constructor/phoneCall">phoneCall</a> constructor, containing the value of <em>g_a</em> in <em>g_a_or_b:bytes</em> field, and <em>key_fingerprint:long</em></li>
|
||||
<li>At this point <em>B</em> receives the value of <em>g_a</em>. It checks that <em>SHA256(g_a)</em> is indeed equal to the previously received value of <em>g_a_hash</em>, performs all the <a href="/mtproto/security_guidelines">usual Diffie-Hellman security checks</a>, and computes the key <em>key:=power(g_a,b) mod p</em> and its fingerprint, equal to the lower 64 bits of <em>SHA1(key)</em>. Then it checks that this fingerprint equals the value of <code>key_fingerprint:long</code> received from the other side, as an implementation sanity check.</li>
|
||||
</ul>
|
||||
<p>At this point, the Diffie--Hellman key exchange is complete, and both parties have a 256-byte shared secret key <em>key</em> which is used to encrypt all further exchanges between <em>A</em> and <em>B</em>.</p>
|
||||
<p>It is of paramount importance to accept each update only once for each instance of the key generation protocol, discarding any duplicates or alternative versions of already received and processed messages (updates).</p>
|
||||
<h2><a class="anchor" href="#encryption" id="encryption" name="encryption"><i class="anchor-icon"></i></a>Encryption</h2>
|
||||
<blockquote>
|
||||
<p>This document describes encryption in <strong>voice and video calls</strong> as implemented in Telegram apps with versions <strong>7.0</strong> and above. See <a href="https://core.telegram.org/api/end-to-end/voice-calls">this document</a> for details on encryption used in <strong>voice calls</strong> in app versions released before <strong>August 14, 2020</strong>.</p>
|
||||
</blockquote>
|
||||
<p>The <a href="https://github.com/TelegramMessenger/tgcalls">Telegram Voice and Video Call Library</a> uses an optimized version of <a href="/">MTProto 2.0</a> to send and receive <strong>packets</strong>, consisting of one or more end-to-end encrypted <strong>messages</strong> of various types (<a href="https://webrtcglossary.com/ice/"><em>ice</em></a> <em>candidates list, video formats, remote video status, audio stream data, video stream data, message ack</em> or <em>empty</em>).</p>
|
||||
<p>This document describes only the encryption process, leaving out encoding and network-dependent parts.</p>
|
||||
<p>The library starts working with:</p>
|
||||
<ul>
|
||||
<li>An <a href="#encryption-key">encryption key</a> <code>key</code> shared between the parties, as generated above.</li>
|
||||
<li>Information whether the call is <strong>outgoing</strong> or <strong>incoming</strong>.</li>
|
||||
<li>Two data transfer channels: <strong>signaling</strong>, offered by the Telegram API, and <strong>transport</strong> based on WebRTC.</li>
|
||||
</ul>
|
||||
<p>Both data transfer channels are unreliable (messages may get lost), but <strong>signaling</strong> is slower and more reliable.</p>
|
||||
<h3><a class="anchor" href="#encrypting-call-data" id="encrypting-call-data" name="encrypting-call-data"><i class="anchor-icon"></i></a>Encrypting Call Data</h3>
|
||||
<p>The body of a packet (<code>decrypted_body</code>) consists of several messages and their respective <code>seq</code> numbers concatenated together.</p>
|
||||
<ul>
|
||||
<li>decrypted_body = message_seq1 + message_body1 + message_seq2 + message_body2</li>
|
||||
</ul>
|
||||
<p>Each <code>decrypted_body</code> is unique because no two <code>seq</code> numbers of the first message can be the same. If only old messages need to be re-sent, an <em>empty</em> message with new unique <code>seq</code> is added to the packet first.</p>
|
||||
<p>The <a href="#key-generation">encryption key</a> <code>key</code> is used to compute a 128-bit <code>msg_key</code> and then a 256-bit <code>aes_key</code> and a 128-bit <code>aes_iv</code>:</p>
|
||||
<ul>
|
||||
<li>msg_key_large = SHA256 (substr(key, 88+x, 32) + decrypted_body);</li>
|
||||
<li>msg_key = substr (msg_key_large, 8, 16);</li>
|
||||
<li>sha256_a = SHA256 (msg_key + substr (key, x, 36));</li>
|
||||
<li>sha256_b = SHA256 (substr (key, 40+x, 36) + msg_key);</li>
|
||||
<li>aes_key = substr (sha256_a, 0, 8) + substr (sha256_b, 8, 16) + substr (sha256_a, 24, 8);</li>
|
||||
<li>aes_iv = substr (sha256_b, 0, 4) + substr (sha256_a, 8, 8) + substr (sha256_b, 24, 4);</li>
|
||||
</ul>
|
||||
<p><code>x</code> depends on whether the call is <strong>outgoing</strong> or <strong>incoming</strong> and on the connection type:</p>
|
||||
<ul>
|
||||
<li>x = 0 for <strong>outgoing</strong> + <strong>transport</strong></li>
|
||||
<li>x = 8 for <strong>incoming</strong> + <strong>transport</strong></li>
|
||||
<li>x = 128 for <strong>outgoing</strong> + <strong>signaling</strong></li>
|
||||
<li>x = 136 for <strong>incoming</strong> + <strong>signaling</strong></li>
|
||||
</ul>
|
||||
<p>This allows apps to decide which packet types will be sent to which connections and work in these connections independently (with each having its own <code>seq</code> counter).</p>
|
||||
<p>The resulting <code>aes_key</code> and <code>aes_iv</code> are used to encrypt <code>decrypted_body</code>:</p>
|
||||
<ul>
|
||||
<li>encrypted_body = AES_CTR (decrypted_body, aes_key, aes_iv)</li>
|
||||
</ul>
|
||||
<p>The packet that gets sent consists of <code>msg_key</code> and <code>encrypted_body</code>:</p>
|
||||
<ul>
|
||||
<li>packet_bytes = msg_key + encrypted_body</li>
|
||||
</ul>
|
||||
<p>When received, the packet gets decrypted using <code>key</code> and <code>msg_key</code>, after which <code>msg_key</code> is checked against the relevant <code>SHA256</code> substring. If the check fails, the packet <strong>must</strong> be discarded.</p>
|
||||
<h3><a class="anchor" href="#protecting-against-replay-attacks" id="protecting-against-replay-attacks" name="protecting-against-replay-attacks"><i class="anchor-icon"></i></a>Protecting Against Replay Attacks</h3>
|
||||
<p>Each of the peers maintains its own 32-bit monotonically increasing counter for outgoing messages, <code>seq</code>, starting with <code>1</code>. This <code>seq</code> counter is prepended to each sent message and increased by <code>1</code> for each new message. No two <code>seq</code> numbers of the first message in a packet can be the same. If only old messages need to be re-sent, an <em>empty</em> message with a new unique <code>seq</code> is added to the packet first. When the <code>seq</code> counter reaches <code>2^30</code>, the call must be aborted. Each peer stores <code>seq</code> values of all the messages it has received (and processed) which are larger than <code>max_received_seq - 64</code>, where <code>max_received_seq</code> is the largest <code>seq</code> number received so far.</p>
|
||||
<p>If a packet is received, the first message of which has a <code>seq</code> that is smaller or equal to <code>max_received_seq - 64</code> or its <code>seq</code> had already been received, the message is discarded. Otherwise, the <code>seq</code> values of all incoming messages are memorized and <code>max_received_seq</code> is adjusted. This guarantees that no two packets will be processed twice.</p>
|
||||
<h2><a class="anchor" href="#key-verification" id="key-verification" name="key-verification"><i class="anchor-icon"></i></a>Key Verification</h2>
|
||||
<p>To verify the key, and ensure that no MITM attack is taking place, both parties concatenate the secret key <em>key</em> with the value <em>g_a</em> of the Caller ( <em>A</em> ), compute SHA256 and use it to generate a sequence of emoticons. More precisely, the SHA256 hash is split into four 64-bit integers; each of them is divided by the total number of emoticons used (currently 333), and the remainder is used to select specific emoticons. The specifics of the protocol guarantee that comparing four emoticons out of a set of 333 is sufficient to prevent eavesdropping (MiTM attack on DH) with a probability of <strong>0.9999999999</strong>.</p>
|
||||
<p>This is because instead of the standard Diffie-Hellman key exchange which requires only two messages between the parties:</p>
|
||||
<ul>
|
||||
<li>A->B : (generates a and) sends g_a := g^a</li>
|
||||
<li>B->A : (generates b and true key (g_a)^b, then) sends g_b := g^b</li>
|
||||
<li>A : computes key (g_b)^a</li>
|
||||
</ul>
|
||||
<p>we use a <strong>three-message modification</strong> thereof that works well when both parties are online (which also happens to be a requirement for voice calls):</p>
|
||||
<ul>
|
||||
<li>A->B : (generates a and) sends g_a_hash := hash(g^a)</li>
|
||||
<li>B->A : (stores g_a_hash, generates b and) sends g_b := g^b</li>
|
||||
<li>A->B : (computes key (g_b)^a, then) sends g_a := g^a</li>
|
||||
<li>B : checks hash(g_a) == g_a_hash, then computes key (g_a)^b</li>
|
||||
</ul>
|
||||
<p>The idea here is that <em>A</em> commits to a specific value of <em>a</em> (and of <em>g_a</em>) without disclosing it to <em>B</em>. <em>B</em> has to choose its value of <em>b</em> and <em>g_b</em> without knowing the true value of <em>g_a</em>, so that it cannot try different values of <em>b</em> to force the final key <em>(g_a)^b</em> to have any specific properties (such as fixed lower 32 bits of SHA256(key)). At this point, <em>B</em> commits to a specific value of <em>g_b</em> without knowing <em>g_a</em>. Then <em>A</em> has to send its value <em>g_a</em>; it cannot change it even though it knows <em>g_b</em> now, because the other party <em>B</em> would accept only a value of <em>g_a</em> that has a hash specified in the very first message of the exchange.</p>
|
||||
<p>If some impostor is pretending to be either <em>A</em> or <em>B</em> and tries to perform a Man-in-the-Middle Attack on this Diffie--Hellman key exchange, the above still holds. Party <em>A</em> will generate a shared key with <em>B</em> -- or whoever pretends to be <em>B</em> -- without having a second chance to change its exponent <em>a</em> depending on the value <em>g_b</em> received from the other side; and the impostor will not have a chance to adapt his value of <em>b</em> depending on <em>g_a</em>, because it has to commit to a value of <em>g_b</em> before learning <em>g_a</em>. The same is valid for the key generation between the impostor and the party <em>B</em>.</p>
|
||||
<p>The use of hash commitment in the DH exchange constrains the attacker to only <strong>one guess</strong> to generate the correct visualization in their attack, which means that using just over 33 bits of entropy represented by four emoji in the visualization is enough to make a successful attack highly improbable.</p>
|
||||
<blockquote>
|
||||
<p>For a slightly more user-friendly explanation of the above see: <a href="https://core.telegram.org/techfaq#q-how-are-voice-calls-authenticated">How are calls authenticated?</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?43"></script>
|
||||
|
||||
<script>backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
149
data/core.telegram.org/api/pin.html
Normal file
149
data/core.telegram.org/api/pin.html
Normal file
|
@ -0,0 +1,149 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Pinned messages</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Telegram allows pinning multiple messages on top of a specific chat.">
|
||||
<meta property="og:title" content="Pinned messages">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Telegram allows pinning multiple messages on top of a specific 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?215" 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/pin" >Pinned messages</a></li></ul></div>
|
||||
<h1 id="dev_page_title">Pinned messages</h1>
|
||||
|
||||
<div id="dev_page_content"><!-- scroll_nav -->
|
||||
|
||||
<p>Telegram allows pinning multiple messages on top of a specific chat. </p>
|
||||
<pre><code><a href='/constructor/message'>message</a>#85d6cbe2 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/long'>long</a> reply_to:flags.3?<a href='/type/MessageReplyHeader'>MessageReplyHeader</a> date:<a href='/type/int'>int</a> message:<a href='/type/string'>string</a> media:flags.9?<a href='/type/MessageMedia'>MessageMedia</a> reply_markup:flags.6?<a href='/type/ReplyMarkup'>ReplyMarkup</a> entities:flags.7?<a href='/type/Vector%20t'>Vector</a><<a href='/type/MessageEntity'>MessageEntity</a>> 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><<a href='/type/RestrictionReason'>RestrictionReason</a>> ttl_period:flags.25?<a href='/type/int'>int</a> = <a href='/type/Message'>Message</a>;
|
||||
|
||||
<a href='/constructor/updatePinnedMessages'>updatePinnedMessages</a>#ed85eab5 flags:<a href='/type/%23'>#</a> pinned:flags.0?<a href='/constructor/true'>true</a> peer:<a href='/type/Peer'>Peer</a> messages:<a href='/type/Vector%20t'>Vector</a><<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>;
|
||||
<a href='/constructor/updatePinnedChannelMessages'>updatePinnedChannelMessages</a>#5bb98608 flags:<a href='/type/%23'>#</a> pinned:flags.0?<a href='/constructor/true'>true</a> channel_id:<a href='/type/long'>long</a> messages:<a href='/type/Vector%20t'>Vector</a><<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>;
|
||||
|
||||
---functions---
|
||||
|
||||
<a href='/method/messages.updatePinnedMessage'>messages.updatePinnedMessage</a>#d2aaf7ec flags:<a href='/type/%23'>#</a> silent:flags.0?<a href='/constructor/true'>true</a> unpin:flags.1?<a href='/constructor/true'>true</a> pm_oneside:flags.2?<a href='/constructor/true'>true</a> peer:<a href='/type/InputPeer'>InputPeer</a> id:<a href='/type/int'>int</a> = <a href='/type/Updates'>Updates</a>;
|
||||
<a href='/method/messages.unpinAllMessages'>messages.unpinAllMessages</a>#f025bc8b peer:<a href='/type/InputPeer'>InputPeer</a> = <a href='/type/messages.AffectedHistory'>messages.AffectedHistory</a>;
|
||||
|
||||
<a href='/method/messages.getMessages'>messages.getMessages</a>#63c66506 id:<a href='/type/Vector%20t'>Vector</a><<a href='/type/InputMessage'>InputMessage</a>> = <a href='/type/messages.Messages'>messages.Messages</a>;
|
||||
<a href='/method/channels.getMessages'>channels.getMessages</a>#ad8c9a23 channel:<a href='/type/InputChannel'>InputChannel</a> id:<a href='/type/Vector%20t'>Vector</a><<a href='/type/InputMessage'>InputMessage</a>> = <a href='/type/messages.Messages'>messages.Messages</a>;</code></pre>
|
||||
<p>The <a href="/method/messages.updatePinnedMessage">messages.updatePinnedMessage</a> method can be used to pin or unpin a specific message in an arbitrary chat.<br>
|
||||
The <code>unpin</code> flags specifies whether to unpin or pin the message, and <code>pm_oneside</code> specifies whether the message should only be pinned on the local side of a one-to-one chat. </p>
|
||||
<p><a href="/method/messages.unpinAllMessages">messages.unpinAllMessages</a> can be used to unpin all messages in a chat. </p>
|
||||
<p>When (un)pinning messages, a <a href="/constructor/updatePinnedMessages">updatePinnedMessages</a> or <a href="/constructor/updatePinnedChannelMessages">updatePinnedChannelMessages</a> update will be emitted, containing IDs of pinned or unpinned messages. </p>
|
||||
<p>Pinned messages will also have the will also have the <code>pinned</code> flag of <a href="/constructor/message">message</a> set.</p>
|
||||
<h3><a class="anchor" href="#getting-pinned-messages" id="getting-pinned-messages" name="getting-pinned-messages"><i class="anchor-icon"></i></a>Getting pinned messages</h3>
|
||||
<pre><code><a href='/constructor/userFull'>userFull</a>#d697ff05 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> ttl_period:flags.14?<a href='/type/int'>int</a> theme_emoticon:flags.15?<a href='/type/string'>string</a> = <a href='/type/UserFull'>UserFull</a>;
|
||||
<a href='/constructor/chatFull'>chatFull</a>#4dbdc099 flags:<a href='/type/%23'>#</a> can_set_username:flags.7?<a href='/constructor/true'>true</a> has_scheduled:flags.8?<a href='/constructor/true'>true</a> id:<a href='/type/long'>long</a> about:<a href='/type/string'>string</a> participants:<a href='/type/ChatParticipants'>ChatParticipants</a> chat_photo:flags.2?<a href='/type/Photo'>Photo</a> notify_settings:<a href='/type/PeerNotifySettings'>PeerNotifySettings</a> exported_invite:flags.13?<a href='/type/ExportedChatInvite'>ExportedChatInvite</a> bot_info:flags.3?<a href='/type/Vector%20t'>Vector</a><<a href='/type/BotInfo'>BotInfo</a>> pinned_msg_id:flags.6?<a href='/type/int'>int</a> folder_id:flags.11?<a href='/type/int'>int</a> call:flags.12?<a href='/type/InputGroupCall'>InputGroupCall</a> ttl_period:flags.14?<a href='/type/int'>int</a> groupcall_default_join_as:flags.15?<a href='/type/Peer'>Peer</a> theme_emoticon:flags.16?<a href='/type/string'>string</a> = <a href='/type/ChatFull'>ChatFull</a>;
|
||||
<a href='/constructor/channelFull'>channelFull</a>#e9b27a17 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/long'>long</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:flags.23?<a href='/type/ExportedChatInvite'>ExportedChatInvite</a> bot_info:<a href='/type/Vector%20t'>Vector</a><<a href='/type/BotInfo'>BotInfo</a>> migrated_from_chat_id:flags.4?<a href='/type/long'>long</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/long'>long</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> call:flags.21?<a href='/type/InputGroupCall'>InputGroupCall</a> ttl_period:flags.24?<a href='/type/int'>int</a> pending_suggestions:flags.25?<a href='/type/Vector%20t'>Vector</a><<a href='/type/string'>string</a>> groupcall_default_join_as:flags.26?<a href='/type/Peer'>Peer</a> theme_emoticon:flags.27?<a href='/type/string'>string</a> = <a href='/type/ChatFull'>ChatFull</a>;
|
||||
|
||||
<a href='/constructor/inputMessagesFilterPinned'>inputMessagesFilterPinned</a>#1bb00451 = <a href='/type/MessagesFilter'>MessagesFilter</a>;
|
||||
|
||||
---functions---
|
||||
|
||||
<a href='/method/messages.search'>messages.search</a>#a0fda762 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/long'>long</a> = <a href='/type/messages.Messages'>messages.Messages</a>;</code></pre>
|
||||
<p>The <code>pinned_msg_id</code> of <a href="/constructor/userFull">userFull</a>, <a href="/constructor/chatFull">chatFull</a>, <a href="/constructor/channelFull">channelFull</a> contains the ID of only the latest pinned message.<br>
|
||||
To obtain a full list, use <a href="/method/messages.search">messages.search</a> with <a href="/constructor/inputMessagesFilterPinned">inputMessagesFilterPinned</a> filter. </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?43"></script>
|
||||
<script src="/js/jquery.min.js?1"></script>
|
||||
<script src="/js/bootstrap.min.js?1"></script>
|
||||
|
||||
<script>window.initDevPageNav&&initDevPageNav();
|
||||
backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,297 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Channel statistics</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Telegram offers detailed channel statistics for channels and supergroups.">
|
||||
<meta property="og:title" content="Channel statistics">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Telegram offers detailed channel statistics for channels and supergroups.">
|
||||
<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?215" 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/stats" >Channel statistics</a></li></ul></div>
|
||||
<h1 id="dev_page_title">Channel statistics</h1>
|
||||
|
||||
<div id="dev_page_content"><!-- scroll_nav -->
|
||||
|
||||
<p>Telegram offers detailed channel statistics for channels and supergroups. </p>
|
||||
<h3><a class="anchor" href="#channel-statistics" id="channel-statistics" name="channel-statistics"><i class="anchor-icon"></i></a>Channel statistics</h3>
|
||||
<p>Schema:</p>
|
||||
<pre><code><a href='/constructor/statsDateRangeDays'>statsDateRangeDays</a>#b637edaf min_date:<a href='/type/int'>int</a> max_date:<a href='/type/int'>int</a> = <a href='/type/StatsDateRangeDays'>StatsDateRangeDays</a>;
|
||||
|
||||
<a href='/constructor/statsAbsValueAndPrev'>statsAbsValueAndPrev</a>#cb43acde current:<a href='/type/double'>double</a> previous:<a href='/type/double'>double</a> = <a href='/type/StatsAbsValueAndPrev'>StatsAbsValueAndPrev</a>;
|
||||
|
||||
<a href='/constructor/statsPercentValue'>statsPercentValue</a>#cbce2fe0 part:<a href='/type/double'>double</a> total:<a href='/type/double'>double</a> = <a href='/type/StatsPercentValue'>StatsPercentValue</a>;
|
||||
|
||||
<a href='/constructor/statsGraphAsync'>statsGraphAsync</a>#4a27eb2d token:<a href='/type/string'>string</a> = <a href='/type/StatsGraph'>StatsGraph</a>;
|
||||
<a href='/constructor/statsGraphError'>statsGraphError</a>#bedc9822 error:<a href='/type/string'>string</a> = <a href='/type/StatsGraph'>StatsGraph</a>;
|
||||
<a href='/constructor/statsGraph'>statsGraph</a>#8ea464b6 flags:<a href='/type/%23'>#</a> json:<a href='/type/DataJSON'>DataJSON</a> zoom_token:flags.0?<a href='/type/string'>string</a> = <a href='/type/StatsGraph'>StatsGraph</a>;
|
||||
|
||||
<a href='/constructor/messageInteractionCounters'>messageInteractionCounters</a>#ad4fc9bd msg_id:<a href='/type/int'>int</a> views:<a href='/type/int'>int</a> forwards:<a href='/type/int'>int</a> = <a href='/type/MessageInteractionCounters'>MessageInteractionCounters</a>;
|
||||
|
||||
<a href='/constructor/stats.broadcastStats'>stats.broadcastStats</a>#bdf78394 period:<a href='/type/StatsDateRangeDays'>StatsDateRangeDays</a> followers:<a href='/type/StatsAbsValueAndPrev'>StatsAbsValueAndPrev</a> views_per_post:<a href='/type/StatsAbsValueAndPrev'>StatsAbsValueAndPrev</a> shares_per_post:<a href='/type/StatsAbsValueAndPrev'>StatsAbsValueAndPrev</a> enabled_notifications:<a href='/type/StatsPercentValue'>StatsPercentValue</a> growth_graph:<a href='/type/StatsGraph'>StatsGraph</a> followers_graph:<a href='/type/StatsGraph'>StatsGraph</a> mute_graph:<a href='/type/StatsGraph'>StatsGraph</a> top_hours_graph:<a href='/type/StatsGraph'>StatsGraph</a> interactions_graph:<a href='/type/StatsGraph'>StatsGraph</a> iv_interactions_graph:<a href='/type/StatsGraph'>StatsGraph</a> views_by_source_graph:<a href='/type/StatsGraph'>StatsGraph</a> new_followers_by_source_graph:<a href='/type/StatsGraph'>StatsGraph</a> languages_graph:<a href='/type/StatsGraph'>StatsGraph</a> recent_message_interactions:<a href='/type/Vector%20t'>Vector</a><<a href='/type/MessageInteractionCounters'>MessageInteractionCounters</a>> = <a href='/type/stats.BroadcastStats'>stats.BroadcastStats</a>;
|
||||
|
||||
---functions---
|
||||
|
||||
<a href='/method/stats.getBroadcastStats'>stats.getBroadcastStats</a>#ab42441a flags:<a href='/type/%23'>#</a> dark:flags.0?<a href='/constructor/true'>true</a> channel:<a href='/type/InputChannel'>InputChannel</a> = <a href='/type/stats.BroadcastStats'>stats.BroadcastStats</a>;
|
||||
<a href='/method/stats.loadAsyncGraph'>stats.loadAsyncGraph</a>#621d5fa0 flags:<a href='/type/%23'>#</a> token:<a href='/type/string'>string</a> x:flags.0?<a href='/type/long'>long</a> = <a href='/type/StatsGraph'>StatsGraph</a>;</code></pre>
|
||||
<p>Administrators of <a href="/api/channel">channels</a> of a certain size (the exact limit is a server-side config, returned in the <code>can_view_stats</code> flag of <a href="/constructor/channelFull">channelFull</a>) can call <a href="/method/stats.getBroadcastStats">stats.getBroadcastStats</a> to get detailed channel statistics.<br>
|
||||
The returned <a href="/constructor/stats.broadcastStats">stats.broadcastStats</a> contains multiple statistics: </p>
|
||||
<ul>
|
||||
<li>Period-related statistics: a pair of values, one at the beginning and one at the end of the period in consideration (<code>period</code>). <br> The <code>period</code> typically depends on channel activity.<ul>
|
||||
<li>Absolute follower count (<code>followers</code>)</li>
|
||||
<li><code>total_viewcount/postcount</code>, for posts posted during the period in consideration (<code>views_per_post</code>).<br>
|
||||
Note that in this case, <code>current</code> refers to the <code>period</code> in consideration (<code>min_date</code> till <code>max_date</code>), and <code>prev</code> refers to the previous period (<code>(min_date - (max_date - min_date))</code> till <code>min_date</code>). </li>
|
||||
<li><code>total_sharecount/postcount</code>, for posts posted during the period in consideration (<code>shares_per_post</code>).<br>
|
||||
Note that in this case, <code>current</code> refers to the <code>period</code> in consideration (<code>min_date</code> till <code>max_date</code>), and <code>prev</code> refers to the previous period (<code>(min_date - (max_date - min_date))</code> till <code>min_date</code>).</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Percentage statistics<ul>
|
||||
<li>Percentage of subscribers with enabled notifications (<code>enabled_notifications</code>)</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Graphs: <a href="#graph-visualization">graphs are described below »</a>. </li>
|
||||
</ul>
|
||||
<h3><a class="anchor" href="#supergroup-statistics" id="supergroup-statistics" name="supergroup-statistics"><i class="anchor-icon"></i></a>Supergroup statistics</h3>
|
||||
<p>Schema:</p>
|
||||
<pre><code><a href='/constructor/statsGroupTopPoster'>statsGroupTopPoster</a>#9d04af9b user_id:<a href='/type/long'>long</a> messages:<a href='/type/int'>int</a> avg_chars:<a href='/type/int'>int</a> = <a href='/type/StatsGroupTopPoster'>StatsGroupTopPoster</a>;
|
||||
<a href='/constructor/statsGroupTopInviter'>statsGroupTopInviter</a>#535f779d user_id:<a href='/type/long'>long</a> invitations:<a href='/type/int'>int</a> = <a href='/type/StatsGroupTopInviter'>StatsGroupTopInviter</a>;
|
||||
<a href='/constructor/statsGroupTopAdmin'>statsGroupTopAdmin</a>#d7584c87 user_id:<a href='/type/long'>long</a> deleted:<a href='/type/int'>int</a> kicked:<a href='/type/int'>int</a> banned:<a href='/type/int'>int</a> = <a href='/type/StatsGroupTopAdmin'>StatsGroupTopAdmin</a>;
|
||||
|
||||
<a href='/constructor/stats.megagroupStats'>stats.megagroupStats</a>#ef7ff916 period:<a href='/type/StatsDateRangeDays'>StatsDateRangeDays</a> members:<a href='/type/StatsAbsValueAndPrev'>StatsAbsValueAndPrev</a> messages:<a href='/type/StatsAbsValueAndPrev'>StatsAbsValueAndPrev</a> viewers:<a href='/type/StatsAbsValueAndPrev'>StatsAbsValueAndPrev</a> posters:<a href='/type/StatsAbsValueAndPrev'>StatsAbsValueAndPrev</a> growth_graph:<a href='/type/StatsGraph'>StatsGraph</a> members_graph:<a href='/type/StatsGraph'>StatsGraph</a> new_members_by_source_graph:<a href='/type/StatsGraph'>StatsGraph</a> languages_graph:<a href='/type/StatsGraph'>StatsGraph</a> messages_graph:<a href='/type/StatsGraph'>StatsGraph</a> actions_graph:<a href='/type/StatsGraph'>StatsGraph</a> top_hours_graph:<a href='/type/StatsGraph'>StatsGraph</a> weekdays_graph:<a href='/type/StatsGraph'>StatsGraph</a> top_posters:<a href='/type/Vector%20t'>Vector</a><<a href='/type/StatsGroupTopPoster'>StatsGroupTopPoster</a>> top_admins:<a href='/type/Vector%20t'>Vector</a><<a href='/type/StatsGroupTopAdmin'>StatsGroupTopAdmin</a>> top_inviters:<a href='/type/Vector%20t'>Vector</a><<a href='/type/StatsGroupTopInviter'>StatsGroupTopInviter</a>> users:<a href='/type/Vector%20t'>Vector</a><<a href='/type/User'>User</a>> = <a href='/type/stats.MegagroupStats'>stats.MegagroupStats</a>;
|
||||
|
||||
---functions---
|
||||
|
||||
<a href='/method/stats.getMegagroupStats'>stats.getMegagroupStats</a>#dcdf8607 flags:<a href='/type/%23'>#</a> dark:flags.0?<a href='/constructor/true'>true</a> channel:<a href='/type/InputChannel'>InputChannel</a> = <a href='/type/stats.MegagroupStats'>stats.MegagroupStats</a>;</code></pre>
|
||||
<p>Administrators of <a href="/api/channel">supergroups</a> of a certain size (the exact limit is a server-side config, returned in the <code>can_view_stats</code> flag of <a href="/constructor/channelFull">channelFull</a>) can call <a href="/method/stats.getMegagroupStats">stats.getMegagroupStats</a> to get detailed supergroup statistics.<br>
|
||||
The returned <a href="/constructor/stats.broadcastStats">stats.broadcastStats</a> contains multiple statistics, see the <a href="/constructor/stats.broadcastStats">constructor page for more info »</a>. </p>
|
||||
<h3><a class="anchor" href="#message-statistics" id="message-statistics" name="message-statistics"><i class="anchor-icon"></i></a>Message statistics</h3>
|
||||
<pre><code><a href='/constructor/stats.messageStats'>stats.messageStats</a>#8999f295 views_graph:<a href='/type/StatsGraph'>StatsGraph</a> = <a href='/type/stats.MessageStats'>stats.MessageStats</a>;
|
||||
|
||||
---functions---
|
||||
|
||||
<a href='/method/stats.getMessageStats'>stats.getMessageStats</a>#b6e0a3f5 flags:<a href='/type/%23'>#</a> dark:flags.0?<a href='/constructor/true'>true</a> channel:<a href='/type/InputChannel'>InputChannel</a> msg_id:<a href='/type/int'>int</a> = <a href='/type/stats.MessageStats'>stats.MessageStats</a>;</code></pre>
|
||||
<p>Administrators of <a href="/api/channel">channels</a> of a certain size (the exact limit is a server-side config, returned in the <code>can_view_stats</code> flag of <a href="/constructor/channelFull">channelFull</a>) can call <a href="/method/stats.getMessageStats">stats.getMessageStats</a> to get statistics of a specific message.<br>
|
||||
The returned <a href="/constructor/stats.messageStats">stats.messageStats</a> contains the view graph of the message. </p>
|
||||
<h2><a class="anchor" href="#graph-visualization" id="graph-visualization" name="graph-visualization"><i class="anchor-icon"></i></a>Graph visualization</h2>
|
||||
<p>There are four available visualizations for graph types:</p>
|
||||
<ul>
|
||||
<li><a href="#line-graph">Line graph</a></li>
|
||||
<li><a href="#step-graph">Step graph</a></li>
|
||||
<li><a href="#bar-graph">Bar graph</a></li>
|
||||
<li><a href="#area-graph">Area graph</a></li>
|
||||
</ul>
|
||||
<p>Graph modifiers (see <a href="#graph-examples">various graphs</a> for examples): </p>
|
||||
<ul>
|
||||
<li><code>y_scaled</code> - Indicates that each of the two (!) lines in a step graph must be visualized on its own scale, with two different tick axes on the left and right parts of the graph</li>
|
||||
<li><code>percentage</code> - Indicates whether value percentages should be shown in labels</li>
|
||||
<li><code>stacked</code> - Depending on the graph type, indicates stacking of multiple columns in the same graph</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" href="#graph-syntax" id="graph-syntax" name="graph-syntax"><i class="anchor-icon"></i></a>Graph syntax</h3>
|
||||
<pre><code><a href='/constructor/statsGraphAsync'>statsGraphAsync</a>#4a27eb2d token:<a href='/type/string'>string</a> = <a href='/type/StatsGraph'>StatsGraph</a>;
|
||||
<a href='/constructor/statsGraphError'>statsGraphError</a>#bedc9822 error:<a href='/type/string'>string</a> = <a href='/type/StatsGraph'>StatsGraph</a>;
|
||||
<a href='/constructor/statsGraph'>statsGraph</a>#8ea464b6 flags:<a href='/type/%23'>#</a> json:<a href='/type/DataJSON'>DataJSON</a> zoom_token:flags.0?<a href='/type/string'>string</a> = <a href='/type/StatsGraph'>StatsGraph</a>;
|
||||
|
||||
<a href='/constructor/dataJSON'>dataJSON</a>#7d748d04 data:<a href='/type/string'>string</a> = <a href='/type/DataJSON'>DataJSON</a>;
|
||||
|
||||
---functions---
|
||||
|
||||
<a href='/method/stats.loadAsyncGraph'>stats.loadAsyncGraph</a>#621d5fa0 flags:<a href='/type/%23'>#</a> token:<a href='/type/string'>string</a> x:flags.0?<a href='/type/long'>long</a> = <a href='/type/StatsGraph'>StatsGraph</a>;</code></pre>
|
||||
<p>Certain graphs are not directly sent in the <a href="/constructor/stats.broadcastStats">stats.broadcastStats</a> constructor to reduce server load: instead, those graphs will be sent as a <a href="/constructor/statsGraphAsync">statsGraphAsync</a> constructor, and should be fetched separately using <a href="/method/stats.loadAsyncGraph">stats.loadAsyncGraph</a>. </p>
|
||||
<p>After obtaining the full <a href="/constructor/statsGraph">statsGraph</a> constructor, clients should parse the JSON graph object in the <code>json</code> field.</p>
|
||||
<p>Object structure: </p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Key</th>
|
||||
<th>Graph title</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>columns</td>
|
||||
<td>Array of all data column arrays in the chart. Each column array has its <strong>label</strong> at position 0, followed by values.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>types</td>
|
||||
<td><a href="#graphs">Graphs types</a> for each of the column arrays (object, <code>"label": "type"</code>): <br>- <code>line</code> - <a href="#line-graph">line graph</a> <br>- <code>area</code> - <a href="#area-graph">area graph</a> <br>- <code>step</code> - <a href="#step-graph">step graph</a> <br>- <code>bar</code> - <a href="#bar-graph">bar graph</a> <br>- <code>x</code> - x axis values for each of the charts at the corresponding positions, UNIX timestamps in milliseconds.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>colors</td>
|
||||
<td>Color for each type (object, <code>"label": "colorKey#AAAAAA"</code>; see <a href="#chart-colors">chart colors</a>).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>names</td>
|
||||
<td>Localized name for each variable (object, <code>"label": "Name"</code>)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>subchart</td>
|
||||
<td>Object indicating the default zoom range for the graph, this is object's structure: <br>- <code>show</code> - Whether to use the specified zoom range (boolean) <br>- <code>defaultZoom</code> - An array with two <code>x</code> values, indicating the two ends of the default zoom range</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>y_scaled</td>
|
||||
<td>Indicates that each of the two (!) lines in a step graph must be visualized on its own scale, with two different tick axes on the left and right parts of the graph (boolean, see <a href="#graph-examples">various graphs</a> for examples)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>percentage</td>
|
||||
<td>Indicates whether value percentages should be shown in labels (boolean, see <a href="#graph-examples">various graphs</a> for examples)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>stacked</td>
|
||||
<td>Depending on the graph type, indicates stacking of multiple columns in the same graph (boolean, see <a href="#graph-examples">various graphs</a> for examples)</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- | hidden | Array of columns that should not be visualized in the final graph | -->
|
||||
<p>The following chart restrictions apply:</p>
|
||||
<ul>
|
||||
<li>Up to 50 columns on one graph must be supported.</li>
|
||||
<li>Chart types are always the same for every column in the graph.</li>
|
||||
<li>The <code>bar</code> chart type and <code>stacked</code> option are always used together.</li>
|
||||
<li><code>percentage</code> is always used with the <code>area</code> graph.<!-- * Graphs with every chart type _should_ be able to zoom into the same chart type with the same columns (names and types). -->
|
||||
<!-- * `y_scaled` is only used with exactly 2 `line` columns -->
|
||||
</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" href="#chart-zooming" id="chart-zooming" name="chart-zooming"><i class="anchor-icon"></i></a>Chart zooming</h3>
|
||||
<pre><code><a href='/constructor/statsGraphError'>statsGraphError</a>#bedc9822 error:<a href='/type/string'>string</a> = <a href='/type/StatsGraph'>StatsGraph</a>;
|
||||
<a href='/constructor/statsGraph'>statsGraph</a>#8ea464b6 flags:<a href='/type/%23'>#</a> json:<a href='/type/DataJSON'>DataJSON</a> zoom_token:flags.0?<a href='/type/string'>string</a> = <a href='/type/StatsGraph'>StatsGraph</a>;
|
||||
|
||||
<a href='/constructor/dataJSON'>dataJSON</a>#7d748d04 data:<a href='/type/string'>string</a> = <a href='/type/DataJSON'>DataJSON</a>;
|
||||
|
||||
---functions---
|
||||
|
||||
<a href='/method/stats.loadAsyncGraph'>stats.loadAsyncGraph</a>#621d5fa0 flags:<a href='/type/%23'>#</a> token:<a href='/type/string'>string</a> x:flags.0?<a href='/type/long'>long</a> = <a href='/type/StatsGraph'>StatsGraph</a>;</code></pre>
|
||||
<p>Graphs that support zooming will contain a <code>zoom_token</code> in the <a href="/constructor/statsGraph">statsGraph</a> constructor.<br>
|
||||
Said token should be then used as <code>token</code> in a new <a href="/method/stats.loadAsyncGraph">stats.loadAsyncGraph</a> call triggered when the user clicks on the label, related to a certain x axis in the graph (see <a href="#graph-examples">graph examples</a>).<br>
|
||||
The <code>x</code> coordinate of the label should be provided to the <code>x</code> parameter; the method will then return (if available) a more detailed subgraph.<br>
|
||||
If not enough data is available, a localized <a href="/constructor/statsGraphError">statsGraphError</a> will be returned. </p>
|
||||
<p>Typical zoom <em>visualization</em> rules: </p>
|
||||
<ul>
|
||||
<li>Any <code>percentage</code> graph (even if a <code>zoom_token</code> is not available) => <a href="#piechart">piechart</a></li>
|
||||
<li><a href="#line-graph">line graph</a> => <a href="#line-graph">line graph</a></li>
|
||||
<li><a href="#step-graph">step graph</a> => <a href="#step-graph">step graph</a></li>
|
||||
<li><a href="#bar-graph">bar graph</a> => <a href="#bar-graph">bar graph</a></li>
|
||||
<li><a href="#area-graph">area graph</a> => <a href="#area-graph">area graph</a></li>
|
||||
</ul>
|
||||
<h3><a class="anchor" href="#chart-colors" id="chart-colors" name="chart-colors"><i class="anchor-icon"></i></a>Chart colors</h3>
|
||||
<p>Chart colors can be provided as a color key, followed by the primary color value in hex format: </p>
|
||||
<pre><code>red#e05356</code></pre>
|
||||
<p>The color key can be one of <code>red</code>, <code>lightblue</code>, <code>lightgreen</code>, <code>golden</code>, <code>green</code>, <code>orange</code>, <code>blue</code>, <code>indigo</code>.<br>
|
||||
Apps can choose to use a color value specified by the currently loaded theme: for example, the <a href="https://github.com/DrKLO/Telegram/blob/dceccae0b74576d092fb3b2accaffded2c0b5f63/TMessagesProj/src/main/java/org/telegram/ui/Charts/data/ChartData.java#L81">android app</a> uses <code>statisticChartLine_*</code> themekeys for each of the color keys, check out the <a href="https://github.com/DrKLO/Telegram/tree/master/TMessagesProj/src/main/assets">assets directory</a> for a bunch of default themes with various colors for channel statistics. </p>
|
||||
<p>However, the server may also choose to return just a plain color value in hex format: </p>
|
||||
<pre><code>#e05356</code></pre>
|
||||
<p>In this case, the <code>dark</code> flag of the <a href="/method/stats.getBroadcastStats">stats.getBroadcastStats</a> method can be used to choose the palette of returned colors.</p>
|
||||
<h2><a class="anchor" href="#graph-examples" id="graph-examples" name="graph-examples"><i class="anchor-icon"></i></a>Graph examples</h2>
|
||||
<h3><a class="anchor" href="#line-graph" id="line-graph" name="line-graph"><i class="anchor-icon"></i></a>Line graph</h3>
|
||||
<p>Simple single line graph</p>
|
||||
<h3><a class="anchor" href="#step-graph" id="step-graph" name="step-graph"><i class="anchor-icon"></i></a>Step graph</h3>
|
||||
<p>Step graph, always "stacked" (to indicate multiple lines)</p>
|
||||
<h3><a class="anchor" href="#bar-graph" id="bar-graph" name="bar-graph"><i class="anchor-icon"></i></a>Bar graph</h3>
|
||||
<p>Bar graph with multiple lines, always "stacked" (to indicate actual stacked bars, biggest bars first)</p>
|
||||
<h3><a class="anchor" href="#area-graph" id="area-graph" name="area-graph"><i class="anchor-icon"></i></a>Area graph</h3>
|
||||
<p>Mixed bar/line graph, always "stacked" (to indicate actual stacked bars, biggest bars first)</p>
|
||||
<h3><a class="anchor" href="#piechart" id="piechart" name="piechart"><i class="anchor-icon"></i></a>Piechart</h3>
|
||||
<p>Piechart, typically obtained only when zooming into percentage graphs</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?43"></script>
|
||||
<script src="/js/jquery.min.js?1"></script>
|
||||
<script src="/js/bootstrap.min.js?1"></script>
|
||||
|
||||
<script>window.initDevPageNav&&initDevPageNav();
|
||||
backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
160
data/core.telegram.org/api/url-authorization.html
Normal file
160
data/core.telegram.org/api/url-authorization.html
Normal file
|
@ -0,0 +1,160 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Seamless Telegram Login</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Handle Seamless Telegram Login URL authorization requests.">
|
||||
<meta property="og:title" content="Seamless Telegram Login">
|
||||
<meta property="og:image" content="faa06a44f2ab0cf059">
|
||||
<meta property="og:description" content="Handle Seamless Telegram Login URL authorization requests.">
|
||||
<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?215" 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/url-authorization" >Seamless Telegram Login</a></li></ul></div>
|
||||
<h1 id="dev_page_title">Seamless Telegram Login</h1>
|
||||
|
||||
<div id="dev_page_content"><!-- scroll_nav -->
|
||||
|
||||
<p>Bots or Telegram websites may <a href="/bots/api#loginurl">ask users to login to a certain website via Telegram</a> when clicking on certain links or URL buttons in inline keyboards.</p>
|
||||
<h3><a class="anchor" href="#bot-url-authorization" id="bot-url-authorization" name="bot-url-authorization"><i class="anchor-icon"></i></a>Bot URL authorization</h3>
|
||||
<p>When the user clicks on <a href="/constructor/keyboardButtonUrlAuth">keyboardButtonUrlAuth</a>, <a href="/method/messages.requestUrlAuth">messages.requestUrlAuth</a> should be called, providing the <code>button_id</code> of the button and the ID and peer of the container message.
|
||||
The returned <a href="/constructor/urlAuthResultRequest">urlAuthResultRequest</a> object will contain more details about the authorization request:</p>
|
||||
<ul>
|
||||
<li>The <code>domain</code> parameter will contain the domain name of the website on which the user will log in (example: <em>comments.app</em>).</li>
|
||||
<li>The <code>bot</code> parameter will contain info about the bot which will be used for user authorization (example: <em>DiscussBot</em>).</li>
|
||||
<li>The <code>request_write_access</code> will be set if the bot would like to send messages to the user.</li>
|
||||
</ul>
|
||||
<p>The info should be shown in a prompt:</p>
|
||||
<div><div class="blog_image_wrap">
|
||||
<a href="/file/811140015/1734/8VZFkwWXalM.97872/6127fa62d8a0bf2b3c" target="_blank"><img src="/file/811140909/1631/20k1Z53eiyY.23995/c541e89b74253623d9" title="TITLE" alt="TITLE" srcset="/file/811140015/1734/8VZFkwWXalM.97872/6127fa62d8a0bf2b3c , 2x"></a>
|
||||
</div></div>
|
||||
<p>If the user agrees to login to the URL, <a href="/method/messages.acceptUrlAuth">messages.acceptUrlAuth</a> should be called (eventually setting the <code>write_allowed</code> if the permission was requested and the user consented).
|
||||
The result will be a <a href="/constructor/urlAuthResultAccepted">urlAuthResultAccepted</a> with the final URL to open, which will include a query string with the requested info and a hash that <a href="/widgets/login#receiving-authorization-data">must be verified upon receival by the service</a>.</p>
|
||||
<p><a href="/constructor/urlAuthResultDefault">urlAuthResultDefault</a> could also be returned, instead, in which case the <code>url</code> of the <a href="/constructor/keyboardButtonUrlAuth">keyboardButtonUrlAuth</a> must be opened, instead.
|
||||
The same must be done if the user opens the link while refusing the authorization request.</p>
|
||||
<h3><a class="anchor" href="#link-url-authorization" id="link-url-authorization" name="link-url-authorization"><i class="anchor-icon"></i></a>Link URL authorization</h3>
|
||||
<p>Telegram supports automatic authorization on certain websites upon opening an HTTP URL in-app, upon clicking a link in a message or clicking on a <a href="/constructor/keyboardButtonUrl">keyboardButtonUrl</a>.</p>
|
||||
<h4><a class="anchor" href="#automatic-authorization" id="automatic-authorization" name="automatic-authorization"><i class="anchor-icon"></i></a>Automatic authorization</h4>
|
||||
<p>Clients should automatically authenticate users when opening official Telegram websites, listed in the <code>url_auth_domains</code> key of the <a href="/api/config#client-configuration">client configuration object »</a>. </p>
|
||||
<p>Upon clicking a link, the URL must be modified by appending the <code>autologin_token</code> from the <a href="/api/config#client-configuration">client configuration object »</a> to the <a href="https://datatracker.ietf.org/doc/html/rfc3986#section-3.4">query string</a>, like so: </p>
|
||||
<p>Original URL: <code>https://somedomain.telegram.org/path?query=string#fragment=value</code><br>
|
||||
Modified URL: <code>https://somedomain.telegram.org/path?query=string&autologin_token=$autologin_token#fragment=value</code> </p>
|
||||
<p>Make sure that the used <code>autologin_token</code> is no more than <code>10000</code> seconds old, if it is older it must be refetched before use as described in the <a href="/api/config#client-configuration">client configuration section »</a>. </p>
|
||||
<h4><a class="anchor" href="#manual-authorization" id="manual-authorization" name="manual-authorization"><i class="anchor-icon"></i></a>Manual authorization</h4>
|
||||
<p>Clients should show a confirmation prompt similar to the one used <a href="#bot-url-authorization">for bots</a>, to authenticate users when opening certain Telegram websites, listed in the <code>url_auth_domains</code> key of the <a href="/api/config#client-configuration">client configuration object »</a>. </p>
|
||||
<p><a href="/method/messages.requestUrlAuth">messages.requestUrlAuth</a> should be called, providing only the original <code>url</code>.
|
||||
The returned <a href="/constructor/urlAuthResultRequest">urlAuthResultRequest</a> object will contain more details about the authorization request:</p>
|
||||
<ul>
|
||||
<li>The <code>domain</code> parameter will contain the domain name of the website on which the user will log in (example: <em>comments.app</em>).</li>
|
||||
<li>The <code>request_write_access</code> will be set if the website would like to send messages to the user.</li>
|
||||
</ul>
|
||||
<p>The info should be shown in a prompt. </p>
|
||||
<p>If the user agrees to login to the URL, <a href="/method/messages.acceptUrlAuth">messages.acceptUrlAuth</a> should be called (eventually setting the <code>write_allowed</code> if the permission was requested and the user consented).
|
||||
The result will be a <a href="/constructor/urlAuthResultAccepted">urlAuthResultAccepted</a> with the final URL to open. </p>
|
||||
<p><a href="/constructor/urlAuthResultDefault">urlAuthResultDefault</a> could also be returned, instead, in which case the original URL must be opened, instead.
|
||||
The same must be done if the user opens the link while refusing the authorization request.</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="#client-configuration" id="client-configuration" name="client-configuration"><i class="anchor-icon"></i></a><a href="/api/config">Client configuration</a></h4>
|
||||
<p>The MTProto API has multiple configuration parameters that can be fetched with the appropriate methods.</p></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?43"></script>
|
||||
<script src="/js/jquery.min.js?1"></script>
|
||||
<script src="/js/bootstrap.min.js?1"></script>
|
||||
|
||||
<script>window.initDevPageNav&&initDevPageNav();
|
||||
backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -2,12 +2,14 @@
|
|||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>messages.sendBroadcast</title>
|
||||
<title>Page moved</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Sends multiple messages to contacts.">
|
||||
<meta property="og:title" content="messages.sendBroadcast">
|
||||
<meta property="description" content="This is not the droid you're looking for.
|
||||
The page has been moved.">
|
||||
<meta property="og:title" content="Page moved">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Sends multiple messages to contacts.">
|
||||
<meta property="og:description" content="This is not the droid you're looking for.
|
||||
The page has been moved.">
|
||||
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
|
||||
|
||||
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
|
||||
|
@ -26,7 +28,7 @@
|
|||
<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="/api">API</a></li>
|
||||
<li class=""><a href="/mtproto">Protocol</a></li>
|
||||
<li class=""><a href="/schema">Schema</a></li>
|
||||
</ul>
|
||||
|
@ -36,40 +38,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="/methods" >All Methods</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/method/messages.sendBroadcast" >messages.sendBroadcast</a></li></ul></div>
|
||||
<h1 id="dev_page_title">messages.sendBroadcast</h1>
|
||||
<div class="dev_page_bread_crumbs"></div>
|
||||
<h1 id="dev_page_title">Page moved</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Sends multiple messages to contacts.</p>
|
||||
<p>{schema}</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>contacts</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/Vector%20t">Vector</a><<a href="/type/InputUser">InputUser</a>></td>
|
||||
<td>List of user ID to whom a message will be sent</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="/type/InputMedia">InputMedia</a></td>
|
||||
<td>Message media-contents</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/messages.StatedMessages">messages.StatedMessages</a></p></div>
|
||||
<div id="dev_page_content"><p>This is not the droid you're looking for.<br>The page has been <a href="https://telegram.org/apple_privacy">moved</a>.</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
437
data/core.telegram.org/bots.html
Normal file
437
data/core.telegram.org/bots.html
Normal file
|
@ -0,0 +1,437 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Bots: An introduction for developers</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Bots are third-party applications that run inside Telegram. Users can interact with bots by sending them messages, commands…">
|
||||
<meta property="og:title" content="Bots: An introduction for developers">
|
||||
<meta property="og:image" content="75f7c457f2561cbf84">
|
||||
<meta property="og:description" content="Bots are third-party applications that run inside Telegram. Users can interact with bots by sending them messages, commands…">
|
||||
<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?215" 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">Bots: An introduction for developers</h1>
|
||||
|
||||
<div id="dev_page_content"><!-- scroll_nav -->
|
||||
|
||||
<p>Bots are third-party applications that run inside Telegram. Users can interact with bots by sending them messages, commands and <a href="#inline-mode">inline requests</a>. You control your bots using HTTPS requests to Telegram's <a href="/bots/api">Bot API</a>.</p>
|
||||
<blockquote>
|
||||
<p>The <a href="/bots/api">full API reference</a> for <strong>developers</strong> is available <a href="/bots/api">here</a>.</p>
|
||||
</blockquote>
|
||||
<h3><a class="anchor" name="1-what-can-i-do-with-bots" href="#1-what-can-i-do-with-bots"><i class="anchor-icon"></i></a>1. What can I do with bots?</h3>
|
||||
<div class="dev_side_image">
|
||||
<a href="/file/811140081/1/VldnlW70g2I/a140b0216e7d156ebc" target="_blank"><img src="/file/811140663/1/uHVzwsRJz3Y/a499733c59840694ca" title="A chat with a bot also showing search results from the @gif inline-bot"/></a>
|
||||
</div>
|
||||
|
||||
<p>To name just a few things, you could use bots to:</p>
|
||||
<ul>
|
||||
<li><p><strong>Get customized notifications and news</strong>. A bot can act as a smart newspaper, sending you relevant content as soon as it's published.</p>
|
||||
</li>
|
||||
<li><p><strong>Integrate with other services</strong>. A bot can enrich Telegram chats with content from external services.<br><a href="https://t.me/gmailbot"><strong>Gmail Bot</strong></a>, <a href="https://t.me/gif"><strong>GIF bot</strong></a>, <a href="https://t.me/imdb"><strong>IMDB bot</strong></a>, <a href="https://t.me/wiki"><strong>Wiki bot</strong></a>, <a href="https://t.me/music"><strong>Music bot</strong></a>, <a href="https://t.me/youtube"><strong>Youtube bot</strong></a>, <a href="https://t.me/githubbot"><strong>GitHubBot</strong></a></p>
|
||||
</li>
|
||||
<li><p><strong>Accept payments from Telegram users</strong>. A bot can offer paid services or work as a virtual storefront. <a href="/bots/payments">Read more »</a><br><a href="https://t.me/shopbot"><strong>Demo Shop Bot</strong></a>, <a href="https://t.me/teststore"><strong>Demo Store</strong></a></p>
|
||||
</li>
|
||||
<li><p><strong>Create custom tools</strong>. A bot may provide you with alerts, weather forecasts, translations, formatting or other services.<br><a href="https://t.me/Bold"><strong>Markdown bot</strong></a>, <a href="https://t.me/sticker"><strong>Sticker bot</strong></a>, <a href="https://t.me/vote"><strong>Vote bot</strong></a>, <a href="https://t.me/like"><strong>Like bot</strong></a></p>
|
||||
</li>
|
||||
<li><p><strong>Build single- and multiplayer games</strong>. A bot can offer rich <a href="/bots/games">HTML5 experiences</a>, from simple arcades and puzzles to 3D-shooters and real-time strategy games.<br><a href="https://t.me/gamebot"><strong>GameBot</strong></a>, <a href="https://t.me/gamee"><strong>Gamee</strong></a></p>
|
||||
</li>
|
||||
<li><p><strong>Build social services</strong>. A bot could connect people looking for conversation partners based on common interests or proximity.</p>
|
||||
</li>
|
||||
<li><p><strong>Do virtually anything else</strong>. Except for dishes — bots are terrible at doing the dishes.</p>
|
||||
</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="2-how-do-bots-work" href="#2-how-do-bots-work"><i class="anchor-icon"></i></a>2. How do bots work?</h3>
|
||||
<p>At the core, Telegram Bots are special accounts that do not require an additional phone number to set up. Users can interact with bots in two ways:</p>
|
||||
<ul>
|
||||
<li>Send messages and <a href="#commands">commands</a> to bots by opening a chat with them or by adding them to groups.</li>
|
||||
<li>Send requests directly from the input field by typing the bot's @username and a query. This allows sending content from <a href="/bots/inline">inline bots</a> directly into any chat, group or channel.</li>
|
||||
</ul>
|
||||
<p>Messages, commands and requests sent by users are passed to the software running on your servers. Our intermediary server handles 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. We call that interface our <a href="/bots/api">Bot API</a>.</p>
|
||||
<blockquote>
|
||||
<p>A detailed description of the Bot API is available on <a href="/bots/api">this page »</a></p>
|
||||
</blockquote>
|
||||
<h3><a class="anchor" name="3-how-do-i-create-a-bot" href="#3-how-do-i-create-a-bot"><i class="anchor-icon"></i></a>3. How do I create a bot?</h3>
|
||||
<div class="dev_side_image">
|
||||
<a href="/file/811140327/1/zlN4goPTupk/9ff2f2f01c4bd1b013" target="_blank"><img src="/file/811140763/1/PihKNbjT8UE/03b57814e13713da37" title="The Botfather. Click for hi-res picture"/></a>
|
||||
</div>
|
||||
|
||||
<p>There's a… bot for that. Just talk to <a href="https://t.me/botfather">BotFather</a> (described <a href="#6-botfather">below</a>) and follow a few simple steps. Once you've created a bot and received your authentication token, head down to the <a href="/bots/api">Bot API manual</a> to see what you can teach your bot to do.</p>
|
||||
<blockquote>
|
||||
<p>You may also like to check out some <strong>code examples</strong> <a href="/bots/samples">here »</a></p>
|
||||
</blockquote>
|
||||
<h3><a class="anchor" name="4-how-are-bots-different-from-humans" href="#4-how-are-bots-different-from-humans"><i class="anchor-icon"></i></a>4. How are bots different from humans?</h3>
|
||||
<ul>
|
||||
<li>Bots have no online status and no last seen timestamps, the interface shows the label <strong>'bot'</strong> instead.</li>
|
||||
<li>Bots have limited cloud storage — older messages may be removed by the server shortly after they have been processed.</li>
|
||||
<li>Bots can't initiate conversations with users. A user <strong>must</strong> either add them to a group or send them a message first. People can use <code>t.me/<bot_username></code> links or username search to find your bot.</li>
|
||||
<li>Bot usernames always end in 'bot' (e.g. <a href="https://t.me/triviabot">@TriviaBot</a>, <a href="https://t.me/githubbot">@GitHub_bot</a>).</li>
|
||||
<li>When added to a group, bots do not receive all messages by default (see <a href="#privacy-mode">Privacy mode</a>).</li>
|
||||
<li>Bots never eat, sleep or complain (unless expressly programmed otherwise).</li>
|
||||
</ul>
|
||||
<hr>
|
||||
<h3><a class="anchor" name="5-bot-perks" href="#5-bot-perks"><i class="anchor-icon"></i></a>5. Bot perks</h3>
|
||||
<p>Telegram bots are unique in many ways — we offer <a href="#keyboards">two</a> <a href="#inline-keyboards-and-on-the-fly-updating">kinds</a> of keyboards, additional interfaces for <a href="#global-commands">default commands</a> and <a href="#deep-linking">deep linking</a> as well as <a href="/bots/api#formatting-options">text formatting</a>, <a href="#payment-platform">integrated payments</a> and more.</p>
|
||||
<h4><a class="anchor" name="inline-mode" href="#inline-mode"><i class="anchor-icon"></i></a>Inline mode</h4>
|
||||
<!--<div class="dev_side_image">
|
||||
<a href="/file/811140221/1/fW9vnLya4Fg/e2b5c530c7b0e019c4" target="_blank"><img src="/file/811140530/1/h-eMmPp2vp4/cd4a109f75e6561305" title="Inline bots. Click for hi-res picture">
|
||||
</a></div>-->
|
||||
|
||||
<p>Users can interact with your bot via <a href="/bots/api#inline-mode"><strong>inline queries</strong></a> straight from the <strong>text input field</strong> in <strong>any</strong> chat. All they need to do is start a message with your bot's username and then type a query.</p>
|
||||
<p>Having received the query, your bot can return some results. As soon as the user taps one of them, it is sent to the user's currently opened chat. This way, people can request content from your bot in any of their chats, groups or channels.</p>
|
||||
<p>Check out this <a href="https://telegram.org/blog/inline-bots">blog</a> to see a sample inline bot in action. You can also try the <a href="https://t.me/sticker">@sticker</a> and <a href="https://t.me/music">@music</a> bots to see for yourself.</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 0px;" /></a></center>
|
||||
|
||||
</div>
|
||||
|
||||
<p>We've also implemented an easy way for your bot to <a href="/bots/inline#switching-inline-pm-modes">switch between inline and PM modes</a>.</p>
|
||||
<blockquote>
|
||||
<p><a href="/bots/inline">Read more about the Inline Mode »</a></p>
|
||||
</blockquote>
|
||||
<h4><a class="anchor" name="payment-platform" href="#payment-platform"><i class="anchor-icon"></i></a>Payment platform</h4>
|
||||
<!--<div class="dev_side_image">
|
||||
<a href="/file/811140227/2/ZTXUngAbELM.193805/ba6aa233d1d4206207" target="_blank"><img src="/file/811140095/1/lfTvDVqVS8M.43169/1a191248e6cf027581" title="Payments API. Click for hi-res picture">
|
||||
</a></div>-->
|
||||
|
||||
<p>You can use bots to <strong>accept payments</strong> from Telegram users around the world.</p>
|
||||
<ul>
|
||||
<li>Send invoices to <strong>any chat</strong>, including to groups and channels.</li>
|
||||
<li>Create invoices that can be <strong>forwarded</strong> and used by <strong>multiple buyers</strong> to order things.</li>
|
||||
<li>Use <a href="/bots/inline">inline mode</a> to help users show your goods and services to their friends and communities.</li>
|
||||
<li>Allow <strong>tips</strong> from users with preset and custom amounts.</li>
|
||||
<li>Accept payments from users on mobile or <strong>desktop apps</strong>.</li>
|
||||
<li>Try <a href="https://t.me/shopbot">@ShopBot</a> to create a test invoice – or start a message with <code>@ShopBot ...</code> in any chat for an <strong>inline invoice</strong>.</li>
|
||||
<li>Check out <a href="https://telegram.org/teststore">Demo Shop</a> for an example of a <a href="https://telegram.org/tour/channels">Telegram Channel</a> used as <strong>virtual storefront</strong>.</li>
|
||||
</ul>
|
||||
<div class="blog_video_player_wrap" style="max-width: 400px; margin: 20px auto 20px;">
|
||||
<video class="blog_video_player tl_blog_vid_autoplay" onclick="videoTogglePlay(this)" autoplay loop controls muted poster="/file/464001377/1/0o3vSvY22g8.123356/deb4ed6951d780f7b7" style="max-width: 400px;" title="If your pizza place can't deliver a clone army, you're buying pizza from the wrong shop." alt="Video: Ordering a pizza through a Telegram channel">
|
||||
<source src="/file/464001705/2/Hg-klQnZ_n4.4889245.mp4/d324511ffdab7b4668" type="video/mp4">
|
||||
</video>
|
||||
</div>
|
||||
|
||||
<blockquote>
|
||||
<p><a href="/bots/payments">Read more about the Payments Platform »</a></p>
|
||||
</blockquote>
|
||||
<h4><a class="anchor" name="gaming-platform" href="#gaming-platform"><i class="anchor-icon"></i></a>Gaming platform</h4>
|
||||
<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. The platform allows your bot to keep track of <strong>high scores</strong> for every game played in every chat. Whenever there’s a new leader in the game, other playing members in the chat are notified that they need to step it up. </p>
|
||||
<div><center>
|
||||
<a href="/file/811140306/1/dkciuEDbpxU.193188/8a0a21b6e9d111be4c" target="_blank"><img src="/file/811140306/1/dkciuEDbpxU.193188/8a0a21b6e9d111be4c" title="Game in a chat" style="width: 250px; padding: 10px 5px" /></a>
|
||||
<a href="/file/811140426/1/ZCw3vu_v8s0.109692/04efd9e88644939a4f" target="_blank"><img src="/file/811140426/1/ZCw3vu_v8s0.109692/04efd9e88644939a4f" title="In-game scoreboard and sharing button" style="width: 250px; padding: 10px 5px" /></a>
|
||||
</center>
|
||||
</div>
|
||||
|
||||
<p>Since the underlying technology is HTML5, the games can be anything from simple arcades and puzzles to multiplayer 3D-shooters and real-time strategy games. Our team has created a couple of simple demos for you to try out:</p>
|
||||
<ul>
|
||||
<li><a href="https://t.me/gamebot?game=MathBattle">Math Battle</a></li>
|
||||
<li><a href="https://t.me/gamebot?game=Lumberjack">Lumberjack</a></li>
|
||||
<li><a href="https://t.me/gamebot?game=Corsairs">Corsairs</a></li>
|
||||
</ul>
|
||||
<p>You can also check out the <a href="https://t.me/gamee"><strong>@gamee</strong></a> bot that has more than 20 games.</p>
|
||||
<blockquote>
|
||||
<p><a href="https://telegram.org/blog/games">Read more about the Gaming Platform »</a></p>
|
||||
</blockquote>
|
||||
<h4><a class="anchor" name="keyboards" href="#keyboards"><i class="anchor-icon"></i></a>Keyboards</h4>
|
||||
<p>Traditional chat bots can of course be taught to understand human language. But sometimes you want some more formal input from the user — and this is where <strong>custom keyboards</strong> can become extremely useful.</p>
|
||||
<p>Whenever your bot sends a message, it can pass along a special keyboard with predefined reply options (see <a href="/bots/api/#replykeyboardmarkup">ReplyKeyboardMarkup</a>). Telegram apps that receive the message will display your keyboard to the user. Tapping any of the buttons will immediately send the respective command. This way you can drastically simplify user interaction with your bot.</p>
|
||||
<p>We currently support text and emoji for your buttons. Here are some custom keyboard examples:</p>
|
||||
<center>
|
||||
<div>
|
||||
<a href="/file/811140184/1/5YJxx-rostA/ad3f74094485fb97bd" target="_blank"><img src="/file/811140184/1/5YJxx-rostA/ad3f74094485fb97bd" title="Keyboard for a poll bot" style="max-height: 300px; padding: 10px 5px" /></a>
|
||||
|
||||
<a href="/file/811140880/1/jS-YSVkDCNQ/b397dfcefc6da0dc70" target="_blank"><img src="/file/811140880/1/jS-YSVkDCNQ/b397dfcefc6da0dc70" title="Keyboard for a calculator bot. Because you can." style="max-height: 300px; padding: 10px 5px" /></a>
|
||||
|
||||
<a href="/file/811140733/2/KoysqJKQ_kI/a1ee46a377796c3961" target="_blank"><img src="/file/811140733/2/KoysqJKQ_kI/a1ee46a377796c3961" title="Keyboard for a trivia bot" style="max-height: 300px; padding: 10px 5px" /></a>
|
||||
|
||||
|
||||
</div></center>
|
||||
|
||||
<blockquote>
|
||||
<p>For more technical information on custom keyboards, please consult the <a href="/bots/api">Bot API manual</a> (see <a href="/bots/api#sendmessage">sendMessage</a>).</p>
|
||||
</blockquote>
|
||||
<h4><a class="anchor" name="inline-keyboards-and-on-the-fly-updating" href="#inline-keyboards-and-on-the-fly-updating"><i class="anchor-icon"></i></a>Inline keyboards and on-the-fly updating</h4>
|
||||
<p>There are times when you'd prefer to do things without sending any messages to the chat. For example, when your user is changing settings or flipping through search results. In such cases you can use Inline Keyboards that are integrated directly into the messages they belong to. </p>
|
||||
<p>Unlike with custom reply keyboards, pressing buttons on inline keyboards doesn't result in messages sent to the chat. Instead, inline keyboards support buttons that work behind the scenes: <a href="/bots/2-0-intro#callback-buttons">callback buttons</a>, <a href="/bots/2-0-intro#url-buttons">URL buttons</a> and <a href="/bots/2-0-intro#switch-to-inline-buttons">switch to inline buttons</a>.</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: 240px; padding: 10px 5px;" /></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: 240px; padding: 10px 5px;" /></a>
|
||||
<a href="/file/811140999/1/2JSoUVlWKa0/4fad2e2743dc8eda04" target="_blank"><img src="/file/811140999/1/2JSoUVlWKa0/4fad2e2743dc8eda04" title="A URL button" style="width:240px; padding:10px 5px"/></a>
|
||||
|
||||
</center>
|
||||
|
||||
</div>
|
||||
|
||||
<p>When callback buttons are used, your bot can update its existing messages (or just their keyboards) so that the chat remains tidy. Check out these sample bots to see inline keyboards in action: <a href="https://t.me/music">@music</a>, <a href="https://t.me/vote">@vote</a>, <a href="https://t.me/like">@like</a>.</p>
|
||||
<blockquote>
|
||||
<p><a href="/bots/2-0-intro#new-inline-keyboards">Read more about inline keyboards and on-the-fly editing »</a></p>
|
||||
</blockquote>
|
||||
<h4><a class="anchor" name="commands" href="#commands"><i class="anchor-icon"></i></a>Commands</h4>
|
||||
<p>Commands present a more flexible way to communicate with your bot. The following syntax may be used:</p>
|
||||
<pre><code>/command</code></pre>
|
||||
<p>A command must always start with the '/' symbol and may not be longer than 32 characters. Commands can use latin letters, numbers and underscores. Here are a few examples:</p>
|
||||
<pre><code>/get_messages_stats
|
||||
/set_timer 10min Alarm!
|
||||
/get_timezone London, UK</code></pre>
|
||||
<p>Messages that start with a slash are always passed to the bot (along with replies to its messages and messages that @mention the bot by username). Telegram apps will:</p>
|
||||
<ul>
|
||||
<li>Suggest a list of supported commands with descriptions when the user enters a '/' (for this to work, you need to have provided a list of commands to the <a href="#6-botfather">BotFather</a>). Tapping on a command in the list immediately sends the command.</li>
|
||||
<li>Show an additional <strong>(/)</strong> button in the input field in all chats with bots. Tapping it types a '/' and shows the list of commands.</li>
|
||||
<li>Highlight <strong>/commands</strong> in messages. When the user taps a highlighted command, the command is sent at once.</li>
|
||||
</ul>
|
||||
<center><div>
|
||||
<a href="/file/811140845/2/rNUxpcGDeQU/05eaaf20b0dbaf9cb3" target="_blank"><img src="/file/811140845/2/rNUxpcGDeQU/05eaaf20b0dbaf9cb3" title="Suggested commands" style="width: 230px; padding: 10px 5px" /></a>
|
||||
|
||||
<a href="/file/811140315/2/gf7_D2HbeyM/e3ca2de4de7918f826" target="_blank"><img src="/file/811140315/2/gf7_D2HbeyM/e3ca2de4de7918f826" title="Notice the new button in the input field, right next to the sticker button" style="width: 230px; padding: 10px 5px" /></a>
|
||||
|
||||
|
||||
<a href="/file/811140029/1/s5zv4fbWdhw/a04aefa0ee0557f16a" target="_blank"><img src="/file/811140029/1/s5zv4fbWdhw/a04aefa0ee0557f16a" title="Suggested commands for multiple bots" style="width: 230px; padding: 10px 5px" /></a>
|
||||
|
||||
</div></center>
|
||||
|
||||
|
||||
<p>If multiple bots are in a group, it is possible to add bot usernames to commands in order to avoid confusion:</p>
|
||||
<pre><code>/start@TriviaBot
|
||||
/start@ApocalypseBot</code></pre>
|
||||
<p>This is done automatically when commands are selected via the list of suggestions. Please remember that your bot needs to be able to process commands that are followed by its username.</p>
|
||||
<h5><a class="anchor" name="global-commands" href="#global-commands"><i class="anchor-icon"></i></a>Global commands</h5>
|
||||
<p>In order to make it easier for users to navigate the bot multiverse, we ask all developers to support a few basic commands. Telegram apps will have <strong>interface shortcuts</strong> for these commands.</p>
|
||||
<ul>
|
||||
<li><strong>/start</strong> - begins interaction with the user, e.g., by sending a greeting message. This command can also be used to pass additional parameters to the bot (see <a href="#deep-linking">Deep linking</a>)</li>
|
||||
<li><strong>/help</strong> - returns a help message. It can be a short text about what your bot can do and a list of commands.</li>
|
||||
<li><strong>/settings</strong> - (if applicable) returns the bot's settings for this user and suggests commands to edit these settings.</li>
|
||||
</ul>
|
||||
<p>Users will see a <strong>Start</strong> button when they first open a conversation with your bot. <strong>Help</strong> and <strong>Settings</strong> links will be available in the menu on the bot's profile page.</p>
|
||||
<center><div>
|
||||
<a href="/file/811140979/2/yD8AphHbahk/7662d14f4e0442ae3a" target="_blank"><img src="/file/811140979/2/yD8AphHbahk/7662d14f4e0442ae3a" title="An empty conversation with a bot" style="width: 250px; padding: 10px 5px" /></a>
|
||||
|
||||
<a href="/file/811140479/2/1c2zUWhR7sA/98889b2a45f8e42a35" target="_blank"><img src="/file/811140479/2/1c2zUWhR7sA/98889b2a45f8e42a35" title="A bot's profile page, featuring 'Help' and 'Settings' buttons" style="width: 250px; padding: 10px 5px" /></a>
|
||||
|
||||
</div></center>
|
||||
|
||||
<h4><a class="anchor" name="formatting-bold-italic-fixed-width-text-and-inline-links" href="#formatting-bold-italic-fixed-width-text-and-inline-links"><i class="anchor-icon"></i></a>Formatting: bold, italic, fixed-width text and inline links</h4>
|
||||
<p>You can use bold, italic or fixed-width text, as well as inline links in your bots' messages. Telegram clients will render them accordingly. </p>
|
||||
<blockquote>
|
||||
<p><a href="bots/api#formatting-options">Read more in the Bot API manual »</a></p>
|
||||
</blockquote>
|
||||
<h4><a class="anchor" name="privacy-mode" href="#privacy-mode"><i class="anchor-icon"></i></a>Privacy mode</h4>
|
||||
<p>Bots are frequently added to groups in order to augment communication between human users, e.g. by providing news, notifications from external services or additional search functionality. This is especially true for work-related groups. Now, when you share a group with a bot, you tend to ask yourself “How can I be sure that the little rascal isn't selling my chat history to my competitors?” The answer is — <strong>privacy mode</strong>.</p>
|
||||
<p>A bot running in privacy mode will not receive all messages that people send to the group. Instead, it will only receive:</p>
|
||||
<ul>
|
||||
<li>Messages that start with a slash '/' (see <a href="#commands">Commands</a> above)</li>
|
||||
<li>Replies to the bot's own messages</li>
|
||||
<li>Service messages (people added or removed from the group, etc.)</li>
|
||||
<li>Messages from channels where it's a member</li>
|
||||
</ul>
|
||||
<p>On one hand, this helps some of us sleep better at night (in our tinfoil nightcaps), on the other — it allows the bot developer to save a lot of resources, since they won't need to process tens of thousands irrelevant messages each day.</p>
|
||||
<p>Privacy mode is enabled by default for all bots, except bots that were added to the group as <strong>admins</strong> (bot admins always receive all messages). It can be disabled, so that the bot receives all messages like an ordinary user (the bot will need to be <strong>re-added</strong> to the group for this change to take effect). We only recommend doing this in cases where it is absolutely necessary for your bot to work — users can always see a bot's current privacy setting in the group members list. In most cases, using the <a href="/bots/api#forcereply">force reply</a> option for the bot's messages should be more than enough. </p>
|
||||
<p><a href="/bots/faq#what-messages-will-my-bot-get">So what messages exactly will my bot get? »</a></p>
|
||||
<h4><a class="anchor" name="deep-linking" href="#deep-linking"><i class="anchor-icon"></i></a>Deep linking</h4>
|
||||
<p>Telegram bots have a <a href="https://en.wikipedia.org/wiki/Deep_linking">deep linking</a> mechanism, that allows for passing additional parameters to the bot on startup. It could be a command that launches the bot — or an authentication token to connect the user's Telegram account to their account on some external service.</p>
|
||||
<p>Each bot has a link that opens a conversation with it in Telegram — <code>https://t.me/<bot username></code>. You can add the parameters <strong>start</strong> or <strong>startgroup</strong> to this link, with values up to 64 characters long. For example:</p>
|
||||
<pre><code>https://t.me/triviabot?startgroup=test</code></pre>
|
||||
<p><code>A-Z</code>, <code>a-z</code>, <code>0-9</code>, <code>_</code> and <code>-</code> are allowed. We recommend using <a href="https://en.wikipedia.org/wiki/Base64#The_URL_applications">base64url</a> to encode parameters with binary and other types of content.</p>
|
||||
<p>Following a link with the <strong>start</strong> parameter will open a one-on-one conversation with the bot, showing a START button in the place of the input field. If the <strong>startgroup</strong> parameter is used, the user is prompted to select a group to add the bot to. As soon as a user confirms the action (presses the START button in their app or selects a group to add the bot to), your bot will receive a message from that user in this format:</p>
|
||||
<pre><code>/start PAYLOAD</code></pre>
|
||||
<p><code>PAYLOAD</code> stands for the value of the <strong>start</strong> or <strong>startgroup</strong> parameter that was passed in the link.</p>
|
||||
<h5><a class="anchor" name="deep-linking-example" href="#deep-linking-example"><i class="anchor-icon"></i></a>Deep linking Example</h5>
|
||||
<p>Suppose the website example.com would like to send notifications to its users via a Telegram bot. Here's what they could do to enable notifications for a user with the ID <code>123</code>.</p>
|
||||
<ol>
|
||||
<li><a href="#6-botfather">Create a bot</a> with a suitable username, e.g. @ExampleComBot</li>
|
||||
<li>Set up a <a href="/bots/api#setwebhook">webhook</a> for incoming messages</li>
|
||||
<li>Generate a random string of a sufficient length, e.g. <code>$memcache_key = "vCH1vGWJxfSeofSAs0K5PA"</code></li>
|
||||
<li>Put the value <code>123</code> with the key <code>$memcache_key</code> into Memcache for 3600 seconds (one hour) </li>
|
||||
<li>Show our user the button <code>https://t.me/ExampleComBot?start=vCH1vGWJxfSeofSAs0K5PA</code></li>
|
||||
<li>Configure the webhook processor to query Memcached with the parameter that is passed in incoming messages beginning with <code>/start</code>. If the key exists, record the chat_id passed to the webhook as <strong>telegram_chat_id</strong> for the user <code>123</code>. Remove the key from Memcache.</li>
|
||||
<li>Now when we want to send a notification to the user <code>123</code>, check if they have the field <strong>telegram_chat_id</strong>. If yes, use the <a href="/bots/api#sendmessage">sendMessage</a> method in the <a href="/bots/api">Bot API</a> to send them a message in Telegram.</li>
|
||||
</ol>
|
||||
<h4><a class="anchor" name="location-and-number" href="#location-and-number"><i class="anchor-icon"></i></a>Location and Number</h4>
|
||||
<p>Some bots need extra data from the user to work properly. For example, knowing the user's location helps provide more relevant geo-specific results. The user's phone number can be very useful for integrations with other services, like banks, etc.</p>
|
||||
<p>Bots can ask a 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>
|
||||
|
||||
</div>
|
||||
|
||||
<p>When these buttons are pressed, Telegram clients will display a confirmation alert that tells the user what's about to happen.</p>
|
||||
<blockquote>
|
||||
<p><a href="/bots/api#keyboardbutton">Manual: Number and location buttons »</a></p>
|
||||
</blockquote>
|
||||
<hr>
|
||||
<h3><a class="anchor" name="6-botfather" href="#6-botfather"><i class="anchor-icon"></i></a>6. BotFather</h3>
|
||||
<blockquote>
|
||||
<p>Jump to top to learn everything about <a href="#">Telegram bots »</a></p>
|
||||
</blockquote>
|
||||
<p><a href="https://t.me/botfather">BotFather</a> is the one bot to rule them all. It will help you create new bots and change settings for existing ones.</p>
|
||||
<h4><a class="anchor" name="creating-a-new-bot" href="#creating-a-new-bot"><i class="anchor-icon"></i></a>Creating a new bot</h4>
|
||||
<p>Use the <strong>/newbot</strong> command to create a new bot. The BotFather will ask you for a name and username, then generate an authentication token for your new bot. </p>
|
||||
<p>The <strong>name</strong> of your bot is displayed in contact details and elsewhere.</p>
|
||||
<p>The <strong>Username</strong> is a short name, to be used in mentions and t.me links. Usernames are 5-32 characters long and are case insensitive, but may only include Latin characters, numbers, and underscores. Your bot's username <strong>must</strong> end in 'bot', e.g. 'tetris_bot' or 'TetrisBot'.</p>
|
||||
<p>The <strong>token</strong> is a string along the lines of <code>110201543:AAHdqTcvCH1vGWJxfSeofSAs0K5PALDsaw</code> that is required to authorize the bot and send requests to the <a href="/bots/api">Bot API</a>. Keep your token secure and store it safely, it can be used by anyone to control your bot.</p>
|
||||
<h4><a class="anchor" name="generating-an-authentication-token" href="#generating-an-authentication-token"><i class="anchor-icon"></i></a>Generating an authentication token</h4>
|
||||
<p>If your existing token is compromised or you lost it for some reason, use the <strong>/token</strong> command to generate a new one.</p>
|
||||
<h4><a class="anchor" name="botfather-commands" href="#botfather-commands"><i class="anchor-icon"></i></a>Botfather commands</h4>
|
||||
<p>The remaining commands are pretty self-explanatory:</p>
|
||||
<ul>
|
||||
<li><strong>/mybots</strong> — returns a list of your bots with handy controls to edit their settings</li>
|
||||
<li><strong>/mygames</strong> — does the same for your games</li>
|
||||
</ul>
|
||||
<p><strong>Edit bots</strong></p>
|
||||
<ul>
|
||||
<li><strong>/setname</strong> – change your bot's name.</li>
|
||||
<li><strong>/setdescription</strong> — change the bot's <strong>description</strong>, a short text of up to 512 characters, describing your bot. Users will see this text at the beginning of the conversation with the bot, titled 'What can this bot do?'.</li>
|
||||
<li><strong>/setabouttext</strong> — change the bot's <strong>about info</strong>, an even shorter text of up to 120 characters. Users will see this text on the bot's profile page. When they share your bot with someone, this text is sent together with the link.</li>
|
||||
<li><strong>/setuserpic</strong> — change the bot's profile pictures. It's always nice to put a face to a name.</li>
|
||||
<li><strong>/setcommands</strong> — change the list of commands supported by your bot. Users will see these commands as suggestions when they type <code>/</code> in the chat with your bot. Each command has a name (must start with a slash ‘/’, alphanumeric plus underscores, no more than 32 characters, case-insensitive), parameters, and a text description. Users will see the list of commands whenever they type '/' in a conversation with your bot.</li>
|
||||
<li><strong>/deletebot</strong> — delete your bot and free its username.</li>
|
||||
</ul>
|
||||
<p><strong>Edit settings</strong></p>
|
||||
<ul>
|
||||
<li><strong>/setinline</strong> — toggle <a href="/bots/inline">inline mode</a> for your bot.</li>
|
||||
<li><strong>/setinlinegeo</strong> - request location data to provide <a href="/bots/inline#location-based-results">location-based inline results</a>.</li>
|
||||
<li><strong>/setjoingroups</strong> — toggle whether your bot can be added to groups or not. Any bot must be able to process private messages, but if your bot was not designed to work in groups, you can disable this.</li>
|
||||
<li><strong>/setprivacy</strong> — set which messages your bot will receive when added to a group. With privacy mode disabled, the bot will receive all messages. We recommend leaving <a href="#privacy-mode">privacy mode</a> enabled. You will need to re-add the bot to existing groups for this change to take effect.</li>
|
||||
</ul>
|
||||
<p><strong>Manage games</strong></p>
|
||||
<ul>
|
||||
<li><strong>/newgame</strong> — create a new <a href="/bots/games">game</a>.</li>
|
||||
<li><strong>/listgames</strong> — get a list of your games.</li>
|
||||
<li><strong>/editgame</strong> — edit a game.</li>
|
||||
<li><strong>/deletegame</strong> — delete an existing game.</li>
|
||||
</ul>
|
||||
<blockquote>
|
||||
<p>Please note, that it may take <strong>a few minutes</strong> for changes to take effect.</p>
|
||||
</blockquote>
|
||||
<h4><a class="anchor" name="status-alerts" href="#status-alerts"><i class="anchor-icon"></i></a>Status alerts</h4>
|
||||
<p>Millions choose Telegram for its speed. To stay competitive in this environment, your bot also needs to be responsive. In order to help developers keep their bots in shape, Botfather will send status alerts if it sees something is wrong.</p>
|
||||
<p>We will be checking the number of replies and the request/response conversion rate for popular bots (~300 requests per minute: but don't write this down as the value may change in the future). If we get abnormally low readings, you will receive a notification from Botfather.</p>
|
||||
<h5><a class="anchor" name="responding-to-alerts" href="#responding-to-alerts"><i class="anchor-icon"></i></a>Responding to alerts</h5>
|
||||
<p>By default, you will only get one alert per bot per hour. Each alert has the following buttons:</p>
|
||||
<ul>
|
||||
<li><strong>Fixed.</strong> Use this if you found an issue with your bot and fixed it. If you press the fix button, we will resume sending alerts in the regular way so that you can see if your fix worked within 5-10 minutes instead of having to wait for an hour.</li>
|
||||
<li><strong>Support.</strong> Use this to open a chat with <a href="https://t.me/botsupport">@BotSupport</a> if you don't see any issues with your bot or if you think the problem is on our side.</li>
|
||||
<li><strong>Mute for 8h/1w.</strong> Use this if you can't fix your bot at the moment. This will disable all alerts for the bot in question for the specified period of time. We do not recommend using this option since your users may migrate to a more stable bot. You can unmute alerts in your bot's settings via Botfather.</li>
|
||||
</ul>
|
||||
<h5><a class="anchor" name="monitored-issues" href="#monitored-issues"><i class="anchor-icon"></i></a>Monitored issues</h5>
|
||||
<p>We will currently notify you about the following issues:</p>
|
||||
<p><strong>1.</strong></p>
|
||||
<pre><code>Too few **private messages** are sent compared to previous weeks: **{value}**</code></pre>
|
||||
<p>Your bot is sending much fewer messages than it did in the previous weeks. This is useful for newsletter-style bots that send out messages without prompts from the users. The larger the value, the more significant the difference. </p>
|
||||
<p><strong>2.</strong></p>
|
||||
<pre><code>Too few replies to incoming **private messages**. Conversion rate: **{value}**</code></pre>
|
||||
<p>Your bot is not replying to all messages that are being sent to it (the request/response conversion rate for your bot was too low for at least two of the last three 5-minute periods). To provide a good user experience, please respond to all messages that are sent to your bot. Respond to <em>message</em> <a href="https://core.telegram.org/bots/api#update">updates</a> by calling <em>send…</em> methods (e.g. <a href="https://core.telegram.org/bots/api#sendmessage">sendMessage</a>).</p>
|
||||
<p><strong>3.</strong></p>
|
||||
<pre><code>Too few answers to **inline queries**. Conversion rate: **{value}**</code></pre>
|
||||
<p>Your bot is not replying to all inline queries that are being sent to it, calculated in the same way as above. Respond to <em>inline_query</em> <a href="https://core.telegram.org/bots/api#update">updates</a> by calling <a href="/bots/api#answerinlinequery">answerInlineQuery</a>.</p>
|
||||
<p><strong>4.</strong></p>
|
||||
<pre><code>Too few answers to **callback queries**. Conversion rate: **{value}**
|
||||
Too few answers to **callback game queries**. Conversion rate: **{value}**</code></pre>
|
||||
<p>Your bot is not replying to all callback queries that are being sent to it (with or without games), calculated in the same way as above. Respond to <em>callback_query</em> <a href="https://core.telegram.org/bots/api#update">updates</a> by calling <a href="/bots/api#answercallbackquery">answerCallbackQuery</a>.</p>
|
||||
<blockquote>
|
||||
<p>Please note that the status alerts feature is still being tested and will be improved in the future.</p>
|
||||
</blockquote>
|
||||
<hr>
|
||||
<p>That's it for the introduction. You are now definitely ready to proceed to the <a href="/bots/api"><strong>BOT API MANUAL</strong></a>.</p>
|
||||
<p>If you've got any questions, please check out our <a href="/bots/faq"><strong>Bot FAQ »</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?43"></script>
|
||||
<script src="/js/jquery.min.js?1"></script>
|
||||
<script src="/js/bootstrap.min.js?1"></script>
|
||||
|
||||
<script>window.initDevPageNav&&initDevPageNav();
|
||||
backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,670 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Bot API changelog</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="The Bot API is an HTTP-based interface created for developers keen on building bots for Telegram.
|
||||
To learn how to create…">
|
||||
<meta property="og:title" content="Bot API changelog">
|
||||
<meta property="og:image" content="bf055cf23fb6ab0d9b">
|
||||
<meta property="og:description" content="The Bot API is an HTTP-based interface created for developers keen on building bots for Telegram.
|
||||
To learn how to create…">
|
||||
<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?215" 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">Bot API changelog</h1>
|
||||
|
||||
<div id="dev_page_content"><!-- scroll_nav -->
|
||||
|
||||
<blockquote>
|
||||
<p>The Bot API is an HTTP-based interface created for developers keen on building bots for Telegram.<br>To learn how to create and set up a bot, please consult our <a href="https://core.telegram.org/bots"><strong>Introduction to Bots »</strong></a></p>
|
||||
</blockquote>
|
||||
<p>You will find all changes to our <a href="/bots/api"><strong>Bot API</strong></a> on this page.</p>
|
||||
<h3><a class="anchor" name="recent-changes" href="#recent-changes"><i class="anchor-icon"></i></a>Recent changes</h3>
|
||||
<blockquote>
|
||||
<p>Subscribe to <a href="https://t.me/botnews">@BotNews</a> to be the first to know about the latest updates and join the discussion in <a href="https://t.me/bottalk">@BotTalk</a></p>
|
||||
</blockquote>
|
||||
<h3><a class="anchor" name="january-31-2022" href="#january-31-2022"><i class="anchor-icon"></i></a>January 31, 2022</h3>
|
||||
<p><strong>Bot API 5.7</strong></p>
|
||||
<ul>
|
||||
<li>Added support for <a href="https://telegram.org/blog/video-stickers-better-reactions">Video Stickers</a>.</li>
|
||||
<li>Added the field <em>is_video</em> to the classes <a href="/bots/api#sticker">Sticker</a> and <a href="/bots/api#stickerset">StickerSet</a>.</li>
|
||||
<li>Added the parameter <em>webm_sticker</em> to the methods <a href="/bots/api#createnewstickerset">createNewStickerSet</a> and <a href="/bots/api#addstickertoset">addStickerToSet</a>.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="december-30-2021" href="#december-30-2021"><i class="anchor-icon"></i></a>December 30, 2021</h3>
|
||||
<p><strong>Bot API 5.6</strong></p>
|
||||
<ul>
|
||||
<li>Improved support for <a href="https://telegram.org/blog/protected-content-delete-by-date-and-more#protected-content-in-groups-and-channels">Protected Content</a>.</li>
|
||||
<li>Added the parameter <em>protect_content</em> to the methods <a href="/bots/api#sendmessage">sendMessage</a>, <a href="/bots/api#sendphoto">sendPhoto</a>, <a href="/bots/api#sendvideo">sendVideo</a>, <a href="/bots/api#sendanimation">sendAnimation</a>, <a href="/bots/api#sendaudio">sendAudio</a>, <a href="/bots/api#senddocument">sendDocument</a>, <a href="/bots/api#sendsticker">sendSticker</a>, <a href="/bots/api#sendvideonote">sendVideoNote</a>, <a href="/bots/api#sendvoice">sendVoice</a>, <a href="/bots/api#sendlocation">sendLocation</a>, <a href="/bots/api#sendvenue">sendVenue</a>, <a href="/bots/api#sendcontact">sendContact</a>, <a href="/bots/api#sendpoll">sendPoll</a>, <a href="/bots/api#senddice">sendDice</a>, <a href="/bots/api#sendinvoice">sendInvoice</a>, <a href="/bots/api#sendgame">sendGame</a>, <a href="/bots/api#sendmediagroup">sendMediaGroup</a>, <a href="/bots/api#copymessage">copyMessage</a>, <a href="/bots/api#forwardmessage">forwardMessage</a> to allow sending messages with protected content to any chat.</li>
|
||||
<li>Added support for <a href="https://telegram.org/blog/reactions-spoilers-translations#spoilers">spoiler entities</a>, which will work in Telegram versions released after December 30, 2021. Older clients will display <em>unsupported message</em>.</li>
|
||||
<li>Added new <a href="/bots/api#messageentity">MessageEntity</a> type “spoiler”.</li>
|
||||
<li>Added the ability to specify spoiler entities using <a href="/bots/api#html-style">HTML</a> and <a href="/bots/api#markdownv2-style">MarkdownV2</a> formatting options.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="december-7-2021" href="#december-7-2021"><i class="anchor-icon"></i></a>December 7, 2021</h3>
|
||||
<p><strong>Bot API 5.5</strong></p>
|
||||
<ul>
|
||||
<li>Bots are now allowed to contact users who sent a join request to a chat where the bot is an administrator with the <em>can_invite_users</em> administrator right – even if the user never interacted with the bot before.</li>
|
||||
<li>Added support for mentioning users by their ID in inline keyboards. This will only work in Telegram versions released after December 7, 2021. Older clients will display <em>unsupported message</em>.</li>
|
||||
<li>Added the methods <a href="/bots/api#banchatsenderchat">banChatSenderChat</a> and <a href="/bots/api#unbanchatsenderchat">unbanChatSenderChat</a> for banning and unbanning channel chats in supergroups and channels.</li>
|
||||
<li>Added the field <em>has_private_forwards</em> to the class <a href="/bots/api#chat">Chat</a> for private chats, which can be used to check the possibility of mentioning the user by their ID.</li>
|
||||
<li>Added the field <em>has_protected_content</em> to the classes <a href="/bots/api#chat">Chat</a> and <a href="/bots/api#message">Message</a>.</li>
|
||||
<li>Added the field <em>is_automatic_forward</em> to the class <a href="/bots/api#message">Message</a>.</li>
|
||||
</ul>
|
||||
<p><strong>Note:</strong> After this update it will become impossible to forward messages from some chats. Use the fields <em>has_protected_content</em> in the classes <a href="/bots/api#message">Message</a> and <a href="/bots/api#chat">Chat</a> to check this.</p>
|
||||
<p><strong>Note:</strong> After this update users are able to send messages on behalf of channels they own. Bots are expected to use the field <em>sender_chat</em> in the class <a href="/bots/api#message">Message</a> to correctly support such messages.</p>
|
||||
<p><strong>Note:</strong> As previously announced, user identifiers can now have up to 52 significant bits and require a 64-bit integer or double-precision float type to be stored safely.</p>
|
||||
<h3><a class="anchor" name="november-5-2021" href="#november-5-2021"><i class="anchor-icon"></i></a>November 5, 2021</h3>
|
||||
<p><strong>Bot API 5.4</strong></p>
|
||||
<ul>
|
||||
<li>Added the the parameter <code>creates_join_request</code> to the methods <a href="/bots/api#createchatinvitelink">createChatInviteLink</a> and <a href="/bots/api#editchatinvitelink">editChatInviteLink</a> for managing chat invite links that create join requests (read more about this on our <a href="https://telegram.org/blog/shared-media-scrolling-calendar-join-requests-and-more#join-requests-for-groups-and-channels">blog</a>).</li>
|
||||
<li>Added the fields <code>creates_join_request</code> and <code>pending_join_request_count</code> to the class <a href="/bots/api#chatinvitelink">ChatInviteLink</a>.</li>
|
||||
<li>Added the field <code>name</code> to the class <a href="/bots/api#chatinvitelink">ChatInviteLink</a> and the parameters <code>name</code> to the methods <a href="/bots/api#createchatinvitelink">createChatInviteLink</a> and <a href="/bots/api#editchatinvitelink">editChatInviteLink</a> for managing <a href="https://telegram.org/blog/shared-media-scrolling-calendar-join-requests-and-more#unique-names-for-invite-links">invite link names</a>.</li>
|
||||
<li>Added updates about new requests to join the chat, represented by the class <a href="/bots/api#chatjoinrequest">ChatJoinRequest</a> and the field <em>chat_join_request</em> in the <a href="/bots/api#update">Update</a> class. The bot must be an administrator in the chat with the <em>can_invite_users</em> administrator right to receive these updates.</li>
|
||||
<li>Added the methods <a href="/bots/api#approvechatjoinrequest">approveChatJoinRequest</a> and <a href="/bots/api#declinechatjoinrequest">declineChatJoinRequest</a> for managing requests to join the chat.</li>
|
||||
<li>Added support for the <em>choose_sticker</em> action in the method <a href="/bots/api#sendchataction">sendChatAction</a>.</li>
|
||||
</ul>
|
||||
<hr>
|
||||
<blockquote>
|
||||
<p><strong><img class="emoji" src="//telegram.org/img/emoji/40/E29AA0.png" width="20" height="20" alt="⚠️" /> WARNING! <img class="emoji" src="//telegram.org/img/emoji/40/E29AA0.png" width="20" height="20" alt="⚠️" /></strong><br>User identifiers will become bigger than <code>2^31 - 1</code> before the end of this year and it will be no longer possible to store them in a signed 32-bit integer type. User identifiers will have up to 52 significant bits, so a 64-bit integer or double-precision float type would still be safe for storing them. Please make sure that your code can correctly handle such user identifiers.</p>
|
||||
</blockquote>
|
||||
<hr>
|
||||
<h3><a class="anchor" name="june-25-2021" href="#june-25-2021"><i class="anchor-icon"></i></a>June 25, 2021</h3>
|
||||
<p><strong>Bot API 5.3</strong></p>
|
||||
<p><strong>Personalized Commands</strong></p>
|
||||
<ul>
|
||||
<li>Bots can now show lists of commands tailored to specific situations - including localized commands for users with different languages, as well as different commands based on chat type or for specific chats, and special lists of commands for chat admins.</li>
|
||||
<li>Added the class <a href="/bots/api#botcommandscope">BotCommandScope</a>, describing the scope to which bot commands apply.</li>
|
||||
<li>Added the parameters <code>scope</code> and <code>language_code</code> to the method <a href="/bots/api#setmycommands">setMyCommands</a> to allow bots specify different commands for different chats and users.</li>
|
||||
<li>Added the parameters <code>scope</code> and <code>language_code</code> to the method <a href="/bots/api#getmycommands">getMyCommands</a>.</li>
|
||||
<li>Added the method <a href="/bots/api#deletemycommands">deleteMyCommands</a> to allow deletion of the bot's commands for the given scope and user language.</li>
|
||||
<li>Improved visibility of bot commands in Telegram apps with the new 'Menu' button in chats with bots, read more on the <a href="https://telegram.org/blog/animated-backgrounds#bot-menu">blog</a>.</li>
|
||||
</ul>
|
||||
<p><strong>Custom Placeholders</strong></p>
|
||||
<ul>
|
||||
<li>Added the ability to specify a custom input field placeholder in the classes <a href="/bots/api#replykeyboardmarkup">ReplyKeyboardMarkup</a> and <a href="/bots/api#forcereply">ForceReply</a>.</li>
|
||||
</ul>
|
||||
<p><strong>And More</strong></p>
|
||||
<ul>
|
||||
<li>Improved documentation of the class <a href="/bots/api#chatmember">ChatMember</a> by splitting it into 6 subclasses.</li>
|
||||
<li>Renamed the method <code>kickChatMember</code> to <a href="/bots/api#banchatmember">banChatMember</a>. The old method name can still be used.</li>
|
||||
<li>Renamed the method <code>getChatMembersCount</code> to <a href="/bots/api#getchatmembercount">getChatMemberCount</a>. The old method name can still be used.</li>
|
||||
<li>Values of the field <code>file_unique_id</code> in objects of the type <a href="/bots/api#photosize">PhotoSize</a> and of the fields <code>small_file_unique_id</code> and <code>big_file_unique_id</code> in objects of the type <a href="/bots/api#chatphoto">ChatPhoto</a> were changed.</li>
|
||||
</ul>
|
||||
<hr>
|
||||
<blockquote>
|
||||
<p><strong><img class="emoji" src="//telegram.org/img/emoji/40/E29AA0.png" width="20" height="20" alt="⚠️" /> WARNING! <img class="emoji" src="//telegram.org/img/emoji/40/E29AA0.png" width="20" height="20" alt="⚠️" /></strong><br>After one of the upcoming Bot API updates, user identifiers will become bigger than <code>2^31 - 1</code> and it will be no longer possible to store them in a signed 32-bit integer type. User identifiers will have up to 52 significant bits, so a 64-bit integer or double-precision float type would still be safe for storing them. Please make sure that your code can correctly handle such user identifiers.</p>
|
||||
</blockquote>
|
||||
<hr>
|
||||
<h3><a class="anchor" name="april-26-2021" href="#april-26-2021"><i class="anchor-icon"></i></a>April 26, 2021</h3>
|
||||
<p><strong>Bot API 5.2</strong></p>
|
||||
<ul>
|
||||
<li>Support for <a href="https://telegram.org/blog/payments-2-0-scheduled-voice-chats">Payments 2.0</a>, see <a href="https://core.telegram.org/bots/payments">this manual</a> for more details about the <strong>Bot Payments API</strong>.</li>
|
||||
<li>Added the type <a href="/bots/api#inputinvoicemessagecontent">InputInvoiceMessageContent</a> to support sending invoices as inline query results.</li>
|
||||
<li>Allowed sending invoices to group, supergroup and channel chats.</li>
|
||||
<li>Added the fields <em>max_tip_amount</em> and <em>suggested_tip_amounts</em> to the method <a href="/bots/api#sendinvoice">sendInvoice</a> to allow adding optional tips to the payment.</li>
|
||||
<li>The parameter <em>start_parameter</em> of the method <a href="/bots/api#sendinvoice">sendInvoice</a> became optional. If the parameter isn't specified, the invoice can be paid directly from forwarded messages.</li>
|
||||
<li>Added the field <em>chat_type</em> to the class <a href="/bots/api#inlinequery">InlineQuery</a>, containing the type of the chat, from which the inline request was sent.</li>
|
||||
<li>Added the type <a href="/bots/api#voicechatscheduled">VoiceChatScheduled</a> and the field <em>voice_chat_scheduled</em> to the class <a href="/bots/api#message">Message</a>.</li>
|
||||
<li>Fixed an error in <a href="/bots/api#sendchataction">sendChatAction</a> documentation to correctly mention “record_voice” and “upload_voice” instead of “record_audio” and “upload_audio” for related to voice note actions. Old action names will still work for backward compatibility.</li>
|
||||
</ul>
|
||||
<hr>
|
||||
<blockquote>
|
||||
<p><strong><img class="emoji" src="//telegram.org/img/emoji/40/E29AA0.png" width="20" height="20" alt="⚠️" /> WARNING! <img class="emoji" src="//telegram.org/img/emoji/40/E29AA0.png" width="20" height="20" alt="⚠️" /></strong><br>After the next Bot API update (Bot API 5.3) there will be a one-time change of the value of the field <code>file_unique_id</code> in objects of the type <a href="/bots/api#photosize">PhotoSize</a> and of the fields <code>small_file_unique_id</code> and <code>big_file_unique_id</code> in objects of the type <a href="/bots/api#chatphoto">ChatPhoto</a>.</p>
|
||||
</blockquote>
|
||||
<hr>
|
||||
<blockquote>
|
||||
<p><strong><img class="emoji" src="//telegram.org/img/emoji/40/E29AA0.png" width="20" height="20" alt="⚠️" /> WARNING! <img class="emoji" src="//telegram.org/img/emoji/40/E29AA0.png" width="20" height="20" alt="⚠️" /></strong><br>Service messages about non-bot users joining the chat will be soon removed from large groups. We recommend using the “chat_member” update as a replacement.</p>
|
||||
</blockquote>
|
||||
<hr>
|
||||
<blockquote>
|
||||
<p><strong><img class="emoji" src="//telegram.org/img/emoji/40/E29AA0.png" width="20" height="20" alt="⚠️" /> WARNING! <img class="emoji" src="//telegram.org/img/emoji/40/E29AA0.png" width="20" height="20" alt="⚠️" /></strong><br>After one of the upcoming Bot API updates, user identifiers will become bigger than <code>2^31 - 1</code> and it will be no longer possible to store them in a signed 32-bit integer type. User identifiers will have up to 52 significant bits, so a 64-bit integer or double-precision float type would still be safe for storing them. Please make sure that your code can correctly handle such user identifiers.</p>
|
||||
</blockquote>
|
||||
<hr>
|
||||
<h3><a class="anchor" name="march-9-2021" href="#march-9-2021"><i class="anchor-icon"></i></a>March 9, 2021</h3>
|
||||
<p><strong>Bot API 5.1</strong></p>
|
||||
<p><strong>Added two new update types</strong></p>
|
||||
<ul>
|
||||
<li>Added updates about member status changes in chats, represented by the class <a href="/bots/api#chatmemberupdated">ChatMemberUpdated</a> and the fields <em>my_chat_member</em> and <em>chat_member</em> in the <a href="/bots/api#update">Update</a> class. The bot must be an administrator in the chat to receive <em>chat_member</em> updates about other chat members. By default, only <em>my_chat_member</em> updates about the bot itself are received.</li>
|
||||
</ul>
|
||||
<p><strong>Improved Invite Links</strong></p>
|
||||
<ul>
|
||||
<li>Added the class <a href="/bots/api#chatinvitelink">ChatInviteLink</a>, representing an invite link to a chat.</li>
|
||||
<li>Added the method <a href="/bots/api#createchatinvitelink">createChatInviteLink</a>, which can be used to create new invite links in addition to the primary invite link.</li>
|
||||
<li>Added the method <a href="/bots/api#editchatinvitelink">editChatInviteLink</a>, which can be used to edit non-primary invite links created by the bot.</li>
|
||||
<li>Added the method <a href="/bots/api#revokechatinvitelink">revokeChatInviteLink</a>, which can be used to revoke invite links created by the bot.</li>
|
||||
</ul>
|
||||
<p><strong>Voice Chat Info</strong></p>
|
||||
<ul>
|
||||
<li>Added the type <a href="/bots/api#voicechatstarted">VoiceChatStarted</a> and the field <em>voice_chat_started</em> to the class <a href="/bots/api#message">Message</a>.</li>
|
||||
<li>Added the type <a href="/bots/api#voicechatended">VoiceChatEnded</a> and the field <em>voice_chat_ended</em> to the class <a href="/bots/api#message">Message</a>.</li>
|
||||
<li>Added the type <a href="/bots/api#voicechatparticipantsinvited">VoiceChatParticipantsInvited</a> and the field <em>voice_chat_participants_invited</em> to the class <a href="/bots/api#message">Message</a>.</li>
|
||||
<li>Added the new administrator privilege <em>can_manage_voice_chats</em> to the class <a href="/bots/api#chatmember">ChatMember</a> and parameter <em>can_manage_voice_chats</em> to the method <a href="/bots/api#promotechatmember">promoteChatMember</a>. For now, bots can use this privilege only for passing to other administrators.</li>
|
||||
</ul>
|
||||
<p><strong>And More</strong></p>
|
||||
<ul>
|
||||
<li>Added the type <a href="/bots/api#messageautodeletetimerchanged">MessageAutoDeleteTimerChanged</a> and the field <em>message_auto_delete_timer_changed</em> to the class <a href="/bots/api#message">Message</a>.</li>
|
||||
<li>Added the parameter <em>revoke_messages</em> to the method <a href="/bots/api#kickchatmember">kickChatMember</a>, allowing to delete all messages from a group for the user who is being removed.</li>
|
||||
<li>Added the new administrator privilege <em>can_manage_chat</em> to the class <a href="/bots/api#chatmember">ChatMember</a> and parameter <em>can_manage_chat</em> to the method <a href="/bots/api#promotechatmember">promoteChatMember</a>. This administrator right is implied by any other administrator privilege.</li>
|
||||
<li>Supported the new <em>bowling</em> animation for the random <a href="/bots/api#dice">dice</a>. Choose between different animations (dice, darts, basketball, football, bowling, slot machine) by specifying the <em>emoji</em> parameter in the method <a href="/bots/api#senddice">sendDice</a>.</li>
|
||||
</ul>
|
||||
<hr>
|
||||
<blockquote>
|
||||
<p><strong><img class="emoji" src="//telegram.org/img/emoji/40/E29AA0.png" width="20" height="20" alt="⚠️" /> WARNING! <img class="emoji" src="//telegram.org/img/emoji/40/E29AA0.png" width="20" height="20" alt="⚠️" /></strong><br>After one of the upcoming Bot API updates, some user identifiers will become bigger than <code>2^31 - 1</code> and it will be no longer possible to store them in a signed 32-bit integer type. User identifiers will have up to 52 significant bits, so a 64-bit integer or double-precision float type would still be safe for storing them. Please make sure that your code can correctly handle such user identifiers.</p>
|
||||
</blockquote>
|
||||
<hr>
|
||||
<h3><a class="anchor" name="november-4-2020" href="#november-4-2020"><i class="anchor-icon"></i></a>November 4, 2020</h3>
|
||||
<p>Introducing <strong>Bot API 5.0</strong></p>
|
||||
<p><strong>Run Your Own Bot API Server</strong></p>
|
||||
<ul>
|
||||
<li>Bot API source code is now available at <a href="https://github.com/tdlib/telegram-bot-api">telegram-bot-api</a>. You can now run your <strong>own Bot API server</strong> locally, boosting your bots' performance.</li>
|
||||
<li>Added the method <a href="/bots/api#logout">logOut</a>, which can be used to log out from the cloud Bot API server before launching your bot locally. You <strong>must</strong> log out the bot before running it locally, otherwise there is no guarantee that the bot will receive all updates.</li>
|
||||
<li>Added the method <a href="/bots/api#close">close</a>, which can be used to close the bot instance before moving it from one local server to another.</li>
|
||||
</ul>
|
||||
<p><strong>Transfer Bot Ownership</strong></p>
|
||||
<ul>
|
||||
<li>You can now use <a href="https://t.me/botfather">@BotFather</a> to transfer your existing bots to another Telegram account. </li>
|
||||
</ul>
|
||||
<p><strong>Webhooks</strong></p>
|
||||
<ul>
|
||||
<li>Added the parameter <em>ip_address</em> to the method <a href="/bots/api#setwebhook">setWebhook</a>, allowing to bypass DNS resolving and use the specified fixed IP address to send webhook requests.</li>
|
||||
<li>Added the field <em>ip_address</em> to the class <a href="/bots/api#webhookinfo">WebhookInfo</a>, containing the current IP address used for webhook connections creation.</li>
|
||||
<li>Added the ability to drop all pending updates when changing webhook URL using the parameter <em>drop_pending_updates</em> in the methods <a href="/bots/api#setwebhook">setWebhook</a> and <a href="/bots/api#deletewebhook">deleteWebhook</a>.</li>
|
||||
</ul>
|
||||
<p><strong>Working with Groups</strong></p>
|
||||
<ul>
|
||||
<li>The <a href="/bots/api#getchat">getChat</a> request now returns the user's bio for private chats if available.</li>
|
||||
<li>The <a href="/bots/api#getchat">getChat</a> request now returns the identifier of the linked chat for supergroups and channels, i.e. the discussion group identifier for a channel and vice versa.</li>
|
||||
<li>The <a href="/bots/api#getchat">getChat</a> request now returns the location to which the supergroup is connected (see <a href="https://telegram.org/blog/contacts-local-groups">Local Groups</a>). Added the class <a href="/bots/api#chatlocation">ChatLocation</a> to represent the location.</li>
|
||||
<li>Added the parameter <em>only_if_banned</em> to the method <a href="/bots/api#unbanchatmember">unbanChatMember</a> to allow safe unban.</li>
|
||||
</ul>
|
||||
<p><strong>Working with Files</strong></p>
|
||||
<ul>
|
||||
<li>Added the field <em>file_name</em> to the classes <a href="/bots/api#audio">Audio</a> and <a href="/bots/api#video">Video</a>, containing the name of the original file.</li>
|
||||
<li>Added the ability to disable server-side file content type detection using the parameter <em>disable_content_type_detection</em> in the method <a href="/bots/api#senddocument">sendDocument</a> and the class <a href="/bots/api#inputmediadocument">inputMediaDocument</a>.</li>
|
||||
</ul>
|
||||
<p><strong>Multiple Pinned Messages</strong></p>
|
||||
<ul>
|
||||
<li>Added the ability to <strong>pin messages in private chats</strong>.</li>
|
||||
<li>Added the parameter <em>message_id</em> to the method <a href="/bots/api#unpinchatmessage">unpinChatMessage</a> to allow unpinning of the specific pinned message.</li>
|
||||
<li>Added the method <a href="/bots/api#unpinallchatmessages">unpinAllChatMessages</a>, which can be used to unpin all pinned messages in a chat.</li>
|
||||
</ul>
|
||||
<p><strong>File Albums</strong></p>
|
||||
<ul>
|
||||
<li>Added support for sending and receiving audio and document albums in the method <a href="/bots/api#sendmediagroup">sendMediaGroup</a>.</li>
|
||||
</ul>
|
||||
<p><strong>Live Locations</strong></p>
|
||||
<ul>
|
||||
<li>Added the field <em>live_period</em> to the class <a href="/bots/api#location">Location</a>, representing a maximum period for which the live location can be updated.</li>
|
||||
<li>Added support for live location <a href="https://en.wikipedia.org/wiki/Heading_(navigation)">heading</a>: added the field <em>heading</em> to the classes <a href="/bots/api#location">Location</a>, <a href="/bots/api#inlinequeryresultlocation">InlineQueryResultLocation</a>, <a href="/bots/api#inputlocationmessagecontent">InputLocationMessageContent</a> and the parameter <em>heading</em> to the methods <a href="/bots/api#sendlocation">sendLocation</a> and <a href="/bots/api#editmessagelivelocation">editMessageLiveLocation</a>.</li>
|
||||
<li>Added support for proximity alerts in live locations: added the field <em>proximity_alert_radius</em> to the classes <a href="/bots/api#location">Location</a>, <a href="/bots/api#inlinequeryresultlocation">InlineQueryResultLocation</a>, <a href="/bots/api#inputlocationmessagecontent">InputLocationMessageContent</a> and the parameter <em>proximity_alert_radius</em> to the methods <a href="/bots/api#sendlocation">sendLocation</a> and <a href="/bots/api#editmessagelivelocation">editMessageLiveLocation</a>.</li>
|
||||
<li>Added the type <a href="/bots/api#proximityalerttriggered">ProximityAlertTriggered</a> and the field <em>proximity_alert_triggered</em> to the class <a href="/bots/api#message">Message</a>.</li>
|
||||
<li>Added possibility to specify the horizontal accuracy of a location. Added the field <em>horizontal_accuracy</em> to the classes <a href="/bots/api#location">Location</a>, <a href="/bots/api#inlinequeryresultlocation">InlineQueryResultLocation</a>, <a href="/bots/api#inputlocationmessagecontent">InputLocationMessageContent</a> and the parameter <em>horizontal_accuracy</em> to the methods <a href="/bots/api#sendlocation">sendLocation</a> and <a href="/bots/api#editmessagelivelocation">editMessageLiveLocation</a>.</li>
|
||||
</ul>
|
||||
<p><strong>Anonymous Admins</strong></p>
|
||||
<ul>
|
||||
<li>Added the field <em>sender_chat</em> to the class <a href="/bots/api#message">Message</a>, containing the sender of a message which is a chat (group or channel). For backward compatibility in non-channel chats, the field <em>from</em> in such messages will contain the user 777000 for messages automatically forwarded to the discussion group and the user 1087968824 (<a href="https://t.me/GroupAnonymousBot">@GroupAnonymousBot</a>) for messages from anonymous group administrators.</li>
|
||||
<li>Added the field <em>is_anonymous</em> to the class <a href="/bots/api#chatmember">chatMember</a>, which can be used to distinguish anonymous chat administrators.</li>
|
||||
<li>Added the parameter <em>is_anonymous</em> to the method <a href="/bots/api#promotechatmember">promoteChatMember</a>, which allows to promote anonymous chat administrators. The bot itself should have the <em>is_anonymous</em> right to do this. Despite the fact that bots can have the <em>is_anonymous</em> right, they will never appear as anonymous in the chat. Bots can use the right only for passing to other administrators.</li>
|
||||
<li>Added the custom title of an anonymous message sender to the class <a href="/bots/api#message">Message</a> as <em>author_signature</em>.</li>
|
||||
</ul>
|
||||
<p><strong>And More</strong></p>
|
||||
<ul>
|
||||
<li>Added the method <a href="/bots/api#copymessage">copyMessage</a>, which sends a copy of any message.</li>
|
||||
<li>Maximum poll question length increased to 300.</li>
|
||||
<li>Added the ability to manually specify text entities instead of specifying the <em>parse_mode</em> in the classes <a href="/bots/api#inputmediaphoto">InputMediaPhoto</a>, <a href="/bots/api#inputmediavideo">InputMediaVideo</a>, <a href="/bots/api#inputmediaanimation">InputMediaAnimation</a>, <a href="/bots/api#inputmediaaudio">InputMediaAudio</a>, <a href="/bots/api#inputmediadocument">InputMediaDocument</a>, <a href="/bots/api#inlinequeryresultphoto">InlineQueryResultPhoto</a>, <a href="/bots/api#inlinequeryresultgif">InlineQueryResultGif</a>, <a href="/bots/api#inlinequeryresultmpeg4gif">InlineQueryResultMpeg4Gif</a>, <a href="/bots/api#inlinequeryresultvideo">InlineQueryResultVideo</a>, <a href="/bots/api#inlinequeryresultaudio">InlineQueryResultAudio</a>, <a href="/bots/api#inlinequeryresultvoice">InlineQueryResultVoice</a>, <a href="/bots/api#inlinequeryresultdocument">InlineQueryResultDocument</a>, <a href="/bots/api#inlinequeryresultcachedphoto">InlineQueryResultCachedPhoto</a>, <a href="/bots/api#inlinequeryresultcachedgif">InlineQueryResultCachedGif</a>, <a href="/bots/api#inlinequeryresultcachedmpeg4gif">InlineQueryResultCachedMpeg4Gif</a>, <a href="/bots/api#inlinequeryresultcachedvideo">InlineQueryResultCachedVideo</a>, <a href="/bots/api#inlinequeryresultcachedaudio">InlineQueryResultCachedAudio</a>, <a href="/bots/api#inlinequeryresultcachedvoice">InlineQueryResultCachedVoice</a>, <a href="/bots/api#inlinequeryresultcacheddocument">InlineQueryResultCachedDocument</a>, <a href="/bots/api#inputtextmessagecontent">InputTextMessageContent</a> and the methods <a href="/bots/api#sendmessage">sendMessage</a>, <a href="/bots/api#sendphoto">sendPhoto</a>, <a href="/bots/api#sendvideo">sendVideo</a>, <a href="/bots/api#sendanimation">sendAnimation</a>, <a href="/bots/api#sendaudio">sendAudio</a>, <a href="/bots/api#senddocument">sendDocument</a>, <a href="/bots/api#sendvoice">sendVoice</a>, <a href="/bots/api#sendpoll">sendPoll</a>, <a href="/bots/api#editmessagetext">editMessageText</a>, <a href="/bots/api#editmessagecaption">editMessageCaption</a>.</li>
|
||||
<li>Added the fields <em>google_place_id</em> and <em>google_place_type</em> to the classes <a href="/bots/api#venue">Venue</a>, <a href="/bots/api#inlinequeryresultvenue">InlineQueryResultVenue</a>, <a href="/bots/api#inputvenuemessagecontent">InputVenueMessageContent</a> and the optional parameters <em>google_place_id</em> and <em>google_place_type</em> to the method <a href="/bots/api#sendvenue">sendVenue</a> to support Google Places as a venue API provider.</li>
|
||||
<li>Added the field <em>allow_sending_without_reply</em> to the methods <a href="/bots/api#sendmessage">sendMessage</a>, <a href="/bots/api#sendphoto">sendPhoto</a>, <a href="/bots/api#sendvideo">sendVideo</a>, <a href="/bots/api#sendanimation">sendAnimation</a>, <a href="/bots/api#sendaudio">sendAudio</a>, <a href="/bots/api#senddocument">sendDocument</a>, <a href="/bots/api#sendsticker">sendSticker</a>, <a href="/bots/api#sendvideonote">sendVideoNote</a>, <a href="/bots/api#sendvoice">sendVoice</a>, <a href="/bots/api#sendlocation">sendLocation</a>, <a href="/bots/api#sendvenue">sendVenue</a>, <a href="/bots/api#sendcontact">sendContact</a>, <a href="/bots/api#sendpoll">sendPoll</a>, <a href="/bots/api#senddice">sendDice</a>, <a href="/bots/api#sendinvoice">sendInvoice</a>, <a href="/bots/api#sendgame">sendGame</a>, <a href="/bots/api#sendmediagroup">sendMediaGroup</a> to allow sending messages not a as reply if the replied-to message has already been deleted.</li>
|
||||
</ul>
|
||||
<p><strong>And Last but not Least</strong></p>
|
||||
<ul>
|
||||
<li>Supported the new <strong>football</strong> and <strong>slot machine</strong> animations for the random <a href="/bots/api#dice">dice</a>. Choose between different animations (dice, darts, basketball, football, slot machine) by specifying the <em>emoji</em> parameter in the method <a href="/bots/api#senddice">sendDice</a>.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="june-4-2020" href="#june-4-2020"><i class="anchor-icon"></i></a>June 4, 2020</h3>
|
||||
<p><strong>Bot API 4.9</strong></p>
|
||||
<ul>
|
||||
<li>Added the new field <em>via_bot</em> to the <a href="/bots/api#message">Message</a> object. You can now know which bot was used to send a message.</li>
|
||||
<li>Supported video thumbnails for inline <a href="/bots/api#inlinequeryresultgif">GIF</a> and <a href="/bots/api#inlinequeryresultmpeg4gif">MPEG4</a> animations.</li>
|
||||
<li>Supported the new basketball animation for the random <a href="/bots/api#dice">dice</a>. Choose between different animations (dice, darts, basketball) by specifying the <em>emoji</em> parameter in the method <a href="/bots/api#senddice">sendDice</a>.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="april-24-2020" href="#april-24-2020"><i class="anchor-icon"></i></a>April 24, 2020</h3>
|
||||
<p><strong>Bot API 4.8</strong></p>
|
||||
<ul>
|
||||
<li>Supported explanations for <a href="https://telegram.org/blog/400-million#better-quizzes">Quizzes 2.0</a>. Add explanations by specifying the parameters <em>explanation</em> and <em>explanation_parse_mode</em> in the method <a href="/bots/api#sendpoll">sendPoll</a>.</li>
|
||||
<li>Added the fields <em>explanation</em> and <em>explanation_entities</em> to the <a href="/bots/api#poll">Poll</a> object.</li>
|
||||
<li>Supported timed polls that automatically close at a certain date and time. Set up by specifying the parameter <em>open_period</em> or <em>close_date</em> in the method <a href="/bots/api#sendpoll">sendPoll</a>.</li>
|
||||
<li>Added the fields <em>open_period</em> and <em>close_date</em> to the <a href="/bots/api#poll">Poll</a> object.</li>
|
||||
<li>Supported the new <a href="https://telegram.org/blog/400-million#bullseye">darts</a> animation for the dice mini-game. Choose between the default dice animation and darts animation by specifying the parameter <em>emoji</em> in the method <a href="/bots/api#senddice">sendDice</a>.</li>
|
||||
<li>Added the field <em>emoji</em> to the <a href="/bots/api#dice">Dice</a> object.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="march-30-2020" href="#march-30-2020"><i class="anchor-icon"></i></a>March 30, 2020</h3>
|
||||
<p><strong>Bot API 4.7</strong></p>
|
||||
<ul>
|
||||
<li>Added the method <a href="/bots/api#senddice">sendDice</a> for sending a dice message, which will have a random value from 1 to 6. (Yes, we're aware of the <em>“proper”</em> singular of <em>die</em>. But it's awkward, and we decided to help it change. One dice at a time!)</li>
|
||||
<li>Added the field <a href="/bots/api#dice">dice</a> to the <a href="/bots/api#message">Message</a> object.</li>
|
||||
<li>Added the method <a href="/bots/api#getmycommands">getMyCommands</a> for getting the current list of the bot's commands.</li>
|
||||
<li>Added the method <a href="/bots/api#setmycommands">setMyCommands</a> for changing the list of the bot's commands through the Bot API instead of <a href="https://t.me/botfather">@BotFather</a>.</li>
|
||||
<li>Added the ability to create animated sticker sets by specifying the parameter <em>tgs_sticker</em> instead of <em>png_sticker</em> in the method <a href="/bots/api#createnewstickerset">createNewStickerSet</a>.</li>
|
||||
<li>Added the ability to add animated stickers to sets created by the bot by specifying the parameter <em>tgs_sticker</em> instead of <em>png_sticker</em> in the method <a href="/bots/api#addstickertoset">addStickerToSet</a>.</li>
|
||||
<li>Added the field <em>thumb</em> to the <a href="/bots/api#stickerset">StickerSet</a> object.</li>
|
||||
<li>Added the ability to change thumbnails of sticker sets created by the bot using the method <a href="/bots/api#setstickersetthumb">setStickerSetThumb</a>.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="january-23-2020" href="#january-23-2020"><i class="anchor-icon"></i></a>January 23, 2020</h3>
|
||||
<p><strong>Bot API 4.6</strong></p>
|
||||
<ul>
|
||||
<li>Supported <a href="https://telegram.org/blog/polls-2-0-vmq">Polls 2.0</a>.</li>
|
||||
<li>Added the ability to send non-anonymous, multiple answer, and quiz-style polls: added the parameters <em>is_anonymous</em>, <em>type</em>, <em>allows_multiple_answers</em>, <em>correct_option_id</em>, <em>is_closed</em> options to the method <a href="/bots/api#sendpoll">sendPoll</a>.</li>
|
||||
<li>Added the object <a href="/bots/api#keyboardbuttonpolltype">KeyboardButtonPollType</a> and the field <em>request_poll</em> to the object <a href="/bots/api#keyboardbutton">KeyboardButton</a>.</li>
|
||||
<li>Added updates about changes of user answers in non-anonymous polls, represented by the object <a href="/bots/api#pollanswer">PollAnswer</a> and the field <em>poll_answer</em> in the <a href="/bots/api#update">Update</a> object. </li>
|
||||
<li>Added the fields <em>total_voter_count</em>, <em>is_anonymous</em>, <em>type</em>, <em>allows_multiple_answers</em>, <em>correct_option_id</em> to the <a href="/bots/api#poll">Poll</a> object.</li>
|
||||
<li>Bots can now send polls to private chats.</li>
|
||||
<li>Added more information about the bot in response to the <a href="/bots/api#getme">getMe</a> request: added the fields <em>can_join_groups</em>, <em>can_read_all_group_messages</em> and <em>supports_inline_queries</em> to the <a href="/bots/api#user">User</a> object.</li>
|
||||
<li>Added the optional field <em>language</em> to the <a href="/bots/api#messageentity">MessageEntity</a> object.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="december-31-2019" href="#december-31-2019"><i class="anchor-icon"></i></a>December 31, 2019</h3>
|
||||
<p><strong>Bot API 4.5</strong></p>
|
||||
<ul>
|
||||
<li>Added support for two new <a href="/bots/api#messageentity">MessageEntity</a> types, <em>underline</em> and <em>strikethrough</em>.</li>
|
||||
<li>Added support for nested <a href="/bots/api#messageentity">MessageEntity</a> objects. Entities can now contain other entities. If two entities have common characters then one of them is fully contained inside the other.</li>
|
||||
<li>Added support for nested entities and the new tags <code><u>/<ins></code> (for underlined text) and <code><s>/<strike>/<del></code> (for strikethrough text) in parse mode HTML.</li>
|
||||
<li>Added a new parse mode, <a href="/bots/api#markdownv2-style">MarkdownV2</a>, which supports nested entities and two new entities <code>__</code> (for underlined text) and <code>~</code> (for strikethrough text). Parse mode <a href="/bots/api#markdown-style">Markdown</a> remains unchanged for backward compatibility.</li>
|
||||
<li>Added the field <em>file_unique_id</em> to the objects <a href="/bots/api#animation">Animation</a>, <a href="/bots/api#audio">Audio</a>, <a href="/bots/api#document">Document</a>, <a href="/bots/api#passportfile">PassportFile</a>, <a href="/bots/api#photosize">PhotoSize</a>, <a href="/bots/api#sticker">Sticker</a>, <a href="/bots/api#video">Video</a>, <a href="/bots/api#videonote">VideoNote</a>, <a href="/bots/api#voice">Voice</a>, <a href="/bots/api#file">File</a> and the fields <em>small_file_unique_id</em> and <em>big_file_unique_id</em> to the object <a href="/bots/api#chatphoto">ChatPhoto</a>. The new fields contain a unique file identifier, which is supposed to be the same over time and for different bots, but can't be used to download or reuse the file.</li>
|
||||
<li>Added the field <em>custom_title</em> to the <a href="/bots/api#chatmember">ChatMember</a> object.</li>
|
||||
<li>Added the new method <a href="/bots/api#setchatadministratorcustomtitle">setChatAdministratorCustomTitle</a> to manage the custom titles of administrators promoted by the bot.</li>
|
||||
<li>Added the field <em>slow_mode_delay</em> to the <a href="/bots/api#chat">Chat</a> object.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="july-29-2019" href="#july-29-2019"><i class="anchor-icon"></i></a>July 29, 2019</h3>
|
||||
<p><strong>Bot API 4.4</strong></p>
|
||||
<ul>
|
||||
<li>Added support for <a href="https://telegram.org/blog/animated-stickers"><strong>animated stickers</strong></a>. New field <em>is_animated</em> in <a href="/bots/api#sticker">Sticker</a> and <a href="/bots/api#stickerset">StickerSet</a> objects, animated stickers can now be used in <a href="/bots/api#sendsticker">sendSticker</a> and <a href="/bots/api#inlinequeryresultcachedsticker">InlineQueryResultCachedSticker</a>.</li>
|
||||
<li>Added support for <a href="https://telegram.org/blog/permissions-groups-undo"><strong>default permissions</strong></a> in groups. New object <a href="/bots/api#chatpermissions">ChatPermissions</a>, containing actions which a member can take in a chat. New field <em>permissions</em> in the <a href="/bots/api#chat">Chat</a> object; new method <a href="/bots/api#setchatpermissions">setChatPermissions</a>.</li>
|
||||
<li>The field <em>all_members_are_administrators</em> has been removed from the documentation for the <a href="/bots/api#chat">Chat</a> object. The field is still returned in the object for backward compatibility, but new bots should use the <em>permissions</em> field instead.</li>
|
||||
<li>Added support for more permissions for group and supergroup members: added the new field <em>can_send_polls</em> to <a href="/bots/api#chatmember">ChatMember</a> object, added <em>can_change_info</em>, <em>can_invite_users</em>, <em>can_pin_messages</em> in <a href="/bots/api#chatmember">ChatMember</a> object for restricted users (previously available only for administrators).</li>
|
||||
<li>The method <a href="/bots/api#restrictchatmember">restrictChatMember</a> now takes the new user permissions in a single argument of the type <a href="/bots/api#chatpermissions">ChatPermissions</a>. The old way of passing parameters will keep working for a while for backward compatibility.</li>
|
||||
<li>Added <em>description</em> support for basic groups (previously available in supergroups and channel chats). You can pass a group's chat_id to <a href="/bots/api#setchatdescription">setChatDescription</a> and receive the group's description in the <a href="/bots/api#chat">Chat</a> object in the response to <a href="/bots/api#getchat">getChat</a> method.</li>
|
||||
<li>Added <em>invite_link</em> support for basic groups (previously available in supergroups and channel chats). You can pass a group's chat_id to <a href="/bots/api#exportchatinvitelink">exportChatInviteLink</a> and receive the group's invite link in the <a href="/bots/api#chat">Chat</a> object in the response to <a href="/bots/api#getchat">getChat</a> method.</li>
|
||||
<li>File identifiers from the <a href="/bots/api#chatphoto">ChatPhoto</a> object are now invalidated and can no longer be used whenever the photo is changed.</li>
|
||||
<li>All <strong>webhook requests</strong> from the Bot API are now coming from the subnets <code>149.154.160.0/20</code> and <code>91.108.4.0/22</code>. Most users won't need to do anything to continue receiving webhooks. If you control inbound access with a firewall, you may need to update your configuration. You can always find the list of actual IP addresses of servers used to send webhooks there: <a href="/bots/webhooks"><a href="https://core.telegram.org/bots/webhooks">https://core.telegram.org/bots/webhooks</a></a>.</li>
|
||||
<li>As of the <strong>next Bot API</strong> update (<strong>version 4.5</strong>), nested <a href="/bots/api#messageentity">MessageEntity</a> objects will be allowed in message texts and captions. Please make sure that your code can correctly handle such entities.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="may-31-2019" href="#may-31-2019"><i class="anchor-icon"></i></a>May 31, 2019</h3>
|
||||
<p><strong>Bot API 4.3</strong></p>
|
||||
<ul>
|
||||
<li>Added support for <a href="https://telegram.org/blog/privacy-discussions-web-bots#meet-seamless-web-bots"><strong>Seamless Telegram Login</strong></a> on external websites.</li>
|
||||
<li>Added the new object <a href="/bots/api#loginurl">LoginUrl</a> and the new field <em>login_url</em> to the <a href="/bots/api#inlinekeyboardbutton">InlineKeyboardButton</a> object which allows to <strong>automatically authorize</strong> users before they go to a URL specified by the bot. Users will be asked to confirm authorization in their Telegram app (needs version 5.7 or higher) when they press the button:</li>
|
||||
</ul>
|
||||
<div class="blog_image_wrap">
|
||||
<a href="/file/811140015/1734/8VZFkwWXalM.97872/6127fa62d8a0bf2b3c" target="_blank"><img src="/file/811140909/1631/20k1Z53eiyY.23995/c541e89b74253623d9" title="TITLE" alt="TITLE" srcset="/file/811140015/1734/8VZFkwWXalM.97872/6127fa62d8a0bf2b3c , 2x" /></a>
|
||||
</div>
|
||||
|
||||
<p><strong>Also in this update:</strong></p>
|
||||
<ul>
|
||||
<li>Added the field <code>reply_markup</code> to the <a href="/bots/api#message">Message</a> object, containing the inline keyboard attached to the message.</li>
|
||||
<li>If a message with an inline keyboard is forwarded, the forwarded message will now have an inline keyboard if the keyboard contained only <em>url</em> and <em>login_url</em> buttons or if the message was sent via a bot and the keyboard contained only <em>url</em>, <em>login_url</em>, <em>switch_inline_query</em> or <em>switch_inline_query_current_chat</em> buttons. In the latter case, <em>switch_inline_query_current_chat</em> buttons are replaced with <em>switch_inline_query</em> buttons.</li>
|
||||
<li>Bots now receive the <em>edited_message</em> <a href="/bots/api#update">Update</a> even if only <em>Message.reply_markup</em> has changed.</li>
|
||||
<li>Bots that have the <em>can_edit_messages</em> right in a channel can now use the method <a href="/bots/api#editmessagereplymarkup">editMessageReplyMarkup</a> for messages written by other administrators forever without the 48 hours limit.</li>
|
||||
<li>Don't forget that starting in <strong>July 2019</strong>, <strong>webhook requests</strong> from Bot API will be coming from the subnets <code>149.154.160.0/20</code> and <code>91.108.4.0/22</code>. Most users won't need to do anything to continue receiving webhooks. If you control inbound access with a firewall, you may need to update your configuration. You can always find the list of actual IP addresses of servers used to send webhooks there: <a href="/bots/webhooks"><a href="https://core.telegram.org/bots/webhooks">https://core.telegram.org/bots/webhooks</a></a>.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="april-14-2019" href="#april-14-2019"><i class="anchor-icon"></i></a>April 14, 2019</h3>
|
||||
<p><strong>Bot API 4.2</strong></p>
|
||||
<ul>
|
||||
<li>Added support for native polls: added the object <a href="/bots/api#poll">Poll</a>, the methods <a href="/bots/api#sendpoll">sendPoll</a> and <a href="/bots/api#stoppoll">stopPoll</a> and the field <em>poll</em> in the <a href="/bots/api#message">Message</a> and <a href="/bots/api#update">Update</a> objects.</li>
|
||||
<li>The method <a href="/bots/api#deletemessage">deleteMessage</a> can now be used to delete messages sent by a user to the bot in private chats within 48 hours.</li>
|
||||
<li>Added support for pinned messages in basic groups in addition to supergroups and channel chats: you can pass group's chat_id to <a href="/bots/api#pinchatmessage">pinChatMessage</a> and <a href="/bots/api#unpinchatmessage">unpinChatMessage</a>, and receive the pinned group message in <a href="/bots/api#chat">Chat</a> object.</li>
|
||||
<li>Added the field <em>is_member</em> to the <a href="/bots/api#chatmember">ChatMember</a> object, which can be used to find whether a restricted user is a member of the chat.</li>
|
||||
<li>Added the field <em>forward_sender_name</em> to the <a href="/bots/api#message">Message</a> object, containing name of the sender who has opted to hide their account.</li>
|
||||
<li>Starting in July 2019, webhook requests from Bot API will be coming from the subnets <code>149.154.160.0/20</code> and <code>91.108.4.0/22</code>. Most users won't need to do anything to continue receiving webhooks. If you control inbound access with a firewall, you may need to update your configuration. You can always find the list of actual IP addresses of servers used to send webhooks there: <a href="/bots/webhooks"><a href="https://core.telegram.org/bots/webhooks">https://core.telegram.org/bots/webhooks</a></a>.</li>
|
||||
<li>Document thumbnails now should be inscribed in a 320x320 square instead of 90x90.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="august-27-2018" href="#august-27-2018"><i class="anchor-icon"></i></a>August 27, 2018</h3>
|
||||
<p><strong>Bot API 4.1</strong></p>
|
||||
<ul>
|
||||
<li>Added support for translated versions of documents in <a href="/passport">Telegram Passport</a>.</li>
|
||||
<li>New field <em>translation</em> in <a href="/bots/api#encryptedpassportelement">EncryptedPassportElement</a>.</li>
|
||||
<li>New errors: <a href="/bots/api#passportelementerrortranslationfile">PassportElementErrorTranslationFile</a> and <a href="/bots/api#passportelementerrortranslationfile">PassportElementErrorTranslationFiles</a> and <a href="/bots/api#passportelementerrorunspecified">PassportElementErrorUnspecified</a>.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="july-26-2018" href="#july-26-2018"><i class="anchor-icon"></i></a>July 26, 2018</h3>
|
||||
<p><strong>Bot API 4.0</strong>.</p>
|
||||
<ul>
|
||||
<li>Added support for <a href="https://telegram.org/blog/passport"><strong>Telegram Passport</strong></a>. See the official announcement on the <a href="https://telegram.org/blog">blog</a> and the <a href="https://core.telegram.org/passport">manual</a> for details.</li>
|
||||
<li>Added support for <strong>editing the media content of messages</strong>: added the method <a href="/bots/api#editmessagemedia">editMessageMedia</a> and new types <a href="/bots/api#inputmediaanimation">InputMediaAnimation</a>, <a href="/bots/api#inputmediaaudio">InputMediaAudio</a>, and <a href="/bots/api#inputmediadocument">InputMediaDocument</a>.</li>
|
||||
<li>Added the field <em>thumb</em> to the <a href="/bots/api#audio">Audio</a> object to contain the thumbnail of the album cover to which the music file belongs.</li>
|
||||
<li>Added support for attaching custom thumbnails to uploaded files. For animations, audios, videos and video notes, which are less than 10 MB in size, thumbnails are generated automatically.</li>
|
||||
<li><code>tg://</code> URLs now can be used in inline keyboard url buttons and <code>text_link</code> message entities. </li>
|
||||
<li>Added the method <a href="/bots/api#sendanimation">sendAnimation</a>, which can be used instead of <a href="/bots/api#senddocument">sendDocument</a> to send animations, specifying their duration, width and height.</li>
|
||||
<li>Added the field <a href="/bots/api#animation">animation</a> to the <a href="/bots/api#message">Message</a> object. For backward compatibility, when this field is set, the <em>document</em> field will be also set.</li>
|
||||
<li>Added two new <a href="/bots/api#messageentity">MessageEntity</a> types: <em>cashtag</em> and <em>phone_number</em>.</li>
|
||||
<li>Added support for Foursquare venues: added the new field <em>foursquare_type</em> to the objects <a href="/bots/api#venue">Venue</a>, <a href="/bots/api#inlinequeryresultvenue">InlineQueryResultVenue</a> and <a href="/bots/api#inputvenuemessagecontent">InputVenueMessageContent</a>, and the parameter <em>foursquare_type</em> to the <a href="/bots/api#sendvenue">sendVenue</a> method.</li>
|
||||
<li>You can now create inline mentions of users, who have pressed your bot's callback buttons.</li>
|
||||
<li>You can now use the <code>Retry-After</code> response header to configure the delay after which the Bot API will retry the request after an unsuccessful response from a webhook.</li>
|
||||
<li>If a webhook returns the HTTP error <code>410 Gone</code> for all requests for more than 23 hours successively, it can be automatically removed.</li>
|
||||
<li>Added <a href="https://en.wikipedia.org/wiki/VCard">vCard</a> support when sharing contacts: added the field <em>vcard</em> to the objects <a href="/bots/api#contact">Contact</a>, <a href="/bots/api#inlinequeryresultcontact">InlineQueryResultContact</a>, <a href="/bots/api#inputcontactmessagecontent">InputContactMessageContent</a> and the method <a href="/bots/api#sendcontact">sendContact</a>.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="february-13-2018" href="#february-13-2018"><i class="anchor-icon"></i></a>February 13, 2018</h3>
|
||||
<p><strong>Bot API 3.6</strong>.</p>
|
||||
<ul>
|
||||
<li>Supported <a href="https://core.telegram.org/bots/api#formatting-options">text formatting</a> in media captions. Specify the desired <em>parse_mode</em> (<a href="https://core.telegram.org/bots/api#markdown-style">Markdown</a> or <a href="https://core.telegram.org/bots/api#html-style">HTML</a>) when you provide a caption.</li>
|
||||
<li>In supergroups, if the bot receives a message that is a reply, it will also receive the message to which that message is replying – even if the original message is inaccessible due to the bot's privacy settings. (In other words, replying to any message in a supergroup with a message that mentions the bot or features a command for it acts as forwarding the original message to the bot). </li>
|
||||
<li>Added the new field <em>connected_website</em> to <a href="/bots/api#message">Message</a>. The bot will receive a message with this field in a private chat when a user logs in on the bot's connected website using the <a href="https://core.telegram.org/widgets/login">Login Widget</a> and allows sending messages from your bot.</li>
|
||||
<li>Added the new parameter <em>supports_streaming</em> to the <a href="/bots/api#sendvideo">sendVideo</a> method and a field with the same name to the <a href="/bots/api#inputmediavideo">InputMediaVideo</a> object.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="november-17-2017" href="#november-17-2017"><i class="anchor-icon"></i></a>November 17, 2017</h3>
|
||||
<p><strong>Bot API 3.5</strong>.</p>
|
||||
<ul>
|
||||
<li>Added the new method <a href="/bots/api#sendmediagroup">sendMediaGroup</a> and two kinds of <a href="/bots/api#inputmedia">InputMedia</a> objects to support the new <a href="https://telegram.org/blog/albums-saved-messages">albums feature</a>.</li>
|
||||
<li>Added support for pinning messages in channels. <a href="/bots/api#pinchatmessage">pinChatMessage</a> and <a href="/bots/api#unpinchatmessage">unpinChatMessage</a> accept channels.</li>
|
||||
<li>Added the new fields <em>provider_data</em>, <em>send_phone_number_to_provider</em>, <em>send_email_to_provider</em> to <a href="/bots/api#sendinvoice">sendInvoice</a> for sharing information about the invoice with the payment provider.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="october-11-2017" href="#october-11-2017"><i class="anchor-icon"></i></a>October 11, 2017</h3>
|
||||
<p><strong>Bot API 3.4</strong>.</p>
|
||||
<ul>
|
||||
<li>Bots can now send and receive <a href="https://telegram.org/blog/live-locations">Live Locations</a>. Added new field <em>live_period</em> to the <a href="/bots/api#sendlocation">sendLocation</a> method and the <a href="/bots/api#editmessagelivelocation">editMessageLiveLocation</a> and <a href="/bots/api#stopmessagelivelocation">stopMessageLiveLocation</a> methods as well as the necessary objects for inline bots.</li>
|
||||
<li>Bots can use the new <a href="/bots/api#setchatstickerset">setChatStickerSet</a> and <a href="/bots/api#deletechatstickerset">deleteChatStickerSet</a> methods to manage <a href="https://telegram.org/blog#stickers-of-the-group">group sticker sets</a>.</li>
|
||||
<li>The <a href="/bots/api#getchat">getChat</a> request now returns the group's sticker set for supergroups if available.</li>
|
||||
<li>Bots now receive entities from media captions in the new field <em>caption_entities</em> in <a href="/bots/api#message">Message</a>.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="august-23-2017" href="#august-23-2017"><i class="anchor-icon"></i></a>August 23, 2017</h3>
|
||||
<p><strong>Bot API 3.3</strong>.</p>
|
||||
<ul>
|
||||
<li>Bots can now mention users via <a href="/bots/api#formatting-options">inline mentions</a>, without using usernames.</li>
|
||||
<li><a href="/bots/api#getchat">getChat</a> now also returns pinned messages in supergroups, if present. Added the new field <em>pinned_message</em> to the <a href="/bots/api#chat">Chat</a> object.</li>
|
||||
<li>Added the new fields <em>author_signature</em> and <em>forward_signature</em> to the <a href="/bots/api#message">Message</a> object.</li>
|
||||
<li>Added the new field <em>is_bot</em> to the <a href="/bots/api#user">User</a> object.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="july-21-2017" href="#july-21-2017"><i class="anchor-icon"></i></a>July 21, 2017</h3>
|
||||
<p><strong>Bot API 3.2</strong>. Teach your bot to handle <a href="/bots/api#stickers">stickers and sticker sets</a>.</p>
|
||||
<ul>
|
||||
<li>Added new methods for working with stickers: <a href="/bots/api#getstickerset">getStickerSet</a>, <a href="/bots/api#uploadstickerfile">uploadStickerFile</a>, <a href="/bots/api#createnewstickerset">createNewStickerSet</a>, <a href="/bots/api#addstickertoset">addStickerToSet</a>, <a href="/bots/api#setstickerpositioninset">setStickerPositionInSet</a>, and <a href="/bots/api#deletestickerfromset">deleteStickerFromSet</a>.</li>
|
||||
<li>Added the fields <em>set_name</em> and <em>mask_position</em> to the <a href="/bots/api#sticker">Sticker</a> object, plus two new objects, <a href="/bots/api#stickerset">StickerSet</a>, and <a href="/bots/api#maskposition">MaskPosition</a>.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="june-30-2017" href="#june-30-2017"><i class="anchor-icon"></i></a>June 30, 2017</h3>
|
||||
<p><strong>Bot API 3.1</strong>. Build your own robotic police force for supergoups with these new methods for admin bots:</p>
|
||||
<ul>
|
||||
<li>Added new methods <a href="/bots/api#restrictchatmember">restrictChatMember</a> and <a href="/bots/api#promotechatmember">promoteChatMember</a> to manage users and admins, added new parameter <em>until_date</em> to <a href="/bots/api#kickchatmember">kickChatMember</a> for temporary bans.</li>
|
||||
<li>Added new methods <a href="/bots/api#exportchatinvitelink">exportChatInviteLink</a>, <a href="/bots/api#setchatphoto">setChatPhoto</a>, <a href="/bots/api#deletechatphoto">deleteChatPhoto</a>, <a href="/bots/api#setchattitle">setChatTitle</a>, <a href="/bots/api#setchatdescription">setChatDescription</a>, <a href="/bots/api#pinchatmessage">pinChatMessage</a> and <a href="/bots/api#unpinchatmessage">unpinChatMessage</a> to manage groups and channels.</li>
|
||||
<li>Added the new fields <em>photo</em>, <em>description</em> and <em>invite_link</em> to the <a href="/bots/api#chat">Chat</a> object.</li>
|
||||
<li>Added the new fields <em>until_date</em>, <em>can_be_edited</em>, <em>can_change_info</em>, <em>can_post_messages</em>, <em>can_edit_messages</em>, <em>can_delete_messages</em>, <em>can_invite_users</em>, <em>can_restrict_members</em>, <em>can_pin_messages</em>, <em>can_promote_members</em>, <em>can_send_messages</em>, <em>can_send_media_messages</em>, <em>can_send_other_messages</em> and <em>can_add_web_page_previews</em> to the <a href="/bots/api#chatmember">ChatMember</a> object.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="may-18-2017" href="#may-18-2017"><i class="anchor-icon"></i></a>May 18, 2017</h3>
|
||||
<p>Introducing <strong>Bot API 3.0</strong>.</p>
|
||||
<p><strong>NEW Payment Platform</strong></p>
|
||||
<p>See <a href="/bots/payments">Introduction to Bot Payments</a> for a brief overview. If you're not a developer, you may like <a href="https://telegram.org/blog/payments">this user-friendly blog post</a> better.</p>
|
||||
<ul>
|
||||
<li>Your bot can now accept <a href="/bots/api#payments">payments</a> for goods and services via Telegram. </li>
|
||||
<li>Added new kinds of <a href="/bots/api#update">updates</a>, <em>shipping_query</em> and <em>pre_checkout_query</em>, and new types of <a href="/bots/api#message">message</a> content, <em>invoice</em> and <em>successful_payment</em>.</li>
|
||||
<li>Added new methods for payments: <a href="/bots/api#sendinvoice">sendInvoice</a>, <a href="/bots/api#answershippingquery">answerShippingQuery</a>, and <a href="/bots/api#answerprecheckoutquery">answerPreCheckoutQuery</a>.</li>
|
||||
<li>Added a new type of button, the <strong>pay</strong> button to <a href="/bots/api#inlinekeyboardbutton">InlineKeyboardButton</a>.</li>
|
||||
</ul>
|
||||
<p><strong>NEW Video Messages</strong></p>
|
||||
<ul>
|
||||
<li>As of Telegram v.4.0, users can send short rounded <a href="https://telegram.org/blog/payments">video messages</a>, using an interface similar to that of voice notes.</li>
|
||||
<li>Added the <a href="/bots/api#sendvideonote">sendVideoNote</a> method, the new field <em>video_note</em> to <a href="/bots/api#message">Message</a>, the fields <em>record_video_note</em> or <em>upload_video_note</em> to <a href="/bots/api#sendchataction">sendChatAction</a>.</li>
|
||||
</ul>
|
||||
<p><strong>NEW Multilingual Bots</strong></p>
|
||||
<ul>
|
||||
<li>The <a href="/bots/api#user">User</a> object now may have a <em>language_code</em> field that contains the <a href="https://en.wikipedia.org/wiki/IETF_language_tag">IETF language tag</a> of the user's language.</li>
|
||||
<li>Thanks to this, your bot can now offer localized responses to users that speak different languages.</li>
|
||||
</ul>
|
||||
<p><strong>More power to admin bots</strong></p>
|
||||
<ul>
|
||||
<li><a href="/bots/api#unbanchatmember">unbanChatMemeber</a> now also works in channels!</li>
|
||||
<li>New method <a href="/bots/api#deletemessages">deleteMessage</a> that allows the bot to delete its own messages, as well as messages posted by other in groups and channels where the bot is an administrator.</li>
|
||||
</ul>
|
||||
<p><strong>Minor Changes</strong></p>
|
||||
<ul>
|
||||
<li>Replaced the field <em>new_chat_member</em> in <a href="/bots/api#message">Message</a> with <em>new_chat_members</em> (the old field will still be available for a while for compatibility purposes).</li>
|
||||
<li><a href="https://core.telegram.org/bots/api#inlinekeyboardbutton">Inline keyboards</a> with <em>switch_inline_query</em> and <em>switch_inline_query_current_chat</em> can no longer be sent to channels because they are useless there.</li>
|
||||
<li>New fields <em>gif_duration</em> in <a href="/bots/api#inlinequeryresultgif">InlineQueryResultGif</a> and <em>mpeg4_duration</em> in <a href="/bots/api#inlinequeryresultmpeg4gif">InlineQueryResultMpeg4Gif</a>.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="december-4-2016" href="#december-4-2016"><i class="anchor-icon"></i></a>December 4, 2016</h3>
|
||||
<p>Introducing <strong>Bot API 2.3.1</strong>, a nifty little update that will give you more control over how your bot gets its updates.</p>
|
||||
<ul>
|
||||
<li>Use the new field <em>max_connections</em> in <a href="/bots/api#setwebhook">setWebhook</a> to optimize your bot's server load</li>
|
||||
<li>Use <em>allowed_updates</em> in <a href="/bots/api#setwebhook">setWebhook</a> and <a href="/bots/api#getupdates">getUpdates</a> to selectively subscribe to updates of a certain type. Among other things, this allows you to stop getting updates about new posts in channels where your bot is an admin.</li>
|
||||
<li><a href="/bots/api#deletewebhook">deleteWebhook</a> moved out of <a href="/bots/api#setwebhook">setWebhook</a> to get a whole separate method for itself.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="november-21-2016" href="#november-21-2016"><i class="anchor-icon"></i></a>November 21, 2016</h3>
|
||||
<p><strong>Bot API 2.3</strong></p>
|
||||
<ul>
|
||||
<li>Modified <a href="/bots/faq#what-messages-will-my-bot-get"><strong>bot privacy mode</strong></a> for the sake of consistency. </li>
|
||||
<li><p>Your bot can now get <strong>updates about posts in channels</strong>. Added new fields <em>channel_post</em> and <em>edited_channel_post</em> to <a href="/bots/#update">Update</a>.</p>
|
||||
</li>
|
||||
<li><p>You can now update high scores to a lower value by using the new <em>force</em> parameter in <a href="/bots/#setgamescore">setGameScore</a>. Handy for punishing <strong>cheaters</strong> or fixing errors in your game's High Score table.</p>
|
||||
</li>
|
||||
<li>Starting today, messages with high scores will be updated with new high scores by default. Use <em>disable_edit_message</em> in <a href="/bots/#setgamescore">setGameScore</a> if you don't want this.</li>
|
||||
<li>The <em>edit_message</em> parameter from <a href="/bots/#setgamescore">setGameScore</a> is no longer in use. For backward compatibility, it will be taken into account for a while, unless <em>disable_edit_message</em> is passed explicitly.</li>
|
||||
<li>Added the new field <em>forward_from_message_id</em> to <a href="/bots/#message">Message</a>.</li>
|
||||
<li>Added the new parameter <em>cache_time</em> to <a href="/bots/#answercallbackquery">answerCallbackQuery</a>. Will eventually work in Telegram apps — somewhere after version 3.14, maybe 3.15.</li>
|
||||
<li>Renamed <em>hide_keyboard</em> to <em>remove_keyboard</em> in <a href="/bots/#replykeyboardremove">ReplyKeyboardRemove</a> for clarity. <em>hide_keyboard</em> will still work for a while for backward compatibility.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="october-3-2016" href="#october-3-2016"><i class="anchor-icon"></i></a>October 3, 2016</h3>
|
||||
<p><strong>Bot API 2.2.</strong> <a href="/bots/games">Introducing a new Gaming Platform!</a> See <a href="/bots/games">this introduction</a> for a brief overview.<br>If you're not a developer, you may like <a href="https://telegram.org/blog/games"><strong>this user-friendly blog post</strong></a> better.</p>
|
||||
<ul>
|
||||
<li>New tools for building <a href="/bots/api#games"><strong>HTML5 games</strong></a>.</li>
|
||||
<li>New method <a href="/bots/api#sendgame">sendGame</a>, new object <a href="/bots/api#inlinequeryresultgame">InlineQueryResultGame</a>, new field <em>game</em> in <a href="/bots/api#message">Message</a>.</li>
|
||||
<li>New parameter <em>url</em> in <a href="/bots/api#answercallbackquery">answerCallbackQuery</a>. Create a game and accept the conditions using Botfather to send custom urls that open your games for the user.</li>
|
||||
<li>New field <em>callback_game</em> in <a href="/bots/api#inlinekeyboardbutton">InlineKeyboardButton</a>, new fields <em>game_short_name</em> and <em>chat_instance</em> in <a href="/bots/api#callbackquery">CallbackQuery</a>, new object <a href="/bots/api#callbackgame">CallbackGame</a>. </li>
|
||||
<li>New methods <a href="/bots/api#setgamescore">setGameScore</a> and <a href="/bots/api#getgamehighscores">getGameHighScores</a>.</li>
|
||||
</ul>
|
||||
<p><strong>Other changes</strong></p>
|
||||
<ul>
|
||||
<li>Making life easier for webhook users. Added a detailed <a href="https://core.telegram.org/bots/webhooks"><strong>Guide to All Things Webhook</strong></a> that describes every pothole you can run into on the webhook road.</li>
|
||||
<li><p>New method <a href="/bots/api#getwebhookinfo">getWebhookInfo</a> to check current webhook status.</p>
|
||||
</li>
|
||||
<li><p>Added the option to specify an <strong>HTTP URL</strong> for a file in all methods where <a href="/bots/api#inputfile">InputFile</a> or <em>file_id</em> can be used (except voice messages). Telegram will get the file from the specified URL and send it to the user. Files must be smaller than 5 MB for photos and smaller than 20 MB for all other types of content.</p>
|
||||
</li>
|
||||
<li>Use the new <em>url</em> parameter in <a href="/bots/api#answercallbackquery">answerCallbackQuery</a> to create buttons that open your bot with user-specific parameters.</li>
|
||||
<li>Added new field <em>switch_inline_query_current_chat</em> in <a href="/bots/api#inlinekeyboardbutton">InlineKeyboardButton</a>.</li>
|
||||
<li>Added <em>caption</em> fields to <a href="/bots/api#sendaudio">sendAudio</a>, <a href="/bots/api#sendvoice">sendVoice</a>, <a href="/bots/api#inlinequeryresultaudio">InlineQueryResultAudio</a>, <a href="/bots/api#inlinequeryresultvoice">InlineQueryResultVoice</a>, <a href="/bots/api#inlinequeryresultcachedaudio">InlineQueryResultCachedAudio</a>, and <a href="/bots/api#inlinequeryresultcachedvoice">InlineQueryResultCachedVoice</a>.</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>New field <em>all_members_are_administrators</em> in the <a href="/bots/api#chat">Chat</a> object.</li>
|
||||
<li>Certain server responses may now contain the new <a href="/bots/api#responseparameters"><em>parameters</em></a> field with expanded info on errors that occurred while processing your requests.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="may-25-2016" href="#may-25-2016"><i class="anchor-icon"></i></a>May 25, 2016</h3>
|
||||
<ul>
|
||||
<li><a href="/bots/api#inlinekeyboardmarkup">Inline keyboards</a> may now be used in group chats. Channels coming soon.</li>
|
||||
<li>Check out <a href="https://telegram.me/vote">@vote</a> and <a href="https://telegram.me/like">@like</a> for examples.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="may-22-2016" href="#may-22-2016"><i class="anchor-icon"></i></a>May 22, 2016</h3>
|
||||
<ul>
|
||||
<li><strong>Bot API 2.1.</strong> Added more tools for group administrator bots. Your bot can now get a list of administrators and members count in a group, check a user's current status (administrator, creator, left the group, kicked from the group), and leave a group.</li>
|
||||
<li>Added new methods: <a href="/bots/api#getchat">getChat</a>, <a href="/bots/api#leavechat">leaveChat</a>, <a href="/bots/api#getchatadministrators">getChatAdministrators</a>, <a href="/bots/api#getchatmember">getChatMember</a>, <a href="/bots/api#getchatmemberscount">getChatMembersCount</a>.</li>
|
||||
<li>Added support for <a href="https://telegram.org/blog/edit">edited messages</a> and <a href="https://telegram.org/blog/edit#new-mentions">new mentions</a> from Telegram v.3.9. New fields: <em>edited_message</em> in <a href="/bots/api#update">Update</a>, <em>edit_date</em> in <a href="/bots/api#message">Message</a>, <em>user</em> in <a href="/bots/api#messageentity">MessageEntity</a>. New value <em>text_mention</em> for the <em>type</em> field in <a href="/bots/api#messageentity">MessageEntity</a>.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="may-12-2016" href="#may-12-2016"><i class="anchor-icon"></i></a>May 12, 2016</h3>
|
||||
<ul>
|
||||
<li>Added consistency to what messages bots get in groups and supergroups. <a href="/bots/faq#what-messages-will-my-bot-get">See updated FAQ for details »</a></li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="may-6-2016" href="#may-6-2016"><i class="anchor-icon"></i></a>May 6, 2016</h3>
|
||||
<ul>
|
||||
<li>Added the field <em>emoji</em> to the <a href="/bots/api#sticker">Sticker</a> object. Your bot can now know the emoji a sticker corresponds to.</li>
|
||||
<li>Added the field <em>forward_from_chat</em> to the <a href="/bots/api#message">Message</a> object for messages forwarded from channels.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="april-9-2016" href="#april-9-2016"><i class="anchor-icon"></i></a>April 9, 2016</h3>
|
||||
<p>Introducing <strong>Bot API 2.0</strong>. Check out <a href="/bots/2-0-intro">this page</a> for a review of this major update.</p>
|
||||
<ul>
|
||||
<li>New <a href="/bots/2-0-intro#new-inline-keyboards"><strong>inline keyboards</strong></a> with <strong>callback</strong> and <strong>URL buttons</strong>. Added new objects <a href="/bots/api#inlinekeyboardmarkup">InlineKeyboardMarkup</a>, <a href="/bots/api#inlinekeyboardbutton">InlineKeyboardButton</a> and <a href="/bots/api#callbackquery">CallbackQuery</a>, added <em>reply_markup</em> fields to all <a href="/bots/api#inlinequeryresult">InlineQueryResult</a> objects. Added field <em>callback_query</em> to the <a href="/bots/api#update">Update</a> object, new method <a href="/bots/api#answercallbackquery">answerCallbackQuery</a>.</li>
|
||||
<li>Bots can now <a href="/bots/api#updating-messages"><strong>edit</strong> their messages</a>. Added methods <a href="/bots/api#editmessagetext">editMessageText</a>, <a href="/bots/api#editmessagecaption">editMessageCaption</a>, <a href="/bots/api#editmessagereplymarkup">editMessageReplyMarkup</a>.</li>
|
||||
<li>Bots can request <strong>location</strong> and <strong>phone number</strong> from the user. The <em>keyboard</em> field in the object <a href="/bots/api#replykeyboardmarkup">ReplyKeyboardMarkup</a> now supports <a href="/bots/api#keyboardbutton">KeyboardButton</a>, a new object that can have the fields <em>request_location</em> and <em>request_contact</em>.</li>
|
||||
</ul>
|
||||
<p><strong>Inline bots</strong></p>
|
||||
<ul>
|
||||
<li>Added support for all content types available on Telegram. <strong>19 types</strong> of <a href="/bots/api#inlinequeryresult">InlineQueryResult</a> objects are now supported.</li>
|
||||
<li>Inline bots can now <strong>substitute</strong> all kinds of content with text. Added 4 types of <a href="/bots/api#inputmessagecontent">InputMessageContent</a> objects.</li>
|
||||
<li>Your inline bot can also ask users for permission to use their location. Added the new Botfather command <code>/setinlinegeo</code>, added field <em>location</em> to the <a href="/bots/api#inlinequery">InlineQuery</a> object, added fields <em>location</em> and <em>inline_message_id</em> to the <a href="/bots/api#choseninlineresult">ChosenInlineResult</a> object.</li>
|
||||
<li>Added an easy way to <strong>switch</strong> between inline mode and a private chat with the bot – useful for settings, establishing external connections and teaching users how to use your bot in inline mode. Added parameters <em>switch_pm_text</em> and <em>switch_pm_parameter</em> to the method <a href="/bots/api#answerinlinequery">answerInlineQuery</a>.</li>
|
||||
</ul>
|
||||
<p><strong>Miscellaneous</strong></p>
|
||||
<ul>
|
||||
<li>Added group <strong>administration</strong> tools. New methods <a href="/bots/api#kickchatmember">kickChatMember</a> and <a href="/bots/api#unbanchatmember">unbanChatMember</a>.</li>
|
||||
<li>Added fields <em>venue</em>, <em>pinned_message</em> and <em>entities</em> to the <a href="/bots/api#message">Message</a> object. Added new objects <a href="/bots/api#messageentity">MessageEntity</a> and <a href="/bots/api#venue">Venue</a>, new methods <a href="/bots/api#sendvenue">sendVenue</a> and <a href="/bots/api#sendcontact">sendContact</a>.</li>
|
||||
<li>Renamed the fields <em>new_chat_participant</em> and <em>left_chat_participant</em> of the <a href="/bots/api#message">Message</a> object to <em>new_chat_member</em> and <em>left_chat_member</em>.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="february-20-2016" href="#february-20-2016"><i class="anchor-icon"></i></a>February 20, 2016</h3>
|
||||
<ul>
|
||||
<li>Added the <em>disable_notification</em> parameter to all methods that send messages or any kind.</li>
|
||||
<li>Removed backward compatibility from the method <a href="/bots/api#sendaudio">sendAudio</a>. Voice messages now must be sent using the method <a href="/bots/api#sendvoice">sendVoice</a>. There is no more need to specify a non-empty title or performer while sending the audio by <em>file_id</em>.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="january-20-2016" href="#january-20-2016"><i class="anchor-icon"></i></a>January 20, 2016</h3>
|
||||
<ul>
|
||||
<li>By the way, you can use both HTML-style and markdown-style formatting in your bot's messages to send bold, italic or fixed-width text and inline links. All official Telegram clients support this. See <a href="/bots/api#formatting-options">Formatting options</a> for details.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="january-14-2016" href="#january-14-2016"><i class="anchor-icon"></i></a>January 14, 2016</h3>
|
||||
<ul>
|
||||
<li>You can now <a href="/bots/inline#collecting-feedback">collect feedback</a> on which results provided by your inline bot get chosen by the users. Added the <code>setinlinefeedback</code> command for Botfather, new type <a href="/bots/api#choseninlineresult">ChosenInlineResult</a>, new field <em>chosen_inline_result</em> to the <a href="/bots/api#update">Update</a> object.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="january-4-2016" href="#january-4-2016"><i class="anchor-icon"></i></a>January 4, 2016</h3>
|
||||
<ul>
|
||||
<li>Added support for <a href="/bots/inline">Inline Mode</a>, a new way for people to contact your bot by typing its username and a query in the text input field in any chat. Enable by sending <code>/setinline</code> to <a href="https://telegram.me/botfather">@BotFather</a>.</li>
|
||||
<li>New optional field <em>inline_query</em> added to the <a href="/bots/api#update">Update</a> object.</li>
|
||||
<li>Added new method <a href="/bots/api#answerinlinequery">answerInlineQuery</a> and new objects <a href="/bots/api#inlinequery">InlineQuery</a>, <a href="/bots/api#inlinequeryresultarticle">InlineQueryResultArticle</a>, <a href="/bots/api#inlinequeryresultphoto">InlineQueryResultPhoto</a>, <a href="/bots/api#inlinequeryresultgif">InlineQueryResultGif</a>, <a href="/bots/api#inlinequeryresultmpeg4gif">InlineQueryResultMpeg4Gif</a> and <a href="/bots/api#inlinequeryresultvideo">InlineQueryResultVideo</a>.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="november-2015" href="#november-2015"><i class="anchor-icon"></i></a>November, 2015</h3>
|
||||
<ul>
|
||||
<li>Added support for <a href="https://telegram.org/blog/supergroups">supergroups</a>. The <em>Type</em> field in the <a href="/bots/api#chat">Chat</a> object can now contain 'supergroup'.</li>
|
||||
<li>New optional fields added to the <a href="/bots/api#message">Message</a> object: <em>supergroup_chat_created</em>, <em>migrate_to_chat_id</em>, <em>migrate_from_chat_id</em> and <em>channel_chat_created</em>.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="october-8-2015" href="#october-8-2015"><i class="anchor-icon"></i></a>October 8, 2015</h3>
|
||||
<ul>
|
||||
<li>Added initial channel support for bots (no Telegram clients support this at the moment, please wait for updates):</li>
|
||||
<li>The <em>Chat</em> field in the <a href="/bots/api#message">Message</a> is now of the new type <a href="/bots/api#chat">Chat</a>.</li>
|
||||
<li>You can now pass a channel username (in the format <code>@channelusername</code>) in the place of <em>chat_id</em> in all methods (and instead of <em>from_chat_id</em> in <a href="/bots/api#forwardmessage">forwardMessage</a>). For this to work, the bot must be an administrator in the channel (and that's exactly what Telegram clients don't support yet — adding bots as administrators coming soon).</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="september-18-2015" href="#september-18-2015"><i class="anchor-icon"></i></a>September 18, 2015</h3>
|
||||
<ul>
|
||||
<li>Bots can now download files and media sent by users.</li>
|
||||
<li>Added <a href="/bots/api#getfile">getFile</a> and <a href="/bots/api#file">File</a>.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="september-7-2015" href="#september-7-2015"><i class="anchor-icon"></i></a>September 7, 2015</h3>
|
||||
<ul>
|
||||
<li>You can now <a href="/bots/api#making-requests">pass parameters</a> using <em>application/json</em> (please note that this doesn't work for file uploads: use <em>multipart/form-data</em> to upload files).</li>
|
||||
<li>Added very basic <a href="/bots/api#using-markdown">markdown support</a>. New field <em>parse_mode</em> added to <a href="/bots/api#sendmessage">sendMessage</a>. For the moment messages with markdown will be displayed correctly only in Telegram for <strong>Android</strong>. Other official apps will catch up soon.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="august-29-2015" href="#august-29-2015"><i class="anchor-icon"></i></a>August 29, 2015</h3>
|
||||
<ul>
|
||||
<li>Added support for self-signed certificates: upload your certificate using the <em>certificate</em> parameter in the <a href="/bots/api#setwebhook">setWebhook</a> method.</li>
|
||||
<li>You can now make <a href="/bots/api#making-requests-when-getting-updates">new requests</a> when responding to webhook updates.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="august-15-2015" href="#august-15-2015"><i class="anchor-icon"></i></a>August 15, 2015</h3>
|
||||
<ul>
|
||||
<li>Added new type <strong><a href="/bots/api#voice">Voice</a></strong> and new method <a href="/bots/api#sendvoice"><strong>sendVoice</strong></a> for sending voice messages.</li>
|
||||
<li>Earlier <strong><a href="/bots/api#audio">Audio</a></strong> and <strong><a href="/bots/api#sendaudio">sendAudio</a></strong> should now be used for sending music files. Telegram clients will show such files in the in-app music player. If you were using <a href="/bots/api#sendaudio"><strong>sendAudio</strong></a> for your bot to send voice messages, please use <a href="/bots/api#sendaudio"><strong>sendVoice</strong></a> instead.</li>
|
||||
<li>Added optional fields <em>performer</em>, <em>title</em> to the <a href="/bots/api#audio"><strong>Audio</strong></a> object and <a href="/bots/api#sendaudio"><strong>sendAudio</strong></a> method.</li>
|
||||
<li>Added optional field <em>voice</em> to the <a href="/bots/api#message"><strong>Message</strong></a> object.</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="july-2015" href="#july-2015"><i class="anchor-icon"></i></a>July 2015</h3>
|
||||
<ul>
|
||||
<li>The <strong>thumb</strong> field is now optional for <a href="/bots/api#video">Video</a>, <a href="/bots/api#sticker">Sticker</a> and <a href="/bots/api#document">Document</a> objects</li>
|
||||
<li>The API now supports both video and photo captions. The <strong>caption</strong> field has been removed from the <a href="/bots/api#video">Video</a> object and added to the <a href="/bots/api#message">Message</a> object instead. </li>
|
||||
<li><strong>caption</strong> and <strong>duration</strong> optional fields have been added to the <a href="/bots/api#sendvideo">sendVideo</a> method.</li>
|
||||
<li>Fixed typo: <strong>user_id</strong> in the Contact object is now correctly labeled as Integer, not String</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="june-24-2015" href="#june-24-2015"><i class="anchor-icon"></i></a>June 24, 2015</h3>
|
||||
<p>The bot platform was <a href="https://telegram.org/blog/bot-revolution">officially launched</a>.</p>
|
||||
<blockquote>
|
||||
<p><strong><a href="/bots/api">Back to the Bot API Manual »</a></strong></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?43"></script>
|
||||
<script src="/js/jquery.min.js?1"></script>
|
||||
<script src="/js/bootstrap.min.js?1"></script>
|
||||
|
||||
<script>window.initDevPageNav&&initDevPageNav();
|
||||
backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
9488
data/core.telegram.org/bots/api.html
Normal file
9488
data/core.telegram.org/bots/api.html
Normal file
File diff suppressed because it is too large
Load diff
182
data/core.telegram.org/bots/inline.html
Normal file
182
data/core.telegram.org/bots/inline.html
Normal file
|
@ -0,0 +1,182 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Inline Bots</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Inline bots: A new way to interact with bots and send bot-generated content to any chat, group or channel.">
|
||||
<meta property="og:title" content="Inline Bots">
|
||||
<meta property="og:image" content="https://core.telegram.org/file/811140530/1/h-eMmPp2vp4/cd4a109f75e6561305">
|
||||
<meta property="og:description" content="Inline bots: A new way to interact with bots and send bot-generated content to any chat, group or 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?215" 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/inline" >Inline Bots</a></li></ul></div>
|
||||
<h1 id="dev_page_title">Inline Bots</h1>
|
||||
|
||||
<div id="dev_page_content"><!-- scroll_nav -->
|
||||
|
||||
<div class="dev_side_image">
|
||||
<a href="/file/811140221/1/fW9vnLya4Fg/e2b5c530c7b0e019c4" target="_blank"><img src="/file/811140530/1/h-eMmPp2vp4/cd4a109f75e6561305" title="Inline bots. Click for hi-res picture">
|
||||
</a></div>
|
||||
|
||||
<p>Beyond sending commands in private messages or groups, users can interact with your bot via <a href="/bots/api#inline-mode"><strong>inline queries</strong></a>. If inline queries are enabled, users can call your bot by typing its username and a query in the <strong>text input field</strong> in <strong>any</strong> chat. The query is sent to your bot in an update. This way, people can request content from your bot in <strong>any</strong> of their chats, groups, or channels without sending any messages at all.</p>
|
||||
<div><center>
|
||||
<a href="/file/811140995/1/I-wubuXAnzk/2e39739d0ac6bd5458" target="_blank"><img src="/file/811140995/1/I-wubuXAnzk/2e39739d0ac6bd5458" title="Users can type the bot’s username in any chat, then type a query without sending any messages" style="width:300px; padding:10px 0px 10px"/></a></center>
|
||||
<br></div>
|
||||
|
||||
|
||||
<p>To enable this option, send the <code>/setinline</code> command to <a href="https://telegram.me/botfather">@BotFather</a> and provide the placeholder text that the user will see in the input field after typing your bot’s name.</p>
|
||||
<blockquote>
|
||||
<p>See the <a href="/bots/api#inline-mode">Bot API Manual</a> for the relevant methods and objects.</p>
|
||||
</blockquote>
|
||||
<h3><a class="anchor" name="inline-results" href="#inline-results"><i class="anchor-icon"></i></a>Inline results</h3>
|
||||
<p>Inline bots support <strong>all types of content</strong> available in Telegram (20 in all). They are 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>Clients can display the results with vertical or horizontal scrolling, depending on the type of content:</p>
|
||||
<div><center>
|
||||
|
||||
<a href="/file/811140049/2/M2mzqjZoiUw/2d872f0df2aed182d6" target="_blank"><img src="/file/811140049/2/M2mzqjZoiUw/2d872f0df2aed182d6" title="Vertical scrolling" style="width: 295px; padding: 0px 20px;" /></a>
|
||||
|
||||
<a href="/file/811140592/2/P4-tFhmBsCg/57418af08f1a252d45" target="_blank"><img src="/file/811140592/2/P4-tFhmBsCg/57418af08f1a252d45" title="Horizontal scrolling" style="width: 295px; padding: 0px 20px;" /></a>
|
||||
|
||||
</center>
|
||||
<br></div>
|
||||
|
||||
<p>As soon as the user taps on an item, it's immediately sent to the recipient, and the input field is cleared.</p>
|
||||
<h3><a class="anchor" name="switching-inline-pm-modes" href="#switching-inline-pm-modes"><i class="anchor-icon"></i></a>Switching inline/PM modes</h3>
|
||||
<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'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 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>
|
||||
<h3><a class="anchor" name="location-based-results" href="#location-based-results"><i class="anchor-icon"></i></a>Location-based results</h3>
|
||||
<p>Inline bots can 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's location, then provide geo-targeted results.</p>
|
||||
<h3><a class="anchor" name="spreading-virally" href="#spreading-virally"><i class="anchor-icon"></i></a>Spreading virally</h3>
|
||||
<p>Messages sent with the help of your bot will show its username next to the sender's name.</p>
|
||||
<div><center>
|
||||
|
||||
<a href="/file/811140680/2/P3E5RVFzGZ8/5ae6f9c9610b0cbace" target="_blank"><img src="/file/811140680/2/P3E5RVFzGZ8/5ae6f9c9610b0cbace" title="Gif shared via a bot" style="width: 295px; padding: 0px 20px;" /></a>
|
||||
<a href="/file/811140016/2/2b_B7nq9OQA/161b06d38843930fe5" target="_blank"><img src="/file/811140016/2/2b_B7nq9OQA/161b06d38843930fe5" title="Inline bot suggestions" style="width: 295px; padding: 0px 20px;" /></a>
|
||||
|
||||
|
||||
<br><br></center></div>
|
||||
|
||||
<p>When a user taps on the bot username in the message header, the mention is automatically inserted into the input field. Entering the <code>@</code> symbol in the input field brings up a list of suggestions, featuring recently used inline bots.</p>
|
||||
<h4><a class="anchor" name="collecting-feedback" href="#collecting-feedback"><i class="anchor-icon"></i></a>Collecting feedback</h4>
|
||||
<p>To know which of the provided results your users are sending to their chat partners, send <a href="https://telegram.me/botfather">@Botfather</a> the <code>/setinlinefeedback</code> command. With this enabled, you will receive updates on the results chosen by your users.</p>
|
||||
<p>Please note that this can create load issues for popular bots – you may receive more results than actual requests due to caching (see the <em>cache_time</em> parameter in <a href="/bots/api#answerinlinequery">answerInlineQuery</a>). For these cases, we recommend adjusting the probability setting to receive 1/10, 1/100 or 1/1000 of the results.</p>
|
||||
<h3><a class="anchor" name="inline-bot-samples" href="#inline-bot-samples"><i class="anchor-icon"></i></a>Inline bot samples</h3>
|
||||
<p>Here are some sample inline bots, in case you’re curious to see one in action. Try any of these:<br><a href="https://telegram.me/gif">@gif</a> – GIF search<br><a href="https://telegram.me/vid">@vid</a> – Video search<br><a href="https://telegram.me/pic">@pic</a> – Yandex image search<br><a href="https://telegram.me/bing">@bing</a> – Bing image search<br><a href="https://telegram.me/wiki">@wiki</a> – Wikipedia search<br><a href="https://telegram.me/imdb">@imdb</a> – IMDB search<br><a href="https://telegram.me/bold">@bold</a> – Make bold, italic or fixed sys text</p>
|
||||
<p><strong>NEW</strong><br><a href="https://telegram.me/youtube">@youtube</a> - Connect your account for personalized results<br><a href="https://telegram.me/music">@music</a> - Search and send classical music<br><a href="https://telegram.me/foursquare">@foursquare</a> – Find and send venue addresses<br><a href="https://telegram.me/sticker">@sticker</a> – Find and send stickers based on emoji</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?43"></script>
|
||||
<script src="/js/jquery.min.js?1"></script>
|
||||
<script src="/js/bootstrap.min.js?1"></script>
|
||||
|
||||
<script>window.initDevPageNav&&initDevPageNav();
|
||||
backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,174 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>account.authorizationForm</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="og:image" content="">
|
||||
<meta property="og:description" content="Telegram Passport authorization form">
|
||||
<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?215" 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.authorizationForm" >account.authorizationForm</a></li></ul></div>
|
||||
<h1 id="dev_page_title">account.authorizationForm</h1>
|
||||
|
||||
<div id="dev_page_content"><p><a href="/passport">Telegram Passport</a> authorization form</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 133 <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="?layer=1">1 – Base layer</a></li><li><a href="?layer=2">2 – New userpic notifications</a></li><li><a href="?layer=3">3 – Send message can trigger link change</a></li><li><a href="?layer=4">4 – Check-in chats</a></li><li><a href="?layer=5">5 – Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 – Foursquare integration</a></li><li><a href="?layer=7">7 – Added wallPaperSolid</a></li><li><a href="?layer=8">8 – Added end-to-end encryption</a></li><li><a href="?layer=9">9 – Improved big files upload perfomance</a></li><li><a href="?layer=10">10 – Improved chat participants updates</a></li><li><a href="?layer=11">11 – Improved secret chats</a></li><li><a href="?layer=12">12 – New dynamic support</a></li><li><a href="?layer=13">13 – Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 – Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 – Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 – Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 – Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 – Added usernames</a></li><li><a href="?layer=23">23 – Stickers for secret chats</a></li><li><a href="?layer=105">105 – Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 – Login with QR code</a></li><li><a href="?layer=109">109 – Polls v2</a></li><li><a href="?layer=110">110 – People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 – Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 – Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 – PSA</a></li><li><a href="?layer=114">114 – Video thumbs for GIFs</a></li><li><a href="?layer=115">115 – Peek Channel Invite</a></li><li><a href="?layer=116">116 – Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 – WebRTC Phone Calls</a></li><li><a href="?layer=118">118 – Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 – Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 – Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121">121 – SVG-based Outlines for Stickers</a></li><li><a href="?layer=122">122 – Voice Chats</a></li><li><a href="?layer=123">123 – Voice Chat improvements</a></li><li><a href="?layer=124">124 – Expiring Invite links</a></li><li><a href="?layer=125">125 – Voice Chats in Broadcasts</a></li><li><a href="?layer=126">126 – Ban channels in channels</a></li><li><a href="?layer=127">127 – Payments in channels</a></li><li><a href="?layer=128">128 – Microthumbs for User/Chat profile photos</a></li><li><a href="?layer=129">129 – Video Chats</a></li><li><a href="?layer=130">130 – Custom placeholder for bot reply keyboards</a></li><li><a href="?layer=131">131 – Reset 2FA Password after a week</a></li><li><a href="?layer=132">132 – Chat themes</a></li><li><a href="?layer=133"><strong>133 – 64-bit IDs for User/Chat</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.authorizationForm" class="current_page_link" >account.authorizationForm</a>#ad2e1cd8 flags:<a href="/type/%23" >#</a> required_types:<a href="/type/Vector%20t" >Vector</a><<a href="/type/SecureRequiredType" >SecureRequiredType</a>> values:<a href="/type/Vector%20t" >Vector</a><<a href="/type/SecureValue" >SecureValue</a>> errors:<a href="/type/Vector%20t" >Vector</a><<a href="/type/SecureValueError" >SecureValueError</a>> users:<a href="/type/Vector%20t" >Vector</a><<a href="/type/User" >User</a>> privacy_policy_url:flags.0?<a href="/type/string" >string</a> = <a href="/type/account.AuthorizationForm" >account.AuthorizationForm</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>required_types</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/Vector%20t">Vector</a><<a href="/type/SecureRequiredType">SecureRequiredType</a>></td>
|
||||
<td>Required <a href="/passport">Telegram Passport</a> documents</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>values</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/Vector%20t">Vector</a><<a href="/type/SecureValue">SecureValue</a>></td>
|
||||
<td>Already submitted <a href="/passport">Telegram Passport</a> documents</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>errors</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/Vector%20t">Vector</a><<a href="/type/SecureValueError">SecureValueError</a>></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><<a href="/type/User">User</a>></td>
|
||||
<td>Info about the bot to which the form will be submitted</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>privacy_policy_url</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>
|
||||
</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>
|
||||
<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></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?43"></script>
|
||||
|
||||
<script>backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,132 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>auth.codeTypeCall</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.codeTypeCall">
|
||||
<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?215" 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.codeTypeCall" >auth.codeTypeCall</a></li></ul></div>
|
||||
<h1 id="dev_page_title">auth.codeTypeCall</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 133 <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="?layer=1">1 – Base layer</a></li><li><a href="?layer=2">2 – New userpic notifications</a></li><li><a href="?layer=3">3 – Send message can trigger link change</a></li><li><a href="?layer=4">4 – Check-in chats</a></li><li><a href="?layer=5">5 – Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 – Foursquare integration</a></li><li><a href="?layer=7">7 – Added wallPaperSolid</a></li><li><a href="?layer=8">8 – Added end-to-end encryption</a></li><li><a href="?layer=9">9 – Improved big files upload perfomance</a></li><li><a href="?layer=10">10 – Improved chat participants updates</a></li><li><a href="?layer=11">11 – Improved secret chats</a></li><li><a href="?layer=12">12 – New dynamic support</a></li><li><a href="?layer=13">13 – Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 – Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 – Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 – Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 – Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 – Added usernames</a></li><li><a href="?layer=23">23 – Stickers for secret chats</a></li><li><a href="?layer=105">105 – Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 – Login with QR code</a></li><li><a href="?layer=109">109 – Polls v2</a></li><li><a href="?layer=110">110 – People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 – Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 – Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 – PSA</a></li><li><a href="?layer=114">114 – Video thumbs for GIFs</a></li><li><a href="?layer=115">115 – Peek Channel Invite</a></li><li><a href="?layer=116">116 – Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 – WebRTC Phone Calls</a></li><li><a href="?layer=118">118 – Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 – Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 – Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121">121 – SVG-based Outlines for Stickers</a></li><li><a href="?layer=122">122 – Voice Chats</a></li><li><a href="?layer=123">123 – Voice Chat improvements</a></li><li><a href="?layer=124">124 – Expiring Invite links</a></li><li><a href="?layer=125">125 – Voice Chats in Broadcasts</a></li><li><a href="?layer=126">126 – Ban channels in channels</a></li><li><a href="?layer=127">127 – Payments in channels</a></li><li><a href="?layer=128">128 – Microthumbs for User/Chat profile photos</a></li><li><a href="?layer=129">129 – Video Chats</a></li><li><a href="?layer=130">130 – Custom placeholder for bot reply keyboards</a></li><li><a href="?layer=131">131 – Reset 2FA Password after a week</a></li><li><a href="?layer=132">132 – Chat themes</a></li><li><a href="?layer=133"><strong>133 – 64-bit IDs for User/Chat</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.codeTypeCall" class="current_page_link" >auth.codeTypeCall</a>#741cd3e3 = <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?43"></script>
|
||||
|
||||
<script>backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,152 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>auth.passwordRecovery</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Recovery info of a 2FA password, only for accounts with a recovery email configured.">
|
||||
<meta property="og:title" content="auth.passwordRecovery">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Recovery info of a 2FA password, only for accounts with a recovery email configured.">
|
||||
<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?215" 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.passwordRecovery" >auth.passwordRecovery</a></li></ul></div>
|
||||
<h1 id="dev_page_title">auth.passwordRecovery</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Recovery info of a <a href="/api/srp">2FA password</a>, only for accounts with a <a href="/api/srp#email-verification">recovery email configured</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 133 <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="?layer=1">1 – Base layer</a></li><li><a href="?layer=2">2 – New userpic notifications</a></li><li><a href="?layer=3">3 – Send message can trigger link change</a></li><li><a href="?layer=4">4 – Check-in chats</a></li><li><a href="?layer=5">5 – Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 – Foursquare integration</a></li><li><a href="?layer=7">7 – Added wallPaperSolid</a></li><li><a href="?layer=8">8 – Added end-to-end encryption</a></li><li><a href="?layer=9">9 – Improved big files upload perfomance</a></li><li><a href="?layer=10">10 – Improved chat participants updates</a></li><li><a href="?layer=11">11 – Improved secret chats</a></li><li><a href="?layer=12">12 – New dynamic support</a></li><li><a href="?layer=13">13 – Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 – Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 – Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 – Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 – Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 – Added usernames</a></li><li><a href="?layer=23">23 – Stickers for secret chats</a></li><li><a href="?layer=105">105 – Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 – Login with QR code</a></li><li><a href="?layer=109">109 – Polls v2</a></li><li><a href="?layer=110">110 – People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 – Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 – Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 – PSA</a></li><li><a href="?layer=114">114 – Video thumbs for GIFs</a></li><li><a href="?layer=115">115 – Peek Channel Invite</a></li><li><a href="?layer=116">116 – Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 – WebRTC Phone Calls</a></li><li><a href="?layer=118">118 – Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 – Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 – Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121">121 – SVG-based Outlines for Stickers</a></li><li><a href="?layer=122">122 – Voice Chats</a></li><li><a href="?layer=123">123 – Voice Chat improvements</a></li><li><a href="?layer=124">124 – Expiring Invite links</a></li><li><a href="?layer=125">125 – Voice Chats in Broadcasts</a></li><li><a href="?layer=126">126 – Ban channels in channels</a></li><li><a href="?layer=127">127 – Payments in channels</a></li><li><a href="?layer=128">128 – Microthumbs for User/Chat profile photos</a></li><li><a href="?layer=129">129 – Video Chats</a></li><li><a href="?layer=130">130 – Custom placeholder for bot reply keyboards</a></li><li><a href="?layer=131">131 – Reset 2FA Password after a week</a></li><li><a href="?layer=132">132 – Chat themes</a></li><li><a href="?layer=133"><strong>133 – 64-bit IDs for User/Chat</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.passwordRecovery" class="current_page_link" >auth.passwordRecovery</a>#137948a5 email_pattern:<a href="/type/string" >string</a> = <a href="/type/auth.PasswordRecovery" >auth.PasswordRecovery</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>email_pattern</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/string">string</a></td>
|
||||
<td>The email to which the recovery code was sent must match this <a href="/api/pattern">pattern</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/auth.PasswordRecovery">auth.PasswordRecovery</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="#pattern-matching" id="pattern-matching" name="pattern-matching"><i class="anchor-icon"></i></a><a href="/api/pattern">Pattern matching</a></h4>
|
||||
<p>Some methods require the client to verify if the data obtained from an external source matches a certain pattern.</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></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?43"></script>
|
||||
|
||||
<script>backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,132 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>baseThemeTinted</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Tinted theme">
|
||||
<meta property="og:title" content="baseThemeTinted">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Tinted theme">
|
||||
<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?215" 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/baseThemeTinted" >baseThemeTinted</a></li></ul></div>
|
||||
<h1 id="dev_page_title">baseThemeTinted</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Tinted theme</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 133 <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="?layer=1">1 – Base layer</a></li><li><a href="?layer=2">2 – New userpic notifications</a></li><li><a href="?layer=3">3 – Send message can trigger link change</a></li><li><a href="?layer=4">4 – Check-in chats</a></li><li><a href="?layer=5">5 – Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 – Foursquare integration</a></li><li><a href="?layer=7">7 – Added wallPaperSolid</a></li><li><a href="?layer=8">8 – Added end-to-end encryption</a></li><li><a href="?layer=9">9 – Improved big files upload perfomance</a></li><li><a href="?layer=10">10 – Improved chat participants updates</a></li><li><a href="?layer=11">11 – Improved secret chats</a></li><li><a href="?layer=12">12 – New dynamic support</a></li><li><a href="?layer=13">13 – Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 – Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 – Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 – Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 – Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 – Added usernames</a></li><li><a href="?layer=23">23 – Stickers for secret chats</a></li><li><a href="?layer=105">105 – Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 – Login with QR code</a></li><li><a href="?layer=109">109 – Polls v2</a></li><li><a href="?layer=110">110 – People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 – Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 – Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 – PSA</a></li><li><a href="?layer=114">114 – Video thumbs for GIFs</a></li><li><a href="?layer=115">115 – Peek Channel Invite</a></li><li><a href="?layer=116">116 – Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 – WebRTC Phone Calls</a></li><li><a href="?layer=118">118 – Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 – Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 – Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121">121 – SVG-based Outlines for Stickers</a></li><li><a href="?layer=122">122 – Voice Chats</a></li><li><a href="?layer=123">123 – Voice Chat improvements</a></li><li><a href="?layer=124">124 – Expiring Invite links</a></li><li><a href="?layer=125">125 – Voice Chats in Broadcasts</a></li><li><a href="?layer=126">126 – Ban channels in channels</a></li><li><a href="?layer=127">127 – Payments in channels</a></li><li><a href="?layer=128">128 – Microthumbs for User/Chat profile photos</a></li><li><a href="?layer=129">129 – Video Chats</a></li><li><a href="?layer=130">130 – Custom placeholder for bot reply keyboards</a></li><li><a href="?layer=131">131 – Reset 2FA Password after a week</a></li><li><a href="?layer=132">132 – Chat themes</a></li><li><a href="?layer=133"><strong>133 – 64-bit IDs for User/Chat</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/baseThemeTinted" class="current_page_link" >baseThemeTinted</a>#6d5f77ee = <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/BaseTheme">BaseTheme</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?43"></script>
|
||||
|
||||
<script>backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,132 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>boolTrue</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<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="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">
|
||||
|
||||
<link href="/css/telegram.css?215" 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/boolTrue" >boolTrue</a></li></ul></div>
|
||||
<h1 id="dev_page_title">boolTrue</h1>
|
||||
|
||||
<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">
|
||||
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 133 <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="?layer=1">1 – Base layer</a></li><li><a href="?layer=2">2 – New userpic notifications</a></li><li><a href="?layer=3">3 – Send message can trigger link change</a></li><li><a href="?layer=4">4 – Check-in chats</a></li><li><a href="?layer=5">5 – Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 – Foursquare integration</a></li><li><a href="?layer=7">7 – Added wallPaperSolid</a></li><li><a href="?layer=8">8 – Added end-to-end encryption</a></li><li><a href="?layer=9">9 – Improved big files upload perfomance</a></li><li><a href="?layer=10">10 – Improved chat participants updates</a></li><li><a href="?layer=11">11 – Improved secret chats</a></li><li><a href="?layer=12">12 – New dynamic support</a></li><li><a href="?layer=13">13 – Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 – Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 – Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 – Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 – Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 – Added usernames</a></li><li><a href="?layer=23">23 – Stickers for secret chats</a></li><li><a href="?layer=105">105 – Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 – Login with QR code</a></li><li><a href="?layer=109">109 – Polls v2</a></li><li><a href="?layer=110">110 – People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 – Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 – Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 – PSA</a></li><li><a href="?layer=114">114 – Video thumbs for GIFs</a></li><li><a href="?layer=115">115 – Peek Channel Invite</a></li><li><a href="?layer=116">116 – Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 – WebRTC Phone Calls</a></li><li><a href="?layer=118">118 – Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 – Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 – Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121">121 – SVG-based Outlines for Stickers</a></li><li><a href="?layer=122">122 – Voice Chats</a></li><li><a href="?layer=123">123 – Voice Chat improvements</a></li><li><a href="?layer=124">124 – Expiring Invite links</a></li><li><a href="?layer=125">125 – Voice Chats in Broadcasts</a></li><li><a href="?layer=126">126 – Ban channels in channels</a></li><li><a href="?layer=127">127 – Payments in channels</a></li><li><a href="?layer=128">128 – Microthumbs for User/Chat profile photos</a></li><li><a href="?layer=129">129 – Video Chats</a></li><li><a href="?layer=130">130 – Custom placeholder for bot reply keyboards</a></li><li><a href="?layer=131">131 – Reset 2FA Password after a week</a></li><li><a href="?layer=132">132 – Chat themes</a></li><li><a href="?layer=133"><strong>133 – 64-bit IDs for User/Chat</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/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/Bool">Bool</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?43"></script>
|
||||
|
||||
<script>backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,150 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>botCommandScopePeerAdmins</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="The specified bot commands will be valid for all admins of the specified group or supergroup.">
|
||||
<meta property="og:title" content="botCommandScopePeerAdmins">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="The specified bot commands will be valid for all admins of the specified group or supergroup.">
|
||||
<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?215" 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/botCommandScopePeerAdmins" >botCommandScopePeerAdmins</a></li></ul></div>
|
||||
<h1 id="dev_page_title">botCommandScopePeerAdmins</h1>
|
||||
|
||||
<div id="dev_page_content"><p>The specified bot commands will be valid for all admins of the specified <a href="/api/channel">group or supergroup</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 133 <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="?layer=1">1 – Base layer</a></li><li><a href="?layer=2">2 – New userpic notifications</a></li><li><a href="?layer=3">3 – Send message can trigger link change</a></li><li><a href="?layer=4">4 – Check-in chats</a></li><li><a href="?layer=5">5 – Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 – Foursquare integration</a></li><li><a href="?layer=7">7 – Added wallPaperSolid</a></li><li><a href="?layer=8">8 – Added end-to-end encryption</a></li><li><a href="?layer=9">9 – Improved big files upload perfomance</a></li><li><a href="?layer=10">10 – Improved chat participants updates</a></li><li><a href="?layer=11">11 – Improved secret chats</a></li><li><a href="?layer=12">12 – New dynamic support</a></li><li><a href="?layer=13">13 – Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 – Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 – Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 – Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 – Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 – Added usernames</a></li><li><a href="?layer=23">23 – Stickers for secret chats</a></li><li><a href="?layer=105">105 – Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 – Login with QR code</a></li><li><a href="?layer=109">109 – Polls v2</a></li><li><a href="?layer=110">110 – People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 – Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 – Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 – PSA</a></li><li><a href="?layer=114">114 – Video thumbs for GIFs</a></li><li><a href="?layer=115">115 – Peek Channel Invite</a></li><li><a href="?layer=116">116 – Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 – WebRTC Phone Calls</a></li><li><a href="?layer=118">118 – Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 – Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 – Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121">121 – SVG-based Outlines for Stickers</a></li><li><a href="?layer=122">122 – Voice Chats</a></li><li><a href="?layer=123">123 – Voice Chat improvements</a></li><li><a href="?layer=124">124 – Expiring Invite links</a></li><li><a href="?layer=125">125 – Voice Chats in Broadcasts</a></li><li><a href="?layer=126">126 – Ban channels in channels</a></li><li><a href="?layer=127">127 – Payments in channels</a></li><li><a href="?layer=128">128 – Microthumbs for User/Chat profile photos</a></li><li><a href="?layer=129">129 – Video Chats</a></li><li><a href="?layer=130">130 – Custom placeholder for bot reply keyboards</a></li><li><a href="?layer=131">131 – Reset 2FA Password after a week</a></li><li><a href="?layer=132">132 – Chat themes</a></li><li><a href="?layer=133"><strong>133 – 64-bit IDs for User/Chat</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/botCommandScopePeerAdmins" class="current_page_link" >botCommandScopePeerAdmins</a>#3fd863d1 peer:<a href="/type/InputPeer" >InputPeer</a> = <a href="/type/BotCommandScope" >BotCommandScope</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>peer</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/InputPeer">InputPeer</a></td>
|
||||
<td>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/BotCommandScope">BotCommandScope</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="#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>
|
||||
|
||||
</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?43"></script>
|
||||
|
||||
<script>backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,289 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>channel</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Channel/supergroup info">
|
||||
<meta property="og:title" content="channel">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Channel/supergroup info">
|
||||
<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?215" 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/channel" >channel</a></li></ul></div>
|
||||
<h1 id="dev_page_title">channel</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Channel/supergroup info</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 133 <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="?layer=1">1 – Base layer</a></li><li><a href="?layer=2">2 – New userpic notifications</a></li><li><a href="?layer=3">3 – Send message can trigger link change</a></li><li><a href="?layer=4">4 – Check-in chats</a></li><li><a href="?layer=5">5 – Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 – Foursquare integration</a></li><li><a href="?layer=7">7 – Added wallPaperSolid</a></li><li><a href="?layer=8">8 – Added end-to-end encryption</a></li><li><a href="?layer=9">9 – Improved big files upload perfomance</a></li><li><a href="?layer=10">10 – Improved chat participants updates</a></li><li><a href="?layer=11">11 – Improved secret chats</a></li><li><a href="?layer=12">12 – New dynamic support</a></li><li><a href="?layer=13">13 – Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 – Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 – Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 – Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 – Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 – Added usernames</a></li><li><a href="?layer=23">23 – Stickers for secret chats</a></li><li><a href="?layer=105">105 – Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 – Login with QR code</a></li><li><a href="?layer=109">109 – Polls v2</a></li><li><a href="?layer=110">110 – People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 – Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 – Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 – PSA</a></li><li><a href="?layer=114">114 – Video thumbs for GIFs</a></li><li><a href="?layer=115">115 – Peek Channel Invite</a></li><li><a href="?layer=116">116 – Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 – WebRTC Phone Calls</a></li><li><a href="?layer=118">118 – Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 – Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 – Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121">121 – SVG-based Outlines for Stickers</a></li><li><a href="?layer=122">122 – Voice Chats</a></li><li><a href="?layer=123">123 – Voice Chat improvements</a></li><li><a href="?layer=124">124 – Expiring Invite links</a></li><li><a href="?layer=125">125 – Voice Chats in Broadcasts</a></li><li><a href="?layer=126">126 – Ban channels in channels</a></li><li><a href="?layer=127">127 – Payments in channels</a></li><li><a href="?layer=128">128 – Microthumbs for User/Chat profile photos</a></li><li><a href="?layer=129">129 – Video Chats</a></li><li><a href="?layer=130">130 – Custom placeholder for bot reply keyboards</a></li><li><a href="?layer=131">131 – Reset 2FA Password after a week</a></li><li><a href="?layer=132">132 – Chat themes</a></li><li><a href="?layer=133"><strong>133 – 64-bit IDs for User/Chat</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/channel" class="current_page_link" >channel</a>#8261ac61 flags:<a href="/type/%23" >#</a> creator:flags.0?true left:flags.2?true broadcast:flags.5?true verified:flags.7?true megagroup:flags.8?true restricted:flags.9?true signatures:flags.11?true min:flags.12?true scam:flags.19?true has_link:flags.20?true has_geo:flags.21?true slowmode_enabled:flags.22?true call_active:flags.23?true call_not_empty:flags.24?true fake:flags.25?true gigagroup:flags.26?true noforwards:flags.27?true id:<a href="/type/long" >long</a> access_hash:flags.13?<a href="/type/long" >long</a> title:<a href="/type/string" >string</a> username:flags.6?<a href="/type/string" >string</a> photo:<a href="/type/ChatPhoto" >ChatPhoto</a> date:<a href="/type/int" >int</a> restriction_reason:flags.9?<a href="/type/Vector%20t" >Vector</a><<a href="/type/RestrictionReason" >RestrictionReason</a>> admin_rights:flags.14?<a href="/type/ChatAdminRights" >ChatAdminRights</a> banned_rights:flags.15?<a href="/type/ChatBannedRights" >ChatBannedRights</a> default_banned_rights:flags.18?<a href="/type/ChatBannedRights" >ChatBannedRights</a> participants_count:flags.17?<a href="/type/int" >int</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>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>creator</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 current user is the creator of this channel</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>left</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 the current user has left this channel</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>broadcast</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>Is this a channel?</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>verified</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>Is this channel verified by telegram?</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>megagroup</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.8?<a href="/constructor/true">true</a></td>
|
||||
<td>Is this a supergroup?</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>restricted</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.9?<a href="/constructor/true">true</a></td>
|
||||
<td>Whether viewing/writing in this channel for a reason (see <code>restriction_reason</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>signatures</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.11?<a href="/constructor/true">true</a></td>
|
||||
<td>Whether signatures are enabled (channels)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>min</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.12?<a href="/constructor/true">true</a></td>
|
||||
<td>See <a href="/api/min">min</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>scam</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 channel/supergroup is probably a scam</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>has_link</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>Whether this channel has a private join link</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>has_geo</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 this chanel has a geoposition</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>slowmode_enabled</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 slow mode is enabled for groups to prevent flood in chat</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>call_active</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.23?<a href="/constructor/true">true</a></td>
|
||||
<td>Whether a group call or livestream is currently active</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>call_not_empty</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 there's anyone in the group call or livestream</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>fake</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.25?<a href="/constructor/true">true</a></td>
|
||||
<td>If set, this <a href="/api/channel">supergroup/channel</a> was reported by many users as a fake or scam: be careful when interacting with it.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>gigagroup</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.26?<a href="/constructor/true">true</a></td>
|
||||
<td>Whether this <a href="/api/channel">supergroup</a> is a gigagroup</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>id</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/long">long</a></td>
|
||||
<td>ID of the channel</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>access_hash</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.13?<a href="/type/long">long</a></td>
|
||||
<td>Access hash</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>title</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/string">string</a></td>
|
||||
<td>Title</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>username</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.6?<a href="/type/string">string</a></td>
|
||||
<td>Username</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>photo</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/ChatPhoto">ChatPhoto</a></td>
|
||||
<td>Profile photo</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 joined the supergroup/channel, or if the user isn't a member, its creation date</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>restriction_reason</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.9?<a href="/type/Vector%20t">Vector</a><<a href="/type/RestrictionReason">RestrictionReason</a>></td>
|
||||
<td>Contains the reason why access to this channel must be restricted.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>admin_rights</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.14?<a href="/type/ChatAdminRights">ChatAdminRights</a></td>
|
||||
<td>Admin rights of the user in this channel (see <a href="/api/rights">rights</a>)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>banned_rights</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.15?<a href="/type/ChatBannedRights">ChatBannedRights</a></td>
|
||||
<td>Banned rights of the user in this channel (see <a href="/api/rights">rights</a>)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>default_banned_rights</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.18?<a href="/type/ChatBannedRights">ChatBannedRights</a></td>
|
||||
<td>Default chat rights (see <a href="/api/rights">rights</a>)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>participants_count</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>Participant count</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>
|
||||
<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="#min-constructors" id="min-constructors" name="min-constructors"><i class="anchor-icon"></i></a><a href="/api/min">Min constructors</a></h4>
|
||||
<p>In some situations user and channel constructors have reduced set of fields present (although id is always there) and min flag set.</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="#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?43"></script>
|
||||
|
||||
<script>backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,152 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>channelAdminLogEventActionChangeLocation</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="The geogroup location was changed">
|
||||
<meta property="og:title" content="channelAdminLogEventActionChangeLocation">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="The geogroup location 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?215" 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/channelAdminLogEventActionChangeLocation" >channelAdminLogEventActionChangeLocation</a></li></ul></div>
|
||||
<h1 id="dev_page_title">channelAdminLogEventActionChangeLocation</h1>
|
||||
|
||||
<div id="dev_page_content"><p>The geogroup location 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 133 <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="?layer=1">1 – Base layer</a></li><li><a href="?layer=2">2 – New userpic notifications</a></li><li><a href="?layer=3">3 – Send message can trigger link change</a></li><li><a href="?layer=4">4 – Check-in chats</a></li><li><a href="?layer=5">5 – Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 – Foursquare integration</a></li><li><a href="?layer=7">7 – Added wallPaperSolid</a></li><li><a href="?layer=8">8 – Added end-to-end encryption</a></li><li><a href="?layer=9">9 – Improved big files upload perfomance</a></li><li><a href="?layer=10">10 – Improved chat participants updates</a></li><li><a href="?layer=11">11 – Improved secret chats</a></li><li><a href="?layer=12">12 – New dynamic support</a></li><li><a href="?layer=13">13 – Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 – Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 – Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 – Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 – Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 – Added usernames</a></li><li><a href="?layer=23">23 – Stickers for secret chats</a></li><li><a href="?layer=105">105 – Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 – Login with QR code</a></li><li><a href="?layer=109">109 – Polls v2</a></li><li><a href="?layer=110">110 – People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 – Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 – Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 – PSA</a></li><li><a href="?layer=114">114 – Video thumbs for GIFs</a></li><li><a href="?layer=115">115 – Peek Channel Invite</a></li><li><a href="?layer=116">116 – Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 – WebRTC Phone Calls</a></li><li><a href="?layer=118">118 – Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 – Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 – Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121">121 – SVG-based Outlines for Stickers</a></li><li><a href="?layer=122">122 – Voice Chats</a></li><li><a href="?layer=123">123 – Voice Chat improvements</a></li><li><a href="?layer=124">124 – Expiring Invite links</a></li><li><a href="?layer=125">125 – Voice Chats in Broadcasts</a></li><li><a href="?layer=126">126 – Ban channels in channels</a></li><li><a href="?layer=127">127 – Payments in channels</a></li><li><a href="?layer=128">128 – Microthumbs for User/Chat profile photos</a></li><li><a href="?layer=129">129 – Video Chats</a></li><li><a href="?layer=130">130 – Custom placeholder for bot reply keyboards</a></li><li><a href="?layer=131">131 – Reset 2FA Password after a week</a></li><li><a href="?layer=132">132 – Chat themes</a></li><li><a href="?layer=133"><strong>133 – 64-bit IDs for User/Chat</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/channelAdminLogEventActionChangeLocation" class="current_page_link" >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>;</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/ChannelLocation">ChannelLocation</a></td>
|
||||
<td>Previous location</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>new_value</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/ChannelLocation">ChannelLocation</a></td>
|
||||
<td>New location</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?43"></script>
|
||||
|
||||
<script>backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,132 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>contacts.contactsNotModified</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Contact list on the server is the same as the list on the client.">
|
||||
<meta property="og:title" content="contacts.contactsNotModified">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Contact list on the server is the same as the list on the 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?215" 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/contacts.contactsNotModified" >contacts.contactsNotModified</a></li></ul></div>
|
||||
<h1 id="dev_page_title">contacts.contactsNotModified</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Contact list on the server is the same as the list on the client.</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 133 <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="?layer=1">1 – Base layer</a></li><li><a href="?layer=2">2 – New userpic notifications</a></li><li><a href="?layer=3">3 – Send message can trigger link change</a></li><li><a href="?layer=4">4 – Check-in chats</a></li><li><a href="?layer=5">5 – Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 – Foursquare integration</a></li><li><a href="?layer=7">7 – Added wallPaperSolid</a></li><li><a href="?layer=8">8 – Added end-to-end encryption</a></li><li><a href="?layer=9">9 – Improved big files upload perfomance</a></li><li><a href="?layer=10">10 – Improved chat participants updates</a></li><li><a href="?layer=11">11 – Improved secret chats</a></li><li><a href="?layer=12">12 – New dynamic support</a></li><li><a href="?layer=13">13 – Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 – Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 – Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 – Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 – Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 – Added usernames</a></li><li><a href="?layer=23">23 – Stickers for secret chats</a></li><li><a href="?layer=105">105 – Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 – Login with QR code</a></li><li><a href="?layer=109">109 – Polls v2</a></li><li><a href="?layer=110">110 – People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 – Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 – Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 – PSA</a></li><li><a href="?layer=114">114 – Video thumbs for GIFs</a></li><li><a href="?layer=115">115 – Peek Channel Invite</a></li><li><a href="?layer=116">116 – Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 – WebRTC Phone Calls</a></li><li><a href="?layer=118">118 – Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 – Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 – Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121">121 – SVG-based Outlines for Stickers</a></li><li><a href="?layer=122">122 – Voice Chats</a></li><li><a href="?layer=123">123 – Voice Chat improvements</a></li><li><a href="?layer=124">124 – Expiring Invite links</a></li><li><a href="?layer=125">125 – Voice Chats in Broadcasts</a></li><li><a href="?layer=126">126 – Ban channels in channels</a></li><li><a href="?layer=127">127 – Payments in channels</a></li><li><a href="?layer=128">128 – Microthumbs for User/Chat profile photos</a></li><li><a href="?layer=129">129 – Video Chats</a></li><li><a href="?layer=130">130 – Custom placeholder for bot reply keyboards</a></li><li><a href="?layer=131">131 – Reset 2FA Password after a week</a></li><li><a href="?layer=132">132 – Chat themes</a></li><li><a href="?layer=133"><strong>133 – 64-bit IDs for User/Chat</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/contacts.contactsNotModified" class="current_page_link" >contacts.contactsNotModified</a>#b74ba9d2 = <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>
|
||||
<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/contacts.Contacts">contacts.Contacts</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?43"></script>
|
||||
|
||||
<script>backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,174 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>decryptedMessageMediaAudio</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<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="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">
|
||||
|
||||
<link href="/css/telegram.css?215" 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/decryptedMessageMediaAudio" >decryptedMessageMediaAudio</a></li></ul></div>
|
||||
<h1 id="dev_page_title">decryptedMessageMediaAudio</h1>
|
||||
|
||||
<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">
|
||||
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 133 <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="?layer=1">1 – Base layer</a></li><li><a href="?layer=2">2 – New userpic notifications</a></li><li><a href="?layer=3">3 – Send message can trigger link change</a></li><li><a href="?layer=4">4 – Check-in chats</a></li><li><a href="?layer=5">5 – Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 – Foursquare integration</a></li><li><a href="?layer=7">7 – Added wallPaperSolid</a></li><li><a href="?layer=8">8 – Added end-to-end encryption</a></li><li><a href="?layer=9">9 – Improved big files upload perfomance</a></li><li><a href="?layer=10">10 – Improved chat participants updates</a></li><li><a href="?layer=11">11 – Improved secret chats</a></li><li><a href="?layer=12">12 – New dynamic support</a></li><li><a href="?layer=13">13 – Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 – Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 – Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 – Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 – Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 – Added usernames</a></li><li><a href="?layer=23">23 – Stickers for secret chats</a></li><li><a href="?layer=105">105 – Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 – Login with QR code</a></li><li><a href="?layer=109">109 – Polls v2</a></li><li><a href="?layer=110">110 – People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 – Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 – Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 – PSA</a></li><li><a href="?layer=114">114 – Video thumbs for GIFs</a></li><li><a href="?layer=115">115 – Peek Channel Invite</a></li><li><a href="?layer=116">116 – Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 – WebRTC Phone Calls</a></li><li><a href="?layer=118">118 – Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 – Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 – Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121">121 – SVG-based Outlines for Stickers</a></li><li><a href="?layer=122">122 – Voice Chats</a></li><li><a href="?layer=123">123 – Voice Chat improvements</a></li><li><a href="?layer=124">124 – Expiring Invite links</a></li><li><a href="?layer=125">125 – Voice Chats in Broadcasts</a></li><li><a href="?layer=126">126 – Ban channels in channels</a></li><li><a href="?layer=127">127 – Payments in channels</a></li><li><a href="?layer=128">128 – Microthumbs for User/Chat profile photos</a></li><li><a href="?layer=129">129 – Video Chats</a></li><li><a href="?layer=130">130 – Custom placeholder for bot reply keyboards</a></li><li><a href="?layer=131">131 – Reset 2FA Password after a week</a></li><li><a href="?layer=132">132 – Chat themes</a></li><li><a href="?layer=133"><strong>133 – 64-bit IDs for User/Chat</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/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>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th style="text-align: center;">Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><strong>duration</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/int">int</a></td>
|
||||
<td>Audio duration in seconds</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<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>size</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/int">int</a></td>
|
||||
<td>File 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 media file</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<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/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="#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 schema 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?43"></script>
|
||||
|
||||
<script>backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,132 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>inlineQueryPeerTypePM</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="The inline query was sent in a private chat">
|
||||
<meta property="og:title" content="inlineQueryPeerTypePM">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="The inline query was sent in a private 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?215" 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/inlineQueryPeerTypePM" >inlineQueryPeerTypePM</a></li></ul></div>
|
||||
<h1 id="dev_page_title">inlineQueryPeerTypePM</h1>
|
||||
|
||||
<div id="dev_page_content"><p>The inline query was sent in a private 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 133 <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="?layer=1">1 – Base layer</a></li><li><a href="?layer=2">2 – New userpic notifications</a></li><li><a href="?layer=3">3 – Send message can trigger link change</a></li><li><a href="?layer=4">4 – Check-in chats</a></li><li><a href="?layer=5">5 – Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 – Foursquare integration</a></li><li><a href="?layer=7">7 – Added wallPaperSolid</a></li><li><a href="?layer=8">8 – Added end-to-end encryption</a></li><li><a href="?layer=9">9 – Improved big files upload perfomance</a></li><li><a href="?layer=10">10 – Improved chat participants updates</a></li><li><a href="?layer=11">11 – Improved secret chats</a></li><li><a href="?layer=12">12 – New dynamic support</a></li><li><a href="?layer=13">13 – Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 – Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 – Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 – Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 – Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 – Added usernames</a></li><li><a href="?layer=23">23 – Stickers for secret chats</a></li><li><a href="?layer=105">105 – Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 – Login with QR code</a></li><li><a href="?layer=109">109 – Polls v2</a></li><li><a href="?layer=110">110 – People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 – Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 – Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 – PSA</a></li><li><a href="?layer=114">114 – Video thumbs for GIFs</a></li><li><a href="?layer=115">115 – Peek Channel Invite</a></li><li><a href="?layer=116">116 – Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 – WebRTC Phone Calls</a></li><li><a href="?layer=118">118 – Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 – Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 – Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121">121 – SVG-based Outlines for Stickers</a></li><li><a href="?layer=122">122 – Voice Chats</a></li><li><a href="?layer=123">123 – Voice Chat improvements</a></li><li><a href="?layer=124">124 – Expiring Invite links</a></li><li><a href="?layer=125">125 – Voice Chats in Broadcasts</a></li><li><a href="?layer=126">126 – Ban channels in channels</a></li><li><a href="?layer=127">127 – Payments in channels</a></li><li><a href="?layer=128">128 – Microthumbs for User/Chat profile photos</a></li><li><a href="?layer=129">129 – Video Chats</a></li><li><a href="?layer=130">130 – Custom placeholder for bot reply keyboards</a></li><li><a href="?layer=131">131 – Reset 2FA Password after a week</a></li><li><a href="?layer=132">132 – Chat themes</a></li><li><a href="?layer=133"><strong>133 – 64-bit IDs for User/Chat</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/inlineQueryPeerTypePM" class="current_page_link" >inlineQueryPeerTypePM</a>#833c0fac = <a href="/type/InlineQueryPeerType" >InlineQueryPeerType</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/InlineQueryPeerType">InlineQueryPeerType</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?43"></script>
|
||||
|
||||
<script>backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,165 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>inputFileLocation</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="DEPRECATED location of a photo">
|
||||
<meta property="og:title" content="inputFileLocation">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="DEPRECATED location of a photo">
|
||||
<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?215" 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/inputFileLocation" >inputFileLocation</a></li></ul></div>
|
||||
<h1 id="dev_page_title">inputFileLocation</h1>
|
||||
|
||||
<div id="dev_page_content"><p>DEPRECATED location of a photo</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 133 <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="?layer=1">1 – Base layer</a></li><li><a href="?layer=2">2 – New userpic notifications</a></li><li><a href="?layer=3">3 – Send message can trigger link change</a></li><li><a href="?layer=4">4 – Check-in chats</a></li><li><a href="?layer=5">5 – Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 – Foursquare integration</a></li><li><a href="?layer=7">7 – Added wallPaperSolid</a></li><li><a href="?layer=8">8 – Added end-to-end encryption</a></li><li><a href="?layer=9">9 – Improved big files upload perfomance</a></li><li><a href="?layer=10">10 – Improved chat participants updates</a></li><li><a href="?layer=11">11 – Improved secret chats</a></li><li><a href="?layer=12">12 – New dynamic support</a></li><li><a href="?layer=13">13 – Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 – Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 – Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 – Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 – Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 – Added usernames</a></li><li><a href="?layer=23">23 – Stickers for secret chats</a></li><li><a href="?layer=105">105 – Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 – Login with QR code</a></li><li><a href="?layer=109">109 – Polls v2</a></li><li><a href="?layer=110">110 – People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 – Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 – Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 – PSA</a></li><li><a href="?layer=114">114 – Video thumbs for GIFs</a></li><li><a href="?layer=115">115 – Peek Channel Invite</a></li><li><a href="?layer=116">116 – Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 – WebRTC Phone Calls</a></li><li><a href="?layer=118">118 – Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 – Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 – Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121">121 – SVG-based Outlines for Stickers</a></li><li><a href="?layer=122">122 – Voice Chats</a></li><li><a href="?layer=123">123 – Voice Chat improvements</a></li><li><a href="?layer=124">124 – Expiring Invite links</a></li><li><a href="?layer=125">125 – Voice Chats in Broadcasts</a></li><li><a href="?layer=126">126 – Ban channels in channels</a></li><li><a href="?layer=127">127 – Payments in channels</a></li><li><a href="?layer=128">128 – Microthumbs for User/Chat profile photos</a></li><li><a href="?layer=129">129 – Video Chats</a></li><li><a href="?layer=130">130 – Custom placeholder for bot reply keyboards</a></li><li><a href="?layer=131">131 – Reset 2FA Password after a week</a></li><li><a href="?layer=132">132 – Chat themes</a></li><li><a href="?layer=133"><strong>133 – 64-bit IDs for User/Chat</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/inputFileLocation" class="current_page_link" >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>;</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>volume_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 identifier</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>secret</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/long">long</a></td>
|
||||
<td>Check sum to access the file</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>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
|
||||
<p><a href="/type/InputFileLocation">InputFileLocation</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?43"></script>
|
||||
|
||||
<script>backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,176 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>inputKeyboardButtonUrlAuth</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Button to request a user to authorize via URL using Seamless Telegram Login.">
|
||||
<meta property="og:title" content="inputKeyboardButtonUrlAuth">
|
||||
<meta property="og:image" content="0532b90cbf289ffd85">
|
||||
<meta property="og:description" content="Button to request a user to authorize via URL using Seamless Telegram Login.">
|
||||
<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?215" 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/inputKeyboardButtonUrlAuth" >inputKeyboardButtonUrlAuth</a></li></ul></div>
|
||||
<h1 id="dev_page_title">inputKeyboardButtonUrlAuth</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Button to request a user to <a href="/method/messages.acceptUrlAuth">authorize</a> via URL using <a href="https://telegram.org/blog/privacy-discussions-web-bots#meet-seamless-web-bots">Seamless Telegram Login</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 133 <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="?layer=1">1 – Base layer</a></li><li><a href="?layer=2">2 – New userpic notifications</a></li><li><a href="?layer=3">3 – Send message can trigger link change</a></li><li><a href="?layer=4">4 – Check-in chats</a></li><li><a href="?layer=5">5 – Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 – Foursquare integration</a></li><li><a href="?layer=7">7 – Added wallPaperSolid</a></li><li><a href="?layer=8">8 – Added end-to-end encryption</a></li><li><a href="?layer=9">9 – Improved big files upload perfomance</a></li><li><a href="?layer=10">10 – Improved chat participants updates</a></li><li><a href="?layer=11">11 – Improved secret chats</a></li><li><a href="?layer=12">12 – New dynamic support</a></li><li><a href="?layer=13">13 – Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 – Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 – Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 – Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 – Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 – Added usernames</a></li><li><a href="?layer=23">23 – Stickers for secret chats</a></li><li><a href="?layer=105">105 – Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 – Login with QR code</a></li><li><a href="?layer=109">109 – Polls v2</a></li><li><a href="?layer=110">110 – People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 – Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 – Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 – PSA</a></li><li><a href="?layer=114">114 – Video thumbs for GIFs</a></li><li><a href="?layer=115">115 – Peek Channel Invite</a></li><li><a href="?layer=116">116 – Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 – WebRTC Phone Calls</a></li><li><a href="?layer=118">118 – Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 – Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 – Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121">121 – SVG-based Outlines for Stickers</a></li><li><a href="?layer=122">122 – Voice Chats</a></li><li><a href="?layer=123">123 – Voice Chat improvements</a></li><li><a href="?layer=124">124 – Expiring Invite links</a></li><li><a href="?layer=125">125 – Voice Chats in Broadcasts</a></li><li><a href="?layer=126">126 – Ban channels in channels</a></li><li><a href="?layer=127">127 – Payments in channels</a></li><li><a href="?layer=128">128 – Microthumbs for User/Chat profile photos</a></li><li><a href="?layer=129">129 – Video Chats</a></li><li><a href="?layer=130">130 – Custom placeholder for bot reply keyboards</a></li><li><a href="?layer=131">131 – Reset 2FA Password after a week</a></li><li><a href="?layer=132">132 – Chat themes</a></li><li><a href="?layer=133"><strong>133 – 64-bit IDs for User/Chat</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/inputKeyboardButtonUrlAuth" class="current_page_link" >inputKeyboardButtonUrlAuth</a>#d02e7fd4 flags:<a href="/type/%23" >#</a> request_write_access:flags.0?true 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>;</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>request_write_access</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.0?<a href="/constructor/true">true</a></td>
|
||||
<td>Set this flag to request the permission for your bot to send messages to the user.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>text</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/string">string</a></td>
|
||||
<td>Button text</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>fwd_text</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>New text of the button in forwarded messages.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>url</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/string">string</a></td>
|
||||
<td>An HTTP URL to be opened with user authorization data added to the query string when the button is pressed. If the user refuses to provide authorization data, the original URL without information about the user will be opened. The data added is the same as described in <a href="/widgets/login#receiving-authorization-data">Receiving authorization data</a>.<br>NOTE: You must always check the hash of the received data to verify the authentication and the integrity of the data as described in <a href="/widgets/login#checking-authorization">Checking authorization</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>bot</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/InputUser">InputUser</a></td>
|
||||
<td>Username of a bot, which will be used for user authorization. See <a href="/widgets/login#setting-up-a-bot">Setting up a bot</a> for more details. If not specified, the current bot's username will be assumed. The url's domain must be the same as the domain linked with the bot. See <a href="/widgets/login#linking-your-domain-to-the-bot">Linking your domain to the bot</a> for more details.</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>
|
||||
<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-login-widget" id="telegram-login-widget" name="telegram-login-widget"><i class="anchor-icon"></i></a><a href="/widgets/login">Telegram Login Widget</a></h4>
|
||||
<h4><a class="anchor" href="#messagesaccepturlauth" id="messagesaccepturlauth" name="messagesaccepturlauth"><i class="anchor-icon"></i></a><a href="/method/messages.acceptUrlAuth">messages.acceptUrlAuth</a></h4>
|
||||
<p>Use this to accept a Seamless Telegram Login authorization request, for more info <a href="/api/url-authorization">click here »</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?43"></script>
|
||||
|
||||
<script>backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -2,12 +2,12 @@
|
|||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>userEmpty</title>
|
||||
<title>inputMediaGeoPoint</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Empty constructor, non-existent user.">
|
||||
<meta property="og:title" content="userEmpty">
|
||||
<meta property="description" content="Map.">
|
||||
<meta property="og:title" content="inputMediaGeoPoint">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Empty constructor, non-existent user.">
|
||||
<meta property="og:description" content="Map.">
|
||||
<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/userEmpty" >userEmpty</a></li></ul></div>
|
||||
<h1 id="dev_page_title">userEmpty</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/inputMediaGeoPoint" >inputMediaGeoPoint</a></li></ul></div>
|
||||
<h1 id="dev_page_title">inputMediaGeoPoint</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Empty constructor, non-existent user.</p>
|
||||
<div id="dev_page_content"><p>Map.</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/userEmpty" class="current_page_link" >userEmpty</a>#d3bc4b7a id:<a href="/type/long" >long</a> = <a href="/type/User" >User</a>;</code></pre></p>
|
||||
<pre class="page_scheme"><code><a href="/constructor/inputMediaGeoPoint" class="current_page_link" >inputMediaGeoPoint</a>#f9c44144 geo_point:<a href="/type/InputGeoPoint" >InputGeoPoint</a> = <a href="/type/InputMedia" >InputMedia</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>id</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/long">long</a></td>
|
||||
<td>User identifier or <code>0</code></td>
|
||||
<td><strong>geo_point</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/InputGeoPoint">InputGeoPoint</a></td>
|
||||
<td>GeoPoint</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/User">User</a></p></div>
|
||||
<p><a href="/type/InputMedia">InputMedia</a></p></div>
|
||||
|
||||
</div>
|
||||
|
|
@ -2,12 +2,12 @@
|
|||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>privacyValueDisallowContacts</title>
|
||||
<title>inputReportReasonPornography</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Disallow only contacts">
|
||||
<meta property="og:title" content="privacyValueDisallowContacts">
|
||||
<meta property="description" content="Report for pornography">
|
||||
<meta property="og:title" content="inputReportReasonPornography">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Disallow only contacts">
|
||||
<meta property="og:description" content="Report for pornography">
|
||||
<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/privacyValueDisallowContacts" >privacyValueDisallowContacts</a></li></ul></div>
|
||||
<h1 id="dev_page_title">privacyValueDisallowContacts</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/inputReportReasonPornography" >inputReportReasonPornography</a></li></ul></div>
|
||||
<h1 id="dev_page_title">inputReportReasonPornography</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Disallow only contacts</p>
|
||||
<div id="dev_page_content"><p>Report for pornography</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/privacyValueDisallowContacts" class="current_page_link" >privacyValueDisallowContacts</a>#f888fa1a = <a href="/type/PrivacyRule" >PrivacyRule</a>;</code></pre></p>
|
||||
<pre class="page_scheme"><code><a href="/constructor/inputReportReasonPornography" class="current_page_link" >inputReportReasonPornography</a>#2e59d922 = <a href="/type/ReportReason" >ReportReason</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/PrivacyRule">PrivacyRule</a></p></div>
|
||||
<p><a href="/type/ReportReason">ReportReason</a></p></div>
|
||||
|
||||
</div>
|
||||
|
|
@ -1,152 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>messageActionInviteToGroupCall</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="A set of users was invited to the group call">
|
||||
<meta property="og:title" content="messageActionInviteToGroupCall">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="A set of users was invited to the group call">
|
||||
<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?215" 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/messageActionInviteToGroupCall" >messageActionInviteToGroupCall</a></li></ul></div>
|
||||
<h1 id="dev_page_title">messageActionInviteToGroupCall</h1>
|
||||
|
||||
<div id="dev_page_content"><p>A set of users was invited to the group call</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 133 <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="?layer=1">1 – Base layer</a></li><li><a href="?layer=2">2 – New userpic notifications</a></li><li><a href="?layer=3">3 – Send message can trigger link change</a></li><li><a href="?layer=4">4 – Check-in chats</a></li><li><a href="?layer=5">5 – Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 – Foursquare integration</a></li><li><a href="?layer=7">7 – Added wallPaperSolid</a></li><li><a href="?layer=8">8 – Added end-to-end encryption</a></li><li><a href="?layer=9">9 – Improved big files upload perfomance</a></li><li><a href="?layer=10">10 – Improved chat participants updates</a></li><li><a href="?layer=11">11 – Improved secret chats</a></li><li><a href="?layer=12">12 – New dynamic support</a></li><li><a href="?layer=13">13 – Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 – Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 – Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 – Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 – Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 – Added usernames</a></li><li><a href="?layer=23">23 – Stickers for secret chats</a></li><li><a href="?layer=105">105 – Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 – Login with QR code</a></li><li><a href="?layer=109">109 – Polls v2</a></li><li><a href="?layer=110">110 – People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 – Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 – Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 – PSA</a></li><li><a href="?layer=114">114 – Video thumbs for GIFs</a></li><li><a href="?layer=115">115 – Peek Channel Invite</a></li><li><a href="?layer=116">116 – Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 – WebRTC Phone Calls</a></li><li><a href="?layer=118">118 – Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 – Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 – Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121">121 – SVG-based Outlines for Stickers</a></li><li><a href="?layer=122">122 – Voice Chats</a></li><li><a href="?layer=123">123 – Voice Chat improvements</a></li><li><a href="?layer=124">124 – Expiring Invite links</a></li><li><a href="?layer=125">125 – Voice Chats in Broadcasts</a></li><li><a href="?layer=126">126 – Ban channels in channels</a></li><li><a href="?layer=127">127 – Payments in channels</a></li><li><a href="?layer=128">128 – Microthumbs for User/Chat profile photos</a></li><li><a href="?layer=129">129 – Video Chats</a></li><li><a href="?layer=130">130 – Custom placeholder for bot reply keyboards</a></li><li><a href="?layer=131">131 – Reset 2FA Password after a week</a></li><li><a href="?layer=132">132 – Chat themes</a></li><li><a href="?layer=133"><strong>133 – 64-bit IDs for User/Chat</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/messageActionInviteToGroupCall" class="current_page_link" >messageActionInviteToGroupCall</a>#502f92f7 call:<a href="/type/InputGroupCall" >InputGroupCall</a> users:<a href="/type/Vector%20t" >Vector</a><<a href="/type/long" >long</a>> = <a href="/type/MessageAction" >MessageAction</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>call</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/InputGroupCall">InputGroupCall</a></td>
|
||||
<td>The group call</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>users</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/Vector%20t">Vector</a><<a href="/type/long">long</a>></td>
|
||||
<td>The invited 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/MessageAction">MessageAction</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?43"></script>
|
||||
|
||||
<script>backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,179 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>messageActionPaymentSentMe</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="A user just sent a payment to me (a bot)">
|
||||
<meta property="og:title" content="messageActionPaymentSentMe">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="A user just sent a payment to me (a bot)">
|
||||
<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?215" 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/messageActionPaymentSentMe" >messageActionPaymentSentMe</a></li></ul></div>
|
||||
<h1 id="dev_page_title">messageActionPaymentSentMe</h1>
|
||||
|
||||
<div id="dev_page_content"><p>A user just sent a payment to me (a bot)</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 133 <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="?layer=1">1 – Base layer</a></li><li><a href="?layer=2">2 – New userpic notifications</a></li><li><a href="?layer=3">3 – Send message can trigger link change</a></li><li><a href="?layer=4">4 – Check-in chats</a></li><li><a href="?layer=5">5 – Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 – Foursquare integration</a></li><li><a href="?layer=7">7 – Added wallPaperSolid</a></li><li><a href="?layer=8">8 – Added end-to-end encryption</a></li><li><a href="?layer=9">9 – Improved big files upload perfomance</a></li><li><a href="?layer=10">10 – Improved chat participants updates</a></li><li><a href="?layer=11">11 – Improved secret chats</a></li><li><a href="?layer=12">12 – New dynamic support</a></li><li><a href="?layer=13">13 – Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 – Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 – Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 – Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 – Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 – Added usernames</a></li><li><a href="?layer=23">23 – Stickers for secret chats</a></li><li><a href="?layer=105">105 – Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 – Login with QR code</a></li><li><a href="?layer=109">109 – Polls v2</a></li><li><a href="?layer=110">110 – People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 – Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 – Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 – PSA</a></li><li><a href="?layer=114">114 – Video thumbs for GIFs</a></li><li><a href="?layer=115">115 – Peek Channel Invite</a></li><li><a href="?layer=116">116 – Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 – WebRTC Phone Calls</a></li><li><a href="?layer=118">118 – Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 – Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 – Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121">121 – SVG-based Outlines for Stickers</a></li><li><a href="?layer=122">122 – Voice Chats</a></li><li><a href="?layer=123">123 – Voice Chat improvements</a></li><li><a href="?layer=124">124 – Expiring Invite links</a></li><li><a href="?layer=125">125 – Voice Chats in Broadcasts</a></li><li><a href="?layer=126">126 – Ban channels in channels</a></li><li><a href="?layer=127">127 – Payments in channels</a></li><li><a href="?layer=128">128 – Microthumbs for User/Chat profile photos</a></li><li><a href="?layer=129">129 – Video Chats</a></li><li><a href="?layer=130">130 – Custom placeholder for bot reply keyboards</a></li><li><a href="?layer=131">131 – Reset 2FA Password after a week</a></li><li><a href="?layer=132">132 – Chat themes</a></li><li><a href="?layer=133"><strong>133 – 64-bit IDs for User/Chat</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/messageActionPaymentSentMe" class="current_page_link" >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>;</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>currency</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/string">string</a></td>
|
||||
<td>Three-letter ISO 4217 <a href="/bots/payments#supported-currencies">currency</a> code</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>total_amount</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/long">long</a></td>
|
||||
<td>Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of <code>US$ 1.45</code> pass <code>amount = 145</code>. See the exp parameter in <a href="/bots/payments/currencies.json">currencies.json</a>, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>payload</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/bytes">bytes</a></td>
|
||||
<td>Bot specified invoice payload</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>info</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.0?<a href="/type/PaymentRequestedInfo">PaymentRequestedInfo</a></td>
|
||||
<td>Order info provided by the user</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>shipping_option_id</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>Identifier of the shipping option chosen by the user</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>charge</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/PaymentCharge">PaymentCharge</a></td>
|
||||
<td>Provider payment identifier</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/MessageAction">MessageAction</a></p>
|
||||
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
|
||||
<h4><a class="anchor" href="#bot-payments-api" id="bot-payments-api" name="bot-payments-api"><i class="anchor-icon"></i></a><a href="/bots/payments">Bot Payments API</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?43"></script>
|
||||
|
||||
<script>backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,132 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>messages.allStickersNotModified</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Info about all installed stickers hasn't changed">
|
||||
<meta property="og:title" content="messages.allStickersNotModified">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Info about all installed stickers hasn't 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?215" 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/messages.allStickersNotModified" >messages.allStickersNotModified</a></li></ul></div>
|
||||
<h1 id="dev_page_title">messages.allStickersNotModified</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Info about all installed stickers hasn't 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 133 <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="?layer=1">1 – Base layer</a></li><li><a href="?layer=2">2 – New userpic notifications</a></li><li><a href="?layer=3">3 – Send message can trigger link change</a></li><li><a href="?layer=4">4 – Check-in chats</a></li><li><a href="?layer=5">5 – Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 – Foursquare integration</a></li><li><a href="?layer=7">7 – Added wallPaperSolid</a></li><li><a href="?layer=8">8 – Added end-to-end encryption</a></li><li><a href="?layer=9">9 – Improved big files upload perfomance</a></li><li><a href="?layer=10">10 – Improved chat participants updates</a></li><li><a href="?layer=11">11 – Improved secret chats</a></li><li><a href="?layer=12">12 – New dynamic support</a></li><li><a href="?layer=13">13 – Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 – Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 – Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 – Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 – Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 – Added usernames</a></li><li><a href="?layer=23">23 – Stickers for secret chats</a></li><li><a href="?layer=105">105 – Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 – Login with QR code</a></li><li><a href="?layer=109">109 – Polls v2</a></li><li><a href="?layer=110">110 – People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 – Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 – Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 – PSA</a></li><li><a href="?layer=114">114 – Video thumbs for GIFs</a></li><li><a href="?layer=115">115 – Peek Channel Invite</a></li><li><a href="?layer=116">116 – Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 – WebRTC Phone Calls</a></li><li><a href="?layer=118">118 – Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 – Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 – Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121">121 – SVG-based Outlines for Stickers</a></li><li><a href="?layer=122">122 – Voice Chats</a></li><li><a href="?layer=123">123 – Voice Chat improvements</a></li><li><a href="?layer=124">124 – Expiring Invite links</a></li><li><a href="?layer=125">125 – Voice Chats in Broadcasts</a></li><li><a href="?layer=126">126 – Ban channels in channels</a></li><li><a href="?layer=127">127 – Payments in channels</a></li><li><a href="?layer=128">128 – Microthumbs for User/Chat profile photos</a></li><li><a href="?layer=129">129 – Video Chats</a></li><li><a href="?layer=130">130 – Custom placeholder for bot reply keyboards</a></li><li><a href="?layer=131">131 – Reset 2FA Password after a week</a></li><li><a href="?layer=132">132 – Chat themes</a></li><li><a href="?layer=133"><strong>133 – 64-bit IDs for User/Chat</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/messages.allStickersNotModified" class="current_page_link" >messages.allStickersNotModified</a>#e86602c3 = <a href="/type/messages.AllStickers" >messages.AllStickers</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/messages.AllStickers">messages.AllStickers</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?43"></script>
|
||||
|
||||
<script>backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,152 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>messages.exportedChatInvite</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Info about a chat invite">
|
||||
<meta property="og:title" content="messages.exportedChatInvite">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Info about a chat invite">
|
||||
<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?215" 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/messages.exportedChatInvite" >messages.exportedChatInvite</a></li></ul></div>
|
||||
<h1 id="dev_page_title">messages.exportedChatInvite</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Info about a chat invite</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 133 <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="?layer=1">1 – Base layer</a></li><li><a href="?layer=2">2 – New userpic notifications</a></li><li><a href="?layer=3">3 – Send message can trigger link change</a></li><li><a href="?layer=4">4 – Check-in chats</a></li><li><a href="?layer=5">5 – Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 – Foursquare integration</a></li><li><a href="?layer=7">7 – Added wallPaperSolid</a></li><li><a href="?layer=8">8 – Added end-to-end encryption</a></li><li><a href="?layer=9">9 – Improved big files upload perfomance</a></li><li><a href="?layer=10">10 – Improved chat participants updates</a></li><li><a href="?layer=11">11 – Improved secret chats</a></li><li><a href="?layer=12">12 – New dynamic support</a></li><li><a href="?layer=13">13 – Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 – Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 – Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 – Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 – Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 – Added usernames</a></li><li><a href="?layer=23">23 – Stickers for secret chats</a></li><li><a href="?layer=105">105 – Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 – Login with QR code</a></li><li><a href="?layer=109">109 – Polls v2</a></li><li><a href="?layer=110">110 – People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 – Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 – Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 – PSA</a></li><li><a href="?layer=114">114 – Video thumbs for GIFs</a></li><li><a href="?layer=115">115 – Peek Channel Invite</a></li><li><a href="?layer=116">116 – Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 – WebRTC Phone Calls</a></li><li><a href="?layer=118">118 – Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 – Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 – Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121">121 – SVG-based Outlines for Stickers</a></li><li><a href="?layer=122">122 – Voice Chats</a></li><li><a href="?layer=123">123 – Voice Chat improvements</a></li><li><a href="?layer=124">124 – Expiring Invite links</a></li><li><a href="?layer=125">125 – Voice Chats in Broadcasts</a></li><li><a href="?layer=126">126 – Ban channels in channels</a></li><li><a href="?layer=127">127 – Payments in channels</a></li><li><a href="?layer=128">128 – Microthumbs for User/Chat profile photos</a></li><li><a href="?layer=129">129 – Video Chats</a></li><li><a href="?layer=130">130 – Custom placeholder for bot reply keyboards</a></li><li><a href="?layer=131">131 – Reset 2FA Password after a week</a></li><li><a href="?layer=132">132 – Chat themes</a></li><li><a href="?layer=133"><strong>133 – 64-bit IDs for User/Chat</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/messages.exportedChatInvite" class="current_page_link" >messages.exportedChatInvite</a>#1871be50 invite:<a href="/type/ExportedChatInvite" >ExportedChatInvite</a> users:<a href="/type/Vector%20t" >Vector</a><<a href="/type/User" >User</a>> = <a href="/type/messages.ExportedChatInvite" >messages.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>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th style="text-align: center;">Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><strong>invite</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/ExportedChatInvite">ExportedChatInvite</a></td>
|
||||
<td>Info about the chat invite</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>users</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/Vector%20t">Vector</a><<a href="/type/User">User</a>></td>
|
||||
<td>Mentioned 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.ExportedChatInvite">messages.ExportedChatInvite</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?43"></script>
|
||||
|
||||
<script>backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,182 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>peerNotifySettings</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Notification settings.">
|
||||
<meta property="og:title" content="peerNotifySettings">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Notification 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?215" 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/peerNotifySettings" >peerNotifySettings</a></li></ul></div>
|
||||
<h1 id="dev_page_title">peerNotifySettings</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Notification 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 133 <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="?layer=1">1 – Base layer</a></li><li><a href="?layer=2">2 – New userpic notifications</a></li><li><a href="?layer=3">3 – Send message can trigger link change</a></li><li><a href="?layer=4">4 – Check-in chats</a></li><li><a href="?layer=5">5 – Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 – Foursquare integration</a></li><li><a href="?layer=7">7 – Added wallPaperSolid</a></li><li><a href="?layer=8">8 – Added end-to-end encryption</a></li><li><a href="?layer=9">9 – Improved big files upload perfomance</a></li><li><a href="?layer=10">10 – Improved chat participants updates</a></li><li><a href="?layer=11">11 – Improved secret chats</a></li><li><a href="?layer=12">12 – New dynamic support</a></li><li><a href="?layer=13">13 – Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 – Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 – Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 – Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 – Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 – Added usernames</a></li><li><a href="?layer=23">23 – Stickers for secret chats</a></li><li><a href="?layer=105">105 – Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 – Login with QR code</a></li><li><a href="?layer=109">109 – Polls v2</a></li><li><a href="?layer=110">110 – People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 – Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 – Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 – PSA</a></li><li><a href="?layer=114">114 – Video thumbs for GIFs</a></li><li><a href="?layer=115">115 – Peek Channel Invite</a></li><li><a href="?layer=116">116 – Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 – WebRTC Phone Calls</a></li><li><a href="?layer=118">118 – Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 – Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 – Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121">121 – SVG-based Outlines for Stickers</a></li><li><a href="?layer=122">122 – Voice Chats</a></li><li><a href="?layer=123">123 – Voice Chat improvements</a></li><li><a href="?layer=124">124 – Expiring Invite links</a></li><li><a href="?layer=125">125 – Voice Chats in Broadcasts</a></li><li><a href="?layer=126">126 – Ban channels in channels</a></li><li><a href="?layer=127">127 – Payments in channels</a></li><li><a href="?layer=128">128 – Microthumbs for User/Chat profile photos</a></li><li><a href="?layer=129">129 – Video Chats</a></li><li><a href="?layer=130">130 – Custom placeholder for bot reply keyboards</a></li><li><a href="?layer=131">131 – Reset 2FA Password after a week</a></li><li><a href="?layer=132">132 – Chat themes</a></li><li><a href="?layer=133"><strong>133 – 64-bit IDs for User/Chat</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/peerNotifySettings" class="current_page_link" >peerNotifySettings</a>#af509d20 flags:<a href="/type/%23" >#</a> show_previews:flags.0?<a href="/type/Bool" >Bool</a> silent:flags.1?<a href="/type/Bool" >Bool</a> mute_until:flags.2?<a href="/type/int" >int</a> sound:flags.3?<a href="/type/string" >string</a> = <a href="/type/PeerNotifySettings" >PeerNotifySettings</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>show_previews</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>Display text in notifications</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>silent</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.1?<a href="/type/Bool">Bool</a></td>
|
||||
<td>Mute peer?</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>mute_until</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>Mute all notifications until this date</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>sound</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.3?<a href="/type/string">string</a></td>
|
||||
<td>Audio file name for notifications</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/PeerNotifySettings">PeerNotifySettings</a></p>
|
||||
<h3><a class="anchor" href="#event-flags-events-mask" id="event-flags-events-mask" name="event-flags-events-mask"><i class="anchor-icon"></i></a>Event flags (events_mask)</h3>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>0x00000001</code></td>
|
||||
<td>Profile photo update notification</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?43"></script>
|
||||
|
||||
<script>backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,132 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>secureValueTypeAddress</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Address">
|
||||
<meta property="og:title" content="secureValueTypeAddress">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Address">
|
||||
<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?215" 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/secureValueTypeAddress" >secureValueTypeAddress</a></li></ul></div>
|
||||
<h1 id="dev_page_title">secureValueTypeAddress</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Address</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 133 <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="?layer=1">1 – Base layer</a></li><li><a href="?layer=2">2 – New userpic notifications</a></li><li><a href="?layer=3">3 – Send message can trigger link change</a></li><li><a href="?layer=4">4 – Check-in chats</a></li><li><a href="?layer=5">5 – Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 – Foursquare integration</a></li><li><a href="?layer=7">7 – Added wallPaperSolid</a></li><li><a href="?layer=8">8 – Added end-to-end encryption</a></li><li><a href="?layer=9">9 – Improved big files upload perfomance</a></li><li><a href="?layer=10">10 – Improved chat participants updates</a></li><li><a href="?layer=11">11 – Improved secret chats</a></li><li><a href="?layer=12">12 – New dynamic support</a></li><li><a href="?layer=13">13 – Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 – Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 – Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 – Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 – Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 – Added usernames</a></li><li><a href="?layer=23">23 – Stickers for secret chats</a></li><li><a href="?layer=105">105 – Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 – Login with QR code</a></li><li><a href="?layer=109">109 – Polls v2</a></li><li><a href="?layer=110">110 – People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 – Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 – Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 – PSA</a></li><li><a href="?layer=114">114 – Video thumbs for GIFs</a></li><li><a href="?layer=115">115 – Peek Channel Invite</a></li><li><a href="?layer=116">116 – Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 – WebRTC Phone Calls</a></li><li><a href="?layer=118">118 – Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 – Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 – Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121">121 – SVG-based Outlines for Stickers</a></li><li><a href="?layer=122">122 – Voice Chats</a></li><li><a href="?layer=123">123 – Voice Chat improvements</a></li><li><a href="?layer=124">124 – Expiring Invite links</a></li><li><a href="?layer=125">125 – Voice Chats in Broadcasts</a></li><li><a href="?layer=126">126 – Ban channels in channels</a></li><li><a href="?layer=127">127 – Payments in channels</a></li><li><a href="?layer=128">128 – Microthumbs for User/Chat profile photos</a></li><li><a href="?layer=129">129 – Video Chats</a></li><li><a href="?layer=130">130 – Custom placeholder for bot reply keyboards</a></li><li><a href="?layer=131">131 – Reset 2FA Password after a week</a></li><li><a href="?layer=132">132 – Chat themes</a></li><li><a href="?layer=133"><strong>133 – 64-bit IDs for User/Chat</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/secureValueTypeAddress" class="current_page_link" >secureValueTypeAddress</a>#cbe31e26 = <a href="/type/SecureValueType" >SecureValueType</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/SecureValueType">SecureValueType</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?43"></script>
|
||||
|
||||
<script>backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,132 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>secureValueTypeTemporaryRegistration</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Temporary registration">
|
||||
<meta property="og:title" content="secureValueTypeTemporaryRegistration">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Temporary registration">
|
||||
<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?215" 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/secureValueTypeTemporaryRegistration" >secureValueTypeTemporaryRegistration</a></li></ul></div>
|
||||
<h1 id="dev_page_title">secureValueTypeTemporaryRegistration</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Temporary registration</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 133 <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="?layer=1">1 – Base layer</a></li><li><a href="?layer=2">2 – New userpic notifications</a></li><li><a href="?layer=3">3 – Send message can trigger link change</a></li><li><a href="?layer=4">4 – Check-in chats</a></li><li><a href="?layer=5">5 – Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 – Foursquare integration</a></li><li><a href="?layer=7">7 – Added wallPaperSolid</a></li><li><a href="?layer=8">8 – Added end-to-end encryption</a></li><li><a href="?layer=9">9 – Improved big files upload perfomance</a></li><li><a href="?layer=10">10 – Improved chat participants updates</a></li><li><a href="?layer=11">11 – Improved secret chats</a></li><li><a href="?layer=12">12 – New dynamic support</a></li><li><a href="?layer=13">13 – Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 – Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 – Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 – Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 – Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 – Added usernames</a></li><li><a href="?layer=23">23 – Stickers for secret chats</a></li><li><a href="?layer=105">105 – Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 – Login with QR code</a></li><li><a href="?layer=109">109 – Polls v2</a></li><li><a href="?layer=110">110 – People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 – Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 – Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 – PSA</a></li><li><a href="?layer=114">114 – Video thumbs for GIFs</a></li><li><a href="?layer=115">115 – Peek Channel Invite</a></li><li><a href="?layer=116">116 – Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 – WebRTC Phone Calls</a></li><li><a href="?layer=118">118 – Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 – Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 – Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121">121 – SVG-based Outlines for Stickers</a></li><li><a href="?layer=122">122 – Voice Chats</a></li><li><a href="?layer=123">123 – Voice Chat improvements</a></li><li><a href="?layer=124">124 – Expiring Invite links</a></li><li><a href="?layer=125">125 – Voice Chats in Broadcasts</a></li><li><a href="?layer=126">126 – Ban channels in channels</a></li><li><a href="?layer=127">127 – Payments in channels</a></li><li><a href="?layer=128">128 – Microthumbs for User/Chat profile photos</a></li><li><a href="?layer=129">129 – Video Chats</a></li><li><a href="?layer=130">130 – Custom placeholder for bot reply keyboards</a></li><li><a href="?layer=131">131 – Reset 2FA Password after a week</a></li><li><a href="?layer=132">132 – Chat themes</a></li><li><a href="?layer=133"><strong>133 – 64-bit IDs for User/Chat</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/secureValueTypeTemporaryRegistration" class="current_page_link" >secureValueTypeTemporaryRegistration</a>#ea02ec33 = <a href="/type/SecureValueType" >SecureValueType</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/SecureValueType">SecureValueType</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?43"></script>
|
||||
|
||||
<script>backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -2,12 +2,12 @@
|
|||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>textUnderline</title>
|
||||
<title>statsURL</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Underlined text">
|
||||
<meta property="og:title" content="textUnderline">
|
||||
<meta property="description" content="URL with chat statistics">
|
||||
<meta property="og:title" content="statsURL">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Underlined text">
|
||||
<meta property="og:description" content="URL with chat statistics">
|
||||
<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/textUnderline" >textUnderline</a></li></ul></div>
|
||||
<h1 id="dev_page_title">textUnderline</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/statsURL" >statsURL</a></li></ul></div>
|
||||
<h1 id="dev_page_title">statsURL</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Underlined text</p>
|
||||
<div id="dev_page_content"><p>URL with chat statistics</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/textUnderline" class="current_page_link" >textUnderline</a>#c12622c4 text:<a href="/type/RichText" >RichText</a> = <a href="/type/RichText" >RichText</a>;</code></pre></p>
|
||||
<pre class="page_scheme"><code><a href="/constructor/statsURL" class="current_page_link" >statsURL</a>#47a971e0 url:<a href="/type/string" >string</a> = <a href="/type/StatsURL" >StatsURL</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>text</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/RichText">RichText</a></td>
|
||||
<td>Text</td>
|
||||
<td><strong>url</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/string">string</a></td>
|
||||
<td>Chat statistics</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/RichText">RichText</a></p></div>
|
||||
<p><a href="/type/StatsURL">StatsURL</a></p></div>
|
||||
|
||||
</div>
|
||||
|
|
@ -2,12 +2,12 @@
|
|||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>langPackLanguage</title>
|
||||
<title>stickerSet</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Identifies a localization pack">
|
||||
<meta property="og:title" content="langPackLanguage">
|
||||
<meta property="description" content="Represents a stickerset (stickerpack)">
|
||||
<meta property="og:title" content="stickerSet">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Identifies a localization pack">
|
||||
<meta property="og:description" content="Represents a stickerset (stickerpack)">
|
||||
<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/langPackLanguage" >langPackLanguage</a></li></ul></div>
|
||||
<h1 id="dev_page_title">langPackLanguage</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/stickerSet" >stickerSet</a></li></ul></div>
|
||||
<h1 id="dev_page_title">stickerSet</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Identifies a localization pack</p>
|
||||
<div id="dev_page_content"><p>Represents a stickerset (stickerpack)</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/langPackLanguage" class="current_page_link" >langPackLanguage</a>#eeca5ce3 flags:<a href="/type/%23" >#</a> official:flags.0?true rtl:flags.2?true beta:flags.3?true name:<a href="/type/string" >string</a> native_name:<a href="/type/string" >string</a> lang_code:<a href="/type/string" >string</a> base_lang_code:flags.1?<a href="/type/string" >string</a> plural_code:<a href="/type/string" >string</a> strings_count:<a href="/type/int" >int</a> translated_count:<a href="/type/int" >int</a> translations_url:<a href="/type/string" >string</a> = <a href="/type/LangPackLanguage" >LangPackLanguage</a>;</code></pre></p>
|
||||
<pre class="page_scheme"><code><a href="/constructor/stickerSet" class="current_page_link" >stickerSet</a>#d7df217a flags:<a href="/type/%23" >#</a> archived:flags.1?true official:flags.2?true masks:flags.3?true animated:flags.5?true videos:flags.6?true installed_date:flags.0?<a href="/type/int" >int</a> id:<a href="/type/long" >long</a> access_hash:<a href="/type/long" >long</a> title:<a href="/type/string" >string</a> short_name:<a href="/type/string" >string</a> thumbs:flags.4?<a href="/type/Vector%20t" >Vector</a><<a href="/type/PhotoSize" >PhotoSize</a>> thumb_dc_id:flags.4?<a href="/type/int" >int</a> thumb_version:flags.4?<a href="/type/int" >int</a> count:<a href="/type/int" >int</a> hash:<a href="/type/int" >int</a> = <a href="/type/StickerSet" >StickerSet</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,64 +69,79 @@
|
|||
<td>Flags, see <a href="/mtproto/TL-combinators#conditional-fields">TL conditional fields</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>archived</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 stickerset was archived (due to too many saved stickers in the current account)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>official</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 language pack is official</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>rtl</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>Is this a localization pack for an RTL language</td>
|
||||
<td>Is this stickerset official</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>beta</strong></td>
|
||||
<td><strong>masks</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>Is this a beta localization pack?</td>
|
||||
<td>Is this a mask stickerset</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>name</strong></td>
|
||||
<td><strong>animated</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>Is this an animated stickerpack</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>installed_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>When was this stickerset installed</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>id</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/long">long</a></td>
|
||||
<td>ID of the stickerset</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>access_hash</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/long">long</a></td>
|
||||
<td>Access hash of stickerset</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>title</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/string">string</a></td>
|
||||
<td>Language name</td>
|
||||
<td>Title of stickerset</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>native_name</strong></td>
|
||||
<td><strong>short_name</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/string">string</a></td>
|
||||
<td>Language name in the language itself</td>
|
||||
<td>Short name of stickerset to use in <code>tg://addstickers?set=short_name</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>lang_code</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/string">string</a></td>
|
||||
<td>Language code (pack identifier)</td>
|
||||
<td><strong>thumbs</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.4?<a href="/type/Vector%20t">Vector</a><<a href="/type/PhotoSize">PhotoSize</a>></td>
|
||||
<td>Stickerset thumbnail</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>base_lang_code</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>Identifier of a base language pack; may be empty. If a string is missed in the language pack, then it should be fetched from base language pack. Unsupported in custom language packs</td>
|
||||
<td><strong>thumb_dc_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>DC ID of thumbnail</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>plural_code</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/string">string</a></td>
|
||||
<td>A language code to be used to apply plural forms. See <a href="https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html">https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html</a> for more info</td>
|
||||
<td><strong>thumb_version</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>Thumbnail version</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>strings_count</strong></td>
|
||||
<td><strong>count</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/int">int</a></td>
|
||||
<td>Total number of non-deleted strings from the language pack</td>
|
||||
<td>Number of stickers in pack</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>translated_count</strong></td>
|
||||
<td><strong>hash</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/int">int</a></td>
|
||||
<td>Total number of translated strings from the language pack</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>translations_url</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/string">string</a></td>
|
||||
<td>Link to language translation interface; empty for custom local language packs</td>
|
||||
<td>Hash</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/LangPackLanguage">LangPackLanguage</a></p></div>
|
||||
<p><a href="/type/StickerSet">StickerSet</a></p></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
@ -165,9 +180,9 @@
|
|||
</ul>
|
||||
</div>
|
||||
<div class="footer_column footer_column_platform">
|
||||
<h5><a href="//core.telegram.org/">Platform</a></h5>
|
||||
<h5><a href="/">Platform</a></h5>
|
||||
<ul>
|
||||
<li><a href="//core.telegram.org/api">API</a></li>
|
||||
<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>
|
||||
|
@ -184,7 +199,7 @@
|
|||
<h5><a href="//telegram.org/apps">Apps</a></h5>
|
||||
</div>
|
||||
<div class="footer_column">
|
||||
<h5><a href="//core.telegram.org/">Platform</a></h5>
|
||||
<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>
|
|
@ -2,12 +2,12 @@
|
|||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>topPeerCategoryForwardUsers</title>
|
||||
<title>topPeerCategoryCorrespondents</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Users to which the users often forwards messages to">
|
||||
<meta property="og:title" content="topPeerCategoryForwardUsers">
|
||||
<meta property="description" content="Users we've chatted most frequently with">
|
||||
<meta property="og:title" content="topPeerCategoryCorrespondents">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Users to which the users often forwards messages to">
|
||||
<meta property="og:description" content="Users we've chatted most frequently with">
|
||||
<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/topPeerCategoryForwardUsers" >topPeerCategoryForwardUsers</a></li></ul></div>
|
||||
<h1 id="dev_page_title">topPeerCategoryForwardUsers</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/topPeerCategoryCorrespondents" >topPeerCategoryCorrespondents</a></li></ul></div>
|
||||
<h1 id="dev_page_title">topPeerCategoryCorrespondents</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Users to which the users often forwards messages to</p>
|
||||
<div id="dev_page_content"><p>Users we've chatted most frequently with</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/topPeerCategoryForwardUsers" class="current_page_link" >topPeerCategoryForwardUsers</a>#a8406ca9 = <a href="/type/TopPeerCategory" >TopPeerCategory</a>;</code></pre></p>
|
||||
<pre class="page_scheme"><code><a href="/constructor/topPeerCategoryCorrespondents" class="current_page_link" >topPeerCategoryCorrespondents</a>#637b7ed = <a href="/type/TopPeerCategory" >TopPeerCategory</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>
|
|
@ -1,161 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>updateChannelTooLong</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="There are new updates in the specified channel, the client must fetch them. If the difference is too long or if the channel isn't currently in the states, start fetching from the specified pts.">
|
||||
<meta property="og:title" content="updateChannelTooLong">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="There are new updates in the specified channel, the client must fetch them. If the difference is too long or if the channel isn't currently in the states, start fetching from the specified pts.">
|
||||
<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?215" 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/updateChannelTooLong" >updateChannelTooLong</a></li></ul></div>
|
||||
<h1 id="dev_page_title">updateChannelTooLong</h1>
|
||||
|
||||
<div id="dev_page_content"><p>There are new updates in the specified channel, the client must fetch them.<br>
|
||||
If the difference is too long or if the channel isn't currently in the states, start fetching from the specified pts.</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 133 <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="?layer=1">1 – Base layer</a></li><li><a href="?layer=2">2 – New userpic notifications</a></li><li><a href="?layer=3">3 – Send message can trigger link change</a></li><li><a href="?layer=4">4 – Check-in chats</a></li><li><a href="?layer=5">5 – Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 – Foursquare integration</a></li><li><a href="?layer=7">7 – Added wallPaperSolid</a></li><li><a href="?layer=8">8 – Added end-to-end encryption</a></li><li><a href="?layer=9">9 – Improved big files upload perfomance</a></li><li><a href="?layer=10">10 – Improved chat participants updates</a></li><li><a href="?layer=11">11 – Improved secret chats</a></li><li><a href="?layer=12">12 – New dynamic support</a></li><li><a href="?layer=13">13 – Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 – Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 – Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 – Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 – Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 – Added usernames</a></li><li><a href="?layer=23">23 – Stickers for secret chats</a></li><li><a href="?layer=105">105 – Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 – Login with QR code</a></li><li><a href="?layer=109">109 – Polls v2</a></li><li><a href="?layer=110">110 – People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 – Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 – Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 – PSA</a></li><li><a href="?layer=114">114 – Video thumbs for GIFs</a></li><li><a href="?layer=115">115 – Peek Channel Invite</a></li><li><a href="?layer=116">116 – Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 – WebRTC Phone Calls</a></li><li><a href="?layer=118">118 – Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 – Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 – Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121">121 – SVG-based Outlines for Stickers</a></li><li><a href="?layer=122">122 – Voice Chats</a></li><li><a href="?layer=123">123 – Voice Chat improvements</a></li><li><a href="?layer=124">124 – Expiring Invite links</a></li><li><a href="?layer=125">125 – Voice Chats in Broadcasts</a></li><li><a href="?layer=126">126 – Ban channels in channels</a></li><li><a href="?layer=127">127 – Payments in channels</a></li><li><a href="?layer=128">128 – Microthumbs for User/Chat profile photos</a></li><li><a href="?layer=129">129 – Video Chats</a></li><li><a href="?layer=130">130 – Custom placeholder for bot reply keyboards</a></li><li><a href="?layer=131">131 – Reset 2FA Password after a week</a></li><li><a href="?layer=132">132 – Chat themes</a></li><li><a href="?layer=133"><strong>133 – 64-bit IDs for User/Chat</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/updateChannelTooLong" class="current_page_link" >updateChannelTooLong</a>#108d941f flags:<a href="/type/%23" >#</a> channel_id:<a href="/type/long" >long</a> pts:flags.0?<a href="/type/int" >int</a> = <a href="/type/Update" >Update</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>channel_id</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/long">long</a></td>
|
||||
<td>The channel</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>pts</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>The <a href="/api/updates">PTS</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>
|
||||
<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>
|
||||
|
||||
</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?43"></script>
|
||||
|
||||
<script>backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -2,12 +2,12 @@
|
|||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>photoSizeEmpty</title>
|
||||
<title>updateDialogFilterOrder</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Empty constructor. Image with this thumbnail is unavailable.">
|
||||
<meta property="og:title" content="photoSizeEmpty">
|
||||
<meta property="description" content="New folder order">
|
||||
<meta property="og:title" content="updateDialogFilterOrder">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Empty constructor. Image with this thumbnail is unavailable.">
|
||||
<meta property="og:description" content="New folder order">
|
||||
<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/photoSizeEmpty" >photoSizeEmpty</a></li></ul></div>
|
||||
<h1 id="dev_page_title">photoSizeEmpty</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/updateDialogFilterOrder" >updateDialogFilterOrder</a></li></ul></div>
|
||||
<h1 id="dev_page_title">updateDialogFilterOrder</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Empty constructor. Image with this thumbnail is unavailable.</p>
|
||||
<div id="dev_page_content"><p>New <a href="/api/folders">folder</a> order</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/photoSizeEmpty" class="current_page_link" >photoSizeEmpty</a>#e17e23c type:<a href="/type/string" >string</a> = <a href="/type/PhotoSize" >PhotoSize</a>;</code></pre></p>
|
||||
<pre class="page_scheme"><code><a href="/constructor/updateDialogFilterOrder" class="current_page_link" >updateDialogFilterOrder</a>#a5d72105 order:<a href="/type/Vector%20t" >Vector</a><<a href="/type/int" >int</a>> = <a href="/type/Update" >Update</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,17 +64,17 @@
|
|||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><strong>type</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/string">string</a></td>
|
||||
<td>Thumbnail type (see. <a href="/constructor/photoSize">photoSize</a>)</td>
|
||||
<td><strong>order</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/Vector%20t">Vector</a><<a href="/type/int">int</a>></td>
|
||||
<td>Ordered <a href="/api/folders">folder IDs</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/PhotoSize">PhotoSize</a></p>
|
||||
<p><a href="/type/Update">Update</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="#photosize" id="photosize" name="photosize"><i class="anchor-icon"></i></a><a href="/constructor/photoSize">photoSize</a></h4>
|
||||
<p>Image description.</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></div>
|
||||
|
||||
</div>
|
||||
|
|
@ -2,12 +2,12 @@
|
|||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>decryptedMessageActionDeleteMessages</title>
|
||||
<title>upload.file</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Deleted messages.">
|
||||
<meta property="og:title" content="decryptedMessageActionDeleteMessages">
|
||||
<meta property="description" content="File content.">
|
||||
<meta property="og:title" content="upload.file">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Deleted messages.">
|
||||
<meta property="og:description" content="File content.">
|
||||
<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/decryptedMessageActionDeleteMessages" >decryptedMessageActionDeleteMessages</a></li></ul></div>
|
||||
<h1 id="dev_page_title">decryptedMessageActionDeleteMessages</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/upload.file" >upload.file</a></li></ul></div>
|
||||
<h1 id="dev_page_title">upload.file</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Deleted messages.</p>
|
||||
<div id="dev_page_content"><p>File content.</p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
@ -52,8 +52,7 @@
|
|||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<pre class="page_scheme"><code>===8===
|
||||
<a href="/constructor/decryptedMessageActionDeleteMessages" class="current_page_link" >decryptedMessageActionDeleteMessages</a>#65614304 random_ids:<a href="/type/Vector%20t" >Vector</a><<a href="/type/long" >long</a>> = <a href="/type/DecryptedMessageAction" >DecryptedMessageAction</a>;</code></pre></p>
|
||||
<pre class="page_scheme"><code><a href="/constructor/upload.file" class="current_page_link" >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>;</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,14 +64,24 @@
|
|||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><strong>random_ids</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/Vector%20t">Vector</a><<a href="/type/long">long</a>></td>
|
||||
<td>List of deleted message IDs</td>
|
||||
<td><strong>type</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/storage.FileType">storage.FileType</a></td>
|
||||
<td>File type</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>mtime</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/int">int</a></td>
|
||||
<td>Modification type</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>bytes</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/bytes">bytes</a></td>
|
||||
<td>Binary data, file 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/DecryptedMessageAction">DecryptedMessageAction</a></p></div>
|
||||
<p><a href="/type/upload.File">upload.File</a></p></div>
|
||||
|
||||
</div>
|
||||
|
|
@ -1,237 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Telegram Cracking Contest Description</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="« Back to Contest Announcement
|
||||
The current round of the contest is over. Go to results »
|
||||
In this contest you assume the…">
|
||||
<meta property="og:title" content="Telegram Cracking Contest Description">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="« Back to Contest Announcement
|
||||
The current round of the contest is over. Go to results »
|
||||
In this contest you assume the…">
|
||||
<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?215" 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">Telegram Cracking Contest Description</h1>
|
||||
|
||||
<div id="dev_page_content"><p><a href="https://telegram.org/blog/cryptocontest"><strong>« Back to Contest Announcement</strong></a></p>
|
||||
<blockquote>
|
||||
<p>The current round of the contest is over. <a href="https://telegram.org/blog/cryptocontest-ends"><strong>Go to results »</strong></a></p>
|
||||
</blockquote>
|
||||
<p>In this contest you assume the role of a malicious entity in control of Telegram's servers. Your goal is to extract sensitive data (a secret email and password) from a conversation between two peers — Paul and Nick. They are represented by two virtual users that communicate via <a href="https://core.telegram.org/api/end-to-end">Secret Chats</a> in Telegram.</p>
|
||||
<p>Paul and Nick are both using clients that perform all the checks from <a href="/mtproto/security_guidelines">Telegram Security Guidelines</a> and compare their key visualizations over an independent channel as soon as a new Secret Chat is established. If any of these checks fails, they stop accepting messages in that Secret Chat. You control the entire process by sending commands to the Telegram user <code>@CryptoContest</code>, used as an interface for this contest. This enables contestants to try CPA, KPA, MITM and other kinds of active attacks and data tampering.</p>
|
||||
<h3><a class="anchor" name="protocol" href="#protocol"><i class="anchor-icon"></i></a>Protocol</h3>
|
||||
<p>The protocol used by Paul and Nick to establish Secret Сhats and exchange messages is identical to the one used for <a href="https://core.telegram.org/api/end-to-end">Secret Chats</a> in Telegram. Since we assume that the attacker is already in full control of the Telegram servers, basic MTProto encryption is bypassed altogether. In order to further simplify the task for contestants, we have removed irrelevant parameters, such as user_id and random_id.</p>
|
||||
<p>The following <a href="/mtproto/TL">TL</a> scheme is used to establish Secret Chats in this contest: </p>
|
||||
<pre><code>contest.dhConfig#01e00a51 g:int p:64*[int] random:64*[int] = contest.DhConfig;
|
||||
contest.requestEncryption#3a73a74c g_a:64*[int] = contest.Message;
|
||||
contest.acceptEncryption#068e4342 g_b:64*[int] fingerprint:int = contest.Message;
|
||||
contest.encryptedMessage#11a6d4b1 id:long message:string = contest.Message;
|
||||
---functions---
|
||||
contest.getDhConfig#369ee1a6 = contest.DhConfig;</code></pre>
|
||||
<p>For exchange of encrypted messages (see <a href="/api/end-to-end#sending-and-receiving-messages-in-a-secret-chat">documentation</a>), the up-to-date layer 17 scheme with <a href="/api/end-to-end/seq_no">sequence numbers</a> is used, but with plain text message support only.</p>
|
||||
<p>Each plaintext message is first created as a layer 17 <a href="/constructor/decryptedMessage">decryptedMessage</a>, then embedded in a <a href="/constructor/decryptedMessageLayer">decryptedMessageLayer</a> and encrypted as explained in the <a href="/api/end-to-end#serialization-and-encryption-of-outgoing-messages">Secret Chat documentation</a>. For the purpose of this contest, it is the result of this encryption <em>(ciphertext)</em> that is exchanged between the parties. </p>
|
||||
<p>Notice that sending messages in an actual Telegram Secret Chat involves further embedding of that <em>ciphertext</em> into an API call and an additional layer of <a href="/mtproto">MTProto</a> encryption for client-server interaction. This step is omitted here, since we assume the attacker to be in control of the Telegram servers, not just of the communication lines between the clients and Telegram servers.</p>
|
||||
<h3><a class="anchor" name="interface" href="#interface"><i class="anchor-icon"></i></a>Interface</h3>
|
||||
<p>To access the interface, find the Telegram user <code>@CryptoContest</code> using the Global Search by username in any of the <a href="https://telegram.org/apps">Telegram apps</a>. This is a special bot we created for this contest. You can control communication between Paul and Nick by sending <a href="#commands">particularly formed</a> text messages to this bot and processing automatically generated answers to these messages (you may find the unofficial <a href="https://github.com/vysheng/tg">Linux CLI</a> convenient for mass automated queries).</p>
|
||||
<p>You can create as many parallel Secret Chats between Paul and Nick as you like using the bot — each of them will have a separate <em>session_id</em>. All data is represented in hexadecimal format, with the exception of the <em>session_id</em>.</p>
|
||||
<h3><a class="anchor" name="commands" href="#commands"><i class="anchor-icon"></i></a>Commands</h3>
|
||||
<p>Below, <strong>A</strong> stands for the creator of the Secret Chat, <strong>B</strong> stands for the second party, <strong>S</strong> — the Telegram Server.</p>
|
||||
<p>Each Secret Chat session in this contest is divided in two phases: </p>
|
||||
<ul>
|
||||
<li><a href="#1-creating-a-secret-chat">Creating a Secret Chat</a></li>
|
||||
<li><a href="#2-sending-text-messages">Sending Encrypted Message</a></li>
|
||||
</ul>
|
||||
<h5><a class="anchor" name="1-creating-a-secret-chat" href="#1-creating-a-secret-chat"><i class="anchor-icon"></i></a>1. Creating a Secret Chat</h5>
|
||||
<p>In order to create a new Secret Chat, six messages need to be exchanged:</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><strong>Source</strong></th>
|
||||
<th><strong>Destination</strong></th>
|
||||
<th><strong>Message</strong></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>A</td>
|
||||
<td>S</td>
|
||||
<td>contest.getDhConfig</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>S</td>
|
||||
<td>A</td>
|
||||
<td>contest.DhConfig</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>A</td>
|
||||
<td>B</td>
|
||||
<td>contest.requestEncryption</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>B</td>
|
||||
<td>S</td>
|
||||
<td>contest.getDhConfig</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>S</td>
|
||||
<td>B</td>
|
||||
<td>contest.DhConfig</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>B</td>
|
||||
<td>A</td>
|
||||
<td>contest.acceptEncryption</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>To create a Secret Chat in this contest:</p>
|
||||
<ul>
|
||||
<li>Send the <strong>START</strong> command to the user <code>@CryptoContest</code> in Telegram. You'll get the <strong>getDhConfig</strong> query, sent by A to the Server, and the answer that the server would normally send to A. You shall also receive the new <em>session_id</em> as the first 32-bit integer. All further messages related to this particular session (Secret Chat instance) must be prefixed with this <em>session_id</em> in decimal form.</li>
|
||||
<li>After that, use the <strong>PASS</strong> command to pass the server's answer to A or <strong>ANSWER bytes</strong> to send a different answer instead. <strong>Bytes</strong> is represented by a string of an even number of hexadecimal digits. You'll receive the <strong>requestEncryption</strong> query as the result. </li>
|
||||
<li>After that, use the <strong>PASS</strong> command to pass this query to B or <strong>ANSWER bytes</strong> to arbitrarily change it. You‘ll receive B’s <strong>getDhConfig</strong> to the server as the result.</li>
|
||||
<li>As before, you can use either <strong>PASS</strong> or <strong>ANSWER bytes</strong>. You'll receive <strong>acceptEncryption</strong> as the result.</li>
|
||||
<li>As before, you can use either <strong>PASS</strong> or <strong>ANSWER bytes</strong>. You'll receive “Ok” as the result.</li>
|
||||
</ul>
|
||||
<p>You will receive an error text as the result after any of these steps in case the participating clients perceive that something went wrong. This can happen if a security check is failed, or in the case that the first 128 bits of the SHA-1 of the newly created encryption key don‘t match on both parties’ clients when this stage is completed (this corresponds to Paul and Nick comparing the key visualizations for the Secret Chat in their Telegram apps).</p>
|
||||
<p>If you obtain such an error, the session is failed and can no longer be used. You'll have to start new session. Note that the time to complete this phase is limited. Each step should not take longer than one hour, otherwise the Secret Chat will get cancelled.</p>
|
||||
<p>Example:</p>
|
||||
<pre><code>START
|
||||
15 a6e19e36 510ae00103000000c71caeb9c6b1c9048e6c522f70f13f73980d40238e3e21c14934d037563d930f48198a0aa7c14058229493d22530f4dbfa336f6e0ac925139543aed44cce7c3720fd51f69458705ac68cd4fe6b6b13abdc9746512969328454f18faf8c595f642477fe96bb2a941d5bcd1d4ac8cc49880708fa9b378e3c4f3a9060bee67cf9a4a4a695811051907e162753b56b0f6b410dba74d8a84b2a14b3144e0ef1284754fd17ed950d5965b4b9dd46582db1178d169c6bc465b0d6ff9ca3928fef5b9ae4e418fc15e83ebea0f87fa9ff5eed70050ded2849f47bf959d956850ce929851f0d8115f635b105ee2e4e15d04b2454bf6f4fadf034b10403119cd8e3b92fcc5b202d33053c2340fd84dd024e8012277e9c6442ad7cd09fe85955c13196e2d32861ad0d8f8139ce5870f1c3563fbff77428632897352abd91cd0a6497a0f64a33d87cd8b53470cf1bc6a052bba7d0121623e9611c0de83ffeb63b7d15831a70187093373cb20df5613bdfab12a54bbc6fff94598d95a8dcdb1374631b021e77c350261bca9ffc16c59b19d3041bee011a20b06fc9806d633b6b9cdd79cbb8b02fe8ef9dde29b6d31d80b030c69d67d6fc4a7edb33ffab532d085796cf3e7635fd42ee72ea24840082186fd40c3c45cf0acef886533d4de7468f88942a662d302928470aa8704529180a6aec2f877398efb91893cc9b549e5123d7269adfe7b6ee
|
||||
15 PASS
|
||||
15 4ca7733a1a7823b420111d8e86e3fe9a7cff9fc611ce339d6999fc3053973ef6c8276af841b53547fdebdcb057cbad16aff6178be3fb8747889937dec082c984227c974a19232b85ad85ef457521fcf17d5f697a17b7e62952306f0ed086deb1ebcff0c8a32787789fe7afaa4035c2d0e07c10db46c0df6930a1729d3607fb035154e90c02036318862c5a9537e87a55bc656e3fc53db08f41a07f834e4917ebaaace1214409ffb44c5a806a9cb4def209bfb8ab2e59f1cb6257e422f37dfab288170bdc5666e6a63d1b0447a7b935ad3bdac8d53f64278d433b45925c84dc60214473363d57a30e31324d9b3cc42fb56d375aac2d9d1af16331ad3a92b43a9d64e47813
|
||||
15 PASS
|
||||
15 a6e19e36 510ae00103000000c71caeb9c6b1c9048e6c522f70f13f73980d40238e3e21c14934d037563d930f48198a0aa7c14058229493d22530f4dbfa336f6e0ac925139543aed44cce7c3720fd51f69458705ac68cd4fe6b6b13abdc9746512969328454f18faf8c595f642477fe96bb2a941d5bcd1d4ac8cc49880708fa9b378e3c4f3a9060bee67cf9a4a4a695811051907e162753b56b0f6b410dba74d8a84b2a14b3144e0ef1284754fd17ed950d5965b4b9dd46582db1178d169c6bc465b0d6ff9ca3928fef5b9ae4e418fc15e83ebea0f87fa9ff5eed70050ded2849f47bf959d956850ce929851f0d8115f635b105ee2e4e15d04b2454bf6f4fadf034b10403119cd8e3b92fcc5b1ccd9c752428f0bca9ac9060bb85b8f90acb9374cd8d5a03110635f591a18f131cb7cc204407efec0687a8b77ba6c4e6732c35174e79e36aaa7fa6ab685257710e074065961ce1b16d21fed8a83cd95efcc4be7111cd33b5704fe759dfab21fc3e8aaa86d44609dc0b073354f8160c653f4fbde3ae7c28c87c3667e0797fac24b32e5c1a870cd898b2a9c517709bb0b8e4ee875ff857868eb56548e6dc993f198fd78c8a77cf997ed42a15f99a9b6265c7cf9bedc7580a11514047b881f717b233f3570ec21856bd2b9791e4c43b125e9260ac3fd48b9a10de5f9d5080e53d92d194adb796766684d905cca35e691fab0c76d6b5f49242f81eb92fcc8adc5a64
|
||||
15 ANSWER 510ae00103000000c71caeb9c6b1c9048e6c522f70f13f73980d40238e3e21c14934d037563d930f48198a0aa7c14058229493d22530f4dbfa336f6e0ac925139543aed44cce7c3720fd51f69458705ac68cd4fe6b6b13abdc9746512969328454f18faf8c595f642477fe96bb2a941d5bcd1d4ac8cc49880708fa9b378e3c4f3a9060bee67cf9a4a4a695811051907e162753b56b0f6b410dba74d8a84b2a14b3144e0ef1284754fd17ed950d5965b4b9dd46582db1178d169c6bc465b0d6ff9ca3928fef5b9ae4e418fc15e83ebea0f87fa9ff5eed70050ded2849f47bf959d956850ce929851f0d8115f635b105ee2e4e15d04b2454bf6f4fadf034b10403119cd8e3b92fcc5b1ccd9c752428f0bca9ac9060bb85b8f90acb9374cd8d5a03110635f591a18f131cb7cc204407efec0687a8b77ba6c4e6732c35174e79e36aaa7fa6ab685257710e074065961ce1b16d21fed8a83cd95efcc4be7111cd33b5704fe759dfab21fc3e8aaa86d44609dc0b073354f8160c653f4fbde3ae7c28c87c3667e0797fac24b32e5c1a870cd898b2a9c517709bb0b8e4ee875ff857868eb56548e6dc993f198fd78c8a77cf997ed42a15f99a9b6265c7cf9bedc7580a11514047b881f717b233f3570ec21856bd2b9791e4c43b125e9260ac3fd48b9a10de5f9d5080e53d92d194adb796766684d905cca35e691fab0c76d6b5f49242f81eb92fcc8ad00000
|
||||
15 42438e06bbb424bba5fd95122ec2f206c9b502f1f6d4e4fdbf74ed2c946ad60abaefd6fbd6a08e3ef418709d15bc557ef5e486a51d1e304f6c1e943faad948fde4e6273c0cad0df07068ad028fb01dc0fd7221aeed6ed5dc510dbe4824939036b0f3a45e740b40cef86a32f0b73b20234efc41d573f3e14efc08b3f65e9f7be52d5b930de52d41c7aadc4e0e85dfcf3bb1dd2e9cdf94fc236082879aea27207415cb846a5d5969e619040416a7f0f708f56a5b340a8fd0be1a26bfdc3de365a950532d363b427d6d905af7534af574ae8afd3f47658de5da3fa02dd818a31523122ff53dd31ffd7aa22e53cbf2da7772a1589e9a242f28f9cb1130f54553fcb355b3398fc877b80b3ef2cc3d
|
||||
15 PASS
|
||||
15 Ok</code></pre>
|
||||
<h5><a class="anchor" name="2-sending-text-messages" href="#2-sending-text-messages"><i class="anchor-icon"></i></a>2. Sending Text Messages</h5>
|
||||
<p>Once the Secret Chat has been established, you can use the following queries to make Paul and Nick exchange text messages inside the Secret Chat:</p>
|
||||
<ul>
|
||||
<li><strong>ASK [A|B]</strong> — asks A or B to send a random plaintext message to the other party. It is guaranteed that at least one of the first ten generated messages will contain the secret email and password that are the <a href="#objectives">goal</a> of this contest. It is also guaranteed that apart from that, all messages will contain only dictionary English words, spaces, line breaks and punctuation marks. The result to this query is the ciphertext corresponding to the randomly generated plaintext.</li>
|
||||
<li><strong>TXT [A|B] bytes</strong> — asks A or B to encrypt <strong>bytes</strong> as the (plaintext) contents of a text message and send it to the other party. Note that <strong>bytes</strong> can be any byte sequence, not necessarily a valid UTF-8 sequence. The result to this query is the ciphertext corresponding to the given plaintext.</li>
|
||||
<li><strong>MSG [A|B] bytes</strong> — send a specified (ciphertext) message (for example, obtained as an answer to an <strong>ASK</strong> or <strong>TXT</strong> query) to A or B. You will receive ‘Ok’ if this message was decrypted successfully and accepted by the client, or ‘Fail’ otherwise.</li>
|
||||
</ul>
|
||||
<p>Example:</p>
|
||||
<pre><code>15 ASK A
|
||||
15 b1d4a6119278722b0309a8c1fee80000c877b80b3ef2cc3dc92104de4322d8ae374fbf38758091fe4c86bafffa792f7eb37d8431cf8f868319c3af005791b7c55f788e260b8fa6a96b6808d0d448abfdb49913160c5355ef2d4e439a676055e42de6b26dd7d0e06e3fb48981208449658aff63fd8262ef0669f8bb242ade401e1190d2f54f3896ac17c1b796cbe185d5b0166649d5bac25e4626c08c78527458fc7877ee2add14a8e7b1f9b56651b8264284aa2fd28de55f96bcec8075dd43bbc69f6c05c2428795e51a081e3995e4ede72d190d55d0b30d8215bf4ed13fde7c8f578993050280ec4a940e910eb182bd335e52e2a699d9b5
|
||||
15 MSG B b1d4a6119278722b0309a8c1fee80000c877b80b3ef2cc3dc92104de4322d8ae374fbf38758091fe4c86bafffa792f7eb37d8431cf8f868319c3af005791b7c55f788e260b8fa6a96b6808d0d448abfdb49913160c5355ef2d4e439a676055e42de6b26dd7d0e06e3fb48981208449658aff63fd8262ef0669f8bb242ade401e1190d2f54f3896ac17c1b796cbe185d5b0166649d5bac25e4626c08c78527458fc7877ee2add14a8e7b1f9b56651b8264284aa2fd28de55f96bcec8075dd43bbc69f6c05c2428795e51a081e3995e4ede72d190d55d0b30d8215bf4ed13fde7c8f578993050280ec4a940e910eb182bd335e52e2a699d9b0
|
||||
15 Fail
|
||||
15 MSG B b1d4a6119278722b0309a8c1fee80000c877b80b3ef2cc3dc92104de4322d8ae374fbf38758091fe4c86bafffa792f7eb37d8431cf8f868319c3af005791b7c55f788e260b8fa6a96b6808d0d448abfdb49913160c5355ef2d4e439a676055e42de6b26dd7d0e06e3fb48981208449658aff63fd8262ef0669f8bb242ade401e1190d2f54f3896ac17c1b796cbe185d5b0166649d5bac25e4626c08c78527458fc7877ee2add14a8e7b1f9b56651b8264284aa2fd28de55f96bcec8075dd43bbc69f6c05c2428795e51a081e3995e4ede72d190d55d0b30d8215bf4ed13fde7c8f578993050280ec4a940e910eb182bd335e52e2a699d9b5
|
||||
15 Ok
|
||||
15 TXT B abac
|
||||
15 b1d4a61101771d42f62323e6fe680000c877b80b3ef2cc3df751e68b935b083a6f5c15ba8d95b94388fc34453a1e7b9b20222402b7698be5dd8a6ff69a5141b01ca2488b0dada8f2b0e47980218f48912168ddd2cebd3b61b1edf2f557c7ec44768595ce1cb42a01f7c14dd4e6e6e7601cb17ab0b6d5a274</code></pre>
|
||||
<hr>
|
||||
<h3><a class="anchor" name="objectives" href="#objectives"><i class="anchor-icon"></i></a>Objectives</h3>
|
||||
<p>We are offering a <strong>$300,000</strong> reward to the first person to break Telegram's encryption protocol in this contest.</p>
|
||||
<p>Your goal is to extract a secret email address from one of the random messages that are exchanged between Nick and Paul when you use the <strong>ASK</strong> command. It is guaranteed that at least one of the first ten generated messages within a session will contain the secret address. It is also guaranteed that apart from that, all messages will contain only dictionary English words, spaces, line breaks and punctuation marks.</p>
|
||||
<p>Once you have the address, you will need to send an email to it. That email must contain:<br>- The entire text of the message that contained the secret email.<br>- Session logs for the successful attempt with your user_id.<br>- A detailed explanation of the attack on the protocol.<br>- Your bank account details to receive the $300,000 prize.</p>
|
||||
<h4><a class="anchor" name="decrypting-messages" href="#decrypting-messages"><i class="anchor-icon"></i></a>Decrypting messages</h4>
|
||||
<p>To prove that the competition was fair, we will add a command that returns the keys used for a particular session by its <em>session_id</em> at the end of the contest. This will be done as soon as a winner is announced, or on February 4, 2015 in case no winner is announced to that date.</p>
|
||||
<h4><a class="anchor" name="bonus-objective" href="#bonus-objective"><i class="anchor-icon"></i></a>Bonus objective</h4>
|
||||
<p>We are also offering an independent <strong>$100,000</strong> reward to the first person to make the bot accept a ciphertext message (i.e. the first person to send a message using <strong>MSG [A|B] bytes</strong> and receive the result ‘OK’), provided that that ciphertext deciphers to a plaintext that was never encrypted by the bot itself within this session.</p>
|
||||
<p>Should you succeed at this, kindly send an email to security@telegram.org and include the following:<br>- Session logs for the successful attempt with your user_id.<br>- A detailed explanation of the attack on the protocol.<br>- Your bank account details to receive the $100,000 prize.</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?43"></script>
|
||||
|
||||
<script>backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
3274
data/core.telegram.org/css/bootstrap-extra.css
vendored
3274
data/core.telegram.org/css/bootstrap-extra.css
vendored
File diff suppressed because it is too large
Load diff
|
@ -1,105 +0,0 @@
|
|||
.widget-accent-colors {
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
justify-content: space-between;
|
||||
max-width: 480px;
|
||||
margin: 3px 0 0;
|
||||
}
|
||||
.widget-accent-colors .widget-accent-color-item {
|
||||
position: relative;
|
||||
flex-basis: 42px;
|
||||
font-weight: normal;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
.widget-accent-color-item input.radio {
|
||||
position: absolute;
|
||||
left: -5000px;
|
||||
}
|
||||
.widget-accent-color-item input.radio + .widget-color-circle:after {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
display: inline-block;
|
||||
content: '';
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 50%;
|
||||
vertical-align: top;
|
||||
background: url('data:image/svg+xml,%3Csvg height="15" viewBox="0 0 18 15" width="18" xmlns="http://www.w3.org/2000/svg"%3E%3Cg fill="%23fff" fill-rule="evenodd"%3E%3Crect height="8" rx="1.472727" transform="matrix(.70710678 -.70710678 .70710678 .70710678 -5.753048 6.110913)" width="3" x="3" y="6"/%3E%3Crect height="3" rx="1.472727" transform="matrix(.70710678 -.70710678 .70710678 .70710678 -2.081475 9.974874)" width="16" x="3" y="6"/%3E%3C/g%3E%3C/svg%3E') no-repeat center 11px;
|
||||
transition: transform 0.12s linear;
|
||||
transform: scale3d(0, 0, 1);
|
||||
}
|
||||
.widget-accent-color-item input.radio + .widget-color-circle.bordered,
|
||||
.widget-accent-color-item input.radio:checked + .widget-color-circle-custom.bordered {
|
||||
box-shadow: inset 0 0 0 1px #eaeaea;
|
||||
}
|
||||
.widget-accent-color-item input.radio + .widget-color-circle-custom.bordered {
|
||||
border: none;
|
||||
}
|
||||
.widget-accent-color-item input.radio + .widget-color-circle.light:after {
|
||||
background-image: url('data:image/svg+xml,%3Csvg height="15" viewBox="0 0 18 15" width="18" xmlns="http://www.w3.org/2000/svg"%3E%3Cg fill="%2315202b" fill-rule="evenodd"%3E%3Crect height="8" rx="1.472727" transform="matrix(.70710678 -.70710678 .70710678 .70710678 -5.753048 6.110913)" width="3" x="3" y="6"/%3E%3Crect height="3" rx="1.472727" transform="matrix(.70710678 -.70710678 .70710678 .70710678 -2.081475 9.974874)" width="16" x="3" y="6"/%3E%3C/g%3E%3C/svg%3E');
|
||||
}
|
||||
.widget-accent-color-item input.radio:checked + .widget-color-circle:after {
|
||||
transform: scale3d(1, 1, 1);
|
||||
}
|
||||
.widget-color-circle {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
border-radius: 50%;
|
||||
background-color: #319BE6;
|
||||
transition: background-color 0.12s ease, box-shadow 0.12s ease;
|
||||
}
|
||||
.widget-color-circle-custom {
|
||||
background-color: #F5F5F5;
|
||||
color: #F5F5F5;
|
||||
}
|
||||
.widget-accent-color-item input.radio + .widget-color-circle-custom:before {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
display: inline-block;
|
||||
content: '';
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
vertical-align: top;
|
||||
background: url('data:image/svg+xml,%3Csvg height="14" viewBox="0 0 15 14" width="15" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath d="m3.9468491 8.55631162c-1.3103539 0-2.36810946 1.04207749-2.36810946 2.33300928 0 1.0187474-.91566899 1.5553396-1.57873964 1.5553396.72622023.9487571 1.96553085 1.5553395 3.15747928 1.5553395 1.7445073 0 3.15747928-1.3920289 3.15747928-3.1106791 0-1.29093179-1.05775556-2.33300928-2.36810946-2.33300928zm10.8222602-7.28676572-1.0577555-1.04207749c-.3078543-.30329121-.8051572-.30329121-1.1130115 0l-7.07275356 6.96792112 2.170767 2.13859186 7.07275356-6.96792112c.3078543-.30329121.3078543-.79322316 0-1.09651437z" fill="%23bdbdbd"/%3E%3C/svg%3E') no-repeat center;
|
||||
transition: opacity 0.12s ease;
|
||||
}
|
||||
.widget-color-label {
|
||||
font-size: 12px;
|
||||
line-height: 14px;
|
||||
margin-top: 8px;
|
||||
color: #333;
|
||||
}
|
||||
.widget-color-label-custom {
|
||||
transition: opacity 0.12s ease;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
}
|
||||
.widget-accent-color-field-item {
|
||||
transition: all .2s ease;
|
||||
opacity: 0;
|
||||
}
|
||||
.widget-accent-color-field-item input.widget-accent-color-field {
|
||||
font-size: 12px !important;
|
||||
line-height: 14px !important;
|
||||
text-transform: uppercase;
|
||||
position: relative;
|
||||
text-align: center;
|
||||
margin-top: 3px !important;
|
||||
padding: 5px 0 !important;
|
||||
color: #222 !important;
|
||||
width: 52px !important;
|
||||
}
|
||||
.widget-accent-color-item input.radio:checked ~ .widget-accent-color-field-item {
|
||||
opacity: 1;
|
||||
}
|
||||
.widget-accent-color-item input.radio:checked ~ .widget-color-circle-custom {
|
||||
background-color: currentColor !important;
|
||||
}
|
||||
.widget-accent-color-item input.radio:checked + .widget-color-circle-custom:before,
|
||||
.widget-accent-color-item input.radio:checked ~ .widget-color-label-custom {
|
||||
opacity: 0;
|
||||
}
|
|
@ -1,246 +0,0 @@
|
|||
.telegram-passport-wrap {
|
||||
overflow: hidden;
|
||||
}
|
||||
.telegram-passport-form {
|
||||
position: relative;
|
||||
}
|
||||
.telegram-passport-form .control-label {
|
||||
line-height: 20px;
|
||||
padding-top: 11px;
|
||||
}
|
||||
.telegram-passport-header {
|
||||
font-size: 18px;
|
||||
line-height: 27px;
|
||||
}
|
||||
.telegram-passport-greeting {
|
||||
margin-right: 10px;
|
||||
}
|
||||
.telegram-passport-greeting a,
|
||||
.telegram-passport-greeting a:hover {
|
||||
color: inherit;
|
||||
}
|
||||
.telegram-passport-logout {
|
||||
font-size: 16px;
|
||||
font-weight: normal;
|
||||
}
|
||||
.telegram-passport-login-wrap {
|
||||
margin: 10px 0 50px;
|
||||
text-align: center;
|
||||
}
|
||||
.telegram-passport-relogin-wrap {
|
||||
margin: 10px 0 50px;
|
||||
text-align: center;
|
||||
}
|
||||
.telegram-passport-pending {
|
||||
padding: 20px 0 40px;
|
||||
text-align: center;
|
||||
}
|
||||
.telegram-passport-block-header,
|
||||
.telegram-passport-item {
|
||||
border-bottom: 1px solid #e7e7e7;
|
||||
}
|
||||
.telegram-passport-block-header,
|
||||
.telegram-passport-item-name,
|
||||
.telegram-passport-item-value {
|
||||
padding: 15px 0;
|
||||
line-height: 20px;
|
||||
}
|
||||
.telegram-passport-block-header {
|
||||
margin: 25px 0 0;
|
||||
}
|
||||
.telegram-passport-item-name {
|
||||
margin-right: 15px;
|
||||
margin-bottom: -5px;
|
||||
padding-bottom: 0;
|
||||
float: left;
|
||||
}
|
||||
.telegram-passport-item-files,
|
||||
.telegram-passport-item-value {
|
||||
clear: left;
|
||||
font-weight: bold;
|
||||
}
|
||||
.telegram-passport-item-value {
|
||||
transition: color .12s linear;
|
||||
}
|
||||
.telegram-passport-item-files {
|
||||
padding: 6px 0;
|
||||
}
|
||||
.telegram-passport-item-file {
|
||||
padding: 6px 0;
|
||||
min-height: 60px;
|
||||
}
|
||||
.telegram-passport-item .telegram-passport-checkbox-right .checkbox-input {
|
||||
margin: 0;
|
||||
}
|
||||
.telegram-passport-item .telegram-passport-checkbox-right {
|
||||
float: right;
|
||||
margin: 40px -5px 10px;
|
||||
padding: 5px;
|
||||
}
|
||||
.telegram-passport-item-files .checkbox-item-block {
|
||||
margin: 6px 0;
|
||||
}
|
||||
.telegram-passport-item-file .telegram-passport-checkbox-right {
|
||||
margin: 9px -5px;
|
||||
}
|
||||
.telegram-passport-scan-thumb {
|
||||
display: inline-block;
|
||||
width: 64px;
|
||||
height: 48px;
|
||||
background: #f7f7f7 no-repeat center;
|
||||
background-size: cover;
|
||||
float: left;
|
||||
border-radius: 3px;
|
||||
margin-right: 15px;
|
||||
}
|
||||
.telegram-passport-scan-name {
|
||||
display: inline-block;
|
||||
font-size: 14px;
|
||||
padding: 3px 0 0;
|
||||
transition: color .12s linear;
|
||||
color: #2e87ca;
|
||||
}
|
||||
.telegram-passport-scan-size {
|
||||
font-size: 13px;
|
||||
padding: 1px 0 0;
|
||||
font-weight: normal;
|
||||
transition: color .12s linear;
|
||||
color: #999;
|
||||
}
|
||||
.telegram-passport-item-value,
|
||||
.telegram-passport-scan-info {
|
||||
margin-right: 42px;
|
||||
}
|
||||
.telegram-passport-item .checkbox-item-block .checkbox-label {
|
||||
transition: color .12s linear;
|
||||
}
|
||||
.telegram-passport-item.item-rejected .telegram-passport-item-value,
|
||||
.telegram-passport-item-file.item-rejected .telegram-passport-scan-name,
|
||||
.telegram-passport-item-file.item-rejected .telegram-passport-scan-size,
|
||||
.telegram-passport-item .checkbox-item-block.item-rejected .checkbox-label {
|
||||
color: #c93c3c;
|
||||
}
|
||||
|
||||
.telegram-passport-item .checkbox-item-block .checkbox-input-icon:before {
|
||||
border-color: #eb5454;
|
||||
background-color: #eb5454;
|
||||
background-position: -3px -119px;
|
||||
}
|
||||
.telegram-passport-item .checkbox-item-block input.checkbox:checked + .checkbox-input .ripple {
|
||||
background-color: rgba(235, 84, 84, .2);
|
||||
}
|
||||
.telegram-passport-errors-wrap {
|
||||
text-align: right;
|
||||
margin: 20px 16px 0;
|
||||
}
|
||||
.btn.telegram-passport-errors {
|
||||
font-size: 15px;
|
||||
font-weight: 500;
|
||||
line-height: 20px;
|
||||
border-radius: 6px;
|
||||
background-color: transparent;
|
||||
padding: 8px 16px 10px;
|
||||
margin: 4px -16px;
|
||||
border: none;
|
||||
color: #c93c3c;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
.btn.telegram-passport-errors:hover {
|
||||
background-color: #f7e3e3;
|
||||
}
|
||||
.btn.telegram-passport-errors:focus {
|
||||
outline: none;
|
||||
}
|
||||
.btn.telegram-passport-errors:active {
|
||||
box-shadow: none;
|
||||
}
|
||||
.telegram-passport-errors-icon {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
width: 18px;
|
||||
height: 19px;
|
||||
margin: 1px 12px 0 0;
|
||||
background: url(/img/passport_bug.png) no-repeat 0 0;
|
||||
}
|
||||
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
|
||||
.telegram-passport-errors-icon {
|
||||
background-image: url(/img/passport_bug_2x.png);
|
||||
background-size: 18px 19px;
|
||||
}
|
||||
}
|
||||
.telegram-passport-errors-sent {
|
||||
font-size: 14px;
|
||||
line-height: 20px;
|
||||
padding: 13px 24px 0 0;
|
||||
color: #999;
|
||||
transition: opacity .12s linear;
|
||||
opacity: 0;
|
||||
}
|
||||
.telegram-passport-errors-sent.shown {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.telegram-passport-login-wrap {
|
||||
text-align: left;
|
||||
}
|
||||
.telegram-passport-relogin-wrap {
|
||||
text-align: left;
|
||||
margin: 50px 0 50px 240px;
|
||||
}
|
||||
.telegram-passport-item-files,
|
||||
.telegram-passport-item-value {
|
||||
clear: none;
|
||||
margin-left: 240px;
|
||||
}
|
||||
.telegram-passport-item .telegram-passport-checkbox-right {
|
||||
margin-top: 10px;
|
||||
}
|
||||
.telegram-passport-item-file .telegram-passport-checkbox-right {
|
||||
margin: 9px -5px;
|
||||
}
|
||||
.telegram-passport-errors-wrap {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
margin: 50px 0 0;
|
||||
}
|
||||
}
|
||||
|
||||
.telegram-passport-form .sub-control-label {
|
||||
text-align: left;
|
||||
margin: 11px 0 6px;
|
||||
}
|
||||
.telegram-passport-form .sub-control-label .radio-label {
|
||||
font-weight: bold;
|
||||
}
|
||||
.telegram-passport-form .sub-control-label .radio-item + .radio-item,
|
||||
.telegram-passport-form .sub-control-label .checkbox-item + .checkbox-item {
|
||||
margin-left: 25px;
|
||||
}
|
||||
.telegram-passport-form label.control-label .radio-label {
|
||||
font-weight: bold;
|
||||
}
|
||||
.passport-opt,
|
||||
.passport-opt-col {
|
||||
display: inline-block;
|
||||
margin-left: 31px;
|
||||
margin-top: -10px;
|
||||
}
|
||||
.passport-opt + .passport-opt,
|
||||
.passport-opt-col + .passport-opt-col {
|
||||
margin-left: 0;
|
||||
}
|
||||
@media (min-width: 992px) {
|
||||
.passport-opt-col {
|
||||
margin-left: 0;
|
||||
margin-top: 0;
|
||||
text-align: center;
|
||||
}
|
||||
.passport-opt-col .checkbox-label {
|
||||
text-align: left;
|
||||
}
|
||||
.passport-opt-col .checkbox-item input.checkbox ~ .checkbox-label {
|
||||
display: none;
|
||||
}
|
||||
}
|
24
data/core.telegram.org/getProxyConfig.html
Normal file
24
data/core.telegram.org/getProxyConfig.html
Normal file
|
@ -0,0 +1,24 @@
|
|||
# force_probability 10 10
|
||||
default 2;
|
||||
proxy_for 1 149.154.X.X:8888;
|
||||
proxy_for -1 149.154.X.X:8888;
|
||||
proxy_for 2 149.154.X.X:8888;
|
||||
proxy_for -2 149.154.X.X:8888;
|
||||
proxy_for 3 149.154.X.X:8888;
|
||||
proxy_for -3 149.154.X.X:8888;
|
||||
proxy_for 4 91.108.X.X:8888;
|
||||
proxy_for 4 91.108.X.X:8888;
|
||||
proxy_for 4 91.108.X.X:8888;
|
||||
proxy_for 4 91.108.X.X:8888;
|
||||
proxy_for 4 91.108.X.X:8888;
|
||||
proxy_for 4 91.108.X.X:8888;
|
||||
proxy_for 4 91.108.X.X:8888;
|
||||
proxy_for 4 91.108.X.X:8888;
|
||||
proxy_for 4 91.108.X.X:8888;
|
||||
proxy_for 4 91.108.X.X:8888;
|
||||
proxy_for -4 149.154.X.X:8888;
|
||||
proxy_for -4 149.154.X.X:8888;
|
||||
proxy_for 5 91.108.X.X:8888;
|
||||
proxy_for 5 91.108.X.X:8888;
|
||||
proxy_for -5 91.108.X.X:8888;
|
||||
proxy_for -5 91.108.X.X:8888;
|
159
data/core.telegram.org/import-stickers.html
Normal file
159
data/core.telegram.org/import-stickers.html
Normal file
|
@ -0,0 +1,159 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Importing Stickers to Telegram</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="The easiest way to create stickers on Telegram is to simply upload them using the @stickers bot. This bot can help you upload…">
|
||||
<meta property="og:title" content="Importing Stickers to Telegram">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="The easiest way to create stickers on Telegram is to simply upload them using the @stickers bot. This bot can help you upload…">
|
||||
<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?215" 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">Importing Stickers to Telegram</h1>
|
||||
|
||||
<div id="dev_page_content"><p>The easiest way to create stickers on Telegram is to simply upload them using the <a href="https://t.me/stickers">@stickers</a> bot. This bot can help you <strong>upload new stickers</strong>, <strong>create sticker packs</strong> and get <strong>usage stats</strong> for your stickers and packs.</p>
|
||||
<p>Telegram also offers a platform for developers of apps that <strong>help</strong> users <strong>make their own stickers</strong>. For example, apps that allow people to upload pictures of themselves and turn them into stickers.</p>
|
||||
<h3><a class="anchor" name="who-is-this-for" href="#who-is-this-for"><i class="anchor-icon"></i></a>Who is this for?</h3>
|
||||
<p><strong>USE this:</strong></p>
|
||||
<ul>
|
||||
<li>To help people <strong>make</strong> their own <strong>unique custom stickers</strong>.</li>
|
||||
<li>To help people <strong>migrate</strong> their unique custom stickers they created <strong>from another platform</strong>.</li>
|
||||
</ul>
|
||||
<p><strong>DON'T use this:</strong></p>
|
||||
<ul>
|
||||
<li>To share stickers you uploaded with other Telegram users.</li>
|
||||
<li>Instead, just upload your stickers using the <a href="https://t.me/stickers">@stickers</a> bot and <strong>share the link</strong> of your pack (e.g. <a href="https://t.me/addstickers/UtyaDuck"><a href="https://t.me/addstickers/UtyaDuck">https://t.me/addstickers/UtyaDuck</a></a>).</li>
|
||||
</ul>
|
||||
<p>In short, if a set of stickers is <strong>already available on Telegram</strong> – there's <strong>no need</strong> to import it!</p>
|
||||
<h3><a class="anchor" name="sticker-importing-apps" href="#sticker-importing-apps"><i class="anchor-icon"></i></a>Sticker Importing Apps</h3>
|
||||
<p>As of <a href="https://telegram.org/blog/animated-backgrounds#importing-stickers">version 7.8</a>, Telegram apps support a simple API for importing stickers.</p>
|
||||
<div class="blog_video_player_wrap" style="max-width: 400px; margin: 20px auto 20px;">
|
||||
<video class="blog_video_player tl_blog_vid_autoplay" onclick="videoTogglePlay(this)" autoplay loop controls muted poster="/file/464001267/2/U7MtqT21q4E.76558/a7a73d214c36478ed3" style="max-width: 400px;" title="Think outside the fox." alt="Importing stickers to Telegram">
|
||||
<source src="/file/464001715/1/YPZWHRfqpXI.3577036.mp4/bb24535cb655a57cd7" type="video/mp4">
|
||||
</video>
|
||||
</div>
|
||||
|
||||
<blockquote>
|
||||
<p><strong>WARNING:</strong> Each time a user imports stickers, a <strong>new sticker pack</strong> is created on Telegram. <strong>Do not use</strong> the importing feature to share stickers you made with <em>other</em> users. If you want to share your stickers, simply upload them using <a href="https://t.me/stickers">@stickers</a> and share the <strong>link</strong> of your pack. For example, here's a link to install some <a href="https://t.me/addstickers/UtyaDuck">Duck Stickers</a>.</p>
|
||||
</blockquote>
|
||||
<h3><a class="anchor" name="importing-sdks" href="#importing-sdks"><i class="anchor-icon"></i></a>Importing SDKs</h3>
|
||||
<p>We have created libraries and sample apps for <a href="https://github.com/TelegramMessenger/TelegramStickersImport">iOS</a> and <a href="https://github.com/DrKLO/TelegramStickersImport">Android</a> which you can use to implement importing stickers to Telegram from your app.</p>
|
||||
<h3><a class="anchor" name="sticker-formats" href="#sticker-formats"><i class="anchor-icon"></i></a>Sticker Formats</h3>
|
||||
<p>Telegram apps support two sticker types. Regardless of the type, each sticker must be associated with <strong>at least one emoji</strong> that expresses the emotion corresponding to the sticker.</p>
|
||||
<h4><a class="anchor" name="animated-stickers" href="#animated-stickers"><i class="anchor-icon"></i></a>Animated Stickers</h4>
|
||||
<p>Must be in <strong>TGS</strong> format, created using the <a href="https://github.com/TelegramMessenger/bodymovin-extension">Bodymovin-TG plugin for Adobe After Effects</a>.</p>
|
||||
<blockquote>
|
||||
<p><strong>Note:</strong> Animated <em>.WEBP</em> is <strong>NOT</strong> currently supported, only static <em>.WEBP</em> is supported for <a href="#static-stickers">static stickers</a>. Animated stickers must be in <strong>.TGS</strong> format. You can also import <strong>.WEBM</strong> <a href="#video-stickers">video stickers</a>.</p>
|
||||
</blockquote>
|
||||
<p>Max. size: <strong>64 KB</strong><br>Dimensions: <strong>512x512 px</strong><br>FPS: <strong>30-60 FPS</strong><br>Max. duration: <strong>3 seconds</strong></p>
|
||||
<blockquote>
|
||||
<p>For full technical details on Telegram animated stickers, see <a href="https://core.telegram.org/stickers#animated-stickers">this page</a>.</p>
|
||||
</blockquote>
|
||||
<h4><a class="anchor" name="video-stickers" href="#video-stickers"><i class="anchor-icon"></i></a>Video Stickers</h4>
|
||||
<p>Must be in <strong>WEBM</strong> format with <a href="https://core.telegram.org/stickers/webm-vp9-encoding">VP9 and alpha channel encoding</a> (transparency is a temporary requirement).</p>
|
||||
<p>Max. size: <strong>256 KB</strong><br>Max. dimensions: <strong>512x512 px</strong>, at least one side of the image must be 512px.<br>FPS: <strong>30</strong><br>Max. duration: <strong>3 seconds</strong></p>
|
||||
<h4><a class="anchor" name="static-stickers" href="#static-stickers"><i class="anchor-icon"></i></a>Static Stickers</h4>
|
||||
<p>Must be in <strong>PNG</strong> or <strong>WEBP</strong> format with a <strong>transparent layer</strong>. All static stickers should use <strong>white stroke</strong> and <strong>shadow</strong>, exactly like in this example: <a href="https://telegram.org/img/StickerExample.psd">StickerExample.psd</a></p>
|
||||
<p>Max. size: <strong>512 KB</strong><br>Max. dimensions: <strong>512x512 px</strong>, at least one side of the image must be 512px.</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?43"></script>
|
||||
|
||||
<script>backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,279 +0,0 @@
|
|||
function fixColor(color) {
|
||||
color = color.toUpperCase();
|
||||
if (color.length == 1 || color.length == 2) {
|
||||
color = color + color + color;
|
||||
} else if (color.length > 3 && color.length < 6) {
|
||||
color = color.substr(0, 3);
|
||||
} else if (color.length > 6) {
|
||||
color = color.substr(0, 6);
|
||||
}
|
||||
return color;
|
||||
}
|
||||
|
||||
function isColorLight(color, k) {
|
||||
var hsl = rgb2hsl(color);
|
||||
if (typeof k === 'undefined') k = 0.8;
|
||||
if (k > 0) return (hsl.l > k);
|
||||
return (hsl.l < (1 + k));
|
||||
}
|
||||
|
||||
function rgb2hsl(rgb) {
|
||||
rgb = fixColor(rgb);
|
||||
if (rgb.length == 3) {
|
||||
rgb = rgb[0] + rgb[0] + rgb[1] + rgb[1] + rgb[2] + rgb[2];
|
||||
}
|
||||
var r = parseInt(rgb.substr(0, 2), 16);
|
||||
var g = parseInt(rgb.substr(2, 2), 16);
|
||||
var b = parseInt(rgb.substr(4, 2), 16);
|
||||
r /= 255; g /= 255; b /= 255;
|
||||
var max = Math.max(r, g, b),
|
||||
min = Math.min(r, g, b);
|
||||
var h, s, l = (max + min) / 2;
|
||||
if (max == min) {
|
||||
h = s = 0; // achromatic
|
||||
} else {
|
||||
var d = max - min;
|
||||
s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
|
||||
switch (max) {
|
||||
case r: h = (g - b) / d + (g < b ? 6 : 0); break;
|
||||
case g: h = (b - r) / d + 2; break;
|
||||
case b: h = (r - g) / d + 4; break;
|
||||
}
|
||||
h /= 6;
|
||||
}
|
||||
return {h: h, s: s, l: l};
|
||||
}
|
||||
|
||||
var PostWidget = {
|
||||
options: {},
|
||||
init: function(options) {
|
||||
var form = $('#post_widget_config').get(0);
|
||||
if (!form) return;
|
||||
PostWidget.options = options || {};
|
||||
$('.form-telegram input.form-control[type="text"]').on('change blur', function() {
|
||||
PostWidget.update();
|
||||
});
|
||||
$('.form-telegram input.radio, .form-telegram input.checkbox').on('change', function() {
|
||||
var is_dark = (this.getAttribute('name') == 'dark');
|
||||
PostWidget.update(is_dark);
|
||||
});
|
||||
$('.widget-accent-color-item input.radio').on('change', function() {
|
||||
if (this.value == 'custom') {
|
||||
$('.widget-accent-color-field').select();
|
||||
}
|
||||
PostWidget.update();
|
||||
});
|
||||
$('.widget-accent-color-field').on('input', function() {
|
||||
var val = this.value;
|
||||
this.value = val.toUpperCase().replace(/[^0-9A-F]+/g, '');
|
||||
var color = fixColor(this.value);
|
||||
$('.widget-color-circle-custom').css('color', color ? '#' + color : '').toggleClass('light', isColorLight(color)).toggleClass('bordered', isColorLight(color, 0.95));
|
||||
});
|
||||
$('.widget-accent-color-field').on('focus', function() {
|
||||
$('.widget-accent-color-item .radio[value="custom"]').prop('checked', true);
|
||||
PostWidget.update();
|
||||
});
|
||||
PostWidget.update();
|
||||
initRipple();
|
||||
},
|
||||
update: function(toggle_dark) {
|
||||
var options = PostWidget.options || {};
|
||||
var form = $('#post_widget_config').get(0);
|
||||
if (!form) return;
|
||||
var tfi = $('#post_link').parents('.textfield-item');
|
||||
var post_link = $('#post_link').val() || options.default_link,
|
||||
match;
|
||||
if (match = post_link.match(/^(?:(?:https?):\/\/)?(?:t\.me|telegram\.me|telegram\.dog)\/([a-zA-Z0-9_]+\/\d+)(?:\?(.*))?$/i)) {
|
||||
var post_id = match[1], suffix = match[2] || '';
|
||||
var querystring = suffix.split('#')[0];
|
||||
var str_values = querystring.split('&');
|
||||
var query = {};
|
||||
for (var i = 0; i < str_values.length; i++) {
|
||||
var key_value = str_values[i].split('=');
|
||||
var key = decodeURIComponent(key_value[0]);
|
||||
var value = key_value.length > 1 ? decodeURIComponent(key_value[1]) : null;
|
||||
query[key] = value;
|
||||
}
|
||||
var single = typeof query.single !== 'undefined';
|
||||
var comment_id = parseInt(query.comment);
|
||||
} else {
|
||||
tfi.addClass('is-invalid');
|
||||
$('#post_link_error').html(options.link_error);
|
||||
$('#post_link').one('input', function() {
|
||||
tfi.removeClass('is-invalid');
|
||||
});
|
||||
return;
|
||||
}
|
||||
tfi.removeClass('is-invalid');
|
||||
var width = form.width.value;
|
||||
if (!width) width = '100%';
|
||||
var author_photo = form.author_photo.value;
|
||||
var dark = form.dark.checked;
|
||||
var dark_colors = {};
|
||||
$('.widget-accent-color-item[data-color]').each(function() {
|
||||
var color = $(this).attr('data-color');
|
||||
var dark_color = $(this).attr('data-dark-color');
|
||||
var bg_color = $(this).attr(dark ? 'data-dark-color' : 'data-bg-color');
|
||||
var text = $(this).attr(dark ? 'data-dark-text' : 'data-text');
|
||||
var cur_color = dark && dark_color ? dark_color : color;
|
||||
dark_colors[color] = dark_color;
|
||||
$('.widget-color-circle', this).css('backgroundColor', '#' + bg_color).toggleClass('light', isColorLight(cur_color)).toggleClass('bordered', isColorLight(cur_color, 0.95));
|
||||
if (text) {
|
||||
$('.widget-color-label', this).text(text);
|
||||
}
|
||||
});
|
||||
var color = form.color.value;
|
||||
var dark_color = '';
|
||||
var customcolor = form.customcolor.value;
|
||||
if (color == 'default') {
|
||||
color = '';
|
||||
dark_color = '';
|
||||
} else if (color == 'custom') {
|
||||
color = fixColor(customcolor);
|
||||
if (color != customcolor) {
|
||||
form.customcolor.value = color;
|
||||
$('.widget-color-circle-custom').css('color', color ? '#' + color : '').toggleClass('light', isColorLight(color)).toggleClass('bordered', isColorLight(color, 0.95));
|
||||
}
|
||||
dark_color = color;
|
||||
} else {
|
||||
dark_color = dark_colors[color] || color;
|
||||
}
|
||||
if (!color) {
|
||||
color = '';
|
||||
dark_color = '';
|
||||
$('.widget-accent-color-item .radio[value="default"]').prop('checked', true);
|
||||
var custom_default = form.customcolor.defaultValue;
|
||||
form.customcolor.value = custom_default;
|
||||
$('.widget-color-circle-custom').css('color', custom_default ? '#' + custom_default : '').toggleClass('light', isColorLight(custom_default)).toggleClass('bordered', isColorLight(custom_default, 0.95));
|
||||
}
|
||||
var code = '<script async src="' + options.widget_script + '" data-telegram-post="' + escapeHTML(post_id) + '"' + (comment_id ? ' data-comment="' + comment_id + '"' : '') + ' data-width="' + escapeHTML(width) + '"' + (author_photo ? ' data-userpic="' + author_photo + '"' : '') + (single ? ' data-single' : '') + (color ? ' data-color="' + color + '"' : '') + (dark ? ' data-dark="1"' : '') + (dark_color && dark_color != color ? ' data-dark-color="' + dark_color + '"' : '') + '></script>';
|
||||
$('#embed_code').val(code);
|
||||
$('#embed_code').height(0);
|
||||
$('#embed_code').height($('#embed_code').get(0).scrollHeight);
|
||||
if (PostWidget.lastCode != code) {
|
||||
PostWidget.lastCode = code;
|
||||
$('#widget_container').toggleClass('dark', !!dark);
|
||||
if (toggle_dark) {
|
||||
var frame = $('#widget_container iframe').get(0);
|
||||
Telegram.setWidgetOptions({dark: dark}, frame);
|
||||
} else {
|
||||
$('#widget_container').html(code);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var DiscussionWidget = {
|
||||
options: {},
|
||||
init: function(options) {
|
||||
var form = $('#discussion_widget_config').get(0);
|
||||
if (!form) return;
|
||||
DiscussionWidget.options = options || {};
|
||||
$('.form-telegram input.form-control[type="text"]').on('change blur', function() {
|
||||
DiscussionWidget.update();
|
||||
});
|
||||
$('.form-telegram input.checkbox').on('change', function() {
|
||||
var is_dark = (this.getAttribute('name') == 'dark');
|
||||
DiscussionWidget.update(is_dark);
|
||||
});
|
||||
$('.widget-accent-color-item input.radio').on('change', function() {
|
||||
if (this.value == 'custom') {
|
||||
$('.widget-accent-color-field').select();
|
||||
}
|
||||
DiscussionWidget.update();
|
||||
});
|
||||
$('.widget-accent-color-field').on('input', function() {
|
||||
var val = this.value;
|
||||
this.value = val.toUpperCase().replace(/[^0-9A-F]+/g, '');
|
||||
var color = fixColor(this.value);
|
||||
$('.widget-color-circle-custom').css('color', color ? '#' + color : '').toggleClass('light', isColorLight(color)).toggleClass('bordered', isColorLight(color, 0.95));
|
||||
});
|
||||
$('.widget-accent-color-field').on('focus', function() {
|
||||
$('.widget-accent-color-item .radio[value="custom"]').prop('checked', true);
|
||||
DiscussionWidget.update();
|
||||
});
|
||||
DiscussionWidget.update();
|
||||
initRipple();
|
||||
},
|
||||
update: function(toggle_dark) {
|
||||
var options = DiscussionWidget.options || {};
|
||||
var form = $('#discussion_widget_config').get(0);
|
||||
if (!form) return;
|
||||
var tfi = $('#post_link').parents('.textfield-item');
|
||||
var post_link = $('#post_link').val() || options.default_link,
|
||||
match;
|
||||
var post_full_id = '', post_id = 0;
|
||||
if (match = post_link.match(/^(?:(?:https?):\/\/)?(?:t\.me|telegram\.me|telegram\.dog)\/([a-zA-Z0-9_]+(\/\d+)?)/i)) {
|
||||
post_full_id = match[1];
|
||||
post_id = match[2] || 0;
|
||||
} else {
|
||||
tfi.addClass('is-invalid');
|
||||
$('#post_link_error').html(options.link_error);
|
||||
$('#post_link').one('input', function() {
|
||||
tfi.removeClass('is-invalid');
|
||||
});
|
||||
return;
|
||||
}
|
||||
$('.canonical-helper', form).toggleClass('hide', !!post_id);
|
||||
tfi.removeClass('is-invalid');
|
||||
var limit = parseInt(form.comments_limit.value) || 5;
|
||||
var real_limit = Math.max(3, Math.min(50, limit));
|
||||
form.comments_limit.value = real_limit;
|
||||
var height = parseInt(form.height.value) || 0;
|
||||
var real_height = height > 0 ? Math.max(300, height) : 0;
|
||||
form.height.value = real_height || '';
|
||||
var dark = form.dark.checked;
|
||||
var dark_colors = {};
|
||||
$('.widget-accent-color-item[data-color]').each(function() {
|
||||
var color = $(this).attr('data-color');
|
||||
var dark_color = $(this).attr('data-dark-color');
|
||||
var bg_color = $(this).attr(dark ? 'data-dark-color' : 'data-bg-color');
|
||||
var text = $(this).attr(dark ? 'data-dark-text' : 'data-text');
|
||||
var cur_color = dark && dark_color ? dark_color : color;
|
||||
dark_colors[color] = dark_color;
|
||||
$('.widget-color-circle', this).css('backgroundColor', '#' + bg_color).toggleClass('light', isColorLight(cur_color)).toggleClass('bordered', isColorLight(cur_color, 0.95));
|
||||
if (text) {
|
||||
$('.widget-color-label', this).text(text);
|
||||
}
|
||||
});
|
||||
var color = form.color.value;
|
||||
var dark_color = '';
|
||||
var customcolor = form.customcolor.value;
|
||||
if (color == 'default') {
|
||||
color = '';
|
||||
dark_color = '';
|
||||
} else if (color == 'custom') {
|
||||
color = fixColor(customcolor);
|
||||
if (color != customcolor) {
|
||||
form.customcolor.value = color;
|
||||
$('.widget-color-circle-custom').css('color', color ? '#' + color : '').toggleClass('light', isColorLight(color)).toggleClass('bordered', isColorLight(color, 0.95));
|
||||
}
|
||||
dark_color = color;
|
||||
} else {
|
||||
dark_color = dark_colors[color] || color;
|
||||
}
|
||||
if (!color) {
|
||||
color = '';
|
||||
dark_color = '';
|
||||
$('.widget-accent-color-item .radio[value="default"]').prop('checked', true);
|
||||
var custom_default = form.customcolor.defaultValue;
|
||||
form.customcolor.value = custom_default;
|
||||
$('.widget-color-circle-custom').css('color', custom_default ? '#' + custom_default : '').toggleClass('light', isColorLight(custom_default)).toggleClass('bordered', isColorLight(custom_default, 0.95));
|
||||
}
|
||||
var colorful = form.colorful.checked;
|
||||
var code = '<script async src="' + options.widget_script + '" data-telegram-discussion="' + escapeHTML(post_full_id) + '" data-comments-limit="' + escapeHTML(real_limit.toString()) + '"' + (real_height > 0 ? ' data-height="' + escapeHTML(real_height.toString()) + '"' : '') + (colorful ? ' data-colorful="1"' : '') + (color ? ' data-color="' + color + '"' : '') + (dark ? ' data-dark="1"' : '') + (dark_color && dark_color != color ? ' data-dark-color="' + dark_color + '"' : '') + '></script>';
|
||||
$('#embed_code').val(code);
|
||||
$('#embed_code').height(0);
|
||||
$('#embed_code').height($('#embed_code').get(0).scrollHeight);
|
||||
if (DiscussionWidget.lastCode != code) {
|
||||
DiscussionWidget.lastCode = code;
|
||||
$('#widget_container').toggleClass('dark', !!dark);
|
||||
if (toggle_dark) {
|
||||
var frame = $('#widget_container iframe').get(0);
|
||||
Telegram.setWidgetOptions({dark: dark}, frame);
|
||||
} else {
|
||||
$('#widget_container').html(code);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
9
data/core.telegram.org/js/jquery-ui.min.js
vendored
9
data/core.telegram.org/js/jquery-ui.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -1,413 +0,0 @@
|
|||
(function(window) {
|
||||
if (!Array.isArray) {
|
||||
Array.isArray = function(arg) {
|
||||
return Object.prototype.toString.call(arg) === '[object Array]';
|
||||
};
|
||||
}
|
||||
if (!Object.isSimpleObject) {
|
||||
Object.isSimpleObject = function(arg) {
|
||||
return arg != null && typeof arg === 'object';
|
||||
};
|
||||
}
|
||||
function isFunction(func) {
|
||||
return func && {}.toString.call(func) === '[object Function]';
|
||||
}
|
||||
function getEl(elOrId) {
|
||||
if (elOrId.nodeType) return elOrId;
|
||||
return document.getElementById(elOrId);
|
||||
}
|
||||
function preventDefault(event) {
|
||||
if (window.event) {
|
||||
window.event.returnValue = false;
|
||||
}
|
||||
else if (event.preventDefault) {
|
||||
event.preventDefault();
|
||||
}
|
||||
else {
|
||||
event.returnValue = false;
|
||||
}
|
||||
}
|
||||
function addEvent(el, event, handler) {
|
||||
var events = event.split(/\s+/);
|
||||
for (var i = 0; i < events.length; i++) {
|
||||
if (el.addEventListener) {
|
||||
el.addEventListener(events[i], handler, false);
|
||||
} else {
|
||||
el.attachEvent('on' + events[i], handler);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var UA = window.navigator.userAgent || '';
|
||||
var ScopeAliases = {
|
||||
personal_details: 'pd',
|
||||
passport: 'pp',
|
||||
driver_license: 'dl',
|
||||
identity_card: 'ic',
|
||||
internal_passport: 'ip',
|
||||
id_document: 'idd',
|
||||
address: 'ad',
|
||||
utility_bill: 'ub',
|
||||
bank_statement: 'bs',
|
||||
rental_agreement: 'ra',
|
||||
passport_registration: 'pr',
|
||||
temporary_registration: 'tr',
|
||||
address_document: 'add',
|
||||
phone_number: 'pn',
|
||||
email: 'em',
|
||||
};
|
||||
|
||||
function openDeepLink(url, tooltipToggle) {
|
||||
var is_ios = /ios|iphone os|iphone|ipod|ipad/i.test(UA);
|
||||
var is_firefox = /firefox/i.test(UA);
|
||||
var use_iframe = (is_ios || is_firefox);
|
||||
var use_once = (!is_ios && is_firefox);
|
||||
var timeOpen;
|
||||
var ttNeedHide = false;
|
||||
var pageShown = true;
|
||||
var onPageHide = function() {
|
||||
pageShown = false;
|
||||
};
|
||||
tooltipToggle = tooltipToggle || function(){};
|
||||
var onPageShow = function() {
|
||||
pageShown = true;
|
||||
if (ttNeedHide && (+(new Date) - timeOpen) > 5000) {
|
||||
tooltipToggle(false);
|
||||
}
|
||||
};
|
||||
addEvent(window, 'pagehide', onPageHide);
|
||||
addEvent(window, 'pageshow', onPageShow);
|
||||
addEvent(window, 'blur', onPageHide);
|
||||
addEvent(window, 'focus', onPageShow);
|
||||
var showTooltip = function() {
|
||||
tooltipToggle(true);
|
||||
if (!pageShown) {
|
||||
ttNeedHide = true;
|
||||
}
|
||||
};
|
||||
if (use_iframe) {
|
||||
var iframeEl = document.createElement('iframe');
|
||||
iframeEl.style.position = 'absolute';
|
||||
iframeEl.style.left = '-10000px';
|
||||
iframeEl.style.top = '-10000px';
|
||||
document.body.appendChild(iframeEl);
|
||||
if (iframeEl !== null) {
|
||||
timeOpen = +(new Date);
|
||||
iframeEl.src = url;
|
||||
setTimeout(showTooltip, 2500);
|
||||
}
|
||||
if (!use_once) {
|
||||
setTimeout(function() {
|
||||
if (pageShown) {
|
||||
timeOpen = +(new Date);
|
||||
window.location = url;
|
||||
}
|
||||
}, 2000);
|
||||
}
|
||||
}
|
||||
else {
|
||||
setTimeout(function() {
|
||||
timeOpen = +(new Date);
|
||||
window.location = url;
|
||||
}, 100);
|
||||
setTimeout(showTooltip, 1500);
|
||||
}
|
||||
}
|
||||
|
||||
function packScope(scope) {
|
||||
if (scope.data) {
|
||||
scope.d = scope.data;
|
||||
delete scope.data;
|
||||
}
|
||||
if (!scope.d) {
|
||||
throw new TypeError('scope data is required');
|
||||
}
|
||||
if (!scope.v) {
|
||||
throw new TypeError('scope version is required');
|
||||
}
|
||||
for (var i = 0; i < scope.d.length; i++) {
|
||||
scope.d[i] = packScopeField(scope.d[i]);
|
||||
}
|
||||
return JSON.stringify(scope);
|
||||
}
|
||||
function packScopeField(field) {
|
||||
if (field.one_of) {
|
||||
field._ = field.one_of;
|
||||
delete field.one_of;
|
||||
} else if (field.type) {
|
||||
field._ = field.type;
|
||||
delete field.type;
|
||||
}
|
||||
if (Array.isArray(field._)) {
|
||||
for (var j = 0; j < field._.length; j++) {
|
||||
field._[j] = packScopeField(field._[j]);
|
||||
}
|
||||
field = packScopeOpts(field);
|
||||
} else if (field._) {
|
||||
if (ScopeAliases[field._]) {
|
||||
field._ = ScopeAliases[field._];
|
||||
}
|
||||
field = packScopeOpts(field);
|
||||
} else if (ScopeAliases[field]) {
|
||||
field = ScopeAliases[field];
|
||||
}
|
||||
return field;
|
||||
}
|
||||
function packScopeOpts(scope) {
|
||||
if (scope.selfie) {
|
||||
scope.s = 1;
|
||||
delete scope.selfie;
|
||||
}
|
||||
if (scope.translation) {
|
||||
scope.t = 1;
|
||||
delete scope.translation;
|
||||
}
|
||||
if (scope.native_names) {
|
||||
scope.n = 1;
|
||||
delete scope.native_names;
|
||||
}
|
||||
return scope;
|
||||
}
|
||||
|
||||
function passportAuth(options, tooltipToggle) {
|
||||
if (!options.bot_id) {
|
||||
throw new Error('bot_id is required');
|
||||
}
|
||||
if (!options.scope) {
|
||||
throw new Error('scope is required');
|
||||
}
|
||||
if (!Object.isSimpleObject(options.scope)) {
|
||||
throw new TypeError('scope should be an object');
|
||||
}
|
||||
if (!options.public_key) {
|
||||
throw new Error('public_key is required');
|
||||
}
|
||||
if (!options.nonce) {
|
||||
throw new Error('nonce is required');
|
||||
}
|
||||
if (options.payload) {
|
||||
throw new Error('payload is deprecated, use nonce instead');
|
||||
}
|
||||
var is_android = /android/i.test(UA);
|
||||
var url = (is_android ? 'tg:' : 'tg://') + 'resolve?domain=telegrampassport'
|
||||
+ '&bot_id=' + encodeURIComponent(options.bot_id)
|
||||
+ '&scope=' + encodeURIComponent(packScope(options.scope))
|
||||
+ '&public_key=' + encodeURIComponent(options.public_key)
|
||||
+ '&nonce=' + encodeURIComponent(options.nonce);
|
||||
if (options.callback_url) {
|
||||
url += '&callback_url=' + encodeURIComponent(options.callback_url);
|
||||
}
|
||||
url += '&payload=nonce'; // legacy for outdated apps
|
||||
openDeepLink(url, tooltipToggle);
|
||||
}
|
||||
|
||||
function createAuthButton(contEl, authDataOrFunc, options) {
|
||||
contEl = getEl(contEl);
|
||||
if (!contEl) {
|
||||
return false;
|
||||
}
|
||||
options = options || {};
|
||||
var btnText = options.text || 'Log In With Telegram';
|
||||
var btnRadius = parseInt(options.radius, 10) || 23;
|
||||
var tooltipText = options.tooltip_text || 'Please <u>install Telegram</u> to use this option.';
|
||||
var tooltipForce = options.tooltip_force || false;
|
||||
var tooltipPos = options.tooltip_position;
|
||||
if (tooltipPos == 'top') {
|
||||
var tooltipWrapClass = 'tooltip-top';
|
||||
} else if (tooltipPos == 'left') {
|
||||
var tooltipWrapClass = 'tooltip-left';
|
||||
} else if (tooltipPos == 'right') {
|
||||
var tooltipWrapClass = 'tooltip-right';
|
||||
} else {
|
||||
var tooltipWrapClass = 'tooltip-bottom';
|
||||
}
|
||||
var btnStyle = ''
|
||||
+ '.telegram-passport {'
|
||||
+ 'display: inline-block;'
|
||||
+ 'position: relative;'
|
||||
+ 'max-width: 100%;'
|
||||
+ '}'
|
||||
+ 'button.telegram-passport-button {'
|
||||
+ 'display: inline-block;'
|
||||
+ 'vertical-align: top;'
|
||||
+ 'font-family: "Lucida Grande", Arial, Helvetica, sans-serif;'
|
||||
+ 'font-size: 16px;'
|
||||
+ 'font-weight: 500;'
|
||||
+ 'line-height: 20px;'
|
||||
+ 'text-align: left;'
|
||||
+ 'border-radius: ' + btnRadius + 'px;'
|
||||
+ 'background-color: #54a9eb;'
|
||||
+ 'text-decoration: none;'
|
||||
+ 'padding: 12px 21px 14px;'
|
||||
+ 'margin: 0;'
|
||||
+ 'white-space: nowrap;'
|
||||
+ 'text-overflow: ellipsis;'
|
||||
+ 'overflow: hidden;'
|
||||
+ 'border: none;'
|
||||
+ 'color: #fff;'
|
||||
+ 'cursor: pointer;'
|
||||
+ 'max-width: 100%;'
|
||||
+ '}'
|
||||
+ 'button.telegram-passport-button:focus {'
|
||||
+ 'outline: none;'
|
||||
+ '}'
|
||||
+ '.telegram-passport-tooltip-wrap {'
|
||||
+ 'position: absolute;'
|
||||
+ 'pointer-events: none;'
|
||||
+ 'text-align: center;'
|
||||
+ 'z-index: 100;'
|
||||
+ '}'
|
||||
+ '.telegram-passport-tooltip-wrap.tooltip-bottom {'
|
||||
+ 'left: -500px;'
|
||||
+ 'right: -500px;'
|
||||
+ 'top: 100%;'
|
||||
+ '}'
|
||||
+ '.telegram-passport-tooltip-wrap.tooltip-top {'
|
||||
+ 'left: -500px;'
|
||||
+ 'right: -500px;'
|
||||
+ 'bottom: 100%;'
|
||||
+ '}'
|
||||
+ '.telegram-passport-tooltip-wrap.tooltip-left {'
|
||||
+ 'right: 100%;'
|
||||
+ 'top: 7px;'
|
||||
+ 'bottom: 7px;'
|
||||
+ '}'
|
||||
+ '.telegram-passport-tooltip-wrap.tooltip-right {'
|
||||
+ 'left: 100%;'
|
||||
+ 'top: 7px;'
|
||||
+ 'bottom: 7px;'
|
||||
+ '}'
|
||||
+ '.telegram-passport-tooltip {'
|
||||
+ 'position: relative;'
|
||||
+ 'font-family: "Lucida Grande", Arial, Helvetica, sans-serif;'
|
||||
+ 'background: #949494;'
|
||||
+ 'color: #fff;'
|
||||
+ 'white-space: nowrap;'
|
||||
+ 'border-radius: ' + btnRadius + 'px;'
|
||||
+ 'padding: 7px 16px;'
|
||||
+ 'display: inline-block;'
|
||||
+ 'font-size: 14px;'
|
||||
+ 'line-height: 18px;'
|
||||
+ 'text-decoration: none;'
|
||||
+ 'pointer-events: none;'
|
||||
+ 'visibility: hidden;'
|
||||
+ 'opacity: 0;'
|
||||
+ '}'
|
||||
+ '.telegram-passport-tooltip-wrap.tooltip-bottom .telegram-passport-tooltip {'
|
||||
+ 'margin-top: 32px;'
|
||||
+ '}'
|
||||
+ '.telegram-passport-tooltip-wrap.tooltip-top .telegram-passport-tooltip {'
|
||||
+ 'margin-bottom: 32px;'
|
||||
+ '}'
|
||||
+ '.telegram-passport-tooltip-wrap.tooltip-left .telegram-passport-tooltip {'
|
||||
+ 'margin-right: 32px;'
|
||||
+ '}'
|
||||
+ '.telegram-passport-tooltip-wrap.tooltip-right .telegram-passport-tooltip {'
|
||||
+ 'margin-left: 32px;'
|
||||
+ '}'
|
||||
+ '.telegram-passport-tooltip:hover {'
|
||||
+ 'color: #fff;'
|
||||
+ 'text-decoration: none;'
|
||||
+ '}'
|
||||
+ '.telegram-passport-tooltip-shown {'
|
||||
+ 'transition: all .2s ease;'
|
||||
+ 'pointer-events: auto;'
|
||||
+ 'visibility: visible;'
|
||||
+ 'opacity: 1;'
|
||||
+ '}'
|
||||
+ '.telegram-passport-tooltip-wrap.tooltip-bottom .telegram-passport-tooltip-shown {'
|
||||
+ 'margin-top: 16px;'
|
||||
+ '}'
|
||||
+ '.telegram-passport-tooltip-wrap.tooltip-top .telegram-passport-tooltip-shown {'
|
||||
+ 'margin-bottom: 16px;'
|
||||
+ '}'
|
||||
+ '.telegram-passport-tooltip-wrap.tooltip-left .telegram-passport-tooltip-shown {'
|
||||
+ 'margin-right: 16px;'
|
||||
+ '}'
|
||||
+ '.telegram-passport-tooltip-wrap.tooltip-right .telegram-passport-tooltip-shown {'
|
||||
+ 'margin-left: 16px;'
|
||||
+ '}'
|
||||
+ '.telegram-passport-button-icon {'
|
||||
+ 'display: inline-block;'
|
||||
+ 'vertical-align: top;'
|
||||
+ "background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADYAAAAsCAYAAAFZD3u2AAAAAXNSR0IArs4c6QAAB+FJREFUaAXVWllsVFUYPndm2qG0Q4EipaWspSJbQRYxDWIUHyBqAgYTjUsTNBqN+qAJLg8+ugTlQeITARNQNERcXlyesAxVhOKSSGhLVyi0dDqdznTWznL9/ts5t2fuNrfTEvFP/p5//89/z52z3TJmArIsOyWtDkKZyxxEgE+SkOBMm5/rxlsSxpPpTFPrEJEqKJ4S4PfOgBSMp1QvkqmMSJCryOto6HuUsFwDwbvkRQDZb0rcLEM2JFRklFP1zJaQ0wm1t+FEmjxzQPUcioyxbPcHcyzsMOhXzhNyaZ1gMAeyYVF+visgskp2CYY0CHNzNGD42GxfWaFVKY4u9D1HQ2NGlkYO2QibdJFIgB5I3/zRLx/xXlUCgM8BQyc7QkQ5YceOerBZTGnpJBr2DkXHOK9zguIcV/JW+2IrTlDu5QZie7bdL1/oCogiorupvzpIpzMpit7ji+h0EBTxTG9yLRkTRuLq75GrlFZXj7fNf4ocMplMjqHI6JxIQE40uGZANurPghgRjjb39YI/IspAv6zhx1lv+/ALR73XJuYHiHlWQ4fpFCLRazwZb6ccH4FKgD/xgFbtpJIh0ENAw5eFksSS6Zs0cCawxTQZHA6aOOWIfaOJGCVoxltuBZRImd5gdAH0ZtPMGsVVf5T1DMUUaUVZ0QyLiYl7vkoETYkz0NJkSa0ptPaH2WAooerXLPSwirJilbcisjM/o2k0DsMSrTE68dZfvcH3Q8JqRzYNK+Ywl9P056INQ/wXXJizSnEhb1ta5KJImX+MeAw+W1sziy2cbfkAuKva8qpIYJmMDM60Dn2ICX8/ree+USUviVljQ03G6ZhYYhWh/k8HktVxcd5kZEhv20BojIUTKSxhLLRv2+JyHgCPeznoTs5rWhom/VquMdKxX52/8YNOqBEg8TtADsc06lvPIvMuYBdw9y3JhsDzgBeBIvRPazJEPiRG19AHppwMAZ8EpjSBjdjqgpIh0lJgh1HEdCYTTiTTOtWkEsHbATyuiyIIWroDcsfNsCCZIG0lg/lLEy7GVCiaDNBv8XogZmwgy17TZPBYDxww8xTlv17xK1uckYi6SxPVnN5DydQZBFI3+K+Bj5AiHwwEE+n2gbCT7LYun83cRQpp6MbnRxeS7ITFj4ZWxsK0t93vxNFEib6tbi5zONQ+G3tkpbSeKRtrS6ussnMwwq4HaEUaBxuLJhnGUNlMImhh+ogIK0hl5DSdL3giKsRmIgr7CY+t1o8Cl0L4LXADV1L7T1+IDUeSqsjtcrCttXQwsg2VqEw5n6nJRFckrh1LpU+c6xy5R5TPKnGxDROri6gypfnLQQaGybgn/XY4XTXbzeoqyzhruxWTWW4mYKgma+kJ2k4gGDYJtPlGn4wk5ribG8eSGXb07DUW1myAuN6kPSjKLR8jGfJH2eGLqn53LSjFLkt3IFb1nBAfIcksH6PiJEkj3Jm3SFwDupTzdtu8yTIOtk4M5nI6NzY2LLqOXkezPT8v6gU6ItAKmTfZA3UVfdxJcjh3NzYs/JPz1CLhVjS7RFmWzhkvA72xyHvZt+mz5qvmpxC44bdJ6516ujWO9D+VorC1wAPAG0AtdN/2ZaHHxcA9wO+Algs09BzO3laFoVfVwP3AS7yHBbaP/WeFocPbgIeBwQI7b+bWQ0Xp7ianu1Jk9yDmXmAjcDsw78QPGw7pgeDYSOdguKIap91ldyjbGK4za5VZazJJzAKpchSxEgwV8AyQFoVCINHti2WuDUeV+4QlFSVsyTxbBVEu2vXNwlSdLGjEUAD50baWingUSPvoggG3jLGOwah7IBin9cdNF/2rqz1snsfeDYuQ+BAVRXzeEUMR82H3FJCKWA+cFsA3jVhbf7hE3IwWYzO6rsbDSt0FPW/qVzUKU87RORFQBK22VMATwEltd2GfF+LJTKK1f9QdiikXrerVFW166Q6saHLXU9p8X/KiSEGHl9fRfqy1mi5+NJ5KY2Sc0TH9/U5VuZutqCyl7ct0pNuMOBd5IBqxnCMDV0ylDUSTcnt/WEqkMhRGdxCtQzFVk7zTy9OfM2JRZKs+KowcfSB6Gkiv4b3ASQFdrdJxFPcehn4uHBvX4PdTXjL+ccPQqHDhbhT2veiuFiYKRRoFrwD/eBbVkwx4uuuQenDIMKlFCTOz2KlMCFY3CIph4X+6UFSt1j1vYVoH4k93d89wJDzj1+tGBpDRZfiqqjLbNxUmYeyIX0Fhn2oNCyqMgjRd9jdg6mnWBqSLii3LrO94tD5T4OlMWo7ClGlWjFNwYRTklzbfYUmWnhcD0ux3Izj+KaMev6mNS8qZY3pmPTENpz9AUW9zRmynVNjJkyedC+p3RGUmq1uEUDzNBkcnvtFQsmL8mwJdoC21vzUS+2hFz0dhPiODKRVGAZs6g3UsmWznwUeiSTYkXG1xObUYuEsP11e9ON/jOgx2lagrgD6Oop4188t7N2DmyOX315ZfcUoO9XXAtY8O0IFBR5F0J77YrK2cVdQMfjWQHiotLSGdgz2B5d3DlEeM+oAlQfK2DffglVzcN5Jg+OcWpWsIHmdOaee+hkVNVn2FPy1u7wHfANrp02k8lwetYtoJYuWv6n7+e6C0pNjV3zEU9eCGOc0kx77n7qs5phrYJFDkAph+Dtxh4kJPrRaF9Zrob38xiqwHngLSf3TQh3X6YGXr++q/M6e7wZMmuzIAAAAASUVORK5CYII=') no-repeat;"
|
||||
+ 'background-size: 27px 22px;'
|
||||
+ 'width: 27px;'
|
||||
+ 'height: 22px;'
|
||||
+ 'margin: 0 15px -2px -5px;'
|
||||
+ '}'
|
||||
+ '.telegram-passport-tooltip:before {'
|
||||
+ "content: '';"
|
||||
+ 'display: inline-block;'
|
||||
+ 'position: absolute;'
|
||||
+ '}'
|
||||
+ '.telegram-passport-tooltip-wrap.tooltip-bottom .telegram-passport-tooltip:before {'
|
||||
+ 'left: 50%;'
|
||||
+ 'top: 0;'
|
||||
+ 'border: 10px solid;'
|
||||
+ 'border-radius: 4px 0 0;'
|
||||
+ 'border-color: #949494 transparent transparent #949494;'
|
||||
+ 'transform: rotateZ(45deg) translate3d(-3px,5px,0);'
|
||||
+ 'transform-origin: 100% 0;'
|
||||
+ '}'
|
||||
+ '.telegram-passport-tooltip-wrap.tooltip-top .telegram-passport-tooltip:before {'
|
||||
+ 'left: 50%;'
|
||||
+ 'bottom: 0;'
|
||||
+ 'border: 10px solid;'
|
||||
+ 'border-radius: 0 0 4px;'
|
||||
+ 'border-color: transparent #949494 #949494 transparent;'
|
||||
+ 'transform: rotateZ(45deg) translate3d(-11px,9px,0);'
|
||||
+ 'transform-origin: 0 100%;'
|
||||
+ '}'
|
||||
+ '.telegram-passport-tooltip-wrap.tooltip-left .telegram-passport-tooltip:before {'
|
||||
+ 'top: 50%;'
|
||||
+ 'right: 0;'
|
||||
+ 'border: 8px solid;'
|
||||
+ 'border-radius: 0 2px 0 0;'
|
||||
+ 'border-color: #949494 #949494 transparent transparent;'
|
||||
+ 'transform: rotateZ(45deg) translate3d(4px,-3.5px,0);'
|
||||
+ 'transform-origin: 100% 0;'
|
||||
+ '}'
|
||||
+ '.telegram-passport-tooltip-wrap.tooltip-right .telegram-passport-tooltip:before {'
|
||||
+ 'top: 50%;'
|
||||
+ 'left: 0;'
|
||||
+ 'border: 8px solid;'
|
||||
+ 'border-radius: 0 0 0 2px;'
|
||||
+ 'border-color: transparent transparent #949494 #949494;'
|
||||
+ 'transform: rotateZ(45deg) translate3d(-15px,-7.5px,0);'
|
||||
+ 'transform-origin: 0 100%;'
|
||||
+ '}';
|
||||
var tooltipClass = tooltipForce ? 'telegram-passport-tooltip telegram-passport-tooltip-shown' : 'telegram-passport-tooltip';
|
||||
var btnHtml = ''
|
||||
+ '<style>' + btnStyle + '</style>'
|
||||
+ '<div class="telegram-passport-tooltip-wrap ' + tooltipWrapClass + '"><a class="' + tooltipClass + '" href="https://telegram.org/dl/" target="_blank">' + tooltipText + '</a></div>'
|
||||
+ '<button class="telegram-passport-button"><i class="telegram-passport-button-icon"></i>' + btnText + '</button>';
|
||||
var btnContEl = document.createElement('div');
|
||||
btnContEl.className = 'telegram-passport';
|
||||
btnContEl.innerHTML = btnHtml;
|
||||
contEl.appendChild(btnContEl);
|
||||
var buttonEl = btnContEl.getElementsByTagName('button')[0];
|
||||
var tooltipEl = btnContEl.getElementsByTagName('a')[0];
|
||||
addEvent(buttonEl, 'click', function(e) {
|
||||
preventDefault(e);
|
||||
var options = isFunction(authDataOrFunc) ? authDataOrFunc() : authDataOrFunc;
|
||||
options = options || {};
|
||||
var tooltipToggle = function(show) {
|
||||
if (show) {
|
||||
tooltipEl.classList.add('telegram-passport-tooltip-shown');
|
||||
} else {
|
||||
tooltipEl.classList.remove('telegram-passport-tooltip-shown');
|
||||
}
|
||||
};
|
||||
passportAuth(options, !tooltipForce ? tooltipToggle : null);
|
||||
});
|
||||
}
|
||||
|
||||
if (!window.Telegram) {
|
||||
window.Telegram = {};
|
||||
}
|
||||
window.Telegram.Passport = {
|
||||
auth: passportAuth,
|
||||
createAuthButton: createAuthButton,
|
||||
};
|
||||
})(window);
|
|
@ -2,12 +2,12 @@
|
|||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>messages.searchGifs</title>
|
||||
<title>account.verifyPhone</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Search for GIFs">
|
||||
<meta property="og:title" content="messages.searchGifs">
|
||||
<meta property="description" content="Verify a phone number for telegram passport.">
|
||||
<meta property="og:title" content="account.verifyPhone">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Search for GIFs">
|
||||
<meta property="og:description" content="Verify a phone number for telegram passport.">
|
||||
<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="/methods" >All Methods</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/method/messages.searchGifs" >messages.searchGifs</a></li></ul></div>
|
||||
<h1 id="dev_page_title">messages.searchGifs</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="/methods" >All Methods</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/method/account.verifyPhone" >account.verifyPhone</a></li></ul></div>
|
||||
<h1 id="dev_page_title">account.verifyPhone</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Search for GIFs</p>
|
||||
<div id="dev_page_content"><p>Verify a phone number for telegram <a href="/passport">passport</a>.</p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
@ -52,7 +52,10 @@
|
|||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<pre class="page_scheme"> <code>Method schema is available as of layer 114. <a href="?layer=114">Switch »</a></code></pre></p>
|
||||
<pre class="page_scheme"><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>;
|
||||
---functions---
|
||||
<a href="/method/account.verifyPhone" class="current_page_link" >account.verifyPhone</a>#4dd3a7f6 phone_number:<a href="/type/string" >string</a> phone_code_hash:<a href="/type/string" >string</a> phone_code:<a href="/type/string" >string</a> = <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>
|
||||
<table class="table">
|
||||
<thead>
|
||||
|
@ -64,19 +67,24 @@
|
|||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><strong>q</strong></td>
|
||||
<td><strong>phone_number</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/string">string</a></td>
|
||||
<td>Text query</td>
|
||||
<td>Phone number</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>offset</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/int">int</a></td>
|
||||
<td>Offset for <a href="/api/offsets">pagination »</a></td>
|
||||
<td><strong>phone_code_hash</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/string">string</a></td>
|
||||
<td>Phone code hash received from the call to <a href="/method/account.sendVerifyPhoneCode">account.sendVerifyPhoneCode</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>phone_code</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/string">string</a></td>
|
||||
<td>Code received after the call to <a href="/method/account.sendVerifyPhoneCode">account.sendVerifyPhoneCode</a></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/messages.FoundGifs">messages.FoundGifs</a></p>
|
||||
<p><a href="/type/Bool">Bool</a></p>
|
||||
<h3><a class="anchor" href="#possible-errors" id="possible-errors" name="possible-errors"><i class="anchor-icon"></i></a>Possible errors</h3>
|
||||
<table class="table">
|
||||
<thead>
|
||||
|
@ -89,19 +97,25 @@
|
|||
<tbody>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>METHOD_INVALID</td>
|
||||
<td>The specified method is invalid.</td>
|
||||
<td>PHONE_CODE_EMPTY</td>
|
||||
<td>phone_code is missing.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>SEARCH_QUERY_EMPTY</td>
|
||||
<td>The search query is empty.</td>
|
||||
<td>PHONE_CODE_EXPIRED</td>
|
||||
<td>The phone code you provided has expired, this may happen if it was sent to any chat on telegram (if the code is sent through a telegram chat (not the official account) to avoid it append or prepend to the code some chars).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>PHONE_NUMBER_INVALID</td>
|
||||
<td>The phone number is invalid.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
|
||||
<h4><a class="anchor" href="#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>
|
||||
<h4><a class="anchor" href="#accountsendverifyphonecode" id="accountsendverifyphonecode" name="accountsendverifyphonecode"><i class="anchor-icon"></i></a><a href="/method/account.sendVerifyPhoneCode">account.sendVerifyPhoneCode</a></h4>
|
||||
<p>Send the verification phone code for telegram <a href="/passport">passport</a>.</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>
|
||||
|
|
@ -2,12 +2,12 @@
|
|||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>messages.editChatTitle</title>
|
||||
<title>messages.editMessage</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Chanages chat name and sends a service message on it.">
|
||||
<meta property="og:title" content="messages.editChatTitle">
|
||||
<meta property="description" content="Edit message">
|
||||
<meta property="og:title" content="messages.editMessage">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Chanages chat name and sends a service message on it.">
|
||||
<meta property="og:description" content="Edit 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="/methods" >All Methods</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/method/messages.editChatTitle" >messages.editChatTitle</a></li></ul></div>
|
||||
<h1 id="dev_page_title">messages.editChatTitle</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="/methods" >All Methods</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/method/messages.editMessage" >messages.editMessage</a></li></ul></div>
|
||||
<h1 id="dev_page_title">messages.editMessage</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Chanages chat name and sends a service message on it.</p>
|
||||
<div id="dev_page_content"><p>Edit message</p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
@ -60,7 +60,7 @@
|
|||
<a href="/constructor/updates" >updates</a>#74ae4240 updates:<a href="/type/Vector%20t" >Vector</a><<a href="/type/Update" >Update</a>> users:<a href="/type/Vector%20t" >Vector</a><<a href="/type/User" >User</a>> chats:<a href="/type/Vector%20t" >Vector</a><<a href="/type/Chat" >Chat</a>> date:<a href="/type/int" >int</a> seq:<a href="/type/int" >int</a> = <a href="/type/Updates" >Updates</a>;
|
||||
<a href="/constructor/updateShortSentMessage" >updateShortSentMessage</a>#9015e101 flags:<a href="/type/%23" >#</a> out:flags.1?true id:<a href="/type/int" >int</a> pts:<a href="/type/int" >int</a> pts_count:<a href="/type/int" >int</a> date:<a href="/type/int" >int</a> media:flags.9?<a href="/type/MessageMedia" >MessageMedia</a> entities:flags.7?<a href="/type/Vector%20t" >Vector</a><<a href="/type/MessageEntity" >MessageEntity</a>> ttl_period:flags.25?<a href="/type/int" >int</a> = <a href="/type/Updates" >Updates</a>;
|
||||
---functions---
|
||||
<a href="/method/messages.editChatTitle" class="current_page_link" >messages.editChatTitle</a>#73783ffd chat_id:<a href="/type/long" >long</a> title:<a href="/type/string" >string</a> = <a href="/type/Updates" >Updates</a>;</code></pre></p>
|
||||
<a href="/method/messages.editMessage" class="current_page_link" >messages.editMessage</a>#48f71778 flags:<a href="/type/%23" >#</a> no_webpage:flags.1?true peer:<a href="/type/InputPeer" >InputPeer</a> id:<a href="/type/int" >int</a> message:flags.11?<a href="/type/string" >string</a> media:flags.14?<a href="/type/InputMedia" >InputMedia</a> reply_markup:flags.2?<a href="/type/ReplyMarkup" >ReplyMarkup</a> entities:flags.3?<a href="/type/Vector%20t" >Vector</a><<a href="/type/MessageEntity" >MessageEntity</a>> schedule_date:flags.15?<a href="/type/int" >int</a> = <a href="/type/Updates" >Updates</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>
|
||||
|
@ -72,19 +72,54 @@
|
|||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><strong>chat_id</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/long">long</a></td>
|
||||
<td>Chat ID</td>
|
||||
<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>title</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/string">string</a></td>
|
||||
<td>New chat name, different from the old one</td>
|
||||
<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>Disable webpage preview</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>peer</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/InputPeer">InputPeer</a></td>
|
||||
<td>Where was the message sent</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 to edit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>message</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>New message</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>media</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.14?<a href="/type/InputMedia">InputMedia</a></td>
|
||||
<td>New attached media</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>Reply markup for inline keyboards</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>entities</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.3?<a href="/type/Vector%20t">Vector</a><<a href="/type/MessageEntity">MessageEntity</a>></td>
|
||||
<td><a href="/api/entities">Message entities for styled text</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>schedule_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>Scheduled message date for <a href="/api/scheduled-messages">scheduled messages</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3><a class="anchor" href="#result" id="result" name="result"><i class="anchor-icon"></i></a>Result</h3>
|
||||
<p>Returns a <a href="/type/messages.StatedMessage">messages.StatedMessage</a> object containing a service message sent during an action.</p>
|
||||
<p><a href="/type/Updates">Updates</a></p>
|
||||
<h3><a class="anchor" href="#possible-errors" id="possible-errors" name="possible-errors"><i class="anchor-icon"></i></a>Possible errors</h3>
|
||||
<table class="table">
|
||||
<thead>
|
||||
|
@ -97,27 +132,137 @@
|
|||
<tbody>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHAT_ID_INVALID</td>
|
||||
<td>The provided chat id is invalid.</td>
|
||||
<td>BUTTON_DATA_INVALID</td>
|
||||
<td>The data of one or more of the buttons you provided is invalid.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHAT_NOT_MODIFIED</td>
|
||||
<td>The pinned message wasn't modified.</td>
|
||||
<td>BUTTON_TYPE_INVALID</td>
|
||||
<td>The type of one or more of the buttons you provided is invalid.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHAT_TITLE_EMPTY</td>
|
||||
<td>No chat title provided.</td>
|
||||
<td>BUTTON_URL_INVALID</td>
|
||||
<td>Button URL invalid.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHANNEL_INVALID</td>
|
||||
<td>The provided channel is invalid.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHANNEL_PRIVATE</td>
|
||||
<td>You haven't joined this channel/supergroup.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHAT_ADMIN_REQUIRED</td>
|
||||
<td>You must be an admin in this chat to do this.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>403</td>
|
||||
<td>CHAT_WRITE_FORBIDDEN</td>
|
||||
<td>You can't write in this chat.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>ENTITIES_TOO_LONG</td>
|
||||
<td>You provided too many styled message entities.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>403</td>
|
||||
<td>INLINE_BOT_REQUIRED</td>
|
||||
<td>Only the inline bot can edit message.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>INPUT_USER_DEACTIVATED</td>
|
||||
<td>The specified user was deleted.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>MEDIA_CAPTION_TOO_LONG</td>
|
||||
<td>The caption is too long.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>MEDIA_GROUPED_INVALID</td>
|
||||
<td>You tried to send media of different types in an album.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>MEDIA_NEW_INVALID</td>
|
||||
<td>The new media is invalid.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>MEDIA_PREV_INVALID</td>
|
||||
<td>Previous media invalid.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>403</td>
|
||||
<td>MESSAGE_AUTHOR_REQUIRED</td>
|
||||
<td>Message author required.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>MESSAGE_EDIT_TIME_EXPIRED</td>
|
||||
<td>You can't edit this message anymore, too much time has passed since its creation.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>MESSAGE_EMPTY</td>
|
||||
<td>The provided message is empty.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>MESSAGE_ID_INVALID</td>
|
||||
<td>The provided message id is invalid.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>MESSAGE_NOT_MODIFIED</td>
|
||||
<td>The message text has not changed.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>MESSAGE_TOO_LONG</td>
|
||||
<td>The provided message is too long.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>MSG_ID_INVALID</td>
|
||||
<td>Invalid message ID provided.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>PEER_ID_INVALID</td>
|
||||
<td>The provided peer id is invalid.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>REPLY_MARKUP_INVALID</td>
|
||||
<td>The provided reply markup is invalid.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>SCHEDULE_DATE_INVALID</td>
|
||||
<td>Invalid schedule date provided.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>USER_BANNED_IN_CHANNEL</td>
|
||||
<td>You're banned from sending messages in supergroups/channels.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3><a class="anchor" href="#bots-can-use-this-method" id="bots-can-use-this-method" name="bots-can-use-this-method"><i class="anchor-icon"></i></a>Bots can use this method</h3></div>
|
||||
<h3><a class="anchor" href="#bots-can-use-this-method" id="bots-can-use-this-method" name="bots-can-use-this-method"><i class="anchor-icon"></i></a>Bots can use this method</h3>
|
||||
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
|
||||
<h4><a class="anchor" href="#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="#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></div>
|
||||
|
||||
</div>
|
||||
|
|
@ -2,12 +2,12 @@
|
|||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>messages.clearAllDrafts</title>
|
||||
<title>messages.getDialogFilters</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Clear all drafts.">
|
||||
<meta property="og:title" content="messages.clearAllDrafts">
|
||||
<meta property="description" content="Get folders">
|
||||
<meta property="og:title" content="messages.getDialogFilters">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Clear all drafts.">
|
||||
<meta property="og:description" content="Get folders">
|
||||
<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="/methods" >All Methods</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/method/messages.clearAllDrafts" >messages.clearAllDrafts</a></li></ul></div>
|
||||
<h1 id="dev_page_title">messages.clearAllDrafts</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="/methods" >All Methods</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/method/messages.getDialogFilters" >messages.getDialogFilters</a></li></ul></div>
|
||||
<h1 id="dev_page_title">messages.getDialogFilters</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Clear all <a href="/api/drafts">drafts</a>.</p>
|
||||
<div id="dev_page_content"><p>Get <a href="/api/folders">folders</a></p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
@ -52,17 +52,15 @@
|
|||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<pre class="page_scheme"><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>;
|
||||
---functions---
|
||||
<a href="/method/messages.clearAllDrafts" class="current_page_link" >messages.clearAllDrafts</a>#7e58ee9c = <a href="/type/Bool" >Bool</a>;</code></pre></p>
|
||||
<pre class="page_scheme"><code>---functions---
|
||||
<a href="/method/messages.getDialogFilters" class="current_page_link" >messages.getDialogFilters</a>#f19ed96d = <a href="/type/Vector%20t" >Vector</a><<a href="/type/DialogFilter" >DialogFilter</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="#result" id="result" name="result"><i class="anchor-icon"></i></a>Result</h3>
|
||||
<p><a href="/type/Bool">Bool</a></p>
|
||||
<p><a href="/type/Vector%20t">Vector</a><<a href="/type/DialogFilter">DialogFilter</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="#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></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></div>
|
||||
|
||||
</div>
|
||||
|
|
@ -1,232 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>messages.getHistory</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Gets back the conversation history with one interlocutor / within a chat">
|
||||
<meta property="og:title" content="messages.getHistory">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Gets back the conversation history with one interlocutor / within a 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?215" 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="/methods" >All Methods</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/method/messages.getHistory" >messages.getHistory</a></li></ul></div>
|
||||
<h1 id="dev_page_title">messages.getHistory</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Gets back the conversation history with one interlocutor / within a 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 133 <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="?layer=1">1 – Base layer</a></li><li><a href="?layer=2">2 – New userpic notifications</a></li><li><a href="?layer=3">3 – Send message can trigger link change</a></li><li><a href="?layer=4">4 – Check-in chats</a></li><li><a href="?layer=5">5 – Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 – Foursquare integration</a></li><li><a href="?layer=7">7 – Added wallPaperSolid</a></li><li><a href="?layer=8">8 – Added end-to-end encryption</a></li><li><a href="?layer=9">9 – Improved big files upload perfomance</a></li><li><a href="?layer=10">10 – Improved chat participants updates</a></li><li><a href="?layer=11">11 – Improved secret chats</a></li><li><a href="?layer=12">12 – New dynamic support</a></li><li><a href="?layer=13">13 – Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 – Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 – Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 – Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 – Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 – Added usernames</a></li><li><a href="?layer=23">23 – Stickers for secret chats</a></li><li><a href="?layer=105">105 – Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 – Login with QR code</a></li><li><a href="?layer=109">109 – Polls v2</a></li><li><a href="?layer=110">110 – People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 – Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 – Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 – PSA</a></li><li><a href="?layer=114">114 – Video thumbs for GIFs</a></li><li><a href="?layer=115">115 – Peek Channel Invite</a></li><li><a href="?layer=116">116 – Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 – WebRTC Phone Calls</a></li><li><a href="?layer=118">118 – Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 – Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 – Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121">121 – SVG-based Outlines for Stickers</a></li><li><a href="?layer=122">122 – Voice Chats</a></li><li><a href="?layer=123">123 – Voice Chat improvements</a></li><li><a href="?layer=124">124 – Expiring Invite links</a></li><li><a href="?layer=125">125 – Voice Chats in Broadcasts</a></li><li><a href="?layer=126">126 – Ban channels in channels</a></li><li><a href="?layer=127">127 – Payments in channels</a></li><li><a href="?layer=128">128 – Microthumbs for User/Chat profile photos</a></li><li><a href="?layer=129">129 – Video Chats</a></li><li><a href="?layer=130">130 – Custom placeholder for bot reply keyboards</a></li><li><a href="?layer=131">131 – Reset 2FA Password after a week</a></li><li><a href="?layer=132">132 – Chat themes</a></li><li><a href="?layer=133"><strong>133 – 64-bit IDs for User/Chat</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/messages.messages" >messages.messages</a>#8c718e87 messages:<a href="/type/Vector%20t" >Vector</a><<a href="/type/Message" >Message</a>> chats:<a href="/type/Vector%20t" >Vector</a><<a href="/type/Chat" >Chat</a>> users:<a href="/type/Vector%20t" >Vector</a><<a href="/type/User" >User</a>> = <a href="/type/messages.Messages" >messages.Messages</a>;
|
||||
<a href="/constructor/messages.messagesSlice" >messages.messagesSlice</a>#3a54685e flags:<a href="/type/%23" >#</a> inexact:flags.1?true 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><<a href="/type/Message" >Message</a>> chats:<a href="/type/Vector%20t" >Vector</a><<a href="/type/Chat" >Chat</a>> users:<a href="/type/Vector%20t" >Vector</a><<a href="/type/User" >User</a>> = <a href="/type/messages.Messages" >messages.Messages</a>;
|
||||
<a href="/constructor/messages.channelMessages" >messages.channelMessages</a>#64479808 flags:<a href="/type/%23" >#</a> inexact:flags.1?true 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><<a href="/type/Message" >Message</a>> chats:<a href="/type/Vector%20t" >Vector</a><<a href="/type/Chat" >Chat</a>> users:<a href="/type/Vector%20t" >Vector</a><<a href="/type/User" >User</a>> = <a href="/type/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.getHistory" class="current_page_link" >messages.getHistory</a>#4423e6c5 peer:<a href="/type/InputPeer" >InputPeer</a> offset_id:<a href="/type/int" >int</a> offset_date:<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/long" >long</a> = <a href="/type/messages.Messages" >messages.Messages</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>peer</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/InputPeer">InputPeer</a></td>
|
||||
<td>Target peer</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>offset_id</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/int">int</a></td>
|
||||
<td>Only return messages starting from the specified message ID</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>offset_date</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/int">int</a></td>
|
||||
<td>Only return messages sent before the specified date</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>add_offset</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/int">int</a></td>
|
||||
<td>Number of list elements to be skipped, negative values are also accepted.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>limit</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/int">int</a></td>
|
||||
<td>Number of results to return</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>max_id</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/int">int</a></td>
|
||||
<td>If a positive value was transferred, the method will return only messages with IDs less than <strong>max_id</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>min_id</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/int">int</a></td>
|
||||
<td>If a positive value was transferred, the method will return only messages with IDs more than <strong>min_id</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>hash</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/long">long</a></td>
|
||||
<td><a href="/api/offsets">Result hash</a></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/messages.Messages">messages.Messages</a></p>
|
||||
<h3><a class="anchor" href="#possible-errors" id="possible-errors" name="possible-errors"><i class="anchor-icon"></i></a>Possible errors</h3>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Code</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>401</td>
|
||||
<td>AUTH_KEY_PERM_EMPTY</td>
|
||||
<td>The temporary auth key must be binded to the permanent auth key to use these methods.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHANNEL_INVALID</td>
|
||||
<td>The provided channel is invalid.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHANNEL_PRIVATE</td>
|
||||
<td>You haven't joined this channel/supergroup.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHAT_ID_INVALID</td>
|
||||
<td>The provided chat id is invalid.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>MSG_ID_INVALID</td>
|
||||
<td>Invalid message ID provided.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>PEER_ID_INVALID</td>
|
||||
<td>The provided peer id is invalid.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
|
||||
<h4><a class="anchor" href="#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?43"></script>
|
||||
|
||||
<script>backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -2,12 +2,12 @@
|
|||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>account.resetAuthorization</title>
|
||||
<title>messages.readDiscussion</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Log out an active authorized session by its hash">
|
||||
<meta property="og:title" content="account.resetAuthorization">
|
||||
<meta property="description" content="Mark a thread as read">
|
||||
<meta property="og:title" content="messages.readDiscussion">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Log out an active authorized session by its hash">
|
||||
<meta property="og:description" content="Mark a thread as read">
|
||||
<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="/methods" >All Methods</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/method/account.resetAuthorization" >account.resetAuthorization</a></li></ul></div>
|
||||
<h1 id="dev_page_title">account.resetAuthorization</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="/methods" >All Methods</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/method/messages.readDiscussion" >messages.readDiscussion</a></li></ul></div>
|
||||
<h1 id="dev_page_title">messages.readDiscussion</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Log out an active <a href="/api/auth">authorized session</a> by its hash</p>
|
||||
<div id="dev_page_content"><p>Mark a <a href="/api/threads">thread</a> as read</p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
@ -55,7 +55,7 @@
|
|||
<pre class="page_scheme"><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>;
|
||||
---functions---
|
||||
<a href="/method/account.resetAuthorization" class="current_page_link" >account.resetAuthorization</a>#df77f3bc hash:<a href="/type/long" >long</a> = <a href="/type/Bool" >Bool</a>;</code></pre></p>
|
||||
<a href="/method/messages.readDiscussion" class="current_page_link" >messages.readDiscussion</a>#f731a9f4 peer:<a href="/type/InputPeer" >InputPeer</a> msg_id:<a href="/type/int" >int</a> read_max_id:<a href="/type/int" >int</a> = <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>
|
||||
<table class="table">
|
||||
<thead>
|
||||
|
@ -67,9 +67,19 @@
|
|||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><strong>hash</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/long">long</a></td>
|
||||
<td>Session hash</td>
|
||||
<td><strong>peer</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/InputPeer">InputPeer</a></td>
|
||||
<td>Group ID</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>msg_id</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/int">int</a></td>
|
||||
<td>ID of message that started the thread</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>read_max_id</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/int">int</a></td>
|
||||
<td>ID up to which thread messages were read</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
@ -86,20 +96,15 @@
|
|||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>406</td>
|
||||
<td>FRESH_RESET_AUTHORISATION_FORBIDDEN</td>
|
||||
<td>You can't logout other sessions if less than 24 hours have passed since you logged on the current session.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>HASH_INVALID</td>
|
||||
<td>The provided hash is invalid.</td>
|
||||
<td>PEER_ID_INVALID</td>
|
||||
<td>The provided peer id is invalid.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
|
||||
<h4><a class="anchor" href="#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>
|
||||
<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>
|
||||
|
||||
|
@ -138,9 +143,9 @@
|
|||
</ul>
|
||||
</div>
|
||||
<div class="footer_column footer_column_platform">
|
||||
<h5><a href="//core.telegram.org/">Platform</a></h5>
|
||||
<h5><a href="/">Platform</a></h5>
|
||||
<ul>
|
||||
<li><a href="//core.telegram.org/api">API</a></li>
|
||||
<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>
|
||||
|
@ -157,7 +162,7 @@
|
|||
<h5><a href="//telegram.org/apps">Apps</a></h5>
|
||||
</div>
|
||||
<div class="footer_column">
|
||||
<h5><a href="//core.telegram.org/">Platform</a></h5>
|
||||
<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>
|
|
@ -2,12 +2,12 @@
|
|||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>langpack.getLanguages</title>
|
||||
<title>messages.uninstallStickerSet</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Get information about all languages in a localization pack">
|
||||
<meta property="og:title" content="langpack.getLanguages">
|
||||
<meta property="description" content="Uninstall a stickerset">
|
||||
<meta property="og:title" content="messages.uninstallStickerSet">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Get information about all languages in a localization pack">
|
||||
<meta property="og:description" content="Uninstall a stickerset">
|
||||
<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="/methods" >All Methods</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/method/langpack.getLanguages" >langpack.getLanguages</a></li></ul></div>
|
||||
<h1 id="dev_page_title">langpack.getLanguages</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="/methods" >All Methods</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/method/messages.uninstallStickerSet" >messages.uninstallStickerSet</a></li></ul></div>
|
||||
<h1 id="dev_page_title">messages.uninstallStickerSet</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Get information about all languages in a localization pack</p>
|
||||
<div id="dev_page_content"><p>Uninstall a stickerset</p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
@ -52,8 +52,10 @@
|
|||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<pre class="page_scheme"><code>---functions---
|
||||
<a href="/method/langpack.getLanguages" class="current_page_link" >langpack.getLanguages</a>#42c6978f lang_pack:<a href="/type/string" >string</a> = <a href="/type/Vector%20t" >Vector</a><<a href="/type/LangPackLanguage" >LangPackLanguage</a>>;</code></pre></p>
|
||||
<pre class="page_scheme"><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>;
|
||||
---functions---
|
||||
<a href="/method/messages.uninstallStickerSet" class="current_page_link" >messages.uninstallStickerSet</a>#f96e55de stickerset:<a href="/type/InputStickerSet" >InputStickerSet</a> = <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>
|
||||
<table class="table">
|
||||
<thead>
|
||||
|
@ -65,14 +67,14 @@
|
|||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><strong>lang_pack</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/string">string</a></td>
|
||||
<td>Language pack</td>
|
||||
<td><strong>stickerset</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/InputStickerSet">InputStickerSet</a></td>
|
||||
<td>The stickerset to uninstall</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/Vector%20t">Vector</a><<a href="/type/LangPackLanguage">LangPackLanguage</a>></p>
|
||||
<p><a href="/type/Bool">Bool</a></p>
|
||||
<h3><a class="anchor" href="#possible-errors" id="possible-errors" name="possible-errors"><i class="anchor-icon"></i></a>Possible errors</h3>
|
||||
<table class="table">
|
||||
<thead>
|
||||
|
@ -85,8 +87,8 @@
|
|||
<tbody>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>LANG_PACK_INVALID</td>
|
||||
<td>The provided language pack is invalid.</td>
|
||||
<td>STICKERSET_INVALID</td>
|
||||
<td>The provided sticker set is invalid.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
|
@ -128,9 +130,9 @@
|
|||
</ul>
|
||||
</div>
|
||||
<div class="footer_column footer_column_platform">
|
||||
<h5><a href="//core.telegram.org/">Platform</a></h5>
|
||||
<h5><a href="/">Platform</a></h5>
|
||||
<ul>
|
||||
<li><a href="//core.telegram.org/api">API</a></li>
|
||||
<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>
|
||||
|
@ -147,7 +149,7 @@
|
|||
<h5><a href="//telegram.org/apps">Apps</a></h5>
|
||||
</div>
|
||||
<div class="footer_column">
|
||||
<h5><a href="//core.telegram.org/">Platform</a></h5>
|
||||
<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>
|
|
@ -1,160 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>payments.clearSavedInfo</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Clear saved payment information">
|
||||
<meta property="og:title" content="payments.clearSavedInfo">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Clear saved payment information">
|
||||
<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?215" 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="/methods" >All Methods</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/method/payments.clearSavedInfo" >payments.clearSavedInfo</a></li></ul></div>
|
||||
<h1 id="dev_page_title">payments.clearSavedInfo</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Clear saved payment information</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 133 <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="?layer=1">1 – Base layer</a></li><li><a href="?layer=2">2 – New userpic notifications</a></li><li><a href="?layer=3">3 – Send message can trigger link change</a></li><li><a href="?layer=4">4 – Check-in chats</a></li><li><a href="?layer=5">5 – Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 – Foursquare integration</a></li><li><a href="?layer=7">7 – Added wallPaperSolid</a></li><li><a href="?layer=8">8 – Added end-to-end encryption</a></li><li><a href="?layer=9">9 – Improved big files upload perfomance</a></li><li><a href="?layer=10">10 – Improved chat participants updates</a></li><li><a href="?layer=11">11 – Improved secret chats</a></li><li><a href="?layer=12">12 – New dynamic support</a></li><li><a href="?layer=13">13 – Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 – Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 – Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 – Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 – Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 – Added usernames</a></li><li><a href="?layer=23">23 – Stickers for secret chats</a></li><li><a href="?layer=105">105 – Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 – Login with QR code</a></li><li><a href="?layer=109">109 – Polls v2</a></li><li><a href="?layer=110">110 – People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 – Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 – Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 – PSA</a></li><li><a href="?layer=114">114 – Video thumbs for GIFs</a></li><li><a href="?layer=115">115 – Peek Channel Invite</a></li><li><a href="?layer=116">116 – Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 – WebRTC Phone Calls</a></li><li><a href="?layer=118">118 – Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 – Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 – Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121">121 – SVG-based Outlines for Stickers</a></li><li><a href="?layer=122">122 – Voice Chats</a></li><li><a href="?layer=123">123 – Voice Chat improvements</a></li><li><a href="?layer=124">124 – Expiring Invite links</a></li><li><a href="?layer=125">125 – Voice Chats in Broadcasts</a></li><li><a href="?layer=126">126 – Ban channels in channels</a></li><li><a href="?layer=127">127 – Payments in channels</a></li><li><a href="?layer=128">128 – Microthumbs for User/Chat profile photos</a></li><li><a href="?layer=129">129 – Video Chats</a></li><li><a href="?layer=130">130 – Custom placeholder for bot reply keyboards</a></li><li><a href="?layer=131">131 – Reset 2FA Password after a week</a></li><li><a href="?layer=132">132 – Chat themes</a></li><li><a href="?layer=133"><strong>133 – 64-bit IDs for User/Chat</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/boolFalse" >boolFalse</a>#bc799737 = <a href="/type/Bool" >Bool</a>;
|
||||
<a href="/constructor/boolTrue" >boolTrue</a>#997275b5 = <a href="/type/Bool" >Bool</a>;
|
||||
---functions---
|
||||
<a href="/method/payments.clearSavedInfo" class="current_page_link" >payments.clearSavedInfo</a>#d83d70c1 flags:<a href="/type/%23" >#</a> credentials:flags.0?true info:flags.1?true = <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>
|
||||
<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>credentials</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>Remove saved payment credentials</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>info</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>Clear the last order settings saved by the user</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></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?43"></script>
|
||||
|
||||
<script>backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -2,12 +2,12 @@
|
|||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>messages.getDiscussionMessage</title>
|
||||
<title>stats.getMegagroupStats</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Get discussion message from the associated discussion group of a channel to show it on top of the comment section, without actually joining the group">
|
||||
<meta property="og:title" content="messages.getDiscussionMessage">
|
||||
<meta property="description" content="Get supergroup statistics">
|
||||
<meta property="og:title" content="stats.getMegagroupStats">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Get discussion message from the associated discussion group of a channel to show it on top of the comment section, without actually joining the group">
|
||||
<meta property="og:description" content="Get supergroup statistics">
|
||||
<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="/methods" >All Methods</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/method/messages.getDiscussionMessage" >messages.getDiscussionMessage</a></li></ul></div>
|
||||
<h1 id="dev_page_title">messages.getDiscussionMessage</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="/methods" >All Methods</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/method/stats.getMegagroupStats" >stats.getMegagroupStats</a></li></ul></div>
|
||||
<h1 id="dev_page_title">stats.getMegagroupStats</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Get <a href="/api/threads">discussion message</a> from the <a href="/api/discussion">associated discussion group</a> of a channel to show it on top of the comment section, without actually joining the group</p>
|
||||
<div id="dev_page_content"><p>Get <a href="/api/stats">supergroup statistics</a></p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
@ -52,9 +52,9 @@
|
|||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<pre class="page_scheme"><code><a href="/constructor/messages.discussionMessage" >messages.discussionMessage</a>#a6341782 flags:<a href="/type/%23" >#</a> messages:<a href="/type/Vector%20t" >Vector</a><<a href="/type/Message" >Message</a>> max_id:flags.0?<a href="/type/int" >int</a> read_inbox_max_id:flags.1?<a href="/type/int" >int</a> read_outbox_max_id:flags.2?<a href="/type/int" >int</a> unread_count:<a href="/type/int" >int</a> chats:<a href="/type/Vector%20t" >Vector</a><<a href="/type/Chat" >Chat</a>> users:<a href="/type/Vector%20t" >Vector</a><<a href="/type/User" >User</a>> = <a href="/type/messages.DiscussionMessage" >messages.DiscussionMessage</a>;
|
||||
<pre class="page_scheme"><code><a href="/constructor/stats.megagroupStats" >stats.megagroupStats</a>#ef7ff916 period:<a href="/type/StatsDateRangeDays" >StatsDateRangeDays</a> members:<a href="/type/StatsAbsValueAndPrev" >StatsAbsValueAndPrev</a> messages:<a href="/type/StatsAbsValueAndPrev" >StatsAbsValueAndPrev</a> viewers:<a href="/type/StatsAbsValueAndPrev" >StatsAbsValueAndPrev</a> posters:<a href="/type/StatsAbsValueAndPrev" >StatsAbsValueAndPrev</a> growth_graph:<a href="/type/StatsGraph" >StatsGraph</a> members_graph:<a href="/type/StatsGraph" >StatsGraph</a> new_members_by_source_graph:<a href="/type/StatsGraph" >StatsGraph</a> languages_graph:<a href="/type/StatsGraph" >StatsGraph</a> messages_graph:<a href="/type/StatsGraph" >StatsGraph</a> actions_graph:<a href="/type/StatsGraph" >StatsGraph</a> top_hours_graph:<a href="/type/StatsGraph" >StatsGraph</a> weekdays_graph:<a href="/type/StatsGraph" >StatsGraph</a> top_posters:<a href="/type/Vector%20t" >Vector</a><<a href="/type/StatsGroupTopPoster" >StatsGroupTopPoster</a>> top_admins:<a href="/type/Vector%20t" >Vector</a><<a href="/type/StatsGroupTopAdmin" >StatsGroupTopAdmin</a>> top_inviters:<a href="/type/Vector%20t" >Vector</a><<a href="/type/StatsGroupTopInviter" >StatsGroupTopInviter</a>> users:<a href="/type/Vector%20t" >Vector</a><<a href="/type/User" >User</a>> = <a href="/type/stats.MegagroupStats" >stats.MegagroupStats</a>;
|
||||
---functions---
|
||||
<a href="/method/messages.getDiscussionMessage" class="current_page_link" >messages.getDiscussionMessage</a>#446972fd peer:<a href="/type/InputPeer" >InputPeer</a> msg_id:<a href="/type/int" >int</a> = <a href="/type/messages.DiscussionMessage" >messages.DiscussionMessage</a>;</code></pre></p>
|
||||
<a href="/method/stats.getMegagroupStats" class="current_page_link" >stats.getMegagroupStats</a>#dcdf8607 flags:<a href="/type/%23" >#</a> dark:flags.0?true channel:<a href="/type/InputChannel" >InputChannel</a> = <a href="/type/stats.MegagroupStats" >stats.MegagroupStats</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,19 +66,24 @@
|
|||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><strong>peer</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/InputPeer">InputPeer</a></td>
|
||||
<td><a href="/api/channel">Channel ID</a></td>
|
||||
<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>msg_id</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/int">int</a></td>
|
||||
<td>Message ID</td>
|
||||
<td><strong>dark</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 to enable dark theme for graph colors</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>channel</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/InputChannel">InputChannel</a></td>
|
||||
<td><a href="/api/channel">Supergroup ID</a></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/messages.DiscussionMessage">messages.DiscussionMessage</a></p>
|
||||
<p><a href="/type/stats.MegagroupStats">stats.MegagroupStats</a></p>
|
||||
<h3><a class="anchor" href="#possible-errors" id="possible-errors" name="possible-errors"><i class="anchor-icon"></i></a>Possible errors</h3>
|
||||
<table class="table">
|
||||
<thead>
|
||||
|
@ -91,23 +96,26 @@
|
|||
<tbody>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>MSG_ID_INVALID</td>
|
||||
<td>Invalid message ID provided.</td>
|
||||
<td>CHANNEL_INVALID</td>
|
||||
<td>The provided channel is invalid.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>PEER_ID_INVALID</td>
|
||||
<td>The provided peer id is invalid.</td>
|
||||
<td>CHAT_ADMIN_REQUIRED</td>
|
||||
<td>You must be an admin in this chat to do this.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>MEGAGROUP_REQUIRED</td>
|
||||
<td>You can only use this method on a supergroup.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
|
||||
<h4><a class="anchor" href="#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="#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="#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></div>
|
||||
<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></div>
|
||||
|
||||
</div>
|
||||
|
|
@ -1,212 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>stats.getMessagePublicForwards</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Obtains a list of messages, indicating to which other public channels was a channel message forwarded. Will return a list of messages with peer_id equal to the public channel to which this message was forwarded.">
|
||||
<meta property="og:title" content="stats.getMessagePublicForwards">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Obtains a list of messages, indicating to which other public channels was a channel message forwarded. Will return a list of messages with peer_id equal to the public channel to which this message was forwarded.">
|
||||
<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?215" 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="/methods" >All Methods</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/method/stats.getMessagePublicForwards" >stats.getMessagePublicForwards</a></li></ul></div>
|
||||
<h1 id="dev_page_title">stats.getMessagePublicForwards</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Obtains a list of messages, indicating to which other public channels was a channel message forwarded.<br>
|
||||
Will return a list of <a href="/constructor/message">messages</a> with <code>peer_id</code> equal to the public channel to which this message was forwarded.</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 133 <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="?layer=1">1 – Base layer</a></li><li><a href="?layer=2">2 – New userpic notifications</a></li><li><a href="?layer=3">3 – Send message can trigger link change</a></li><li><a href="?layer=4">4 – Check-in chats</a></li><li><a href="?layer=5">5 – Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 – Foursquare integration</a></li><li><a href="?layer=7">7 – Added wallPaperSolid</a></li><li><a href="?layer=8">8 – Added end-to-end encryption</a></li><li><a href="?layer=9">9 – Improved big files upload perfomance</a></li><li><a href="?layer=10">10 – Improved chat participants updates</a></li><li><a href="?layer=11">11 – Improved secret chats</a></li><li><a href="?layer=12">12 – New dynamic support</a></li><li><a href="?layer=13">13 – Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 – Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 – Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 – Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 – Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 – Added usernames</a></li><li><a href="?layer=23">23 – Stickers for secret chats</a></li><li><a href="?layer=105">105 – Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 – Login with QR code</a></li><li><a href="?layer=109">109 – Polls v2</a></li><li><a href="?layer=110">110 – People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 – Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 – Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 – PSA</a></li><li><a href="?layer=114">114 – Video thumbs for GIFs</a></li><li><a href="?layer=115">115 – Peek Channel Invite</a></li><li><a href="?layer=116">116 – Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 – WebRTC Phone Calls</a></li><li><a href="?layer=118">118 – Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 – Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 – Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121">121 – SVG-based Outlines for Stickers</a></li><li><a href="?layer=122">122 – Voice Chats</a></li><li><a href="?layer=123">123 – Voice Chat improvements</a></li><li><a href="?layer=124">124 – Expiring Invite links</a></li><li><a href="?layer=125">125 – Voice Chats in Broadcasts</a></li><li><a href="?layer=126">126 – Ban channels in channels</a></li><li><a href="?layer=127">127 – Payments in channels</a></li><li><a href="?layer=128">128 – Microthumbs for User/Chat profile photos</a></li><li><a href="?layer=129">129 – Video Chats</a></li><li><a href="?layer=130">130 – Custom placeholder for bot reply keyboards</a></li><li><a href="?layer=131">131 – Reset 2FA Password after a week</a></li><li><a href="?layer=132">132 – Chat themes</a></li><li><a href="?layer=133"><strong>133 – 64-bit IDs for User/Chat</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/messages.messages" >messages.messages</a>#8c718e87 messages:<a href="/type/Vector%20t" >Vector</a><<a href="/type/Message" >Message</a>> chats:<a href="/type/Vector%20t" >Vector</a><<a href="/type/Chat" >Chat</a>> users:<a href="/type/Vector%20t" >Vector</a><<a href="/type/User" >User</a>> = <a href="/type/messages.Messages" >messages.Messages</a>;
|
||||
<a href="/constructor/messages.messagesSlice" >messages.messagesSlice</a>#3a54685e flags:<a href="/type/%23" >#</a> inexact:flags.1?true 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><<a href="/type/Message" >Message</a>> chats:<a href="/type/Vector%20t" >Vector</a><<a href="/type/Chat" >Chat</a>> users:<a href="/type/Vector%20t" >Vector</a><<a href="/type/User" >User</a>> = <a href="/type/messages.Messages" >messages.Messages</a>;
|
||||
<a href="/constructor/messages.channelMessages" >messages.channelMessages</a>#64479808 flags:<a href="/type/%23" >#</a> inexact:flags.1?true 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><<a href="/type/Message" >Message</a>> chats:<a href="/type/Vector%20t" >Vector</a><<a href="/type/Chat" >Chat</a>> users:<a href="/type/Vector%20t" >Vector</a><<a href="/type/User" >User</a>> = <a href="/type/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/stats.getMessagePublicForwards" class="current_page_link" >stats.getMessagePublicForwards</a>#5630281b channel:<a href="/type/InputChannel" >InputChannel</a> msg_id:<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>
|
||||
<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>channel</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/InputChannel">InputChannel</a></td>
|
||||
<td>Source channel</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>msg_id</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/int">int</a></td>
|
||||
<td>Source message ID</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>offset_rate</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/int">int</a></td>
|
||||
<td>Initially 0, then set to the <code>next_rate</code> parameter of <a href="/constructor/messages.messagesSlice">messages.messagesSlice</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>offset_peer</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/InputPeer">InputPeer</a></td>
|
||||
<td><a href="/api/offsets">Offsets for pagination, for more info click here</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>offset_id</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/int">int</a></td>
|
||||
<td><a href="/api/offsets">Offsets for pagination, for more info click here</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>limit</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/int">int</a></td>
|
||||
<td>Maximum number of results to return, <a href="/api/offsets">see pagination</a></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/messages.Messages">messages.Messages</a></p>
|
||||
<h3><a class="anchor" href="#possible-errors" id="possible-errors" name="possible-errors"><i class="anchor-icon"></i></a>Possible errors</h3>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Code</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHANNEL_INVALID</td>
|
||||
<td>The provided channel is invalid.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHAT_ADMIN_REQUIRED</td>
|
||||
<td>You must be an admin in this chat to do this.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>MESSAGE_ID_INVALID</td>
|
||||
<td>The provided message id is invalid.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
|
||||
<h4><a class="anchor" href="#messagesmessagesslice" id="messagesmessagesslice" name="messagesmessagesslice"><i class="anchor-icon"></i></a><a href="/constructor/messages.messagesSlice">messages.messagesSlice</a></h4>
|
||||
<p>Incomplete list of messages and auxiliary data.</p>
|
||||
<h4><a class="anchor" href="#pagination-in-the-api" id="pagination-in-the-api" name="pagination-in-the-api"><i class="anchor-icon"></i></a><a href="/api/offsets">Pagination in the API</a></h4>
|
||||
<p>How to fetch results from large lists of objects.</p>
|
||||
<h4><a class="anchor" href="#message" id="message" name="message"><i class="anchor-icon"></i></a><a href="/constructor/message">message</a></h4>
|
||||
<p>A message</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?43"></script>
|
||||
|
||||
<script>backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
260
data/core.telegram.org/mtproto.html
Normal file
260
data/core.telegram.org/mtproto.html
Normal file
|
@ -0,0 +1,260 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>MTProto Mobile Protocol</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Please feel free to check out our FAQ for the Technically Inclined.
|
||||
Client developers are required to comply with the Security…">
|
||||
<meta property="og:title" content="MTProto Mobile Protocol">
|
||||
<meta property="og:image" content="58401119934796773c">
|
||||
<meta property="og:description" content="Please feel free to check out our FAQ for the Technically Inclined.
|
||||
Client developers are required to comply with the Security…">
|
||||
<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?215" 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="active"><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">MTProto Mobile Protocol</h1>
|
||||
|
||||
<div id="dev_page_content"><!-- scroll_nav -->
|
||||
|
||||
<blockquote>
|
||||
<p>Please feel free to check out our <a href="http://core.telegram.org/techfaq">FAQ for the Technically Inclined</a>.
|
||||
Client developers are required to comply with the <a href="/mtproto/security_guidelines">Security Guidelines</a>.</p>
|
||||
</blockquote>
|
||||
<h3><a class="anchor" href="#related-articles" id="related-articles" name="related-articles"><i class="anchor-icon"></i></a>Related articles</h3>
|
||||
<p><div class="dev_page_nav_wrap"></p>
|
||||
<ul>
|
||||
<li>
|
||||
<p><a href="/mtproto/description">Mobile Protocol: Detailed Description</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="/mtproto/auth_key">Creating an Authorization Key</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="/mtproto/samples-auth_key">Creating an Authorization Key: Example</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="/mtproto/service_messages">Mobile Protocol: Service Messages</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="/mtproto/service_messages_about_messages">Mobile Protocol: Service Messages about Messages</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="/mtproto/serialize">Binary Data Serialization</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="/mtproto/TL">TL Language</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="/schema/mtproto">MTProto TL-schema</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="/api/end-to-end">End-to-end encryption, Secret Chats</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="/schema/end-to-end">End-to-end TL-schema</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="/mtproto/security_guidelines">Security Guidelines for Client Software Developers</a></p>
|
||||
</li>
|
||||
</ul>
|
||||
<p></div></p>
|
||||
<hr>
|
||||
<p>This page deals with the basic layer of MTProto encryption used for Cloud chats (server-client encryption). See also:</p>
|
||||
<ul>
|
||||
<li><a href="/api/end-to-end">Secret Chats, end-to-end-encryption</a></li>
|
||||
<li><a href="/api/end-to-end/voice-calls">End-to-end encrypted Voice Calls</a></li>
|
||||
</ul>
|
||||
<h3><a class="anchor" href="#general-description" id="general-description" name="general-description"><i class="anchor-icon"></i></a>General Description</h3>
|
||||
<p>The protocol is designed for access to a server API from applications running on mobile devices. It must be emphasized that a web browser is not such an application.</p>
|
||||
<p>The protocol is subdivided into three virtually independent components:</p>
|
||||
<ul>
|
||||
<li>High-level component (API query language): defines the method whereby API queries and responses are converted to binary <em>messages</em>.</li>
|
||||
<li>Cryptographic (authorization) layer: defines the method by which messages are encrypted prior to being transmitted through the transport protocol.</li>
|
||||
<li>Transport component: defines the method for the client and the server to transmit messages over some other existing network protocol (such as HTTP, HTTPS, WS (plain websockets), WSS (websockets over HTTPS), TCP, UDP).</li>
|
||||
</ul>
|
||||
<div><a href="/file/811140746/2/CzMyJPVnPo8.81605/c2310d6ede1a5e220f">
|
||||
<img src="/file/811140746/2/CzMyJPVnPo8.81605/c2310d6ede1a5e220f" alt="MTProto 2.0, server-client encryption, cloud chats" class="dev_page_image" style="max-width: 600px;">
|
||||
</a></div>
|
||||
<blockquote>
|
||||
<p>As of version 4.6, major Telegram clients are using <strong>MTProto 2.0</strong>, described in this article.
|
||||
MTProto v1.0 (<a href="/mtproto_v1">described here</a> for reference) is deprecated and is currently being phased out. </p>
|
||||
</blockquote>
|
||||
<h3><a class="anchor" href="#brief-component-summary" id="brief-component-summary" name="brief-component-summary"><i class="anchor-icon"></i></a>Brief Component Summary</h3>
|
||||
<h4><a class="anchor" href="#high-level-component-rpc-query-languageapi" id="high-level-component-rpc-query-languageapi" name="high-level-component-rpc-query-languageapi"><i class="anchor-icon"></i></a>High-Level Component (RPC Query Language/API)</h4>
|
||||
<p>From the standpoint of the high-level component, the client and the server exchange <em>messages</em> inside a <em>session</em>. The session is attached to the client device (the application, to be more exact) rather than a specific websocket/http/https/tcp connection. In addition, each session is attached to a <em>user key ID</em> by which authorization is actually accomplished.</p>
|
||||
<p>Several connections to a server may be open; messages may be sent in either direction through any of the connections (a response to a query is not necessarily returned through the same connection that carried the original query, although most often, that is the case; however, in no case can a message be returned through a connection belonging to a different session). When the UDP protocol is used, a response might be returned by a different IP address than the one to which the query had been sent.</p>
|
||||
<p>There are several types of messages:</p>
|
||||
<ul>
|
||||
<li>RPC calls (client to server): calls to API methods</li>
|
||||
<li>RPC responses (server to client): results of RPC calls</li>
|
||||
<li>Message received acknowledgment (or rather, notification of status of a set of messages)</li>
|
||||
<li>Message status query</li>
|
||||
<li><em>Multipart message</em> or <em>container</em> (a container that holds several messages; needed to send several RPC calls at once over an HTTP connection, for example; also, a container may support gzip).</li>
|
||||
</ul>
|
||||
<p>From the standpoint of lower level protocols, a message is a binary data stream aligned along a 4 or 16-byte boundary. The first several fields in the message are fixed and are used by the cryptographic/authorization system.</p>
|
||||
<p>Each message, either individual or inside a container, consists of a <em>message identifier</em> (64 bits, see below), a <em>message sequence number within a session</em> (32 bits), the <em>length</em> (of the message body in bytes; 32 bits), and a <em>body</em> (any size which is a multiple of 4 bytes). In addition, when a container or a single message is sent, an <em>internal header</em> is added at the top (see below), then the entire message is encrypted, and an <em>external header</em> is placed at the top of the message (a 64-bit <em>key identifier</em> and a 128-bit <em>message key</em>).</p>
|
||||
<p>A <em>message body</em> normally consists of a 32-bit <em>message type</em> followed by type-dependent <em>parameters</em>. In particular, each RPC function has a corresponding message type. For more detail, see <a href="/mtproto/serialize">Binary Data Serialization</a>, <a href="/mtproto/service_messages">Mobile Protocol: Service Messages</a>.</p>
|
||||
<p>All numbers are written as little endian. However, very large numbers (2048-bit) used in RSA and DH are written in the big endian format because that is how the OpenSSL library does it.</p>
|
||||
<h4><a class="anchor" href="#authorization-and-encryption" id="authorization-and-encryption" name="authorization-and-encryption"><i class="anchor-icon"></i></a>Authorization and Encryption</h4>
|
||||
<p>Prior to a message (or a multipart message) being transmitted over a network using a transport protocol, it is encrypted in a certain way, and an <em>external header</em> is added at the top of the message which is: a 64-bit <em>key identifier</em> (that uniquely identifies an <em>authorization key</em> for the server as well as the <em>user</em>) and a 128-bit <em>message key</em>. A user key together with the message key defines an actual 256-bit key which is what encrypts the message using AES-256 encryption. Note that the initial part of the message to be encrypted contains variable data (session, message ID, sequence number, server salt) that obviously influences the message key (and thus the AES key and iv). The message key is defined as the 128 middle bits of the SHA256 of the message body (including session, message ID, etc.), including the padding bytes, prepended by 32 bytes taken from the authorization key. Multipart messages are encrypted as a single message.</p>
|
||||
<blockquote>
|
||||
<p>For a technical specification, see <a href="/mtproto/description">Mobile Protocol: Detailed Description</a></p>
|
||||
</blockquote>
|
||||
<p>The first thing a client application must do is <a href="/mtproto/auth_key">create an authorization key</a> which is normally generated when it is first run and almost never changes.</p>
|
||||
<p>The protocol’s principal drawback is that an intruder passively intercepting messages and then somehow appropriating the authorization key (for example, by stealing a device) will be able to decrypt all the intercepted messages <em>post factum</em>. This probably is not too much of a problem (by stealing a device, one could also gain access to all the information cached on the device without decrypting anything); however, the following steps could be taken to overcome this weakness:</p>
|
||||
<ul>
|
||||
<li><em>Session keys</em> generated using the Diffie-Hellman protocol and used in conjunction with the authorization and the message keys to select AES parameters. To create these, the first thing a client must do after creating a new session is send a special RPC query to the server (“generate session key”) to which the server will respond, whereupon all subsequent messages within the session are encrypted using the session key as well.</li>
|
||||
<li>Protecting the key stored on the client device with a (text) password; this password is never stored in memory and is entered by a user when starting the application or more frequently (depending on application settings).</li>
|
||||
<li>Data stored (cached) on the user device can also be protected by encryption using an authorization key which, in turn, is to be password-protected. Then, a password will be required to gain access even to that data.</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#time-synchronization" id="time-synchronization" name="time-synchronization"><i class="anchor-icon"></i></a>Time Synchronization</h4>
|
||||
<p>If client time diverges widely from server time, a server may start ignoring client messages, or vice versa, because of an invalid message identifier (which is closely related to creation time). Under these circumstances, the server will send the client a special message containing the correct time and a certain 128-bit salt (either explicitly provided by the client in a special RPC synchronization request or equal to the key of the latest message received from the client during the current session). This message could be the first one in a container that includes other messages (if the time discrepancy is significant but does not as yet result in the client’s messages being ignored).</p>
|
||||
<p>Having received such a message or a container holding it, the client first performs a time synchronization (in effect, simply storing the difference between the server’s time and its own to be able to compute the “correct” time in the future) and then verifies that the message identifiers for correctness.</p>
|
||||
<p>Where a correction has been neglected, the client will have to generate a new session to assure the monotonicity of message identifiers.</p>
|
||||
<h3><a class="anchor" href="#mtproto-transport" id="mtproto-transport" name="mtproto-transport"><i class="anchor-icon"></i></a>MTProto transport</h3>
|
||||
<p>Before being sent using the selected transport protocol, the payload has to be wrapped in a secondary protocol header, defined by the appropriate MTProto transport protocol. </p>
|
||||
<ul>
|
||||
<li><a href="mtproto/mtproto-transports#abridged">Abridged</a></li>
|
||||
<li><a href="mtproto/mtproto-transports#intermediate">Intermediate</a></li>
|
||||
<li><a href="mtproto/mtproto-transports#padded-intermediate">Padded intermediate</a></li>
|
||||
<li><a href="mtproto/mtproto-transports#full">Full</a></li>
|
||||
</ul>
|
||||
<p>The server recognizes these different protocols (and distinguishes them from HTTP, too) by the header.
|
||||
Additionally, the following transport features can be used: </p>
|
||||
<ul>
|
||||
<li><a href="mtproto/mtproto-transports#quick-ack">Quick ack</a></li>
|
||||
<li><a href="mtproto/mtproto-transports#transport-errors">Transport errors</a></li>
|
||||
<li><a href="mtproto/mtproto-transports#transport-obfuscation">Transport obfuscation</a></li>
|
||||
</ul>
|
||||
<p>Example implementations for these protocols can be seen in <a href="https://github.com/tdlib/td/blob/master/td/mtproto/TcpTransport.cpp">tdlib</a> and <a href="https://github.com/danog/MadelineProto/tree/master/src/danog/MadelineProto/Stream/MTProtoTransport">MadelineProto</a>.</p>
|
||||
<h3><a class="anchor" href="#transport" id="transport" name="transport"><i class="anchor-icon"></i></a>Transport</h3>
|
||||
<p>Enables the delivery of encrypted containers together with the external header (hereinafter, <em>Payload</em>) from client to server and back.
|
||||
Multiple transport protocols are defined:</p>
|
||||
<ul>
|
||||
<li><a href="/mtproto/transports#tcp">TCP</a></li>
|
||||
<li><a href="/mtproto/transports#websocket">Websocket</a></li>
|
||||
<li><a href="/mtproto/transports#websocket-over-https">Websocket over HTTPS</a></li>
|
||||
<li><a href="/mtproto/transports#http">HTTP</a></li>
|
||||
<li><a href="/mtproto/transports#https">HTTPS</a></li>
|
||||
<li>UDP</li>
|
||||
</ul>
|
||||
<p>(We shall examine only the first five types.)</p>
|
||||
<h3><a class="anchor" href="#recap" id="recap" name="recap"><i class="anchor-icon"></i></a>Recap</h3>
|
||||
<p>To recap, using the <a href="https://en.wikipedia.org/wiki/OSI_model#Layer_architecture">ISO/OSI stack as comparison</a>: </p>
|
||||
<ul>
|
||||
<li>Layer 7 (Application): <a href="#high-level-component-rpc-query-languageapi">High-level RPC API</a></li>
|
||||
<li>Layer 6 (Presentation): <a href="/mtproto/TL">Type Language</a></li>
|
||||
<li>Layer 5 (Session): <a href="#high-level-component-rpc-query-languageapi">MTProto session</a></li>
|
||||
<li>Layer 4 (Transport):<ul>
|
||||
<li>4.3: <a href="#mtproto-transport">MTProto transport protocol</a></li>
|
||||
<li>4.2: <a href="/mtproto/mtproto-transports#transport-obfuscation">MTProto obfuscation (optional)</a></li>
|
||||
<li>4.1: <a href="#transport">Transport protocol</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Layer 3 (Network): IP</li>
|
||||
<li>Layer 2 (Data link): MAC/LLC</li>
|
||||
<li>Layer 1 (Physical): IEEE 802.3, IEEE 802.11, etc...</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?43"></script>
|
||||
<script src="/js/jquery.min.js?1"></script>
|
||||
<script src="/js/bootstrap.min.js?1"></script>
|
||||
|
||||
<script>window.initDevPageNav&&initDevPageNav();
|
||||
backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
170
data/core.telegram.org/mtproto/TL-polymorph.html
Normal file
170
data/core.telegram.org/mtproto/TL-polymorph.html
Normal file
|
@ -0,0 +1,170 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Polymorphism in TL</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="It should be noted that in the TL schema of the overwhelming majority of API calls the use of polymorphic types is restricted…">
|
||||
<meta property="og:title" content="Polymorphism in TL">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="It should be noted that in the TL schema of the overwhelming majority of API calls the use of polymorphic types is restricted…">
|
||||
<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?215" 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="active"><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="/mtproto" >Mobile Protocol</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/mtproto/TL" >TL Language</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/mtproto/TL-polymorph" >Polymorphism in TL</a></li></ul></div>
|
||||
<h1 id="dev_page_title">Polymorphism in TL</h1>
|
||||
|
||||
<div id="dev_page_content"><p>It should be noted that in the TL schema of the overwhelming majority of API calls the use of polymorphic types is restricted to the Vector type. Nevertheless, having a view of the big picture is still helpful.</p>
|
||||
<h3><a class="anchor" href="#ordinary-inductive-types" id="ordinary-inductive-types" name="ordinary-inductive-types"><i class="anchor-icon"></i></a>Ordinary inductive types</h3>
|
||||
<p>For example, let us consider the IntList, which is defined as follows:</p>
|
||||
<pre><code>int_cons hd:int tl:IntList = IntList;
|
||||
int_nil = IntList;</code></pre>
|
||||
<p>The “int_cons” and “int_nil” constructors as well as the “IntList” type itself are expressions of the following types (writing A : X means that A is an expression of type X):</p>
|
||||
<pre><code>IntList : Type;
|
||||
int_cons : int -> IntList -> IntList;
|
||||
int_nil : IntList;</code></pre>
|
||||
<p>The keyword <em>Type</em> is used to denote the type of all types. Note that Type is not Object (Object is the type of all terms).
|
||||
Here is alternative syntax that could be used in some other functional programming language (but not in TL):</p>
|
||||
<pre><code>NewType IntList :=
|
||||
| int_cons hd:int tl:IntList
|
||||
| int_nil
|
||||
EndType</code></pre>
|
||||
<h3><a class="anchor" href="#polymorphic-type" id="polymorphic-type" name="polymorphic-type"><i class="anchor-icon"></i></a>Polymorphic type</h3>
|
||||
<p>TL supports the following version (curly brackets indicate optional fields, see below):</p>
|
||||
<pre><code>cons {X:Type} hd:X tl:(List X) = List X;
|
||||
nil {X:Type} = List X</code></pre>
|
||||
<p>Here is an alternative formulation in other functional languages with dependent types:</p>
|
||||
<pre><code>NewType List {X:Type} :=
|
||||
| cons {X:Type} hd:X tl:(List X)
|
||||
| nil {X:Type}
|
||||
EndType</code></pre>
|
||||
<p>In any event, these variations are equivalent to one another from the point of view of the formal theory of types and lead to the definition of the following terms:</p>
|
||||
<pre><code>List : Type -> Type;
|
||||
cons : forall (X:Type), X -> List X -> List X;
|
||||
nil : forall (X:Type), X -> List X;</code></pre>
|
||||
<p>In each case, remember that writing “A -> B” is shorthand for “forall (x : A), B” for any variable x not entering into A and B. For example, the “cons” type could be written as follows:</p>
|
||||
<pre><code>cons : forall (X:Type), forall (hd : X), forall (tl : List X), List X</code></pre>
|
||||
<p>or more compactly:</p>
|
||||
<pre><code>cons : forall (X : Type) (hd : X) (tl : List X), List X</code></pre>
|
||||
<p>See <a href="https://en.wikipedia.org/wiki/Calculus_of_constructions">Calculus of constructions</a>. Examples of functional languages with dependent types, which support similar constructions are <a href="https://en.wikipedia.org/wiki/Coq">Coq</a> and <a href="https://en.wikipedia.org/wiki/Agda_%28programming_language%29">Agda</a>.</p>
|
||||
<p>In this case, the entry after a universal quantifier proves to be more content-related than that after an arrow, because the name of a variable bound by the quantifier is used to transmit the name of the corresponding field in the constructor, even if this variable is not used anywhere as it pertains to the expression under the quantifier. Structurally, all of these entries of the “cons” type are equivalent.</p>
|
||||
<h3><a class="anchor" href="#serialization-of-types-values-of-type-type" id="serialization-of-types-values-of-type-type" name="serialization-of-types-values-of-type-type"><i class="anchor-icon"></i></a>Serialization of types (values of type Type)</h3>
|
||||
<p>As we can see, to serialize a value of type List X, which has been obtained by applying the combinator “cons X:Type hd:X tl:(List X) = List X”, we need to:</p>
|
||||
<ol>
|
||||
<li>serialize the name of the “cons” combinator into a 32-bit number;</li>
|
||||
<li>serialize X (as a type, i.e. as a value of type Type) if X is a required parameter;</li>
|
||||
<li>serialize the head of the list (hd) as a value of type X;</li>
|
||||
<li>serialize the tail of the list as a value of the polymorphic type List X. </li>
|
||||
</ol>
|
||||
<p>In the first step, the natural question is which string exactly will be used to calculate the CRC32. It is proposed to take "<code>cons X:Type hd:X tl:List X = List X</code>” without the terminating semicolon and without any parentheses (closed type expressions are unambiguously reconstructed based on their construction’s prefix).</p>
|
||||
<p>In the last step, we recursively resolve the very same problem of serializing a value of type List X; we will consider it resolved based on the assumption of induction in the construction of the value being serialized. We will similarly consider the third step understandable (induction in the construction of the value being serialized). </p>
|
||||
<p>We still need to describe how to transmit (serialize) types, e.g. values of type <strong>Type</strong>. <em>Types in TL schemas currently appear only as constructors’ optional parameters and are therefore never serialized explicitly. Rather, their values are inferred from the previously known type of the value being serialized</em>. </p>
|
||||
<p>For completeness we will describe how it would be possible to serialize types (values of type Type). However, keep in mind that for now this information is not useful. See <a href="/mtproto/TL-types">Type serialization</a>.</p>
|
||||
<h3><a class="anchor" href="#optional-arguments-in-polymorphic-constructors" id="optional-arguments-in-polymorphic-constructors" name="optional-arguments-in-polymorphic-constructors"><i class="anchor-icon"></i></a>Optional arguments in polymorphic constructors</h3>
|
||||
<p>It was stated above that any subset of (the first few) parameters of any constructor can be identified as optional (by enclosing their declarations in curly brackets), but this is not actually entirely accurate. First, these optional parameters can only be of type <code>Type</code> or <code>#</code> (natural numbers). Second, optional parameters must share the return value’s type, otherwise their value cannot be determined.</p>
|
||||
<p>Note that @'''constr-id''' means the constructor’s “full form” (in which all optional parameters become required), while '''constr-id'’ denotes its abbreviated form (without the optional arguments). If there are no optional arguments, then these two forms are the same. Constructors’ full forms are never used at present.</p>
|
||||
<h3><a class="anchor" href="#bare-polymorphic-types" id="bare-polymorphic-types" name="bare-polymorphic-types"><i class="anchor-icon"></i></a>Bare polymorphic types</h3>
|
||||
<p>There is a small problem: if we want to serialize the value of the bare type ‘%pair string int’ or ‘%pair string Y’ (which in TL is usually denoted simply as “pair”, though the form “%Pair” is preferable), we cannot simultaneously use both the full constructor @pair and the partial pair, because the constructor’s name will not be serialized. Therefore, we must differentiate the bare types %@pair (type X, type Y, value x:X, and value y:Y are serialized) and %pair (only x:X and y:Y are serialized; types X and Y are known from the context). In practice, we nearly almost always need the bare type %pair, and this is precisely what “pair” means in the type’s context in TL. Therefore, </p>
|
||||
<pre><code>record name:string map:(List (pair int string)) = Record;</code></pre>
|
||||
<p>will be serialized approximately like we want it to be (the serialization of list elements will consist of the serialization of int and the serialization of string, without any additional headers, types, or combinator names).
|
||||
Incidentally, when calculating the “record” combinator’s name <em>'record'</em> in the example given above, the CRC32 of <code>record name:string map:List pair int string = Record</code> will be computed.</p>
|
||||
<p>Also note that a more precise description of this type would be</p>
|
||||
<pre><code>record name:string map:(List %(Pair int string)) = Record</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?43"></script>
|
||||
|
||||
<script>backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
124
data/core.telegram.org/mtproto/TL-types.html
Normal file
124
data/core.telegram.org/mtproto/TL-types.html
Normal file
|
@ -0,0 +1,124 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Type serialization</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="See Polymorphism in TL and TL Language.
|
||||
It remains to describe how types, e.g. values of type Type, are transmitted (serialized).…">
|
||||
<meta property="og:title" content="Type serialization">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="See Polymorphism in TL and TL Language.
|
||||
It remains to describe how types, e.g. values of type Type, are transmitted (serialized).…">
|
||||
<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?215" 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="active"><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="/mtproto" >Mobile Protocol</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/mtproto/TL" >TL Language</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/mtproto/TL-types" >Type serialization</a></li></ul></div>
|
||||
<h1 id="dev_page_title">Type serialization</h1>
|
||||
|
||||
<div id="dev_page_content"><p>See <a href="/mtproto/TL-polymorph">Polymorphism in TL</a> and <a href="/mtproto/TL">TL Language</a>.</p>
|
||||
<p>It remains to describe how types, e.g. values of type Type, are transmitted (serialized). In general, there is nothing unexpected going on here: we have type constructors of various arities (for example, List is an arity-1 constructor, but IntList is a 0-arity constructor); and if we know that a 32-bit “name” is assigned to each type constructor, there are no further questions -- values of type Type are serialized exactly like values of any other recursive type with a defined set of constructors of differing arity. </p>
|
||||
<p>How can a 32-bit “name” be assigned to a type (a type constructor, to be more exact) such as List or IntList?
|
||||
It is proposed to use the sum of the names of all of its constructors, plus the CRC32 of the string with the designation of the type's name and all of its parameters such as “IntList = Type” or “List X:Type = Type”. This way, the List constructor’s “name” is the sum of the CRC32s of the three strings "List X:Type = Type", "cons X:Type hd:X tl:List X = List X", and "nil X:Type = List X".
|
||||
For “bare” types (which, formally speaking, are subtypes of the corresponding “boxed” type), the situation is somewhat more complicated; the logical negation of the corresponding constructor’s name is used. For built-in bareand boxed types (for example, int and Int), a pseudo-declaration is used (for example, int ? = Int").</p>
|
||||
<ul>
|
||||
<li>This description is somewhat outdated and may be updated in the future. Specifically, how to treat the <code>!</code> modifier has not been explained.*</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?43"></script>
|
||||
|
||||
<script>backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
205
data/core.telegram.org/mtproto/description_v1.html
Normal file
205
data/core.telegram.org/mtproto/description_v1.html
Normal file
|
@ -0,0 +1,205 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Mobile Protocol: Detailed Description (v.1.0, DEPRECATED)</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="This document describes MTProto v.1.0, its status is DEPRECATED.
|
||||
For information on encryption used in up-to-date Telegram…">
|
||||
<meta property="og:title" content="Mobile Protocol: Detailed Description (v.1.0, DEPRECATED)">
|
||||
<meta property="og:image" content="https://core.telegram.org/file/811140187/1/sfBQV3Trp80/3a3c48bad836b853ed">
|
||||
<meta property="og:description" content="This document describes MTProto v.1.0, its status is DEPRECATED.
|
||||
For information on encryption used in up-to-date Telegram…">
|
||||
<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?215" 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="active"><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="/mtproto" >Mobile Protocol</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/mtproto/description_v1" >Mobile Protocol: Detailed Description (v.1.0…</a></li></ul></div>
|
||||
<h1 id="dev_page_title">Mobile Protocol: Detailed Description (v.1.0, DEPRECATED)</h1>
|
||||
|
||||
<div id="dev_page_content"><blockquote>
|
||||
<p>This document describes MTProto <strong>v.1.0</strong>, its status is <strong>DEPRECATED</strong>.
|
||||
For information on encryption used in up-to-date Telegram clients, kindly see <a href="/mtproto/description">this document</a>.</p>
|
||||
</blockquote>
|
||||
<p>Prior to a message (or a multipart message) being transmitted over a network using a transport protocol, it is encrypted in a certain way, and an external header is added at the top of the message which is: a 64-bit key identifier (that uniquely identifies an authorization key for the server as well as the user) and a 128-bit message key. </p>
|
||||
<p>A user key together with the message key define an actual 256-bit key and a 256-bit initialization vector, which is what encrypts the message using AES-256 encryption with infinite garble extension (IGE). Note that the initial part of the message to be encrypted contains variable data (session, message ID, sequence number, server salt) that obviously influences the message key (and thus the AES key and iv). The message key is defined as the 128 lower-order bits of the SHA1 of the message body (including session, message ID, etc.) Multipart messages are encrypted as a single message. </p>
|
||||
<div><a href="/file/811140187/1/sfBQV3Trp80/3a3c48bad836b853ed">
|
||||
<img src="/file/811140187/1/sfBQV3Trp80/3a3c48bad836b853ed" alt="MTProto server-client encryption, cloud chats" class="dev_page_image">
|
||||
</a></div>
|
||||
<h3><a class="anchor" href="#terminology" id="terminology" name="terminology"><i class="anchor-icon"></i></a>Terminology</h3>
|
||||
<h4><a class="anchor" href="#authorization-key" id="authorization-key" name="authorization-key"><i class="anchor-icon"></i></a>Authorization Key</h4>
|
||||
<p>a 2048-bit key shared by the client device and the server, created upon user registration directly on the client device be exchanging Diffie-Hellman keys, and never transmitted over a network. Each authorization key is user-specific. There is nothing that prevents a user from having several keys (that correspond to “permanent sessions” on different devices), and some of these may be locked forever in the event the device is lost. See also <a href="/mtproto/auth_key">Creating an Authorization Key</a>.</p>
|
||||
<h4><a class="anchor" href="#server-key" id="server-key" name="server-key"><i class="anchor-icon"></i></a>Server Key</h4>
|
||||
<p>a 2048-bit RSA key used by the server digitally to sign its own messages while registration is underway and the authorization key is being generated. The application has a built-in public server key which can be used to verify a signature but cannot be used to sign messages. A private server key is stored on the server and changed very infrequently.</p>
|
||||
<h4><a class="anchor" href="#key-identifier" id="key-identifier" name="key-identifier"><i class="anchor-icon"></i></a>Key Identifier</h4>
|
||||
<p>The 64 lower-order bits of the SHA1 hash of the authorization key are used to indicate which particular key was used to encrypt a message. Keys must be uniquely defined by the 64 lower-order bits of their SHA1, and in the event of a collision, an authorization key is regenerated. A zero key identifier means that encryption is not used which is permissible for a limited set of message types used during registration to generate an authorization key based on a Diffie-Hellman exchange.</p>
|
||||
<h4><a class="anchor" href="#session" id="session" name="session"><i class="anchor-icon"></i></a>Session</h4>
|
||||
<p>a (random) 64-bit number generated by the client to distinguish between individual sessions (for example, between different instances of the application, created with the same authorization key). The session in conjunction with the key identifier corresponds to an application instance. The server can maintain session state. <em>Under no circumstances can a message meant for one session be sent into a different session</em>. The server may unilaterally forget any client sessions; clients should be able to handle this. </p>
|
||||
<h4><a class="anchor" href="#server-salt" id="server-salt" name="server-salt"><i class="anchor-icon"></i></a>Server Salt</h4>
|
||||
<p>a (random) 64-bit number periodically (say, every 24 hours) changed (separately for each session) at the request of the server. All subsequent messages must contain the new salt (although, messages with the old salt are still accepted for a further 300 seconds). Required to protect against replay attacks and certain tricks associated with adjusting the client clock to a moment in the distant future.</p>
|
||||
<h4><a class="anchor" href="#message-identifier-msg-id" id="message-identifier-msg-id" name="message-identifier-msg-id"><i class="anchor-icon"></i></a>Message Identifier (msg_id)</h4>
|
||||
<p>a (time-dependent) 64-bit number used uniquely to identify a message within a session. Client message identifiers are divisible by 4, server message identifiers modulo 4 yield 1 if the message is a response to a client message, and 3 otherwise. Client message identifiers must increase monotonically (within a single session), the same as server message identifiers, and must approximately equal unixtime*2^32. This way, a message identifier points to the approximate moment in time the message was created. A message is rejected over 300 seconds after it is created or 30 seconds before it is created (this is needed to protect from replay attacks). In this situation, it must be re-sent with a different identifier (or placed in a container with a higher identifier). The identifier of a message container must be strictly greater than those of its nested messages.</p>
|
||||
<p><strong>Important</strong>: to counter replay-attacks the lower 32 bits of <strong>msg_id</strong> passed by the client must not be empty and must present a fractional part of the time point when the message was created. At some point in the nearest future the server will start ignoring messages, in which the lower 32 bits of <strong>msg_id</strong> contain too many zeroes.</p>
|
||||
<h4><a class="anchor" href="#content-related-message" id="content-related-message" name="content-related-message"><i class="anchor-icon"></i></a>Content-related Message</h4>
|
||||
<p>A message requiring an explicit acknowledgment. These include all the user and many service messages, virtually all with the exception of containers and acknowledgments. </p>
|
||||
<h4><a class="anchor" href="#message-sequence-number-msg-seqno" id="message-sequence-number-msg-seqno" name="message-sequence-number-msg-seqno"><i class="anchor-icon"></i></a>Message Sequence Number (msg_seqno)</h4>
|
||||
<p>a 32-bit number equal to twice the number of “content-related” messages (those requiring acknowledgment, and in particular those that are not containers) created by the sender prior to this message and subsequently incremented by one if the current message is a content-related message. A container is always generated after its entire contents; therefore, its sequence number is greater than or equal to the sequence numbers of the messages contained in it.</p>
|
||||
<h4><a class="anchor" href="#message-key" id="message-key" name="message-key"><i class="anchor-icon"></i></a>Message Key</h4>
|
||||
<p>The lower-order 128 bits of the SHA1 hash of the part of the message to be encrypted (including the internal header and excluding the alignment bytes).</p>
|
||||
<h4><a class="anchor" href="#internal-cryptographic-header" id="internal-cryptographic-header" name="internal-cryptographic-header"><i class="anchor-icon"></i></a>Internal (cryptographic) Header</h4>
|
||||
<p>A header (16 bytes) added before a message or a container before it is all encrypted together. Consists of the server salt (64 bits) and the session (64 bits).</p>
|
||||
<h4><a class="anchor" href="#external-cryptographic-header" id="external-cryptographic-header" name="external-cryptographic-header"><i class="anchor-icon"></i></a>External (cryptographic) Header</h4>
|
||||
<p>A header (24 bytes) added before an encrypted message or a container. Consists of a key identifier (64 bits) and a message key (128 bits).</p>
|
||||
<h4><a class="anchor" href="#payload" id="payload" name="payload"><i class="anchor-icon"></i></a>Payload</h4>
|
||||
<p>External header + encrypted message or container.</p>
|
||||
<h3><a class="anchor" href="#defining-aes-key-and-initialization-vector" id="defining-aes-key-and-initialization-vector" name="defining-aes-key-and-initialization-vector"><i class="anchor-icon"></i></a>Defining AES Key and Initialization Vector</h3>
|
||||
<p>The 2048-bit authorization key (auth_key) and the 128-bit message key (msg_key) are used to compute a 256-bit AES key (aes_key) and a 256-bit initialization vector (aes_iv) which are subsequently used to encrypt the part of the message to be encrypted (i. e. everything with the exception of the external header which is added later) with AES-256 in infinite garble extension (IGE) mode.</p>
|
||||
<p>The algorithm for computing aes_key and aes_iv from auth_key and msg_key is as follows:</p>
|
||||
<ul>
|
||||
<li>msg_key = substr (SHA1 (plaintext), 4, 16);</li>
|
||||
<li>sha1_a = SHA1 (msg_key + substr (auth_key, x, 32));</li>
|
||||
<li>sha1_b = SHA1 (substr (auth_key, 32+x, 16) + msg_key + substr (auth_key, 48+x, 16));</li>
|
||||
<li>sha1_с = SHA1 (substr (auth_key, 64+x, 32) + msg_key);</li>
|
||||
<li>sha1_d = SHA1 (msg_key + substr (auth_key, 96+x, 32));</li>
|
||||
<li>aes_key = substr (sha1_a, 0, 8) + substr (sha1_b, 8, 12) + substr (sha1_c, 4, 12);</li>
|
||||
<li>aes_iv = substr (sha1_a, 8, 12) + substr (sha1_b, 0, 8) + substr (sha1_c, 16, 4) + substr (sha1_d, 0, 8);</li>
|
||||
</ul>
|
||||
<p>where x = 0 for messages from client to server and x = 8 for those from server to client.</p>
|
||||
<p>The lower-order 1024 bits of auth_key are not involved in the computation. They may (together with the remaining bits or separately) be used on the client device to encrypt the local copy of the data received from the server. The 512 lower-order bits of auth_key are not stored on the server; therefore, if the client device uses them to encrypt local data and the user loses the key or the password, data decryption of local data is impossible (even if data from the server could be obtained).</p>
|
||||
<p>When AES is used to encrypt a block of data of a length not divisible by 16 bytes, the data is padded with random bytes to the smallest length divisible by 16 bytes immediately prior to being encrypted.</p>
|
||||
<h3><a class="anchor" href="#important-tests" id="important-tests" name="important-tests"><i class="anchor-icon"></i></a>Important Tests</h3>
|
||||
<p>When an encrypted message is received, it <em>must</em> be checked that msg_key is <em>in fact</em> equal to the 128 lower-order bits of the SHA1 hash of the previously encrypted portion, and that msg_id has even parity for messages from client to server, and odd parity for messages from server to client.</p>
|
||||
<p>In addition, the identifiers (msg_id) of the last N messages received from the other side must be stored, and if a message comes in with msg_id lower than all or equal to any of the stored values, the message is to be ignored. Otherwise, the new message msg_id is added to the set, and, if the number of stored msg_id values is greater than N, the oldest (i. e. the lowest) is forgotten.</p>
|
||||
<p>In addition, msg_id values that belong over 30 seconds in the future or over 300 seconds in the past are to be ignored. This is especially important for the server. The client would also find this useful (to protect from a replay attack), but only if it is certain of its time (for example, if its time has been synchronized with that of the server).</p>
|
||||
<p>Certain client-to-server service messages containing data sent by the client to the server (for example, msg_id of a recent client query) may, nonetheless, be processed on the client even if the time appears to be “incorrect”. This is especially true of messages to change server_salt and notifications of invalid client time. See <a href="/mtproto/service_messages">Mobile Protocol: Service Messages</a>.</p>
|
||||
<h3><a class="anchor" href="#storing-an-authorization-key-on-a-client-device" id="storing-an-authorization-key-on-a-client-device" name="storing-an-authorization-key-on-a-client-device"><i class="anchor-icon"></i></a>Storing an Authorization Key on a Client Device</h3>
|
||||
<p>It may be suggested to users concerned with security that they password protect the authorization key in approximately the same way as in ssh. This is accomplished by adding the SHA1 of the key to the front of the key, following which the entire string is encrypted using AES in CBC mode and a key equal to the user’s (text) password. When the user inputs the password, the stored protected password is decrypted and verified by being compared with SHA1. From the user’s standpoint, this is practically the same as using an application or a website password.</p>
|
||||
<h3><a class="anchor" href="#unencrypted-messages" id="unencrypted-messages" name="unencrypted-messages"><i class="anchor-icon"></i></a>Unencrypted Messages</h3>
|
||||
<p>Special plain-text messages may be used to create an authorization key as well as to perform a time synchronization. They begin with auth_key_id = 0 (64 bits) which means that there is no auth_key. This is followed directly by the message body in serialized format without internal or external headers. A message identifier (64 bits) and body length in bytes (32 bytes) are added before the message body.</p>
|
||||
<p>Only a very limited number of messages of special types can be transmitted as plain text. </p>
|
||||
<h3><a class="anchor" href="#schematic-presentation-of-messages" id="schematic-presentation-of-messages" name="schematic-presentation-of-messages"><i class="anchor-icon"></i></a>Schematic Presentation of Messages</h3>
|
||||
<h4><a class="anchor" href="#encrypted-message" id="encrypted-message" name="encrypted-message"><i class="anchor-icon"></i></a>Encrypted Message</h4>
|
||||
<table class="table"><tr>
|
||||
<td><a href="#key-identifier"><strong>auth_key_id</strong></a><br>int64</td>
|
||||
<td><a href="#message-key"><strong>msg_key</strong></a><br>int128</td>
|
||||
<td><a href="#encrypted-message-encrypted-data"><strong>encrypted_data</strong></a><br>bytes</td>
|
||||
</tr></table>
|
||||
<h4><a class="anchor" href="#encrypted-message-encrypted-data" id="encrypted-message-encrypted-data" name="encrypted-message-encrypted-data"><i class="anchor-icon"></i></a>Encrypted Message: <em>encrypted_data</em></h4>
|
||||
<p>Contains the cypher text for the following data:</p>
|
||||
<table class="table"><tr>
|
||||
<td><a href="#server-salt"><strong>salt</strong></a><br>int64</td>
|
||||
<td><a href="#session"><strong>session_id</strong></a><br>int64</td>
|
||||
<td><a href="#message-identifier-msg-id"><strong>message_id</strong></a><br>int64</td>
|
||||
<td><a href="#message-sequence-number-msg-seqno"><strong>seq_no</strong></a><br>int32</td>
|
||||
<td><strong>message_data_length</strong><br>int32</td>
|
||||
<td><strong>message_data</strong><br>bytes</td>
|
||||
<td><strong>padding</strong> 0..15<br>bytes</td>
|
||||
</tr></table>
|
||||
<h4><a class="anchor" href="#unencrypted-message" id="unencrypted-message" name="unencrypted-message"><i class="anchor-icon"></i></a>Unencrypted Message</h4>
|
||||
<table class="table"><tr>
|
||||
<td><a href="#key-identifier"><strong>auth_key_id</strong></a> = <code>0</code><br>int64</td>
|
||||
<td><a href="#message-identifier-msg-id"><strong>message_id</strong></a><br>int64</td>
|
||||
<td><strong>message_data_length</strong><br>int32</td>
|
||||
<td><strong>message_data</strong><br>bytes</td>
|
||||
</tr></table>
|
||||
<h3><a class="anchor" href="#creating-an-authorization-key" id="creating-an-authorization-key" name="creating-an-authorization-key"><i class="anchor-icon"></i></a>Creating an Authorization Key</h3>
|
||||
<p>An authorization key is normally created once for every user during the application installation process immediately prior to registration. Registration itself, in actuality, occurs after the authorization key is created. However, a user may be prompted to complete the registration form while the authorization key is being generated in the background. Intervals between user key strokes may be used as a source of entropy in the generation of high-quality random numbers required for the creation of an authorization key.</p>
|
||||
<p>See <a href="/mtproto/auth_key">Creating an Authorization Key</a>.</p>
|
||||
<p>During the creation of the authorization key, the client obtains its server salt (to be used with the new key for all communication in the near future). The client then creates an encrypted session using the newly generated key, and subsequent communication occurs within that session (including the transmission of the user's registration information and phone number validation) unless the client creates a new session. The client is free to create new or additional sessions at any time by choosing a new random session_id.</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?43"></script>
|
||||
|
||||
<script>backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
240
data/core.telegram.org/mtproto/serialize.html
Normal file
240
data/core.telegram.org/mtproto/serialize.html
Normal file
|
@ -0,0 +1,240 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Binary Data Serialization</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="MTProto operation requires that elementary and composite data types as well as queries to which such data types are passed…">
|
||||
<meta property="og:title" content="Binary Data Serialization">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="MTProto operation requires that elementary and composite data types as well as queries to which such data types are passed…">
|
||||
<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?215" 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="active"><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="/mtproto" >Mobile Protocol</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/mtproto/serialize" >Binary Data Serialization</a></li></ul></div>
|
||||
<h1 id="dev_page_title">Binary Data Serialization</h1>
|
||||
|
||||
<div id="dev_page_content"><p>MTProto operation requires that elementary and composite data types as well as queries to which such data types are passed as arguments or by which they are returned, be transmitted in binary format (i. e. <em>serialized</em>) .
|
||||
The <a href="/mtproto/TL">TL language</a> is used to describe the data types to be serialized.</p>
|
||||
<h3><a class="anchor" href="#general-definitions" id="general-definitions" name="general-definitions"><i class="anchor-icon"></i></a>General Definitions</h3>
|
||||
<p>For our purposes, we can identify a <em>type</em> with the set of its <em>(serialized) values</em> understood as strings (finite sequences) of 32-bit numbers (transmitted in little endian order). </p>
|
||||
<p>Therefore:</p>
|
||||
<ul>
|
||||
<li><em>Alphabet</em> (A), in this case, is a set of 32-bit numbers (normally, signed, i. e. between -2^31 and 2^31 - 1). </li>
|
||||
<li><em>Value</em>, in this case, is the same as a <em>string in Alphabet A</em>, i. e. a finite (possibly, empty) sequence of 32-bit numbers. The set of all such sequences is designated as <em>A*</em>. </li>
|
||||
<li><em>Type</em>, for our purposes, is the same as the set of legal values of a type, i. e. some set T which is a subset of A* and is a prefix code (i. e. no element of T may be a prefix for any other element). Therefore, any sequence from A* can contain no more than one prefix that is a member of T. </li>
|
||||
<li><em>Value of Type T</em> is any sequence (value) which is a member of T as a subset of A*. </li>
|
||||
<li><em>Compatible Types</em> are the types T and T’ not intersecting as subsets of A*, such that the union of T and T' is a prefix code. </li>
|
||||
<li><em>Coordinated System of Types</em> is a finite or infinite set of types T_1, ..., T_n, ..., such that any two types from this set are compatible. </li>
|
||||
<li><em>Data Type</em> is the same as <em>type</em> in the sense of the definition above. </li>
|
||||
<li><em>Functional Type</em> is a type describing a function; it is not a type in the sense of the definition above. Initially, we ignore the existence of functional types and describe only the data types; however, in reality, functional types will later be implemented in some extension of this system using the so-called <em>temporary combinators</em>. </li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#combinators-constructors-composite-data-types" id="combinators-constructors-composite-data-types" name="combinators-constructors-composite-data-types"><i class="anchor-icon"></i></a>Combinators, Constructors, Composite Data Types</h4>
|
||||
<ul>
|
||||
<li>
|
||||
<p><em>Combinator</em> is a function that takes arguments of certain types and returns a value of some other type. We normally look at combinators whose argument and result types are data types (rather than functional types). </p>
|
||||
</li>
|
||||
<li>
|
||||
<p><em>Arity (of combinator)</em> is a non-negative integer, the number of combinator arguments. </p>
|
||||
</li>
|
||||
<li>
|
||||
<p><em>Combinator identifier</em> is an identifier beginning with a lowercase Roman letter that uniquely identifies a combinator. </p>
|
||||
</li>
|
||||
<li>
|
||||
<p><em>Combinator number</em> or <em>combinator name</em> is a 32-bit number (i.e., an element of A) that uniquely identifies a combinator. Most often, it is CRC32 of the string containing the combinator description without the final semicolon, and with one space between contiguous lexemes. This always falls in the range from 0x01000000 to 0xffffff00. The highest 256 values are reserved for the so-called <em>temporal-logic combinators</em> used to transmit functions. We frequently denote as <em>combinator</em> the combinator name with single quotes: ‘<em>combinator</em>’.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><em>Combinator description</em> is a string of format <code>combinator_name type_arg_1 ... type_arg_N = type_res;</code> where <code>N</code> stands for the arity of the combinator, <code>type_arg_i</code> is the type of the i-th argument (or rather, a string with the combinator name), and <code>type_res</code> is the combinator value type.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><em>Constructor</em> is a combinator that cannot be computed (reduced). This is used to represent composite data types. For example, combinator ‘int_tree’ with description <code>int_tree IntTree int IntTree = IntTree</code>, alongside combinator <code>empty_tree = IntTree</code>, may be used to define a composite data type called “IntTree” that takes on values in the form of binary trees with integers as nodes. </p>
|
||||
</li>
|
||||
<li>
|
||||
<p><em>Function (functional combinator)</em> is a combinator which may be computed (reduced) on condition that the requisite number of arguments of requisite types are provided. The result of the computation is an expression consisting of constructors and base type values only. </p>
|
||||
</li>
|
||||
<li>
|
||||
<p><em>Normal form</em> is an expression consisting only of constructors and base type values; that which is normally the result of computing a function. </p>
|
||||
</li>
|
||||
<li>
|
||||
<p><em>Type identifier</em> is an identifier that normally starts with a capital letter in Roman script and uniquely identifies the type.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><em>Type number</em> or <em>type name</em> is a 32-bit number that uniquely identifies a type; it normally is the sum of the CRC32 values of the descriptions of the type constructors.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><em>Description of (composite) Type T</em> is a collection of the descriptions of all constructors that take on Type <em>T</em> values. This is normally written as text with each string containing the description of a single constructor. Here is a description of Type ‘IntTree’, for example:</p>
|
||||
<p>int_tree IntTree int IntTree = IntTree;
|
||||
empty_tree = IntTree;</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><em>Polymorphic type</em> is a type whose description contains parameters (<em>type variables</em>) in lieu of actual types; approximately, what would be a template in C++. Here is a description of Type <code>List alpha</code> where <code>List</code> is a polymorphic type of arity 1 (i. e., dependent on a single argument), and <code>alpha</code> is a type variable which appears as the constructor’s optional parameter (in curly braces): </p>
|
||||
<p>cons {alpha:Type} alpha (List alpha) = List alpha;
|
||||
nil {alpha:Type} = List alpha;</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><em>Value of (composite) Type T</em> is any sequence from A* in the format <code>constr_num arg1 ... argN</code>, where constr_num is the index number of some Constructor <em>C</em> which takes on values of Type <em>T</em>, and arg_i is a value of Type <em>T_i</em> which is the type of the i-th argument to Constructor <em>C</em>. For example, let Combinator int_tree have the index number 17, whereas Combinator empty_tree has the index number 239. Then, the value of Type <code>IntTree</code> is, for example, <code>17 17 239 1 239 2 239</code> which is more conveniently written as <code>'int_tree' 'int_tree' 'empty_tree' 1 'empty_tree' 2 ‘empty_tree’</code>. From the standpoint of a high-level language, this is <code>int_tree (int_tree (empty_tree) 1 (empty_tree)) 2 (empty_tree): IntTree</code>.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><em>Schema</em> is a collection of all the (composite) data type descriptions. This is used to define some agreed-to system of types.</p>
|
||||
</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#boxed-and-bare-types" id="boxed-and-bare-types" name="boxed-and-bare-types"><i class="anchor-icon"></i></a>Boxed and Bare Types</h4>
|
||||
<ul>
|
||||
<li><em>Boxed type</em> is a type any value of which starts with the constructor number. Since every constructor has a uniquely determined value type, the first number in any boxed type value uniquely defines its type. This guarantees that the various boxed types in totality make up a coordinated system of types. A boxed type identifier is always capitalized.</li>
|
||||
<li><em>Bare type</em> is a type whose values do not contain a constructor number, which is implied instead. A bare type identifier always coincides with the name of the implied constructor (and therefore, begins with a lowercase letter) which may be padded at the front by the percentage sign (%). In addition, if <code>X</code> is a boxed type with no more than a single constructor, then <code>%X</code> refers to the corresponding bare type. The values of a bare type are identical with the set of number sequences obtained by dropping the first number (i. e., the external constructor index number) from the set of values of the corresponding boxed type (which is the result type of the selected constructor), starting with the selected constructor index number. For example, <code>3 4</code> is a value of the <code>int_couple</code> bare type, defined using <code>int_couple int int = IntCouple</code>. The corresponding boxed type is <code>IntCouple</code>; if 404 is the constructor index number for <code>int_couple</code>, then <code>404 3 4</code> is the value for the <code>IntCouple</code> boxed type which corresponds to the value of the bare type <code>int_couple</code> (also known as <code>%int_couple</code> and <code>%IntCouple</code>; the latter form is conceptually preferable but longer).</li>
|
||||
</ul>
|
||||
<p>Conceptually, only boxed types should be used everywhere. However, for speed and compactness, bare types have to be used (for instance, an array of 10,000 bare int values is 40,000 bytes long, whereas boxed Int values take up twice as much space; therefore, when transmitting a large array of integer identifiers, say, it is more efficient to use the <code>Vector int</code> type rather than <code>Vector Int</code>). In addition, all base types (int, long, double, string) are bare.</p>
|
||||
<p>If a boxed type is polymorphic of type arity r, this is also true of any derived bare type. In other words, if one were to define <code>intCouple {alpha:Type} int alpha = IntCouple alpha</code>, then, thereafter, intCouple as an identifier would also be a polymorphic type of arity 1 in combinator (and consequently, in constructor and type) descriptions. The notations <code>intCouple X</code>, <code>%(IntCouple X)</code>, and <code>%IntCouple X</code> are equivalent.</p>
|
||||
<h4><a class="anchor" href="#base-types" id="base-types" name="base-types"><i class="anchor-icon"></i></a>Base Types</h4>
|
||||
<p>Base types exist both as bare (int, long, double, string) and as boxed (Int, Long, Double, String) versions. Their <em>constructor</em> identifiers coincide with the names of the relevant bare types. Their pseudodescriptions have the following appearance:</p>
|
||||
<pre><code>int ? = Int;
|
||||
long ? = Long;
|
||||
double ? = Double;
|
||||
string ? = String;</code></pre>
|
||||
<p>Consequently, the <code>int</code> constructor index number, for example, is the CRC32 of the string <code>"int ? = Int"</code>.</p>
|
||||
<p>The values of bare type <code>int</code> are exactly all the single-element <em>sequences</em>, i. e. numbers between -2^31 and 2^31-1 represent themselves in this case. Values of type <code>long</code> are two-element sequences that are 64-bit signed numbers (little endian again). Values of type <code>double</code>, again, are two-element sequences containing 64-bit real numbers in a standard double format. And finally, the values of type <code>string</code> look differently depending on the length L of the string being serialized:</p>
|
||||
<ul>
|
||||
<li>If L <= 253, the serialization contains one byte with the value of L, then L 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 int(L/4)+1 32-bit numbers. </li>
|
||||
<li>If L >= 254, the serialization contains byte 254, followed by 3 bytes with the string length L, followed by L bytes of the string, further followed by 0 to 3 null padding bytes.</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#object-pseudotype" id="object-pseudotype" name="object-pseudotype"><i class="anchor-icon"></i></a>Object Pseudotype</h4>
|
||||
<p>The <code>Object</code> pseudotype is a “type” which can take on values that belong to any boxed type in the schema. This helps quickly define such types as <em>list of random items</em> without using polymorphic types. It is best not to abuse this capability since it results in the use of dynamic typing. Nonetheless, it is hard to imagine the data structures that we know from PHP and JSON without using the Object pseudotype.</p>
|
||||
<p>It is recommended to use <code>TypedObject</code> instead whenever possible:</p>
|
||||
<pre><code>object X:Type value:X = TypedObject;</code></pre>
|
||||
<h4><a class="anchor" href="#built-in-composite-types-vectors-and-associative-arrays" id="built-in-composite-types-vectors-and-associative-arrays" name="built-in-composite-types-vectors-and-associative-arrays"><i class="anchor-icon"></i></a>Built-In Composite Types: Vectors and Associative Arrays</h4>
|
||||
<p>The Vector t polymorphic pseudotype is a “type” whose value is a sequence of values of any type t, either boxed or bare.</p>
|
||||
<pre><code>vector {t:Type} # [ t ] = Vector t;</code></pre>
|
||||
<p>Serialization always uses the same constructor “vector” (const 0x1cb5c415 = crc32("vector t:Type # [ t ] = Vector t”) that is not dependent on the specific value of the variable of type t. The value of the Vector t type is the index number of the relevant constructor number followed by N, the number of elements in the vector, and then by N values of type t. The value of the optional parameter t is not involved in the serialization since it is derived from the result type (always known prior to deserialization).</p>
|
||||
<p>Polymorphic pseudotypes IntHash t and StrHash t are associative arrays mapping integer and string keys to values of type t. They are, in fact, vectors containing bare 2-tuples (int, t) or (string, t):</p>
|
||||
<pre><code>coupleInt {t:Type} int t = CoupleInt t;
|
||||
intHash {t:Type} (vector %(CoupleInt t)) = IntHash t;
|
||||
coupleStr {t:Type} string t = CoupleStr t;
|
||||
strHash {t:Type} (vector %(CoupleStr t)) = StrHash t;</code></pre>
|
||||
<p>The percentage sign, in this case, means that a bare type that corresponds to the boxed type in parentheses is taken; the boxed type in question must have no more than a single constructor, whatever the values of the parameters.</p>
|
||||
<p>The keys may be sorted or be in some other order (as in PHP arrays). For associative arrays with sorted keys, the IntSortedHash or StrSortedHash alias is used:</p>
|
||||
<pre><code>intSortedHash {t:Type} (intHash t) = IntSortedHash t;
|
||||
strSortedHash {t:Type} (strHash t) = StrSortedHash t;</code></pre>
|
||||
<h4><a class="anchor" href="#polymorphic-type-constructors" id="polymorphic-type-constructors" name="polymorphic-type-constructors"><i class="anchor-icon"></i></a>Polymorphic Type Constructors</h4>
|
||||
<p>The constructor of a polymorphic type does not depend on the specific types to which the polymorphic type is applied. When it is computed, optional parameters (normally containing type variables and placed in curly braces) cease to be optional (the curly braces are removed), and, in addition to that, all parenthesis are also removed. Therefore, </p>
|
||||
<pre><code>vector {t:Type} # [ t ] = Vector t;</code></pre>
|
||||
<p>corresponds to the constructor number crc32("vector t:Type # [ t ] = Vector t") = 0x1cb5c415. During (de)serialization, the specific values of the optional variable t are derived from the result type (i. e. the object being serialized or deserialized) that is always known, and are never serialized explicitly.</p>
|
||||
<p>Previously, it had to be known which specific variable types each polymorphic type will apply to. To accomplish this, the type system used strings of the form</p>
|
||||
<pre><code>polymorphic_type_name type_1 ... type_N;</code></pre>
|
||||
<p>For example,</p>
|
||||
<pre><code>Vector int;
|
||||
Vector string;
|
||||
Vector Object;</code></pre>
|
||||
<p>Now they are ignored.</p>
|
||||
<p>See also <a href="/mtproto/TL-polymorph">polymorphism in TL</a>.</p>
|
||||
<p>In this case, the Object pseudotype permits using Vector Object to store lists of anything (the values of any boxed types). Since bare types are efficient when short, in practice it is unlikely that cases more complex than the ones cited above will be required. </p>
|
||||
<h4><a class="anchor" href="#field-names" id="field-names" name="field-names"><i class="anchor-icon"></i></a>Field Names</h4>
|
||||
<p>Let us say that we need to represent <em>users</em> as triplets containing one integer (user ID) and two strings (first and last names). The requisite data structure is the triplet int, string, string which may be declared as follows:</p>
|
||||
<pre><code>user int string string = User;</code></pre>
|
||||
<p>On the other hand, a group may be described by a similar triplet consisting of a group ID, its name, and description:</p>
|
||||
<pre><code>group int string string = Group;</code></pre>
|
||||
<p>For the difference between User and Group to be clear, it is convenient to assign names to some or all of the fields:</p>
|
||||
<pre><code>user id:int first_name:string last_name:string = User;
|
||||
group id:int title:string description:string = Group;</code></pre>
|
||||
<p>If the User type needs to be extended at a later time by having records with some additional field added to it, it could be accomplished as follows:</p>
|
||||
<pre><code>userv2 id:int unread_messages:int first_name:string last_name:string in_groups:vector int = User;</code></pre>
|
||||
<p>Aside from other things, this approach helps define correct mappings between fields that belong to different constructors of the same type, convert between them as well as convert type values into an associative array with string keys (field names, if defined, are natural choices for such keys).</p>
|
||||
<h3><a class="anchor" href="#tl-language" id="tl-language" name="tl-language"><i class="anchor-icon"></i></a>TL Language</h3>
|
||||
<p>See <a href="/mtproto/TL">TL Language</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?43"></script>
|
||||
|
||||
<script>backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,585 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Example</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="If you'd like to test Telegram Passport, use this page to request data. If you'd like to check out a real-life implementation…">
|
||||
<meta property="og:title" content="Example">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="If you'd like to test Telegram Passport, use this page to request data. If you'd like to check out a real-life implementation…">
|
||||
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
|
||||
|
||||
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
|
||||
<link href="/css/bootstrap-extra.css?2" rel="stylesheet">
|
||||
<link href="/css/telegram-extra.css?9" rel="stylesheet">
|
||||
|
||||
<link href="/css/telegram.css?215" 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">Example</h1>
|
||||
|
||||
<div id="dev_page_content"><p>If you'd like to test <a href="https://telegram.org/blog/passport">Telegram Passport</a>, use this page to request data. If you'd like to check out a real-life implementation, please see <a href="https://telegram.org/blog/export-and-more#improved-telegram-passport">this blog post</a> for examples of services that have integrated Telegram Passport.</p>
|
||||
<h3><a class="anchor" href="#request-telegram-passport-data" id="request-telegram-passport-data" name="request-telegram-passport-data"><i class="anchor-icon"></i></a>Request Telegram Passport Data</h3>
|
||||
<p><script src="/js/telegram-passport2.js?2"></script>
|
||||
<form class="form-horizontal telegram-passport-form clearfix" id="telegram_passport_form" style="">
|
||||
<div class="form-group visible-md-block visible-lg-block">
|
||||
<div class="col-md-8 col-md-offset-3">
|
||||
<div class="row">
|
||||
<label class="col-md-2 col-md-offset-7 control-label">
|
||||
<div class="text-center">Selfie</div>
|
||||
</label>
|
||||
<label class="col-md-3 control-label">
|
||||
<div class="text-center">Translation</div>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">Identity:</label>
|
||||
<div class="col-md-8">
|
||||
<label class="checkbox-item checkbox-item-block">
|
||||
<input type="checkbox" class="checkbox" name="personal_details" value="1" onchange="updateForm()" checked />
|
||||
<span class="checkbox-input ripple-handler"><span class="ripple-mask"><span class="ripple"></span></span><span class="checkbox-input-icon"></span></span><span class="checkbox-label">Personal Details</span>
|
||||
</label>
|
||||
<div class="passport-opt">
|
||||
<label class="checkbox-item checkbox-item-block">
|
||||
<input type="checkbox" class="checkbox" name="personal_details_native_names" value="1" onchange="updateForm()" />
|
||||
<span class="checkbox-input ripple-handler"><span class="ripple-mask"><span class="ripple"></span></span><span class="checkbox-input-icon"></span></span><span class="checkbox-label">name in the language of the user's country of residence</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-md-3 control-label">ID Documents:</label>
|
||||
<div class="col-md-8">
|
||||
<div class="row">
|
||||
<div class="col-md-7">
|
||||
<label class="checkbox-item checkbox-item-block">
|
||||
<input type="checkbox" class="checkbox" name="passport" value="1" onchange="updateForm()" checked />
|
||||
<span class="checkbox-input ripple-handler"><span class="ripple-mask"><span class="ripple"></span></span><span class="checkbox-input-icon"></span></span><span class="checkbox-label">Passport</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-md-2 passport-opt-col">
|
||||
<label class="checkbox-item checkbox-item-block">
|
||||
<input type="checkbox" class="checkbox" name="passport_selfie" value="1" onchange="updateForm()" />
|
||||
<span class="checkbox-input ripple-handler"><span class="ripple-mask"><span class="ripple"></span></span><span class="checkbox-input-icon"></span></span><span class="checkbox-label">with selfie</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-md-3 passport-opt-col">
|
||||
<label class="checkbox-item checkbox-item-block">
|
||||
<input type="checkbox" class="checkbox" name="passport_translation" value="1" onchange="updateForm()" />
|
||||
<span class="checkbox-input ripple-handler"><span class="ripple-mask"><span class="ripple"></span></span><span class="checkbox-input-icon"></span></span><span class="checkbox-label">with translation</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-md-7">
|
||||
<label class="checkbox-item checkbox-item-block">
|
||||
<input type="checkbox" class="checkbox" name="driver_license" value="1" onchange="updateForm()" checked />
|
||||
<span class="checkbox-input ripple-handler"><span class="ripple-mask"><span class="ripple"></span></span><span class="checkbox-input-icon"></span></span><span class="checkbox-label">Driver License</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-md-2 passport-opt-col">
|
||||
<label class="checkbox-item checkbox-item-block">
|
||||
<input type="checkbox" class="checkbox" name="driver_license_selfie" value="1" onchange="updateForm()" />
|
||||
<span class="checkbox-input ripple-handler"><span class="ripple-mask"><span class="ripple"></span></span><span class="checkbox-input-icon"></span></span><span class="checkbox-label">with selfie</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-md-3 passport-opt-col">
|
||||
<label class="checkbox-item checkbox-item-block">
|
||||
<input type="checkbox" class="checkbox" name="driver_license_translation" value="1" onchange="updateForm()" />
|
||||
<span class="checkbox-input ripple-handler"><span class="ripple-mask"><span class="ripple"></span></span><span class="checkbox-input-icon"></span></span><span class="checkbox-label">with translation</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-md-7">
|
||||
<label class="checkbox-item checkbox-item-block">
|
||||
<input type="checkbox" class="checkbox" name="identity_card" value="1" onchange="updateForm()" checked />
|
||||
<span class="checkbox-input ripple-handler"><span class="ripple-mask"><span class="ripple"></span></span><span class="checkbox-input-icon"></span></span><span class="checkbox-label">Identity Card</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-md-2 passport-opt-col">
|
||||
<label class="checkbox-item checkbox-item-block">
|
||||
<input type="checkbox" class="checkbox" name="identity_card_selfie" value="1" onchange="updateForm()" />
|
||||
<span class="checkbox-input ripple-handler"><span class="ripple-mask"><span class="ripple"></span></span><span class="checkbox-input-icon"></span></span><span class="checkbox-label">with selfie</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-md-3 passport-opt-col">
|
||||
<label class="checkbox-item checkbox-item-block">
|
||||
<input type="checkbox" class="checkbox" name="identity_card_translation" value="1" onchange="updateForm()" />
|
||||
<span class="checkbox-input ripple-handler"><span class="ripple-mask"><span class="ripple"></span></span><span class="checkbox-input-icon"></span></span><span class="checkbox-label">with translation</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-md-7">
|
||||
<label class="checkbox-item checkbox-item-block">
|
||||
<input type="checkbox" class="checkbox" name="internal_passport" value="1" onchange="updateForm()" />
|
||||
<span class="checkbox-input ripple-handler"><span class="ripple-mask"><span class="ripple"></span></span><span class="checkbox-input-icon"></span></span><span class="checkbox-label">Internal Passport</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-md-2 passport-opt-col">
|
||||
<label class="checkbox-item checkbox-item-block">
|
||||
<input type="checkbox" class="checkbox" name="internal_passport_selfie" value="1" onchange="updateForm()" />
|
||||
<span class="checkbox-input ripple-handler"><span class="ripple-mask"><span class="ripple"></span></span><span class="checkbox-input-icon"></span></span><span class="checkbox-label">with selfie</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-md-3 passport-opt-col">
|
||||
<label class="checkbox-item checkbox-item-block">
|
||||
<input type="checkbox" class="checkbox" name="internal_passport_translation" value="1" onchange="updateForm()" />
|
||||
<span class="checkbox-input ripple-handler"><span class="ripple-mask"><span class="ripple"></span></span><span class="checkbox-input-icon"></span></span><span class="checkbox-label">with translation</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-md-12 sub-control-label">
|
||||
<label class="radio-item">
|
||||
<input type="radio" class="radio" name="id_mode" value="one_of" onchange="updateForm()" checked />
|
||||
<span class="radio-input ripple-handler"><span class="ripple-mask"><span class="ripple"></span></span><span class="radio-input-icon"></span></span><span class="radio-label">One of the selected</span>
|
||||
</label>
|
||||
<label class="radio-item">
|
||||
<input type="radio" class="radio" name="id_mode" value="" onchange="updateForm()" />
|
||||
<span class="radio-input ripple-handler"><span class="ripple-mask"><span class="ripple"></span></span><span class="radio-input-icon"></span></span><span class="radio-label">All of the selected</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">Address:</label>
|
||||
<div class="col-md-8">
|
||||
<label class="checkbox-item checkbox-item-block">
|
||||
<input type="checkbox" class="checkbox" name="address" value="1" onchange="updateForm()" checked />
|
||||
<span class="checkbox-input ripple-handler"><span class="ripple-mask"><span class="ripple"></span></span><span class="checkbox-input-icon"></span></span><span class="checkbox-label">Residential Address</span>
|
||||
</label>
|
||||
</div>
|
||||
<label class="col-md-3 control-label">Proof of Address:</label>
|
||||
<div class="col-md-8">
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
<label class="checkbox-item checkbox-item-block">
|
||||
<input type="checkbox" class="checkbox" name="utility_bill" value="1" onchange="updateForm()" checked />
|
||||
<span class="checkbox-input ripple-handler"><span class="ripple-mask"><span class="ripple"></span></span><span class="checkbox-input-icon"></span></span><span class="checkbox-label">Utility Bill</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-md-3 passport-opt-col">
|
||||
<label class="checkbox-item checkbox-item-block">
|
||||
<input type="checkbox" class="checkbox" name="utility_bill_translation" value="1" onchange="updateForm()" />
|
||||
<span class="checkbox-input ripple-handler"><span class="ripple-mask"><span class="ripple"></span></span><span class="checkbox-input-icon"></span></span><span class="checkbox-label">with translation</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<label class="checkbox-item checkbox-item-block">
|
||||
<input type="checkbox" class="checkbox" name="bank_statement" value="1" onchange="updateForm()" checked />
|
||||
<span class="checkbox-input ripple-handler"><span class="ripple-mask"><span class="ripple"></span></span><span class="checkbox-input-icon"></span></span><span class="checkbox-label">Bank Statement</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-md-3 passport-opt-col">
|
||||
<label class="checkbox-item checkbox-item-block">
|
||||
<input type="checkbox" class="checkbox" name="bank_statement_translation" value="1" onchange="updateForm()" />
|
||||
<span class="checkbox-input ripple-handler"><span class="ripple-mask"><span class="ripple"></span></span><span class="checkbox-input-icon"></span></span><span class="checkbox-label">with translation</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<label class="checkbox-item checkbox-item-block">
|
||||
<input type="checkbox" class="checkbox" name="rental_agreement" value="1" onchange="updateForm()" checked />
|
||||
<span class="checkbox-input ripple-handler"><span class="ripple-mask"><span class="ripple"></span></span><span class="checkbox-input-icon"></span></span><span class="checkbox-label">Rental Agreement</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-md-3 passport-opt-col">
|
||||
<label class="checkbox-item checkbox-item-block">
|
||||
<input type="checkbox" class="checkbox" name="rental_agreement_translation" value="1" onchange="updateForm()" />
|
||||
<span class="checkbox-input ripple-handler"><span class="ripple-mask"><span class="ripple"></span></span><span class="checkbox-input-icon"></span></span><span class="checkbox-label">with translation</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<label class="checkbox-item checkbox-item-block">
|
||||
<input type="checkbox" class="checkbox" name="passport_registration" value="1" onchange="updateForm()" />
|
||||
<span class="checkbox-input ripple-handler"><span class="ripple-mask"><span class="ripple"></span></span><span class="checkbox-input-icon"></span></span><span class="checkbox-label">Registration page from Internal Passport</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-md-3 passport-opt-col">
|
||||
<label class="checkbox-item checkbox-item-block">
|
||||
<input type="checkbox" class="checkbox" name="passport_registration_translation" value="1" onchange="updateForm()" />
|
||||
<span class="checkbox-input ripple-handler"><span class="ripple-mask"><span class="ripple"></span></span><span class="checkbox-input-icon"></span></span><span class="checkbox-label">with translation</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<label class="checkbox-item checkbox-item-block">
|
||||
<input type="checkbox" class="checkbox" name="temporary_registration" value="1" onchange="updateForm()" />
|
||||
<span class="checkbox-input ripple-handler"><span class="ripple-mask"><span class="ripple"></span></span><span class="checkbox-input-icon"></span></span><span class="checkbox-label">Temporary Registration</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-md-3 passport-opt-col">
|
||||
<label class="checkbox-item checkbox-item-block">
|
||||
<input type="checkbox" class="checkbox" name="temporary_registration_translation" value="1" onchange="updateForm()" />
|
||||
<span class="checkbox-input ripple-handler"><span class="ripple-mask"><span class="ripple"></span></span><span class="checkbox-input-icon"></span></span><span class="checkbox-label">with translation</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-md-12 sub-control-label">
|
||||
<label class="radio-item">
|
||||
<input type="radio" class="radio" name="ad_mode" value="one_of" onchange="updateForm()" checked />
|
||||
<span class="radio-input ripple-handler"><span class="ripple-mask"><span class="ripple"></span></span><span class="radio-input-icon"></span></span><span class="radio-label">One of the selected</span>
|
||||
</label>
|
||||
<label class="radio-item">
|
||||
<input type="radio" class="radio" name="ad_mode" value="" onchange="updateForm()" />
|
||||
<span class="radio-input ripple-handler"><span class="ripple-mask"><span class="ripple"></span></span><span class="radio-input-icon"></span></span><span class="radio-label">All of the selected</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">Contact:</label>
|
||||
<div class="col-md-8">
|
||||
<label class="checkbox-item checkbox-item-block">
|
||||
<input type="checkbox" class="checkbox" name="phone_number" value="1" onchange="updateForm()" checked />
|
||||
<span class="checkbox-input ripple-handler"><span class="ripple-mask"><span class="ripple"></span></span><span class="checkbox-input-icon"></span></span><span class="checkbox-label">Phone Number</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-md-8 col-md-offset-3">
|
||||
<label class="checkbox-item checkbox-item-block">
|
||||
<input type="checkbox" class="checkbox" name="email" value="1" onchange="updateForm()" checked />
|
||||
<span class="checkbox-input ripple-handler"><span class="ripple-mask"><span class="ripple"></span></span><span class="checkbox-input-icon"></span></span><span class="checkbox-label">Email</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group telegram-passport-wrap">
|
||||
<div class="col-md-8 col-md-offset-3">
|
||||
<div class="telegram-passport-login-wrap" id="telegram_passport_login_btn"></div>
|
||||
<script>
|
||||
Telegram.Passport.createAuthButton('telegram_passport_login_btn', function() {
|
||||
var form = $('#telegram_passport_form').get(0);
|
||||
var fields = ['personal_details', 'address', 'phone_number', 'email'];
|
||||
var scope_data = [];
|
||||
for (var i = 0; i < fields.length; i++) {
|
||||
var field, opts = {}, has_opts = false;
|
||||
if (form[fields[i]].checked) {
|
||||
field = fields[i];
|
||||
if (form[fields[i] + '_native_names'] &&
|
||||
form[fields[i] + '_native_names'].checked) {
|
||||
has_opts = true; opts.native_names = true;
|
||||
}
|
||||
if (has_opts) {
|
||||
opts.type = field;
|
||||
field = opts;
|
||||
}
|
||||
scope_data.push(field);
|
||||
}
|
||||
}
|
||||
var id_fields = ['passport', 'internal_passport', 'driver_license', 'identity_card'];
|
||||
var id_data = [];
|
||||
for (var i = 0; i < id_fields.length; i++) {
|
||||
var field, opts = {}, has_opts = false;
|
||||
if (form[id_fields[i]].checked) {
|
||||
field = id_fields[i];
|
||||
if (form[id_fields[i] + '_selfie'] &&
|
||||
form[id_fields[i] + '_selfie'].checked) {
|
||||
has_opts = true; opts.selfie = true;
|
||||
}
|
||||
if (form[id_fields[i] + '_translation'] &&
|
||||
form[id_fields[i] + '_translation'].checked) {
|
||||
has_opts = true; opts.translation = true;
|
||||
}
|
||||
if (has_opts) {
|
||||
opts.type = field;
|
||||
field = opts;
|
||||
}
|
||||
id_data.push(field);
|
||||
}
|
||||
}
|
||||
if (id_data.length > 1 && form['id_mode'].value == 'one_of') {
|
||||
scope_data.push({one_of: id_data});
|
||||
} else {
|
||||
scope_data = scope_data.concat(id_data);
|
||||
}
|
||||
var ad_fields = ['utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration', 'temporary_registration'];
|
||||
var ad_data = [];
|
||||
for (var i = 0; i < ad_fields.length; i++) {
|
||||
var field, opts = {}, has_opts = false;
|
||||
if (form[ad_fields[i]].checked) {
|
||||
field = ad_fields[i];
|
||||
if (form[ad_fields[i] + '_translation'] &&
|
||||
form[ad_fields[i] + '_translation'].checked) {
|
||||
has_opts = true; opts.translation = true;
|
||||
}
|
||||
if (has_opts) {
|
||||
opts.type = field;
|
||||
field = opts;
|
||||
}
|
||||
ad_data.push(field);
|
||||
}
|
||||
}
|
||||
if (ad_data.length > 1 && form['ad_mode'].value == 'one_of') {
|
||||
scope_data.push({one_of: ad_data});
|
||||
} else {
|
||||
scope_data = scope_data.concat(ad_data);
|
||||
}
|
||||
authOptions.scope = {data: scope_data, v: 1};
|
||||
return authOptions;
|
||||
}, {
|
||||
radius: 6
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div id="telegram_passport_pending" style="display:none;">
|
||||
<div class="telegram-passport-pending"><img width="128" height="128" src="/img/passport_processing.gif"></div>
|
||||
</div>
|
||||
<form id="telegram_passport_data" class="telegram-passport-form" style="display:none;" onsubmit="return false;"></form></p>
|
||||
<hr>
|
||||
<blockquote>
|
||||
<p>Note that the passport demo bot will only store data for <strong>1 hour</strong> and then discard it. After logging in here, you can use the logout button on this page to reset your session.</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?43"></script>
|
||||
<script src="/js/jquery.min.js?1"></script>
|
||||
<script src="/js/jquery-ui.min.js?1"></script>
|
||||
<script src="/js/bootstrap.min.js?1"></script>
|
||||
|
||||
<script>function updatePending() {
|
||||
$.ajax({
|
||||
url: '/loadpassport?hash=telegram-crawler',
|
||||
type: 'GET',
|
||||
dataType: 'json',
|
||||
success: function (data) {
|
||||
console.log(data);
|
||||
if (data.html) {
|
||||
$('#telegram_passport_data').html(data.html);
|
||||
$('#telegram_passport_pending').hide();
|
||||
$('#telegram_passport_data').show();
|
||||
initPassportData(data.data);
|
||||
} else if (data.pending) {
|
||||
setTimeout(updatePending, 1000);
|
||||
} else {
|
||||
$('#telegram_passport_pending').hide();
|
||||
$('#telegram_passport_form').show();
|
||||
}
|
||||
},
|
||||
error: function (xhr) {
|
||||
alert(xhr.responseText || 'Unknown error');
|
||||
}
|
||||
});
|
||||
}
|
||||
function updateReject(el, className) {
|
||||
$(el).parents('.' + className).toggleClass('item-rejected', el.checked);
|
||||
if (window.passportData) {
|
||||
var has_checked = false;
|
||||
for (var i = 0; i < passportData.errors.length; i++) {
|
||||
if (el.form['reject' + i].checked) {
|
||||
has_checked = true; break;
|
||||
}
|
||||
}
|
||||
$('#telegram_passport_errors_btn').attr('disabled', !has_checked);
|
||||
}
|
||||
}
|
||||
function updateForm() {
|
||||
var form = $('#telegram_passport_form').get(0);
|
||||
var fields = ['passport', 'internal_passport', 'driver_license', 'identity_card', 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration', 'temporary_registration'];
|
||||
for (var i = 0; i < fields.length; i++) {
|
||||
var field = fields[i];
|
||||
if (form[field]) {
|
||||
var sfield = field + '_selfie',
|
||||
tfield = field + '_translation';
|
||||
if (form[sfield]) {
|
||||
if (form[field].checked) {
|
||||
if (form[sfield].disabled) {
|
||||
form[sfield].checked = form[sfield].old_checked;
|
||||
form[sfield].disabled = false;
|
||||
}
|
||||
} else {
|
||||
if (!form[sfield].disabled) {
|
||||
form[sfield].old_checked = form[sfield].checked;
|
||||
form[sfield].disabled = true;
|
||||
form[sfield].checked = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (form[tfield]) {
|
||||
if (form[field].checked) {
|
||||
if (form[tfield].disabled) {
|
||||
form[tfield].checked = form[tfield].old_checked;
|
||||
form[tfield].disabled = false;
|
||||
}
|
||||
} else {
|
||||
if (!form[tfield].disabled) {
|
||||
form[tfield].old_checked = form[tfield].checked;
|
||||
form[tfield].disabled = true;
|
||||
form[tfield].checked = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
var field = 'personal_details';
|
||||
var nfield = 'personal_details_native_names';
|
||||
if (form[field].checked) {
|
||||
if (form[nfield].disabled) {
|
||||
form[nfield].checked = form[nfield].old_checked;
|
||||
form[nfield].disabled = false;
|
||||
}
|
||||
} else {
|
||||
if (!form[nfield].disabled) {
|
||||
form[nfield].old_checked = form[nfield].checked;
|
||||
form[nfield].disabled = true;
|
||||
form[nfield].checked = false;
|
||||
}
|
||||
}
|
||||
var id_fields = ['passport', 'internal_passport', 'driver_license', 'identity_card'];
|
||||
var id_sel_cnt = 0;
|
||||
for (var i = 0; i < id_fields.length; i++) {
|
||||
var field = id_fields[i];
|
||||
if (form[field].checked) {
|
||||
id_sel_cnt++;
|
||||
}
|
||||
}
|
||||
for (var i = 0; i < form.ad_mode.length; i++) {
|
||||
form.id_mode[i].disabled = (id_sel_cnt <= 1);
|
||||
}
|
||||
var ad_fields = ['utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration', 'temporary_registration'];
|
||||
var ad_sel_cnt = 0;
|
||||
for (var i = 0; i < ad_fields.length; i++) {
|
||||
var field = ad_fields[i];
|
||||
if (form[field].checked) {
|
||||
ad_sel_cnt++;
|
||||
}
|
||||
}
|
||||
for (var i = 0; i < form.ad_mode.length; i++) {
|
||||
form.ad_mode[i].disabled = (ad_sel_cnt <= 1);
|
||||
}
|
||||
}
|
||||
var authOptions = {"bot_id":543260180,"public_key":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAv6m1zBF8lZOCqcxf8hnj\nkvHwuWdU8s4rBWaxKXH\/vDDUklcCS5uhSnmjhxWca9suubaG3lW4HxlCilkeJPVf\njimg5Q8ZqWrR3OoOihEpcG9iJZTOEpsEk7VtEiabgacBG3Quv9JslTrDe95Fn801\nt9d21HXwgMrHeHpWDOn31Dr+woEH+kwySUWa6L\/ZbnGwSNP7eeDTE7Amz1RMDk3t\n8EWGq58u0IQatPcEH09aUQlKzk6MIiALkZ9ILBKCBk6d2WCokKnsdBctovNbxwSx\nhP1qst1r+Yc8iPBZozsDC0ZsC5jXCkcODI3OC0tkNtYzN2XKalW5R0DjDRUDmGhT\nzQIDAQAB\n-----END PUBLIC KEY-----\n","nonce":"telegram-crawler","callback_url":"https:\/\/core.telegram.org\/passport\/example?passport_ssid=telegram-crawler"};
|
||||
function initPassportData(data) {
|
||||
window.passportData = data;
|
||||
}
|
||||
function sendErrors(el) {
|
||||
if (!window.passportData) {
|
||||
return false;
|
||||
}
|
||||
var errors = [];
|
||||
for (var i = 0; i < passportData.errors.length; i++) {
|
||||
if (el.form['reject' + i].checked) {
|
||||
errors.push(passportData.errors[i]);
|
||||
}
|
||||
}
|
||||
$.ajax({
|
||||
url: passportData.set_errors_url,
|
||||
type: 'POST',
|
||||
data: JSON.stringify(errors),
|
||||
contentType: 'application/json',
|
||||
dataType: 'json',
|
||||
success: function (result) {
|
||||
if (result) {
|
||||
$('#telegram_passport_errors_sent').addClass('shown');
|
||||
setTimeout(function() {
|
||||
$('#telegram_passport_errors_sent').removeClass('shown');
|
||||
}, 2000);
|
||||
}
|
||||
},
|
||||
error: function (xhr) {
|
||||
alert(xhr.responseText || 'Unknown error');
|
||||
}
|
||||
});
|
||||
return false;
|
||||
}
|
||||
function restartAuth() {
|
||||
$.ajax({
|
||||
url: '/restartpassport?hash=telegram-crawler',
|
||||
type: 'GET',
|
||||
});
|
||||
$('#telegram_passport_form').show();
|
||||
$('#telegram_passport_data').hide();
|
||||
$('#telegram_passport_pending').hide();
|
||||
return false;
|
||||
}
|
||||
initRipple();
|
||||
updateForm();
|
||||
|
||||
backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
488
data/core.telegram.org/reproducible-builds.html
Normal file
488
data/core.telegram.org/reproducible-builds.html
Normal file
|
@ -0,0 +1,488 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Reproducible Builds for iOS and Android</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="This page contains instructions for verifying that Telegram's open source code is exactly the same as the code that is used…">
|
||||
<meta property="og:title" content="Reproducible Builds for iOS and Android">
|
||||
<meta property="og:image" content="https://core.telegram.org/file/464001785/3/GqL9jQg6ChI.76277/1377819b17eaa4dcce">
|
||||
<meta property="og:description" content="This page contains instructions for verifying that Telegram's open source code is exactly the same as the code that is used…">
|
||||
<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?215" 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">Reproducible Builds for iOS and Android</h1>
|
||||
|
||||
<div id="dev_page_content"><p>This page contains instructions for verifying that Telegram's <a href="https://telegram.org/apps#source-code">open source code</a> is exactly the same as the code that is used to build the apps that are available in the <a href="https://telegram.org/dl/ios">App Store</a>, <a href="https://telegram.org/dl/android">Google Play</a> and <a href="https://telegram.org/android">directly</a> on the Telegram website.</p>
|
||||
<p><strong>Warning:</strong> Telegram supports reproducible builds as of <a href="https://telegram.org/blog/verifiable-apps-and-more"><strong>version 5.13</strong></a>. Bear in mind that, at this stage, the verification process should be considered <strong>experimental</strong>. We will be updating our apps and these instructions to make this process as straightforward as possible.</p>
|
||||
<ul>
|
||||
<li><a href="#reproducible-builds-for-android">Telegram for Android</a></li>
|
||||
<li><a href="#reproducible-builds-for-ios">Telegram for iOS</a></li>
|
||||
</ul>
|
||||
<blockquote>
|
||||
<p>Please read the relevant <strong>notes</strong> and <a href="#troubleshooting">troubleshooting</a> section carefully.</p>
|
||||
</blockquote>
|
||||
<hr>
|
||||
<div class="blog_wide_image">
|
||||
<a href="/file/464001695/1/nxVa_f-qKS8.216020/9da7686ded6f1e7bef" target="_blank"><img src="/file/464001785/3/GqL9jQg6ChI.76277/1377819b17eaa4dcce" srcset="/file/464001695/1/nxVa_f-qKS8.216020/9da7686ded6f1e7bef, 1200w" title="Builds Telegram verifiable are." alt="Dude in a jacket inspecting the hologram of a mechanical dog to verify it's built according to the blueprints provided."/></a>
|
||||
</div>
|
||||
|
||||
<h2><a class="anchor" name="reproducible-builds-for-android" href="#reproducible-builds-for-android"><i class="anchor-icon"></i></a>Reproducible Builds for Android</h2>
|
||||
<h3><a class="anchor" name="step-1-install-docker" href="#step-1-install-docker"><i class="anchor-icon"></i></a>Step 1. Install Docker</h3>
|
||||
<p>Docker can be obtained <a href="https://www.docker.com/">here</a>. Once the installation is complete, log into your Docker account > Preferences > Advanced and configure the amount of resources Docker may use:</p>
|
||||
<div class="blog_image_wrap">
|
||||
<a href="/file/464001855/2/KKDBKSKjE5I.159342/06f9af6592719a3d6e" target="_blank"><img src="/file/464001855/2/KKDBKSKjE5I.159342/06f9af6592719a3d6e" title="Docker Performance" /></a>
|
||||
<p>Docker Performance</p>
|
||||
</div>
|
||||
|
||||
<p>We recommend using the maximum amount allowed by your system's hardware, in order to speed up the build time.</p>
|
||||
<h3><a class="anchor" name="step-2-confirm-which-version-you-have-installed-on-your-android" href="#step-2-confirm-which-version-you-have-installed-on-your-android"><i class="anchor-icon"></i></a>Step 2. Confirm which version you have installed on your Android device</h3>
|
||||
<p>You can find the <strong>version/build</strong> number at the bottom of the Settings page. Note that Telegram supports reproducible builds starting with version <strong>5.13</strong>.</p>
|
||||
<div class="blog_image_wrap">
|
||||
<a href="/file/464001596/1/BdL82fVZIdg.72900/f22d064f20c6b40209" target="_blank"><img src="/file/464001596/1/BdL82fVZIdg.72900/f22d064f20c6b40209" title="App Version" /></a>
|
||||
<p>App Version</p>
|
||||
</div>
|
||||
|
||||
<p>The commit tag to checkout source code for the example above will be <code>release-5.13.0_1821</code>.</p>
|
||||
<blockquote>
|
||||
<p>Please make sure that you're using the correct <strong>version</strong> and <strong>build number</strong> of the version you want to check (and not the one from this example <img class="emoji" src="//telegram.org/img/emoji/40/F09F9888.png" width="20" height="20" alt="😈" />). </p>
|
||||
</blockquote>
|
||||
<p>The part after the version number will help you know in which folder to look for the correct APK when you've finished <a href="#step-4-build-the-app">building the app (Step 4)</a>:</p>
|
||||
<ul>
|
||||
<li>“Direct” after version number means that the APK will be inside the “afat/standalone” folder.</li>
|
||||
<li>“Universal” after version number means that the APK will be inside the “afat/release” folder.</li>
|
||||
<li>If you have Android Version 6.0 or greater, your APK folder will have the “_SDK23” suffix.</li>
|
||||
<li>“arm64-v8a” - folder name will start with “arm64”.</li>
|
||||
<li>“armeabi-v7” - folder name will start with “armv7”.</li>
|
||||
<li>“x86” - folder name will start with “x86”.</li>
|
||||
<li>“x86_64” - folder name will start with “x64”.</li>
|
||||
</ul>
|
||||
<div class="blog_image_wrap">
|
||||
<a href="/file/464001368/2/fgnFkr2Id3Q.55259/d03599849440e62b52" target="_blank"><img src="/file/464001368/2/fgnFkr2Id3Q.55259/d03599849440e62b52" title="Relevant folder" /></a>
|
||||
<p>APK Folders</p>
|
||||
</div>
|
||||
|
||||
|
||||
<h3><a class="anchor" name="step-3-obtain-the-source-code" href="#step-3-obtain-the-source-code"><i class="anchor-icon"></i></a>Step 3. Obtain the source code</h3>
|
||||
<p>Open Terminal, run the commands:<br><code>git clone https://github.com/DrKLO/Telegram.git $HOME/telegram-android</code><br><code>cd $HOME/telegram-android</code><br><code>git checkout release-{VERSION AND BUILD NUMBER FROM STEP 2}</code></p>
|
||||
<p>For our <a href="#step-2-confirm-which-version-you-have-installed-on-your-android">example</a>, the command would be:<br><code>git checkout release-5.13.0_1821</code></p>
|
||||
<div class="blog_wide_image">
|
||||
<a href="/file/464001840/1/5DrefLlg3vw.116770/8901e43605c30939d4" target="_blank"><img src="/file/464001840/1/5DrefLlg3vw.116770/8901e43605c30939d4" title="Obtaining the source code" /></a>
|
||||
</div>
|
||||
|
||||
<h3><a class="anchor" name="step-4-build-the-app" href="#step-4-build-the-app"><i class="anchor-icon"></i></a>Step 4. Build the app</h3>
|
||||
<p>Open Terminal, run the commands:<br><code>cd $HOME/telegram-android</code><br><code>docker build -t telegram-build .</code></p>
|
||||
<div class="blog_wide_image">
|
||||
<a href="/file/464001202/1/UyO3_tLDRPg.35170/31865250522be6db86" target="_blank"><img src="/file/464001202/1/UyO3_tLDRPg.35170/31865250522be6db86" title="Building the app" /></a>
|
||||
</div>
|
||||
|
||||
<p><code>docker run --rm -v "$PWD":/home/source telegram-build</code></p>
|
||||
<div class="blog_wide_image">
|
||||
<a href="/file/464001691/2/SFreJq5OZ4U.34208/f69b83468ac2a07276" target="_blank"><img src="/file/464001691/2/SFreJq5OZ4U.34208/f69b83468ac2a07276" title="Building the app" /></a>
|
||||
</div>
|
||||
|
||||
<p>These commands will produce <strong>9 different APKs</strong> for different target SDK versions and CPU ABIs.</p>
|
||||
<p>These APKs can be found in:<br><code>$HOME/telegram-android/TMessagesProj/build/outputs/apk/</code></p>
|
||||
<p>Use the folder name from <a href="#step-2-confirm-which-version-you-have-installed-on-your-android">Step 2</a> to find the correct folder that holds the same APK as installed on your device. For example, for non-universal Android 9.0 arm64-v8a, the path to your APK will be:<br><code>$HOME/telegram-android/TMessagesProj/build/outputs/apk/arm64_SDK23/release/app.apk</code><br>Copy this APK to the root source directory by running this command in Terminal:<br><code>cp $HOME/telegram-android/TMessagesProj/build/outputs/apk/arm64_SDK23/release/app.apk $HOME/telegram-android/telegram_built.apk</code></p>
|
||||
<div class="blog_wide_image">
|
||||
<a href="/file/464001970/1/9nwL42h9lAU.32529/9b39cebcdb8c6daff7" target="_blank"><img src="/file/464001970/1/9nwL42h9lAU.32529/9b39cebcdb8c6daff7" title="Copy the APK" /></a>
|
||||
</div>
|
||||
|
||||
<h3><a class="anchor" name="step-5-the-telegram-apk-installed-on-your-device" href="#step-5-the-telegram-apk-installed-on-your-device"><i class="anchor-icon"></i></a>Step 5. The Telegram APK installed on your device</h3>
|
||||
<p>You will need <a href="https://developer.android.com/studio/releases/platform-tools.html#downloads">adb</a> for this step. </p>
|
||||
<div class="blog_image_wrap">
|
||||
<a href="/file/464001167/1/ekMuxStZVes.485894/eb0a512392500d53b3" target="_blank"><img src="/file/464001167/1/ekMuxStZVes.485894/eb0a512392500d53b3" title="ADB" /></a>
|
||||
<p>ADB</p>
|
||||
</div>
|
||||
|
||||
<blockquote>
|
||||
<p>If you downloaded your APK <a href="https://telegram.org/android"><strong>directly from Telegram's website</strong></a>, use the package name <code>org.telegram.messenger.web</code> in this step. To verify the <strong>Google Play APK</strong>, use <code>org.telegram.messenger</code>.</p>
|
||||
</blockquote>
|
||||
<p>Connect your device to the computer, open Terminal, run the commands:<br><code>adb shell pm path org.telegram.messenger</code></p>
|
||||
<div class="blog_wide_image">
|
||||
<a href="/file/464001688/1/CJrBoBPxoKU.31587/670238fac9bc5f869d" target="_blank"><img src="/file/464001688/1/CJrBoBPxoKU.31587/670238fac9bc5f869d" title="ADB" /></a>
|
||||
</div>
|
||||
|
||||
<p>The output will look something like this:<br><code>package:/data/app/org.telegram.messenger-_zOSURFEx2GpHM8UDF_PVg==/base.apk</code><br>By using this information, pull the APK from your device to $HOME/telegram-android using command:<br><code>adb pull /data/app/org.telegram.messenger-_zOSURFEx2GpHM8UDF_PVg==/base.apk $HOME/telegram-android/telegram_store.apk</code></p>
|
||||
<h3><a class="anchor" name="step-6-compare-the-apks" href="#step-6-compare-the-apks"><i class="anchor-icon"></i></a>Step 6. Compare the APKs</h3>
|
||||
<p>Open Terminal, run the commands:<br><code>cd $HOME/telegram-android</code><br><code>python apkdiff.py telegram_store.apk telegram_built.apk</code><br>If the APKs are the same, you will see<br><code>APKs are the same!</code></p>
|
||||
<div class="blog_wide_image">
|
||||
<a href="/file/464001327/1/Qcnkce3q-J4.35468/9791eeabf384c7830d" target="_blank"><img src="/file/464001327/1/Qcnkce3q-J4.35468/9791eeabf384c7830d" title="Match" /></a>
|
||||
</div>
|
||||
Tada!
|
||||
|
||||
Otherwise, something went wrong.
|
||||
<div class="blog_wide_image">
|
||||
<a href="/file/464001245/1/0wuFZh4wBYM.38635/bf90b5a321b44360fb" target="_blank"><img src="/file/464001245/1/0wuFZh4wBYM.38635/bf90b5a321b44360fb" title="Mismatch" /></a>
|
||||
</div>
|
||||
|
||||
<p>If your APKs don't match, please make sure that you chose <a href="#step-2-confirm-which-version-you-have-installed-on-your-android">the correct code version</a> and <a href="#step-4-build-the-app">the right SDK</a>.</p>
|
||||
<p>Check out the <a href="#troubleshooting">Troubleshooting</a> section first in case you run into trouble.</p>
|
||||
<hr>
|
||||
<h2><a class="anchor" name="reproducible-builds-for-ios" href="#reproducible-builds-for-ios"><i class="anchor-icon"></i></a>Reproducible Builds for iOS</h2>
|
||||
<p>The verification process for iOS builds is, unfortunately, a lot more complex than for Android. The two main issues with Apple's current policies and infrastructure are as follows:</p>
|
||||
<ol>
|
||||
<li><p>Apple insists on using <strong>FairPlay</strong> encryption to “protect” even <strong>free</strong> apps from “app pirates” which makes obtaining the executable code of apps impossible without a jailbroken device. To solve this issue, Apple would simply need to allow submitting unencryptable binaries to the App Store. This would not affect security since the code would still be signed – and would enable anyone to check the integrity of apps supporting reproducible builds without endangering the integrity and security of their devices.</p>
|
||||
</li>
|
||||
<li><p>Building your own reproducible binaries is difficult because macOS doesn't support containers like Docker. If Apple followed in the footsteps of Linux (and even Microsoft!) and added container support, it would eliminate the need for steps 1-3 in the guide below.</p>
|
||||
</li>
|
||||
</ol>
|
||||
<blockquote>
|
||||
<p>As things stand now, you'll need a <strong>jailbroken device</strong>, at least <strong>1,5 hours</strong> and approximately <strong>90GB</strong> of free space to properly set up a virtual machine for the verification process.</p>
|
||||
</blockquote>
|
||||
<p>To provide a stable and easily reproducible environment, Telegram iOS builds are compiled on a virtual machine. Parallels is used to verify the builds.</p>
|
||||
<h3><a class="anchor" name="step-1-install-the-parallels-virtual-machine" href="#step-1-install-the-parallels-virtual-machine"><i class="anchor-icon"></i></a>Step 1. Install the Parallels virtual machine</h3>
|
||||
<p>Parallels can be obtained <a href="https://www.parallels.com/">here</a>, it features a fully-functional trial version.</p>
|
||||
<h3><a class="anchor" name="step-2-install-the-latest-version-of-macos-big-sur" href="#step-2-install-the-latest-version-of-macos-big-sur"><i class="anchor-icon"></i></a>Step 2. Install the latest version of macOS Big Sur</h3>
|
||||
<p>To download an image that can be installed on the virtual machine, open the App Store, search for “Catalina” and click “View”.</p>
|
||||
<div class="blog_image_wrap">
|
||||
<a href="/file/464001442/2/kdNIHhlKvz4.940110/19c350a98ef2c2c164" target="_blank"><img src="/file/464001442/2/kdNIHhlKvz4.940110/19c350a98ef2c2c164" title="Search for macOS Catalina on App Store > View" /></a>
|
||||
<p>Search for macOS Catalina on App Store > View</p>
|
||||
</div>
|
||||
|
||||
<div class="blog_image_wrap">
|
||||
<a href="/file/464001556/2/ZSibb9LRuCg.903011/8d1216a3b375d69651" target="_blank"><img src="/file/464001556/2/ZSibb9LRuCg.903011/8d1216a3b375d69651" title="macOS Catalina > Get" /></a>
|
||||
<p>macOS Catalina > Get
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<p>This will open a system pop-up offering to download the OS:</p>
|
||||
<div class="blog_wide_image">
|
||||
<a href="/file/464001021/1/zCJcO6j4L88.223192/6cccdc989a372734b0" target="_blank"><img src="/file/464001021/1/zCJcO6j4L88.223192/6cccdc989a372734b0" title="macOS Catalina > Download" /></a>
|
||||
</div>
|
||||
Choose “Download” and wait for the download to finish.
|
||||
|
||||
> If you were not using the latest version of the OS, your system may start updating instead. Please finish updating to download macOS Catalina.
|
||||
|
||||
When done, open Parallels and choose macOS Catalina:
|
||||
|
||||
<div class="blog_image_wrap">
|
||||
<a href="/file/464001612/2/MX23LbMTi9s.387733/04fbf3e50047b87e99" target="_blank"><img src="/file/464001612/2/MX23LbMTi9s.387733/04fbf3e50047b87e99" title="Select 'Install Windows or another OS' > Continue" /></a>
|
||||
<p>Select 'Install Windows or another OS' > Continue</p>
|
||||
</div>
|
||||
|
||||
<div class="blog_image_wrap">
|
||||
<a href="/file/464001694/1/WD85AiGle9A.404893/9c435d6582b9be04f6" target="_blank"><img src="/file/464001694/1/WD85AiGle9A.404893/9c435d6582b9be04f6" title="Select a file... > Applications (All files) > Install macOS Сatalina" /></a>
|
||||
<p>Select a file... > Applications (All files) > Install macOS Сatalina</p>
|
||||
</div>
|
||||
|
||||
<p>Before starting the installation, configure the virtual machine:</p>
|
||||
<div class="blog_image_wrap">
|
||||
<a href="/file/464001210/2/FVlrqHY_Vqw.231478/0167b02433bf413c67" target="_blank"><img src="/file/464001210/2/FVlrqHY_Vqw.231478/0167b02433bf413c67" title="Enable checkbox 'Customize settings before installation'" /></a>
|
||||
<p>Checkbox 'Customize settings before installation'</p>
|
||||
</div>
|
||||
|
||||
<p>Change the name of the virtual machine to <code>macos11_Xcode12_5_1</code></p>
|
||||
<div class="blog_image_wrap">
|
||||
<a href="/file/464001398/1/SB22XXoAWTg.151444/8e479c26b30ceccc01" target="_blank"><img src="/file/464001398/1/SB22XXoAWTg.151444/8e479c26b30ceccc01" title="Name VM as macos10_15_Xcode11_2" /></a>
|
||||
<p>Name VM as macos10_15_Xcode12_2</p>
|
||||
</div>
|
||||
|
||||
<p>Hardware > Processors: 2-4<br>Memory > 4GB may suffice but 8GB is recommended</p>
|
||||
<div class="blog_image_wrap">
|
||||
<a href="/file/464001494/1/_BIf-UvwS3Q.239110/d52cb48ec3d6e76e84" target="_blank"><img src="/file/464001494/1/_BIf-UvwS3Q.239110/d52cb48ec3d6e76e84" title="At least 2 CPUs + 4 (8 recommended) GB Memory." /></a>
|
||||
<p>At least 2 CPUs + 4 (8 recommended) GB Memory.</p>
|
||||
</div>
|
||||
|
||||
<p>You will get something like this:</p>
|
||||
<div class="blog_image_wrap">
|
||||
<a href="/file/464001423/2/yoakfT7DemM.200481/2fbd4e1d1fcbe60c9a" target="_blank"><img src="/file/464001423/2/yoakfT7DemM.200481/2fbd4e1d1fcbe60c9a" title="Click Continue" /></a>
|
||||
<p>Click Continue</p>
|
||||
</div>
|
||||
|
||||
<p>Parallels may request access to your microphone and camera, this is not required – just press <strong>Close</strong>.</p>
|
||||
<div class="blog_image_wrap">
|
||||
<a href="/file/464001037/3/uPUYKKQ0JXY.1190506/9f9567853a1be5f194" target="_blank"><img src="/file/464001037/3/uPUYKKQ0JXY.1190506/9f9567853a1be5f194" title="Install macOS > Continue" /></a>
|
||||
<p>Install macOS > Continue</p>
|
||||
</div>
|
||||
|
||||
<p>Your Apple ID is also not required, you can choose <strong>Set Up Later</strong>.</p>
|
||||
<div class="blog_image_wrap">
|
||||
<a href="/file/464001885/3/-EDysKEKxN4.872188/4fd018cdc5b1e9f3f4" target="_blank"><img src="/file/464001885/3/-EDysKEKxN4.872188/4fd018cdc5b1e9f3f4" title="Skip Apple ID with 'Set Up Later'" /></a>
|
||||
<p>Skip Apple ID with 'Set Up Later'</p>
|
||||
</div>
|
||||
|
||||
<p>Use “telegram” for both the account name and password.</p>
|
||||
<blockquote>
|
||||
<p>Do not ever use the password “telegram” for <strong>anything</strong> else, it's cursed.</p>
|
||||
</blockquote>
|
||||
<div class="blog_image_wrap">
|
||||
<a href="/file/464001994/1/uhQTRCzmHj0.805076/9fe8aaf3ade46b3bbf" target="_blank"><img src="/file/464001994/1/uhQTRCzmHj0.805076/9fe8aaf3ade46b3bbf" title="Create a computer account with 'telegram' set both as account name and password" class="dev_page_image" /></a>
|
||||
<p>Create a computer account with 'telegram' set both as account name and password</p>
|
||||
</div>
|
||||
|
||||
<p>Now install Parallels tools from the menu bar:</p>
|
||||
<div class="blog_wide_image">
|
||||
<a href="/file/464001486/1/kvHNFzvxjA8.2491846/d75c7b01cb0d3e4115" target="_blank"><img src="/file/464001486/1/kvHNFzvxjA8.2491846/d75c7b01cb0d3e4115" title="Install Parallels Tools using menu bar > Parallels icon > Actions > Install (Reinstall) Parallels Tools" /></a>
|
||||
<a href="/file/464001061/5/Hiye9EUwr58.424786/543027492e073abd74" target="_blank"><img src="/file/464001061/5/Hiye9EUwr58.424786/543027492e073abd74" title="Install Parallels Tools" /></a>
|
||||
<p>Install Parallels Tools using menu bar > Parallels icon > Actions > Install (Reinstall) Parallels Tools...</p>
|
||||
</div>
|
||||
|
||||
<p>After the system restarts, log in.<br>Open <strong>Terminal</strong> and run:<br><code>sudo visudo</code><br>Enter the password “telegram”</p>
|
||||
<div class="blog_wide_image">
|
||||
<a href="/file/464001603/1/syuA7Rk-n2Q.40736/a5e73335e5c7d3a36c" target="_blank"><img src="/file/464001603/1/syuA7Rk-n2Q.40736/a5e73335e5c7d3a36c" title="Run Terminal on the VM, enter 'sudo visudo' > enter password (telegram)" /></a>
|
||||
</div>
|
||||
|
||||
<p>Find this line at the end of the file:<br><code>%admin ALL=(ALL) ALL</code><br>Press “i” on your keyboard, add “NOPASSWD:”<br><code>%admin ALL=(ALL) NOPASSWD: ALL</code><br>Press Escape.<br>Type in “:wq”<br>Press Enter</p>
|
||||
<div class="blog_wide_image">
|
||||
<a href="/file/464001750/1/T6mMRrNkTUY.105833/6c491ac94ba52c30a0" target="_blank"><img src="/file/464001750/1/T6mMRrNkTUY.105833/6c491ac94ba52c30a0" title="Press i to edit the highlighted string" class="dev_page_image" /></a>
|
||||
<p>Press i to edit the highlighted string.</p>
|
||||
<a href="/file/464001078/1/fvlwH44qF9A.87241/d994289fe3967fbcd0" target="_blank"><img src="/file/464001078/1/fvlwH44qF9A.87241/d994289fe3967fbcd0" title="Enter :wq > press Enter" /></a>
|
||||
<p>Enter :wq > press Enter.</p>
|
||||
</div>
|
||||
|
||||
<p>In the terminal, run:<br><code>sudo systemsetup -setcomputersleep Never</code></p>
|
||||
<div class="blog_wide_image">
|
||||
<a href="/file/464001368/3/4nNsEU8siSo.54459/fdccb77de26ce89c25" target="_blank"><img src="/file/464001368/3/4nNsEU8siSo.54459/fdccb77de26ce89c25" title="sudo systemsetup -setcomputersleep Never > press Enter" /></a>
|
||||
<p>sudo systemsetup -setcomputersleep Never > press Enter.</p>
|
||||
</div>
|
||||
|
||||
<h3><a class="anchor" name="step-3-install-ssh-keys-on-the-virtual-machine" href="#step-3-install-ssh-keys-on-the-virtual-machine"><i class="anchor-icon"></i></a>Step 3. Install SSH keys on the virtual machine</h3>
|
||||
<p>In the virtual machine, open System Settings > Sharing and enable <strong>Remote Login</strong>.</p>
|
||||
<div class="blog_wide_image">
|
||||
<a href="/file/464001585/1/PEomlV3X5tY.2043293/4945fabb3f0dbc3498" target="_blank"><img src="/file/464001585/1/PEomlV3X5tY.2043293/4945fabb3f0dbc3498" title="Go to macOS Settings > Sharing > enable Remote Login" /></a>
|
||||
</div>
|
||||
|
||||
<p>In the virtual machine, open Terminal and run:<br><code>mkdir -p .ssh; nano .ssh/authorized_keys</code></p>
|
||||
<div class="blog_wide_image">
|
||||
<a href="/file/464001545/2/D1m3uumpixY.80253/33723ae7bf268e4e7b" target="_blank"><img src="/file/464001545/2/D1m3uumpixY.80253/33723ae7bf268e4e7b" title="Enter mkdir -p .ssh; nano .ssh/authorized_keys > press Enter" /></a>
|
||||
</div>
|
||||
|
||||
<p>In your main OS, open Terminal and run:<br><code>if [ ! -e ~/.ssh/id_rsa.pub ]; then ssh-keygen -t rsa -b 4096; fi && cat ~/.ssh/id_rsa.pub | pbcopy</code></p>
|
||||
<div class="blog_wide_image">
|
||||
<a href="/file/464001768/1/UQHpZ06ximo.31911/c5244223a99661c5e9" target="_blank"><img src="/file/464001768/1/UQHpZ06ximo.31911/c5244223a99661c5e9" title="Terminal" /></a>
|
||||
</div>
|
||||
|
||||
<p>If you see the line “Enter file in which to save the key (/Users/…/.ssh/id_rsa):”, press Enter<br>In the virtual machine, press <strong>CMD+V</strong><br>Then <strong>Ctrl+O</strong>, <strong>Ctrl+X</strong></p>
|
||||
<div class="blog_wide_image">
|
||||
<a href="/file/464001578/2/jHqc2jci2Ck.54202/7a0014ad6fb0d1c173" target="_blank"><img src="/file/464001578/2/jHqc2jci2Ck.54202/7a0014ad6fb0d1c173" title="Press Cmd+V > Ctrl+O > Ctrl+X." /></a>
|
||||
</div>
|
||||
|
||||
<h3><a class="anchor" name="step-4-install-xcode-version-12-5-1" href="#step-4-install-xcode-version-12-5-1"><i class="anchor-icon"></i></a>Step 4. Install Xcode version 12.5.1</h3>
|
||||
<p>In the virtual machine, open Safari and go to https://developer.apple.com<br>Sign in to your Account:</p>
|
||||
<div class="blog_image_wrap">
|
||||
<a href="/file/464001443/2/LhmF4qgPgn4.501969/6edbc244d8b9f8298e" target="_blank"><img src="/file/464001443/2/LhmF4qgPgn4.501969/6edbc244d8b9f8298e" title="developer.apple.com > Account > sign in with your Apple ID" /></a>
|
||||
<p>developer.apple.com > Account > sign in with your Apple ID</p>
|
||||
</div>
|
||||
|
||||
<p>Go to <strong>Downloads > More</strong><br>Enter <strong>Xcode</strong> in the search field and find the version 12.5.1</p>
|
||||
<div class="blog_image_wrap">
|
||||
<a href="/file/464001260/1/njYJxQDnzzQ.664134/d4e8de0aed2d74d6e0" target="_blank"><img src="/file/464001260/1/njYJxQDnzzQ.664134/d4e8de0aed2d74d6e0" title="Downloads > More > 12.5.1" /></a>
|
||||
<p>Downloads > More > Xcode 12.5.1</p>
|
||||
</div>
|
||||
|
||||
<p>Once the installation is complete, open the file Xcode 12.5.1.xip. The system will unarchive the app into the same folder. Move it to the <strong>Applications</strong> folder using Finder.</p>
|
||||
<div class="blog_image_wrap">
|
||||
<a href="/file/464001707/1/GIIAXXifhbI.2058152/af989007034194b28b" target="_blank"><img src="/file/464001707/1/GIIAXXifhbI.2058152/af989007034194b28b" title="Unarchive Xcode > drag the app to Applications folder" /></a>
|
||||
<p>Unarchive Xcode > drag the app to Applications folder</p>
|
||||
</div>
|
||||
|
||||
<div class="blog_image_wrap">
|
||||
<a href="/file/464001214/1/CZJfqS7Fhr8.2206987/d29e070d1cef8de8fb" target="_blank"><img src="/file/464001214/1/CZJfqS7Fhr8.2206987/d29e070d1cef8de8fb" title="Move Xcode to Applications using Finder > Run > Agree to install additional components" /></a>
|
||||
</div>
|
||||
|
||||
<p>On the virtual machine, run this command from the terminal:<br><code>sudo xcode-select -s /Applications/Xcode.app/Contents/Developer</code></p>
|
||||
<div class="blog_wide_image">
|
||||
<a href="/file/464001410/1/OZcFX2KwPrg.49547/a84ac3100d693a3982" target="_blank"><img src="/file/464001410/1/OZcFX2KwPrg.49547/a84ac3100d693a3982" title="sudo xcode-select -s /Applications/Xcode.app/Contents/Developer" /></a>
|
||||
</div>
|
||||
|
||||
<p>Shut down the virtual machine.</p>
|
||||
<div class="blog_image_wrap">
|
||||
<a href="/file/464001752/2/kos29MZFaJ0.3515145/88dff67ef53dbf4dcc" target="_blank"><img src="/file/464001752/2/kos29MZFaJ0.3515145/88dff67ef53dbf4dcc" title="Shut down the virtual machine" /></a>
|
||||
<p>Shut down the virtual machine</p>
|
||||
</div>
|
||||
|
||||
<h3><a class="anchor" name="step-4-1" href="#step-4-1"><i class="anchor-icon"></i></a>Step 4.1</h3>
|
||||
<p>Download the certificates at https://github.com/TelegramMessenger/Telegram-iOS/tree/master/build-system/fake-codesigning/certs/distribution and install them into the virtual machine.</p>
|
||||
<p>Launch Keychain Access and double-click the installed certificate. Under “Trust”, change “When using this certificate” to “Always Trust”.</p>
|
||||
<h3><a class="anchor" name="step-5-obtaining-the-source-code" href="#step-5-obtaining-the-source-code"><i class="anchor-icon"></i></a>Step 5. Obtaining the source code</h3>
|
||||
<p><code>git clone --recursive https://github.com/TelegramMessenger/telegram-ios.git $HOME/telegram-ios</code><br><code>cd $HOME/telegram-ios</code><br><code>git checkout release-${VERSION_NUMBER}</code></p>
|
||||
<p>E.g., <code>git checkout release-7.3</code>. Please note that you need to check out the whole git history as the build version depends on the number of commits in the repository.</p>
|
||||
<div class="blog_wide_image">
|
||||
<a href="/file/464001402/3/U43d2T5SSGY.181052/c86e9e2a72b766e704" target="_blank"><img src="/file/464001402/3/U43d2T5SSGY.181052/c86e9e2a72b766e704" title="git clone" /></a>
|
||||
</div>
|
||||
|
||||
<h3><a class="anchor" name="step-6-downloading-bazel-3-7-0-to-home-bazel-bazel" href="#step-6-downloading-bazel-3-7-0-to-home-bazel-bazel"><i class="anchor-icon"></i></a>Step 6. Downloading Bazel 3.7.0 to $HOME/bazel/bazel</h3>
|
||||
<p><code>mkdir -p $HOME/bazel && cd $HOME/bazel</code><br><code>curl -O -L https://github.com/bazelbuild/bazel/releases/download/3.7.0/bazel-3.7.0-darwin-x86_64</code><br><code>mv bazel-3.7.0-darwin-x86_64 bazel</code></p>
|
||||
<p>Check that you have downloaded the correct version:<br><code>chmod +x bazel</code><br><code>./bazel --version</code></p>
|
||||
<h3><a class="anchor" name="step-7-building-the-app" href="#step-7-building-the-app"><i class="anchor-icon"></i></a>Step 7. Building the app</h3>
|
||||
<p>Open Terminal, run the commands:<br><code>cd $HOME/telegram-ios
|
||||
BAZEL="$HOME/bazel/bazel" sh buildbox/build-telegram.sh verify</code></p>
|
||||
<div class="blog_wide_image">
|
||||
<a href="/file/464001292/1/9vG9rIqfOK0.38309/7f7df70686fc4afc36" target="_blank"><img src="/file/464001292/1/9vG9rIqfOK0.38309/7f7df70686fc4afc36" title="Building the app" /></a>
|
||||
</div>
|
||||
|
||||
<p>If the environment has been set up correctly, this will start the building process. Note that this step can easily take <strong>30-40 minutes</strong>. The average build time on a MacBook Pro (i9 6 core) is 35 minutes.</p>
|
||||
<div class="blog_wide_image">
|
||||
<a href="/file/464001704/1/_aK7gK-aRW4.80595/696c8283fe53f291bc" target="_blank"><img src="/file/464001704/1/_aK7gK-aRW4.80595/696c8283fe53f291bc" title="Building started" /></a>
|
||||
<a href="/file/464001735/1/ymFowz-2P8c.33467/e29b2c4aaa736dc6a1" target="_blank"><img src="/file/464001735/1/ymFowz-2P8c.33467/e29b2c4aaa736dc6a1" title="Building completed" /></a>
|
||||
</div>
|
||||
|
||||
<p>Once the process is complete the resulting IPA file can be found in <code>build/artifacts/Telegram.ipa</code><br>All the following steps will be made via Terminal on your main system.</p>
|
||||
<h3><a class="anchor" name="step-8-downloading-a-decrypted-version-of-the-app-from-the-app-s" href="#step-8-downloading-a-decrypted-version-of-the-app-from-the-app-s"><i class="anchor-icon"></i></a>Step 8. Downloading a decrypted version of the app from the App Store</h3>
|
||||
<p>This step requires a jailbroken device equipped with tools for decrypting apps. We‘d love to make this process more simple but that’s what you get for using Apple tech.</p>
|
||||
<h3><a class="anchor" name="step-9-comparing-the-appstore-build-and-the-version-built-in-the" href="#step-9-comparing-the-appstore-build-and-the-version-built-in-the"><i class="anchor-icon"></i></a>Step 9. Comparing the AppStore build and the version built in the virtual machine</h3>
|
||||
<p>Install the necessary tools:<br><code>if ! type brew > /dev/null;
|
||||
then /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"; fi && brew install python3</code></p>
|
||||
<div class="blog_wide_image">
|
||||
<a href="/file/464001225/1/X65KiZyxvdQ.41739/c7f65f76cc4c827c5d" target="_blank"><img src="/file/464001225/1/X65KiZyxvdQ.41739/c7f65f76cc4c827c5d" title="Installing python" /></a>
|
||||
</div>
|
||||
|
||||
<p><strong>Run</strong><br><code>python3 tools/ipadiff.py build/artifacts/Telegram.ipa PATH-TO-THE-IPA-FILE-FROM-STEP-9</code></p>
|
||||
<ol>
|
||||
<li>cd telegram-ios > Enter</li>
|
||||
<li>python3 tools/ipadiff.py build/artifacts/Telegram.ipa /path/ > Enter</li>
|
||||
</ol>
|
||||
<div class="blog_wide_image">
|
||||
<a href="/file/464001464/2/3skIXy_2ghc.41339/a62e0ea589b713438d" target="_blank"><img src="/file/464001464/2/3skIXy_2ghc.41339/a62e0ea589b713438d" title="Сomparing builds" /></a>
|
||||
</div>
|
||||
|
||||
<p>In case of a successful comparison, you will get a text along these lines:</p>
|
||||
<pre><code>IPAs are equal, except for the files that can't currently be checked:
|
||||
Excluded files that couldn't be checked due to being encrypted:
|
||||
PlugIns/SiriIntents.appex/SiriIntents
|
||||
PlugIns/Widget.appex/Widget
|
||||
PlugIns/NotificationContent.appex/NotificationContent
|
||||
PlugIns/NotificationService.appex/NotificationService
|
||||
PlugIns/Share.appex/Share
|
||||
IPAs contain Watch directory with a Watch app which can't be checked currently.
|
||||
IPAs contain .car (Asset Catalog) files that are compiled by the App Store and can't currently be checked:
|
||||
|
||||
Frameworks/TelegramUI.framework/Assets.car
|
||||
Assets.car
|
||||
IPAs contain .nib (compiled Interface Builder) files that are compiled by the App Store and can't currently be checked:
|
||||
Base.lproj/LaunchScreen.nib</code></pre>
|
||||
<div class="blog_wide_image">
|
||||
<a href="/file/464001561/2/8mgy93NZXIg.138258/a0a0dca779416fba8a" target="_blank"><img src="/file/464001561/2/8mgy93NZXIg.138258/a0a0dca779416fba8a" title="The result > equal IPAs" /></a>
|
||||
</div>
|
||||
|
||||
<p>In case of any mismatches, you'll get a detailed report.</p>
|
||||
<div class="blog_wide_image">
|
||||
<a href="/file/464001384/3/iSp-75NOtIU.58868/7b08b99752cdf7dd22" target="_blank"><img src="/file/464001384/3/iSp-75NOtIU.58868/7b08b99752cdf7dd22" title="Mismatching IPAs" /></a>
|
||||
</div>
|
||||
|
||||
<h3><a class="anchor" name="ios-notes" href="#ios-notes"><i class="anchor-icon"></i></a>iOS: Notes</h3>
|
||||
<ol>
|
||||
<li><p>You will get a warning if the archive created in <a href="#step-7-building-the-app">Step 7</a> contains encrypted files. If all these files are in the <code>PlugIns</code> subfolder, they represent various system extensions (e.g. external sharing, Siri, 3D touch). Decrypting such files using existing ways of receiving app archives via Jailbreak is non-trivial (but we're working on resolving this issue). If you do manage to decrypt them, e.g. on iOS 8, they will be matched.</p>
|
||||
</li>
|
||||
<li><p>You will be notified if the archive includes an <strong>Apple Watch app</strong>. The watch app will soon no longer be included in the archive.</p>
|
||||
</li>
|
||||
<li><p>Files with the <code>.car</code> extension are app resource archives (images, sounds) which were compiled and processed specifically for the target device. The App Store processes them in non-trivial ways, we're planning on getting rid of them in future versions.</p>
|
||||
</li>
|
||||
<li><p>The <code>LaunchScreen.nib</code> file is an empty file containing a description of the interface which is displayed by the system before the app is launched. It is processed by the App Store in a non-trivial way but doesn't contain any code and therefore may be ignored.</p>
|
||||
</li>
|
||||
</ol>
|
||||
<hr>
|
||||
<h2><a class="anchor" name="troubleshooting" href="#troubleshooting"><i class="anchor-icon"></i></a>Troubleshooting</h2>
|
||||
<p>If you encounter any issues with obtaining the code, building and comparing the apps, please contact us at <a href="https://t.me/botsupport">@botsupport</a> and include the hashtag <code>#reproducibleBuilds</code> with your message describing the problem.</p>
|
||||
<h3><a class="anchor" name="troubleshooting-android" href="#troubleshooting-android"><i class="anchor-icon"></i></a>Troubleshooting: Android</h3>
|
||||
<ol>
|
||||
<li><p>Make sure that you checkout <a href="#step-2-confirm-which-version-you-have-installed-on-your-android">the correct version</a> of the code.</p>
|
||||
</li>
|
||||
<li><p>Make sure that you build the app using <a href="#step-4-build-the-app">the right SDK</a>.</p>
|
||||
</li>
|
||||
<li><p>If the gradle version used in the Dockerfile is not available anymore and building of the Docker image fails, wait for a Dockerfile update or update manually to lastest available version.</p>
|
||||
</li>
|
||||
</ol>
|
||||
<p>…</p>
|
||||
<p>We will update this section with information on overcoming other common issues.</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?43"></script>
|
||||
|
||||
<script>backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
1800
data/core.telegram.org/schema.html
Normal file
1800
data/core.telegram.org/schema.html
Normal file
File diff suppressed because it is too large
Load diff
File diff suppressed because one or more lines are too long
249
data/core.telegram.org/stickers.html
Normal file
249
data/core.telegram.org/stickers.html
Normal file
|
@ -0,0 +1,249 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Telegram Stickers</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="All users can create, send and share custom artwork using Telegram's open Sticker Platform. Stickers take many forms – from…">
|
||||
<meta property="og:title" content="Telegram Stickers">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="All users can create, send and share custom artwork using Telegram's open Sticker Platform. Stickers take many forms – from…">
|
||||
<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?215" 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">Telegram Stickers</h1>
|
||||
|
||||
<div id="dev_page_content"><p>All users can create, send and share custom artwork using Telegram's open <strong>Sticker Platform</strong>. Stickers take many forms – from <strong>basic images</strong> to stunning <strong>vector animations</strong>. </p>
|
||||
<p>To start building your own custom sets, click below:</p>
|
||||
<ul>
|
||||
<li><a href="#animated-stickers">Animated Stickers</a></li>
|
||||
<li><a href="#video-stickers">Video Stickers</a></li>
|
||||
<li><a href="#static-stickers">Static Stickers</a></li>
|
||||
<li><a href="#using-the-stickers-bot">Uploading your Stickers</a></li>
|
||||
<li><a href="#importing-stickers-from-other-apps">Importing from other apps</a></li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="animated-stickers" href="#animated-stickers"><i class="anchor-icon"></i></a>Animated Stickers</h3>
|
||||
<p>Telegram stickers can move with smooth <strong>60 FPS animations</strong> to bring your characters to life in high-resolution.</p>
|
||||
<blockquote>
|
||||
<p>Animated stickers use Telegram's unique <strong>.TGS format</strong> – click <a href="#video-stickers">here</a> for <strong>Video Stickers</strong> made in <strong>.WEBM format</strong>.</p>
|
||||
</blockquote>
|
||||
<h4><a class="anchor" name="creating-animated-stickers" href="#creating-animated-stickers"><i class="anchor-icon"></i></a>Creating Animated Stickers</h4>
|
||||
<p>To create vector animated stickers you will need the following:</p>
|
||||
<ol>
|
||||
<li>Any vector graphics editor that allows exporting vector objects to Adobe After Effects to turn them into animations.</li>
|
||||
<li>Adobe After Effects.</li>
|
||||
<li>The <a href="https://github.com/TelegramMessenger/bodymovin-extension">Bodymovin-TG</a> plugin, a fork of Bodymovin for Adobe After Effects that can be used to export animations to <strong>.TGS</strong>, the Telegram animated sticker format.</li>
|
||||
</ol>
|
||||
<blockquote>
|
||||
<p>The Lottie-based .TGS format allows for incredibly detailed stickers that are <strong>less than 30 KB</strong> in size – six times smaller than the average photo.</p>
|
||||
</blockquote>
|
||||
<h4><a class="anchor" name="animated-sticker-requirements" href="#animated-sticker-requirements"><i class="anchor-icon"></i></a>Animated Sticker Requirements</h4>
|
||||
<ul>
|
||||
<li>Sticker/canvas size must be <strong>512х512 pixels</strong>.</li>
|
||||
<li>Sticker objects must not leave the canvas.</li>
|
||||
<li>Animation length must not exceed <strong>3 seconds</strong>.</li>
|
||||
<li>All animations must be looped.</li>
|
||||
<li>Sticker size must not exceed <strong>64 KB</strong> after rendering in Bodymovin.</li>
|
||||
<li>All animations must run at <strong>60 Frames Per Second</strong>.</li>
|
||||
<li>You <strong>must not</strong> use the following Adobe After Effects functionality when animating your stickers: <em>Auto-bezier keys, Expressions, Masks, Layer Effects, Images, Solids, Texts, 3D Layers, Merge Paths, Star Shapes, Gradient Strokes, Repeaters, Time Stretching, Time Remapping, Auto-Oriented Layers</em>.</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" name="uploading-animated-stickers" href="#uploading-animated-stickers"><i class="anchor-icon"></i></a>Uploading Animated Stickers</h4>
|
||||
<p>When your stickers are ready, send the <code>/newanimated</code> command to the <a href="https://t.me/Stickers">@Stickers</a> bot – then send it the .TGS files.</p>
|
||||
<p>Your set will need an icon. Icons for animated sticker sets must be <strong>100x100 pixels</strong>, with a looped animation not exceeding 3 seconds.</p>
|
||||
<hr>
|
||||
<h3><a class="anchor" name="video-stickers" href="#video-stickers"><i class="anchor-icon"></i></a>Video Stickers</h3>
|
||||
<p><a href="https://telegram.org/blog/video-stickers-better-reactions">Video Stickers</a> are built with <strong>.WEBM</strong> – an open-source format that is compatible with many graphics editors to create high-detail images. Requires <a href="https://telegram.org/apps">Telegram 8.5</a> or higher.</p>
|
||||
<!--
|
||||
> This format also allows you to [import custom stickers](https://core.telegram.org/import-stickers) to Telegram from other apps.
|
||||
-->
|
||||
|
||||
<h4><a class="anchor" name="creating-video-stickers" href="#creating-video-stickers"><i class="anchor-icon"></i></a>Creating Video Stickers</h4>
|
||||
<p>To create Video Stickers, you only need <a href="https://core.telegram.org/stickers/webm-vp9-encoding">editing software</a> that lets you export your project as a <strong>.WEBM video file</strong> (alpha channel <strong>no longer required</strong>).</p>
|
||||
<h4><a class="anchor" name="video-sticker-requirements" href="#video-sticker-requirements"><i class="anchor-icon"></i></a>Video Sticker Requirements</h4>
|
||||
<blockquote>
|
||||
<p>See this <a href="https://core.telegram.org/stickers/webm-vp9-encoding">Encoding .WEBM with VP9 Guide</a> for details </p>
|
||||
</blockquote>
|
||||
<ul>
|
||||
<li>One side of the sticker must be exactly <strong>512 pixels</strong> in size – the other side can be 512 pixels <strong>or less</strong>.</li>
|
||||
<li>Video duration must not exceed <strong>3 seconds</strong>.</li>
|
||||
<li>Frame rate can be up to <strong>30 FPS</strong>.</li>
|
||||
<li><del>Video must have a transparent layer</del> (this is no longer required).</li>
|
||||
<li>Video should be looped for optimal user experience.</li>
|
||||
<li>Video size should not exceed <strong>256 KB</strong>. </li>
|
||||
<li>Video must be in .WEBM format encoded with the <strong>VP9 codec</strong>.</li>
|
||||
<li>Video must have <strong>no audio stream</strong>.</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" name="uploading-video-stickers" href="#uploading-video-stickers"><i class="anchor-icon"></i></a>Uploading Video Stickers</h4>
|
||||
<p>Once your stickers are ready, send the <code>/newvideo</code> command to the <a href="https://t.me/Stickers">@Stickers</a> bot – then send it the .WEBM files.</p>
|
||||
<p>Your set will need a .WEBM icon. Icons for video sticker sets must be <strong>100x100 pixels</strong>, with a looped animation not exceeding 3 seconds.</p>
|
||||
<hr>
|
||||
<h3><a class="anchor" name="static-stickers" href="#static-stickers"><i class="anchor-icon"></i></a>Static Stickers</h3>
|
||||
<p>Turn your favorite drawings and memes into packs of images that are easily accessible <strong>on any device</strong> – no more digging through your gallery.</p>
|
||||
<h4><a class="anchor" name="creating-static-stickers" href="#creating-static-stickers"><i class="anchor-icon"></i></a>Creating Static Stickers</h4>
|
||||
<p>To create static stickers for the Telegram platform, you only need an image editor that lets you export in <strong>.PNG</strong> or <strong>.WEBP</strong> format.</p>
|
||||
<h4><a class="anchor" name="static-sticker-requirements" href="#static-sticker-requirements"><i class="anchor-icon"></i></a>Static Sticker Requirements</h4>
|
||||
<ul>
|
||||
<li>One side of the sticker must be exactly <strong>512 pixels</strong> in size – the other side can be 512 pixels <strong>or less</strong>.</li>
|
||||
<li>The image file must be in either .PNG or .WEBP format.</li>
|
||||
</ul>
|
||||
<blockquote>
|
||||
<p>Tip: a transparent background, white stroke and black shadow effect will make your sticker stand out.</p>
|
||||
</blockquote>
|
||||
<h4><a class="anchor" name="uploading-static-stickers" href="#uploading-static-stickers"><i class="anchor-icon"></i></a>Uploading Static Stickers</h4>
|
||||
<p>Once your stickers are ready, start a chat with the <a href="https://t.me/Stickers">@Stickers</a> bot and send the command <code>/newpack</code>. Your sticker set can also have a <strong>custom icon</strong> – a <strong>100x100 pixel image</strong> in .PNG or .WEBP format.</p>
|
||||
<blockquote>
|
||||
<p>For more info about using the <a href="https://t.me/Stickers">@Stickers</a> bot, click <a href="#using-the-stickers-bot">here</a>.</p>
|
||||
</blockquote>
|
||||
<hr>
|
||||
<h3><a class="anchor" name="using-the-stickers-bot" href="#using-the-stickers-bot"><i class="anchor-icon"></i></a>Using the @Stickers Bot</h3>
|
||||
<p>Publishing and <a href="#editing-a-sticker-pack">editing</a> sticker packs is <strong>simple</strong> and <strong>automated</strong>, thanks to the <a href="https://t.me/Stickers">@Stickers</a> bot. It can also show you <a href="#sticker-stats">detailed stats</a> for stickers and packs.</p>
|
||||
<h4><a class="anchor" name="publishing-a-sticker-pack" href="#publishing-a-sticker-pack"><i class="anchor-icon"></i></a>Publishing a Sticker Pack</h4>
|
||||
<p>Once you open the bot, press the <strong>Start button</strong> or send <code>/start</code>. The bot will reply, describing its different commands. It will walk you through step by step, but here's a quick guide:</p>
|
||||
<ul>
|
||||
<li>Open the <a href="https://t.me/TelegramTips/283">bot menu</a> in the message bar and select the <code>/newpack</code> command to start uploading <a href="#uploading-static-stickers">static stickers</a>. For <a href="#uploading-animated-stickers">animated stickers</a> use <code>/newanimated</code>, or <code>/newvideo</code> for <a href="#uploading-video-stickers">video stickers</a>.</li>
|
||||
<li>Give your sticker pack a <strong>name</strong> – this name will appear <strong>as the title</strong> for your pack in the sticker panel.</li>
|
||||
<li>Send your first sticker file – an <a href="#static-stickers">image file</a>, <a href="#animated-stickers">.TGS file</a>, or <a href="#video-stickers">.WEBM file</a>. Using one of the <a href="https://telegram.org/apps#desktop-apps">Desktop</a> or <a href="https://telegram.org/apps#web-apps">Web apps</a> is <strong>strongly recommended</strong>.</li>
|
||||
<li>Choose an <strong>emoji</strong> that corresponds to your sticker – this lets users quickly find it with <a href="https://t.me/TelegramTips/294">sticker suggestions</a>.</li>
|
||||
<li>Continue uploading all your sticker files.</li>
|
||||
<li>When you're done uploading, send the <code>/publish</code> command.</li>
|
||||
<li>Set an icon for your pack – <a href="#static-stickers">static sticker</a> packs can <code>/skip</code> this step, but it is required for <a href="#animated-stickers">animated</a> or <a href="#video-stickers">video stickers</a>.</li>
|
||||
<li>Choose a <strong>short name</strong> for your sticker pack – it will be used to create a <strong>shareable link</strong> for the pack like <a href="https://t.me/addstickers/HotCherry">t.me/addstickers/HotCherry</a>. Congratulations! Your stickers are ready for the world.</li>
|
||||
</ul>
|
||||
<blockquote>
|
||||
<p>After your pack is finished, you can send <code>/start</code> again to see the full list of commands, or use the bot menu to create another pack, <a href="#editing-a-sticker-pack">edit an existing pack</a>, or <a href="#sticker-stats">see statistics</a>.</p>
|
||||
</blockquote>
|
||||
<h4><a class="anchor" name="editing-a-sticker-pack" href="#editing-a-sticker-pack"><i class="anchor-icon"></i></a>Editing a Sticker Pack</h4>
|
||||
<p>Once you've created <a href="#publishing-a-sticker-pack">one or more packs</a>, you can <strong>add</strong>, <strong>edit</strong> or <strong>replace stickers</strong> in your existing sets.</p>
|
||||
<ul>
|
||||
<li>Use <code>/addsticker</code> if you have more artwork you'd like to add to a set. Choose one of your packs from the list – the upload process is <a href="#publishing-a-sticker-pack">exactly the same</a> as before.</li>
|
||||
<li>Use <code>/editsticker</code> to <strong>change the emoji</strong> you assigned to a sticker – select the pack and sticker, or simply send the intended sticker from your panel.</li>
|
||||
<li>Use <code>/replacesticker</code> if you want to swap out an older sticker for an updated version.</li>
|
||||
<li>Use <code>/ordersticker</code> to <strong>change the order</strong> of stickers in your pack. Choose the pack and one of the stickers, then choose another sticker to appear before it (to the left) in the panel.</li>
|
||||
<li>Use <code>/delsticker</code> to <strong>remove a sticker</strong> from the pack – you can always use <code>/addsticker</code> to add it again if you change your mind.</li>
|
||||
<li>Use <code>/seticon</code> to set an icon for your pack or to <strong>change the icon</strong>. Static sticker packs without a custom icon will use the first sticker as its icon.</li>
|
||||
</ul>
|
||||
<blockquote>
|
||||
<p>Edits to your sticker packs may take up to an hour to update for all users.</p>
|
||||
</blockquote>
|
||||
<h4><a class="anchor" name="sticker-stats" href="#sticker-stats"><i class="anchor-icon"></i></a>Sticker Stats</h4>
|
||||
<p>There are a number of commands that let you <strong>see statistics</strong> for your stickers – here's what they all do:</p>
|
||||
<ul>
|
||||
<li><code>/packstats</code> shows how many times your pack was <strong>used</strong>, <strong>installed</strong> and <strong>removed</strong> – both recently and overall.</li>
|
||||
<li><code>/stats</code> shows how many times an <strong>individual sticker</strong> has been sent.</li>
|
||||
<li><code>/top</code> shows the most popular stickers from <strong>all your packs</strong>.</li>
|
||||
<li><code>/packtop</code> shows your most popular sticker packs and their <strong>individual stats</strong>.</li>
|
||||
<li><code>/topbypack</code> shows the top stickers from a <strong>specific sticker pack</strong>.</li>
|
||||
<li><code>/packusagetop</code> shows your most popular packs by <strong>recent usage</strong>.</li>
|
||||
</ul>
|
||||
<blockquote>
|
||||
<p>You can filter the results of <code>/top</code>, <code>/packtop</code>, <code>/topbypack</code> and <code>/packusagetop</code>. For example <code>/top 20</code> would show your top 20 stickers, and <code>/topbypack -5</code> would show the 5 least popular stickers from a pack.</p>
|
||||
</blockquote>
|
||||
<h3><a class="anchor" name="importing-stickers-from-other-apps" href="#importing-stickers-from-other-apps"><i class="anchor-icon"></i></a>Importing Stickers From Other Apps</h3>
|
||||
<p>Developers can build apps to automate importing stickers using Telegram’s API. With these tools, users can instantly bring their favorite stickers to Telegram.</p>
|
||||
<h4><a class="anchor" name="for-developers" href="#for-developers"><i class="anchor-icon"></i></a>For Developers</h4>
|
||||
<p>As of version 7.8, Telegram apps support a simple API for importing stickers. Developers can use this to <strong>build apps</strong> or <strong>add tools</strong> to apps that let users instantly transfer stickers to Telegram – or create custom stickers from photos or videos.</p>
|
||||
<blockquote>
|
||||
<p>Click <a href="https://core.telegram.org/import-stickers#sticker-formats">here</a> for more information about developing apps for importing stickers.</p>
|
||||
</blockquote>
|
||||
<h4><a class="anchor" name="for-users" href="#for-users"><i class="anchor-icon"></i></a>For Users</h4>
|
||||
<p>Users can find apps that allow them to import stickers or quickly <strong>generate their own</strong>. They can also easily <a href="#publishing-a-sticker-pack">publish custom stickers</a> with the <a href="https://t.me/Stickers">@Stickers</a> bot using <a href="#static-stickers">.PNG</a>, <a href="#static-stickers">.WEBP</a> or <a href="#video-stickers">.WEBM</a> files for stickers from other apps.</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?43"></script>
|
||||
|
||||
<script>backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
159
data/core.telegram.org/stickers/webm-vp9-encoding.html
Normal file
159
data/core.telegram.org/stickers/webm-vp9-encoding.html
Normal file
|
@ -0,0 +1,159 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Encoding Video Stickers with .WEBM and VP9</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="The Video Sticker format allows anyone to easily create high-detail animations that users can send and share instantly in…">
|
||||
<meta property="og:title" content="Encoding Video Stickers with .WEBM and VP9">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="The Video Sticker format allows anyone to easily create high-detail animations that users can send and share instantly in…">
|
||||
<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?215" 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">Encoding Video Stickers with .WEBM and VP9</h1>
|
||||
|
||||
<div id="dev_page_content"><p>The <a href="https://telegram.org/blog/video-stickers-better-reactions">Video Sticker</a> format allows anyone to easily create <strong>high-detail animations</strong> that users can send and share instantly in Telegram.</p>
|
||||
<h3><a class="anchor" name="video-sticker-requirements" href="#video-sticker-requirements"><i class="anchor-icon"></i></a>Video Sticker Requirements</h3>
|
||||
<ul>
|
||||
<li>Video must be in <strong>.WEBM</strong> format, up to <strong>30 FPS</strong>.</li>
|
||||
<li>Video must be encoded with the <strong>VP9 codec</strong>.</li>
|
||||
<li>Video must have <strong>no audio stream</strong>.</li>
|
||||
<li>One side must be <strong>512 pixels</strong> in size – the other side can be 512 pixels <strong>or less</strong>.</li>
|
||||
<li>Duration must not exceed <strong>3 seconds</strong>.</li>
|
||||
<li><del>Video must have a transparent layer</del> (this is no longer required).</li>
|
||||
<li>Video should be looped for optimal user experience.</li>
|
||||
<li>Video size should not exceed <strong>256 KB</strong> after encoding. </li>
|
||||
</ul>
|
||||
<h3><a class="anchor" name="encoding-video-files" href="#encoding-video-files"><i class="anchor-icon"></i></a>Encoding Video Files</h3>
|
||||
<p>You can design your animation in your <strong>preferred app</strong> – but depending on the app’s export settings, you may need an <strong>encoding program</strong> to create the final file.</p>
|
||||
<blockquote>
|
||||
<p>Programs like <a href="https://handbrake.fr/downloads.php">Handbrake</a> or <a href="https://www.ffmpeg.org/download.html">ffmpeg</a> natively support .WEBM encoding with VP9.</p>
|
||||
</blockquote>
|
||||
<h4><a class="anchor" name="encoding-with-adobe-media-encoder" href="#encoding-with-adobe-media-encoder"><i class="anchor-icon"></i></a>Encoding with Adobe Media Encoder</h4>
|
||||
<p>Adobe’s Media Encoder <strong>requires a plug-in</strong> to support .WEBM encoding. Here is a modified version of a plug-in by <a href="https://github.com/fnordware/AdobeWebM">fnord software</a> that you can install to render your video stickers with Media Encoder.</p>
|
||||
<ul>
|
||||
<li><p><a href="/file/464001139/fd54/udyaRyjzBQ0.837957.zip/cd1e72526a65d383e5">Windows WEBM plug-in</a><br>Windows Installation Path<br><code>C:\Program Files\Adobe\Common\Plug-ins\7.0\MediaCore</code></p>
|
||||
</li>
|
||||
<li><p><a href="/file/464001958/101cc/d7q2KrY6DDU.1628141.zip/15bbe083289d292ce6">macOS WEBM plug-in (M1 and Intel)</a><br>macOS Installation Path:<br><code>~/Library/Application Support/Adobe/Common/Plug-ins/7.0/MediaCore</code></p>
|
||||
</li>
|
||||
</ul>
|
||||
<p>After the plug-in is installed, .WEBM will appear in the list of formats in the Queue tab.</p>
|
||||
<blockquote>
|
||||
<p>On macOS, you may need to go to Settings > Security & Privacy to approve installation.</p>
|
||||
</blockquote>
|
||||
<h4><a class="anchor" name="render-settings" href="#render-settings"><i class="anchor-icon"></i></a>Render Settings</h4>
|
||||
<p>If it’s your first time working with encoding software, here are some tips that might help:</p>
|
||||
<ul>
|
||||
<li>Make sure to check that <strong>VP9</strong> is selected in the codec settings – some apps may default to VP8.</li>
|
||||
<li>Make sure to <strong>remove</strong> any audio streams (uncheck ‘Export Audio’ in Adobe programs).</li>
|
||||
<li>Make sure the frame rate is a <strong>constant 30 FPS</strong>.</li>
|
||||
<li>Use <strong>Constant Quality</strong> and a lower (or lowest) quality setting – size dramatically decreases without affecting fidelity.</li>
|
||||
<li>In <strong>Media Encoder</strong>, make sure your Renderer is set to ‘Software Only’.</li>
|
||||
<li>If your file fails to render, try importing it as a <strong>PNG Sequence</strong>.</li>
|
||||
</ul>
|
||||
<blockquote>
|
||||
<p>After Effects projects integrate directly with Media Encoder via <em>File > Export > Add to Media Encoder Queue</em>.</p>
|
||||
</blockquote>
|
||||
<h3><a class="anchor" name="uploading-video-stickers" href="#uploading-video-stickers"><i class="anchor-icon"></i></a>Uploading Video Stickers</h3>
|
||||
<p>The <a href="https://t.me/Stickers">@Stickers</a> bot lets you quickly <strong>publish</strong> and <strong>manage</strong> your sticker packs. Start a chat with it on Telegram and it will walk you through the process. For <strong>step-by-step instructions</strong> and more information, see <a href="https://core.telegram.org/stickers#using-the-stickers-bot">this guide</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?43"></script>
|
||||
|
||||
<script>backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
147
data/core.telegram.org/tdlib.html
Normal file
147
data/core.telegram.org/tdlib.html
Normal file
|
@ -0,0 +1,147 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Telegram Database Library</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="TDLib (Telegram Database Library) is a cross-platform, fully functional Telegram client. We designed it to help third-party…">
|
||||
<meta property="og:title" content="Telegram Database Library">
|
||||
<meta property="og:image" content="https://core.telegram.org/file/811140459/1bdb/rl5NwUNbBzM.26909.gif/0ecbc461e020d4bc3a">
|
||||
<meta property="og:description" content="TDLib (Telegram Database Library) is a cross-platform, fully functional Telegram client. We designed it to help third-party…">
|
||||
<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?215" 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">Telegram Database Library</h1>
|
||||
|
||||
<div id="dev_page_content"><div>
|
||||
<a href="/file/811140459/1bdb/rl5NwUNbBzM.26909.gif/0ecbc461e020d4bc3a" target="_blank"><img src="/file/811140459/1bdb/rl5NwUNbBzM.26909.gif/0ecbc461e020d4bc3a" title="TDLib" style="max-width: 200px;float:right; padding-bottom:15px" /></a>
|
||||
</div>
|
||||
|
||||
<p><strong>TDLib</strong> (Telegram Database Library) is a cross-platform, fully functional Telegram client. We designed it to help third-party developers create their own <strong>custom apps</strong> using the Telegram platform.</p>
|
||||
<blockquote>
|
||||
<p><a href="https://telegram.org/blog/tdlib">Read about TDLib on the Telegram blog »</a></p>
|
||||
</blockquote>
|
||||
<h4><a class="anchor" name="tdlib-advantages" href="#tdlib-advantages"><i class="anchor-icon"></i></a>TDLib Advantages</h4>
|
||||
<ul>
|
||||
<li><strong>Cross-platform</strong>. TDLib can be used on Android, iOS, Windows, macOS, Linux, WebAssembly, FreeBSD, Windows Phone, watchOS, tvOS, Tizen, Cygwin. It should also work on other *nix systems with or without minimal effort.</li>
|
||||
<li><strong>Multilanguage</strong>. TDLib can be easily used with <strong>any programming language</strong> that is able to execute C functions. Additionally it already has native bindings to Java (using JNI) and C# (using C++/CLI).</li>
|
||||
<li><strong>Easy to use</strong>. TDLib takes care of all <strong>network implementation details</strong>, <strong>encryption</strong> and <strong>local data storage</strong>.</li>
|
||||
<li><strong>High-performance</strong>. In the Telegram Bot API, each TDLib instance handles more than <strong>24,000</strong> active bots simultaneously.</li>
|
||||
<li><strong>Well-documented</strong>. All TDLib API methods and public interfaces are <a href="/tdlib/docs/"><strong>fully documented</strong></a>.</li>
|
||||
<li><strong>Consistent</strong>. TDLib guarantees that all updates will be delivered in the <strong>right order</strong>.</li>
|
||||
<li><strong>Reliable</strong>. TDLib remains <strong>stable</strong> on slow and unreliable Internet connections.</li>
|
||||
<li><strong>Secure</strong>: All local data is <strong>encrypted</strong> using a user-provided encryption key.</li>
|
||||
<li><strong>Fully-asynchronous</strong>. Requests to TDLib don't block each other or anything else, responses will be sent when they are available.</li>
|
||||
</ul>
|
||||
<blockquote>
|
||||
<p><a href="https://core.telegram.org/tdlib/getting-started">Getting started with TDLib »</a></p>
|
||||
</blockquote>
|
||||
<h4><a class="anchor" name="resources" href="#resources"><i class="anchor-icon"></i></a>Resources</h4>
|
||||
<p>TDLib is fully <strong>open source</strong>, all code is available on <a href="https://github.com/tdlib/td">GitHub</a>.</p>
|
||||
<p><strong>See also:</strong></p>
|
||||
<ul>
|
||||
<li><a href="/tdlib/docs/">Library documentation</a></li>
|
||||
<li><a href="/tdlib/options">List of available options</a></li>
|
||||
<li><a href="/tdlib/notification-api/">Notification API documentation</a></li>
|
||||
<li><a href="/tdlib/tdlib.zip">Prebuilt library for Android</a></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?43"></script>
|
||||
|
||||
<script>backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,501 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>TDLib options</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="List of options supported by TdLib">
|
||||
<meta property="og:title" content="TDLib options">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="List of options supported by TdLib">
|
||||
<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?215" 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="/tdlib" >TDLib</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/tdlib/options" >TDLib options</a></li></ul></div>
|
||||
<h1 id="dev_page_title">TDLib options</h1>
|
||||
|
||||
<div id="dev_page_content"><p><a href="/tdlib">TDLib</a> has many options that affect the behavior of the library. Each option has a <strong>name</strong> and a <strong>value</strong>. <strong>Value</strong> may be of one of the following types:</p>
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><strong>Type of value</strong></td>
|
||||
<td><strong>Default value</strong></td>
|
||||
<td><strong>Value range</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Integer</td>
|
||||
<td>0</td>
|
||||
<td>64-bit integer</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Boolean</td>
|
||||
<td>false</td>
|
||||
<td>True or false</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>String</td>
|
||||
<td></td>
|
||||
<td>Any Unicode string</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h1><a class="anchor" name="list-of-options-supported-by-tdlib" href="#list-of-options-supported-by-tdlib"><i class="anchor-icon"></i></a>List of options supported by TDLib</h1>
|
||||
<p>Options not mentioned in this list may be safely ignored.</p>
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><strong>Name</strong></td>
|
||||
<td><strong>Type</strong></td>
|
||||
<td><strong>Writable</strong></td>
|
||||
<td><strong>Description</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>always_parse_markdown</td>
|
||||
<td>Boolean</td>
|
||||
<td>Yes</td>
|
||||
<td>If true, text entities will be automatically parsed in all <code>inputMessageText</code> objects</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>archive_and_mute_new_chats_from_unknown_users</td>
|
||||
<td>Boolean</td>
|
||||
<td>Yes</td>
|
||||
<td>If true, new chats from non-contacts will be automatically archived and muted. The option can be set only if the option “can_archive_and_mute_new_chats_from_unknown_users” is true. <code>getOption</code> needs to be called explicitly to fetch the latest value of the option, changed from another device</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>disable_animated_emoji</td>
|
||||
<td>Boolean</td>
|
||||
<td>Yes</td>
|
||||
<td>If true, animated emoji will be disabled and shown as plain emoji</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>disable_contact_registered_notifications</td>
|
||||
<td>Boolean</td>
|
||||
<td>Yes</td>
|
||||
<td>If true, notifications about the user's contacts who have joined Telegram will be disabled. User will still receive the corresponding message in the private chat. <code>getOption</code> needs to be called explicitly to fetch the latest value of the option, changed from another device</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>disable_persistent_network_statistics</td>
|
||||
<td>Boolean</td>
|
||||
<td>Yes</td>
|
||||
<td>If true, persistent network statistics will be disabled, which significantly reduces disk usage</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>disable_sent_scheduled_message_notifications</td>
|
||||
<td>Boolean</td>
|
||||
<td>Yes</td>
|
||||
<td>If true, notifications about outgoing scheduled messages that were sent will be disabled</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>disable_time_adjustment_protection</td>
|
||||
<td>Boolean</td>
|
||||
<td>Yes</td>
|
||||
<td>If true, protection from external time adjustment will be disabled, which significantly reduces disk usage</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>disable_top_chats</td>
|
||||
<td>Boolean</td>
|
||||
<td>Yes</td>
|
||||
<td>If true, support for top chats and statistics collection is disabled</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ignore_background_updates</td>
|
||||
<td>Boolean</td>
|
||||
<td>Yes</td>
|
||||
<td>If true, allows to skip all updates received while the TDLib instance was not running. The option does nothing if the database or secret chats are used</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ignore_default_disable_notification</td>
|
||||
<td>Boolean</td>
|
||||
<td>Yes</td>
|
||||
<td>If true, the <code>disable_notification</code> value specified in the request will be always used instead of the default value</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ignore_inline_thumbnails</td>
|
||||
<td>Boolean</td>
|
||||
<td>Yes</td>
|
||||
<td>If true, prevents file thumbnails sent by the server along with messages from being saved on the disk</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ignore_platform_restrictions</td>
|
||||
<td>Boolean</td>
|
||||
<td>Yes</td>
|
||||
<td>If true, chat and message restrictions specific to the currently used operating system will be ignored</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ignore_sensitive_content_restrictions</td>
|
||||
<td>Boolean</td>
|
||||
<td>Yes</td>
|
||||
<td>If true, sensitive content will be shown on all user devices. <code>getOption</code> needs to be called explicitly to fetch the latest value of the option, changed from another device</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>is_location_visible</td>
|
||||
<td>Boolean</td>
|
||||
<td>Yes</td>
|
||||
<td>If true, other users will be allowed to see the current user's location. <code>getOption</code> needs to be called explicitly to fetch the latest value of the option, changed from another device</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>language_pack_database_path</td>
|
||||
<td>String</td>
|
||||
<td>Yes</td>
|
||||
<td>Path to a database for storing language pack strings, so that this database can be shared between different accounts. By default, language pack strings are stored only in memory. Changes of value of this option will be applied only after TDLib restart, so it should be set before call to <code>setTdlibParameters</code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>language_pack_id</td>
|
||||
<td>String</td>
|
||||
<td>Yes</td>
|
||||
<td>Identifier of the currently used language pack from the current localization target</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>localization_target</td>
|
||||
<td>String</td>
|
||||
<td>Yes</td>
|
||||
<td>Name for the current localization target (currently supported: “android”, “android_x”, “ios”, “macos” and “tdesktop”)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>message_unload_delay</td>
|
||||
<td>Integer</td>
|
||||
<td>Yes</td>
|
||||
<td>The maximum time messages are stored in memory before they are unloaded, 60-86400; in seconds. Defaults to 60 for users and 1800 for bots</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>notification_group_count_max</td>
|
||||
<td>Integer</td>
|
||||
<td>Yes</td>
|
||||
<td>Maximum number of notification groups to be shown simultaneously, 0-25</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>notification_group_size_max</td>
|
||||
<td>Integer</td>
|
||||
<td>Yes</td>
|
||||
<td>Maximum number of simultaneously shown notifications in a group, 1-25. Defaults to 10</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>online</td>
|
||||
<td>Boolean</td>
|
||||
<td>Yes</td>
|
||||
<td>Online status of the current user</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>prefer_ipv6</td>
|
||||
<td>Boolean</td>
|
||||
<td>Yes</td>
|
||||
<td>If true, IPv6 addresses will be preferred over IPv4 addresses</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>use_pfs</td>
|
||||
<td>Boolean</td>
|
||||
<td>Yes</td>
|
||||
<td>If true, Perfect Forward Secrecy will be enabled for interaction with the Telegram servers for cloud chats</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>use_quick_ack</td>
|
||||
<td>Boolean</td>
|
||||
<td>Yes</td>
|
||||
<td>If true, quick acknowledgement will be enabled for outgoing messages</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>use_storage_optimizer</td>
|
||||
<td>Boolean</td>
|
||||
<td>Yes</td>
|
||||
<td>If true, the background storage optimizer will be enabled</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>utc_time_offset</td>
|
||||
<td>Integer</td>
|
||||
<td>Yes</td>
|
||||
<td>A UTC time offset used for splitting messages by days. The option is reset automatically on each TDLib instance launch, so it needs to be set manually only if the time offset is changed during execution.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>animation_search_bot_username</td>
|
||||
<td>String</td>
|
||||
<td>No</td>
|
||||
<td>Username of a bot which can be used in inline mode for animations search</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>authentication_token</td>
|
||||
<td>String</td>
|
||||
<td>No</td>
|
||||
<td>An authentication token to be used on subsequent authorizations and received when logging out</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>authorization_date</td>
|
||||
<td>Integer</td>
|
||||
<td>No</td>
|
||||
<td>Point in time (Unix timestamp) when authorization was received</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>basic_group_size_max</td>
|
||||
<td>Integer</td>
|
||||
<td>No</td>
|
||||
<td>Maximum number of members in a basic group</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>call_connect_timeout_ms</td>
|
||||
<td>Integer</td>
|
||||
<td>No</td>
|
||||
<td>Maximum time to wait for call connection creation to be passed to libtgvoip</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>call_packet_timeout_ms</td>
|
||||
<td>Integer</td>
|
||||
<td>No</td>
|
||||
<td>Maximum time to wait for call packet delivery to be passed to libtgvoip</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>can_archive_and_mute_new_chats_from_unknown_users</td>
|
||||
<td>Boolean</td>
|
||||
<td>No</td>
|
||||
<td>If true, the option “archive_and_mute_new_chats_from_unknown_users” can be changed</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>can_ignore_sensitive_content_restrictions</td>
|
||||
<td>Boolean</td>
|
||||
<td>No</td>
|
||||
<td>If true, the option “ignore_sensitive_content_restrictions” can be changed</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>channel_bot_user_id</td>
|
||||
<td>Integer</td>
|
||||
<td>No</td>
|
||||
<td>Identifier of the bot which is shown as the sender of messages sent on behalf of channels when viewed from an outdated client</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>enabled_proxy_id</td>
|
||||
<td>Integer</td>
|
||||
<td>No</td>
|
||||
<td>Identifier of the enabled proxy</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>expect_blocking</td>
|
||||
<td>Boolean</td>
|
||||
<td>No</td>
|
||||
<td>If true, access to Telegram is likely blocked for the user</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>favorite_stickers_limit</td>
|
||||
<td>Integer</td>
|
||||
<td>No</td>
|
||||
<td>Maximum number of favorite stickers</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>forwarded_message_count_max</td>
|
||||
<td>Integer</td>
|
||||
<td>No</td>
|
||||
<td>Maximum number of forwarded messages per one request</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>group_anonymous_bot_user_id</td>
|
||||
<td>Integer</td>
|
||||
<td>No</td>
|
||||
<td>Identifier of the bot which is shown as the sender of anonymous messages in groups when viewed from an outdated client</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>message_caption_length_max</td>
|
||||
<td>Integer</td>
|
||||
<td>No</td>
|
||||
<td>Maximum length of a message caption</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>message_text_length_max</td>
|
||||
<td>Integer</td>
|
||||
<td>No</td>
|
||||
<td>Maximum length of a message text</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>my_id</td>
|
||||
<td>Integer</td>
|
||||
<td>No</td>
|
||||
<td>Identifier of the current user</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>pinned_archived_chat_count_max</td>
|
||||
<td>Integer</td>
|
||||
<td>No</td>
|
||||
<td>Maximum number of pinned cloud chats in the Archive chat list. The same amount of secret chats can be pinned locally</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>pinned_chat_count_max</td>
|
||||
<td>Integer</td>
|
||||
<td>No</td>
|
||||
<td>Maximum number of pinned cloud chats in the Main chat list. The same amount of secret chats can be pinned locally</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>photo_search_bot_username</td>
|
||||
<td>String</td>
|
||||
<td>No</td>
|
||||
<td>Username of a bot which can be used in inline mode for photos search</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>replies_bot_chat_id</td>
|
||||
<td>Integer</td>
|
||||
<td>No</td>
|
||||
<td>Identifier of the @replies bot</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>suggested_language_pack_id</td>
|
||||
<td>String</td>
|
||||
<td>No</td>
|
||||
<td>Identifier of the language pack, suggested for the user by the server</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>suggested_video_note_audio_bitrate</td>
|
||||
<td>String</td>
|
||||
<td>No</td>
|
||||
<td>Suggested bit rate for audio encoding in video notes</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>suggested_video_note_length</td>
|
||||
<td>String</td>
|
||||
<td>No</td>
|
||||
<td>Suggested width and height of the video in video notes</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>suggested_video_note_video_bitrate</td>
|
||||
<td>String</td>
|
||||
<td>No</td>
|
||||
<td>Suggested bit rate for video encoding in video notes</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>supergroup_size_max</td>
|
||||
<td>Integer</td>
|
||||
<td>No</td>
|
||||
<td>Maximum number of members in a supergroup</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>t_me_url</td>
|
||||
<td>String</td>
|
||||
<td>No</td>
|
||||
<td>Current value of t.me URL, i.e. <code>https://t.me/</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>telegram_service_notifications_chat_id</td>
|
||||
<td>Integer</td>
|
||||
<td>No</td>
|
||||
<td>Identifier of the Telegram Service Notifications chat</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>test_mode</td>
|
||||
<td>Boolean</td>
|
||||
<td>No</td>
|
||||
<td>If true, the test environment is being used instead of the production environment</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>unix_time</td>
|
||||
<td>Integer</td>
|
||||
<td>No</td>
|
||||
<td>An estimation of the current Unix timestamp. The option will not be updated automatically unless the difference between the previous estimation and the locally available monotonic clocks changes significantly</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>venue_search_bot_username</td>
|
||||
<td>String</td>
|
||||
<td>No</td>
|
||||
<td>Username of a bot which can be used in inline mode for venues search</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>version</td>
|
||||
<td>String</td>
|
||||
<td>No</td>
|
||||
<td>TDLib version. This options is guaranteed to come before all other updates since TDLib 1.4.0</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>Additionally any option beginning with 'x' or 'X' is writeable and can be safely used by the application to persistently store some small amount of data.</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?43"></script>
|
||||
|
||||
<script>backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
333
data/core.telegram.org/techfaq.html
Normal file
333
data/core.telegram.org/techfaq.html
Normal file
|
@ -0,0 +1,333 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>FAQ for the Technically Inclined</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="This FAQ about MTProto is intended for advanced users. You may also want to check out our Basic FAQ.
|
||||
Please note, that…">
|
||||
<meta property="og:title" content="FAQ for the Technically Inclined">
|
||||
<meta property="og:image" content="https://core.telegram.org/file/811140746/2/CzMyJPVnPo8.81605/c2310d6ede1a5e220f">
|
||||
<meta property="og:description" content="This FAQ about MTProto is intended for advanced users. You may also want to check out our Basic FAQ.
|
||||
Please note, that…">
|
||||
<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?215" 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=" dev_faq_page">
|
||||
<div class="dev_page_bread_crumbs"></div>
|
||||
<h1 id="dev_page_title">FAQ for the Technically Inclined</h1>
|
||||
|
||||
<div id="dev_page_content"><blockquote>
|
||||
<p>This FAQ about <a href="http://core.telegram.org/mtproto">MTProto</a> is intended for advanced users. You may also want to check out our <a href="http://telegram.org/faq"><strong>Basic FAQ</strong></a>.<br>Please note, that client developers are required to comply with the <a href="/mtproto/security_guidelines">Security Guidelines</a>.</p>
|
||||
</blockquote>
|
||||
<p><div class="dev_page_nav_wrap"></p>
|
||||
<p><a href="#general-questions"><strong>General</strong></a></p>
|
||||
<ul>
|
||||
<li><a href="#q-why-did-you-go-for-a-custom-protocol">Why did you use a custom protocol?</a></li>
|
||||
<li><a href="#q-where-can-i-read-more-about-the-protocol">How does it work?</a></li>
|
||||
<li><a href="#q-how-does-server-client-encryption-work-in-mtproto">Server-client encryption</a></li>
|
||||
<li><a href="#q-how-does-end-to-end-encryption-work-in-mtproto">End-to-end encryption</a></li>
|
||||
<li><a href="#q-why-are-you-not-using-x-insert-solution">Why didn't you use a different solution?</a></li>
|
||||
<li><a href="#q-why-are-you-mostly-relying-on-classical-crypto-algorithms">Why are you mostly relying on classical crypto algorithms?</a></li>
|
||||
<li><a href="#q-i-39m-a-security-expert-and-i-have-comments-about-your-setup">I'm a security expert and I have comments about your setup</a></li>
|
||||
</ul>
|
||||
<p><a href="#encryption"><strong>Encryption</strong></a></p>
|
||||
<ul>
|
||||
<li><a href="#q-how-are-mtproto-messages-authenticated">How are MTProto messages authenticated?</a></li>
|
||||
<li><a href="#q-are-you-doing-encrypt-then-mac-mac-then-encrypt-or-mac-and-enc">Are you using Encrypt-and-MAC?</a></li>
|
||||
<li><a href="#q-why-don-39t-you-go-for-a-standard-encrypt-then-mac-approach">Why not go for Encrypt-then-MAC?</a></li>
|
||||
<li><a href="#q-do-you-still-use-sha-1">Do you still use SHA-1?</a></li>
|
||||
<li><a href="#q-do-you-use-ige-ige-is-broken">Do you use IGE? IGE is broken!</a></li>
|
||||
</ul>
|
||||
<p><a href="#authentication"><strong>Authentication</strong></a></p>
|
||||
<ul>
|
||||
<li><a href="#q-how-is-the-server-authenticated-during-dh-key-exchange">How is the server authenticated during DH key exchange?</a></li>
|
||||
<li><a href="#q-how-are-clients-authenticated">How are clients authenticated?</a></li>
|
||||
<li><a href="#q-how-are-secret-chats-authenticated">How are secret chats authenticated?</a></li>
|
||||
<li><a href="#q-how-are-voice-calls-authenticated">How are voice calls authentication?</a></li>
|
||||
<li><a href="#q-do-you-have-forward-secrecy">Do you have Forward Secrecy?</a></li>
|
||||
</ul>
|
||||
<p><a href="#protection-against-known-attacks"><strong>Protection against known attacks</strong></a></p>
|
||||
<ul>
|
||||
<li><a href="#known-plaintext-attacks">Known-plaintext attacks</a></li>
|
||||
<li><a href="#chosen-plaintext-attacks">Chosen-plaintext attacks</a></li>
|
||||
<li><a href="#chosen-ciphertext-attacks">Chosen-ciphertext attacks</a></li>
|
||||
<li><a href="#what-about-ind-cca">What about IND CCA?</a></li>
|
||||
<li><a href="#replay-attacks">Replay attacks</a></li>
|
||||
<li><a href="#man-in-the-middle-attacks">Man-in-the-middle attacks</a></li>
|
||||
<li><a href="#hash-collisions-for-diffie-hellman-keys">Hash collisions for DH keys</a></li>
|
||||
<li><a href="#length-extension-attacks">Length extension attacks</a></li>
|
||||
</ul>
|
||||
<p><a href="#encrypted-cdns"><strong>Encrypted CDNs</strong></a></p>
|
||||
<ul>
|
||||
<li><a href="#q-why-did-you-decide-to-use-cdns">Why do you use CDNs?</a></li>
|
||||
<li><a href="#q-can-the-cdn-decipher-the-files">Can CDNs decipher any files?</a></li>
|
||||
<li><a href="#q-can-the-cdn-substitute-the-data-with-their-own-version">Can CDNs substitute files with their own versions?</a></li>
|
||||
<li><a href="#q-can-cdns-be-used-for-censorship">Can CDNs be used for censorship?</a></li>
|
||||
<li><a href="#q-can-i-verify-this">Can I verify this?</a></li>
|
||||
<li><a href="#q-does-this-affect-private-data">Does this affect private data?</a></li>
|
||||
<li><a href="#q-is-this-connected-with-government-requests-to-move-private-dat">Is this connected to government requests to move servers to their territory?</a></li>
|
||||
<li><a href="#q-does-this-give-some-countries-any-influence-over-telegram">Does this give countries any influence over Telegram?</a></li>
|
||||
</ul>
|
||||
<hr>
|
||||
<p></div></p>
|
||||
<h3><a class="anchor" name="general-questions" href="#general-questions"><i class="anchor-icon"></i></a>General questions</h3>
|
||||
<h4><a class="anchor" name="q-why-did-you-go-for-a-custom-protocol" href="#q-why-did-you-go-for-a-custom-protocol"><i class="anchor-icon"></i></a>Q: Why did you go for a custom protocol?</h4>
|
||||
<p>In order to achieve reliability on weak mobile connections as well as speed when dealing with large files (such as photos, large videos and files <strong>up to 2 GB</strong> each), MTProto uses an original approach. This document is intended to clarify certain details of our setup, as well as address some important points that might be overlooked at first glance.</p>
|
||||
<h4><a class="anchor" name="q-where-can-i-read-more-about-the-protocol" href="#q-where-can-i-read-more-about-the-protocol"><i class="anchor-icon"></i></a>Q: Where can I read more about the protocol?</h4>
|
||||
<p>Detailed protocol documentation is available <a href="https://core.telegram.org/mtproto">here</a>. Please note that MTProto supports two layers: <strong>client-server encryption</strong> that is used in Telegram cloud chats and <strong>end-to-end encryption</strong> that is used in Telegram Secret Chats. See below for more information.</p>
|
||||
<p>If you have any comments, feel free to reach out to <a href="mailto:security@telegram.org">security@telegram.org</a></p>
|
||||
<h4><a class="anchor" name="q-how-does-server-client-encryption-work-in-mtproto" href="#q-how-does-server-client-encryption-work-in-mtproto"><i class="anchor-icon"></i></a>Q: How does server-client encryption work in MTProto?</h4>
|
||||
<p><strong>Server-client encryption</strong> is used in Telegram <strong>Cloud Chats</strong>. Here's a brief overview of the setup:</p>
|
||||
<div><a href="/file/811140746/2/CzMyJPVnPo8.81605/c2310d6ede1a5e220f">
|
||||
<img src="/file/811140746/2/CzMyJPVnPo8.81605/c2310d6ede1a5e220f" alt="MTProto 2.0, Part I. Cloud chats (server-client encryption)" class="dev_page_image" style="width: 600px" />
|
||||
</a></div>
|
||||
|
||||
<h6><a class="anchor" name="note-1" href="#note-1"><i class="anchor-icon"></i></a><strong>Note 1</strong></h6>
|
||||
<p>Each plaintext message to be encrypted in MTProto always contains the following data to be checked upon decryption in order to make the system robust against known problems with the components:</p>
|
||||
<ul>
|
||||
<li>server salt (64-Bit)</li>
|
||||
<li>session id</li>
|
||||
<li>message sequence number</li>
|
||||
<li>message length</li>
|
||||
<li>time</li>
|
||||
</ul>
|
||||
<h6><a class="anchor" name="note-2" href="#note-2"><i class="anchor-icon"></i></a><strong>Note 2</strong></h6>
|
||||
<p>See additional comments on our use of <a href="#q-do-you-use-ige-ige-is-broken">IGE</a> and <a href="#q-how-are-mtproto-messages-authenticated">message authentication</a>.</p>
|
||||
<h6><a class="anchor" name="note-3" href="#note-3"><i class="anchor-icon"></i></a><strong>Note 3</strong></h6>
|
||||
<p>Telegram's <strong>End-to-end</strong> encrypted Secret Chats are using an additional layer of encryption on top of the described above.</p>
|
||||
<h4><a class="anchor" name="q-how-does-end-to-end-encryption-work-in-mtproto" href="#q-how-does-end-to-end-encryption-work-in-mtproto"><i class="anchor-icon"></i></a>Q: How does end-to-end encryption work in MTProto?</h4>
|
||||
<p><strong>End-to-end encryption</strong> is used in Telegram <strong>Secret Chats</strong>, as well as voice and video calls. You can read more about it here: <a href="https://core.telegram.org/api/end-to-end">Secret Chats, End-to-End encryption</a>. Here's a brief overview of the setup:</p>
|
||||
<div>
|
||||
<a href="/file/811140633/4/hHw6Zy2DPyQ.109500/cabc10049a7190694f" target="_blank"><img src="/file/811140633/4/hHw6Zy2DPyQ.109500/cabc10049a7190694f" title="End-to-end encryption in MTProto 2.0 (Secret Chats)" class="dev_page_image" style="width: 600px" /></a>
|
||||
</div>
|
||||
|
||||
<p>Please see these articles for details:</p>
|
||||
<ul>
|
||||
<li><a href="https://core.telegram.org/api/end-to-end">Secret Chats, End-to-End encryption</a></li>
|
||||
<li><a href="/schema/end-to-end">End-to-End TL Schema</a></li>
|
||||
<li><a href="/api/end-to-end/seq_no">Sequence numbers in secret chats</a></li>
|
||||
<li><a href="/api/pfs">Perfect Forward Secrecy</a></li>
|
||||
<li><a href="/api/end-to-end/voice-calls">End-to-end encrypted Voice Calls</a></li>
|
||||
</ul>
|
||||
<h4><a class="anchor" name="q-why-are-you-not-using-x-insert-solution" href="#q-why-are-you-not-using-x-insert-solution"><i class="anchor-icon"></i></a>Q: Why are you not using X? (insert solution)</h4>
|
||||
<p>While other ways of achieving the same cryptographic goals, undoubtedly, exist, we feel that the present solution is both robust and also sucсeeds at our secondary task of beating unencrypted messengers in terms of delivery time and stability.</p>
|
||||
<h4><a class="anchor" name="q-why-are-you-mostly-relying-on-classical-crypto-algorithms" href="#q-why-are-you-mostly-relying-on-classical-crypto-algorithms"><i class="anchor-icon"></i></a>Q: Why are you mostly relying on classical crypto algorithms?</h4>
|
||||
<p>We prefer to use well-known algorithms, created in the days when bandwidth and processing power were both a much rarer commodity. This has valuable side-effects for modern-day mobile development and sending large files, provided one takes care of the known drawbacks.</p>
|
||||
<p>The weakspots of such algorithms are also well-known, and have been exploited for decades. We use these algorithms in such a combination that, to the best of our knowledge, prevents any known attacks.</p>
|
||||
<h4><a class="anchor" name="q-i-39m-a-security-expert-and-i-have-comments-about-your-setup" href="#q-i-39m-a-security-expert-and-i-have-comments-about-your-setup"><i class="anchor-icon"></i></a>Q: I'm a security expert and I have comments about your setup.</h4>
|
||||
<p>Any comments on Telegram's security are welcome at <a href="mailto:security@telegram.org">security@telegram.org</a>. All submissions which result in a change of code or configuration are eligible for bounties, ranging from <strong>$100</strong> to <a href="https://telegram.org/blog/crowdsourcing-a-more-secure-future"><strong>$100,000</strong></a> or more, depending on the severity of the issue.</p>
|
||||
<p>Please note that we can not offer bounties for issues that are disclosed to the public before they are addressed.</p>
|
||||
<h3><a class="anchor" name="encryption" href="#encryption"><i class="anchor-icon"></i></a>Encryption</h3>
|
||||
<h4><a class="anchor" name="q-how-are-mtproto-messages-authenticated" href="#q-how-are-mtproto-messages-authenticated"><i class="anchor-icon"></i></a>Q: How are MTProto messages authenticated?</h4>
|
||||
<p>All Telegram apps <a href="https://core.telegram.org/mtproto/security_guidelines#mtproto-encrypted-messages">ensure</a> that <em>msg_key</em> is equal to SHA-256 of a fragment of the <em>auth_key</em> concatenated with the decrypted message (including 12…1024 bytes of random padding). It is important that the plaintext always contains message length, server salt, <em>session_id</em> and <a href="#note-1">other data</a> not known to the attacker.</p>
|
||||
<p>It is crucial that AES decryption keys depend both on <em>msg_key</em>, and on <em>auth_key</em>, known only to the parties involved in the exchange.</p>
|
||||
<h4><a class="anchor" name="q-are-you-doing-encrypt-then-mac-mac-then-encrypt-or-mac-and-enc" href="#q-are-you-doing-encrypt-then-mac-mac-then-encrypt-or-mac-and-enc"><i class="anchor-icon"></i></a>Q: Are you doing Encrypt-then-MAC, MAC-then-Encrypt or MAC-and-Encrypt?</h4>
|
||||
<p>We do none of the above, strictly speaking. For message authentication, we compute SHA-256(auth_key_fragment + AES_decrypt(…,encrypted_message)) upon message receipt and compare this value to the <em>msg_key</em> received with the encrypted message.</p>
|
||||
<blockquote>
|
||||
<p>See also: <a href="#q-why-don-39t-you-go-for-a-standard-encrypt-then-mac-approach">Why not Encrypt-then-MAC?</a></p>
|
||||
</blockquote>
|
||||
<h4><a class="anchor" name="q-why-don-39t-you-go-for-a-standard-encrypt-then-mac-approach" href="#q-why-don-39t-you-go-for-a-standard-encrypt-then-mac-approach"><i class="anchor-icon"></i></a>Q: Why don't you go for a standard encrypt-then-MAC approach?</h4>
|
||||
<p>Using encrypt-then-MAC, e.g. involving GCM (Galois Counter Mode), would enable the receiving party to detect unauthorized or modified ciphertexts, thus eliminating the need to decrypt them in case of tampering.</p>
|
||||
<p>In MTProto, the clients and the server authenticate messages by <a href="https://core.telegram.org/mtproto/security_guidelines#mtproto-encrypted-messages">ensuring</a> that SHA-256(auth_key_fragment + plaintext + padding) = msg_key and that the plaintext always contains message length, server salt, session_id and <a href="#note-1">other data</a> not known to a potential attacker before accepting any message. These <a href="https://core.telegram.org/mtproto/security_guidelines#mtproto-encrypted-messages">security checks</a> performed on the client before any message is accepted ensure that invalid or tampered with messages will always be safely (and silently) discarded.</p>
|
||||
<p>This way we arrive at the same result. The difference is that the security check is performed before decryption in Encrypt-then-MAC and after decryption in MTProto – but in either case before a message is accepted. AES encryption / decryption on devices currently in use is comparable in speed with the additional HMAC computation required for the encrypt-then-MAC approach.</p>
|
||||
<h4><a class="anchor" name="q-do-you-still-use-sha-1" href="#q-do-you-still-use-sha-1"><i class="anchor-icon"></i></a>Q: Do you still use SHA-1?</h4>
|
||||
<p>The current version of the protocol is using <strong>SHA-256</strong>. MTProto 1.0 used to rely on SHA-1 (<a href="/techfaq/mtproto_v1#q-why-did-you-use-sha-1-sha-1-is-broken">see this FAQ</a> for details).</p>
|
||||
<p>In MTProto 2.0, SHA-1 is used only where the choice of hash function is irrelevant for security, e.g.:</p>
|
||||
<ul>
|
||||
<li>When <a href="/mtproto/auth_key">generating new keys</a></li>
|
||||
<li>For <a href="/mtproto/description#key-identifier-auth-key-id">computing</a> 64-bit <em>auth_key_id</em> from <em>auth_key</em></li>
|
||||
<li>For computing the 64-bit <em>key_fingerprint</em> in secret chat used for sanity checks (these are <strong>not</strong> the key visualizations – they use a different algorithm, see <a href="/techfaq#hash-collisions-for-diffie-hellman-keys">Hash Collisions for Diffie-Hellman keys</a>)</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" name="q-do-you-use-ige-ige-is-broken" href="#q-do-you-use-ige-ige-is-broken"><i class="anchor-icon"></i></a>Q: Do you use IGE? IGE is broken!</h4>
|
||||
<p>Yes, we use IGE, but it is not broken in our implementation. The fact that we do not use IGE as MAC together with other properties of our system makes the known attacks on IGE irrelevant.</p>
|
||||
<p>IGE, just as the ubiquitous CBC, is vulnerable to <a href="http://eprint.iacr.org/2006/271.pdf">blockwise-adaptive CPA</a>. But adaptive attacks are only a threat for as long as the same key can be used in several messages (not so in <a href="#q-are-you-doing-encrypt-then-mac-mac-then-encrypt-or-mac-and-enc">MTProto</a>).</p>
|
||||
<p>Adaptive attacks are even theoretically impossible in MTProto, because in order to be encrypted the message must be fully formed first, since the key is dependent on the message content. As for non-adaptive CPA, IGE is secure against them, as is CBC.</p>
|
||||
<h3><a class="anchor" name="authentication" href="#authentication"><i class="anchor-icon"></i></a>Authentication</h3>
|
||||
<h4><a class="anchor" name="q-how-is-the-server-authenticated-during-dh-key-exchange" href="#q-how-is-the-server-authenticated-during-dh-key-exchange"><i class="anchor-icon"></i></a>Q: How is the server authenticated during DH key exchange?</h4>
|
||||
<p>The DH exchange is <a href="https://core.telegram.org/mtproto/auth_key#dh-exchange-initiation">authenticated</a> with the server's public RSA-key that is built into the client (the same RSA-key is also used for protection against <a href="https://core.telegram.org/techfaq#man-in-the-middle-attacks">MitM attacks</a>).</p>
|
||||
<h4><a class="anchor" name="q-how-are-clients-authenticated" href="#q-how-are-clients-authenticated"><i class="anchor-icon"></i></a>Q: How are clients authenticated?</h4>
|
||||
<p>Various secrets (nonce, server_nonce, new_nonce) exchanged during <a href="https://core.telegram.org/mtproto/auth_key#dh-exchange-initiation">key generation</a> guarantee that the DH-key can only be obtained by the instance that initiated the exchange.</p>
|
||||
<p>Notice that new_nonce is transferred explicitly only once, inside an RSA-encrypted message from the client to the server.</p>
|
||||
<h4><a class="anchor" name="q-how-are-secret-chats-authenticated" href="#q-how-are-secret-chats-authenticated"><i class="anchor-icon"></i></a>Q: How are Secret Chats authenticated?</h4>
|
||||
<p>Keys for <a href="https://core.telegram.org/api/end-to-end">end-to-end encrypted secret chats</a> are generated by a new instance of DH key exchange, so they are known only to the parties involved and not to the server. To establish the identities of these parties and to ensure that no MitM is in place, it is recommended to compare identicons, generated from hashes of the DH secret chat keys (key visualizations).</p>
|
||||
<h4><a class="anchor" name="q-how-are-voice-calls-authenticated" href="#q-how-are-voice-calls-authenticated"><i class="anchor-icon"></i></a>Q: How are Voice Calls authenticated?</h4>
|
||||
<p>Keys for <a href="https://core.telegram.org/api/end-to-end/voice-calls">end-to-end encrypted calls</a> are generated using the Diffie-Hellman key exchange. Users who are on a call can ensure that there is no MitM by comparing key visualizations.</p>
|
||||
<p>To make key verification practical in the context of a voice call, Telegram uses a three-message modification of the standard DH key exchange for calls:</p>
|
||||
<ul>
|
||||
<li>A->B : (generates a and) sends g_a_hash := hash(g^a)</li>
|
||||
<li>B->A : (stores g_a_hash, generates b and) sends g_b := g^b</li>
|
||||
<li>A->B : (computes key (g_b)<sup>a, then) sends g_a := g</sup>a</li>
|
||||
<li>B : checks hash(g_a) == g_a_hash, then computes key (g_a)^b</li>
|
||||
</ul>
|
||||
<p>The idea is that Alice commits to a specific value of <em>a</em> (and of <em>g_a</em>), but does not reveal <em>g_a</em> to Bob (or Eve) until the very last step. Bob has to choose his value of <em>b</em> and <em>g_b</em> without knowing the true value of <em>g_a</em>. If Eve is performing a Man-in-the-Middle attack, she cannot change <em>a</em> depending on the value of <em>g_b</em> received from Bob and she also can't tune her value of <em>b</em> depending on <em>g_a</em>. As a result, Eve only gets <strong>one</strong> shot at injecting her parameters — and she must fire this shot with her eyes closed.</p>
|
||||
<p>Thanks to this modification, it becomes possible to prevent eavesdropping (MitM attacks on DH) with a probability of more than 0.9999999999 by using just over 33 bits of entropy in the visualization. These bits are presented to the users in the form of four emoticons. We have selected a pool of 333 emoji that all look quite different from one another and can be easily described in simple words in any language.</p>
|
||||
<p>You can read more about key verification for Telegram calls <a href="https://core.telegram.org/api/end-to-end/voice-calls#key-verification">here</a>.</p>
|
||||
<h4><a class="anchor" name="q-do-you-have-forward-secrecy" href="#q-do-you-have-forward-secrecy"><i class="anchor-icon"></i></a>Q: Do you have Forward Secrecy?</h4>
|
||||
<p>Telegram's Secret chats support Perfect Forward Secrecy, you can read more about it <a href="/api/end-to-end/pfs">here</a>.</p>
|
||||
<h3><a class="anchor" name="protection-against-known-attacks" href="#protection-against-known-attacks"><i class="anchor-icon"></i></a>Protection against known attacks</h3>
|
||||
<h4><a class="anchor" name="known-plaintext-attacks" href="#known-plaintext-attacks"><i class="anchor-icon"></i></a>Known-Plaintext Attacks</h4>
|
||||
<p>By definition, the known-plaintext attack (KPA) is an attack model for cryptanalysis where the attacker has samples of both the plaintext, and its encrypted version (ciphertext).</p>
|
||||
<p>AES IGE that is used in MTProto is robust against KPA attacks (<a href="http://core.telegram.org/techfaq#q-do-you-use-ige-ige-is-broken">see this, if you wonder how one can securely use IGE</a>). On top of that, the plaintext in MTProto always contains server_salt and session id.</p>
|
||||
<h4><a class="anchor" name="chosen-plaintext-attacks" href="#chosen-plaintext-attacks"><i class="anchor-icon"></i></a>Chosen-Plaintext Attacks</h4>
|
||||
<p>By definition, a chosen-plaintext attack (CPA) is an attack model for cryptanalysis which presumes that the attacker has the capability to choose arbitrary plaintexts to be encrypted and obtain the corresponding ciphertexts.</p>
|
||||
<p>MTProto uses AES in IGE mode (<a href="http://core.telegram.org/techfaq#q-do-you-use-ige-ige-is-broken">see this, if you wonder how one can securely use IGE</a>) that is <a href="http://eprint.iacr.org/2006/271.pdf">secure against non-adaptive CPAs</a>. IGE is known to be not secure against blockwise-adaptive CPA, but MTProto fixes this in the following manner:</p>
|
||||
<p>Each plaintext message to be encrypted always contains the following to be checked upon decryption:</p>
|
||||
<ul>
|
||||
<li>server salt (64-Bit)</li>
|
||||
<li>message sequence number</li>
|
||||
<li>time</li>
|
||||
</ul>
|
||||
<p>On top of this, in order to replace the plaintext, you would also need to use the right AES key and iv, both dependent on the auth_key. This makes MTProto robust against a CPA.</p>
|
||||
<h4><a class="anchor" name="chosen-ciphertext-attacks" href="#chosen-ciphertext-attacks"><i class="anchor-icon"></i></a>Chosen-Ciphertext Attacks</h4>
|
||||
<p>By definition, a chosen-ciphertext attack (CCA) is an attack model for cryptanalysis in which the cryptanalyst gathers information, at least in part, by choosing a ciphertext and obtaining its decryption under an unknown key. In the attack, an adversary has a chance to enter one or more known ciphertexts into the system and obtain the resulting plaintexts. From these pieces of information the adversary can attempt to recover the hidden secret key used for decryption.</p>
|
||||
<p>Each time a message is decrypted in MTProto, a check is performed to see whether <em>msg_key</em> is equal to the SHA-256 of a fragment of the <em>auth_key</em> concatenated with the decrypted message (including 12…1024 bytes of random padding). The plaintext (decrypted data) also always contains message length, server salt and sequence number. This negates known CCAs.</p>
|
||||
<h4><a class="anchor" name="what-about-ind-cca" href="#what-about-ind-cca"><i class="anchor-icon"></i></a>What about IND-CCA?</h4>
|
||||
<p>MTProto 2.0 satisfies the conditions for indistinguishability under chosen ciphertext attack (IND-CCA).</p>
|
||||
<blockquote>
|
||||
<p><a href="/techfaq/mtproto_v1#what-about-ind-cca">Read more about IND-CCA in MTProto 1.0</a></p>
|
||||
</blockquote>
|
||||
<h4><a class="anchor" name="replay-attacks" href="#replay-attacks"><i class="anchor-icon"></i></a>Replay attacks</h4>
|
||||
<p>Replay attacks are denied because each plaintext to be encrypted contains the server salt and the unique <a href="/mtproto/description#message-identifier-msg-id">message id</a> and sequence number.</p>
|
||||
<p>This means that each message can only be sent once.</p>
|
||||
<h4><a class="anchor" name="man-in-the-middle-attacks" href="#man-in-the-middle-attacks"><i class="anchor-icon"></i></a>Man-in-the-middle attacks</h4>
|
||||
<p>Telegram has two modes of communication — ordinary chats using client-server encryption and <a href="/api/end-to-end">Secret Chats using end-to-end encryption</a>.</p>
|
||||
<p>Client-Server communication is protected from MiTM-attacks during DH key generation by means of a server RSA public key embedded into client software. After that, if both clients trust the server software, the Secret Chats between them are protected by the server from MiTM attacks.</p>
|
||||
<p>The interface offers a way of comparing Secret Chat keys for users who do <strong>not</strong> trust the server. Visualizations of the key are presented in the form of identicons (<a href="http://telegram.org/img/key_image.jpg">example here</a>). By comparing key visualizations users can make sure no MITM attack had taken place.</p>
|
||||
<h4><a class="anchor" name="hash-collisions-for-diffie-hellman-keys" href="#hash-collisions-for-diffie-hellman-keys"><i class="anchor-icon"></i></a>Hash collisions for Diffie-Hellman Keys</h4>
|
||||
<p>Currently, the fingerprint uses 128-bits of SHA-1 concatenated with 160 bits from the SHA-256 of the key, yielding a total of 288 fingerprint bits, thus negating the possibility of hash-collision attacks.</p>
|
||||
<blockquote>
|
||||
<p><a href="/techfaq/mtproto_v1#hash-collisions-for-diffie-hellman-keys">Read more about fingerprints in earlier versions of Telegram</a></p>
|
||||
</blockquote>
|
||||
<h4><a class="anchor" name="length-extension-attacks" href="#length-extension-attacks"><i class="anchor-icon"></i></a>Length extension attacks</h4>
|
||||
<p>By definition, length extension attacks are a type of attack when certain types of hashes are misused as message authentication codes, allowing for inclusion of extra information.</p>
|
||||
<p>A message in MTProto consists of an <em>msg_key</em>, equal to the SHA-256 of a fragment of the <em>auth_key</em> concatenated with the plaintext (including 12…1024 bytes of random padding and <a href="#note-1">some additional parameters</a>), followed by the ciphertext. The attacker cannot append extra bytes to the end and recompute the SHA-256, since the SHA-256 is computed from the plaintext, not the ciphertext, and the attacker has no way to obtain the ciphertext corresponding to the extra plaintext bytes she may want to add. </p>
|
||||
<p>Apart from that, changing the <em>msg_key</em> would also change the AES decryption key for the message in a way unpredictable for the attacker, so even the original prefix would decrypt to garbage — which would be immediately detected since the app performs a <a href="/mtproto/security_guidelines">security check</a> to ensure that the SHA-256 of the plaintext (combined with a fragment of the <em>auth_key</em>) matches the <em>msg_key</em> received.</p>
|
||||
<h3><a class="anchor" name="encrypted-cdns" href="#encrypted-cdns"><i class="anchor-icon"></i></a>Encrypted CDNs</h3>
|
||||
<p>As of Telegram 4.2, we support encrypted CDNs for caching media from public channels with over 100.000 members. The CDN caching nodes are located in regions with significant Telegram traffic where we wouldn't want to place Telegram servers for various reasons.</p>
|
||||
<blockquote>
|
||||
<p>For technical details of the implementation, encryption and verification of data, <a href="https://core.telegram.org/cdn">see the CDN manual</a>.</p>
|
||||
</blockquote>
|
||||
<p>See <a href="https://core.telegram.org/cdn/faq_ir">this document</a> for a Persian version of this FAQ.<br><a href="https://core.telegram.org/cdn/faq_ir">بخش فارسی</a></p>
|
||||
<h4><a class="anchor" name="q-why-did-you-decide-to-use-cdns" href="#q-why-did-you-decide-to-use-cdns"><i class="anchor-icon"></i></a>Q: Why did you decide to use CDNs?</h4>
|
||||
<p>We use our own distributed servers to speed up downloads in regions where freedom of speech is guaranteed — and even there <a href="https://telegram.org/faq#q-do-you-process-data-requests">we don't take this for granted</a>. But when Telegram becomes immensely popular in other areas, we can only rely on CDNs which we treat rather like ISPs from the technical standpoint in that they only get encrypted data they can't decipher.</p>
|
||||
<p>Thanks to this technology, the download speed for public photos and videos can become significantly higher in regions like Turkey, Indonesia, South America, India, Iran or Iraq without the slightest compromise in security.</p>
|
||||
<h4><a class="anchor" name="q-can-the-cdn-decipher-the-files" href="#q-can-the-cdn-decipher-the-files"><i class="anchor-icon"></i></a>Q: Can the CDN decipher the files?</h4>
|
||||
<p>No. Each file that is to be sent to the CDN is encrypted with a unique key using AES-256-CTR encryption. The CDN can't access the data it stores because these keys are only accessible to the main MTProto server and to the authorized client.</p>
|
||||
<h4><a class="anchor" name="q-can-the-cdn-substitute-the-data-with-their-own-version" href="#q-can-the-cdn-substitute-the-data-with-their-own-version"><i class="anchor-icon"></i></a>Q: Can the CDN substitute the data with their own version?</h4>
|
||||
<p>No. Data downloaded from CDN caching nodes is always verified by the receiving Telegram app by way of a hash: attackers won’t be able to replace any files with their own versions.</p>
|
||||
<h4><a class="anchor" name="q-can-the-cdn-delete-any-files" href="#q-can-the-cdn-delete-any-files"><i class="anchor-icon"></i></a>Q: Can the CDN delete any files?</h4>
|
||||
<p>No. CDN nodes only cache encrypted <em>copies</em> of files, originals are stored on the Telegram servers. The user is notified about receiving the file by the Telegram server. If the CDN caching node doesn't give the file to the user, the user will receive the file from the Telegram server directly.</p>
|
||||
<h4><a class="anchor" name="q-can-cdns-be-used-for-censorship" href="#q-can-cdns-be-used-for-censorship"><i class="anchor-icon"></i></a>Q: Can CDNs be used for censorship?</h4>
|
||||
<p>No. All original files are stored on the Telegram servers. The CDNs only get encrypted data — and they can't decipher it. They can't substitute any data. And in case of any problems with the CDN, the file will be simply delivered to the users directly from the Telegram servers. Users will always get their data, nobody can stop this.</p>
|
||||
<h4><a class="anchor" name="q-can-i-verify-this" href="#q-can-i-verify-this"><i class="anchor-icon"></i></a>Q: Can I verify this?</h4>
|
||||
<p>Yes. Anyone can verify our CDN implementation by checking the <a href="https://telegram.org/apps#source-code">source code</a> of Telegram apps and inspecting traffic.</p>
|
||||
<h4><a class="anchor" name="q-does-this-affect-private-data" href="#q-does-this-affect-private-data"><i class="anchor-icon"></i></a>Q: Does this affect private data?</h4>
|
||||
<p>No. The CDN caching nodes are not a part of the Telegram cloud. CDN caching nodes are used only for caching popular public media from massive channels. Private data never goes there.</p>
|
||||
<h4><a class="anchor" name="q-is-this-connected-with-government-requests-to-move-private-dat" href="#q-is-this-connected-with-government-requests-to-move-private-dat"><i class="anchor-icon"></i></a>Q: Is this connected with government requests to move private data to their territory?</h4>
|
||||
<p>No. We haven't entered in any agreements with any government regarding the CDNs and the CDNs are not part of any deal. The only purpose of CDNs is to securely improve connectivity in high demand regions where Telegram can't place its servers.</p>
|
||||
<h4><a class="anchor" name="q-does-this-give-some-countries-any-influence-over-telegram" href="#q-does-this-give-some-countries-any-influence-over-telegram"><i class="anchor-icon"></i></a>Q: Does this give some countries any influence over Telegram?</h4>
|
||||
<p>No. We have taken special precautions to make sure that no country gains any leverage over Telegram by way of the CDN caching nodes:</p>
|
||||
<ul>
|
||||
<li>The CDNs do not belong to Telegram – all the risks are on a third-party company that supplies us with CDN nodes around the world.</li>
|
||||
<li>We did not invest anything in these CDNs and will only be paying for traffic that is used to pass cached items from our main clusters and to the end users.</li>
|
||||
</ul>
|
||||
<p>As the result, if any country decides to mess with the CDN in their region, they gain nothing except for reducing connectivity for their own citizens – and Telegram loses nothing of value.</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?43"></script>
|
||||
|
||||
<script>backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,298 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>ChannelAdminLogEventAction</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Channel admin log event">
|
||||
<meta property="og:title" content="ChannelAdminLogEventAction">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Channel admin log event">
|
||||
<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?215" 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="/type/ChannelAdminLogEventAction" >ChannelAdminLogEventAction</a></li></ul></div>
|
||||
<h1 id="dev_page_title">ChannelAdminLogEventAction</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Channel admin log event</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 133 <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="?layer=1">1 – Base layer</a></li><li><a href="?layer=2">2 – New userpic notifications</a></li><li><a href="?layer=3">3 – Send message can trigger link change</a></li><li><a href="?layer=4">4 – Check-in chats</a></li><li><a href="?layer=5">5 – Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 – Foursquare integration</a></li><li><a href="?layer=7">7 – Added wallPaperSolid</a></li><li><a href="?layer=8">8 – Added end-to-end encryption</a></li><li><a href="?layer=9">9 – Improved big files upload perfomance</a></li><li><a href="?layer=10">10 – Improved chat participants updates</a></li><li><a href="?layer=11">11 – Improved secret chats</a></li><li><a href="?layer=12">12 – New dynamic support</a></li><li><a href="?layer=13">13 – Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 – Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 – Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 – Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 – Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 – Added usernames</a></li><li><a href="?layer=23">23 – Stickers for secret chats</a></li><li><a href="?layer=105">105 – Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 – Login with QR code</a></li><li><a href="?layer=109">109 – Polls v2</a></li><li><a href="?layer=110">110 – People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 – Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 – Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 – PSA</a></li><li><a href="?layer=114">114 – Video thumbs for GIFs</a></li><li><a href="?layer=115">115 – Peek Channel Invite</a></li><li><a href="?layer=116">116 – Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 – WebRTC Phone Calls</a></li><li><a href="?layer=118">118 – Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 – Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 – Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121">121 – SVG-based Outlines for Stickers</a></li><li><a href="?layer=122">122 – Voice Chats</a></li><li><a href="?layer=123">123 – Voice Chat improvements</a></li><li><a href="?layer=124">124 – Expiring Invite links</a></li><li><a href="?layer=125">125 – Voice Chats in Broadcasts</a></li><li><a href="?layer=126">126 – Ban channels in channels</a></li><li><a href="?layer=127">127 – Payments in channels</a></li><li><a href="?layer=128">128 – Microthumbs for User/Chat profile photos</a></li><li><a href="?layer=129">129 – Video Chats</a></li><li><a href="?layer=130">130 – Custom placeholder for bot reply keyboards</a></li><li><a href="?layer=131">131 – Reset 2FA Password after a week</a></li><li><a href="?layer=132">132 – Chat themes</a></li><li><a href="?layer=133"><strong>133 – 64-bit IDs for User/Chat</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/channelAdminLogEventActionChangeTitle" >channelAdminLogEventActionChangeTitle</a>#e6dfb825 prev_value:<a href="/type/string" >string</a> new_value:<a href="/type/string" >string</a> = <a href="/type/ChannelAdminLogEventAction" class="current_page_link" >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" class="current_page_link" >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" class="current_page_link" >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" class="current_page_link" >ChannelAdminLogEventAction</a>;
|
||||
<a href="/constructor/channelAdminLogEventActionToggleInvites" >channelAdminLogEventActionToggleInvites</a>#1b7907ae new_value:<a href="/type/Bool" >Bool</a> = <a href="/type/ChannelAdminLogEventAction" class="current_page_link" >ChannelAdminLogEventAction</a>;
|
||||
<a href="/constructor/channelAdminLogEventActionToggleSignatures" >channelAdminLogEventActionToggleSignatures</a>#26ae0971 new_value:<a href="/type/Bool" >Bool</a> = <a href="/type/ChannelAdminLogEventAction" class="current_page_link" >ChannelAdminLogEventAction</a>;
|
||||
<a href="/constructor/channelAdminLogEventActionUpdatePinned" >channelAdminLogEventActionUpdatePinned</a>#e9e82c18 message:<a href="/type/Message" >Message</a> = <a href="/type/ChannelAdminLogEventAction" class="current_page_link" >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" class="current_page_link" >ChannelAdminLogEventAction</a>;
|
||||
<a href="/constructor/channelAdminLogEventActionDeleteMessage" >channelAdminLogEventActionDeleteMessage</a>#42e047bb message:<a href="/type/Message" >Message</a> = <a href="/type/ChannelAdminLogEventAction" class="current_page_link" >ChannelAdminLogEventAction</a>;
|
||||
<a href="/constructor/channelAdminLogEventActionParticipantJoin" >channelAdminLogEventActionParticipantJoin</a>#183040d3 = <a href="/type/ChannelAdminLogEventAction" class="current_page_link" >ChannelAdminLogEventAction</a>;
|
||||
<a href="/constructor/channelAdminLogEventActionParticipantLeave" >channelAdminLogEventActionParticipantLeave</a>#f89777f2 = <a href="/type/ChannelAdminLogEventAction" class="current_page_link" >ChannelAdminLogEventAction</a>;
|
||||
<a href="/constructor/channelAdminLogEventActionParticipantInvite" >channelAdminLogEventActionParticipantInvite</a>#e31c34d8 participant:<a href="/type/ChannelParticipant" >ChannelParticipant</a> = <a href="/type/ChannelAdminLogEventAction" class="current_page_link" >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" class="current_page_link" >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" class="current_page_link" >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" class="current_page_link" >ChannelAdminLogEventAction</a>;
|
||||
<a href="/constructor/channelAdminLogEventActionTogglePreHistoryHidden" >channelAdminLogEventActionTogglePreHistoryHidden</a>#5f5c95f1 new_value:<a href="/type/Bool" >Bool</a> = <a href="/type/ChannelAdminLogEventAction" class="current_page_link" >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" class="current_page_link" >ChannelAdminLogEventAction</a>;
|
||||
<a href="/constructor/channelAdminLogEventActionStopPoll" >channelAdminLogEventActionStopPoll</a>#8f079643 message:<a href="/type/Message" >Message</a> = <a href="/type/ChannelAdminLogEventAction" class="current_page_link" >ChannelAdminLogEventAction</a>;
|
||||
<a href="/constructor/channelAdminLogEventActionChangeLinkedChat" >channelAdminLogEventActionChangeLinkedChat</a>#50c7ac8 prev_value:<a href="/type/long" >long</a> new_value:<a href="/type/long" >long</a> = <a href="/type/ChannelAdminLogEventAction" class="current_page_link" >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" class="current_page_link" >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" class="current_page_link" >ChannelAdminLogEventAction</a>;
|
||||
<a href="/constructor/channelAdminLogEventActionStartGroupCall" >channelAdminLogEventActionStartGroupCall</a>#23209745 call:<a href="/type/InputGroupCall" >InputGroupCall</a> = <a href="/type/ChannelAdminLogEventAction" class="current_page_link" >ChannelAdminLogEventAction</a>;
|
||||
<a href="/constructor/channelAdminLogEventActionDiscardGroupCall" >channelAdminLogEventActionDiscardGroupCall</a>#db9f9140 call:<a href="/type/InputGroupCall" >InputGroupCall</a> = <a href="/type/ChannelAdminLogEventAction" class="current_page_link" >ChannelAdminLogEventAction</a>;
|
||||
<a href="/constructor/channelAdminLogEventActionParticipantMute" >channelAdminLogEventActionParticipantMute</a>#f92424d2 participant:<a href="/type/GroupCallParticipant" >GroupCallParticipant</a> = <a href="/type/ChannelAdminLogEventAction" class="current_page_link" >ChannelAdminLogEventAction</a>;
|
||||
<a href="/constructor/channelAdminLogEventActionParticipantUnmute" >channelAdminLogEventActionParticipantUnmute</a>#e64429c0 participant:<a href="/type/GroupCallParticipant" >GroupCallParticipant</a> = <a href="/type/ChannelAdminLogEventAction" class="current_page_link" >ChannelAdminLogEventAction</a>;
|
||||
<a href="/constructor/channelAdminLogEventActionToggleGroupCallSetting" >channelAdminLogEventActionToggleGroupCallSetting</a>#56d6a247 join_muted:<a href="/type/Bool" >Bool</a> = <a href="/type/ChannelAdminLogEventAction" class="current_page_link" >ChannelAdminLogEventAction</a>;
|
||||
<a href="/constructor/channelAdminLogEventActionParticipantJoinByInvite" >channelAdminLogEventActionParticipantJoinByInvite</a>#5cdada77 invite:<a href="/type/ExportedChatInvite" >ExportedChatInvite</a> = <a href="/type/ChannelAdminLogEventAction" class="current_page_link" >ChannelAdminLogEventAction</a>;
|
||||
<a href="/constructor/channelAdminLogEventActionExportedInviteDelete" >channelAdminLogEventActionExportedInviteDelete</a>#5a50fca4 invite:<a href="/type/ExportedChatInvite" >ExportedChatInvite</a> = <a href="/type/ChannelAdminLogEventAction" class="current_page_link" >ChannelAdminLogEventAction</a>;
|
||||
<a href="/constructor/channelAdminLogEventActionExportedInviteRevoke" >channelAdminLogEventActionExportedInviteRevoke</a>#410a134e invite:<a href="/type/ExportedChatInvite" >ExportedChatInvite</a> = <a href="/type/ChannelAdminLogEventAction" class="current_page_link" >ChannelAdminLogEventAction</a>;
|
||||
<a href="/constructor/channelAdminLogEventActionExportedInviteEdit" >channelAdminLogEventActionExportedInviteEdit</a>#e90ebb59 prev_invite:<a href="/type/ExportedChatInvite" >ExportedChatInvite</a> new_invite:<a href="/type/ExportedChatInvite" >ExportedChatInvite</a> = <a href="/type/ChannelAdminLogEventAction" class="current_page_link" >ChannelAdminLogEventAction</a>;
|
||||
<a href="/constructor/channelAdminLogEventActionParticipantVolume" >channelAdminLogEventActionParticipantVolume</a>#3e7f6847 participant:<a href="/type/GroupCallParticipant" >GroupCallParticipant</a> = <a href="/type/ChannelAdminLogEventAction" class="current_page_link" >ChannelAdminLogEventAction</a>;
|
||||
<a href="/constructor/channelAdminLogEventActionChangeHistoryTTL" >channelAdminLogEventActionChangeHistoryTTL</a>#6e941a38 prev_value:<a href="/type/int" >int</a> new_value:<a href="/type/int" >int</a> = <a href="/type/ChannelAdminLogEventAction" class="current_page_link" >ChannelAdminLogEventAction</a>;</code></pre></p>
|
||||
<h3><a class="anchor" href="#constructors" id="constructors" name="constructors"><i class="anchor-icon"></i></a>Constructors</h3>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Constructor</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><a href="/constructor/channelAdminLogEventActionChangeTitle">channelAdminLogEventActionChangeTitle</a></td>
|
||||
<td>Channel/supergroup title was changed</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/channelAdminLogEventActionChangeAbout">channelAdminLogEventActionChangeAbout</a></td>
|
||||
<td>The description was changed</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/channelAdminLogEventActionChangeUsername">channelAdminLogEventActionChangeUsername</a></td>
|
||||
<td>Channel/supergroup username was changed</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/channelAdminLogEventActionChangePhoto">channelAdminLogEventActionChangePhoto</a></td>
|
||||
<td>The channel/supergroup's picture was changed</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/channelAdminLogEventActionToggleInvites">channelAdminLogEventActionToggleInvites</a></td>
|
||||
<td>Invites were enabled/disabled</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/channelAdminLogEventActionToggleSignatures">channelAdminLogEventActionToggleSignatures</a></td>
|
||||
<td>Channel signatures were enabled/disabled</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/channelAdminLogEventActionUpdatePinned">channelAdminLogEventActionUpdatePinned</a></td>
|
||||
<td>A message was pinned</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/channelAdminLogEventActionEditMessage">channelAdminLogEventActionEditMessage</a></td>
|
||||
<td>A message was edited</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/channelAdminLogEventActionDeleteMessage">channelAdminLogEventActionDeleteMessage</a></td>
|
||||
<td>A message was deleted</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/channelAdminLogEventActionParticipantJoin">channelAdminLogEventActionParticipantJoin</a></td>
|
||||
<td>A user has joined the group (in the case of big groups, info of the user that has joined isn't shown)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/channelAdminLogEventActionParticipantLeave">channelAdminLogEventActionParticipantLeave</a></td>
|
||||
<td>A user left the channel/supergroup (in the case of big groups, info of the user that has joined isn't shown)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/channelAdminLogEventActionParticipantInvite">channelAdminLogEventActionParticipantInvite</a></td>
|
||||
<td>A user was invited to the group</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/channelAdminLogEventActionParticipantToggleBan">channelAdminLogEventActionParticipantToggleBan</a></td>
|
||||
<td>The banned <a href="/api/rights">rights</a> of a user were changed</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/channelAdminLogEventActionParticipantToggleAdmin">channelAdminLogEventActionParticipantToggleAdmin</a></td>
|
||||
<td>The admin <a href="/api/rights">rights</a> of a user were changed</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/channelAdminLogEventActionChangeStickerSet">channelAdminLogEventActionChangeStickerSet</a></td>
|
||||
<td>The supergroup's stickerset was changed</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/channelAdminLogEventActionTogglePreHistoryHidden">channelAdminLogEventActionTogglePreHistoryHidden</a></td>
|
||||
<td>The hidden prehistory setting was <a href="/method/channels.togglePreHistoryHidden">changed</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/channelAdminLogEventActionDefaultBannedRights">channelAdminLogEventActionDefaultBannedRights</a></td>
|
||||
<td>The default banned rights were modified</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/channelAdminLogEventActionStopPoll">channelAdminLogEventActionStopPoll</a></td>
|
||||
<td>A poll was stopped</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/channelAdminLogEventActionChangeLinkedChat">channelAdminLogEventActionChangeLinkedChat</a></td>
|
||||
<td>The linked chat was changed</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/channelAdminLogEventActionChangeLocation">channelAdminLogEventActionChangeLocation</a></td>
|
||||
<td>The geogroup location was changed</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/channelAdminLogEventActionToggleSlowMode">channelAdminLogEventActionToggleSlowMode</a></td>
|
||||
<td><a href="/method/channels.toggleSlowMode">Slow mode setting for supergroups was changed</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/channelAdminLogEventActionStartGroupCall">channelAdminLogEventActionStartGroupCall</a></td>
|
||||
<td>A group call was started</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/channelAdminLogEventActionDiscardGroupCall">channelAdminLogEventActionDiscardGroupCall</a></td>
|
||||
<td>A group call was terminated</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/channelAdminLogEventActionParticipantMute">channelAdminLogEventActionParticipantMute</a></td>
|
||||
<td>A group call participant was muted</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/channelAdminLogEventActionParticipantUnmute">channelAdminLogEventActionParticipantUnmute</a></td>
|
||||
<td>A group call participant was unmuted</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/channelAdminLogEventActionToggleGroupCallSetting">channelAdminLogEventActionToggleGroupCallSetting</a></td>
|
||||
<td>Group call settings were changed</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/channelAdminLogEventActionParticipantJoinByInvite">channelAdminLogEventActionParticipantJoinByInvite</a></td>
|
||||
<td>A user joined the <a href="/api/channel">supergroup/channel</a> using a specific invite link</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/channelAdminLogEventActionExportedInviteDelete">channelAdminLogEventActionExportedInviteDelete</a></td>
|
||||
<td>A chat invite was deleted</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/channelAdminLogEventActionExportedInviteRevoke">channelAdminLogEventActionExportedInviteRevoke</a></td>
|
||||
<td>A specific invite link was revoked</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/channelAdminLogEventActionExportedInviteEdit">channelAdminLogEventActionExportedInviteEdit</a></td>
|
||||
<td>A chat invite was edited</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/channelAdminLogEventActionParticipantVolume">channelAdminLogEventActionParticipantVolume</a></td>
|
||||
<td>channelAdminLogEvent.user_id has set the volume of participant.peer to participant.volume</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/channelAdminLogEventActionChangeHistoryTTL">channelAdminLogEventActionChangeHistoryTTL</a></td>
|
||||
<td>The Time-To-Live of messages in this chat was changed</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?43"></script>
|
||||
|
||||
<script>backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,148 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>ChannelLocation</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Geographical location of supergroup (geogroups)">
|
||||
<meta property="og:title" content="ChannelLocation">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Geographical location of supergroup (geogroups)">
|
||||
<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?215" 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="/type/ChannelLocation" >ChannelLocation</a></li></ul></div>
|
||||
<h1 id="dev_page_title">ChannelLocation</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Geographical location of supergroup (geogroups)</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 133 <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="?layer=1">1 – Base layer</a></li><li><a href="?layer=2">2 – New userpic notifications</a></li><li><a href="?layer=3">3 – Send message can trigger link change</a></li><li><a href="?layer=4">4 – Check-in chats</a></li><li><a href="?layer=5">5 – Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 – Foursquare integration</a></li><li><a href="?layer=7">7 – Added wallPaperSolid</a></li><li><a href="?layer=8">8 – Added end-to-end encryption</a></li><li><a href="?layer=9">9 – Improved big files upload perfomance</a></li><li><a href="?layer=10">10 – Improved chat participants updates</a></li><li><a href="?layer=11">11 – Improved secret chats</a></li><li><a href="?layer=12">12 – New dynamic support</a></li><li><a href="?layer=13">13 – Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 – Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 – Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 – Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 – Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 – Added usernames</a></li><li><a href="?layer=23">23 – Stickers for secret chats</a></li><li><a href="?layer=105">105 – Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 – Login with QR code</a></li><li><a href="?layer=109">109 – Polls v2</a></li><li><a href="?layer=110">110 – People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 – Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 – Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 – PSA</a></li><li><a href="?layer=114">114 – Video thumbs for GIFs</a></li><li><a href="?layer=115">115 – Peek Channel Invite</a></li><li><a href="?layer=116">116 – Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 – WebRTC Phone Calls</a></li><li><a href="?layer=118">118 – Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 – Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 – Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121">121 – SVG-based Outlines for Stickers</a></li><li><a href="?layer=122">122 – Voice Chats</a></li><li><a href="?layer=123">123 – Voice Chat improvements</a></li><li><a href="?layer=124">124 – Expiring Invite links</a></li><li><a href="?layer=125">125 – Voice Chats in Broadcasts</a></li><li><a href="?layer=126">126 – Ban channels in channels</a></li><li><a href="?layer=127">127 – Payments in channels</a></li><li><a href="?layer=128">128 – Microthumbs for User/Chat profile photos</a></li><li><a href="?layer=129">129 – Video Chats</a></li><li><a href="?layer=130">130 – Custom placeholder for bot reply keyboards</a></li><li><a href="?layer=131">131 – Reset 2FA Password after a week</a></li><li><a href="?layer=132">132 – Chat themes</a></li><li><a href="?layer=133"><strong>133 – 64-bit IDs for User/Chat</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/channelLocationEmpty" >channelLocationEmpty</a>#bfb5ad8b = <a href="/type/ChannelLocation" class="current_page_link" >ChannelLocation</a>;
|
||||
<a href="/constructor/channelLocation" >channelLocation</a>#209b82db geo_point:<a href="/type/GeoPoint" >GeoPoint</a> address:<a href="/type/string" >string</a> = <a href="/type/ChannelLocation" class="current_page_link" >ChannelLocation</a>;</code></pre></p>
|
||||
<h3><a class="anchor" href="#constructors" id="constructors" name="constructors"><i class="anchor-icon"></i></a>Constructors</h3>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Constructor</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><a href="/constructor/channelLocationEmpty">channelLocationEmpty</a></td>
|
||||
<td>No location (normal supergroup)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/channelLocation">channelLocation</a></td>
|
||||
<td>Geographical location of supergroup (geogroups)</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?43"></script>
|
||||
|
||||
<script>backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,153 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>ChatParticipant</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Details of a group member.">
|
||||
<meta property="og:title" content="ChatParticipant">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Details of a group member.">
|
||||
<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?215" 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="/type/ChatParticipant" >ChatParticipant</a></li></ul></div>
|
||||
<h1 id="dev_page_title">ChatParticipant</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Details of a group member.</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 133 <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="?layer=1">1 – Base layer</a></li><li><a href="?layer=2">2 – New userpic notifications</a></li><li><a href="?layer=3">3 – Send message can trigger link change</a></li><li><a href="?layer=4">4 – Check-in chats</a></li><li><a href="?layer=5">5 – Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 – Foursquare integration</a></li><li><a href="?layer=7">7 – Added wallPaperSolid</a></li><li><a href="?layer=8">8 – Added end-to-end encryption</a></li><li><a href="?layer=9">9 – Improved big files upload perfomance</a></li><li><a href="?layer=10">10 – Improved chat participants updates</a></li><li><a href="?layer=11">11 – Improved secret chats</a></li><li><a href="?layer=12">12 – New dynamic support</a></li><li><a href="?layer=13">13 – Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 – Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 – Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 – Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 – Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 – Added usernames</a></li><li><a href="?layer=23">23 – Stickers for secret chats</a></li><li><a href="?layer=105">105 – Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 – Login with QR code</a></li><li><a href="?layer=109">109 – Polls v2</a></li><li><a href="?layer=110">110 – People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 – Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 – Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 – PSA</a></li><li><a href="?layer=114">114 – Video thumbs for GIFs</a></li><li><a href="?layer=115">115 – Peek Channel Invite</a></li><li><a href="?layer=116">116 – Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 – WebRTC Phone Calls</a></li><li><a href="?layer=118">118 – Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 – Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 – Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121">121 – SVG-based Outlines for Stickers</a></li><li><a href="?layer=122">122 – Voice Chats</a></li><li><a href="?layer=123">123 – Voice Chat improvements</a></li><li><a href="?layer=124">124 – Expiring Invite links</a></li><li><a href="?layer=125">125 – Voice Chats in Broadcasts</a></li><li><a href="?layer=126">126 – Ban channels in channels</a></li><li><a href="?layer=127">127 – Payments in channels</a></li><li><a href="?layer=128">128 – Microthumbs for User/Chat profile photos</a></li><li><a href="?layer=129">129 – Video Chats</a></li><li><a href="?layer=130">130 – Custom placeholder for bot reply keyboards</a></li><li><a href="?layer=131">131 – Reset 2FA Password after a week</a></li><li><a href="?layer=132">132 – Chat themes</a></li><li><a href="?layer=133"><strong>133 – 64-bit IDs for User/Chat</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/chatParticipant" >chatParticipant</a>#c02d4007 user_id:<a href="/type/long" >long</a> inviter_id:<a href="/type/long" >long</a> date:<a href="/type/int" >int</a> = <a href="/type/ChatParticipant" class="current_page_link" >ChatParticipant</a>;
|
||||
<a href="/constructor/chatParticipantCreator" >chatParticipantCreator</a>#e46bcee4 user_id:<a href="/type/long" >long</a> = <a href="/type/ChatParticipant" class="current_page_link" >ChatParticipant</a>;
|
||||
<a href="/constructor/chatParticipantAdmin" >chatParticipantAdmin</a>#a0933f5b user_id:<a href="/type/long" >long</a> inviter_id:<a href="/type/long" >long</a> date:<a href="/type/int" >int</a> = <a href="/type/ChatParticipant" class="current_page_link" >ChatParticipant</a>;</code></pre></p>
|
||||
<h3><a class="anchor" href="#constructors" id="constructors" name="constructors"><i class="anchor-icon"></i></a>Constructors</h3>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Constructor</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><a href="/constructor/chatParticipant">chatParticipant</a></td>
|
||||
<td>Group member.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/chatParticipantCreator">chatParticipantCreator</a></td>
|
||||
<td>Represents the creator of the group</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/chatParticipantAdmin">chatParticipantAdmin</a></td>
|
||||
<td>Chat admin</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?43"></script>
|
||||
|
||||
<script>backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,162 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>ExportedChatInvite</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Exported chat invite">
|
||||
<meta property="og:title" content="ExportedChatInvite">
|
||||
<meta property="og:image" content="">
|
||||
<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">
|
||||
|
||||
<link href="/css/telegram.css?215" 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="/type/ExportedChatInvite" >ExportedChatInvite</a></li></ul></div>
|
||||
<h1 id="dev_page_title">ExportedChatInvite</h1>
|
||||
|
||||
<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">
|
||||
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 133 <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="?layer=1">1 – Base layer</a></li><li><a href="?layer=2">2 – New userpic notifications</a></li><li><a href="?layer=3">3 – Send message can trigger link change</a></li><li><a href="?layer=4">4 – Check-in chats</a></li><li><a href="?layer=5">5 – Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 – Foursquare integration</a></li><li><a href="?layer=7">7 – Added wallPaperSolid</a></li><li><a href="?layer=8">8 – Added end-to-end encryption</a></li><li><a href="?layer=9">9 – Improved big files upload perfomance</a></li><li><a href="?layer=10">10 – Improved chat participants updates</a></li><li><a href="?layer=11">11 – Improved secret chats</a></li><li><a href="?layer=12">12 – New dynamic support</a></li><li><a href="?layer=13">13 – Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 – Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 – Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 – Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 – Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 – Added usernames</a></li><li><a href="?layer=23">23 – Stickers for secret chats</a></li><li><a href="?layer=105">105 – Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 – Login with QR code</a></li><li><a href="?layer=109">109 – Polls v2</a></li><li><a href="?layer=110">110 – People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 – Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 – Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 – PSA</a></li><li><a href="?layer=114">114 – Video thumbs for GIFs</a></li><li><a href="?layer=115">115 – Peek Channel Invite</a></li><li><a href="?layer=116">116 – Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 – WebRTC Phone Calls</a></li><li><a href="?layer=118">118 – Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 – Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 – Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121">121 – SVG-based Outlines for Stickers</a></li><li><a href="?layer=122">122 – Voice Chats</a></li><li><a href="?layer=123">123 – Voice Chat improvements</a></li><li><a href="?layer=124">124 – Expiring Invite links</a></li><li><a href="?layer=125">125 – Voice Chats in Broadcasts</a></li><li><a href="?layer=126">126 – Ban channels in channels</a></li><li><a href="?layer=127">127 – Payments in channels</a></li><li><a href="?layer=128">128 – Microthumbs for User/Chat profile photos</a></li><li><a href="?layer=129">129 – Video Chats</a></li><li><a href="?layer=130">130 – Custom placeholder for bot reply keyboards</a></li><li><a href="?layer=131">131 – Reset 2FA Password after a week</a></li><li><a href="?layer=132">132 – Chat themes</a></li><li><a href="?layer=133"><strong>133 – 64-bit IDs for User/Chat</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/chatInviteExported" >chatInviteExported</a>#b18105e8 flags:<a href="/type/%23" >#</a> revoked:flags.0?true permanent:flags.5?true link:<a href="/type/string" >string</a> admin_id:<a href="/type/long" >long</a> date:<a href="/type/int" >int</a> start_date:flags.4?<a href="/type/int" >int</a> expire_date:flags.1?<a href="/type/int" >int</a> usage_limit:flags.2?<a href="/type/int" >int</a> usage:flags.3?<a href="/type/int" >int</a> = <a href="/type/ExportedChatInvite" class="current_page_link" >ExportedChatInvite</a>;
|
||||
|
||||
---functions---
|
||||
|
||||
<a href="/method/messages.exportChatInvite" >messages.exportChatInvite</a>#14b9bcd7 flags:<a href="/type/%23" >#</a> legacy_revoke_permanent:flags.2?true peer:<a href="/type/InputPeer" >InputPeer</a> expire_date:flags.0?<a href="/type/int" >int</a> usage_limit:flags.1?<a href="/type/int" >int</a> = <a href="/type/ExportedChatInvite" class="current_page_link" >ExportedChatInvite</a>;</code></pre></p>
|
||||
<h3><a class="anchor" href="#constructors" id="constructors" name="constructors"><i class="anchor-icon"></i></a>Constructors</h3>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Constructor</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><a href="/constructor/chatInviteExported">chatInviteExported</a></td>
|
||||
<td>Exported chat invite</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3><a class="anchor" href="#methods" id="methods" name="methods"><i class="anchor-icon"></i></a>Methods</h3>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Method</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><a href="/method/messages.exportChatInvite">messages.exportChatInvite</a></td>
|
||||
<td>Export an invite link for a chat</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?43"></script>
|
||||
|
||||
<script>backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,162 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>ExportedMessageLink</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="HTTP link and embed info of channel message">
|
||||
<meta property="og:title" content="ExportedMessageLink">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="HTTP link and embed info of channel 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?215" 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="/type/ExportedMessageLink" >ExportedMessageLink</a></li></ul></div>
|
||||
<h1 id="dev_page_title">ExportedMessageLink</h1>
|
||||
|
||||
<div id="dev_page_content"><p>HTTP link and embed info of channel 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 133 <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="?layer=1">1 – Base layer</a></li><li><a href="?layer=2">2 – New userpic notifications</a></li><li><a href="?layer=3">3 – Send message can trigger link change</a></li><li><a href="?layer=4">4 – Check-in chats</a></li><li><a href="?layer=5">5 – Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 – Foursquare integration</a></li><li><a href="?layer=7">7 – Added wallPaperSolid</a></li><li><a href="?layer=8">8 – Added end-to-end encryption</a></li><li><a href="?layer=9">9 – Improved big files upload perfomance</a></li><li><a href="?layer=10">10 – Improved chat participants updates</a></li><li><a href="?layer=11">11 – Improved secret chats</a></li><li><a href="?layer=12">12 – New dynamic support</a></li><li><a href="?layer=13">13 – Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 – Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 – Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 – Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 – Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 – Added usernames</a></li><li><a href="?layer=23">23 – Stickers for secret chats</a></li><li><a href="?layer=105">105 – Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 – Login with QR code</a></li><li><a href="?layer=109">109 – Polls v2</a></li><li><a href="?layer=110">110 – People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 – Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 – Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 – PSA</a></li><li><a href="?layer=114">114 – Video thumbs for GIFs</a></li><li><a href="?layer=115">115 – Peek Channel Invite</a></li><li><a href="?layer=116">116 – Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 – WebRTC Phone Calls</a></li><li><a href="?layer=118">118 – Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 – Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 – Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121">121 – SVG-based Outlines for Stickers</a></li><li><a href="?layer=122">122 – Voice Chats</a></li><li><a href="?layer=123">123 – Voice Chat improvements</a></li><li><a href="?layer=124">124 – Expiring Invite links</a></li><li><a href="?layer=125">125 – Voice Chats in Broadcasts</a></li><li><a href="?layer=126">126 – Ban channels in channels</a></li><li><a href="?layer=127">127 – Payments in channels</a></li><li><a href="?layer=128">128 – Microthumbs for User/Chat profile photos</a></li><li><a href="?layer=129">129 – Video Chats</a></li><li><a href="?layer=130">130 – Custom placeholder for bot reply keyboards</a></li><li><a href="?layer=131">131 – Reset 2FA Password after a week</a></li><li><a href="?layer=132">132 – Chat themes</a></li><li><a href="?layer=133"><strong>133 – 64-bit IDs for User/Chat</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/exportedMessageLink" >exportedMessageLink</a>#5dab1af4 link:<a href="/type/string" >string</a> html:<a href="/type/string" >string</a> = <a href="/type/ExportedMessageLink" class="current_page_link" >ExportedMessageLink</a>;
|
||||
|
||||
---functions---
|
||||
|
||||
<a href="/method/channels.exportMessageLink" >channels.exportMessageLink</a>#e63fadeb flags:<a href="/type/%23" >#</a> grouped:flags.0?true thread:flags.1?true channel:<a href="/type/InputChannel" >InputChannel</a> id:<a href="/type/int" >int</a> = <a href="/type/ExportedMessageLink" class="current_page_link" >ExportedMessageLink</a>;</code></pre></p>
|
||||
<h3><a class="anchor" href="#constructors" id="constructors" name="constructors"><i class="anchor-icon"></i></a>Constructors</h3>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Constructor</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><a href="/constructor/exportedMessageLink">exportedMessageLink</a></td>
|
||||
<td>Link to a message in a supergroup/channel</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3><a class="anchor" href="#methods" id="methods" name="methods"><i class="anchor-icon"></i></a>Methods</h3>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Method</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><a href="/method/channels.exportMessageLink">channels.exportMessageLink</a></td>
|
||||
<td>Get link and embed info of a message in a <a href="/api/channel">channel/supergroup</a></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?43"></script>
|
||||
|
||||
<script>backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,143 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>InputStickerSetItem</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Sticker">
|
||||
<meta property="og:title" content="InputStickerSetItem">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Sticker">
|
||||
<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?215" 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="/type/InputStickerSetItem" >InputStickerSetItem</a></li></ul></div>
|
||||
<h1 id="dev_page_title">InputStickerSetItem</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Sticker</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 133 <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="?layer=1">1 – Base layer</a></li><li><a href="?layer=2">2 – New userpic notifications</a></li><li><a href="?layer=3">3 – Send message can trigger link change</a></li><li><a href="?layer=4">4 – Check-in chats</a></li><li><a href="?layer=5">5 – Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 – Foursquare integration</a></li><li><a href="?layer=7">7 – Added wallPaperSolid</a></li><li><a href="?layer=8">8 – Added end-to-end encryption</a></li><li><a href="?layer=9">9 – Improved big files upload perfomance</a></li><li><a href="?layer=10">10 – Improved chat participants updates</a></li><li><a href="?layer=11">11 – Improved secret chats</a></li><li><a href="?layer=12">12 – New dynamic support</a></li><li><a href="?layer=13">13 – Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 – Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 – Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 – Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 – Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 – Added usernames</a></li><li><a href="?layer=23">23 – Stickers for secret chats</a></li><li><a href="?layer=105">105 – Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 – Login with QR code</a></li><li><a href="?layer=109">109 – Polls v2</a></li><li><a href="?layer=110">110 – People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 – Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 – Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 – PSA</a></li><li><a href="?layer=114">114 – Video thumbs for GIFs</a></li><li><a href="?layer=115">115 – Peek Channel Invite</a></li><li><a href="?layer=116">116 – Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 – WebRTC Phone Calls</a></li><li><a href="?layer=118">118 – Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 – Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 – Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121">121 – SVG-based Outlines for Stickers</a></li><li><a href="?layer=122">122 – Voice Chats</a></li><li><a href="?layer=123">123 – Voice Chat improvements</a></li><li><a href="?layer=124">124 – Expiring Invite links</a></li><li><a href="?layer=125">125 – Voice Chats in Broadcasts</a></li><li><a href="?layer=126">126 – Ban channels in channels</a></li><li><a href="?layer=127">127 – Payments in channels</a></li><li><a href="?layer=128">128 – Microthumbs for User/Chat profile photos</a></li><li><a href="?layer=129">129 – Video Chats</a></li><li><a href="?layer=130">130 – Custom placeholder for bot reply keyboards</a></li><li><a href="?layer=131">131 – Reset 2FA Password after a week</a></li><li><a href="?layer=132">132 – Chat themes</a></li><li><a href="?layer=133"><strong>133 – 64-bit IDs for User/Chat</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/inputStickerSetItem" >inputStickerSetItem</a>#ffa0a496 flags:<a href="/type/%23" >#</a> document:<a href="/type/InputDocument" >InputDocument</a> emoji:<a href="/type/string" >string</a> mask_coords:flags.0?<a href="/type/MaskCoords" >MaskCoords</a> = <a href="/type/InputStickerSetItem" class="current_page_link" >InputStickerSetItem</a>;</code></pre></p>
|
||||
<h3><a class="anchor" href="#constructors" id="constructors" name="constructors"><i class="anchor-icon"></i></a>Constructors</h3>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Constructor</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><a href="/constructor/inputStickerSetItem">inputStickerSetItem</a></td>
|
||||
<td>Sticker in a stickerset</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?43"></script>
|
||||
|
||||
<script>backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -2,12 +2,12 @@
|
|||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Auth.ExportedAuthorization</title>
|
||||
<title>LangPackString</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Exported authorization">
|
||||
<meta property="og:title" content="Auth.ExportedAuthorization">
|
||||
<meta property="description" content="Language pack string">
|
||||
<meta property="og:title" content="LangPackString">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Exported authorization">
|
||||
<meta property="og:description" content="Language pack string">
|
||||
<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="/type/auth.ExportedAuthorization" >Auth.ExportedAuthorization</a></li></ul></div>
|
||||
<h1 id="dev_page_title">Auth.ExportedAuthorization</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="/type/LangPackString" >LangPackString</a></li></ul></div>
|
||||
<h1 id="dev_page_title">LangPackString</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Exported authorization</p>
|
||||
<div id="dev_page_content"><p>Language pack string</p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
@ -52,11 +52,9 @@
|
|||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<pre class="page_scheme"><code><a href="/constructor/auth.exportedAuthorization" >auth.exportedAuthorization</a>#b434e2b8 id:<a href="/type/long" >long</a> bytes:<a href="/type/bytes" >bytes</a> = <a href="/type/auth.ExportedAuthorization" class="current_page_link" >auth.ExportedAuthorization</a>;
|
||||
|
||||
---functions---
|
||||
|
||||
<a href="/method/auth.exportAuthorization" >auth.exportAuthorization</a>#e5bfffcd dc_id:<a href="/type/int" >int</a> = <a href="/type/auth.ExportedAuthorization" class="current_page_link" >auth.ExportedAuthorization</a>;</code></pre></p>
|
||||
<pre class="page_scheme"><code><a href="/constructor/langPackString" >langPackString</a>#cad181f6 key:<a href="/type/string" >string</a> value:<a href="/type/string" >string</a> = <a href="/type/LangPackString" class="current_page_link" >LangPackString</a>;
|
||||
<a href="/constructor/langPackStringPluralized" >langPackStringPluralized</a>#6c47ac9f flags:<a href="/type/%23" >#</a> key:<a href="/type/string" >string</a> zero_value:flags.0?<a href="/type/string" >string</a> one_value:flags.1?<a href="/type/string" >string</a> two_value:flags.2?<a href="/type/string" >string</a> few_value:flags.3?<a href="/type/string" >string</a> many_value:flags.4?<a href="/type/string" >string</a> other_value:<a href="/type/string" >string</a> = <a href="/type/LangPackString" class="current_page_link" >LangPackString</a>;
|
||||
<a href="/constructor/langPackStringDeleted" >langPackStringDeleted</a>#2979eeb2 key:<a href="/type/string" >string</a> = <a href="/type/LangPackString" class="current_page_link" >LangPackString</a>;</code></pre></p>
|
||||
<h3><a class="anchor" href="#constructors" id="constructors" name="constructors"><i class="anchor-icon"></i></a>Constructors</h3>
|
||||
<table class="table">
|
||||
<thead>
|
||||
|
@ -67,23 +65,16 @@
|
|||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><a href="/constructor/auth.exportedAuthorization">auth.exportedAuthorization</a></td>
|
||||
<td>Data for copying of authorization between data centres.</td>
|
||||
<td><a href="/constructor/langPackString">langPackString</a></td>
|
||||
<td>Translated localization string</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3><a class="anchor" href="#methods" id="methods" name="methods"><i class="anchor-icon"></i></a>Methods</h3>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Method</th>
|
||||
<th>Description</th>
|
||||
<td><a href="/constructor/langPackStringPluralized">langPackStringPluralized</a></td>
|
||||
<td>A language pack string which has different forms based on the number of some object it mentions. See <a href="https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html">https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html</a> for more info</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><a href="/method/auth.exportAuthorization">auth.exportAuthorization</a></td>
|
||||
<td>Returns data for copying authorization to another data-centre.</td>
|
||||
<td><a href="/constructor/langPackStringDeleted">langPackStringDeleted</a></td>
|
||||
<td>Deleted localization string</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
|
@ -1,143 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Null</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Object corresponds to an arbitrary empty object.">
|
||||
<meta property="og:title" content="Null">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Object corresponds to an arbitrary empty object.">
|
||||
<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?215" 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="/type/Null" >Null</a></li></ul></div>
|
||||
<h1 id="dev_page_title">Null</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Object corresponds to an arbitrary empty object.</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 133 <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="?layer=1">1 – Base layer</a></li><li><a href="?layer=2">2 – New userpic notifications</a></li><li><a href="?layer=3">3 – Send message can trigger link change</a></li><li><a href="?layer=4">4 – Check-in chats</a></li><li><a href="?layer=5">5 – Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 – Foursquare integration</a></li><li><a href="?layer=7">7 – Added wallPaperSolid</a></li><li><a href="?layer=8">8 – Added end-to-end encryption</a></li><li><a href="?layer=9">9 – Improved big files upload perfomance</a></li><li><a href="?layer=10">10 – Improved chat participants updates</a></li><li><a href="?layer=11">11 – Improved secret chats</a></li><li><a href="?layer=12">12 – New dynamic support</a></li><li><a href="?layer=13">13 – Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 – Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 – Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 – Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 – Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 – Added usernames</a></li><li><a href="?layer=23">23 – Stickers for secret chats</a></li><li><a href="?layer=105">105 – Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 – Login with QR code</a></li><li><a href="?layer=109">109 – Polls v2</a></li><li><a href="?layer=110">110 – People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 – Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 – Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 – PSA</a></li><li><a href="?layer=114">114 – Video thumbs for GIFs</a></li><li><a href="?layer=115">115 – Peek Channel Invite</a></li><li><a href="?layer=116">116 – Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 – WebRTC Phone Calls</a></li><li><a href="?layer=118">118 – Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 – Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 – Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121">121 – SVG-based Outlines for Stickers</a></li><li><a href="?layer=122">122 – Voice Chats</a></li><li><a href="?layer=123">123 – Voice Chat improvements</a></li><li><a href="?layer=124">124 – Expiring Invite links</a></li><li><a href="?layer=125">125 – Voice Chats in Broadcasts</a></li><li><a href="?layer=126">126 – Ban channels in channels</a></li><li><a href="?layer=127">127 – Payments in channels</a></li><li><a href="?layer=128">128 – Microthumbs for User/Chat profile photos</a></li><li><a href="?layer=129">129 – Video Chats</a></li><li><a href="?layer=130">130 – Custom placeholder for bot reply keyboards</a></li><li><a href="?layer=131">131 – Reset 2FA Password after a week</a></li><li><a href="?layer=132">132 – Chat themes</a></li><li><a href="?layer=133"><strong>133 – 64-bit IDs for User/Chat</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/null" >null</a>#56730bcc = <a href="/type/Null" class="current_page_link" >Null</a>;</code></pre></p>
|
||||
<h3><a class="anchor" href="#constructors" id="constructors" name="constructors"><i class="anchor-icon"></i></a>Constructors</h3>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Constructor</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><a href="/constructor/null">null</a></td>
|
||||
<td>Corresponds to an arbitrary empty object.</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?43"></script>
|
||||
|
||||
<script>backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,151 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>PasswordKdfAlgo</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Key derivation function to use when generating the password hash for SRP two-factor authorization">
|
||||
<meta property="og:title" content="PasswordKdfAlgo">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Key derivation function to use when generating the password hash for SRP two-factor authorization">
|
||||
<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?215" 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="/type/PasswordKdfAlgo" >PasswordKdfAlgo</a></li></ul></div>
|
||||
<h1 id="dev_page_title">PasswordKdfAlgo</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Key derivation function to use when generating the <a href="/api/srp">password hash for SRP two-factor authorization</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 133 <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="?layer=1">1 – Base layer</a></li><li><a href="?layer=2">2 – New userpic notifications</a></li><li><a href="?layer=3">3 – Send message can trigger link change</a></li><li><a href="?layer=4">4 – Check-in chats</a></li><li><a href="?layer=5">5 – Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 – Foursquare integration</a></li><li><a href="?layer=7">7 – Added wallPaperSolid</a></li><li><a href="?layer=8">8 – Added end-to-end encryption</a></li><li><a href="?layer=9">9 – Improved big files upload perfomance</a></li><li><a href="?layer=10">10 – Improved chat participants updates</a></li><li><a href="?layer=11">11 – Improved secret chats</a></li><li><a href="?layer=12">12 – New dynamic support</a></li><li><a href="?layer=13">13 – Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 – Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 – Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 – Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 – Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 – Added usernames</a></li><li><a href="?layer=23">23 – Stickers for secret chats</a></li><li><a href="?layer=105">105 – Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 – Login with QR code</a></li><li><a href="?layer=109">109 – Polls v2</a></li><li><a href="?layer=110">110 – People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 – Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 – Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 – PSA</a></li><li><a href="?layer=114">114 – Video thumbs for GIFs</a></li><li><a href="?layer=115">115 – Peek Channel Invite</a></li><li><a href="?layer=116">116 – Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 – WebRTC Phone Calls</a></li><li><a href="?layer=118">118 – Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 – Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 – Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121">121 – SVG-based Outlines for Stickers</a></li><li><a href="?layer=122">122 – Voice Chats</a></li><li><a href="?layer=123">123 – Voice Chat improvements</a></li><li><a href="?layer=124">124 – Expiring Invite links</a></li><li><a href="?layer=125">125 – Voice Chats in Broadcasts</a></li><li><a href="?layer=126">126 – Ban channels in channels</a></li><li><a href="?layer=127">127 – Payments in channels</a></li><li><a href="?layer=128">128 – Microthumbs for User/Chat profile photos</a></li><li><a href="?layer=129">129 – Video Chats</a></li><li><a href="?layer=130">130 – Custom placeholder for bot reply keyboards</a></li><li><a href="?layer=131">131 – Reset 2FA Password after a week</a></li><li><a href="?layer=132">132 – Chat themes</a></li><li><a href="?layer=133"><strong>133 – 64-bit IDs for User/Chat</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/passwordKdfAlgoUnknown" >passwordKdfAlgoUnknown</a>#d45ab096 = <a href="/type/PasswordKdfAlgo" class="current_page_link" >PasswordKdfAlgo</a>;
|
||||
<a href="/constructor/passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow" >passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow</a>#3a912d4a salt1:<a href="/type/bytes" >bytes</a> salt2:<a href="/type/bytes" >bytes</a> g:<a href="/type/int" >int</a> p:<a href="/type/bytes" >bytes</a> = <a href="/type/PasswordKdfAlgo" class="current_page_link" >PasswordKdfAlgo</a>;</code></pre></p>
|
||||
<h3><a class="anchor" href="#constructors" id="constructors" name="constructors"><i class="anchor-icon"></i></a>Constructors</h3>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Constructor</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><a href="/constructor/passwordKdfAlgoUnknown">passwordKdfAlgoUnknown</a></td>
|
||||
<td>Unknown KDF (most likely, the client is outdated and does not support the specified KDF algorithm)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow">passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow</a></td>
|
||||
<td>This key derivation algorithm defines that <a href="/api/srp">SRP 2FA login</a> must be used</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
|
||||
<h4><a class="anchor" href="#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></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?43"></script>
|
||||
|
||||
<script>backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,143 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>SavedContact</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Saved contact">
|
||||
<meta property="og:title" content="SavedContact">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Saved contact">
|
||||
<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?215" 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="/type/SavedContact" >SavedContact</a></li></ul></div>
|
||||
<h1 id="dev_page_title">SavedContact</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Saved contact</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 133 <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="?layer=1">1 – Base layer</a></li><li><a href="?layer=2">2 – New userpic notifications</a></li><li><a href="?layer=3">3 – Send message can trigger link change</a></li><li><a href="?layer=4">4 – Check-in chats</a></li><li><a href="?layer=5">5 – Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 – Foursquare integration</a></li><li><a href="?layer=7">7 – Added wallPaperSolid</a></li><li><a href="?layer=8">8 – Added end-to-end encryption</a></li><li><a href="?layer=9">9 – Improved big files upload perfomance</a></li><li><a href="?layer=10">10 – Improved chat participants updates</a></li><li><a href="?layer=11">11 – Improved secret chats</a></li><li><a href="?layer=12">12 – New dynamic support</a></li><li><a href="?layer=13">13 – Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 – Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 – Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 – Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 – Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 – Added usernames</a></li><li><a href="?layer=23">23 – Stickers for secret chats</a></li><li><a href="?layer=105">105 – Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 – Login with QR code</a></li><li><a href="?layer=109">109 – Polls v2</a></li><li><a href="?layer=110">110 – People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 – Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 – Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 – PSA</a></li><li><a href="?layer=114">114 – Video thumbs for GIFs</a></li><li><a href="?layer=115">115 – Peek Channel Invite</a></li><li><a href="?layer=116">116 – Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 – WebRTC Phone Calls</a></li><li><a href="?layer=118">118 – Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 – Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 – Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121">121 – SVG-based Outlines for Stickers</a></li><li><a href="?layer=122">122 – Voice Chats</a></li><li><a href="?layer=123">123 – Voice Chat improvements</a></li><li><a href="?layer=124">124 – Expiring Invite links</a></li><li><a href="?layer=125">125 – Voice Chats in Broadcasts</a></li><li><a href="?layer=126">126 – Ban channels in channels</a></li><li><a href="?layer=127">127 – Payments in channels</a></li><li><a href="?layer=128">128 – Microthumbs for User/Chat profile photos</a></li><li><a href="?layer=129">129 – Video Chats</a></li><li><a href="?layer=130">130 – Custom placeholder for bot reply keyboards</a></li><li><a href="?layer=131">131 – Reset 2FA Password after a week</a></li><li><a href="?layer=132">132 – Chat themes</a></li><li><a href="?layer=133"><strong>133 – 64-bit IDs for User/Chat</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/savedPhoneContact" >savedPhoneContact</a>#1142bd56 phone:<a href="/type/string" >string</a> first_name:<a href="/type/string" >string</a> last_name:<a href="/type/string" >string</a> date:<a href="/type/int" >int</a> = <a href="/type/SavedContact" class="current_page_link" >SavedContact</a>;</code></pre></p>
|
||||
<h3><a class="anchor" href="#constructors" id="constructors" name="constructors"><i class="anchor-icon"></i></a>Constructors</h3>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Constructor</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><a href="/constructor/savedPhoneContact">savedPhoneContact</a></td>
|
||||
<td>Saved contact</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?43"></script>
|
||||
|
||||
<script>backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,151 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>SecureFile</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="og:image" content="">
|
||||
<meta property="og:description" content="Secure passport file, for more info see the passport docs »">
|
||||
<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?215" 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="/type/SecureFile" >SecureFile</a></li></ul></div>
|
||||
<h1 id="dev_page_title">SecureFile</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>
|
||||
<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 133 <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="?layer=1">1 – Base layer</a></li><li><a href="?layer=2">2 – New userpic notifications</a></li><li><a href="?layer=3">3 – Send message can trigger link change</a></li><li><a href="?layer=4">4 – Check-in chats</a></li><li><a href="?layer=5">5 – Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 – Foursquare integration</a></li><li><a href="?layer=7">7 – Added wallPaperSolid</a></li><li><a href="?layer=8">8 – Added end-to-end encryption</a></li><li><a href="?layer=9">9 – Improved big files upload perfomance</a></li><li><a href="?layer=10">10 – Improved chat participants updates</a></li><li><a href="?layer=11">11 – Improved secret chats</a></li><li><a href="?layer=12">12 – New dynamic support</a></li><li><a href="?layer=13">13 – Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 – Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 – Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 – Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 – Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 – Added usernames</a></li><li><a href="?layer=23">23 – Stickers for secret chats</a></li><li><a href="?layer=105">105 – Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 – Login with QR code</a></li><li><a href="?layer=109">109 – Polls v2</a></li><li><a href="?layer=110">110 – People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 – Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 – Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 – PSA</a></li><li><a href="?layer=114">114 – Video thumbs for GIFs</a></li><li><a href="?layer=115">115 – Peek Channel Invite</a></li><li><a href="?layer=116">116 – Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 – WebRTC Phone Calls</a></li><li><a href="?layer=118">118 – Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 – Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 – Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121">121 – SVG-based Outlines for Stickers</a></li><li><a href="?layer=122">122 – Voice Chats</a></li><li><a href="?layer=123">123 – Voice Chat improvements</a></li><li><a href="?layer=124">124 – Expiring Invite links</a></li><li><a href="?layer=125">125 – Voice Chats in Broadcasts</a></li><li><a href="?layer=126">126 – Ban channels in channels</a></li><li><a href="?layer=127">127 – Payments in channels</a></li><li><a href="?layer=128">128 – Microthumbs for User/Chat profile photos</a></li><li><a href="?layer=129">129 – Video Chats</a></li><li><a href="?layer=130">130 – Custom placeholder for bot reply keyboards</a></li><li><a href="?layer=131">131 – Reset 2FA Password after a week</a></li><li><a href="?layer=132">132 – Chat themes</a></li><li><a href="?layer=133"><strong>133 – 64-bit IDs for User/Chat</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/secureFileEmpty" >secureFileEmpty</a>#64199744 = <a href="/type/SecureFile" class="current_page_link" >SecureFile</a>;
|
||||
<a href="/constructor/secureFile" >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" class="current_page_link" >SecureFile</a>;</code></pre></p>
|
||||
<h3><a class="anchor" href="#constructors" id="constructors" name="constructors"><i class="anchor-icon"></i></a>Constructors</h3>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Constructor</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><a href="/constructor/secureFileEmpty">secureFileEmpty</a></td>
|
||||
<td>Empty constructor</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/secureFile">secureFile</a></td>
|
||||
<td>Secure file</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
|
||||
<h4><a class="anchor" href="#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>
|
||||
|
||||
</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?43"></script>
|
||||
|
||||
<script>backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,203 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>SecureValueType</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Secure value type">
|
||||
<meta property="og:title" content="SecureValueType">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Secure value 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?215" 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="/type/SecureValueType" >SecureValueType</a></li></ul></div>
|
||||
<h1 id="dev_page_title">SecureValueType</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Secure value type</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 133 <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="?layer=1">1 – Base layer</a></li><li><a href="?layer=2">2 – New userpic notifications</a></li><li><a href="?layer=3">3 – Send message can trigger link change</a></li><li><a href="?layer=4">4 – Check-in chats</a></li><li><a href="?layer=5">5 – Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 – Foursquare integration</a></li><li><a href="?layer=7">7 – Added wallPaperSolid</a></li><li><a href="?layer=8">8 – Added end-to-end encryption</a></li><li><a href="?layer=9">9 – Improved big files upload perfomance</a></li><li><a href="?layer=10">10 – Improved chat participants updates</a></li><li><a href="?layer=11">11 – Improved secret chats</a></li><li><a href="?layer=12">12 – New dynamic support</a></li><li><a href="?layer=13">13 – Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 – Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 – Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 – Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 – Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 – Added usernames</a></li><li><a href="?layer=23">23 – Stickers for secret chats</a></li><li><a href="?layer=105">105 – Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 – Login with QR code</a></li><li><a href="?layer=109">109 – Polls v2</a></li><li><a href="?layer=110">110 – People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 – Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 – Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 – PSA</a></li><li><a href="?layer=114">114 – Video thumbs for GIFs</a></li><li><a href="?layer=115">115 – Peek Channel Invite</a></li><li><a href="?layer=116">116 – Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 – WebRTC Phone Calls</a></li><li><a href="?layer=118">118 – Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 – Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 – Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121">121 – SVG-based Outlines for Stickers</a></li><li><a href="?layer=122">122 – Voice Chats</a></li><li><a href="?layer=123">123 – Voice Chat improvements</a></li><li><a href="?layer=124">124 – Expiring Invite links</a></li><li><a href="?layer=125">125 – Voice Chats in Broadcasts</a></li><li><a href="?layer=126">126 – Ban channels in channels</a></li><li><a href="?layer=127">127 – Payments in channels</a></li><li><a href="?layer=128">128 – Microthumbs for User/Chat profile photos</a></li><li><a href="?layer=129">129 – Video Chats</a></li><li><a href="?layer=130">130 – Custom placeholder for bot reply keyboards</a></li><li><a href="?layer=131">131 – Reset 2FA Password after a week</a></li><li><a href="?layer=132">132 – Chat themes</a></li><li><a href="?layer=133"><strong>133 – 64-bit IDs for User/Chat</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/secureValueTypePersonalDetails" >secureValueTypePersonalDetails</a>#9d2a81e3 = <a href="/type/SecureValueType" class="current_page_link" >SecureValueType</a>;
|
||||
<a href="/constructor/secureValueTypePassport" >secureValueTypePassport</a>#3dac6a00 = <a href="/type/SecureValueType" class="current_page_link" >SecureValueType</a>;
|
||||
<a href="/constructor/secureValueTypeDriverLicense" >secureValueTypeDriverLicense</a>#6e425c4 = <a href="/type/SecureValueType" class="current_page_link" >SecureValueType</a>;
|
||||
<a href="/constructor/secureValueTypeIdentityCard" >secureValueTypeIdentityCard</a>#a0d0744b = <a href="/type/SecureValueType" class="current_page_link" >SecureValueType</a>;
|
||||
<a href="/constructor/secureValueTypeInternalPassport" >secureValueTypeInternalPassport</a>#99a48f23 = <a href="/type/SecureValueType" class="current_page_link" >SecureValueType</a>;
|
||||
<a href="/constructor/secureValueTypeAddress" >secureValueTypeAddress</a>#cbe31e26 = <a href="/type/SecureValueType" class="current_page_link" >SecureValueType</a>;
|
||||
<a href="/constructor/secureValueTypeUtilityBill" >secureValueTypeUtilityBill</a>#fc36954e = <a href="/type/SecureValueType" class="current_page_link" >SecureValueType</a>;
|
||||
<a href="/constructor/secureValueTypeBankStatement" >secureValueTypeBankStatement</a>#89137c0d = <a href="/type/SecureValueType" class="current_page_link" >SecureValueType</a>;
|
||||
<a href="/constructor/secureValueTypeRentalAgreement" >secureValueTypeRentalAgreement</a>#8b883488 = <a href="/type/SecureValueType" class="current_page_link" >SecureValueType</a>;
|
||||
<a href="/constructor/secureValueTypePassportRegistration" >secureValueTypePassportRegistration</a>#99e3806a = <a href="/type/SecureValueType" class="current_page_link" >SecureValueType</a>;
|
||||
<a href="/constructor/secureValueTypeTemporaryRegistration" >secureValueTypeTemporaryRegistration</a>#ea02ec33 = <a href="/type/SecureValueType" class="current_page_link" >SecureValueType</a>;
|
||||
<a href="/constructor/secureValueTypePhone" >secureValueTypePhone</a>#b320aadb = <a href="/type/SecureValueType" class="current_page_link" >SecureValueType</a>;
|
||||
<a href="/constructor/secureValueTypeEmail" >secureValueTypeEmail</a>#8e3ca7ee = <a href="/type/SecureValueType" class="current_page_link" >SecureValueType</a>;</code></pre></p>
|
||||
<h3><a class="anchor" href="#constructors" id="constructors" name="constructors"><i class="anchor-icon"></i></a>Constructors</h3>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Constructor</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><a href="/constructor/secureValueTypePersonalDetails">secureValueTypePersonalDetails</a></td>
|
||||
<td>Personal details</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/secureValueTypePassport">secureValueTypePassport</a></td>
|
||||
<td>Passport</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/secureValueTypeDriverLicense">secureValueTypeDriverLicense</a></td>
|
||||
<td>Driver's license</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/secureValueTypeIdentityCard">secureValueTypeIdentityCard</a></td>
|
||||
<td>Identity card</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/secureValueTypeInternalPassport">secureValueTypeInternalPassport</a></td>
|
||||
<td>Internal <a href="/passport">passport</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/secureValueTypeAddress">secureValueTypeAddress</a></td>
|
||||
<td>Address</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/secureValueTypeUtilityBill">secureValueTypeUtilityBill</a></td>
|
||||
<td>Utility bill</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/secureValueTypeBankStatement">secureValueTypeBankStatement</a></td>
|
||||
<td>Bank statement</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/secureValueTypeRentalAgreement">secureValueTypeRentalAgreement</a></td>
|
||||
<td>Rental agreement</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/secureValueTypePassportRegistration">secureValueTypePassportRegistration</a></td>
|
||||
<td>Internal registration <a href="/passport">passport</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/secureValueTypeTemporaryRegistration">secureValueTypeTemporaryRegistration</a></td>
|
||||
<td>Temporary registration</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/secureValueTypePhone">secureValueTypePhone</a></td>
|
||||
<td>Phone</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/secureValueTypeEmail">secureValueTypeEmail</a></td>
|
||||
<td>Email</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?43"></script>
|
||||
|
||||
<script>backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -2,12 +2,12 @@
|
|||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>inlineQueryPeerTypeBroadcast</title>
|
||||
<title>StatsGroupTopAdmin</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="The inline query was sent in a channel">
|
||||
<meta property="og:title" content="inlineQueryPeerTypeBroadcast">
|
||||
<meta property="description" content="Most active admin in a supergroup">
|
||||
<meta property="og:title" content="StatsGroupTopAdmin">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="The inline query was sent in a channel">
|
||||
<meta property="og:description" content="Most active admin in a 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/inlineQueryPeerTypeBroadcast" >inlineQueryPeerTypeBroadcast</a></li></ul></div>
|
||||
<h1 id="dev_page_title">inlineQueryPeerTypeBroadcast</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="/type/StatsGroupTopAdmin" >StatsGroupTopAdmin</a></li></ul></div>
|
||||
<h1 id="dev_page_title">StatsGroupTopAdmin</h1>
|
||||
|
||||
<div id="dev_page_content"><p>The inline query was sent in a <a href="/api/channel">channel</a></p>
|
||||
<div id="dev_page_content"><p>Most active admin in a <a href="/api/channel">supergroup</a></p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
@ -52,11 +52,22 @@
|
|||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<pre class="page_scheme"><code><a href="/constructor/inlineQueryPeerTypeBroadcast" class="current_page_link" >inlineQueryPeerTypeBroadcast</a>#6334ee9a = <a href="/type/InlineQueryPeerType" >InlineQueryPeerType</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/InlineQueryPeerType">InlineQueryPeerType</a></p>
|
||||
<pre class="page_scheme"><code><a href="/constructor/statsGroupTopAdmin" >statsGroupTopAdmin</a>#d7584c87 user_id:<a href="/type/long" >long</a> deleted:<a href="/type/int" >int</a> kicked:<a href="/type/int" >int</a> banned:<a href="/type/int" >int</a> = <a href="/type/StatsGroupTopAdmin" class="current_page_link" >StatsGroupTopAdmin</a>;</code></pre></p>
|
||||
<h3><a class="anchor" href="#constructors" id="constructors" name="constructors"><i class="anchor-icon"></i></a>Constructors</h3>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Constructor</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><a href="/constructor/statsGroupTopAdmin">statsGroupTopAdmin</a></td>
|
||||
<td>Information about an active admin in a supergroup</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
|
||||
<h4><a class="anchor" href="#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>
|
|
@ -1,508 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Updates</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Object which is perceived by the client without a call on its part when an event occurs.">
|
||||
<meta property="og:title" content="Updates">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Object which is perceived by the client without a call on its part when an event occurs.">
|
||||
<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?215" 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="/type/Updates" >Updates</a></li></ul></div>
|
||||
<h1 id="dev_page_title">Updates</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Object which is perceived by the client without a call on its part when an event occurs.</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 133 <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="?layer=1">1 – Base layer</a></li><li><a href="?layer=2">2 – New userpic notifications</a></li><li><a href="?layer=3">3 – Send message can trigger link change</a></li><li><a href="?layer=4">4 – Check-in chats</a></li><li><a href="?layer=5">5 – Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 – Foursquare integration</a></li><li><a href="?layer=7">7 – Added wallPaperSolid</a></li><li><a href="?layer=8">8 – Added end-to-end encryption</a></li><li><a href="?layer=9">9 – Improved big files upload perfomance</a></li><li><a href="?layer=10">10 – Improved chat participants updates</a></li><li><a href="?layer=11">11 – Improved secret chats</a></li><li><a href="?layer=12">12 – New dynamic support</a></li><li><a href="?layer=13">13 – Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 – Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 – Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 – Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 – Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 – Added usernames</a></li><li><a href="?layer=23">23 – Stickers for secret chats</a></li><li><a href="?layer=105">105 – Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 – Login with QR code</a></li><li><a href="?layer=109">109 – Polls v2</a></li><li><a href="?layer=110">110 – People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 – Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 – Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 – PSA</a></li><li><a href="?layer=114">114 – Video thumbs for GIFs</a></li><li><a href="?layer=115">115 – Peek Channel Invite</a></li><li><a href="?layer=116">116 – Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 – WebRTC Phone Calls</a></li><li><a href="?layer=118">118 – Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 – Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 – Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121">121 – SVG-based Outlines for Stickers</a></li><li><a href="?layer=122">122 – Voice Chats</a></li><li><a href="?layer=123">123 – Voice Chat improvements</a></li><li><a href="?layer=124">124 – Expiring Invite links</a></li><li><a href="?layer=125">125 – Voice Chats in Broadcasts</a></li><li><a href="?layer=126">126 – Ban channels in channels</a></li><li><a href="?layer=127">127 – Payments in channels</a></li><li><a href="?layer=128">128 – Microthumbs for User/Chat profile photos</a></li><li><a href="?layer=129">129 – Video Chats</a></li><li><a href="?layer=130">130 – Custom placeholder for bot reply keyboards</a></li><li><a href="?layer=131">131 – Reset 2FA Password after a week</a></li><li><a href="?layer=132">132 – Chat themes</a></li><li><a href="?layer=133"><strong>133 – 64-bit IDs for User/Chat</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/updatesTooLong" >updatesTooLong</a>#e317af7e = <a href="/type/Updates" class="current_page_link" >Updates</a>;
|
||||
<a href="/constructor/updateShortMessage" >updateShortMessage</a>#313bc7f8 flags:<a href="/type/%23" >#</a> out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true id:<a href="/type/int" >int</a> user_id:<a href="/type/long" >long</a> message:<a href="/type/string" >string</a> pts:<a href="/type/int" >int</a> pts_count:<a href="/type/int" >int</a> date:<a href="/type/int" >int</a> fwd_from:flags.2?<a href="/type/MessageFwdHeader" >MessageFwdHeader</a> via_bot_id:flags.11?<a href="/type/long" >long</a> reply_to:flags.3?<a href="/type/MessageReplyHeader" >MessageReplyHeader</a> entities:flags.7?<a href="/type/Vector%20t" >Vector</a><<a href="/type/MessageEntity" >MessageEntity</a>> ttl_period:flags.25?<a href="/type/int" >int</a> = <a href="/type/Updates" class="current_page_link" >Updates</a>;
|
||||
<a href="/constructor/updateShortChatMessage" >updateShortChatMessage</a>#4d6deea5 flags:<a href="/type/%23" >#</a> out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true id:<a href="/type/int" >int</a> from_id:<a href="/type/long" >long</a> chat_id:<a href="/type/long" >long</a> message:<a href="/type/string" >string</a> pts:<a href="/type/int" >int</a> pts_count:<a href="/type/int" >int</a> date:<a href="/type/int" >int</a> fwd_from:flags.2?<a href="/type/MessageFwdHeader" >MessageFwdHeader</a> via_bot_id:flags.11?<a href="/type/long" >long</a> reply_to:flags.3?<a href="/type/MessageReplyHeader" >MessageReplyHeader</a> entities:flags.7?<a href="/type/Vector%20t" >Vector</a><<a href="/type/MessageEntity" >MessageEntity</a>> ttl_period:flags.25?<a href="/type/int" >int</a> = <a href="/type/Updates" class="current_page_link" >Updates</a>;
|
||||
<a href="/constructor/updateShort" >updateShort</a>#78d4dec1 update:<a href="/type/Update" >Update</a> date:<a href="/type/int" >int</a> = <a href="/type/Updates" class="current_page_link" >Updates</a>;
|
||||
<a href="/constructor/updatesCombined" >updatesCombined</a>#725b04c3 updates:<a href="/type/Vector%20t" >Vector</a><<a href="/type/Update" >Update</a>> users:<a href="/type/Vector%20t" >Vector</a><<a href="/type/User" >User</a>> chats:<a href="/type/Vector%20t" >Vector</a><<a href="/type/Chat" >Chat</a>> date:<a href="/type/int" >int</a> seq_start:<a href="/type/int" >int</a> seq:<a href="/type/int" >int</a> = <a href="/type/Updates" class="current_page_link" >Updates</a>;
|
||||
<a href="/constructor/updates" >updates</a>#74ae4240 updates:<a href="/type/Vector%20t" >Vector</a><<a href="/type/Update" >Update</a>> users:<a href="/type/Vector%20t" >Vector</a><<a href="/type/User" >User</a>> chats:<a href="/type/Vector%20t" >Vector</a><<a href="/type/Chat" >Chat</a>> date:<a href="/type/int" >int</a> seq:<a href="/type/int" >int</a> = <a href="/type/Updates" class="current_page_link" >Updates</a>;
|
||||
<a href="/constructor/updateShortSentMessage" >updateShortSentMessage</a>#9015e101 flags:<a href="/type/%23" >#</a> out:flags.1?true id:<a href="/type/int" >int</a> pts:<a href="/type/int" >int</a> pts_count:<a href="/type/int" >int</a> date:<a href="/type/int" >int</a> media:flags.9?<a href="/type/MessageMedia" >MessageMedia</a> entities:flags.7?<a href="/type/Vector%20t" >Vector</a><<a href="/type/MessageEntity" >MessageEntity</a>> ttl_period:flags.25?<a href="/type/int" >int</a> = <a href="/type/Updates" class="current_page_link" >Updates</a>;
|
||||
|
||||
---functions---
|
||||
|
||||
<a href="/method/contacts.deleteContacts" >contacts.deleteContacts</a>#96a0e00 id:<a href="/type/Vector%20t" >Vector</a><<a href="/type/InputUser" >InputUser</a>> = <a href="/type/Updates" class="current_page_link" >Updates</a>;
|
||||
<a href="/method/contacts.addContact" >contacts.addContact</a>#e8f463d0 flags:<a href="/type/%23" >#</a> add_phone_privacy_exception:flags.0?true id:<a href="/type/InputUser" >InputUser</a> first_name:<a href="/type/string" >string</a> last_name:<a href="/type/string" >string</a> phone:<a href="/type/string" >string</a> = <a href="/type/Updates" class="current_page_link" >Updates</a>;
|
||||
<a href="/method/contacts.acceptContact" >contacts.acceptContact</a>#f831a20f id:<a href="/type/InputUser" >InputUser</a> = <a href="/type/Updates" class="current_page_link" >Updates</a>;
|
||||
<a href="/method/contacts.getLocated" >contacts.getLocated</a>#d348bc44 flags:<a href="/type/%23" >#</a> background:flags.1?true geo_point:<a href="/type/InputGeoPoint" >InputGeoPoint</a> self_expires:flags.0?<a href="/type/int" >int</a> = <a href="/type/Updates" class="current_page_link" >Updates</a>;
|
||||
<a href="/method/contacts.blockFromReplies" >contacts.blockFromReplies</a>#29a8962c flags:<a href="/type/%23" >#</a> delete_message:flags.0?true delete_history:flags.1?true report_spam:flags.2?true msg_id:<a href="/type/int" >int</a> = <a href="/type/Updates" class="current_page_link" >Updates</a>;
|
||||
|
||||
<a href="/method/messages.sendMessage" >messages.sendMessage</a>#520c3870 flags:<a href="/type/%23" >#</a> no_webpage:flags.1?true silent:flags.5?true background:flags.6?true clear_draft:flags.7?true 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><<a href="/type/MessageEntity" >MessageEntity</a>> schedule_date:flags.10?<a href="/type/int" >int</a> = <a href="/type/Updates" class="current_page_link" >Updates</a>;
|
||||
<a href="/method/messages.sendMedia" >messages.sendMedia</a>#3491eba9 flags:<a href="/type/%23" >#</a> silent:flags.5?true background:flags.6?true clear_draft:flags.7?true 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><<a href="/type/MessageEntity" >MessageEntity</a>> schedule_date:flags.10?<a href="/type/int" >int</a> = <a href="/type/Updates" class="current_page_link" >Updates</a>;
|
||||
<a href="/method/messages.forwardMessages" >messages.forwardMessages</a>#d9fee60e flags:<a href="/type/%23" >#</a> silent:flags.5?true background:flags.6?true with_my_score:flags.8?true drop_author:flags.11?true drop_media_captions:flags.12?true from_peer:<a href="/type/InputPeer" >InputPeer</a> id:<a href="/type/Vector%20t" >Vector</a><<a href="/type/int" >int</a>> random_id:<a href="/type/Vector%20t" >Vector</a><<a href="/type/long" >long</a>> to_peer:<a href="/type/InputPeer" >InputPeer</a> schedule_date:flags.10?<a href="/type/int" >int</a> = <a href="/type/Updates" class="current_page_link" >Updates</a>;
|
||||
<a href="/method/messages.editChatTitle" >messages.editChatTitle</a>#73783ffd chat_id:<a href="/type/long" >long</a> title:<a href="/type/string" >string</a> = <a href="/type/Updates" class="current_page_link" >Updates</a>;
|
||||
<a href="/method/messages.editChatPhoto" >messages.editChatPhoto</a>#35ddd674 chat_id:<a href="/type/long" >long</a> photo:<a href="/type/InputChatPhoto" >InputChatPhoto</a> = <a href="/type/Updates" class="current_page_link" >Updates</a>;
|
||||
<a href="/method/messages.addChatUser" >messages.addChatUser</a>#f24753e3 chat_id:<a href="/type/long" >long</a> user_id:<a href="/type/InputUser" >InputUser</a> fwd_limit:<a href="/type/int" >int</a> = <a href="/type/Updates" class="current_page_link" >Updates</a>;
|
||||
<a href="/method/messages.deleteChatUser" >messages.deleteChatUser</a>#a2185cab flags:<a href="/type/%23" >#</a> revoke_history:flags.0?true chat_id:<a href="/type/long" >long</a> user_id:<a href="/type/InputUser" >InputUser</a> = <a href="/type/Updates" class="current_page_link" >Updates</a>;
|
||||
<a href="/method/messages.createChat" >messages.createChat</a>#9cb126e users:<a href="/type/Vector%20t" >Vector</a><<a href="/type/InputUser" >InputUser</a>> title:<a href="/type/string" >string</a> = <a href="/type/Updates" class="current_page_link" >Updates</a>;
|
||||
<a href="/method/messages.importChatInvite" >messages.importChatInvite</a>#6c50051c hash:<a href="/type/string" >string</a> = <a href="/type/Updates" class="current_page_link" >Updates</a>;
|
||||
<a href="/method/messages.startBot" >messages.startBot</a>#e6df7378 bot:<a href="/type/InputUser" >InputUser</a> peer:<a href="/type/InputPeer" >InputPeer</a> random_id:<a href="/type/long" >long</a> start_param:<a href="/type/string" >string</a> = <a href="/type/Updates" class="current_page_link" >Updates</a>;
|
||||
<a href="/method/messages.migrateChat" >messages.migrateChat</a>#a2875319 chat_id:<a href="/type/long" >long</a> = <a href="/type/Updates" class="current_page_link" >Updates</a>;
|
||||
<a href="/method/messages.sendInlineBotResult" >messages.sendInlineBotResult</a>#220815b0 flags:<a href="/type/%23" >#</a> silent:flags.5?true background:flags.6?true clear_draft:flags.7?true hide_via:flags.11?true peer:<a href="/type/InputPeer" >InputPeer</a> reply_to_msg_id:flags.0?<a href="/type/int" >int</a> random_id:<a href="/type/long" >long</a> query_id:<a href="/type/long" >long</a> id:<a href="/type/string" >string</a> schedule_date:flags.10?<a href="/type/int" >int</a> = <a href="/type/Updates" class="current_page_link" >Updates</a>;
|
||||
<a href="/method/messages.editMessage" >messages.editMessage</a>#48f71778 flags:<a href="/type/%23" >#</a> no_webpage:flags.1?true peer:<a href="/type/InputPeer" >InputPeer</a> id:<a href="/type/int" >int</a> message:flags.11?<a href="/type/string" >string</a> media:flags.14?<a href="/type/InputMedia" >InputMedia</a> reply_markup:flags.2?<a href="/type/ReplyMarkup" >ReplyMarkup</a> entities:flags.3?<a href="/type/Vector%20t" >Vector</a><<a href="/type/MessageEntity" >MessageEntity</a>> schedule_date:flags.15?<a href="/type/int" >int</a> = <a href="/type/Updates" class="current_page_link" >Updates</a>;
|
||||
<a href="/method/messages.getAllDrafts" >messages.getAllDrafts</a>#6a3f8d65 = <a href="/type/Updates" class="current_page_link" >Updates</a>;
|
||||
<a href="/method/messages.setGameScore" >messages.setGameScore</a>#8ef8ecc0 flags:<a href="/type/%23" >#</a> edit_message:flags.0?true force:flags.1?true 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" class="current_page_link" >Updates</a>;
|
||||
<a href="/method/messages.sendScreenshotNotification" >messages.sendScreenshotNotification</a>#c97df020 peer:<a href="/type/InputPeer" >InputPeer</a> reply_to_msg_id:<a href="/type/int" >int</a> random_id:<a href="/type/long" >long</a> = <a href="/type/Updates" class="current_page_link" >Updates</a>;
|
||||
<a href="/method/messages.sendMultiMedia" >messages.sendMultiMedia</a>#cc0110cb flags:<a href="/type/%23" >#</a> silent:flags.5?true background:flags.6?true clear_draft:flags.7?true 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><<a href="/type/InputSingleMedia" >InputSingleMedia</a>> schedule_date:flags.10?<a href="/type/int" >int</a> = <a href="/type/Updates" class="current_page_link" >Updates</a>;
|
||||
<a href="/method/messages.updatePinnedMessage" >messages.updatePinnedMessage</a>#d2aaf7ec flags:<a href="/type/%23" >#</a> silent:flags.0?true unpin:flags.1?true pm_oneside:flags.2?true peer:<a href="/type/InputPeer" >InputPeer</a> id:<a href="/type/int" >int</a> = <a href="/type/Updates" class="current_page_link" >Updates</a>;
|
||||
<a href="/method/messages.sendVote" >messages.sendVote</a>#10ea6184 peer:<a href="/type/InputPeer" >InputPeer</a> msg_id:<a href="/type/int" >int</a> options:<a href="/type/Vector%20t" >Vector</a><<a href="/type/bytes" >bytes</a>> = <a href="/type/Updates" class="current_page_link" >Updates</a>;
|
||||
<a href="/method/messages.getPollResults" >messages.getPollResults</a>#73bb643b peer:<a href="/type/InputPeer" >InputPeer</a> msg_id:<a href="/type/int" >int</a> = <a href="/type/Updates" class="current_page_link" >Updates</a>;
|
||||
<a href="/method/messages.editChatDefaultBannedRights" >messages.editChatDefaultBannedRights</a>#a5866b41 peer:<a href="/type/InputPeer" >InputPeer</a> banned_rights:<a href="/type/ChatBannedRights" >ChatBannedRights</a> = <a href="/type/Updates" class="current_page_link" >Updates</a>;
|
||||
<a href="/method/messages.sendScheduledMessages" >messages.sendScheduledMessages</a>#bd38850a peer:<a href="/type/InputPeer" >InputPeer</a> id:<a href="/type/Vector%20t" >Vector</a><<a href="/type/int" >int</a>> = <a href="/type/Updates" class="current_page_link" >Updates</a>;
|
||||
<a href="/method/messages.deleteScheduledMessages" >messages.deleteScheduledMessages</a>#59ae2b16 peer:<a href="/type/InputPeer" >InputPeer</a> id:<a href="/type/Vector%20t" >Vector</a><<a href="/type/int" >int</a>> = <a href="/type/Updates" class="current_page_link" >Updates</a>;
|
||||
<a href="/method/messages.setHistoryTTL" >messages.setHistoryTTL</a>#b80e5fe4 peer:<a href="/type/InputPeer" >InputPeer</a> period:<a href="/type/int" >int</a> = <a href="/type/Updates" class="current_page_link" >Updates</a>;
|
||||
<a href="/method/messages.setChatTheme" >messages.setChatTheme</a>#e63be13f peer:<a href="/type/InputPeer" >InputPeer</a> emoticon:<a href="/type/string" >string</a> = <a href="/type/Updates" class="current_page_link" >Updates</a>;
|
||||
|
||||
<a href="/method/help.getAppChangelog" >help.getAppChangelog</a>#9010ef6f prev_app_version:<a href="/type/string" >string</a> = <a href="/type/Updates" class="current_page_link" >Updates</a>;
|
||||
|
||||
<a href="/method/channels.createChannel" >channels.createChannel</a>#3d5fb10f flags:<a href="/type/%23" >#</a> broadcast:flags.0?true megagroup:flags.1?true for_import:flags.3?true title:<a href="/type/string" >string</a> about:<a href="/type/string" >string</a> geo_point:flags.2?<a href="/type/InputGeoPoint" >InputGeoPoint</a> address:flags.2?<a href="/type/string" >string</a> = <a href="/type/Updates" class="current_page_link" >Updates</a>;
|
||||
<a href="/method/channels.editAdmin" >channels.editAdmin</a>#d33c8902 channel:<a href="/type/InputChannel" >InputChannel</a> user_id:<a href="/type/InputUser" >InputUser</a> admin_rights:<a href="/type/ChatAdminRights" >ChatAdminRights</a> rank:<a href="/type/string" >string</a> = <a href="/type/Updates" class="current_page_link" >Updates</a>;
|
||||
<a href="/method/channels.editTitle" >channels.editTitle</a>#566decd0 channel:<a href="/type/InputChannel" >InputChannel</a> title:<a href="/type/string" >string</a> = <a href="/type/Updates" class="current_page_link" >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" class="current_page_link" >Updates</a>;
|
||||
<a href="/method/channels.joinChannel" >channels.joinChannel</a>#24b524c5 channel:<a href="/type/InputChannel" >InputChannel</a> = <a href="/type/Updates" class="current_page_link" >Updates</a>;
|
||||
<a href="/method/channels.leaveChannel" >channels.leaveChannel</a>#f836aa95 channel:<a href="/type/InputChannel" >InputChannel</a> = <a href="/type/Updates" class="current_page_link" >Updates</a>;
|
||||
<a href="/method/channels.inviteToChannel" >channels.inviteToChannel</a>#199f3a6c channel:<a href="/type/InputChannel" >InputChannel</a> users:<a href="/type/Vector%20t" >Vector</a><<a href="/type/InputUser" >InputUser</a>> = <a href="/type/Updates" class="current_page_link" >Updates</a>;
|
||||
<a href="/method/channels.deleteChannel" >channels.deleteChannel</a>#c0111fe3 channel:<a href="/type/InputChannel" >InputChannel</a> = <a href="/type/Updates" class="current_page_link" >Updates</a>;
|
||||
<a href="/method/channels.toggleSignatures" >channels.toggleSignatures</a>#1f69b606 channel:<a href="/type/InputChannel" >InputChannel</a> enabled:<a href="/type/Bool" >Bool</a> = <a href="/type/Updates" class="current_page_link" >Updates</a>;
|
||||
<a href="/method/channels.editBanned" >channels.editBanned</a>#96e6cd81 channel:<a href="/type/InputChannel" >InputChannel</a> participant:<a href="/type/InputPeer" >InputPeer</a> banned_rights:<a href="/type/ChatBannedRights" >ChatBannedRights</a> = <a href="/type/Updates" class="current_page_link" >Updates</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" class="current_page_link" >Updates</a>;
|
||||
<a href="/method/channels.editCreator" >channels.editCreator</a>#8f38cd1f channel:<a href="/type/InputChannel" >InputChannel</a> user_id:<a href="/type/InputUser" >InputUser</a> password:<a href="/type/InputCheckPasswordSRP" >InputCheckPasswordSRP</a> = <a href="/type/Updates" class="current_page_link" >Updates</a>;
|
||||
<a href="/method/channels.toggleSlowMode" >channels.toggleSlowMode</a>#edd49ef0 channel:<a href="/type/InputChannel" >InputChannel</a> seconds:<a href="/type/int" >int</a> = <a href="/type/Updates" class="current_page_link" >Updates</a>;
|
||||
<a href="/method/channels.convertToGigagroup" >channels.convertToGigagroup</a>#b290c69 channel:<a href="/type/InputChannel" >InputChannel</a> = <a href="/type/Updates" class="current_page_link" >Updates</a>;
|
||||
|
||||
<a href="/method/phone.discardCall" >phone.discardCall</a>#b2cbc1c0 flags:<a href="/type/%23" >#</a> video:flags.0?true peer:<a href="/type/InputPhoneCall" >InputPhoneCall</a> duration:<a href="/type/int" >int</a> reason:<a href="/type/PhoneCallDiscardReason" >PhoneCallDiscardReason</a> connection_id:<a href="/type/long" >long</a> = <a href="/type/Updates" class="current_page_link" >Updates</a>;
|
||||
<a href="/method/phone.setCallRating" >phone.setCallRating</a>#59ead627 flags:<a href="/type/%23" >#</a> user_initiative:flags.0?true peer:<a href="/type/InputPhoneCall" >InputPhoneCall</a> rating:<a href="/type/int" >int</a> comment:<a href="/type/string" >string</a> = <a href="/type/Updates" class="current_page_link" >Updates</a>;
|
||||
<a href="/method/phone.createGroupCall" >phone.createGroupCall</a>#48cdc6d8 flags:<a href="/type/%23" >#</a> peer:<a href="/type/InputPeer" >InputPeer</a> random_id:<a href="/type/int" >int</a> title:flags.0?<a href="/type/string" >string</a> schedule_date:flags.1?<a href="/type/int" >int</a> = <a href="/type/Updates" class="current_page_link" >Updates</a>;
|
||||
<a href="/method/phone.joinGroupCall" >phone.joinGroupCall</a>#b132ff7b flags:<a href="/type/%23" >#</a> muted:flags.0?true video_stopped:flags.2?true call:<a href="/type/InputGroupCall" >InputGroupCall</a> join_as:<a href="/type/InputPeer" >InputPeer</a> invite_hash:flags.1?<a href="/type/string" >string</a> params:<a href="/type/DataJSON" >DataJSON</a> = <a href="/type/Updates" class="current_page_link" >Updates</a>;
|
||||
<a href="/method/phone.leaveGroupCall" >phone.leaveGroupCall</a>#500377f9 call:<a href="/type/InputGroupCall" >InputGroupCall</a> source:<a href="/type/int" >int</a> = <a href="/type/Updates" class="current_page_link" >Updates</a>;
|
||||
<a href="/method/phone.inviteToGroupCall" >phone.inviteToGroupCall</a>#7b393160 call:<a href="/type/InputGroupCall" >InputGroupCall</a> users:<a href="/type/Vector%20t" >Vector</a><<a href="/type/InputUser" >InputUser</a>> = <a href="/type/Updates" class="current_page_link" >Updates</a>;
|
||||
<a href="/method/phone.discardGroupCall" >phone.discardGroupCall</a>#7a777135 call:<a href="/type/InputGroupCall" >InputGroupCall</a> = <a href="/type/Updates" class="current_page_link" >Updates</a>;
|
||||
<a href="/method/phone.toggleGroupCallSettings" >phone.toggleGroupCallSettings</a>#74bbb43d flags:<a href="/type/%23" >#</a> reset_invite_hash:flags.1?true call:<a href="/type/InputGroupCall" >InputGroupCall</a> join_muted:flags.0?<a href="/type/Bool" >Bool</a> = <a href="/type/Updates" class="current_page_link" >Updates</a>;
|
||||
<a href="/method/phone.toggleGroupCallRecord" >phone.toggleGroupCallRecord</a>#f128c708 flags:<a href="/type/%23" >#</a> start:flags.0?true video:flags.2?true call:<a href="/type/InputGroupCall" >InputGroupCall</a> title:flags.1?<a href="/type/string" >string</a> video_portrait:flags.2?<a href="/type/Bool" >Bool</a> = <a href="/type/Updates" class="current_page_link" >Updates</a>;
|
||||
<a href="/method/phone.editGroupCallParticipant" >phone.editGroupCallParticipant</a>#a5273abf flags:<a href="/type/%23" >#</a> call:<a href="/type/InputGroupCall" >InputGroupCall</a> participant:<a href="/type/InputPeer" >InputPeer</a> muted:flags.0?<a href="/type/Bool" >Bool</a> volume:flags.1?<a href="/type/int" >int</a> raise_hand:flags.2?<a href="/type/Bool" >Bool</a> video_stopped:flags.3?<a href="/type/Bool" >Bool</a> video_paused:flags.4?<a href="/type/Bool" >Bool</a> presentation_paused:flags.5?<a href="/type/Bool" >Bool</a> = <a href="/type/Updates" class="current_page_link" >Updates</a>;
|
||||
<a href="/method/phone.editGroupCallTitle" >phone.editGroupCallTitle</a>#1ca6ac0a call:<a href="/type/InputGroupCall" >InputGroupCall</a> title:<a href="/type/string" >string</a> = <a href="/type/Updates" class="current_page_link" >Updates</a>;
|
||||
<a href="/method/phone.toggleGroupCallStartSubscription" >phone.toggleGroupCallStartSubscription</a>#219c34e6 call:<a href="/type/InputGroupCall" >InputGroupCall</a> subscribed:<a href="/type/Bool" >Bool</a> = <a href="/type/Updates" class="current_page_link" >Updates</a>;
|
||||
<a href="/method/phone.startScheduledGroupCall" >phone.startScheduledGroupCall</a>#5680e342 call:<a href="/type/InputGroupCall" >InputGroupCall</a> = <a href="/type/Updates" class="current_page_link" >Updates</a>;
|
||||
<a href="/method/phone.joinGroupCallPresentation" >phone.joinGroupCallPresentation</a>#cbea6bc4 call:<a href="/type/InputGroupCall" >InputGroupCall</a> params:<a href="/type/DataJSON" >DataJSON</a> = <a href="/type/Updates" class="current_page_link" >Updates</a>;
|
||||
<a href="/method/phone.leaveGroupCallPresentation" >phone.leaveGroupCallPresentation</a>#1c50d144 call:<a href="/type/InputGroupCall" >InputGroupCall</a> = <a href="/type/Updates" class="current_page_link" >Updates</a>;
|
||||
|
||||
<a href="/method/account.getNotifyExceptions" >account.getNotifyExceptions</a>#53577479 flags:<a href="/type/%23" >#</a> compare_sound:flags.1?true peer:flags.0?<a href="/type/InputNotifyPeer" >InputNotifyPeer</a> = <a href="/type/Updates" class="current_page_link" >Updates</a>;
|
||||
|
||||
<a href="/method/folders.editPeerFolders" >folders.editPeerFolders</a>#6847d0ab folder_peers:<a href="/type/Vector%20t" >Vector</a><<a href="/type/InputFolderPeer" >InputFolderPeer</a>> = <a href="/type/Updates" class="current_page_link" >Updates</a>;
|
||||
<a href="/method/folders.deleteFolder" >folders.deleteFolder</a>#1c295881 folder_id:<a href="/type/int" >int</a> = <a href="/type/Updates" class="current_page_link" >Updates</a>;</code></pre></p>
|
||||
<h3><a class="anchor" href="#constructors" id="constructors" name="constructors"><i class="anchor-icon"></i></a>Constructors</h3>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Constructor</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><a href="/constructor/updatesTooLong">updatesTooLong</a></td>
|
||||
<td>Too many updates, it is necessary to execute <a href="/method/updates.getDifference">updates.getDifference</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/updateShortMessage">updateShortMessage</a></td>
|
||||
<td>Info about a message sent to (received from) another user</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/updateShortChatMessage">updateShortChatMessage</a></td>
|
||||
<td>Shortened constructor containing info on one new incoming text message from a chat</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/updateShort">updateShort</a></td>
|
||||
<td>Shortened constructor containing info on one update not requiring auxiliary data</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/updatesCombined">updatesCombined</a></td>
|
||||
<td>Constructor for a group of updates.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/updates">updates</a></td>
|
||||
<td>Full constructor of updates</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/updateShortSentMessage">updateShortSentMessage</a></td>
|
||||
<td>Shortened constructor containing info on one outgoing message to a contact (the destination chat has to be extracted from the method call that returned this object).</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3><a class="anchor" href="#methods" id="methods" name="methods"><i class="anchor-icon"></i></a>Methods</h3>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Method</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><a href="/method/contacts.deleteContacts">contacts.deleteContacts</a></td>
|
||||
<td>Deletes several contacts from the list.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/messages.sendMessage">messages.sendMessage</a></td>
|
||||
<td>Sends a message to a chat</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/messages.sendMedia">messages.sendMedia</a></td>
|
||||
<td>Send a media</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/messages.forwardMessages">messages.forwardMessages</a></td>
|
||||
<td>Forwards messages by their IDs.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/messages.editChatTitle">messages.editChatTitle</a></td>
|
||||
<td>Chanages chat name and sends a service message on it.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/messages.editChatPhoto">messages.editChatPhoto</a></td>
|
||||
<td>Changes chat photo and sends a service message on it</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/messages.addChatUser">messages.addChatUser</a></td>
|
||||
<td>Adds a user to a chat and sends a service message on it.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/messages.deleteChatUser">messages.deleteChatUser</a></td>
|
||||
<td>Deletes a user from a chat and sends a service message on it.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/messages.createChat">messages.createChat</a></td>
|
||||
<td>Creates a new chat.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/messages.importChatInvite">messages.importChatInvite</a></td>
|
||||
<td>Import a chat invite and join a private chat/supergroup/channel</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/messages.startBot">messages.startBot</a></td>
|
||||
<td>Start a conversation with a bot using a <a href="/bots#deep-linking">deep linking parameter</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/help.getAppChangelog">help.getAppChangelog</a></td>
|
||||
<td>Get changelog of current app</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/channels.createChannel">channels.createChannel</a></td>
|
||||
<td>Create a <a href="/api/channel">supergroup/channel</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/channels.editAdmin">channels.editAdmin</a></td>
|
||||
<td>Modify the admin rights of a user in a <a href="/api/channel">supergroup/channel</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/channels.editTitle">channels.editTitle</a></td>
|
||||
<td>Edit the name of a <a href="/api/channel">channel/supergroup</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/channels.editPhoto">channels.editPhoto</a></td>
|
||||
<td>Change the photo of a <a href="/api/channel">channel/supergroup</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/channels.joinChannel">channels.joinChannel</a></td>
|
||||
<td>Join a channel/supergroup</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/channels.leaveChannel">channels.leaveChannel</a></td>
|
||||
<td>Leave a <a href="/api/channel">channel/supergroup</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/channels.inviteToChannel">channels.inviteToChannel</a></td>
|
||||
<td>Invite users to a channel/supergroup</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/channels.deleteChannel">channels.deleteChannel</a></td>
|
||||
<td>Delete a <a href="/api/channel">channel/supergroup</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/messages.migrateChat">messages.migrateChat</a></td>
|
||||
<td>Turn a <a href="/api/channel">legacy group into a supergroup</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/messages.sendInlineBotResult">messages.sendInlineBotResult</a></td>
|
||||
<td>Send a result obtained using <a href="/method/messages.getInlineBotResults">messages.getInlineBotResults</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/channels.toggleSignatures">channels.toggleSignatures</a></td>
|
||||
<td>Enable/disable message signatures in channels</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/messages.editMessage">messages.editMessage</a></td>
|
||||
<td>Edit message</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/messages.getAllDrafts">messages.getAllDrafts</a></td>
|
||||
<td>Save get all message <a href="/api/drafts">drafts</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/messages.setGameScore">messages.setGameScore</a></td>
|
||||
<td>Use this method to set the score of the specified user in a game sent as a normal message (bots only).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/phone.discardCall">phone.discardCall</a></td>
|
||||
<td>Refuse or end running call</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/phone.setCallRating">phone.setCallRating</a></td>
|
||||
<td>Rate a call</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/channels.editBanned">channels.editBanned</a></td>
|
||||
<td>Ban/unban/kick a user in a <a href="/api/channel">supergroup/channel</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/messages.sendScreenshotNotification">messages.sendScreenshotNotification</a></td>
|
||||
<td>Notify the other user in a private chat that a screenshot of the chat was taken</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/channels.togglePreHistoryHidden">channels.togglePreHistoryHidden</a></td>
|
||||
<td>Hide/unhide message history for new channel/supergroup users</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/messages.sendMultiMedia">messages.sendMultiMedia</a></td>
|
||||
<td>Send an album of media</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/messages.updatePinnedMessage">messages.updatePinnedMessage</a></td>
|
||||
<td>Pin a message</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/account.getNotifyExceptions">account.getNotifyExceptions</a></td>
|
||||
<td>Returns list of chats with non-default notification settings</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/messages.sendVote">messages.sendVote</a></td>
|
||||
<td>Vote in a <a href="/constructor/poll">poll</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/messages.getPollResults">messages.getPollResults</a></td>
|
||||
<td>Get poll results</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/messages.editChatDefaultBannedRights">messages.editChatDefaultBannedRights</a></td>
|
||||
<td>Edit the default banned rights of a <a href="/api/channel">channel/supergroup/group</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/folders.editPeerFolders">folders.editPeerFolders</a></td>
|
||||
<td>Edit peers in folder</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/folders.deleteFolder">folders.deleteFolder</a></td>
|
||||
<td>Delete a folder</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/contacts.addContact">contacts.addContact</a></td>
|
||||
<td>Add an existing telegram user as contact</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/contacts.acceptContact">contacts.acceptContact</a></td>
|
||||
<td>If the <a href="/constructor/peerSettings">peer settings</a> of a new user allow us to add him as contact, add that user as contact</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/channels.editCreator">channels.editCreator</a></td>
|
||||
<td>Transfer channel ownership</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/contacts.getLocated">contacts.getLocated</a></td>
|
||||
<td>Get contacts near you</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/channels.toggleSlowMode">channels.toggleSlowMode</a></td>
|
||||
<td>Toggle supergroup slow mode: if enabled, users will only be able to send one message every <code>seconds</code> seconds</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/messages.sendScheduledMessages">messages.sendScheduledMessages</a></td>
|
||||
<td>Send scheduled messages</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/messages.deleteScheduledMessages">messages.deleteScheduledMessages</a></td>
|
||||
<td>Delete scheduled messages</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/contacts.blockFromReplies">contacts.blockFromReplies</a></td>
|
||||
<td>Stop getting notifications about <a href="/api/threads">thread replies</a> of a certain user in <code>@replies</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/phone.createGroupCall">phone.createGroupCall</a></td>
|
||||
<td>Create a group call or livestream</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/phone.joinGroupCall">phone.joinGroupCall</a></td>
|
||||
<td>Join a group call</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/phone.leaveGroupCall">phone.leaveGroupCall</a></td>
|
||||
<td>Leave a group call</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/phone.inviteToGroupCall">phone.inviteToGroupCall</a></td>
|
||||
<td>Invite a set of users to a group call.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/phone.discardGroupCall">phone.discardGroupCall</a></td>
|
||||
<td>Terminate a group call</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/phone.toggleGroupCallSettings">phone.toggleGroupCallSettings</a></td>
|
||||
<td>Change group call settings</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/messages.setHistoryTTL">messages.setHistoryTTL</a></td>
|
||||
<td>Set maximum Time-To-Live of all messages in the specified chat</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/channels.convertToGigagroup">channels.convertToGigagroup</a></td>
|
||||
<td>Convert a <a href="/api/channel">supergroup</a> to a <a href="/api/channel">gigagroup</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/phone.toggleGroupCallRecord">phone.toggleGroupCallRecord</a></td>
|
||||
<td>Start or stop recording a group call</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/phone.editGroupCallParticipant">phone.editGroupCallParticipant</a></td>
|
||||
<td>Edit information about a given group call participant</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/phone.editGroupCallTitle">phone.editGroupCallTitle</a></td>
|
||||
<td>Edit the title of a group call or livestream</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/phone.toggleGroupCallStartSubscription">phone.toggleGroupCallStartSubscription</a></td>
|
||||
<td>Subscribe or unsubscribe to a scheduled group call</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/phone.startScheduledGroupCall">phone.startScheduledGroupCall</a></td>
|
||||
<td>Start a scheduled group call.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/phone.joinGroupCallPresentation">phone.joinGroupCallPresentation</a></td>
|
||||
<td>Start screen sharing in a call</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/phone.leaveGroupCallPresentation">phone.leaveGroupCallPresentation</a></td>
|
||||
<td>Stop screen sharing in a group call</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/messages.setChatTheme">messages.setChatTheme</a></td>
|
||||
<td>Change the chat theme of a certain chat</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?43"></script>
|
||||
|
||||
<script>backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -2,12 +2,12 @@
|
|||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>contacts.Found</title>
|
||||
<title>WallPaper</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Object contains info on users found by name substring and auxiliary data.">
|
||||
<meta property="og:title" content="contacts.Found">
|
||||
<meta property="description" content="Object contains info on a wallpaper.">
|
||||
<meta property="og:title" content="WallPaper">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Object contains info on users found by name substring and auxiliary data.">
|
||||
<meta property="og:description" content="Object contains info on a wallpaper.">
|
||||
<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="/type/contacts.Found" >contacts.Found</a></li></ul></div>
|
||||
<h1 id="dev_page_title">contacts.Found</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="/type/WallPaper" >WallPaper</a></li></ul></div>
|
||||
<h1 id="dev_page_title">WallPaper</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Object contains info on users found by name substring and auxiliary data.</p>
|
||||
<div id="dev_page_content"><p>Object contains info on a wallpaper.</p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
@ -52,11 +52,13 @@
|
|||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<pre class="page_scheme"><code><a href="/constructor/contacts.found" >contacts.found</a>#b3134d9d my_results:<a href="/type/Vector%20t" >Vector</a><<a href="/type/Peer" >Peer</a>> results:<a href="/type/Vector%20t" >Vector</a><<a href="/type/Peer" >Peer</a>> chats:<a href="/type/Vector%20t" >Vector</a><<a href="/type/Chat" >Chat</a>> users:<a href="/type/Vector%20t" >Vector</a><<a href="/type/User" >User</a>> = <a href="/type/contacts.Found" class="current_page_link" >contacts.Found</a>;
|
||||
<pre class="page_scheme"><code><a href="/constructor/wallPaper" >wallPaper</a>#a437c3ed id:<a href="/type/long" >long</a> flags:<a href="/type/%23" >#</a> creator:flags.0?true default:flags.1?true pattern:flags.3?true dark:flags.4?true access_hash:<a href="/type/long" >long</a> slug:<a href="/type/string" >string</a> document:<a href="/type/Document" >Document</a> settings:flags.2?<a href="/type/WallPaperSettings" >WallPaperSettings</a> = <a href="/type/WallPaper" class="current_page_link" >WallPaper</a>;
|
||||
<a href="/constructor/wallPaperNoFile" >wallPaperNoFile</a>#e0804116 id:<a href="/type/long" >long</a> 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" class="current_page_link" >WallPaper</a>;
|
||||
|
||||
---functions---
|
||||
|
||||
<a href="/method/contacts.search" >contacts.search</a>#11f812d8 q:<a href="/type/string" >string</a> limit:<a href="/type/int" >int</a> = <a href="/type/contacts.Found" class="current_page_link" >contacts.Found</a>;</code></pre></p>
|
||||
<a href="/method/account.getWallPaper" >account.getWallPaper</a>#fc8ddbea wallpaper:<a href="/type/InputWallPaper" >InputWallPaper</a> = <a href="/type/WallPaper" class="current_page_link" >WallPaper</a>;
|
||||
<a href="/method/account.uploadWallPaper" >account.uploadWallPaper</a>#dd853661 file:<a href="/type/InputFile" >InputFile</a> mime_type:<a href="/type/string" >string</a> settings:<a href="/type/WallPaperSettings" >WallPaperSettings</a> = <a href="/type/WallPaper" class="current_page_link" >WallPaper</a>;</code></pre></p>
|
||||
<h3><a class="anchor" href="#constructors" id="constructors" name="constructors"><i class="anchor-icon"></i></a>Constructors</h3>
|
||||
<table class="table">
|
||||
<thead>
|
||||
|
@ -67,8 +69,12 @@
|
|||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><a href="/constructor/contacts.found">contacts.found</a></td>
|
||||
<td>Users found by name substring and auxiliary data.</td>
|
||||
<td><a href="/constructor/wallPaper">wallPaper</a></td>
|
||||
<td>Wallpaper settings.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/wallPaperNoFile">wallPaperNoFile</a></td>
|
||||
<td>No file wallpaper</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
@ -82,8 +88,12 @@
|
|||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><a href="/method/contacts.search">contacts.search</a></td>
|
||||
<td>Returns users found by username substring.</td>
|
||||
<td><a href="/method/account.getWallPaper">account.getWallPaper</a></td>
|
||||
<td>Get info about a certain wallpaper</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/account.uploadWallPaper">account.uploadWallPaper</a></td>
|
||||
<td>Create and upload a new wallpaper</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
|
@ -1,165 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>auth.PasswordRecovery</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Recovery info of a 2FA password, only for accounts with a recovery email configured.">
|
||||
<meta property="og:title" content="auth.PasswordRecovery">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Recovery info of a 2FA password, only for accounts with a recovery email configured.">
|
||||
<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?215" 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="/type/auth.PasswordRecovery" >auth.PasswordRecovery</a></li></ul></div>
|
||||
<h1 id="dev_page_title">auth.PasswordRecovery</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Recovery info of a <a href="/api/srp">2FA password</a>, only for accounts with a <a href="/api/srp#email-verification">recovery email configured</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 133 <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="?layer=1">1 – Base layer</a></li><li><a href="?layer=2">2 – New userpic notifications</a></li><li><a href="?layer=3">3 – Send message can trigger link change</a></li><li><a href="?layer=4">4 – Check-in chats</a></li><li><a href="?layer=5">5 – Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 – Foursquare integration</a></li><li><a href="?layer=7">7 – Added wallPaperSolid</a></li><li><a href="?layer=8">8 – Added end-to-end encryption</a></li><li><a href="?layer=9">9 – Improved big files upload perfomance</a></li><li><a href="?layer=10">10 – Improved chat participants updates</a></li><li><a href="?layer=11">11 – Improved secret chats</a></li><li><a href="?layer=12">12 – New dynamic support</a></li><li><a href="?layer=13">13 – Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 – Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 – Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 – Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 – Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 – Added usernames</a></li><li><a href="?layer=23">23 – Stickers for secret chats</a></li><li><a href="?layer=105">105 – Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 – Login with QR code</a></li><li><a href="?layer=109">109 – Polls v2</a></li><li><a href="?layer=110">110 – People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 – Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 – Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 – PSA</a></li><li><a href="?layer=114">114 – Video thumbs for GIFs</a></li><li><a href="?layer=115">115 – Peek Channel Invite</a></li><li><a href="?layer=116">116 – Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 – WebRTC Phone Calls</a></li><li><a href="?layer=118">118 – Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 – Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 – Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121">121 – SVG-based Outlines for Stickers</a></li><li><a href="?layer=122">122 – Voice Chats</a></li><li><a href="?layer=123">123 – Voice Chat improvements</a></li><li><a href="?layer=124">124 – Expiring Invite links</a></li><li><a href="?layer=125">125 – Voice Chats in Broadcasts</a></li><li><a href="?layer=126">126 – Ban channels in channels</a></li><li><a href="?layer=127">127 – Payments in channels</a></li><li><a href="?layer=128">128 – Microthumbs for User/Chat profile photos</a></li><li><a href="?layer=129">129 – Video Chats</a></li><li><a href="?layer=130">130 – Custom placeholder for bot reply keyboards</a></li><li><a href="?layer=131">131 – Reset 2FA Password after a week</a></li><li><a href="?layer=132">132 – Chat themes</a></li><li><a href="?layer=133"><strong>133 – 64-bit IDs for User/Chat</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.passwordRecovery" >auth.passwordRecovery</a>#137948a5 email_pattern:<a href="/type/string" >string</a> = <a href="/type/auth.PasswordRecovery" class="current_page_link" >auth.PasswordRecovery</a>;
|
||||
|
||||
---functions---
|
||||
|
||||
<a href="/method/auth.requestPasswordRecovery" >auth.requestPasswordRecovery</a>#d897bc66 = <a href="/type/auth.PasswordRecovery" class="current_page_link" >auth.PasswordRecovery</a>;</code></pre></p>
|
||||
<h3><a class="anchor" href="#constructors" id="constructors" name="constructors"><i class="anchor-icon"></i></a>Constructors</h3>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Constructor</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><a href="/constructor/auth.passwordRecovery">auth.passwordRecovery</a></td>
|
||||
<td>Recovery info of a <a href="/api/srp">2FA password</a>, only for accounts with a <a href="/api/srp#email-verification">recovery email configured</a>.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3><a class="anchor" href="#methods" id="methods" name="methods"><i class="anchor-icon"></i></a>Methods</h3>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Method</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><a href="/method/auth.requestPasswordRecovery">auth.requestPasswordRecovery</a></td>
|
||||
<td>Request recovery code of a <a href="/api/srp">2FA password</a>, only for accounts with a <a href="/api/srp#email-verification">recovery email configured</a>.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
|
||||
<h4><a class="anchor" href="#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></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?43"></script>
|
||||
|
||||
<script>backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,162 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Messages.ArchivedStickers</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Archived stickers">
|
||||
<meta property="og:title" content="Messages.ArchivedStickers">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Archived stickers">
|
||||
<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?215" 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="/type/messages.ArchivedStickers" >Messages.ArchivedStickers</a></li></ul></div>
|
||||
<h1 id="dev_page_title">Messages.ArchivedStickers</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Archived stickers</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 133 <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="?layer=1">1 – Base layer</a></li><li><a href="?layer=2">2 – New userpic notifications</a></li><li><a href="?layer=3">3 – Send message can trigger link change</a></li><li><a href="?layer=4">4 – Check-in chats</a></li><li><a href="?layer=5">5 – Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 – Foursquare integration</a></li><li><a href="?layer=7">7 – Added wallPaperSolid</a></li><li><a href="?layer=8">8 – Added end-to-end encryption</a></li><li><a href="?layer=9">9 – Improved big files upload perfomance</a></li><li><a href="?layer=10">10 – Improved chat participants updates</a></li><li><a href="?layer=11">11 – Improved secret chats</a></li><li><a href="?layer=12">12 – New dynamic support</a></li><li><a href="?layer=13">13 – Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 – Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 – Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 – Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 – Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 – Added usernames</a></li><li><a href="?layer=23">23 – Stickers for secret chats</a></li><li><a href="?layer=105">105 – Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 – Login with QR code</a></li><li><a href="?layer=109">109 – Polls v2</a></li><li><a href="?layer=110">110 – People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 – Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 – Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 – PSA</a></li><li><a href="?layer=114">114 – Video thumbs for GIFs</a></li><li><a href="?layer=115">115 – Peek Channel Invite</a></li><li><a href="?layer=116">116 – Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 – WebRTC Phone Calls</a></li><li><a href="?layer=118">118 – Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 – Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 – Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121">121 – SVG-based Outlines for Stickers</a></li><li><a href="?layer=122">122 – Voice Chats</a></li><li><a href="?layer=123">123 – Voice Chat improvements</a></li><li><a href="?layer=124">124 – Expiring Invite links</a></li><li><a href="?layer=125">125 – Voice Chats in Broadcasts</a></li><li><a href="?layer=126">126 – Ban channels in channels</a></li><li><a href="?layer=127">127 – Payments in channels</a></li><li><a href="?layer=128">128 – Microthumbs for User/Chat profile photos</a></li><li><a href="?layer=129">129 – Video Chats</a></li><li><a href="?layer=130">130 – Custom placeholder for bot reply keyboards</a></li><li><a href="?layer=131">131 – Reset 2FA Password after a week</a></li><li><a href="?layer=132">132 – Chat themes</a></li><li><a href="?layer=133"><strong>133 – 64-bit IDs for User/Chat</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/messages.archivedStickers" >messages.archivedStickers</a>#4fcba9c8 count:<a href="/type/int" >int</a> sets:<a href="/type/Vector%20t" >Vector</a><<a href="/type/StickerSetCovered" >StickerSetCovered</a>> = <a href="/type/messages.ArchivedStickers" class="current_page_link" >messages.ArchivedStickers</a>;
|
||||
|
||||
---functions---
|
||||
|
||||
<a href="/method/messages.getArchivedStickers" >messages.getArchivedStickers</a>#57f17692 flags:<a href="/type/%23" >#</a> masks:flags.0?true offset_id:<a href="/type/long" >long</a> limit:<a href="/type/int" >int</a> = <a href="/type/messages.ArchivedStickers" class="current_page_link" >messages.ArchivedStickers</a>;</code></pre></p>
|
||||
<h3><a class="anchor" href="#constructors" id="constructors" name="constructors"><i class="anchor-icon"></i></a>Constructors</h3>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Constructor</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><a href="/constructor/messages.archivedStickers">messages.archivedStickers</a></td>
|
||||
<td>Archived stickersets</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3><a class="anchor" href="#methods" id="methods" name="methods"><i class="anchor-icon"></i></a>Methods</h3>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Method</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><a href="/method/messages.getArchivedStickers">messages.getArchivedStickers</a></td>
|
||||
<td>Get all archived stickers</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?43"></script>
|
||||
|
||||
<script>backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,162 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>payments.BankCardData</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Credit card info, provided by the card's bank(s)">
|
||||
<meta property="og:title" content="payments.BankCardData">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Credit card info, provided by the card's bank(s)">
|
||||
<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?215" 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="/type/payments.BankCardData" >payments.BankCardData</a></li></ul></div>
|
||||
<h1 id="dev_page_title">payments.BankCardData</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Credit card info, provided by the card's bank(s)</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 133 <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="?layer=1">1 – Base layer</a></li><li><a href="?layer=2">2 – New userpic notifications</a></li><li><a href="?layer=3">3 – Send message can trigger link change</a></li><li><a href="?layer=4">4 – Check-in chats</a></li><li><a href="?layer=5">5 – Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 – Foursquare integration</a></li><li><a href="?layer=7">7 – Added wallPaperSolid</a></li><li><a href="?layer=8">8 – Added end-to-end encryption</a></li><li><a href="?layer=9">9 – Improved big files upload perfomance</a></li><li><a href="?layer=10">10 – Improved chat participants updates</a></li><li><a href="?layer=11">11 – Improved secret chats</a></li><li><a href="?layer=12">12 – New dynamic support</a></li><li><a href="?layer=13">13 – Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 – Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 – Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 – Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 – Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 – Added usernames</a></li><li><a href="?layer=23">23 – Stickers for secret chats</a></li><li><a href="?layer=105">105 – Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 – Login with QR code</a></li><li><a href="?layer=109">109 – Polls v2</a></li><li><a href="?layer=110">110 – People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 – Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 – Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 – PSA</a></li><li><a href="?layer=114">114 – Video thumbs for GIFs</a></li><li><a href="?layer=115">115 – Peek Channel Invite</a></li><li><a href="?layer=116">116 – Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 – WebRTC Phone Calls</a></li><li><a href="?layer=118">118 – Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 – Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 – Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121">121 – SVG-based Outlines for Stickers</a></li><li><a href="?layer=122">122 – Voice Chats</a></li><li><a href="?layer=123">123 – Voice Chat improvements</a></li><li><a href="?layer=124">124 – Expiring Invite links</a></li><li><a href="?layer=125">125 – Voice Chats in Broadcasts</a></li><li><a href="?layer=126">126 – Ban channels in channels</a></li><li><a href="?layer=127">127 – Payments in channels</a></li><li><a href="?layer=128">128 – Microthumbs for User/Chat profile photos</a></li><li><a href="?layer=129">129 – Video Chats</a></li><li><a href="?layer=130">130 – Custom placeholder for bot reply keyboards</a></li><li><a href="?layer=131">131 – Reset 2FA Password after a week</a></li><li><a href="?layer=132">132 – Chat themes</a></li><li><a href="?layer=133"><strong>133 – 64-bit IDs for User/Chat</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/payments.bankCardData" >payments.bankCardData</a>#3e24e573 title:<a href="/type/string" >string</a> open_urls:<a href="/type/Vector%20t" >Vector</a><<a href="/type/BankCardOpenUrl" >BankCardOpenUrl</a>> = <a href="/type/payments.BankCardData" class="current_page_link" >payments.BankCardData</a>;
|
||||
|
||||
---functions---
|
||||
|
||||
<a href="/method/payments.getBankCardData" >payments.getBankCardData</a>#2e79d779 number:<a href="/type/string" >string</a> = <a href="/type/payments.BankCardData" class="current_page_link" >payments.BankCardData</a>;</code></pre></p>
|
||||
<h3><a class="anchor" href="#constructors" id="constructors" name="constructors"><i class="anchor-icon"></i></a>Constructors</h3>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Constructor</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><a href="/constructor/payments.bankCardData">payments.bankCardData</a></td>
|
||||
<td>Credit card info, provided by the card's bank(s)</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3><a class="anchor" href="#methods" id="methods" name="methods"><i class="anchor-icon"></i></a>Methods</h3>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Method</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><a href="/method/payments.getBankCardData">payments.getBankCardData</a></td>
|
||||
<td>Get info about a credit card</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?43"></script>
|
||||
|
||||
<script>backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
115
data/core.telegram.org/video_stickers.html
Normal file
115
data/core.telegram.org/video_stickers.html
Normal file
|
@ -0,0 +1,115 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Page not found</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="">
|
||||
<meta property="og:title" content="Page not found">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="">
|
||||
<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?215" 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">Page not found</h1>
|
||||
|
||||
<div id="dev_page_content">The page has not been saved</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?43"></script>
|
||||
|
||||
<script>backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
253
data/corefork.telegram.org.html
Normal file
253
data/corefork.telegram.org.html
Normal file
|
@ -0,0 +1,253 @@
|
|||
<!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?215" 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 & 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="#imported-messages" id="imported-messages" name="imported-messages"><i class="anchor-icon"></i></a><a href="/api/import">Imported messages</a></h4>
|
||||
<p>Telegram allows importing messages and media from foreign chat apps.</p>
|
||||
<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="//core.telegram.org/">Platform</a></h5>
|
||||
<ul>
|
||||
<li><a href="//core.telegram.org/api">API</a></li>
|
||||
<li><a href="//translations.telegram.org/">Translations</a></li>
|
||||
<li><a href="//instantview.telegram.org/">Instant View</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer_columns_wrap footer_mobile">
|
||||
<div class="footer_column">
|
||||
<h5><a href="//telegram.org/faq">About</a></h5>
|
||||
</div>
|
||||
<div class="footer_column">
|
||||
<h5><a href="//telegram.org/blog">Blog</a></h5>
|
||||
</div>
|
||||
<div class="footer_column">
|
||||
<h5><a href="//telegram.org/apps">Apps</a></h5>
|
||||
</div>
|
||||
<div class="footer_column">
|
||||
<h5><a href="//core.telegram.org/">Platform</a></h5>
|
||||
</div>
|
||||
<div class="footer_column">
|
||||
<h5><a href="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?43"></script>
|
||||
|
||||
<script>backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
187
data/corefork.telegram.org/api/animated-emojis.html
Normal file
187
data/corefork.telegram.org/api/animated-emojis.html
Normal file
|
@ -0,0 +1,187 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Animated Emojis</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<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="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">
|
||||
|
||||
<link href="/css/telegram.css?215" 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/animated-emojis" >Animated Emojis</a></li></ul></div>
|
||||
<h1 id="dev_page_title">Animated Emojis</h1>
|
||||
|
||||
<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><<a href='/type/StickerPack'>StickerPack</a>> documents:<a href='/type/Vector%20t'>Vector</a><<a href='/type/Document'>Document</a>> = <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.<br>
|
||||
For <a href="#emoji-reactions">supported emojis</a>, clients on both sides of private chats with users are supposed to show a reaction animation when any of the two users clicks on the animated emoji: <a href="#emoji-reactions">click here for more info »</a>.</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>
|
||||
<h3><a class="anchor" href="#emoji-reactions" id="emoji-reactions" name="emoji-reactions"><i class="anchor-icon"></i></a>Emoji reactions</h3>
|
||||
<pre><code><a href='/constructor/inputStickerSetAnimatedEmojiAnimations'>inputStickerSetAnimatedEmojiAnimations</a>#cde3739 = <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><<a href='/type/StickerPack'>StickerPack</a>> documents:<a href='/type/Vector%20t'>Vector</a><<a href='/type/Document'>Document</a>> = <a href='/type/messages.StickerSet'>messages.StickerSet</a>;
|
||||
|
||||
<a href='/constructor/stickerPack'>stickerPack</a>#12b299d4 emoticon:<a href='/type/string'>string</a> documents:<a href='/type/Vector%20t'>Vector</a><<a href='/type/long'>long</a>> = <a href='/type/StickerPack'>StickerPack</a>;
|
||||
|
||||
<a href='/constructor/sendMessageEmojiInteraction'>sendMessageEmojiInteraction</a>#25972bcb emoticon:<a href='/type/string'>string</a> msg_id:<a href='/type/int'>int</a> interaction:<a href='/type/DataJSON'>DataJSON</a> = <a href='/type/SendMessageAction'>SendMessageAction</a>;
|
||||
<a href='/constructor/sendMessageEmojiInteractionSeen'>sendMessageEmojiInteractionSeen</a>#b665902e emoticon:<a href='/type/string'>string</a> = <a href='/type/SendMessageAction'>SendMessageAction</a>;
|
||||
|
||||
<a href='/constructor/updateUserTyping'>updateUserTyping</a>#c01e857f user_id:<a href='/type/long'>long</a> action:<a href='/type/SendMessageAction'>SendMessageAction</a> = <a href='/type/Update'>Update</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>;
|
||||
|
||||
<a href='/method/messages.setTyping'>messages.setTyping</a>#58943ee2 flags:<a href='/type/%23'>#</a> peer:<a href='/type/InputPeer'>InputPeer</a> top_msg_id:flags.0?<a href='/type/int'>int</a> action:<a href='/type/SendMessageAction'>SendMessageAction</a> = <a href='/type/Bool'>Bool</a>;</code></pre>
|
||||
<p>On startup, clients should fetch the animated reaction emoji stickerset by calling the <a href="/method/messages.getStickerSet">messages.getStickerSet</a> method, providing <a href="/constructor/inputStickerSetAnimatedEmojiAnimations">inputStickerSetAnimatedEmojiAnimations</a> to the <code>stickerset</code> field.<br>
|
||||
The returned stickerset will contain a set of animated emoji reactions, <em>one or more</em> for each of the supported emojis.<br>
|
||||
If a set of reactions for the <img class="emoji" src="//telegram.org/img/emoji/40/E29DA4.png" width="20" height="20" alt="❤" /> emoji is returned, the same reactions should also be assigned to the <img class="emoji" src="//telegram.org/img/emoji/40/F09FA7A1.png" width="20" height="20" alt="🧡" />, <img class="emoji" src="//telegram.org/img/emoji/40/F09F929B.png" width="20" height="20" alt="💛" />, <img class="emoji" src="//telegram.org/img/emoji/40/F09F929A.png" width="20" height="20" alt="💚" />, <img class="emoji" src="//telegram.org/img/emoji/40/F09F9299.png" width="20" height="20" alt="💙" />, <img class="emoji" src="//telegram.org/img/emoji/40/F09F929C.png" width="20" height="20" alt="💜" />, <img class="emoji" src="//telegram.org/img/emoji/40/F09F96A4.png" width="20" height="20" alt="🖤" />, <img class="emoji" src="//telegram.org/img/emoji/40/F09FA48D.png" width="20" height="20" alt="🤍" /> and <img class="emoji" src="//telegram.org/img/emoji/40/F09FA48E.png" width="20" height="20" alt="🤎" /> emojis. </p>
|
||||
<p>Clients on both sides of private chats with users should overlay one of the appropriate reaction animations over the animated sticker when any of the two users clicks on a supported animated emoji.<br>
|
||||
The reaction animation for each separate tap should be chosen randomly from all the available reactions for a given emoji, and multiple taps should be aggregated and sent to the other user as follows: </p>
|
||||
<p>At each tap, clients should store all occurred taps in a local list.<br>
|
||||
After 1 second has elapsed with no more taps, the local list should be cleared and stored taps should be sent using <a href="/method/messages.setTyping">messages.setTyping</a>, passing a <a href="/constructor/sendMessageEmojiInteraction">sendMessageEmojiInteraction</a> constructor with the following fields: </p>
|
||||
<ul>
|
||||
<li><code>emoticon</code> - The emoji we're reacting to</li>
|
||||
<li><code>msg_id</code> - Message ID of the animated emoji that was clicked</li>
|
||||
<li><code>interaction</code> - A JSON object with interaction info, containing the following keys:<ul>
|
||||
<li><code>v</code> - An integer indicating the object version, currently <code>1</code></li>
|
||||
<li><code>a</code> - An array of JSON objects, each containing the following keys:<ul>
|
||||
<li><code>t</code> - float, number of seconds that passed since the previous tap in the array, the first tap uses a value of <code>0.0</code>.</li>
|
||||
<li><code>i</code> - integer, 1-based index of the randomly chosen animation for the tap (equivalent to the index of a specific emoji-related animation in <a href="/constructor/stickerPack">stickerPack</a> + 1).</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<p>1 second after the receiving user has seen the last reaction animation for a specific emoji, an acknowledgement must be sent using <a href="/method/messages.setTyping">messages.setTyping</a>, passing a <a href="/constructor/sendMessageEmojiInteractionSeen">sendMessageEmojiInteractionSeen</a> with that emoji.</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="//core.telegram.org/">Platform</a></h5>
|
||||
<ul>
|
||||
<li><a href="//core.telegram.org/api">API</a></li>
|
||||
<li><a href="//translations.telegram.org/">Translations</a></li>
|
||||
<li><a href="//instantview.telegram.org/">Instant View</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer_columns_wrap footer_mobile">
|
||||
<div class="footer_column">
|
||||
<h5><a href="//telegram.org/faq">About</a></h5>
|
||||
</div>
|
||||
<div class="footer_column">
|
||||
<h5><a href="//telegram.org/blog">Blog</a></h5>
|
||||
</div>
|
||||
<div class="footer_column">
|
||||
<h5><a href="//telegram.org/apps">Apps</a></h5>
|
||||
</div>
|
||||
<div class="footer_column">
|
||||
<h5><a href="//core.telegram.org/">Platform</a></h5>
|
||||
</div>
|
||||
<div class="footer_column">
|
||||
<h5><a href="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?43"></script>
|
||||
|
||||
<script>backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -162,9 +162,9 @@
|
|||
</ul>
|
||||
</div>
|
||||
<div class="footer_column footer_column_platform">
|
||||
<h5><a href="/">Platform</a></h5>
|
||||
<h5><a href="//core.telegram.org/">Platform</a></h5>
|
||||
<ul>
|
||||
<li><a href="/api">API</a></li>
|
||||
<li><a href="//core.telegram.org/api">API</a></li>
|
||||
<li><a href="//translations.telegram.org/">Translations</a></li>
|
||||
<li><a href="//instantview.telegram.org/">Instant View</a></li>
|
||||
</ul>
|
||||
|
@ -181,7 +181,7 @@
|
|||
<h5><a href="//telegram.org/apps">Apps</a></h5>
|
||||
</div>
|
||||
<div class="footer_column">
|
||||
<h5><a href="/">Platform</a></h5>
|
||||
<h5><a href="//core.telegram.org/">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>
|
140
data/corefork.telegram.org/api/bots/commands.html
Normal file
140
data/corefork.telegram.org/api/bots/commands.html
Normal file
|
@ -0,0 +1,140 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Commands</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="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.">
|
||||
<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?215" 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%2Fcommands" >Commands</a></li></ul></div>
|
||||
<h1 id="dev_page_title">Commands</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>#1b74b335 user_id:<a href='/type/long'>long</a> description:<a href='/type/string'>string</a> commands:<a href='/type/Vector%20t'>Vector</a><<a href='/type/BotCommand'>BotCommand</a>> = <a href='/type/BotInfo'>BotInfo</a>;
|
||||
|
||||
<a href='/constructor/channelFull'>channelFull</a>#e9b27a17 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/long'>long</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:flags.23?<a href='/type/ExportedChatInvite'>ExportedChatInvite</a> bot_info:<a href='/type/Vector%20t'>Vector</a><<a href='/type/BotInfo'>BotInfo</a>> migrated_from_chat_id:flags.4?<a href='/type/long'>long</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/long'>long</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> call:flags.21?<a href='/type/InputGroupCall'>InputGroupCall</a> ttl_period:flags.24?<a href='/type/int'>int</a> pending_suggestions:flags.25?<a href='/type/Vector%20t'>Vector</a><<a href='/type/string'>string</a>> groupcall_default_join_as:flags.26?<a href='/type/Peer'>Peer</a> theme_emoticon:flags.27?<a href='/type/string'>string</a> = <a href='/type/ChatFull'>ChatFull</a>;
|
||||
<a href='/constructor/userFull'>userFull</a>#d697ff05 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> ttl_period:flags.14?<a href='/type/int'>int</a> theme_emoticon:flags.15?<a href='/type/string'>string</a> = <a href='/type/UserFull'>UserFull</a>;
|
||||
|
||||
<a href='/constructor/user'>user</a>#3ff6ecb0 flags:<a href='/type/%23'>#</a> self:flags.10?<a href='/constructor/true'>true</a> contact:flags.11?<a href='/constructor/true'>true</a> mutual_contact:flags.12?<a href='/constructor/true'>true</a> deleted:flags.13?<a href='/constructor/true'>true</a> bot:flags.14?<a href='/constructor/true'>true</a> bot_chat_history:flags.15?<a href='/constructor/true'>true</a> bot_nochats:flags.16?<a href='/constructor/true'>true</a> verified:flags.17?<a href='/constructor/true'>true</a> restricted:flags.18?<a href='/constructor/true'>true</a> min:flags.20?<a href='/constructor/true'>true</a> bot_inline_geo:flags.21?<a href='/constructor/true'>true</a> support:flags.23?<a href='/constructor/true'>true</a> scam:flags.24?<a href='/constructor/true'>true</a> apply_min_photo:flags.25?<a href='/constructor/true'>true</a> fake:flags.26?<a href='/constructor/true'>true</a> id:<a href='/type/long'>long</a> access_hash:flags.0?<a href='/type/long'>long</a> first_name:flags.1?<a href='/type/string'>string</a> last_name:flags.2?<a href='/type/string'>string</a> username:flags.3?<a href='/type/string'>string</a> phone:flags.4?<a href='/type/string'>string</a> photo:flags.5?<a href='/type/UserProfilePhoto'>UserProfilePhoto</a> status:flags.6?<a href='/type/UserStatus'>UserStatus</a> bot_info_version:flags.14?<a href='/type/int'>int</a> restriction_reason:flags.18?<a href='/type/Vector%20t'>Vector</a><<a href='/type/RestrictionReason'>RestrictionReason</a>> bot_inline_placeholder:flags.19?<a href='/type/string'>string</a> lang_code:flags.22?<a href='/type/string'>string</a> = <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>;
|
||||
|
||||
---functions---
|
||||
|
||||
<a href='/method/bots.setBotCommands'>bots.setBotCommands</a>#517165a scope:<a href='/type/BotCommandScope'>BotCommandScope</a> lang_code:<a href='/type/string'>string</a> commands:<a href='/type/Vector%20t'>Vector</a><<a href='/type/BotCommand'>BotCommand</a>> = <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>
|
||||
|
||||
</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="//core.telegram.org/">Platform</a></h5>
|
||||
<ul>
|
||||
<li><a href="//core.telegram.org/api">API</a></li>
|
||||
<li><a href="//translations.telegram.org/">Translations</a></li>
|
||||
<li><a href="//instantview.telegram.org/">Instant View</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer_columns_wrap footer_mobile">
|
||||
<div class="footer_column">
|
||||
<h5><a href="//telegram.org/faq">About</a></h5>
|
||||
</div>
|
||||
<div class="footer_column">
|
||||
<h5><a href="//telegram.org/blog">Blog</a></h5>
|
||||
</div>
|
||||
<div class="footer_column">
|
||||
<h5><a href="//telegram.org/apps">Apps</a></h5>
|
||||
</div>
|
||||
<div class="footer_column">
|
||||
<h5><a href="//core.telegram.org/">Platform</a></h5>
|
||||
</div>
|
||||
<div class="footer_column">
|
||||
<h5><a href="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?43"></script>
|
||||
<script src="/js/jquery.min.js?1"></script>
|
||||
<script src="/js/bootstrap.min.js?1"></script>
|
||||
|
||||
<script>window.initDevPageNav&&initDevPageNav();
|
||||
backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,148 +0,0 @@
|
|||
<!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?215" 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.<br>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>dcOption#18b7a10d flags:# ipv6:flags.0?true media_only:flags.1?true tcpo_only:flags.2?true cdn:flags.3?true static:flags.4?true id:int ip_address:string port:int secret:flags.10?bytes = DcOption;
|
||||
config#330b4067 flags:# phonecalls_enabled:flags.1?true default_p2p_contacts:flags.3?true preload_featured_stickers:flags.4?true ignore_phone_entities:flags.5?true revoke_pm_inbox:flags.6?true blocked_mode:flags.8?true pfs_enabled:flags.13?true date:int expires:int test_mode:Bool this_dc:int dc_options:Vector<DcOption> dc_txt_domain_name:string chat_size_max:int megagroup_size_max:int forwarded_count_max:int online_update_period_ms:int offline_blur_timeout_ms:int offline_idle_timeout_ms:int online_cloud_timeout_ms:int notify_cloud_delay_ms:int notify_default_delay_ms:int push_chat_period_ms:int push_chat_limit:int saved_gifs_limit:int edit_time_limit:int revoke_time_limit:int revoke_pm_time_limit:int rating_e_decay:int stickers_recent_limit:int stickers_faved_limit:int channels_read_media_period:int tmp_sessions:flags.0?int pinned_dialogs_count_max:int pinned_infolder_count_max:int call_receive_timeout_ms:int call_ring_timeout_ms:int call_connect_timeout_ms:int call_packet_timeout_ms:int me_url_prefix:string autoupdate_url_prefix:flags.7?string gif_search_username:flags.9?string venue_search_username:flags.10?string img_search_username:flags.11?string static_maps_provider:flags.12?string caption_length_max:int message_length_max:int webfile_dc_id:int suggested_lang_code:flags.2?string lang_pack_version:flags.2?int base_lang_pack_version:flags.2?int = Config;
|
||||
---functions---
|
||||
help.getConfig#c4f9186b = Config;</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.<br>Typically, each DC has at least one IPv4 and one IPv6 endpoint available. </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" name="registration-authorization" href="#registration-authorization"><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 occur 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.<br>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).<br>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" name="testing-redirects" href="#testing-redirects"><i class="anchor-icon"></i></a>Testing Redirects</h4>
|
||||
<p>There are reserved phone number prefixes to test the correctness of the application’s 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" name="file-access" href="#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>document#1e87342b flags:# id:long access_hash:long file_reference:bytes date:int mime_type:string size:int thumbs:flags.0?Vector<PhotoSize> video_thumbs:flags.1?Vector<VideoSize> dc_id:int attributes:Vector<DocumentAttribute> = Document;
|
||||
photo#fb197a65 flags:# has_stickers:flags.0?true id:long access_hash:long file_reference:bytes date:int sizes:Vector<PhotoSize> video_sizes:flags.1?Vector<VideoSize> dc_id:int = Photo;
|
||||
|
||||
encryptedFile#4a70994c id:long access_hash:long size:int dc_id:int key_fingerprint:int = EncryptedFile;
|
||||
|
||||
userProfilePhoto#82d1f706 flags:# has_video:flags.0?true photo_id:long stripped_thumb:flags.1?bytes dc_id:int = UserProfilePhoto;
|
||||
chatPhoto#1c6e1c11 flags:# has_video:flags.0?true photo_id:long stripped_thumb:flags.1?bytes dc_id:int = ChatPhoto;</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.<br>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" name="user-migration" href="#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 user’s 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" name="authorization-transfer" href="#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>auth.exportedAuthorization#b434e2b8 id:long bytes:bytes = auth.ExportedAuthorization;
|
||||
auth.authorization#cd050916 flags:# tmp_sessions:flags.0?int user:User = auth.Authorization;
|
||||
---functions---
|
||||
auth.importAuthorization#a57a7dad id:long bytes:bytes = auth.Authorization;
|
||||
auth.exportAuthorization#e5bfffcd dc_id:int = auth.ExportedAuthorization;</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="//core.telegram.org/">Platform</a></h5>
|
||||
<ul>
|
||||
<li><a href="//core.telegram.org/api">API</a></li>
|
||||
<li><a href="//translations.telegram.org/">Translations</a></li>
|
||||
<li><a href="//instantview.telegram.org/">Instant View</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer_columns_wrap footer_mobile">
|
||||
<div class="footer_column">
|
||||
<h5><a href="//telegram.org/faq">About</a></h5>
|
||||
</div>
|
||||
<div class="footer_column">
|
||||
<h5><a href="//telegram.org/blog">Blog</a></h5>
|
||||
</div>
|
||||
<div class="footer_column">
|
||||
<h5><a href="//telegram.org/apps">Apps</a></h5>
|
||||
</div>
|
||||
<div class="footer_column">
|
||||
<h5><a href="//core.telegram.org/">Platform</a></h5>
|
||||
</div>
|
||||
<div class="footer_column">
|
||||
<h5><a href="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?43"></script>
|
||||
|
||||
<script>backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
151
data/corefork.telegram.org/api/discussion.html
Normal file
151
data/corefork.telegram.org/api/discussion.html
Normal file
|
@ -0,0 +1,151 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Discussion groups</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<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="[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">
|
||||
|
||||
<link href="/css/telegram.css?215" 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/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="/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>#e9b27a17 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/long'>long</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:flags.23?<a href='/type/ExportedChatInvite'>ExportedChatInvite</a> bot_info:<a href='/type/Vector%20t'>Vector</a><<a href='/type/BotInfo'>BotInfo</a>> migrated_from_chat_id:flags.4?<a href='/type/long'>long</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/long'>long</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> call:flags.21?<a href='/type/InputGroupCall'>InputGroupCall</a> ttl_period:flags.24?<a href='/type/int'>int</a> pending_suggestions:flags.25?<a href='/type/Vector%20t'>Vector</a><<a href='/type/string'>string</a>> groupcall_default_join_as:flags.26?<a href='/type/Peer'>Peer</a> theme_emoticon:flags.27?<a href='/type/string'>string</a> = <a href='/type/ChatFull'>ChatFull</a>;
|
||||
|
||||
<a href='/constructor/messages.chats'>messages.chats</a>#64ff9fd5 chats:<a href='/type/Vector%20t'>Vector</a><<a href='/type/Chat'>Chat</a>> = <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>;</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><<a href='/type/Chat'>Chat</a>> = <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>
|
||||
|
||||
</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="//core.telegram.org/">Platform</a></h5>
|
||||
<ul>
|
||||
<li><a href="//core.telegram.org/api">API</a></li>
|
||||
<li><a href="//translations.telegram.org/">Translations</a></li>
|
||||
<li><a href="//instantview.telegram.org/">Instant View</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer_columns_wrap footer_mobile">
|
||||
<div class="footer_column">
|
||||
<h5><a href="//telegram.org/faq">About</a></h5>
|
||||
</div>
|
||||
<div class="footer_column">
|
||||
<h5><a href="//telegram.org/blog">Blog</a></h5>
|
||||
</div>
|
||||
<div class="footer_column">
|
||||
<h5><a href="//telegram.org/apps">Apps</a></h5>
|
||||
</div>
|
||||
<div class="footer_column">
|
||||
<h5><a href="//core.telegram.org/">Platform</a></h5>
|
||||
</div>
|
||||
<div class="footer_column">
|
||||
<h5><a href="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?43"></script>
|
||||
<script src="/js/jquery.min.js?1"></script>
|
||||
<script src="/js/bootstrap.min.js?1"></script>
|
||||
|
||||
<script>window.initDevPageNav&&initDevPageNav();
|
||||
backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
131
data/corefork.telegram.org/api/drafts.html
Normal file
131
data/corefork.telegram.org/api/drafts.html
Normal file
|
@ -0,0 +1,131 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Message drafts</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="How to handle message drafts">
|
||||
<meta property="og:title" content="Message drafts">
|
||||
<meta property="og:image" content="89f7ae8e51fc1ce19f">
|
||||
<meta property="og:description" content="How to handle message drafts">
|
||||
<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?215" 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/drafts" >Message drafts</a></li></ul></div>
|
||||
<h1 id="dev_page_title">Message drafts</h1>
|
||||
|
||||
<div id="dev_page_content"><!-- scroll_nav -->
|
||||
|
||||
<p>Message <a href="https://telegram.org/blog/drafts">drafts</a> in Telegram allow syncing the text typed into message fields between devices.</p>
|
||||
<h3><a class="anchor" href="#drafts" id="drafts" name="drafts"><i class="anchor-icon"></i></a>Drafts</h3>
|
||||
<p>Drafts are represented by the <a href="/type/DraftMessage">DraftMessage</a> constructors.
|
||||
The parameters of the peer-specific draft should be used as defaults when composing a message to be sent to a certain peer (in the case of media, the same draft should still be used as base, the message will become the caption).
|
||||
If the user exits the app before sending the message, the message should be saved as a draft:</p>
|
||||
<h3><a class="anchor" href="#saving-drafts" id="saving-drafts" name="saving-drafts"><i class="anchor-icon"></i></a>Saving drafts</h3>
|
||||
<p>Drafts can be saved using the <a href="/method/messages.saveDraft">messages.saveDraft</a> method.</p>
|
||||
<h3><a class="anchor" href="#downloading-drafts" id="downloading-drafts" name="downloading-drafts"><i class="anchor-icon"></i></a>Downloading drafts</h3>
|
||||
<p>New drafts are automatically sent to all devices via <a href="/constructor/updateDraftMessage">updateDraftMessage</a> updates.</p>
|
||||
<p><a href="/constructor/dialog">Dialog</a> objects fetched via the API also contain the draft associated with the dialog.</p>
|
||||
<h3><a class="anchor" href="#clearing-drafts" id="clearing-drafts" name="clearing-drafts"><i class="anchor-icon"></i></a>Clearing drafts</h3>
|
||||
<p>Drafts can be cleared by setting the <code>clear_draft</code> flag when sending messages or media using <a href="/method/messages.sendMessage">messages.sendMessage</a>, <a href="/method/messages.sendMedia">messages.sendMedia</a>, <a href="/method/messages.sendMultiMedia">messages.sendMultiMedia</a>, <a href="/method/messages.sendInlineBotResult">messages.sendInlineBotResult</a> and similar or manually by passing empty values to <a href="/method/messages.saveDraft">messages.saveDraft</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="//core.telegram.org/">Platform</a></h5>
|
||||
<ul>
|
||||
<li><a href="//core.telegram.org/api">API</a></li>
|
||||
<li><a href="//translations.telegram.org/">Translations</a></li>
|
||||
<li><a href="//instantview.telegram.org/">Instant View</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer_columns_wrap footer_mobile">
|
||||
<div class="footer_column">
|
||||
<h5><a href="//telegram.org/faq">About</a></h5>
|
||||
</div>
|
||||
<div class="footer_column">
|
||||
<h5><a href="//telegram.org/blog">Blog</a></h5>
|
||||
</div>
|
||||
<div class="footer_column">
|
||||
<h5><a href="//telegram.org/apps">Apps</a></h5>
|
||||
</div>
|
||||
<div class="footer_column">
|
||||
<h5><a href="//core.telegram.org/">Platform</a></h5>
|
||||
</div>
|
||||
<div class="footer_column">
|
||||
<h5><a href="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?43"></script>
|
||||
<script src="/js/jquery.min.js?1"></script>
|
||||
<script src="/js/bootstrap.min.js?1"></script>
|
||||
|
||||
<script>window.initDevPageNav&&initDevPageNav();
|
||||
backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,173 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Sequence numbers in Secret Chats</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="It is necessary to interpret all messages in their original order to protect against reordering, reflection, replay, omission…">
|
||||
<meta property="og:title" content="Sequence numbers in Secret Chats">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="It is necessary to interpret all messages in their original order to protect against reordering, reflection, replay, omission…">
|
||||
<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?215" 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/end-to-end" >Secret Chats</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/api/end-to-end%2Fseq_no" >Sequence numbers in Secret Chats</a></li></ul></div>
|
||||
<h1 id="dev_page_title">Sequence numbers in Secret Chats</h1>
|
||||
|
||||
<div id="dev_page_content"><p>It is necessary to interpret <strong>all</strong> messages in their original order to protect against reordering, reflection, replay, omission and other manipulations (<a href="/constructor/decryptedMessageActionResend">decryptedMessageActionResend</a> messages are the only exception to this rule, see <a href="#avoiding-concurrent-gaps">avoiding concurrent gaps</a>). Secret chats support a special mechanism for handling <strong>seq_no</strong> counters independently from the server. Note that any <em>service messages</em> in secret chats must also increment the <strong>seq_no</strong>.</p>
|
||||
<p>All Secret Chats messages in clients using Layer 17 or higher are wrapped in <a href="/constructor/decryptedMessageLayer">decryptedMessageLayer</a> and have <strong>seq_no</strong> (sequence number) counters attached to them. The <strong>seq_no</strong> counters in their raw form are initialized with <strong>(out_seq_no, in_seq_no) := (0,0)</strong>, and incremented strictly by 1 after any message (service or not) is sent/received and processed. They must be protected from mirroring before being sent to the remote client by transformation according to formula <strong>2*raw_seq_no+x</strong>, where <strong>x</strong> is 0 or 1, determined by the following rule:</p>
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><strong>in_seq_no</strong></td>
|
||||
<td><strong>out_seq_no</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>secret chat initiated by sender</td>
|
||||
<td>0</td>
|
||||
<td>1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>secret chat initiated by recipient</td>
|
||||
<td>1</td>
|
||||
<td>0</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>In this way the least significant bit of each <strong>seq_no</strong> field included in the message is different for incoming and outgoing messages. This is done to prevent a possible attacker from mirroring the messages. If any of the received <strong>in_seq_no</strong> or <strong>out_seq_no</strong> are not consistent in terms of parity (see table above), the client is required to immediately abort the secret chat.</p>
|
||||
<blockquote>
|
||||
<p>E.g., the first message the local client sends to any secret chat will have <strong>out_seq_no</strong> of <strong>0+x_out</strong>, the second one will have <strong>out_seq_no</strong> of <strong>2*1+x_out</strong>, and so on, where <strong>x_out</strong> is 0 if the chat was initiated by the remote client, 1 otherwise; similarly for the received messages, but there <strong>x_in</strong> is used instead of <strong>x_out</strong> and is equal to 0 if the chat was initiated by the local client, 1 otherwise. </p>
|
||||
</blockquote>
|
||||
<p>Raw sequence numbers will be used in the remaining part of this text, unless otherwise specified.</p>
|
||||
<h4><a class="anchor" href="#preventing-gaps" id="preventing-gaps" name="preventing-gaps"><i class="anchor-icon"></i></a>Preventing gaps</h4>
|
||||
<p>Your client must ensure that all outgoing secret chat messages are queued on the server in the correct order. This is achieved by correctly placing them into the <a href="/method/invokeAfterMsgs">invokeAfterMsgs</a> chain. Failure to do this may result in gaps on the remote client, which may in turn lead to aborted secret chats. The local client must maintain the correct sequence of <strong>in_seq_no</strong> for the remote client. To achieve this, assign <strong>in_seq_no</strong> and <strong>out_seq_no</strong> to each message at the <em>exact</em> moment when the message is created, and never change them in the future.</p>
|
||||
<h2><a class="anchor" href="#security-checks" id="security-checks" name="security-checks"><i class="anchor-icon"></i></a>Security checks</h2>
|
||||
<h4><a class="anchor" href="#checking-out-seq-no" id="checking-out-seq-no" name="checking-out-seq-no"><i class="anchor-icon"></i></a>Checking out_seq_no</h4>
|
||||
<p>Your client must check that it has received <em>each</em> message with the sequence number <strong>out_seq_no</strong> starting from 0 to some current point <strong>C</strong>. It should then expect the next message to have the sequence number <strong>out_seq_no=C+1</strong>. If the <strong>out_seq_no</strong> in the received message does not match this, the following needs to be done:</p>
|
||||
<ul>
|
||||
<li>If the received <strong>out_seq_no<=C</strong>, the local client must drop the message (repeated message). The client should not check the contents of the message because the original message could have been deleted (see <a href="#deleting-unacknowledged-messages">Deleting unacknowledged messages</a>).</li>
|
||||
<li>If the received <strong>out_seq_no>C+1</strong>, it most likely means that the server left out some messages due to a technical failure or due to the messages becoming obsolete. A temporary solution to this is to simply abort the secret chat. But since this may cause some existing older secret chats to be aborted, it is strongly recommended for the client to properly handle such <strong>seq_no</strong> gaps. Note that <strong>in_seq_no</strong> is not increased upon receipt of such a message; it is advanced only after all preceding gaps are filled.</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#proper-handling-of-gaps" id="proper-handling-of-gaps" name="proper-handling-of-gaps"><i class="anchor-icon"></i></a>Proper handling of gaps</h4>
|
||||
<p>In order to correctly handle incoming messages after a hole has been identified (when received <strong>out_seq_no>C+1</strong>), it is necessary to put received messages with the wrong <strong>seq_no</strong> into a "waiting queue" on the local client, and to re-request the missing messages using the special constructor <a href="/constructor/decryptedMessageActionResend">decryptedMessageActionResend</a> <code>start_seq_no:<a href='/type/int'>int</a> end_seq_no:<a href='/type/int'>int</a> = <a href='/type/DecryptedMessageAction'>DecryptedMessageAction</a>;</code>. The sequence numbers used in this constructor must be ready for interpretation by the remote client and therefore <em>cannot</em> be in their raw form: you can easily get the necessary <strong>start_seq_no</strong> by adding 2 to the <strong>out_seq_no</strong> of the last message before the hole and the <strong>end_seq_no</strong> by subtracting 2 from the <strong>out_seq_no</strong> of the received message with the wrong sequence number.</p>
|
||||
<p>Each hole normally requires only one request to resend messages — if the remote client keeps sending out of sync messages, they should be put into the queue without sending a new request. Having received the missing messages, the local client must first interpret these messages in the right order by their <strong>seq_no</strong>. Once this is done, the client can proceed to interpret messages from the queue (again, in the right <strong>seq_no</strong> order).</p>
|
||||
<p>Special cases:</p>
|
||||
<ul>
|
||||
<li>Note that having <em>two</em> gaps simultaneously is very rare (provided that the remote client and server are operating normally) and it is acceptable to abort the secret chat in this situation.</li>
|
||||
<li>If a local client receives <a href="/constructor/decryptedMessageActionResend">decryptedMessageActionResend</a> but is unable to satisfy the request, it must abort the secret chat.</li>
|
||||
</ul>
|
||||
<h4><a class="anchor" href="#avoiding-concurrent-gaps" id="avoiding-concurrent-gaps" name="avoiding-concurrent-gaps"><i class="anchor-icon"></i></a>Avoiding concurrent gaps</h4>
|
||||
<p>In order to avoid getting stuck with concurrent gaps on both sides, <a href="/constructor/decryptedMessageActionResend">decryptedMessageActionResend</a> must always be interpreted <em>immediately upon receipt</em> in all cases, even if its <strong>out_seq_no>=C+1</strong>. Note that each <a href="/constructor/decryptedMessageActionResend">decryptedMessageActionResend</a> must only be handled once, it must not be interpreted again when we interpret messages in the queue.</p>
|
||||
<h4><a class="anchor" href="#checking-and-handling-in-seq-no" id="checking-and-handling-in-seq-no" name="checking-and-handling-in-seq-no"><i class="anchor-icon"></i></a>Checking and handling in_seq_no</h4>
|
||||
<p><strong>in_seq_no</strong> of all received messages must be <em>valid</em>. To ensure this, perform the following checks:</p>
|
||||
<ul>
|
||||
<li><strong>in_seq_no</strong> must form a non-decreasing sequence of non-negative integer numbers.</li>
|
||||
<li><strong>in_seq_no</strong> must be valid at the moment of receiving the message, that is, if <strong>D</strong> is the <strong>out_seq_no</strong> of last message we sent, the received <strong>in_seq_no</strong> should not be greater than <strong>D + 1</strong>. This also allows us to insert the received message into its correct place in the secret chat. For example, imagine that the local client has sent 5 secret chat messages, and then receives a secret chat message with the text "Yes" and <strong>in_seq_no=2</strong>. In this situation the local client <em>must</em> place that message after the second message it sent. This makes manipulations with delayed messages impossible.</li>
|
||||
</ul>
|
||||
<p>If <code>in_seq_no</code> contradicts these criteria, the local client is required to immediately abort the secret chat. This could happen only in case of malicious or buggy behaviour on either server or remote client side.</p>
|
||||
<h4><a class="anchor" href="#deleting-unacknowledged-messages" id="deleting-unacknowledged-messages" name="deleting-unacknowledged-messages"><i class="anchor-icon"></i></a>Deleting unacknowledged messages</h4>
|
||||
<p>In case the user on the local client has deleted a message <em>before</em> the server (or the remote client, if <a href="/constructor/decryptedMessageActionResend">decryptedMessageActionResend</a> is handled correctly) could acknowledge the message, for security reasons, you must:</p>
|
||||
<ul>
|
||||
<li>securely destroy the contents of the message (as in case of any other deleted Secret Chat message);</li>
|
||||
<li>change the local copy of the original message to <code>decryptedMessageActionDeleteMessages</code> with <strong>random_id</strong> equal to its own <strong>random_id</strong>;</li>
|
||||
<li>create a new outgoing message deleting the original message.</li>
|
||||
</ul>
|
||||
<p>This must be done because your client doesn't know whether the remote client really received the message or not. In the case the message was already received, it will be deleted by the second message; otherwise it must arrive as a "self-delete" message to maintain the correct sequence of seq_no.</p></div>
|
||||
|
||||
</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="//core.telegram.org/">Platform</a></h5>
|
||||
<ul>
|
||||
<li><a href="//core.telegram.org/api">API</a></li>
|
||||
<li><a href="//translations.telegram.org/">Translations</a></li>
|
||||
<li><a href="//instantview.telegram.org/">Instant View</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer_columns_wrap footer_mobile">
|
||||
<div class="footer_column">
|
||||
<h5><a href="//telegram.org/faq">About</a></h5>
|
||||
</div>
|
||||
<div class="footer_column">
|
||||
<h5><a href="//telegram.org/blog">Blog</a></h5>
|
||||
</div>
|
||||
<div class="footer_column">
|
||||
<h5><a href="//telegram.org/apps">Apps</a></h5>
|
||||
</div>
|
||||
<div class="footer_column">
|
||||
<h5><a href="//core.telegram.org/">Platform</a></h5>
|
||||
</div>
|
||||
<div class="footer_column">
|
||||
<h5><a href="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?43"></script>
|
||||
|
||||
<script>backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
189
data/corefork.telegram.org/api/errors.html
Normal file
189
data/corefork.telegram.org/api/errors.html
Normal file
|
@ -0,0 +1,189 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Error handling </title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="How to handle API return errors correctly.">
|
||||
<meta property="og:title" content="Error handling ">
|
||||
<meta property="og:image" content="80b44334eec2aec564">
|
||||
<meta property="og:description" content="How to handle API return errors 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?215" 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/errors" >Error handling </a></li></ul></div>
|
||||
<h1 id="dev_page_title">Error handling </h1>
|
||||
|
||||
<div id="dev_page_content"><p>There will be errors when working with the API, and they must be correctly handled on the client.</p>
|
||||
<p>An error is characterized by several parameters:</p>
|
||||
<h4><a class="anchor" href="#error-code" id="error-code" name="error-code"><i class="anchor-icon"></i></a>Error Code</h4>
|
||||
<p>Numerical value similar to HTTP status. Contains information on the type of error that occurred: for example, a data input error, privacy error, or server error. This is a required parameter.</p>
|
||||
<h4><a class="anchor" href="#error-type" id="error-type" name="error-type"><i class="anchor-icon"></i></a>Error Type</h4>
|
||||
<p>A string literal in the form of <code>/[A-Z_0-9]+/</code>, which summarizes the problem. For example, <code>AUTH_KEY_UNREGISTERED</code>. This is an optional parameter.</p>
|
||||
<hr>
|
||||
<h4><a class="anchor" href="#error-constructors" id="error-constructors" name="error-constructors"><i class="anchor-icon"></i></a>Error Constructors</h4>
|
||||
<p>There should be a way to handle errors that are returned in <a href="/mtproto/service_messages#rpc-error">rpc_error</a> constructors.</p>
|
||||
<p>Below is a list of error codes and their meanings:</p>
|
||||
<h3><a class="anchor" href="#303-see-other" id="303-see-other" name="303-see-other"><i class="anchor-icon"></i></a>303 SEE_OTHER</h3>
|
||||
<p>The request must be repeated, but directed to a different data center.</p>
|
||||
<h4><a class="anchor" href="#examples-of-errors" id="examples-of-errors" name="examples-of-errors"><i class="anchor-icon"></i></a>Examples of Errors:</h4>
|
||||
<ul>
|
||||
<li>FILE_MIGRATE_X: the file to be accessed is currently stored in a different data center.</li>
|
||||
<li>PHONE_MIGRATE_X: the phone number a user is trying to use for authorization is associated with a different data center.</li>
|
||||
<li>NETWORK_MIGRATE_X: the source IP address is associated with a different data center (for registration)</li>
|
||||
<li>USER_MIGRATE_X: the user whose identity is being used to execute queries is associated with a different data center (for registration)</li>
|
||||
</ul>
|
||||
<p>In all these cases, the error description’s string literal contains the number of the data center (instead of the X) to which the repeated query must be sent.
|
||||
<a href="/api/datacenter">More information about redirects between data centers »</a></p>
|
||||
<h3><a class="anchor" href="#400-bad-request" id="400-bad-request" name="400-bad-request"><i class="anchor-icon"></i></a>400 BAD_REQUEST</h3>
|
||||
<p>The query contains errors. In the event that a request was created using a form and contains user generated data, the user should be notified that the data must be corrected before the query is repeated.</p>
|
||||
<h4><a class="anchor" href="#examples-of-errors" id="examples-of-errors" name="examples-of-errors"><i class="anchor-icon"></i></a>Examples of Errors:</h4>
|
||||
<ul>
|
||||
<li>FIRSTNAME_INVALID: The first name is invalid</li>
|
||||
<li>LASTNAME_INVALID: The last name is invalid</li>
|
||||
<li>PHONE_NUMBER_INVALID: The phone number is invalid</li>
|
||||
<li>PHONE_CODE_HASH_EMPTY: phone_code_hash is missing</li>
|
||||
<li>PHONE_CODE_EMPTY: phone_code is missing</li>
|
||||
<li>PHONE_CODE_EXPIRED: The confirmation code has expired</li>
|
||||
<li>API_ID_INVALID: The api_id/api_hash combination is invalid</li>
|
||||
<li>PHONE_NUMBER_OCCUPIED: The phone number is already in use</li>
|
||||
<li>PHONE_NUMBER_UNOCCUPIED: The phone number is not yet being used</li>
|
||||
<li>USERS_TOO_FEW: Not enough users (to create a chat, for example)</li>
|
||||
<li>USERS_TOO_MUCH: The maximum number of users has been exceeded (to create a chat, for example)</li>
|
||||
<li>TYPE_CONSTRUCTOR_INVALID: The type constructor is invalid</li>
|
||||
<li>FILE_PART_INVALID: The file part number is invalid</li>
|
||||
<li>FILE_PARTS_INVALID: The number of file parts is invalid</li>
|
||||
<li>FILE_PART_Х_MISSING: Part X (where X is a number) of the file is missing from storage</li>
|
||||
<li>MD5_CHECKSUM_INVALID: The MD5 checksums do not match</li>
|
||||
<li>PHOTO_INVALID_DIMENSIONS: The photo dimensions are invalid</li>
|
||||
<li>FIELD_NAME_INVALID: The field with the name FIELD_NAME is invalid</li>
|
||||
<li>FIELD_NAME_EMPTY: The field with the name FIELD_NAME is missing</li>
|
||||
<li>MSG_WAIT_FAILED: A request that must be completed before processing the current request returned an error</li>
|
||||
<li>MSG_WAIT_TIMEOUT: A request that must be completed before processing the current request didn't finish processing yet</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" href="#401-unauthorized" id="401-unauthorized" name="401-unauthorized"><i class="anchor-icon"></i></a>401 UNAUTHORIZED</h3>
|
||||
<p>There was an unauthorized attempt to use functionality available only to authorized users.</p>
|
||||
<h4><a class="anchor" href="#examples-of-errors" id="examples-of-errors" name="examples-of-errors"><i class="anchor-icon"></i></a>Examples of Errors:</h4>
|
||||
<ul>
|
||||
<li>AUTH_KEY_UNREGISTERED: The key is not registered in the system</li>
|
||||
<li>AUTH_KEY_INVALID: The key is invalid</li>
|
||||
<li>USER_DEACTIVATED: The user has been deleted/deactivated</li>
|
||||
<li>SESSION_REVOKED: The authorization has been invalidated, because of the user terminating all sessions</li>
|
||||
<li>SESSION_EXPIRED: The authorization has expired</li>
|
||||
<li>AUTH_KEY_PERM_EMPTY: The method is unavailble for temporary authorization key, not bound to permanent</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" href="#403-forbidden" id="403-forbidden" name="403-forbidden"><i class="anchor-icon"></i></a>403 FORBIDDEN</h3>
|
||||
<p>Privacy violation. For example, an attempt to write a message to someone who has blacklisted the current user.</p>
|
||||
<h3><a class="anchor" href="#404-not-found" id="404-not-found" name="404-not-found"><i class="anchor-icon"></i></a>404 NOT_FOUND</h3>
|
||||
<p>An attempt to invoke a non-existent object, such as a method.</p>
|
||||
<h3><a class="anchor" href="#406-not-acceptable" id="406-not-acceptable" name="406-not-acceptable"><i class="anchor-icon"></i></a>406 NOT_ACCEPTABLE</h3>
|
||||
<p>Similar to <a href="#400-bad-request">400 BAD_REQUEST</a>, but the app should not display any error messages to user in UI as a result of this response. The error message will be delivered via <a href="/constructor/updateServiceNotification">updateServiceNotification</a> instead.</p>
|
||||
<h3><a class="anchor" href="#420-flood" id="420-flood" name="420-flood"><i class="anchor-icon"></i></a>420 FLOOD</h3>
|
||||
<p>The maximum allowed number of attempts to invoke the given method with the given input parameters has been exceeded. For example, in an attempt to request a large number of text messages (SMS) for the same phone number.</p>
|
||||
<h4><a class="anchor" href="#error-example" id="error-example" name="error-example"><i class="anchor-icon"></i></a>Error Example:</h4>
|
||||
<ul>
|
||||
<li>FLOOD_WAIT_X: A wait of X seconds is required (where X is a number)</li>
|
||||
</ul>
|
||||
<h3><a class="anchor" href="#500-internal" id="500-internal" name="500-internal"><i class="anchor-icon"></i></a>500 INTERNAL</h3>
|
||||
<p>An internal server error occurred while a request was being processed; for example, there was a disruption while accessing a database or file storage.</p>
|
||||
<p>If a client receives a 500 error, or you believe this error should not have occurred, please collect as much information as possible about the query and error and send it to the developers.</p>
|
||||
<h3><a class="anchor" href="#other-error-codes" id="other-error-codes" name="other-error-codes"><i class="anchor-icon"></i></a>Other Error Codes</h3>
|
||||
<p>If a server returns an error with a code other than the ones listed above, it may be considered the same as a 500 error and treated as an <a href="#500-internal">internal server error</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="//core.telegram.org/">Platform</a></h5>
|
||||
<ul>
|
||||
<li><a href="//core.telegram.org/api">API</a></li>
|
||||
<li><a href="//translations.telegram.org/">Translations</a></li>
|
||||
<li><a href="//instantview.telegram.org/">Instant View</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer_columns_wrap footer_mobile">
|
||||
<div class="footer_column">
|
||||
<h5><a href="//telegram.org/faq">About</a></h5>
|
||||
</div>
|
||||
<div class="footer_column">
|
||||
<h5><a href="//telegram.org/blog">Blog</a></h5>
|
||||
</div>
|
||||
<div class="footer_column">
|
||||
<h5><a href="//telegram.org/apps">Apps</a></h5>
|
||||
</div>
|
||||
<div class="footer_column">
|
||||
<h5><a href="//core.telegram.org/">Platform</a></h5>
|
||||
</div>
|
||||
<div class="footer_column">
|
||||
<h5><a href="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?43"></script>
|
||||
|
||||
<script>backToTopInit("Go up");
|
||||
removePreloadInit();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue