Update content of files

This commit is contained in:
GitHub Action 2022-02-14 18:56:04 +00:00
parent fe271c38db
commit 70983930af
11 changed files with 0 additions and 2810 deletions

File diff suppressed because it is too large Load diff

View file

@ -1,307 +0,0 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>Two-factor authentication</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="How to login to a user&#39;s account if they have enabled 2FA, how to change password.">
<meta property="og:title" content="Two-factor authentication">
<meta property="og:image" content="566f538655672c95c6">
<meta property="og:description" content="How to login to a user&#39;s account if they have enabled 2FA, how to change password.">
<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/srp" >Two-factor authentication</a></li></ul></div>
<h1 id="dev_page_title">Two-factor authentication</h1>
<div id="dev_page_content"><!-- scroll_nav -->
<p>Telegram uses the <a href="https://en.wikipedia.org/wiki/Secure_Remote_Password_protocol">Secure Remote Password protocol</a> version 6a to implement 2FA.</p>
<p>Example impementation: <a href="https://github.com/tdlib/td/blob/56163c2460a65afc4db2c57ece576b8c38ea194b/td/telegram/PasswordManager.cpp">tdlib</a>.</p>
<h3><a class="anchor" href="#checking-the-password-with-srp" id="checking-the-password-with-srp" name="checking-the-password-with-srp"><i class="anchor-icon"></i></a>Checking the password with SRP</h3>
<p>To login to an account protected by a 2FA password or to perform some other actions (like changing channel owner), you will need to verify the user's knowledge of the current 2FA account password.</p>
<p>To do this, first the client needs to obtain SRP parameters and the KDF algorithm to use to check the validity of the password via <a href="https://core.telegram.org/method/account.getPassword">account.getPassword</a> method. For now, only the <a href="/constructor/passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow">passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow</a> algorithm is supported, so we'll only explain that.</p>
<p>Then, after the user provides a password, the client should generate an <a href="/type/InputCheckPasswordSRP">InputCheckPasswordSRP</a> object using SRP and a specific KDF algorithm as shown below and pass it to appropriate method (e.g. <a href="/method/auth.checkPassword">auth.checkPassword</a> in case of authorization).</p>
<p>This extension of the <a href="https://en.wikipedia.org/wiki/Secure_Remote_Password_protocol">SRP protocol</a> uses the password-based <a href="https://en.wikipedia.org/wiki/PBKDF2">PBKDF2</a> with 100000 iterations using sha512 (<code>PBKDF2HMACSHA512iter100000</code>).
PBKDF2 is used to additionally rehash the <code>x</code> parameter, obtained using a method similar to the one described in <a href="https://tools.ietf.org/html/rfc2945#section-3">RFC 2945</a> (<code>H(s | H ( I | password | I) | s)</code> instead of <code>H(s | H ( I | ":" | password)</code>) (see below).</p>
<p>Here, <code>|</code> denotes concatenation and <code>+</code> denotes the arithmetical operator <code>+</code>.
In all cases where concatenation of numbers passed to hashing functions is done, the numbers must be used in big-endian form, padded to 2048 bits; all maths is modulo <code>p</code>.
Instead of <code>I</code>, <code>salt1</code> will be used (see <a href="https://en.wikipedia.org/wiki/Secure_Remote_Password_protocol">SRP protocol</a>).
Instead of <code>s</code>, <code>salt2</code> will be used (see <a href="https://en.wikipedia.org/wiki/Secure_Remote_Password_protocol">SRP protocol</a>).</p>
<p>The main hashing function <code>H</code> is sha256:</p>
<ul>
<li><code>H(data) := sha256(data)</code></li>
</ul>
<p>The salting hashing function <code>SH</code> is defined as follows:</p>
<ul>
<li><code>SH(data, salt) := H(salt | data | salt)</code></li>
</ul>
<p>The primary password hashing function is defined as follows:</p>
<ul>
<li><code>PH1(password, salt1, salt2) := SH(SH(password, salt1), salt2)</code></li>
</ul>
<p>The secondary password hashing function is defined as follows:</p>
<ul>
<li><code>PH2(password, salt1, salt2) := SH(pbkdf2(sha512, PH1(password, salt1, salt2), salt1, 100000), salt2)</code></li>
</ul>
<p>Client-side, the following parameters are extracted from the <a href="/constructor/passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow">passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow</a> object, contained in the <a href="/constructor/account.password">account.password</a> object.</p>
<ul>
<li>
<p><code>g := algo.g</code></p>
</li>
<li>
<p><code>p := algo.p</code>
The 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 <code>2^2047 &lt; p &lt; 2^2048</code>), 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 has an inadequate random number generator, it makes sense to use the <strong>secure_random</strong> of account.password as additional seed.</p>
</li>
<li>
<p><code>password := (user-provided password)</code></p>
</li>
<li>
<p><code>salt1 := algo.salt1</code></p>
</li>
<li>
<p><code>salt2 := algo.salt2</code></p>
</li>
<li>
<p><code>g_b := srp_B</code>
<code>srp_B</code> and <code>srp_id</code> are extracted from the <a href="/constructor/account.password">account.password</a> object.</p>
</li>
</ul>
<p>The <code>k</code> parameter is generated, both on client and server:</p>
<ul>
<li><code>k := H(p | g)</code></li>
</ul>
<p>The shared param <code>u</code> is generated: the client does this, and the server does the same with the <code>g_a</code> we will send him later (see below)</p>
<ul>
<li><code>u := H(g_a | g_b)</code></li>
</ul>
<p>The final parameters are generated client-side only:</p>
<ul>
<li><code>x := PH2(password, salt1, salt2)</code></li>
<li><code>v := pow(g, x) mod p</code></li>
</ul>
<p>The server already has <code>v</code>, from when we set the password.</p>
<p>A final shared param is generated, for commodity:</p>
<ul>
<li><code>k_v := (k * v) mod p</code></li>
</ul>
<p>Finally, the <a href="https://en.wikipedia.org/wiki/Secure_Remote_Password_protocol#Protocol">key exchange process</a> starts on both parties.</p>
<p>The client computes a 2048-bit number <strong>a</strong> (using sufficient entropy or the servers <strong>random</strong>; see above) and generates:</p>
<ul>
<li><code>g_a := pow(g, a) mod p</code>.</li>
</ul>
<p>The server computes a 2048-bit number <strong>b</strong> using sufficient entropy and generates the <code>g_b</code> parameter that was sent to us (see above).</p>
<ul>
<li><code>g_b := (k_v + (pow(g, b) mod p)) mod p</code></li>
</ul>
<p>Finally, the <a href="https://en.wikipedia.org/wiki/Secure_Remote_Password_protocol#Protocol">SRP session keys</a> are generated:</p>
<p>Client side: </p>
<ul>
<li><code>t := (g_b - k_v) mod p</code> (positive modulo, if the result is negative increment by <code>p</code>) </li>
<li><code>s_a := pow(t, a + u * x) mod p</code></li>
<li><code>k_a := H(s_a)</code></li>
</ul>
<p>Server side: </p>
<ul>
<li><code>s_b := pow(g_a * (pow(v, u) mod p), b) mod p</code></li>
<li><code>k_b := H(s_b)</code></li>
</ul>
<p>Since:</p>
<ul>
<li><code>g_b := (k_v + (pow(g, b) mod p)) mod p</code></li>
<li><code>t := (g_b - k_v) mod p</code></li>
<li><code>t := ((k_v + (pow(g, b) mod p)) - k_v) mod p</code></li>
<li><code>t := pow(g, b) mod p</code></li>
<li><code>s_a := pow(t, a + u * x) mod p</code></li>
<li><code>s_a := pow(pow(g, b) mod p, a + u * x) mod p</code></li>
</ul>
<p>And:</p>
<ul>
<li>
<p><code>g_a := pow(g, a) mod p</code></p>
</li>
<li>
<p><code>v := pow(g, x) mod p</code></p>
</li>
<li>
<p><code>s_b := pow(g_a * (pow(v, u) mod p), b) mod p</code></p>
</li>
<li>
<p><code>s_b := pow((pow(g, a) mod p) * (pow(pow(g, x) mod p, u) mod p), b) mod p</code></p>
</li>
<li>
<p><code>s_b := pow(pow(g, a + x * u) mod p, b) mod p</code></p>
</li>
<li>
<p><code>s_b := pow(pow(g, b) mod p, a + u * x) mod p</code></p>
</li>
<li>
<p><code>s_a := pow(pow(g, b) mod p, a + u * x) mod p</code></p>
</li>
</ul>
<p>This means:</p>
<ul>
<li><code>s_b === s_a</code></li>
<li><code>k_b === k_a</code></li>
</ul>
<p><strong>Finally, as per SRP</strong>:</p>
<ul>
<li><code>M1 := H(H(p) xor H(g) | H(salt1) | H(salt2) | g_a | g_b | k_a)</code></li>
</ul>
<p><code>M1</code> is passed to <a href="/constructor/inputCheckPasswordSRP">inputCheckPasswordSRP</a>, along with <code>g_a</code> (as <code>A</code> parameter) and the <code>srp_id</code>, extracted from the <a href="/constructor/account.password">account.password</a> object.</p>
<p>The server then computes:</p>
<ul>
<li><code>M2 := H(H(p) xor H(g) | H(salt1) | H(salt2) | g_a | g_b | k_b)</code></li>
</ul>
<p>Since we said that:</p>
<ul>
<li><code>s_b === s_a</code></li>
<li><code>k_b === k_a</code></li>
</ul>
<p>This means, if everything was done correctly,</p>
<ul>
<li><code>M1 === M2</code></li>
</ul>
<p>If the password isn't correct, <a href="/method/auth.checkPassword#possible-errors">400 PASSWORD_HASH_INVALID</a> will be returned.</p>
<h3><a class="anchor" href="#setting-a-new-2fa-password" id="setting-a-new-2fa-password" name="setting-a-new-2fa-password"><i class="anchor-icon"></i></a>Setting a new 2FA password</h3>
<p>To set a new 2FA password use the <a href="/method/account.updatePasswordSettings">account.updatePasswordSettings</a> method.<br>
If a password is already set, generate an InputCheckPasswordSRP object as per <a href="#checking-the-password-with-srp">checking passwords with SRP</a>, and insert it in the <code>password</code> field of the <a href="/method/account.updatePasswordSettings">account.updatePasswordSettings</a> method.<br>
To remove the current password, pass an empty <code>new_password_hash</code> in the <a href="/type/account.PasswordInputSettings">account.PasswordInputSettings</a> object.</p>
<p>To set a new password, use the SRP parameters and the KDF algorithm obtained using <a href="https://core.telegram.org/method/account.getPassword">account.getPassword</a> when generating the <code>password</code> field.
Then generate a new <code>new_password_hash</code> using the KDF algorithm specified in the <code>new_settings</code>, just append 32 sufficiently random bytes to the <code>salt1</code>, first.
Proceed as for <a href="#checking-the-password-with-srp">checking passwords with SRP</a>, just stop at the generation of the <code>v</code> parameter, and use it as <code>new_password_hash</code>:</p>
<ul>
<li><code>v := pow(g, x) mod p</code></li>
</ul>
<p>As usual in big endian form, padded to 2048 bits.</p>
<h4><a class="anchor" href="#email-verification" id="email-verification" name="email-verification"><i class="anchor-icon"></i></a>Email verification</h4>
<p>When setting up two-factor authorization, it is recommended to set up a <strong>recovery email</strong>, to allow recovery of the password through the user's email address, in case they forget it.</p>
<p>To set up a recovery email, it must first be verified.
This can be done directly when setting the new password using <a href="/method/account.updatePasswordSettings">account.updatePasswordSettings</a> by setting the email parameter and flag in the <a href="/constructor/account.passwordInputSettings">account.passwordInputSettings</a> constructor.
If the email isn't verified, an <a href="/method/account.updatePasswordSettings#possible-errors">EMAIL_UNCONFIRMED_X 400 error</a> will be returned, where X is the length of the verification code that was just sent to the email.
Use <a href="/method/account.confirmPasswordEmail">account.confirmPasswordEmail</a> to enter the received verification code and enable the recovery email.
Use <a href="/method/account.resendPasswordEmail">account.resendPasswordEmail</a> to resend the verification code.
Use <a href="/method/account.cancelPasswordEmail">account.cancelPasswordEmail</a> to cancel the verification code.</p>
<p>To get the current recovery email, use <a href="/method/account.getPasswordSettings">account.getPasswordSettings</a>.</p>
<h4><a class="anchor" href="#email-recovery" id="email-recovery" name="email-recovery"><i class="anchor-icon"></i></a>Email recovery</h4>
<p>In order to recover a forgotten 2FA password, an email must be sent to the <a href="#email-verification">previously specified address</a> using the <a href="/method/auth.requestPasswordRecovery">auth.requestPasswordRecovery</a> method.<br>
Use <a href="/method/auth.checkRecoveryPassword">auth.checkRecoveryPassword</a> to make sure that the user provided a valid code.<br>
Then use <a href="/method/auth.recoverPassword">auth.recoverPassword</a> with the received code to delete the current 2FA password, to set a new one follow <a href="/api/srp">these instructions</a>.</p>
<h4><a class="anchor" href="#password-reset" id="password-reset" name="password-reset"><i class="anchor-icon"></i></a>Password reset</h4>
<pre><code><a href='/constructor/account.resetPasswordFailedWait'>account.resetPasswordFailedWait</a>#e3779861 retry_date:<a href='/type/int'>int</a> = <a href='/type/account.ResetPasswordResult'>account.ResetPasswordResult</a>;
<a href='/constructor/account.resetPasswordRequestedWait'>account.resetPasswordRequestedWait</a>#e9effc7d until_date:<a href='/type/int'>int</a> = <a href='/type/account.ResetPasswordResult'>account.ResetPasswordResult</a>;
<a href='/constructor/account.resetPasswordOk'>account.resetPasswordOk</a>#e926d63e = <a href='/type/account.ResetPasswordResult'>account.ResetPasswordResult</a>;
---functions---
<a href='/method/account.resetPassword'>account.resetPassword</a>#9308ce1b = <a href='/type/account.ResetPasswordResult'>account.ResetPasswordResult</a>;
<a href='/method/account.declinePasswordReset'>account.declinePasswordReset</a>#4c9409f6 = <a href='/type/Bool'>Bool</a>;</code></pre>
<p>If the user is already logged in and has forgotten their 2FA password, <a href="/method/account.resetPassword">account.resetPassword</a> can be used to initiate a password reset.<br>
On success, the call will initially return a <a href="/constructor/account.resetPasswordRequestedWait">account.resetPasswordRequestedWait</a> constructor and start a 7-day server-side timer, during which the user can abort the reset process using a button sent by the Telegram service account or directly in-UI using <a href="/method/account.declinePasswordReset">account.declinePasswordReset</a>. </p>
<p>When the time comes, <a href="/method/account.resetPassword">account.resetPassword</a> is invoked once more, returning a <a href="/constructor/account.resetPasswordOk">account.resetPasswordOk</a> to indicate that the password was successfully reset. </p>
<p>If the user recently requested a password reset that was canceled, <a href="/constructor/account.resetPasswordFailedWait">account.resetPasswordFailedWait</a> will be returned by the initial <a href="/method/account.resetPassword">account.resetPassword</a> call, and they must wait until the specified date before requesting another reset. </p>
<p>Note that if the user already knows their 2FA password and simply wants to disable 2FA, <a href="#setting-a-new-2fa-password">the same process used to enable the password must also be used to disable it »</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="#srp-design" id="srp-design" name="srp-design"><i class="anchor-icon"></i></a><a href="http://srp.stanford.edu/design.html">SRP design</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 src="/js/jquery.min.js?1"></script>
<script src="/js/bootstrap.min.js?1"></script>
<script>window.initDevPageNav&&initDevPageNav();
backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>

View file

@ -1,170 +0,0 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>botInlineMessageText</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Send a simple text message">
<meta property="og:title" content="botInlineMessageText">
<meta property="og:image" content="">
<meta property="og:description" content="Send a simple text message">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<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/botInlineMessageText" >botInlineMessageText</a></li></ul></div>
<h1 id="dev_page_title">botInlineMessageText</h1>
<div id="dev_page_content"><p>Send a simple text message</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
<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 &ndash; Base layer</a></li><li><a href="?layer=2">2 &ndash; New userpic notifications</a></li><li><a href="?layer=3">3 &ndash; Send message can trigger link change</a></li><li><a href="?layer=4">4 &ndash; Check-in chats</a></li><li><a href="?layer=5">5 &ndash; Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 &ndash; Foursquare integration</a></li><li><a href="?layer=7">7 &ndash; Added wallPaperSolid</a></li><li><a href="?layer=8">8 &ndash; Added end-to-end encryption</a></li><li><a href="?layer=9">9 &ndash; Improved big files upload perfomance</a></li><li><a href="?layer=10">10 &ndash; Improved chat participants updates</a></li><li><a href="?layer=11">11 &ndash; Improved secret chats</a></li><li><a href="?layer=12">12 &ndash; New dynamic support</a></li><li><a href="?layer=13">13 &ndash; Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 &ndash; Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 &ndash; Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 &ndash; Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 &ndash; Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 &ndash; Added usernames</a></li><li><a href="?layer=23">23 &ndash; Stickers for secret chats</a></li><li><a href="?layer=105">105 &ndash; Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 &ndash; Login with QR code</a></li><li><a href="?layer=109">109 &ndash; Polls v2</a></li><li><a href="?layer=110">110 &ndash; People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 &ndash; Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 &ndash; Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 &ndash; PSA</a></li><li><a href="?layer=114">114 &ndash; Video thumbs for GIFs</a></li><li><a href="?layer=115">115 &ndash; Peek Channel Invite</a></li><li><a href="?layer=116">116 &ndash; Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 &ndash; WebRTC Phone Calls</a></li><li><a href="?layer=118">118 &ndash; Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 &ndash; Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 &ndash; Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121">121 &ndash; SVG-based Outlines for Stickers</a></li><li><a href="?layer=122">122 &ndash; Voice Chats</a></li><li><a href="?layer=123">123 &ndash; Voice Chat improvements</a></li><li><a href="?layer=124">124 &ndash; Expiring Invite links</a></li><li><a href="?layer=125">125 &ndash; Voice Chats in Broadcasts</a></li><li><a href="?layer=126">126 &ndash; Ban channels in channels</a></li><li><a href="?layer=127">127 &ndash; Payments in channels</a></li><li><a href="?layer=128">128 &ndash; Microthumbs for User/Chat profile photos</a></li><li><a href="?layer=129">129 &ndash; Video Chats</a></li><li><a href="?layer=130">130 &ndash; Custom placeholder for bot reply keyboards</a></li><li><a href="?layer=131">131 &ndash; Reset 2FA Password after a week</a></li><li><a href="?layer=132">132 &ndash; Chat themes</a></li><li><a href="?layer=133"><strong>133 &ndash; 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/botInlineMessageText" class="current_page_link" >botInlineMessageText</a>#8c7f65e2 flags:<a href="/type/%23" >#</a> no_webpage:flags.0?true message:<a href="/type/string" >string</a> entities:flags.1?<a href="/type/Vector%20t" >Vector</a>&lt;<a href="/type/MessageEntity" >MessageEntity</a>&gt; reply_markup:flags.2?<a href="/type/ReplyMarkup" >ReplyMarkup</a> = <a href="/type/BotInlineMessage" >BotInlineMessage</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<table class="table">
<thead>
<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>no_webpage</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.0?<a href="/constructor/true">true</a></td>
<td>Disable webpage preview</td>
</tr>
<tr>
<td><strong>message</strong></td>
<td style="text-align: center;"><a href="/type/string">string</a></td>
<td>The message</td>
</tr>
<tr>
<td><strong>entities</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.1?<a href="/type/Vector%20t">Vector</a>&lt;<a href="/type/MessageEntity">MessageEntity</a>&gt;</td>
<td><a href="/api/entities">Message entities for styled text</a></td>
</tr>
<tr>
<td><strong>reply_markup</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.2?<a href="/type/ReplyMarkup">ReplyMarkup</a></td>
<td>Inline keyboard</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/BotInlineMessage">BotInlineMessage</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#styled-text-with-message-entities" id="styled-text-with-message-entities" name="styled-text-with-message-entities"><i class="anchor-icon"></i></a><a href="/api/entities">Styled text with message entities</a></h4>
<p>How to create styled text with message entities</p></div>
</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>

View file

@ -1,162 +0,0 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>inputMessageEntityMentionName</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Message entity that can be used to create a user user mention: received mentions use the messageEntityMentionName constructor, instead.">
<meta property="og:title" content="inputMessageEntityMentionName">
<meta property="og:image" content="">
<meta property="og:description" content="Message entity that can be used to create a user user mention: received mentions use the messageEntityMentionName constructor, instead.">
<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/inputMessageEntityMentionName" >inputMessageEntityMentionName</a></li></ul></div>
<h1 id="dev_page_title">inputMessageEntityMentionName</h1>
<div id="dev_page_content"><p>Message entity that can be used to create a user <a href="/api/mentions">user mention</a>: received mentions use the <a href="/constructor/messageEntityMentionName">messageEntityMentionName</a> constructor, instead.</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 &ndash; Base layer</a></li><li><a href="?layer=2">2 &ndash; New userpic notifications</a></li><li><a href="?layer=3">3 &ndash; Send message can trigger link change</a></li><li><a href="?layer=4">4 &ndash; Check-in chats</a></li><li><a href="?layer=5">5 &ndash; Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 &ndash; Foursquare integration</a></li><li><a href="?layer=7">7 &ndash; Added wallPaperSolid</a></li><li><a href="?layer=8">8 &ndash; Added end-to-end encryption</a></li><li><a href="?layer=9">9 &ndash; Improved big files upload perfomance</a></li><li><a href="?layer=10">10 &ndash; Improved chat participants updates</a></li><li><a href="?layer=11">11 &ndash; Improved secret chats</a></li><li><a href="?layer=12">12 &ndash; New dynamic support</a></li><li><a href="?layer=13">13 &ndash; Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 &ndash; Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 &ndash; Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 &ndash; Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 &ndash; Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 &ndash; Added usernames</a></li><li><a href="?layer=23">23 &ndash; Stickers for secret chats</a></li><li><a href="?layer=105">105 &ndash; Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 &ndash; Login with QR code</a></li><li><a href="?layer=109">109 &ndash; Polls v2</a></li><li><a href="?layer=110">110 &ndash; People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 &ndash; Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 &ndash; Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 &ndash; PSA</a></li><li><a href="?layer=114">114 &ndash; Video thumbs for GIFs</a></li><li><a href="?layer=115">115 &ndash; Peek Channel Invite</a></li><li><a href="?layer=116">116 &ndash; Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 &ndash; WebRTC Phone Calls</a></li><li><a href="?layer=118">118 &ndash; Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 &ndash; Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 &ndash; Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121">121 &ndash; SVG-based Outlines for Stickers</a></li><li><a href="?layer=122">122 &ndash; Voice Chats</a></li><li><a href="?layer=123">123 &ndash; Voice Chat improvements</a></li><li><a href="?layer=124">124 &ndash; Expiring Invite links</a></li><li><a href="?layer=125">125 &ndash; Voice Chats in Broadcasts</a></li><li><a href="?layer=126">126 &ndash; Ban channels in channels</a></li><li><a href="?layer=127">127 &ndash; Payments in channels</a></li><li><a href="?layer=128">128 &ndash; Microthumbs for User/Chat profile photos</a></li><li><a href="?layer=129">129 &ndash; Video Chats</a></li><li><a href="?layer=130">130 &ndash; Custom placeholder for bot reply keyboards</a></li><li><a href="?layer=131">131 &ndash; Reset 2FA Password after a week</a></li><li><a href="?layer=132">132 &ndash; Chat themes</a></li><li><a href="?layer=133"><strong>133 &ndash; 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/inputMessageEntityMentionName" class="current_page_link" >inputMessageEntityMentionName</a>#208e68c9 offset:<a href="/type/int" >int</a> length:<a href="/type/int" >int</a> user_id:<a href="/type/InputUser" >InputUser</a> = <a href="/type/MessageEntity" >MessageEntity</a>;</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>offset</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>Offset of message entity within message (in UTF-8 codepoints)</td>
</tr>
<tr>
<td><strong>length</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>Length of message entity within message (in UTF-8 codepoints)</td>
</tr>
<tr>
<td><strong>user_id</strong></td>
<td style="text-align: center;"><a href="/type/InputUser">InputUser</a></td>
<td>Identifier of the user that was mentioned</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/MessageEntity">MessageEntity</a></p>
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
<h4><a class="anchor" href="#mentions" id="mentions" name="mentions"><i class="anchor-icon"></i></a><a href="/api/mentions">Mentions</a></h4>
<p>Telegram allows mentioning other users in case of urgent duckling matters, and quickly navigating to those mentions in order to read them as swiftly as possible.</p>
<h4><a class="anchor" href="#messageentitymentionname" id="messageentitymentionname" name="messageentitymentionname"><i class="anchor-icon"></i></a><a href="/constructor/messageEntityMentionName">messageEntityMentionName</a></h4>
<p>Message entity representing a <a href="/api/mentions">user mention</a>: for <em>creating</em> a mention use <a href="/constructor/inputMessageEntityMentionName">inputMessageEntityMentionName</a>.</p></div>
</div>
</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>

View file

@ -1,152 +0,0 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>inputPaymentCredentialsSaved</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Saved payment credentials">
<meta property="og:title" content="inputPaymentCredentialsSaved">
<meta property="og:image" content="">
<meta property="og:description" content="Saved payment credentials">
<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/inputPaymentCredentialsSaved" >inputPaymentCredentialsSaved</a></li></ul></div>
<h1 id="dev_page_title">inputPaymentCredentialsSaved</h1>
<div id="dev_page_content"><p>Saved payment credentials</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 &ndash; Base layer</a></li><li><a href="?layer=2">2 &ndash; New userpic notifications</a></li><li><a href="?layer=3">3 &ndash; Send message can trigger link change</a></li><li><a href="?layer=4">4 &ndash; Check-in chats</a></li><li><a href="?layer=5">5 &ndash; Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 &ndash; Foursquare integration</a></li><li><a href="?layer=7">7 &ndash; Added wallPaperSolid</a></li><li><a href="?layer=8">8 &ndash; Added end-to-end encryption</a></li><li><a href="?layer=9">9 &ndash; Improved big files upload perfomance</a></li><li><a href="?layer=10">10 &ndash; Improved chat participants updates</a></li><li><a href="?layer=11">11 &ndash; Improved secret chats</a></li><li><a href="?layer=12">12 &ndash; New dynamic support</a></li><li><a href="?layer=13">13 &ndash; Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 &ndash; Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 &ndash; Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 &ndash; Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 &ndash; Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 &ndash; Added usernames</a></li><li><a href="?layer=23">23 &ndash; Stickers for secret chats</a></li><li><a href="?layer=105">105 &ndash; Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 &ndash; Login with QR code</a></li><li><a href="?layer=109">109 &ndash; Polls v2</a></li><li><a href="?layer=110">110 &ndash; People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 &ndash; Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 &ndash; Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 &ndash; PSA</a></li><li><a href="?layer=114">114 &ndash; Video thumbs for GIFs</a></li><li><a href="?layer=115">115 &ndash; Peek Channel Invite</a></li><li><a href="?layer=116">116 &ndash; Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 &ndash; WebRTC Phone Calls</a></li><li><a href="?layer=118">118 &ndash; Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 &ndash; Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 &ndash; Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121">121 &ndash; SVG-based Outlines for Stickers</a></li><li><a href="?layer=122">122 &ndash; Voice Chats</a></li><li><a href="?layer=123">123 &ndash; Voice Chat improvements</a></li><li><a href="?layer=124">124 &ndash; Expiring Invite links</a></li><li><a href="?layer=125">125 &ndash; Voice Chats in Broadcasts</a></li><li><a href="?layer=126">126 &ndash; Ban channels in channels</a></li><li><a href="?layer=127">127 &ndash; Payments in channels</a></li><li><a href="?layer=128">128 &ndash; Microthumbs for User/Chat profile photos</a></li><li><a href="?layer=129">129 &ndash; Video Chats</a></li><li><a href="?layer=130">130 &ndash; Custom placeholder for bot reply keyboards</a></li><li><a href="?layer=131">131 &ndash; Reset 2FA Password after a week</a></li><li><a href="?layer=132">132 &ndash; Chat themes</a></li><li><a href="?layer=133"><strong>133 &ndash; 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/inputPaymentCredentialsSaved" class="current_page_link" >inputPaymentCredentialsSaved</a>#c10eb2cf id:<a href="/type/string" >string</a> tmp_password:<a href="/type/bytes" >bytes</a> = <a href="/type/InputPaymentCredentials" >InputPaymentCredentials</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<table class="table">
<thead>
<tr>
<th>Name</th>
<th style="text-align: center;">Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>id</strong></td>
<td style="text-align: center;"><a href="/type/string">string</a></td>
<td>Credential ID</td>
</tr>
<tr>
<td><strong>tmp_password</strong></td>
<td style="text-align: center;"><a href="/type/bytes">bytes</a></td>
<td>Temporary password</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/InputPaymentCredentials">InputPaymentCredentials</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>

View file

@ -1,160 +0,0 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>inputUserFromMessage</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Defines a min user that was seen in a certain message of a certain chat.">
<meta property="og:title" content="inputUserFromMessage">
<meta property="og:image" content="">
<meta property="og:description" content="Defines a min user that was seen in a certain message of a certain 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/inputUserFromMessage" >inputUserFromMessage</a></li></ul></div>
<h1 id="dev_page_title">inputUserFromMessage</h1>
<div id="dev_page_content"><p>Defines a <a href="/api/min">min</a> user that was seen in a certain message of a certain 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 &ndash; Base layer</a></li><li><a href="?layer=2">2 &ndash; New userpic notifications</a></li><li><a href="?layer=3">3 &ndash; Send message can trigger link change</a></li><li><a href="?layer=4">4 &ndash; Check-in chats</a></li><li><a href="?layer=5">5 &ndash; Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 &ndash; Foursquare integration</a></li><li><a href="?layer=7">7 &ndash; Added wallPaperSolid</a></li><li><a href="?layer=8">8 &ndash; Added end-to-end encryption</a></li><li><a href="?layer=9">9 &ndash; Improved big files upload perfomance</a></li><li><a href="?layer=10">10 &ndash; Improved chat participants updates</a></li><li><a href="?layer=11">11 &ndash; Improved secret chats</a></li><li><a href="?layer=12">12 &ndash; New dynamic support</a></li><li><a href="?layer=13">13 &ndash; Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 &ndash; Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 &ndash; Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 &ndash; Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 &ndash; Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 &ndash; Added usernames</a></li><li><a href="?layer=23">23 &ndash; Stickers for secret chats</a></li><li><a href="?layer=105">105 &ndash; Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 &ndash; Login with QR code</a></li><li><a href="?layer=109">109 &ndash; Polls v2</a></li><li><a href="?layer=110">110 &ndash; People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 &ndash; Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 &ndash; Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 &ndash; PSA</a></li><li><a href="?layer=114">114 &ndash; Video thumbs for GIFs</a></li><li><a href="?layer=115">115 &ndash; Peek Channel Invite</a></li><li><a href="?layer=116">116 &ndash; Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 &ndash; WebRTC Phone Calls</a></li><li><a href="?layer=118">118 &ndash; Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 &ndash; Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 &ndash; Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121">121 &ndash; SVG-based Outlines for Stickers</a></li><li><a href="?layer=122">122 &ndash; Voice Chats</a></li><li><a href="?layer=123">123 &ndash; Voice Chat improvements</a></li><li><a href="?layer=124">124 &ndash; Expiring Invite links</a></li><li><a href="?layer=125">125 &ndash; Voice Chats in Broadcasts</a></li><li><a href="?layer=126">126 &ndash; Ban channels in channels</a></li><li><a href="?layer=127">127 &ndash; Payments in channels</a></li><li><a href="?layer=128">128 &ndash; Microthumbs for User/Chat profile photos</a></li><li><a href="?layer=129">129 &ndash; Video Chats</a></li><li><a href="?layer=130">130 &ndash; Custom placeholder for bot reply keyboards</a></li><li><a href="?layer=131">131 &ndash; Reset 2FA Password after a week</a></li><li><a href="?layer=132">132 &ndash; Chat themes</a></li><li><a href="?layer=133"><strong>133 &ndash; 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/inputUserFromMessage" class="current_page_link" >inputUserFromMessage</a>#1da448e2 peer:<a href="/type/InputPeer" >InputPeer</a> msg_id:<a href="/type/int" >int</a> user_id:<a href="/type/long" >long</a> = <a href="/type/InputUser" >InputUser</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 where the user was seen</td>
</tr>
<tr>
<td><strong>msg_id</strong></td>
<td style="text-align: center;"><a href="/type/int">int</a></td>
<td>The message ID</td>
</tr>
<tr>
<td><strong>user_id</strong></td>
<td style="text-align: center;"><a href="/type/long">long</a></td>
<td>The identifier of the user that was seen</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/InputUser">InputUser</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></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>

View file

@ -1,198 +0,0 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>Getting started with TDLib</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="TDLib is a fully functional Telegram client which takes care of all networking, local storage and data consistency details.…">
<meta property="og:title" content="Getting started with TDLib">
<meta property="og:image" content="">
<meta property="og:description" content="TDLib is a fully functional Telegram client which takes care of all networking, local storage and data consistency details.…">
<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" >Telegram Database Library</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/tdlib/getting-started" >Getting started</a></li></ul></div>
<h1 id="dev_page_title">Getting started with TDLib</h1>
<div id="dev_page_content"><!-- scroll_nav -->
<p><strong>TDLib</strong> is a fully functional Telegram client which takes care of all networking, local storage and data consistency details. In this tutorial we describe the main concepts understanding of which is required for efficient TDLib usage.</p>
<h3><a class="anchor" name="tdlib-interface" href="#tdlib-interface"><i class="anchor-icon"></i></a>TDLib interface</h3>
<p>In this text, <em>Client</em> means an interface for interaction with a TDLib instance and <em>Application</em> means the program that uses TDLib to interact with Telegram.</p>
<p>The main TDLib API is fully-asyncronous. An <em>Application</em> can send a request to TDLib through <code>ClientManager.send</code> method and receive a response asynchronously through the <code>ClientManager.receive</code> method when it becomes available. The exact naming of these methods and the way in which requests are matched with responses is different for different TDLib interfaces, but the concept as a whole remains the same. For example, in <em>TDLib</em> <a href="https://core.telegram.org/tdlib/docs/td__json__client_8h.html"><em>JSON</em></a> interface these methods are called <code>td_send</code> and <code>td_receive</code>, and their <em>@extra</em> field must be used to match requests with the corresponding responses.</p>
<p>In a high-level interface used by an <em>Application</em> the matching of responses with corresponding requests is often automated and transformed by some wrapper into a call to a continuation, a callback, a Promise or a Future to simplify the handling of responses.</p>
<p>Aside from responses to requests, an <em>Application</em> receives a lot of important data through incoming <a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1_update.html"><em>updates</em></a>. <em>Updates</em> are used to pass new data from TDLib to the <em>Application</em> and often control the behavior of the <em>Application</em>, leaving no chance to implement something wrong. The correct handling of <em>updates</em> is crucial for creating an <em>Application</em> that is efficient and works correctly.</p>
<blockquote>
<p>You can find a <a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1_function.html">list of all available TDLib API methods</a> in our web-documentation. You can also find the descriptions of all available TDLib methods and classes in the <a href="https://github.com/tdlib/td/blob/master/td/generate/scheme/td_api.tl">TDLIB API scheme</a>.</p>
<p>TDLib can be used from any programming language. You can find a lot of examples of TDLib-based frameworks in various programming languages in our <a href="https://github.com/tdlib/td/tree/master/example#readme">examples section</a>.</p>
</blockquote>
<h3><a class="anchor" name="tdlib-glossary" href="#tdlib-glossary"><i class="anchor-icon"></i></a>TDLib glossary</h3>
<p>This section describes the basic notions required for understanding the <em>TDLib API</em>. If you have used the TDLib-based <a href="https://core.telegram.org/bots/api">Telegram Bot API</a> most of them should be already familiar to you.</p>
<p>Telegram is a messenger, so the main object is a <a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1message.html"><em>message</em></a>. Each <em>message</em> belongs to some <a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1chat.html">chat</a> and has a unique identifier within that <em>chat</em>. <em>Messages</em> inside a <em>chat</em> must be sorted by that identifier. Telegram supports many different kinds of <em>messages</em>, so a <em>message</em> can have many different kinds of <a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1_message_content.html"><em>message content</em></a>. Currently there are more than 45 different kinds of <em>message content</em>, for example <a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1message_text.html"><em>messageText</em></a> for text messages, <a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1message_photo.html"><em>messagePhoto</em></a> for photos, or <a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1message_screenshot_taken.html"><em>messageScreenshotTaken</em></a> for notifications about screenshots taken by the other party.</p>
<p>A Telegram user is called <a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1user.html"><em>user</em></a>. Each <em>user</em> has a unique identifier and a <em>first name</em>, and can also have an optional <em>last name</em>, <em>username</em> and <a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1profile_photo.html"><em>profile photo</em></a> among other useful fields. <em>Bot</em> is a special <a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1user_type_bot.html">type</a> of <em>user</em> which can be controlled through the <a href="https://core.telegram.org/bots/api">Telegram Bot API</a>.</p>
<p>Each <em>chat</em> has <a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1chat_member.html"><em>members</em></a>, i.e. <em>users</em> that immediately receive all <em>messages</em> sent to the <em>chat</em>. Currently there are <strong>6</strong> possible <a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1_chat_member_status.html">chat member statuses</a> which describe different rights and restrictions a <em>user</em> can have in a <em>chat</em>, ranging from the <a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1chat_member_status_creator.html">owner of the chat</a> who has more rights in the <em>chat</em> than any other <em>user</em>, to a <a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1chat_member_status_banned.html">user banned in the chat</a> who is <em>banned</em> in the <em>chat</em> and can&#39;t return to it by self or even view <em>chat messages</em>, even if the <em>chat</em> is <em>public</em>.</p>
<p>As noted earlier, each <em>message</em> belongs to a <a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1chat.html">chat</a>. Currently there are <strong>4</strong> different <a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1_chat_type.html">types</a> of <em>chats</em> on Telegram:</p>
<ul>
<li><a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1chat_type_private.html">Private chats</a> are ordinary one-to-one chats with another <em>user</em> (or with oneself in the case of the special “Saved messages” chat).</li>
<li><a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1chat_type_basic_group.html">Basic groups</a> are basic groups with 0-200 <em>members</em>. Every <em>basic group</em> <em>member</em> has their own copy of the message history, so new <em>basic group</em> <em>members</em> may not see older <em>messages</em> (unless another user forwards their own copy to them).</li>
<li><a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1chat_type_supergroup.html">Supergroups</a> are groups with up to 200000 <em>members</em> who share a common message history, so new <em>supergroup</em> <em>members</em> can see all the previously sent <em>messages</em> (unless this is explicitly forbidden by the <em>chat creator</em>). There are special kinds of <em>supergroups</em>, called <em>broadcast groups</em> and <em>channels</em>, which can have an unlimited number of members and where only the <em>chat creator</em> and some <em>chat administrators</em> can write. All other <em>chat members</em> can only read <em>messages</em> in <em>channel</em> and <em>broadcast group</em> chats.</li>
<li><a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1chat_type_secret.html">Secret chats</a> are end-to-end encrypted one-to-one <em>chats</em> with another <em>user</em>, available only on the device which was used to initiate and accept the chat.</li>
</ul>
<p>Each chat has a unique identifier, a <em>title</em> and an optional <a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1chat_photo.html">chat photo</a>. Chats comprise sorted lists shown to the user, <a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1chat_position.html">position</a> in which is determined, roughly speaking, by the time of latest activity. The correct order of chats in chat lists is maintained by TDLib, so the <em>Application</em> only needs to listen to updates that change the <code>chat.positions</code> field and sort all chats by the pair <code>(position.order, chat.id)</code> in a given <code>position.list</code>.</p>
<p><em>Messages</em>, <em>chat photos</em> and many other objects can have a <a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1file.html"><em>file</em></a> inside of them. Each <em>file</em> has an identifier and may be available <a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1local_file.html">locally</a> on a local storage or <a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1remote_file.html">remotely</a> on a cloud server. A <em>file</em> can be usually <em>downloaded</em> to the local storage or <em>uploaded</em> to Telegram cloud servers.</p>
<p><em>Messages</em> with media content like <em>photos</em> or <em>videos</em> can have a short accompanying text called <em>caption</em>. The texts of text messages and media captions can contain fragments, which must be formatted in some unusual way. These fragments are called <a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1text_entity.html"><em>text entities</em></a> and the combination of a <em>text</em> and its <em>entities</em> are referred together as a <a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1formatted_text.html"><em>formatted text</em></a>.</p>
<p>TDLib sends a lot of important data to the <em>Application</em> through <em>updates</em>. For example, if there is a user unknown to the <em>Application</em>, or some data about a user has changed, then TDLib immediately sends an <a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1update_user.html"><em>updateUser</em></a> to the <em>Application</em>.</p>
<blockquote>
<p>You can find list of all currently available updates <a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1_update.html">here »</a></p>
</blockquote>
<h3><a class="anchor" name="user-authorization" href="#user-authorization"><i class="anchor-icon"></i></a>User authorization</h3>
<p>Authorization is an example of a behavior, which is controlled by <em>TDLib</em> through <em>updates</em>. Whenever an action is required to proceed with user authorization, the <em>Application</em> receives an <a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1update_authorization_state.html"><em>updateAuthorizationState</em></a> with the description of the current <a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1_authorization_state.html"><em>AuthorizationState</em></a>. The <em>Application</em> only needs to handle this <em>update</em> appropriately to correctly implement user authorization.</p>
<p>The first <em>authorization state</em> received by the <em>Application</em> is always of the type <code>authorizationStateWaitTdlibParameters</code>. When it is received, the <em>Application</em> must provide parameters for <em>TDLib</em> initialization by calling the <a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1set_tdlib_parameters.html"><em>setTdlibParameters</em></a> method. In this method the <em>Application</em> will need to specify, among other parameters:</p>
<ul>
<li>api_id — <em>Application</em> identifier for accessing the Telegram API, which can be obtained at https://my.telegram.org.</li>
<li>api_hash — Hash of the <em>Application</em> identifier for accessing the Telegram API, which can be obtained at https://my.telegram.org.</li>
<li>database_directory — The path to the directory on the local disk where the <em>TDLib</em> database is to be stored; must point to a writable directory.</li>
<li>use_message_database — If set to true, the library will maintain a local cache of <em>chats</em> and <em>messages</em>.</li>
<li>use_secret_chats — If set to true, support for <em>secret chats</em> will be enabled.</li>
<li>system_language_code — IETF language tag of the <em>user</em>&#39;s operating system language, like “en-GB”.</li>
<li>device_model — Model of the device the <em>Application</em> is being run on, like “iPhone Z”.</li>
</ul>
<p>After call to <code>setTdlibParameters</code> in case of success <em>Application</em> will receive <code>updateAuthorizationState</code> with new state and just needs to handle that update, nothing should be done explicitly. If <code>setTdlibParameters</code> fails, then authorization state is not changed and the <em>Application</em> must try to handle the current <em>authorization state</em> again.</p>
<p>The second received authorization state is always <code>authorizationStateWaitEncryptionKey</code>. When it is received, the database encryption key must be provided through a call to <code>checkDatabaseEncryptionKey</code>. For most mobile apps, you can provide an empty database encryption key here (<a href="https://github.com/tdlib/td/issues/188#issuecomment-379536139">more info</a>). If user isn&#39;t authorized yet, then some of <code>authorizationStateWaitPhoneNumber</code>, <code>authorizationStateWaitCode</code>, <code>authorizationStateWaitRegistration</code> and <code>authorizationStateWaitPassword</code> <em>authorization states</em> may be received. After completing these authorization steps, the <em>Application</em> will receive <code>authorizationStateReady</code>, meaning that authorization was successful and ordinary requests can be sent now.</p>
<blockquote>
<p>You can find complete examples of <em>user</em> authorization in our <a href="https://github.com/tdlib/td/blob/b3ab664a18f8611f4dfcd3054717504271eeaa7a/example/java/org/drinkless/tdlib/example/Example.java#L97">Java</a> and <a href="https://github.com/tdlib/td/blob/b3ab664a18f8611f4dfcd3054717504271eeaa7a/example/csharp/TdExample.cs#L62">C#</a> examples.</p>
</blockquote>
<h3><a class="anchor" name="sending-a-message" href="#sending-a-message"><i class="anchor-icon"></i></a>Sending a message</h3>
<p>To send any kind of <em>message</em>, the <em>Application</em> needs to call the method <a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1send_message.html">sendMessage</a> providing a <code>chat</code> identifier and the <a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1_input_message_content.html">content of the message to be sent</a>. For example, the <em>Application</em> can send a <em>text message</em> using <a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1input_message_text.html">inputMessageText</a> class as input message content, a <em>photo</em> using <a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1input_message_photo.html">inputMessagePhoto</a>, or a <em>location</em> using <a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1input_message_location.html">inputMessageLocation</a>. The <em>Application</em> can use <a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1input_file_local.html">inputFileLocal</a> as <a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1_input_file.html">InputFile</a> in these objects to send a local file from the local storage.</p>
<blockquote>
<p>You can find examples of sending a <em>text message</em> in our <a href="https://github.com/tdlib/td/blob/b3ab664a18f8611f4dfcd3054717504271eeaa7a/example/java/org/drinkless/tdlib/example/Example.java#L296">Java</a> and <a href="https://github.com/tdlib/td/blob/b3ab664a18f8611f4dfcd3054717504271eeaa7a/example/csharp/TdExample.cs#L207">C#</a> examples.</p>
</blockquote>
<h3><a class="anchor" name="handling-updates" href="#handling-updates"><i class="anchor-icon"></i></a>Handling updates</h3>
<p>All updates and responses to requests must be handled in the order they are received. Here is a list of the most important updates and how they must be handled:</p>
<ul>
<li><a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1update_authorization_state.html">updateAuthorizationState</a> — The handling of this update is essential for correct <a href="#user-authorization">user authorization</a>.</li>
<li><a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1update_new_chat.html">updateNewChat</a> — This update is received whenever a new <em>chat</em> is discovered. This update is guaranteed to come before the <em>chat</em> identifier is returned to the <em>Application</em>. So, whenever an <em>Application</em> receives a <code>chat_id</code>, it never needs to use a <code>getChat</code> request to receive the <em>chat</em> object. Instead it must maintain a cache of <em>chats</em> received through this update and take all the necessary data about <em>chats</em> from this cache.</li>
<li><a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1update_user.html">updateUser</a> — This update is received whenever a new <em>user</em> has been discovered or some data about a known <em>user</em> has changed. This update is guaranteed to come before the <em>user</em> identifier is returned to the <em>Application</em>. So, whenever an <em>Application</em> receives a <code>user_id</code>, it never needs to use the <code>getUser</code> request to receive the <em>user</em> object. Instead it must maintain a cache of <em>users</em> received through this update and take all the necessary data about <em>users</em> from this cache.</li>
<li><a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1update_basic_group.html">updateBasicGroup</a> — This update is received whenever a new <em>basic group</em> has been discovered or some data about a known <em>basic group</em> has changed. This update is guaranteed to come before the <em>basic group</em> identifier is returned to the <em>Application</em>. So, whenever an <em>Application</em> receives a <code>basic_group_id</code>, it never needs to use the <code>getBasicGroup</code> request to receive the <code>basicGroup</code> object. Instead it must maintain a cache of <em>basic groups</em> received through this update and take all the necessary data about <em>basic groups</em> from this cache.</li>
<li><a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1update_supergroup.html">updateSupergroup</a> — This update is received whenever a new <em>supergroup</em> has been discovered or some data about a known <em>supergroup</em> has changed. This update is guaranteed to come before the <em>supergroup</em> identifier is returned to the <em>Application</em>. So, whenever an <em>Application</em> receives a <code>supergroup_id</code>, it never needs to use the <code>getSupergroup</code> request to receive the <em>supergroup</em> object. Instead it must maintain a cache of <em>supergroups</em> received through this update and take all the necessary data about <em>supergroups</em> from this cache.</li>
<li><a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1update_secret_chat.html">updateSecretChat</a> — This update is received whenever a new <em>secret chat</em> has been discovered or some data about a known <em>secret chat</em> has changed. This update is guaranteed to come before the <em>secret chat</em> identifier is returned to the <em>Application</em>. So, whenever an <em>Application</em> receives a <code>secret_chat_id</code>, it never needs to use the <code>getSecretChat</code> request to receive the <em>secret chat</em> object. Instead it must maintain a cache of <em>secret chats</em> received through this update and take all the necessary data about <em>secret chats</em> from this cache.</li>
<li><a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1update_new_message.html">updateNewMessage</a> — This update is received whenever a new <em>message</em> is added to a <em>chat</em>.</li>
<li><a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1update_message_send_succeeded.html">updateMessageSendSucceeded</a> — This update is received whenever a <em>message</em> is successfully sent.</li>
<li><a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1update_message_content.html">updateMessageContent</a> — This update is received whenever the <em>content</em> of a <em>message</em> changes.</li>
<li><a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1update_file.html">updateFile</a> — This update is received whenever information about a file is updated. The handling of this update is essential to follow the progress of files being downloaded or uploaded.</li>
<li><a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1update_chat_title.html">updateChatTitle</a>, <a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1update_chat_photo.html">updateChatPhoto</a>, <a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1update_chat_permissions.html">updateChatPermissions</a>, <a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1update_chat_last_message.html">updateChatLastMessage</a>, <a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1update_chat_position.html">updateChatPosition</a>, <a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1update_chat_read_inbox.html">updateChatReadInbox</a>, <a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1update_chat_read_outbox.html">updateChatReadOutbox</a>, <a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1update_chat_action_bar.html">updateChatActionBar</a>, <a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1update_chat_draft_message.html">updateChatDraftMessage</a>, <a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1update_chat_message_sender.html">updateChatMessageSender</a>, <a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1update_chat_message_ttl.html">updateChatMessageTtl</a>, <a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1update_chat_notification_settings.html">updateChatNotificationSettings</a>, <a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1update_chat_pending_join_requests.html">updateChatPendingJoinRequests</a>, <a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1update_chat_reply_markup.html">updateChatReplyMarkup</a>, <a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1update_chat_theme.html">updateChatTheme</a>, <a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1update_chat_unread_mention_count.html">updateChatUnreadMentionCount</a>, <a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1update_chat_video_chat.html">updateChatVideoChat</a>, <a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1update_chat_default_disable_notification.html">updateChatDefaultDisableNotification</a>, <a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1update_chat_has_protected_content.html">updateChatHasProtectedContent</a>, <a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1update_chat_has_scheduled_messages.html">updateChatHasScheduledMessages</a>, <a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1update_chat_is_blocked.html">updateChatIsBlocked</a>, <a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1update_chat_is_marked_as_unread.html">updateChatIsMarkedAsUnread</a> — These updates are received whenever some information about a <em>chat</em> changes, the <em>chats</em> cache must be updated accordingly</li>
</ul>
<blockquote>
<p>For a full list of currently available <em>updates</em> see the documentation for the <a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1_update.html">Update</a> class.</p>
<p>You can find an example of correct handling of some <em>updates</em> in our <a href="https://github.com/tdlib/td/blob/b3ab664a18f8611f4dfcd3054717504271eeaa7a/example/java/org/drinkless/tdlib/example/Example.java#L370">Java</a> example.</p>
</blockquote>
<h3><a class="anchor" name="getting-the-lists-of-chats" href="#getting-the-lists-of-chats"><i class="anchor-icon"></i></a>Getting the lists of chats</h3>
<p>Currently there are <strong>3</strong> different types of <a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1_chat_list.html">chat lists</a>:<br>- <a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1chat_list_main.html">Main chat list</a>.<br>- <a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1chat_list_archive.html">Archive chat list</a>.<br>- <a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1chat_list_filter.html">A folder chat list</a>.</p>
<p>The <a href="https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1chat.html#a40cebc843050f52a09e2ef471c9091e1">positions</a> of <em>chats</em> in <em>chat lists</em> are managed by TDLib, so the <em>Application</em> only needs to listen to <em>updates</em> that change the <code>chat.positions</code> field, maintain the list of all <em>chats</em>, sorted by the pair <code>(position.order, chat.id)</code> in descending order, and call <code>loadChats</code> only if more <em>chats</em> are needed. For optimal performance, the number of loaded <em>chats</em> is chosen by TDLib and can be smaller than the specified <em>limit</em>. If the <em>Application</em> needs more <em>chats</em>, it must send another <code>loadChats</code> request.</p>
<blockquote>
<p>You can find an example of retrieving the Main <em>chat list</em> in our <a href="https://github.com/tdlib/td/blob/b3ab664a18f8611f4dfcd3054717504271eeaa7a/example/java/org/drinkless/tdlib/example/Example.java#L248">Java</a> example.</p>
</blockquote>
<h3><a class="anchor" name="getting-chat-messages" href="#getting-chat-messages"><i class="anchor-icon"></i></a>Getting chat messages</h3>
<p>The <em>Application</em> can use the method <code>getChatHistory</code> to get <em>messages</em> in a <em>chat</em>. The <em>messages</em> will be returned in the reverse chronological order (i.e., in descending order of <code>message_id</code>). The <em>Application</em> can pass <code>from_message_id == 0</code> to get <em>messages</em> from the last <em>message</em>. To get more <em>messages</em> than can be returned in one response, the <em>Application</em> needs to pass the identifier of the last <em>message</em> it has received as <code>from_message_id</code> to next request. For optimal performance, the number of the returned <em>messages</em> is chosen by TDLib and can be smaller than the specified <em>limit</em>. If the <em>Application</em> needs more <em>messages</em>, it needs to adjust the <code>from_message_id</code> parameter and repeat the request.</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>

View file

@ -1,162 +0,0 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>EmojiURL</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Emoji URL">
<meta property="og:title" content="EmojiURL">
<meta property="og:image" content="">
<meta property="og:description" content="Emoji URL">
<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/EmojiURL" >EmojiURL</a></li></ul></div>
<h1 id="dev_page_title">EmojiURL</h1>
<div id="dev_page_content"><p>Emoji URL</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 &ndash; Base layer</a></li><li><a href="?layer=2">2 &ndash; New userpic notifications</a></li><li><a href="?layer=3">3 &ndash; Send message can trigger link change</a></li><li><a href="?layer=4">4 &ndash; Check-in chats</a></li><li><a href="?layer=5">5 &ndash; Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 &ndash; Foursquare integration</a></li><li><a href="?layer=7">7 &ndash; Added wallPaperSolid</a></li><li><a href="?layer=8">8 &ndash; Added end-to-end encryption</a></li><li><a href="?layer=9">9 &ndash; Improved big files upload perfomance</a></li><li><a href="?layer=10">10 &ndash; Improved chat participants updates</a></li><li><a href="?layer=11">11 &ndash; Improved secret chats</a></li><li><a href="?layer=12">12 &ndash; New dynamic support</a></li><li><a href="?layer=13">13 &ndash; Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 &ndash; Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 &ndash; Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 &ndash; Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 &ndash; Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 &ndash; Added usernames</a></li><li><a href="?layer=23">23 &ndash; Stickers for secret chats</a></li><li><a href="?layer=105">105 &ndash; Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 &ndash; Login with QR code</a></li><li><a href="?layer=109">109 &ndash; Polls v2</a></li><li><a href="?layer=110">110 &ndash; People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 &ndash; Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 &ndash; Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 &ndash; PSA</a></li><li><a href="?layer=114">114 &ndash; Video thumbs for GIFs</a></li><li><a href="?layer=115">115 &ndash; Peek Channel Invite</a></li><li><a href="?layer=116">116 &ndash; Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 &ndash; WebRTC Phone Calls</a></li><li><a href="?layer=118">118 &ndash; Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 &ndash; Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 &ndash; Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121">121 &ndash; SVG-based Outlines for Stickers</a></li><li><a href="?layer=122">122 &ndash; Voice Chats</a></li><li><a href="?layer=123">123 &ndash; Voice Chat improvements</a></li><li><a href="?layer=124">124 &ndash; Expiring Invite links</a></li><li><a href="?layer=125">125 &ndash; Voice Chats in Broadcasts</a></li><li><a href="?layer=126">126 &ndash; Ban channels in channels</a></li><li><a href="?layer=127">127 &ndash; Payments in channels</a></li><li><a href="?layer=128">128 &ndash; Microthumbs for User/Chat profile photos</a></li><li><a href="?layer=129">129 &ndash; Video Chats</a></li><li><a href="?layer=130">130 &ndash; Custom placeholder for bot reply keyboards</a></li><li><a href="?layer=131">131 &ndash; Reset 2FA Password after a week</a></li><li><a href="?layer=132">132 &ndash; Chat themes</a></li><li><a href="?layer=133"><strong>133 &ndash; 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/emojiURL" >emojiURL</a>#a575739d url:<a href="/type/string" >string</a> = <a href="/type/EmojiURL" class="current_page_link" >EmojiURL</a>;
---functions---
<a href="/method/messages.getEmojiURL" >messages.getEmojiURL</a>#d5b10c26 lang_code:<a href="/type/string" >string</a> = <a href="/type/EmojiURL" class="current_page_link" >EmojiURL</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/emojiURL">emojiURL</a></td>
<td>An HTTP URL which can be used to automatically log in into translation platform and suggest new emoji replacements. The URL will be valid for 30 seconds after generation</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.getEmojiURL">messages.getEmojiURL</a></td>
<td>Returns an HTTP URL which can be used to automatically log in into translation platform and suggest new emoji replacements. The URL will be valid for 30 seconds after generation</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>

View file

@ -1,157 +0,0 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>botInfo</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Info about bots (available bot commands, etc)">
<meta property="og:title" content="botInfo">
<meta property="og:image" content="">
<meta property="og:description" content="Info about bots (available bot commands, etc)">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?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/botInfo" >botInfo</a></li></ul></div>
<h1 id="dev_page_title">botInfo</h1>
<div id="dev_page_content"><p>Info about bots (available bot commands, etc)</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 133 <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="?layer=1">1 &ndash; Base layer</a></li><li><a href="?layer=2">2 &ndash; New userpic notifications</a></li><li><a href="?layer=3">3 &ndash; Send message can trigger link change</a></li><li><a href="?layer=4">4 &ndash; Check-in chats</a></li><li><a href="?layer=5">5 &ndash; Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 &ndash; Foursquare integration</a></li><li><a href="?layer=7">7 &ndash; Added wallPaperSolid</a></li><li><a href="?layer=8">8 &ndash; Added end-to-end encryption</a></li><li><a href="?layer=9">9 &ndash; Improved big files upload perfomance</a></li><li><a href="?layer=10">10 &ndash; Improved chat participants updates</a></li><li><a href="?layer=11">11 &ndash; Improved secret chats</a></li><li><a href="?layer=12">12 &ndash; New dynamic support</a></li><li><a href="?layer=13">13 &ndash; Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 &ndash; Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 &ndash; Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 &ndash; Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 &ndash; Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 &ndash; Added usernames</a></li><li><a href="?layer=23">23 &ndash; Stickers for secret chats</a></li><li><a href="?layer=105">105 &ndash; Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 &ndash; Login with QR code</a></li><li><a href="?layer=109">109 &ndash; Polls v2</a></li><li><a href="?layer=110">110 &ndash; People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 &ndash; Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 &ndash; Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 &ndash; PSA</a></li><li><a href="?layer=114">114 &ndash; Video thumbs for GIFs</a></li><li><a href="?layer=115">115 &ndash; Peek Channel Invite</a></li><li><a href="?layer=116">116 &ndash; Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 &ndash; WebRTC Phone Calls</a></li><li><a href="?layer=118">118 &ndash; Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 &ndash; Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 &ndash; Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121">121 &ndash; SVG-based Outlines for Stickers</a></li><li><a href="?layer=122">122 &ndash; Voice Chats</a></li><li><a href="?layer=123">123 &ndash; Voice Chat improvements</a></li><li><a href="?layer=124">124 &ndash; Expiring Invite links</a></li><li><a href="?layer=125">125 &ndash; Voice Chats in Broadcasts</a></li><li><a href="?layer=126">126 &ndash; Ban channels in channels</a></li><li><a href="?layer=127">127 &ndash; Payments in channels</a></li><li><a href="?layer=128">128 &ndash; Microthumbs for User/Chat profile photos</a></li><li><a href="?layer=129">129 &ndash; Video Chats</a></li><li><a href="?layer=130">130 &ndash; Custom placeholder for bot reply keyboards</a></li><li><a href="?layer=131">131 &ndash; Reset 2FA Password after a week</a></li><li><a href="?layer=132">132 &ndash; Chat themes</a></li><li><a href="?layer=133"><strong>133 &ndash; 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/botInfo" class="current_page_link" >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>&lt;<a href="/type/BotCommand" >BotCommand</a>&gt; = <a href="/type/BotInfo" >BotInfo</a>;</code></pre></p>
<h3><a class="anchor" href="#parameters" id="parameters" name="parameters"><i class="anchor-icon"></i></a>Parameters</h3>
<table class="table">
<thead>
<tr>
<th>Name</th>
<th style="text-align: center;">Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>user_id</strong></td>
<td style="text-align: center;"><a href="/type/long">long</a></td>
<td>ID of the bot</td>
</tr>
<tr>
<td><strong>description</strong></td>
<td style="text-align: center;"><a href="/type/string">string</a></td>
<td>Description of the bot</td>
</tr>
<tr>
<td><strong>commands</strong></td>
<td style="text-align: center;"><a href="/type/Vector%20t">Vector</a>&lt;<a href="/type/BotCommand">BotCommand</a>&gt;</td>
<td>Bot commands that can be used in the chat</td>
</tr>
</tbody>
</table>
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
<p><a href="/type/BotInfo">BotInfo</a></p></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="//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>

View file

@ -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 &ndash; Base layer</a></li><li><a href="?layer=2">2 &ndash; New userpic notifications</a></li><li><a href="?layer=3">3 &ndash; Send message can trigger link change</a></li><li><a href="?layer=4">4 &ndash; Check-in chats</a></li><li><a href="?layer=5">5 &ndash; Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 &ndash; Foursquare integration</a></li><li><a href="?layer=7">7 &ndash; Added wallPaperSolid</a></li><li><a href="?layer=8">8 &ndash; Added end-to-end encryption</a></li><li><a href="?layer=9">9 &ndash; Improved big files upload perfomance</a></li><li><a href="?layer=10">10 &ndash; Improved chat participants updates</a></li><li><a href="?layer=11">11 &ndash; Improved secret chats</a></li><li><a href="?layer=12">12 &ndash; New dynamic support</a></li><li><a href="?layer=13">13 &ndash; Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 &ndash; Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 &ndash; Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 &ndash; Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 &ndash; Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 &ndash; Added usernames</a></li><li><a href="?layer=23">23 &ndash; Stickers for secret chats</a></li><li><a href="?layer=105">105 &ndash; Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 &ndash; Login with QR code</a></li><li><a href="?layer=109">109 &ndash; Polls v2</a></li><li><a href="?layer=110">110 &ndash; People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 &ndash; Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 &ndash; Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 &ndash; PSA</a></li><li><a href="?layer=114">114 &ndash; Video thumbs for GIFs</a></li><li><a href="?layer=115">115 &ndash; Peek Channel Invite</a></li><li><a href="?layer=116">116 &ndash; Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 &ndash; WebRTC Phone Calls</a></li><li><a href="?layer=118">118 &ndash; Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 &ndash; Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 &ndash; Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121">121 &ndash; SVG-based Outlines for Stickers</a></li><li><a href="?layer=122">122 &ndash; Voice Chats</a></li><li><a href="?layer=123">123 &ndash; Voice Chat improvements</a></li><li><a href="?layer=124">124 &ndash; Expiring Invite links</a></li><li><a href="?layer=125">125 &ndash; Voice Chats in Broadcasts</a></li><li><a href="?layer=126">126 &ndash; Ban channels in channels</a></li><li><a href="?layer=127">127 &ndash; Payments in channels</a></li><li><a href="?layer=128">128 &ndash; Microthumbs for User/Chat profile photos</a></li><li><a href="?layer=129">129 &ndash; Video Chats</a></li><li><a href="?layer=130">130 &ndash; Custom placeholder for bot reply keyboards</a></li><li><a href="?layer=131">131 &ndash; Reset 2FA Password after a week</a></li><li><a href="?layer=132">132 &ndash; Chat themes</a></li><li><a href="?layer=133"><strong>133 &ndash; 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="//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>

View file

@ -1,159 +0,0 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>updateBotCommands</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="The command set of a certain bot in a certain chat has changed.">
<meta property="og:title" content="updateBotCommands">
<meta property="og:image" content="">
<meta property="og:description" content="The command set of a certain bot in a certain chat has 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/updateBotCommands" >updateBotCommands</a></li></ul></div>
<h1 id="dev_page_title">updateBotCommands</h1>
<div id="dev_page_content"><p>The <a href="/bots/api#june-25-2021">command set</a> of a certain bot in a certain chat has 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 &ndash; Base layer</a></li><li><a href="?layer=2">2 &ndash; New userpic notifications</a></li><li><a href="?layer=3">3 &ndash; Send message can trigger link change</a></li><li><a href="?layer=4">4 &ndash; Check-in chats</a></li><li><a href="?layer=5">5 &ndash; Localized SMS, localized notifications</a></li><li><a href="?layer=6">6 &ndash; Foursquare integration</a></li><li><a href="?layer=7">7 &ndash; Added wallPaperSolid</a></li><li><a href="?layer=8">8 &ndash; Added end-to-end encryption</a></li><li><a href="?layer=9">9 &ndash; Improved big files upload perfomance</a></li><li><a href="?layer=10">10 &ndash; Improved chat participants updates</a></li><li><a href="?layer=11">11 &ndash; Improved secret chats</a></li><li><a href="?layer=12">12 &ndash; New dynamic support</a></li><li><a href="?layer=13">13 &ndash; Audio, video MIME; contacts import retry; new secret actions</a></li><li><a href="?layer=14">14 &ndash; Notify settings sync, blacklist sync</a></li><li><a href="?layer=15">15 &ndash; Modified getHistory offset behaviour</a></li><li><a href="?layer=16">16 &ndash; Split sendCode into 2 parts</a></li><li><a href="?layer=17">17 &ndash; Added custom typing, introduced message flags</a></li><li><a href="?layer=18">18 &ndash; Added usernames</a></li><li><a href="?layer=23">23 &ndash; Stickers for secret chats</a></li><li><a href="?layer=105">105 &ndash; Scheduled messages, Cloud themes</a></li><li><a href="?layer=108">108 &ndash; Login with QR code</a></li><li><a href="?layer=109">109 &ndash; Polls v2</a></li><li><a href="?layer=110">110 &ndash; People Nearby 2.0, Bank card entity</a></li><li><a href="?layer=111">111 &ndash; Folders, Broadcast Stats</a></li><li><a href="?layer=112">112 &ndash; Old featured stickers, generic dice, poll timer, poll solution</a></li><li><a href="?layer=113">113 &ndash; PSA</a></li><li><a href="?layer=114">114 &ndash; Video thumbs for GIFs</a></li><li><a href="?layer=115">115 &ndash; Peek Channel Invite</a></li><li><a href="?layer=116">116 &ndash; Group Stats, Profile Videos</a></li><li><a href="?layer=117">117 &ndash; WebRTC Phone Calls</a></li><li><a href="?layer=118">118 &ndash; Callback with 2FA, Countries list</a></li><li><a href="?layer=119">119 &ndash; Comments in channels, Threads, Anonymous Admins</a></li><li><a href="?layer=120">120 &ndash; Multipins, Message Stats, GeoLive v2</a></li><li><a href="?layer=121">121 &ndash; SVG-based Outlines for Stickers</a></li><li><a href="?layer=122">122 &ndash; Voice Chats</a></li><li><a href="?layer=123">123 &ndash; Voice Chat improvements</a></li><li><a href="?layer=124">124 &ndash; Expiring Invite links</a></li><li><a href="?layer=125">125 &ndash; Voice Chats in Broadcasts</a></li><li><a href="?layer=126">126 &ndash; Ban channels in channels</a></li><li><a href="?layer=127">127 &ndash; Payments in channels</a></li><li><a href="?layer=128">128 &ndash; Microthumbs for User/Chat profile photos</a></li><li><a href="?layer=129">129 &ndash; Video Chats</a></li><li><a href="?layer=130">130 &ndash; Custom placeholder for bot reply keyboards</a></li><li><a href="?layer=131">131 &ndash; Reset 2FA Password after a week</a></li><li><a href="?layer=132">132 &ndash; Chat themes</a></li><li><a href="?layer=133"><strong>133 &ndash; 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/updateBotCommands" class="current_page_link" >updateBotCommands</a>#4d712f2e peer:<a href="/type/Peer" >Peer</a> bot_id:<a href="/type/long" >long</a> commands:<a href="/type/Vector%20t" >Vector</a>&lt;<a href="/type/BotCommand" >BotCommand</a>&gt; = <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>peer</strong></td>
<td style="text-align: center;"><a href="/type/Peer">Peer</a></td>
<td>The affected chat</td>
</tr>
<tr>
<td><strong>bot_id</strong></td>
<td style="text-align: center;"><a href="/type/long">long</a></td>
<td>ID of the bot that changed its command set</td>
</tr>
<tr>
<td><strong>commands</strong></td>
<td style="text-align: center;"><a href="/type/Vector%20t">Vector</a>&lt;<a href="/type/BotCommand">BotCommand</a>&gt;</td>
<td>New bot commands</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="#telegram-bot-api" id="telegram-bot-api" name="telegram-bot-api"><i class="anchor-icon"></i></a><a href="/bots/api">Telegram Bot 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="//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>