mirror of
https://github.com/MarshalX/telegram-crawler.git
synced 2025-01-05 10:34:43 +01:00
Update content of files
This commit is contained in:
parent
165e4171f0
commit
3bd2854bc6
234 changed files with 2987 additions and 1858 deletions
|
@ -207,16 +207,52 @@ After obtaining the ID token, call <a href="/method/account.verifyEmail">account
|
|||
</ul>
|
||||
<p>If the user cannot access their email address, an email reset may be requested using <a href="/method/auth.resetLoginEmail">auth.resetLoginEmail</a>. </p>
|
||||
<p>To change the login email after login, pass <a href="/constructor/emailVerifyPurposeLoginChange">emailVerifyPurposeLoginChange</a> as <code>purpose</code>, following the exact same Google ID/Apple ID/email code login flow as above: on success, the <a href="/method/account.verifyEmail">account.verifyEmail</a> method will return an <a href="/constructor/account.emailVerified">account.emailVerified</a> constructor.</p>
|
||||
<h3><a class="anchor" href="#sign-insign-up" id="sign-insign-up" name="sign-insign-up"><i class="anchor-icon"></i></a>Sign in/sign up</h3>
|
||||
<h3><a class="anchor" href="#sign-in-sign-up" id="sign-in-sign-up" name="sign-in-sign-up"><i class="anchor-icon"></i></a>Sign in/sign up</h3>
|
||||
<p>When user enters verification code, the <a href="/method/auth.signIn">auth.signIn</a> method must be used to validate it and possibly sign user in.</p>
|
||||
<p>If the code was entered correctly, but the method returns <a href="/constructor/auth.authorizationSignUpRequired">auth.authorizationSignUpRequired</a>, it means that account with this phone number doesn't exist yet: user needs to provide basic information, accept terms of service and then the new user registration method (<a href="/method/auth.signUp">auth.signUp</a>) must be invoked.</p>
|
||||
<h3><a class="anchor" href="#2fa" id="2fa" name="2fa"><i class="anchor-icon"></i></a>2FA</h3>
|
||||
<p>When trying to sign in using <a href="/method/auth.signIn">auth.signIn</a>, an <a href="/method/auth.signIn#possible-errors">error 400 SESSION_PASSWORD_NEEDED</a> may be returned, if the user has two-factor authentication enabled.
|
||||
In this case, instructions for <a href="/api/srp">SRP 2FA authentication</a> must be followed.</p>
|
||||
<p>To set up two-factor authorization on an already authorized account, follow the <a href="/api/srp">SRP 2FA authentication docs</a>.</p>
|
||||
<h4><a class="anchor" href="#test-accounts" id="test-accounts" name="test-accounts"><i class="anchor-icon"></i></a>Test Accounts</h4>
|
||||
<h3><a class="anchor" href="#confirming-login" id="confirming-login" name="confirming-login"><i class="anchor-icon"></i></a>Confirming login</h3>
|
||||
<pre><code><a href='/constructor/authorization'>authorization</a>#ad01d61d flags:<a href='/type/%23'>#</a> current:flags.0?<a href='/constructor/true'>true</a> official_app:flags.1?<a href='/constructor/true'>true</a> password_pending:flags.2?<a href='/constructor/true'>true</a> encrypted_requests_disabled:flags.3?<a href='/constructor/true'>true</a> call_requests_disabled:flags.4?<a href='/constructor/true'>true</a> unconfirmed:flags.5?<a href='/constructor/true'>true</a> hash:<a href='/type/long'>long</a> device_model:<a href='/type/string'>string</a> platform:<a href='/type/string'>string</a> system_version:<a href='/type/string'>string</a> api_id:<a href='/type/int'>int</a> app_name:<a href='/type/string'>string</a> app_version:<a href='/type/string'>string</a> date_created:<a href='/type/int'>int</a> date_active:<a href='/type/int'>int</a> ip:<a href='/type/string'>string</a> country:<a href='/type/string'>string</a> region:<a href='/type/string'>string</a> = <a href='/type/Authorization'>Authorization</a>;
|
||||
|
||||
<a href='/constructor/account.authorizations'>account.authorizations</a>#4bff8ea0 authorization_ttl_days:<a href='/type/int'>int</a> authorizations:<a href='/type/Vector%20t'>Vector</a><<a href='/type/Authorization'>Authorization</a>> = <a href='/type/account.Authorizations'>account.Authorizations</a>;
|
||||
|
||||
<a href='/constructor/updateNewAuthorization'>updateNewAuthorization</a>#8951abef flags:<a href='/type/%23'>#</a> unconfirmed:flags.0?<a href='/constructor/true'>true</a> hash:<a href='/type/long'>long</a> date:flags.0?<a href='/type/int'>int</a> device:flags.0?<a href='/type/string'>string</a> location:flags.0?<a href='/type/string'>string</a> = <a href='/type/Update'>Update</a>;
|
||||
|
||||
---functions---
|
||||
|
||||
<a href='/method/account.getAuthorizations'>account.getAuthorizations</a>#e320c158 = <a href='/type/account.Authorizations'>account.Authorizations</a>;
|
||||
|
||||
<a href='/method/account.changeAuthorizationSettings'>account.changeAuthorizationSettings</a>#40f48462 flags:<a href='/type/%23'>#</a> confirmed:flags.3?<a href='/constructor/true'>true</a> hash:<a href='/type/long'>long</a> encrypted_requests_disabled:flags.0?<a href='/type/Bool'>Bool</a> call_requests_disabled:flags.1?<a href='/type/Bool'>Bool</a> = <a href='/type/Bool'>Bool</a>;
|
||||
|
||||
<a href='/method/account.resetAuthorization'>account.resetAuthorization</a>#df77f3bc hash:<a href='/type/long'>long</a> = <a href='/type/Bool'>Bool</a>;</code></pre>
|
||||
<p>When logging in, other logged-in sessions will receive an <a href="/constructor/updateNewAuthorization">updateNewAuthorization</a> update.<br>
|
||||
If the <code>unconfirmed</code> flag is set, clients should display a notification, asking the user if they recognize the session. </p>
|
||||
<p>If the user clicks on the Yes button, invoke <a href="/method/account.changeAuthorizationSettings">account.changeAuthorizationSettings</a> with the new session's <code>hash</code> and the <code>confirmed</code> flag set, confirming the specified session. </p>
|
||||
<p>If the user clicks on the No button, invoke <a href="/method/account.resetAuthorization">account.resetAuthorization</a> with the new session's <code>hash</code>, logging out the specified session. </p>
|
||||
<p>If no action is taken by the user, the session will be autoconfirmed <code>authorization_autoconfirm_period</code> seconds after login (see the associated <a href="/api/config#authorization-autoconfirm-period">client configuration parameter »</a>). </p>
|
||||
<h3><a class="anchor" href="#invalidating-login-codes" id="invalidating-login-codes" name="invalidating-login-codes"><i class="anchor-icon"></i></a>Invalidating login codes</h3>
|
||||
<p>Telegram's servers will automatically invalidate login codes if they are sent by the user to another Telegram chat, either by forwarding them or by sending them inside of a message: however, clients should also manually and immediately invalidate login codes if the user attempts to screenshot or forward a message sent by the login notification service user (ID <code>777000</code>) containing login codes. </p>
|
||||
<p>If an incoming message that is:</p>
|
||||
<ul>
|
||||
<li>Sent by the login notification service user (ID <code>777000</code>)</li>
|
||||
<li>AND is a text message (not a media)</li>
|
||||
<li>AND contains one or more login codes, defined as a sequence of 5 to 7 decimal digits, optionally interleaved with or followed by any number of <code>-</code> characters (<a href="https://github.com/tdlib/td/blob/07c1d53a6d3cb1fad58d2822e55eef6d57363581/td/telegram/MessagesManager.cpp#L6513">example implementation »</a>)</li>
|
||||
</ul>
|
||||
<p>Is either:</p>
|
||||
<ul>
|
||||
<li>Screenshotted by the user</li>
|
||||
<li>OR forwarded by the user to any chat</li>
|
||||
</ul>
|
||||
<p><a href="/method/account.invalidateSignInCodes">account.invalidateSignInCodes</a> should be invoked, passing the extracted login <code>codes</code> (excluding any <code>-</code> characeters). </p>
|
||||
<pre><code>---functions---
|
||||
|
||||
<a href='/method/account.invalidateSignInCodes'>account.invalidateSignInCodes</a>#ca8ae8ba codes:<a href='/type/Vector%20t'>Vector</a><<a href='/type/string'>string</a>> = <a href='/type/Bool'>Bool</a>;</code></pre>
|
||||
<h3><a class="anchor" href="#test-accounts" id="test-accounts" name="test-accounts"><i class="anchor-icon"></i></a>Test Accounts</h3>
|
||||
<p>Each phone number is limited to only a certain amount of logins per day (e.g. 5, but this is subject to change) after which the API will return a FLOOD error until the next day. This might not be enough for testing the implementation of User Authorization flows in client applications.</p>
|
||||
<p>There are several reserved phone number prefixes for testing that your application handles redirects between DCs, sign up, sign in and 2FA flows correctly. These numbers are only available on <strong>Test DCs</strong> (their IP addresses for TCP transport are available in <a href="https://my.telegram.org/apps">API development tools</a> panel after <a href="https://core.telegram.org/api/obtaining_api_id#obtaining-api-id">api_id was obtained</a>, <a href="https://core.telegram.org/mtproto/transports#uri-format">URI format</a> for HTTPS/Websocket transport).</p>
|
||||
<p>There are several reserved phone number prefixes for testing that your application handles redirects between DCs, sign up, sign in and 2FA flows correctly. These numbers are only available on <strong>Test DCs</strong> (their IP addresses for TCP transport are available in <a href="https://my.telegram.org/apps">API development tools</a> panel after <a href="https://core.telegram.org/api/obtaining_api_id#obtaining-api-id">api_id was obtained</a>, <a href="https://core.telegram.org/mtproto/transports#uri-format">URI format</a> for HTTPS/WebSocket transport).</p>
|
||||
<p>If you wish to emulate an application of a user associated with DC number X, it is sufficient to specify the phone number as <code>99966XYYYY</code>, where YYYY are random numbers, when registering the user. A user like this would always get XXXXX as the login confirmation code (the DC number, repeated five times). Note that the value of X must be in the range of 1-3 because there are only 3 Test DCs. When the flood limit is reached for any particular test number, just choose another number (changing the YYYY random part).</p>
|
||||
<p>Do not store any important or private information in the messages of such test accounts; anyone can make use of the simplified authorization mechanism – and we periodically wipe all information stored there.</p>
|
||||
<p>Proceed with User Authorization flows in <strong>Production DCs</strong> only after you make sure everything works correctly on <strong>Test DCs</strong> first to avoid reaching flood limits.</p>
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Page not found</title>
|
||||
<title>Privacy</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="">
|
||||
<meta property="og:title" content="Page not found">
|
||||
<meta property="description" content="Telegram allows users to specify granular privacy settings, choosing which users can or can't interact with them in certain ways.">
|
||||
<meta property="og:title" content="Privacy">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="">
|
||||
<meta property="og:description" content="Telegram allows users to specify granular privacy settings, choosing which users can or can't interact with them in certain ways.">
|
||||
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
|
||||
|
@ -39,10 +39,95 @@
|
|||
<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></li></ul></div>
|
||||
<h1 id="dev_page_title">Page not found</h1>
|
||||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/api/privacy" >Privacy</a></li></ul></div>
|
||||
<h1 id="dev_page_title">Privacy</h1>
|
||||
|
||||
<div id="dev_page_content">The page has not been saved</div>
|
||||
<div id="dev_page_content"><!-- scroll_nav -->
|
||||
|
||||
<p>Telegram allows users to specify granular privacy settings, choosing which users can or can't interact with them in certain ways.</p>
|
||||
<h3><a class="anchor" href="#privacy-rules" id="privacy-rules" name="privacy-rules"><i class="anchor-icon"></i></a>Privacy rules</h3>
|
||||
<p>Schema:</p>
|
||||
<pre><code><a href='/constructor/inputPrivacyValueAllowContacts'>inputPrivacyValueAllowContacts</a>#d09e07b = <a href='/type/InputPrivacyRule'>InputPrivacyRule</a>;
|
||||
<a href='/constructor/inputPrivacyValueAllowAll'>inputPrivacyValueAllowAll</a>#184b35ce = <a href='/type/InputPrivacyRule'>InputPrivacyRule</a>;
|
||||
<a href='/constructor/inputPrivacyValueAllowUsers'>inputPrivacyValueAllowUsers</a>#131cc67f users:<a href='/type/Vector%20t'>Vector</a><<a href='/type/InputUser'>InputUser</a>> = <a href='/type/InputPrivacyRule'>InputPrivacyRule</a>;
|
||||
<a href='/constructor/inputPrivacyValueDisallowContacts'>inputPrivacyValueDisallowContacts</a>#ba52007 = <a href='/type/InputPrivacyRule'>InputPrivacyRule</a>;
|
||||
<a href='/constructor/inputPrivacyValueDisallowAll'>inputPrivacyValueDisallowAll</a>#d66b66c9 = <a href='/type/InputPrivacyRule'>InputPrivacyRule</a>;
|
||||
<a href='/constructor/inputPrivacyValueDisallowUsers'>inputPrivacyValueDisallowUsers</a>#90110467 users:<a href='/type/Vector%20t'>Vector</a><<a href='/type/InputUser'>InputUser</a>> = <a href='/type/InputPrivacyRule'>InputPrivacyRule</a>;
|
||||
<a href='/constructor/inputPrivacyValueAllowChatParticipants'>inputPrivacyValueAllowChatParticipants</a>#840649cf chats:<a href='/type/Vector%20t'>Vector</a><<a href='/type/long'>long</a>> = <a href='/type/InputPrivacyRule'>InputPrivacyRule</a>;
|
||||
<a href='/constructor/inputPrivacyValueDisallowChatParticipants'>inputPrivacyValueDisallowChatParticipants</a>#e94f0f86 chats:<a href='/type/Vector%20t'>Vector</a><<a href='/type/long'>long</a>> = <a href='/type/InputPrivacyRule'>InputPrivacyRule</a>;
|
||||
<a href='/constructor/inputPrivacyValueAllowCloseFriends'>inputPrivacyValueAllowCloseFriends</a>#2f453e49 = <a href='/type/InputPrivacyRule'>InputPrivacyRule</a>;
|
||||
|
||||
<a href='/constructor/privacyValueAllowContacts'>privacyValueAllowContacts</a>#fffe1bac = <a href='/type/PrivacyRule'>PrivacyRule</a>;
|
||||
<a href='/constructor/privacyValueAllowAll'>privacyValueAllowAll</a>#65427b82 = <a href='/type/PrivacyRule'>PrivacyRule</a>;
|
||||
<a href='/constructor/privacyValueAllowUsers'>privacyValueAllowUsers</a>#b8905fb2 users:<a href='/type/Vector%20t'>Vector</a><<a href='/type/long'>long</a>> = <a href='/type/PrivacyRule'>PrivacyRule</a>;
|
||||
<a href='/constructor/privacyValueDisallowContacts'>privacyValueDisallowContacts</a>#f888fa1a = <a href='/type/PrivacyRule'>PrivacyRule</a>;
|
||||
<a href='/constructor/privacyValueDisallowAll'>privacyValueDisallowAll</a>#8b73e763 = <a href='/type/PrivacyRule'>PrivacyRule</a>;
|
||||
<a href='/constructor/privacyValueDisallowUsers'>privacyValueDisallowUsers</a>#e4621141 users:<a href='/type/Vector%20t'>Vector</a><<a href='/type/long'>long</a>> = <a href='/type/PrivacyRule'>PrivacyRule</a>;
|
||||
<a href='/constructor/privacyValueAllowChatParticipants'>privacyValueAllowChatParticipants</a>#6b134e8e chats:<a href='/type/Vector%20t'>Vector</a><<a href='/type/long'>long</a>> = <a href='/type/PrivacyRule'>PrivacyRule</a>;
|
||||
<a href='/constructor/privacyValueDisallowChatParticipants'>privacyValueDisallowChatParticipants</a>#41c87565 chats:<a href='/type/Vector%20t'>Vector</a><<a href='/type/long'>long</a>> = <a href='/type/PrivacyRule'>PrivacyRule</a>;
|
||||
<a href='/constructor/privacyValueAllowCloseFriends'>privacyValueAllowCloseFriends</a>#f7e8d89b = <a href='/type/PrivacyRule'>PrivacyRule</a>;
|
||||
|
||||
<a href='/constructor/user'>user</a>#215c4438 flags:<a href='/type/%23'>#</a> self:flags.10?<a href='/constructor/true'>true</a> contact:flags.11?<a href='/constructor/true'>true</a> mutual_contact:flags.12?<a href='/constructor/true'>true</a> deleted:flags.13?<a href='/constructor/true'>true</a> bot:flags.14?<a href='/constructor/true'>true</a> bot_chat_history:flags.15?<a href='/constructor/true'>true</a> bot_nochats:flags.16?<a href='/constructor/true'>true</a> verified:flags.17?<a href='/constructor/true'>true</a> restricted:flags.18?<a href='/constructor/true'>true</a> min:flags.20?<a href='/constructor/true'>true</a> bot_inline_geo:flags.21?<a href='/constructor/true'>true</a> support:flags.23?<a href='/constructor/true'>true</a> scam:flags.24?<a href='/constructor/true'>true</a> apply_min_photo:flags.25?<a href='/constructor/true'>true</a> fake:flags.26?<a href='/constructor/true'>true</a> bot_attach_menu:flags.27?<a href='/constructor/true'>true</a> premium:flags.28?<a href='/constructor/true'>true</a> attach_menu_enabled:flags.29?<a href='/constructor/true'>true</a> flags2:<a href='/type/%23'>#</a> bot_can_edit:flags2.1?<a href='/constructor/true'>true</a> close_friend:flags2.2?<a href='/constructor/true'>true</a> stories_hidden:flags2.3?<a href='/constructor/true'>true</a> stories_unavailable:flags2.4?<a href='/constructor/true'>true</a> id:<a href='/type/long'>long</a> access_hash:flags.0?<a href='/type/long'>long</a> first_name:flags.1?<a href='/type/string'>string</a> last_name:flags.2?<a href='/type/string'>string</a> username:flags.3?<a href='/type/string'>string</a> phone:flags.4?<a href='/type/string'>string</a> photo:flags.5?<a href='/type/UserProfilePhoto'>UserProfilePhoto</a> status:flags.6?<a href='/type/UserStatus'>UserStatus</a> bot_info_version:flags.14?<a href='/type/int'>int</a> restriction_reason:flags.18?<a href='/type/Vector%20t'>Vector</a><<a href='/type/RestrictionReason'>RestrictionReason</a>> bot_inline_placeholder:flags.19?<a href='/type/string'>string</a> lang_code:flags.22?<a href='/type/string'>string</a> emoji_status:flags.30?<a href='/type/EmojiStatus'>EmojiStatus</a> usernames:flags2.0?<a href='/type/Vector%20t'>Vector</a><<a href='/type/Username'>Username</a>> stories_max_id:flags2.5?<a href='/type/int'>int</a> color:flags2.8?<a href='/type/PeerColor'>PeerColor</a> profile_color:flags2.9?<a href='/type/PeerColor'>PeerColor</a> = <a href='/type/User'>User</a>;
|
||||
|
||||
---functions---
|
||||
|
||||
<a href='/method/contacts.editCloseFriends'>contacts.editCloseFriends</a>#ba6705f0 id:<a href='/type/Vector%20t'>Vector</a><<a href='/type/long'>long</a>> = <a href='/type/Bool'>Bool</a>;</code></pre>
|
||||
<p>Privacy <strong>rules</strong> indicate <em>who</em> can or can't do something and are specified by a <a href="/type/PrivacyRule">PrivacyRule</a>, and its input counterpart <a href="/type/InputPrivacyRule">InputPrivacyRule</a>.<br>
|
||||
<a href="/type/InputPrivacyRule">InputPrivacyRule</a> constructors are <em>passed</em> as input to methods that accept privacy rules, while <a href="/type/PrivacyRule">PrivacyRule</a>s are contained in constructors <em>returned</em> by the API. </p>
|
||||
<p>See <a href="/type/InputPrivacyRule">the type page »</a> for a full list of privacy rules and their descriptions. </p>
|
||||
<p>One privacy rule in particular should be mentioned separately, (input)<a href="/constructor/privacyValueAllowCloseFriends">privacyValueAllowCloseFriends</a>: this privacy rule, which can be used only when <a href="/api/stories">posting stories</a>, refers exclusively to a list of "close friends", that can be modified using <a href="/method/contacts.editCloseFriends">contacts.editCloseFriends</a>, passing the full close friend list as a list of user IDs: note that only users <a href="/api/contacts">in the contact list (even without a phone number) »</a> can be added to the close friends list. </p>
|
||||
<p>The current list of close friends can be checking which users in our contact list have the <code>close_friend</code> flag set in the associated <a href="/constructor/user">user</a> constructor, see <a href="/api/contacts#fetching-the-contact-list">here »</a> for more info on how to fetch the contact list.</p>
|
||||
<h3><a class="anchor" href="#privacy-keys" id="privacy-keys" name="privacy-keys"><i class="anchor-icon"></i></a>Privacy keys</h3>
|
||||
<p>Schema:</p>
|
||||
<pre><code><a href='/constructor/inputPrivacyKeyStatusTimestamp'>inputPrivacyKeyStatusTimestamp</a>#4f96cb18 = <a href='/type/InputPrivacyKey'>InputPrivacyKey</a>;
|
||||
<a href='/constructor/inputPrivacyKeyChatInvite'>inputPrivacyKeyChatInvite</a>#bdfb0426 = <a href='/type/InputPrivacyKey'>InputPrivacyKey</a>;
|
||||
<a href='/constructor/inputPrivacyKeyPhoneCall'>inputPrivacyKeyPhoneCall</a>#fabadc5f = <a href='/type/InputPrivacyKey'>InputPrivacyKey</a>;
|
||||
<a href='/constructor/inputPrivacyKeyPhoneP2P'>inputPrivacyKeyPhoneP2P</a>#db9e70d2 = <a href='/type/InputPrivacyKey'>InputPrivacyKey</a>;
|
||||
<a href='/constructor/inputPrivacyKeyForwards'>inputPrivacyKeyForwards</a>#a4dd4c08 = <a href='/type/InputPrivacyKey'>InputPrivacyKey</a>;
|
||||
<a href='/constructor/inputPrivacyKeyProfilePhoto'>inputPrivacyKeyProfilePhoto</a>#5719bacc = <a href='/type/InputPrivacyKey'>InputPrivacyKey</a>;
|
||||
<a href='/constructor/inputPrivacyKeyPhoneNumber'>inputPrivacyKeyPhoneNumber</a>#352dafa = <a href='/type/InputPrivacyKey'>InputPrivacyKey</a>;
|
||||
<a href='/constructor/inputPrivacyKeyAddedByPhone'>inputPrivacyKeyAddedByPhone</a>#d1219bdd = <a href='/type/InputPrivacyKey'>InputPrivacyKey</a>;
|
||||
<a href='/constructor/inputPrivacyKeyVoiceMessages'>inputPrivacyKeyVoiceMessages</a>#aee69d68 = <a href='/type/InputPrivacyKey'>InputPrivacyKey</a>;
|
||||
<a href='/constructor/inputPrivacyKeyAbout'>inputPrivacyKeyAbout</a>#3823cc40 = <a href='/type/InputPrivacyKey'>InputPrivacyKey</a>;
|
||||
|
||||
<a href='/constructor/privacyKeyStatusTimestamp'>privacyKeyStatusTimestamp</a>#bc2eab30 = <a href='/type/PrivacyKey'>PrivacyKey</a>;
|
||||
<a href='/constructor/privacyKeyChatInvite'>privacyKeyChatInvite</a>#500e6dfa = <a href='/type/PrivacyKey'>PrivacyKey</a>;
|
||||
<a href='/constructor/privacyKeyPhoneCall'>privacyKeyPhoneCall</a>#3d662b7b = <a href='/type/PrivacyKey'>PrivacyKey</a>;
|
||||
<a href='/constructor/privacyKeyPhoneP2P'>privacyKeyPhoneP2P</a>#39491cc8 = <a href='/type/PrivacyKey'>PrivacyKey</a>;
|
||||
<a href='/constructor/privacyKeyForwards'>privacyKeyForwards</a>#69ec56a3 = <a href='/type/PrivacyKey'>PrivacyKey</a>;
|
||||
<a href='/constructor/privacyKeyProfilePhoto'>privacyKeyProfilePhoto</a>#96151fed = <a href='/type/PrivacyKey'>PrivacyKey</a>;
|
||||
<a href='/constructor/privacyKeyPhoneNumber'>privacyKeyPhoneNumber</a>#d19ae46d = <a href='/type/PrivacyKey'>PrivacyKey</a>;
|
||||
<a href='/constructor/privacyKeyAddedByPhone'>privacyKeyAddedByPhone</a>#42ffd42b = <a href='/type/PrivacyKey'>PrivacyKey</a>;
|
||||
<a href='/constructor/privacyKeyVoiceMessages'>privacyKeyVoiceMessages</a>#697f414 = <a href='/type/PrivacyKey'>PrivacyKey</a>;
|
||||
<a href='/constructor/privacyKeyAbout'>privacyKeyAbout</a>#a486b761 = <a href='/type/PrivacyKey'>PrivacyKey</a>;
|
||||
|
||||
<a href='/constructor/account.privacyRules'>account.privacyRules</a>#50a04e45 rules:<a href='/type/Vector%20t'>Vector</a><<a href='/type/PrivacyRule'>PrivacyRule</a>> chats:<a href='/type/Vector%20t'>Vector</a><<a href='/type/Chat'>Chat</a>> users:<a href='/type/Vector%20t'>Vector</a><<a href='/type/User'>User</a>> = <a href='/type/account.PrivacyRules'>account.PrivacyRules</a>;
|
||||
|
||||
<a href='/constructor/updatePrivacy'>updatePrivacy</a>#ee3b272a key:<a href='/type/PrivacyKey'>PrivacyKey</a> rules:<a href='/type/Vector%20t'>Vector</a><<a href='/type/PrivacyRule'>PrivacyRule</a>> = <a href='/type/Update'>Update</a>;
|
||||
|
||||
---functions---
|
||||
|
||||
<a href='/method/account.getPrivacy'>account.getPrivacy</a>#dadbc950 key:<a href='/type/InputPrivacyKey'>InputPrivacyKey</a> = <a href='/type/account.PrivacyRules'>account.PrivacyRules</a>;
|
||||
<a href='/method/account.setPrivacy'>account.setPrivacy</a>#c9f81ce8 key:<a href='/type/InputPrivacyKey'>InputPrivacyKey</a> rules:<a href='/type/Vector%20t'>Vector</a><<a href='/type/InputPrivacyRule'>InputPrivacyRule</a>> = <a href='/type/account.PrivacyRules'>account.PrivacyRules</a>;</code></pre>
|
||||
<p>Privacy <strong>keys</strong> together with <a href="#privacy-rules">privacy rules »</a> indicate <em>what</em> can or can't someone do and are specified by a <a href="/type/PrivacyKey">PrivacyKey</a> constructor, and its input counterpart <a href="/type/InputPrivacyKey">InputPrivacyKey</a>.<br>
|
||||
<a href="/type/InputPrivacyKey">InputPrivacyKey</a> constructors are <em>passed</em> as input to methods that accept privacy keys, while <a href="/type/PrivacyKey">PrivacyKey</a>s are contained in constructors <em>returned</em> by the API. </p>
|
||||
<p>See <a href="/type/InputPrivacyRule">the type page »</a> for a full list of privacy keys and their descriptions. </p>
|
||||
<p>Use <a href="/method/account.getPrivacy">account.getPrivacy</a> to obtain the current set of <a href="#privacy-rules">rules</a> associated to a key, and <a href="/method/account.setPrivacy">account.setPrivacy</a> to change it.</p>
|
||||
<p>Changing the privacy settings will trigger an <a href="/constructor/updatePrivacy">updatePrivacy</a>, sent to all currently logged in sessions of the current account.</p>
|
||||
<h3><a class="anchor" href="#global-privacy-settings" id="global-privacy-settings" name="global-privacy-settings"><i class="anchor-icon"></i></a>Global privacy settings</h3>
|
||||
<pre><code><a href='/constructor/globalPrivacySettings'>globalPrivacySettings</a>#734c4ccb flags:<a href='/type/%23'>#</a> archive_and_mute_new_noncontact_peers:flags.0?<a href='/constructor/true'>true</a> keep_archived_unmuted:flags.1?<a href='/constructor/true'>true</a> keep_archived_folders:flags.2?<a href='/constructor/true'>true</a> = <a href='/type/GlobalPrivacySettings'>GlobalPrivacySettings</a>;
|
||||
|
||||
---functions---
|
||||
|
||||
<a href='/method/account.getGlobalPrivacySettings'>account.getGlobalPrivacySettings</a>#eb2b4cf6 = <a href='/type/GlobalPrivacySettings'>GlobalPrivacySettings</a>;
|
||||
<a href='/method/account.setGlobalPrivacySettings'>account.setGlobalPrivacySettings</a>#1edaaac2 settings:<a href='/type/GlobalPrivacySettings'>GlobalPrivacySettings</a> = <a href='/type/GlobalPrivacySettings'>GlobalPrivacySettings</a>;</code></pre>
|
||||
<p>Some global privacy settings can also be fetched and modified using <a href="/method/account.getGlobalPrivacySettings">account.getGlobalPrivacySettings</a> and <a href="/method/account.setGlobalPrivacySettings">account.setGlobalPrivacySettings</a>. </p>
|
||||
<p>Global privacy settings are represented by the <a href="/constructor/globalPrivacySettings">globalPrivacySettings</a> constructor, that contains the following parameters:</p>
|
||||
<ul>
|
||||
<li><strong>archive_and_mute_new_noncontact_peers</strong> - Whether to archive and mute new chats from non-contacts.</li>
|
||||
<li><strong>keep_archived_unmuted</strong> - Whether unmuted chats will be kept in the Archive chat list when they get a new message.</li>
|
||||
<li><strong>keep_archived_folders</strong> - Whether unmuted chats that are always included or pinned in a <a href="/api/folders">folder</a>, will be kept in the Archive chat list when they get a new message. Ignored if <code>keep_archived_unmuted</code> is set.</li>
|
||||
</ul></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
@ -109,8 +194,11 @@
|
|||
</div>
|
||||
</div>
|
||||
<script src="/js/main.js?47"></script>
|
||||
|
||||
<script>backToTopInit("Go up");
|
||||
<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>
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>appWebViewResultUrl</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Contains the link that must be used to open a named bot web app.">
|
||||
<meta property="description" content="Contains the link that must be used to open a direct link Mini App.">
|
||||
<meta property="og:title" content="appWebViewResultUrl">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Contains the link that must be used to open a named bot web app.">
|
||||
<meta property="og:description" content="Contains the link that must be used to open a direct link Mini App.">
|
||||
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
|
||||
|
@ -42,7 +42,7 @@
|
|||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/appWebViewResultUrl" >appWebViewResultUrl</a></li></ul></div>
|
||||
<h1 id="dev_page_title">appWebViewResultUrl</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Contains the link that must be used to open a <a href="/api/bots/webapps#named-bot-web-apps">named bot web app</a>.</p>
|
||||
<div id="dev_page_content"><p>Contains the link that must be used to open a <a href="/api/bots/webapps#direct-link-mini-apps">direct link Mini App</a>.</p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
@ -76,7 +76,7 @@
|
|||
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
|
||||
<p><a href="/type/AppWebViewResult">AppWebViewResult</a></p>
|
||||
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
|
||||
<h4><a class="anchor" href="#bot-web-apps" id="bot-web-apps" name="bot-web-apps"><i class="anchor-icon"></i></a><a href="/api/bots/webapps">Bot web apps</a></h4>
|
||||
<h4><a class="anchor" href="#mini-apps-on-telegram" id="mini-apps-on-telegram" name="mini-apps-on-telegram"><i class="anchor-icon"></i></a><a href="/api/bots/webapps">Mini Apps on Telegram</a></h4>
|
||||
<p>Bots can offer users interactive HTML5 web apps to completely replace any website.</p></div>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -77,6 +77,11 @@
|
|||
<td>Disable webpage preview</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>invert_media</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.3?<a href="/constructor/true">true</a></td>
|
||||
<td>If set, any eventual webpage preview will be shown on top of the message instead of at the bottom.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>message</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/string">string</a></td>
|
||||
<td>The message</td>
|
||||
|
|
|
@ -81,7 +81,7 @@
|
|||
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
|
||||
<p><a href="/type/BotMenuButton">BotMenuButton</a></p>
|
||||
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
|
||||
<h4><a class="anchor" href="#bot-web-apps" id="bot-web-apps" name="bot-web-apps"><i class="anchor-icon"></i></a><a href="/api/bots/webapps">Bot web apps</a></h4>
|
||||
<h4><a class="anchor" href="#mini-apps-on-telegram" id="mini-apps-on-telegram" name="mini-apps-on-telegram"><i class="anchor-icon"></i></a><a href="/api/bots/webapps">Mini Apps on Telegram</a></h4>
|
||||
<p>Bots can offer users interactive HTML5 web apps to completely replace any website.</p>
|
||||
<h4><a class="anchor" href="#bot-menu-button" id="bot-menu-button" name="bot-menu-button"><i class="anchor-icon"></i></a><a href="/api/bots/menu">Bot menu button</a></h4>
|
||||
<p>Bots can choose the behavior of the menu button shown next to the text input field.</p></div>
|
||||
|
|
|
@ -97,6 +97,21 @@
|
|||
<td>Whether the <a href="/api/invites#join-requests">join request »</a> must be first approved by an administrator</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>verified</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.7?<a href="/constructor/true">true</a></td>
|
||||
<td>Is this chat or channel verified by Telegram?</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>scam</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.8?<a href="/constructor/true">true</a></td>
|
||||
<td>This chat is probably a scam</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>fake</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.9?<a href="/constructor/true">true</a></td>
|
||||
<td>If set, this chat was reported by many users as a fake or scam: be careful when interacting with it.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>title</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/string">string</a></td>
|
||||
<td>Chat/supergroup/channel title</td>
|
||||
|
@ -121,6 +136,11 @@
|
|||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.4?<a href="/type/Vector%20t">Vector</a><<a href="/type/User">User</a>></td>
|
||||
<td>A few of the participants that are in the group</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>color</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/int">int</a></td>
|
||||
<td><a href="/api/colors">Profile color palette ID</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
|
||||
|
@ -129,7 +149,9 @@
|
|||
<h4><a class="anchor" href="#channels-supergroups-gigagroups-and-basic-groups" id="channels-supergroups-gigagroups-and-basic-groups" name="channels-supergroups-gigagroups-and-basic-groups"><i class="anchor-icon"></i></a><a href="/api/channel">Channels, supergroups, gigagroups and basic groups</a></h4>
|
||||
<p>How to handle channels, supergroups, gigagroups, basic groups, and what's the difference between them.</p>
|
||||
<h4><a class="anchor" href="#invites" id="invites" name="invites"><i class="anchor-icon"></i></a><a href="/api/invites">Invites</a></h4>
|
||||
<p>Chats and channels may have a public username or a private invite link: private invite links may be further enhanced with per-user join requests.</p></div>
|
||||
<p>Chats and channels may have a public username or a private invite link: private invite links may be further enhanced with per-user join requests.</p>
|
||||
<h4><a class="anchor" href="#accent-colors" id="accent-colors" name="accent-colors"><i class="anchor-icon"></i></a><a href="/api/colors">Accent colors</a></h4>
|
||||
<p>Telegram users and channels can change the accent color and background pattern of their profile page and their messages!</p></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@
|
|||
<tr>
|
||||
<td><strong>provider</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/string">string</a></td>
|
||||
<td>Venue provider: currently only "foursquare" needs to be supported</td>
|
||||
<td>Venue provider: currently only "foursquare" and "gplaces" (Google Places) need to be supported</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>venue_id</strong></td>
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
<tr>
|
||||
<td><strong>expires</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/int">int</a></td>
|
||||
<td>Its expiry date</td>
|
||||
<td>Its expiration date</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>inputBotAppID</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Used to fetch information about a named bot web app by its ID">
|
||||
<meta property="description" content="Used to fetch information about a direct link Mini App by its ID">
|
||||
<meta property="og:title" content="inputBotAppID">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Used to fetch information about a named bot web app by its ID">
|
||||
<meta property="og:description" content="Used to fetch information about a direct link Mini App by its ID">
|
||||
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
|
||||
|
@ -42,7 +42,7 @@
|
|||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/inputBotAppID" >inputBotAppID</a></li></ul></div>
|
||||
<h1 id="dev_page_title">inputBotAppID</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Used to fetch information about a <a href="/api/bots/webapps#named-bot-web-apps">named bot web app</a> by its ID</p>
|
||||
<div id="dev_page_content"><p>Used to fetch information about a <a href="/api/bots/webapps#direct-link-mini-apps">direct link Mini App</a> by its ID</p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
@ -69,7 +69,7 @@
|
|||
<tr>
|
||||
<td><strong>id</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/long">long</a></td>
|
||||
<td><a href="/api/bots/webapps#named-bot-web-apps">named bot web app</a> ID.</td>
|
||||
<td><a href="/api/bots/webapps#direct-link-mini-apps">direct link Mini App</a> ID.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>access_hash</strong></td>
|
||||
|
@ -81,10 +81,10 @@
|
|||
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
|
||||
<p><a href="/type/InputBotApp">InputBotApp</a></p>
|
||||
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
|
||||
<h4><a class="anchor" href="#bot-web-apps" id="bot-web-apps" name="bot-web-apps"><i class="anchor-icon"></i></a><a href="/api/bots/webapps">Bot web apps</a></h4>
|
||||
<h4><a class="anchor" href="#mini-apps-on-telegram" id="mini-apps-on-telegram" name="mini-apps-on-telegram"><i class="anchor-icon"></i></a><a href="/api/bots/webapps">Mini Apps on Telegram</a></h4>
|
||||
<p>Bots can offer users interactive HTML5 web apps to completely replace any website.</p>
|
||||
<h4><a class="anchor" href="#botapp" id="botapp" name="botapp"><i class="anchor-icon"></i></a><a href="/constructor/botApp">botApp</a></h4>
|
||||
<p>Contains information about a <a href="/api/bots/webapps#named-bot-web-apps">named bot web app</a>.</p></div>
|
||||
<p>Contains information about a <a href="/api/bots/webapps#direct-link-mini-apps">direct link Mini App</a>.</p></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>inputBotAppShortName</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Used to fetch information about a named bot web app by its short name">
|
||||
<meta property="description" content="Used to fetch information about a direct link Mini App by its short name">
|
||||
<meta property="og:title" content="inputBotAppShortName">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Used to fetch information about a named bot web app by its short name">
|
||||
<meta property="og:description" content="Used to fetch information about a direct link Mini App by its short name">
|
||||
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
|
||||
|
@ -42,7 +42,7 @@
|
|||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/inputBotAppShortName" >inputBotAppShortName</a></li></ul></div>
|
||||
<h1 id="dev_page_title">inputBotAppShortName</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Used to fetch information about a <a href="/api/bots/webapps#named-bot-web-apps">named bot web app</a> by its short name</p>
|
||||
<div id="dev_page_content"><p>Used to fetch information about a <a href="/api/bots/webapps#direct-link-mini-apps">direct link Mini App</a> by its short name</p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
@ -69,12 +69,12 @@
|
|||
<tr>
|
||||
<td><strong>bot_id</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/InputUser">InputUser</a></td>
|
||||
<td>ID of the bot that owns the bot web app</td>
|
||||
<td>ID of the bot that owns the bot mini app</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>short_name</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/string">string</a></td>
|
||||
<td>Short name, obtained from a <a href="/api/links#named-bot-web-app-links">named bot web app deep link</a></td>
|
||||
<td>Short name, obtained from a <a href="/api/links#direct-mini-app-links">Direct Mini App deep link</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
@ -83,7 +83,7 @@
|
|||
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
|
||||
<h4><a class="anchor" href="#deep-links" id="deep-links" name="deep-links"><i class="anchor-icon"></i></a><a href="/api/links">Deep links</a></h4>
|
||||
<p>Telegram clients must handle special tg:// and t.me deep links encountered in messages, link entities and in other apps by registering OS handlers.</p>
|
||||
<h4><a class="anchor" href="#bot-web-apps" id="bot-web-apps" name="bot-web-apps"><i class="anchor-icon"></i></a><a href="/api/bots/webapps">Bot web apps</a></h4>
|
||||
<h4><a class="anchor" href="#mini-apps-on-telegram" id="mini-apps-on-telegram" name="mini-apps-on-telegram"><i class="anchor-icon"></i></a><a href="/api/bots/webapps">Mini Apps on Telegram</a></h4>
|
||||
<p>Bots can offer users interactive HTML5 web apps to completely replace any website.</p></div>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>keyboardButtonRequestPeer</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Prompts the user to select and share a peer with the bot using messages.sendBotRequestedPeer">
|
||||
<meta property="description" content="Prompts the user to select and share one or more peers with the bot using messages.sendBotRequestedPeer">
|
||||
<meta property="og:title" content="keyboardButtonRequestPeer">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Prompts the user to select and share a peer with the bot using messages.sendBotRequestedPeer">
|
||||
<meta property="og:description" content="Prompts the user to select and share one or more peers with the bot using messages.sendBotRequestedPeer">
|
||||
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
|
||||
|
@ -42,7 +42,7 @@
|
|||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/keyboardButtonRequestPeer" >keyboardButtonRequestPeer</a></li></ul></div>
|
||||
<h1 id="dev_page_title">keyboardButtonRequestPeer</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Prompts the user to select and share a peer with the bot using <a href="/method/messages.sendBotRequestedPeer">messages.sendBotRequestedPeer</a></p>
|
||||
<div id="dev_page_content"><p>Prompts the user to select and share one or more peers with the bot using <a href="/method/messages.sendBotRequestedPeer">messages.sendBotRequestedPeer</a></p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
@ -79,7 +79,12 @@
|
|||
<tr>
|
||||
<td><strong>peer_type</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/RequestPeerType">RequestPeerType</a></td>
|
||||
<td>Filtering criteria to use for the peer selection list shown to the user. <br>The list should display all existing peers of the specified type, and should also offer an option for the user to create and immediately use a peer of the specified type, if needed.</td>
|
||||
<td>Filtering criteria to use for the peer selection list shown to the user. <br>The list should display all existing peers of the specified type, and should also offer an option for the user to create and immediately use one or more (up to <code>max_quantity</code>) peers of the specified type, if needed.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>max_quantity</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/int">int</a></td>
|
||||
<td>Maximum number of peers that can be chosne.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
@ -87,7 +92,7 @@
|
|||
<p><a href="/type/KeyboardButton">KeyboardButton</a></p>
|
||||
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
|
||||
<h4><a class="anchor" href="#messagessendbotrequestedpeer" id="messagessendbotrequestedpeer" name="messagessendbotrequestedpeer"><i class="anchor-icon"></i></a><a href="/method/messages.sendBotRequestedPeer">messages.sendBotRequestedPeer</a></h4>
|
||||
<p>Send a chosen peer, as requested by a <a href="/constructor/keyboardButtonRequestPeer">keyboardButtonRequestPeer</a> button.</p></div>
|
||||
<p>Send one or more chosen peers, as requested by a <a href="/constructor/keyboardButtonRequestPeer">keyboardButtonRequestPeer</a> button.</p></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>messageActionWebViewDataSent</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Data from an opened reply keyboard bot web app was relayed to the bot that owns it (user side service message).">
|
||||
<meta property="description" content="Data from an opened reply keyboard bot mini app was relayed to the bot that owns it (user side service message). Clients should display a service message with the text Data from the «$text» button was transferred to the bot.">
|
||||
<meta property="og:title" content="messageActionWebViewDataSent">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Data from an opened reply keyboard bot web app was relayed to the bot that owns it (user side service message).">
|
||||
<meta property="og:description" content="Data from an opened reply keyboard bot mini app was relayed to the bot that owns it (user side service message). Clients should display a service message with the text Data from the «$text» button was transferred to the bot.">
|
||||
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
|
||||
|
@ -42,7 +42,7 @@
|
|||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/messageActionWebViewDataSent" >messageActionWebViewDataSent</a></li></ul></div>
|
||||
<h1 id="dev_page_title">messageActionWebViewDataSent</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Data from an opened <a href="/api/bots/webapps">reply keyboard bot web app</a> was relayed to the bot that owns it (user side service message).</p>
|
||||
<div id="dev_page_content"><p>Data from an opened <a href="/api/bots/webapps">reply keyboard bot mini app</a> was relayed to the bot that owns it (user side service message).</p>
|
||||
<p>Clients should display a service message with the text <code>Data from the «$text» button was transferred to the bot.</code></p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
|
@ -78,9 +78,9 @@
|
|||
<p><a href="/type/MessageAction">MessageAction</a></p>
|
||||
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
|
||||
<h4><a class="anchor" href="#keyboardbuttonsimplewebview" id="keyboardbuttonsimplewebview" name="keyboardbuttonsimplewebview"><i class="anchor-icon"></i></a><a href="/constructor/keyboardButtonSimpleWebView">keyboardButtonSimpleWebView</a></h4>
|
||||
<p>Button to open a <a href="/api/bots/webapps">bot web app</a> using <a href="/method/messages.requestSimpleWebView">messages.requestSimpleWebView</a>, without sending user information to the web app.</p>
|
||||
<p>Button to open a <a href="/api/bots/webapps">bot mini app</a> using <a href="/method/messages.requestSimpleWebView">messages.requestSimpleWebView</a>, without sending user information to the web app.</p>
|
||||
<p>Can only be sent or received as part of a reply keyboard, use <a href="/constructor/keyboardButtonWebView">keyboardButtonWebView</a> for inline keyboards.</p>
|
||||
<h4><a class="anchor" href="#bot-web-apps" id="bot-web-apps" name="bot-web-apps"><i class="anchor-icon"></i></a><a href="/api/bots/webapps">Bot web apps</a></h4>
|
||||
<h4><a class="anchor" href="#mini-apps-on-telegram" id="mini-apps-on-telegram" name="mini-apps-on-telegram"><i class="anchor-icon"></i></a><a href="/api/bots/webapps">Mini Apps on Telegram</a></h4>
|
||||
<p>Bots can offer users interactive HTML5 web apps to completely replace any website.</p></div>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>messageActionWebViewDataSentMe</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Data from an opened reply keyboard bot web app was relayed to the bot that owns it (bot side service message).">
|
||||
<meta property="description" content="Data from an opened reply keyboard bot mini app was relayed to the bot that owns it (bot side service message).">
|
||||
<meta property="og:title" content="messageActionWebViewDataSentMe">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Data from an opened reply keyboard bot web app was relayed to the bot that owns it (bot side service message).">
|
||||
<meta property="og:description" content="Data from an opened reply keyboard bot mini app was relayed to the bot that owns it (bot side service message).">
|
||||
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
|
||||
|
@ -42,7 +42,7 @@
|
|||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/messageActionWebViewDataSentMe" >messageActionWebViewDataSentMe</a></li></ul></div>
|
||||
<h1 id="dev_page_title">messageActionWebViewDataSentMe</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Data from an opened <a href="/api/bots/webapps">reply keyboard bot web app</a> was relayed to the bot that owns it (bot side service message).</p>
|
||||
<div id="dev_page_content"><p>Data from an opened <a href="/api/bots/webapps">reply keyboard bot mini app</a> was relayed to the bot that owns it (bot side service message).</p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
@ -82,9 +82,9 @@
|
|||
<p><a href="/type/MessageAction">MessageAction</a></p>
|
||||
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
|
||||
<h4><a class="anchor" href="#keyboardbuttonsimplewebview" id="keyboardbuttonsimplewebview" name="keyboardbuttonsimplewebview"><i class="anchor-icon"></i></a><a href="/constructor/keyboardButtonSimpleWebView">keyboardButtonSimpleWebView</a></h4>
|
||||
<p>Button to open a <a href="/api/bots/webapps">bot web app</a> using <a href="/method/messages.requestSimpleWebView">messages.requestSimpleWebView</a>, without sending user information to the web app.</p>
|
||||
<p>Button to open a <a href="/api/bots/webapps">bot mini app</a> using <a href="/method/messages.requestSimpleWebView">messages.requestSimpleWebView</a>, without sending user information to the web app.</p>
|
||||
<p>Can only be sent or received as part of a reply keyboard, use <a href="/constructor/keyboardButtonWebView">keyboardButtonWebView</a> for inline keyboards.</p>
|
||||
<h4><a class="anchor" href="#bot-web-apps" id="bot-web-apps" name="bot-web-apps"><i class="anchor-icon"></i></a><a href="/api/bots/webapps">Bot web apps</a></h4>
|
||||
<h4><a class="anchor" href="#mini-apps-on-telegram" id="mini-apps-on-telegram" name="mini-apps-on-telegram"><i class="anchor-icon"></i></a><a href="/api/bots/webapps">Mini Apps on Telegram</a></h4>
|
||||
<p>Bots can offer users interactive HTML5 web apps to completely replace any website.</p></div>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -77,6 +77,11 @@
|
|||
<td>Whether this message was <a href="/api/import">imported from a foreign chat service, click here for more info »</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>saved_out</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.11?<a href="/constructor/true">true</a></td>
|
||||
<td>Only for messages forwarded to <a href="/api/saved-messages">saved messages »</a>, set if the original message was outgoing (though the message may have been originally outgoing even if this flag is not set, if <code>from_id</code> points to the current user).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>from_id</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.0?<a href="/type/Peer">Peer</a></td>
|
||||
<td>The ID of the user that originally sent the message</td>
|
||||
|
@ -104,12 +109,27 @@
|
|||
<tr>
|
||||
<td><strong>saved_from_peer</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.4?<a href="/type/Peer">Peer</a></td>
|
||||
<td>Only for messages forwarded to the current user (inputPeerSelf), full info about the user/channel that originally sent the message</td>
|
||||
<td>Only for messages forwarded to <a href="/api/saved-messages">saved messages »</a>, contains the dialog where the message was originally sent.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>saved_from_msg_id</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.4?<a href="/type/int">int</a></td>
|
||||
<td>Only for messages forwarded to the current user (inputPeerSelf), ID of the message that was forwarded from the original user/channel</td>
|
||||
<td>Only for messages forwarded to <a href="/api/saved-messages">saved messages »</a>, contains the original ID of the message in <code>saved_from_peer</code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>saved_from_id</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.8?<a href="/type/Peer">Peer</a></td>
|
||||
<td>Only for forwarded messages reforwarded to <a href="/api/saved-messages">saved messages »</a>, contains the sender of the original message (i.e. if user A sends a message, then user B forwards it somewhere, then user C saves it to saved messages, this field will contain the ID of user B and <code>from_id</code> will contain the ID of user A).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>saved_from_name</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.9?<a href="/type/string">string</a></td>
|
||||
<td>Only for forwarded messages from users with forward privacy enabled, sent by users with forward privacy enabled, reforwarded to <a href="/api/saved-messages">saved messages »</a>, contains the sender of the original message (i.e. if user A (fwd privacy enabled) sends a message, then user B (fwd privacy enabled) forwards it somewhere, then user C saves it to saved messages, this field will contain the name of user B and <code>from_name</code> will contain the name of user A).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>saved_date</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.10?<a href="/type/int">int</a></td>
|
||||
<td>Only for forwarded messages reforwarded to <a href="/api/saved-messages">saved messages »</a>, indicates when was the original message sent (i.e. if user A sends a message @ unixtime 1, then user B forwards it somewhere @ unixtime 2, then user C saves it to saved messages @ unixtime 3, this field will contain 2, <code>date</code> will contain 1 and the <code>date</code> of the containing <a href="/constructor/message">message</a> will contain 3).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>psa_type</strong></td>
|
||||
|
@ -122,7 +142,11 @@
|
|||
<p><a href="/type/MessageFwdHeader">MessageFwdHeader</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="#imported-messages" id="imported-messages" name="imported-messages"><i class="anchor-icon"></i></a><a href="/api/import">Imported messages</a></h4>
|
||||
<p>Telegram allows importing messages and media from foreign chat apps.</p></div>
|
||||
<p>Telegram allows importing messages and media from foreign chat apps.</p>
|
||||
<h4><a class="anchor" href="#saved-messages" id="saved-messages" name="saved-messages"><i class="anchor-icon"></i></a><a href="/api/saved-messages">Saved messages</a></h4>
|
||||
<p>The Saved Messages chat allows users to bookmark messages and media: it's a personal cloud storage for any messages or media you may want to send or forward there.</p>
|
||||
<h4><a class="anchor" href="#message" id="message" name="message"><i class="anchor-icon"></i></a><a href="/constructor/message">message</a></h4>
|
||||
<p>A message</p></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -82,11 +82,31 @@
|
|||
<td>Whether this media should be hidden behind a spoiler warning</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>video</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.6?<a href="/constructor/true">true</a></td>
|
||||
<td>Whether this is a video.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>round</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.7?<a href="/constructor/true">true</a></td>
|
||||
<td>Whether this is a round video.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>voice</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.8?<a href="/constructor/true">true</a></td>
|
||||
<td>Whether this is a voice message.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>document</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.0?<a href="/type/Document">Document</a></td>
|
||||
<td>Attached document</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>alt_document</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.5?<a href="/type/Document">Document</a></td>
|
||||
<td>Currently only used for story videos, may contain an alternative version of the story video, explicitly encoded using H.264 (in MPEG4 transport) at a lower resolution than <code>document</code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>ttl_seconds</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.2?<a href="/type/int">int</a></td>
|
||||
<td>Time to live of self-destructing document</td>
|
||||
|
|
|
@ -67,6 +67,31 @@
|
|||
</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>force_large_media</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>If set, specifies that a large media preview should be used.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>force_small_media</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.1?<a href="/constructor/true">true</a></td>
|
||||
<td>If set, specifies that a small media preview should be used.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>manual</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.3?<a href="/constructor/true">true</a></td>
|
||||
<td>If set, indicates that the URL used for the webpage preview was specified manually using <a href="/constructor/inputMediaWebPage">inputMediaWebPage</a>, and may not be related to any of the URLs specified in the message.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>safe</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.4?<a href="/constructor/true">true</a></td>
|
||||
<td>If set, the webpage can be opened directly without user confirmation; otherwise, user confirmation is required, showing the exact URL that will be opened.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>webpage</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/WebPage">WebPage</a></td>
|
||||
<td>Webpage preview</td>
|
||||
|
@ -74,7 +99,10 @@
|
|||
</tbody>
|
||||
</table>
|
||||
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
|
||||
<p><a href="/type/MessageMedia">MessageMedia</a></p></div>
|
||||
<p><a href="/type/MessageMedia">MessageMedia</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="#inputmediawebpage" id="inputmediawebpage" name="inputmediawebpage"><i class="anchor-icon"></i></a><a href="/constructor/inputMediaWebPage">inputMediaWebPage</a></h4>
|
||||
<p>Specifies options that will be used to generate the link preview for the caption, or even a standalone link preview without an attached message.</p></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -112,7 +112,7 @@
|
|||
<p>React to message.</p>
|
||||
<p>Starting from layer 159, the reaction will be sent from the peer specified using <a href="/method/messages.saveDefaultSendAs">messages.saveDefaultSendAs</a>.</p>
|
||||
<h4><a class="anchor" href="#messagessavedefaultsendas" id="messagessavedefaultsendas" name="messagessavedefaultsendas"><i class="anchor-icon"></i></a><a href="/method/messages.saveDefaultSendAs">messages.saveDefaultSendAs</a></h4>
|
||||
<p>Change the default peer that should be used when sending messages to a specific group</p></div>
|
||||
<p>Change the default peer that should be used when sending messages, reactions, poll votes to a specific group</p></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>messages.botApp</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Contains information about a named bot web app">
|
||||
<meta property="description" content="Contains information about a direct link Mini App">
|
||||
<meta property="og:title" content="messages.botApp">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Contains information about a named bot web app">
|
||||
<meta property="og:description" content="Contains information about a direct link Mini App">
|
||||
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
|
||||
|
@ -42,7 +42,7 @@
|
|||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/messages.botApp" >messages.botApp</a></li></ul></div>
|
||||
<h1 id="dev_page_title">messages.botApp</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Contains information about a <a href="/api/bots/webapps#named-bot-web-apps">named bot web app</a></p>
|
||||
<div id="dev_page_content"><p>Contains information about a <a href="/api/bots/webapps#direct-link-mini-apps">direct link Mini App</a></p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
@ -82,6 +82,11 @@
|
|||
<td>The bot is asking permission to send messages to the user: if the user agrees, set the <code>write_allowed</code> flag when invoking <a href="/method/messages.requestAppWebView">messages.requestAppWebView</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>has_settings</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.2?<a href="/constructor/true">true</a></td>
|
||||
<td>Deprecated flag, can be ignored.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>app</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/BotApp">BotApp</a></td>
|
||||
<td>Bot app information</td>
|
||||
|
@ -92,9 +97,9 @@
|
|||
<p><a href="/type/messages.BotApp">messages.BotApp</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="#messagesrequestappwebview" id="messagesrequestappwebview" name="messagesrequestappwebview"><i class="anchor-icon"></i></a><a href="/method/messages.requestAppWebView">messages.requestAppWebView</a></h4>
|
||||
<p>Open a <a href="/bots/webapps">bot web app</a> from a <a href="/api/links#named-bot-web-app-links">named bot web app deep link</a>, sending over user information after user confirmation.</p>
|
||||
<p>Open a <a href="/bots/webapps">bot mini app</a> from a <a href="/api/links#direct-mini-app-links">direct Mini App deep link</a>, sending over user information after user confirmation.</p>
|
||||
<p>After calling this method, until the user closes the webview, <a href="/method/messages.prolongWebView">messages.prolongWebView</a> must be called every 60 seconds.</p>
|
||||
<h4><a class="anchor" href="#bot-web-apps" id="bot-web-apps" name="bot-web-apps"><i class="anchor-icon"></i></a><a href="/api/bots/webapps">Bot web apps</a></h4>
|
||||
<h4><a class="anchor" href="#mini-apps-on-telegram" id="mini-apps-on-telegram" name="mini-apps-on-telegram"><i class="anchor-icon"></i></a><a href="/api/bots/webapps">Mini Apps on Telegram</a></h4>
|
||||
<p>Bots can offer users interactive HTML5 web apps to completely replace any website.</p></div>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -92,7 +92,7 @@
|
|||
<p><a href="/type/messages.SearchCounter">messages.SearchCounter</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="#messagessearch" id="messagessearch" name="messagessearch"><i class="anchor-icon"></i></a><a href="/method/messages.search">messages.search</a></h4>
|
||||
<p>Returns found messages</p></div>
|
||||
<p>Search for messages.</p></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -86,6 +86,16 @@
|
|||
<td style="text-align: center;"><a href="/type/string">string</a></td>
|
||||
<td>Transcripted text</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>trial_remains_num</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.1?<a href="/type/int">int</a></td>
|
||||
<td>For non-<a href="/api/premium">Premium</a> users, this flag will be set, indicating the remaining transcriptions in the free trial period.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>trial_remains_until_date</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.1?<a href="/type/int">int</a></td>
|
||||
<td>For non-<a href="/api/premium">Premium</a> users, this flag will be set, indicating the date when the <code>trial_remains_num</code> counter will be reset to the maximum value of <a href="/api/config#transcribe-audio-trial-weekly-number">transcribe_audio_trial_weekly_number</a>.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
|
||||
|
@ -93,6 +103,10 @@
|
|||
<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="#updatetranscribedaudio" id="updatetranscribedaudio" name="updatetranscribedaudio"><i class="anchor-icon"></i></a><a href="/constructor/updateTranscribedAudio">updateTranscribedAudio</a></h4>
|
||||
<p>A pending <a href="/api/transcribe">voice message transcription »</a> initiated with <a href="/method/messages.transcribeAudio">messages.transcribeAudio</a> was updated.</p>
|
||||
<h4><a class="anchor" href="#telegram-premium" id="telegram-premium" name="telegram-premium"><i class="anchor-icon"></i></a><a href="/api/premium">Telegram Premium</a></h4>
|
||||
<p>Telegram Premium is an optional subscription service that unlocks additional exclusive client-side and API-side features, while helping support the development of the app.</p>
|
||||
<h4><a class="anchor" href="#client-configuration" id="client-configuration" name="client-configuration"><i class="anchor-icon"></i></a><a href="/api/config">Client configuration</a></h4>
|
||||
<p>The MTProto API has multiple configuration parameters that can be fetched with the appropriate methods.</p>
|
||||
<h4><a class="anchor" href="#voice-message-transcription" id="voice-message-transcription" name="voice-message-transcription"><i class="anchor-icon"></i></a><a href="/api/transcribe">Voice message transcription</a></h4>
|
||||
<p>How to transcribe voice messages.</p></div>
|
||||
|
||||
|
|
|
@ -122,7 +122,8 @@
|
|||
<p><a href="/type/Poll">Poll</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="#messagessendvote" id="messagessendvote" name="messagessendvote"><i class="anchor-icon"></i></a><a href="/method/messages.sendVote">messages.sendVote</a></h4>
|
||||
<p>Vote in a <a href="/constructor/poll">poll</a></p></div>
|
||||
<p>Vote in a <a href="/constructor/poll">poll</a></p>
|
||||
<p>Starting from layer 159, the vote will be sent from the peer specified using <a href="/method/messages.saveDefaultSendAs">messages.saveDefaultSendAs</a>.</p></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -88,7 +88,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td><strong>recent_voters</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.3?<a href="/type/Vector%20t">Vector</a><<a href="/type/long">long</a>></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.3?<a href="/type/Vector%20t">Vector</a><<a href="/type/Peer">Peer</a>></td>
|
||||
<td>IDs of the last users that recently voted in the poll</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
|
@ -86,7 +86,8 @@
|
|||
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
|
||||
<p><a href="/type/RequestPeerType">RequestPeerType</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-premium" id="telegram-premium" name="telegram-premium"><i class="anchor-icon"></i></a><a href="/api/premium">Telegram Premium</a></h4></div>
|
||||
<h4><a class="anchor" href="#telegram-premium" id="telegram-premium" name="telegram-premium"><i class="anchor-icon"></i></a><a href="/api/premium">Telegram Premium</a></h4>
|
||||
<p>Telegram Premium is an optional subscription service that unlocks additional exclusive client-side and API-side features, while helping support the development of the app.</p></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -112,6 +112,16 @@
|
|||
<td>Parameter for the bot start message if the sponsored chat is a chat with a bot.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>webpage</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.9?<a href="/type/SponsoredWebPage">SponsoredWebPage</a></td>
|
||||
<td>Sponsored website</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>app</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.10?<a href="/type/BotApp">BotApp</a></td>
|
||||
<td><a href="/api/bots/webapps">Mini App »</a> to open when the sponsored message is clicked.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>message</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/string">string</a></td>
|
||||
<td>Sponsored message</td>
|
||||
|
@ -122,6 +132,11 @@
|
|||
<td><a href="/api/entities">Message entities for styled text</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>button_text</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.11?<a href="/type/string">string</a></td>
|
||||
<td>Text of the sponsored message button.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>sponsor_info</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.7?<a href="/type/string">string</a></td>
|
||||
<td>If set, contains additional information about the sponsor to be shown along with the message.</td>
|
||||
|
@ -136,6 +151,8 @@
|
|||
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
|
||||
<p><a href="/type/SponsoredMessage">SponsoredMessage</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="#mini-apps-on-telegram" id="mini-apps-on-telegram" name="mini-apps-on-telegram"><i class="anchor-icon"></i></a><a href="/api/bots/webapps">Mini Apps on Telegram</a></h4>
|
||||
<p>Bots can offer users interactive HTML5 web apps to completely replace any website.</p>
|
||||
<h4><a class="anchor" href="#styled-text-with-message-entities" id="styled-text-with-message-entities" name="styled-text-with-message-entities"><i class="anchor-icon"></i></a><a href="/api/entities">Styled text with message entities</a></h4>
|
||||
<p>How to create styled text with message entities</p></div>
|
||||
|
||||
|
|
|
@ -102,6 +102,16 @@
|
|||
<td>This is a custom emoji stickerset</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>text_color</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.9?<a href="/constructor/true">true</a></td>
|
||||
<td>Whether the color of this TGS custom emoji stickerset should be changed to the text color when used in messages, the accent color if used as emoji status, white on chat photos, or another appropriate color based on context.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>channel_emoji_status</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.10?<a href="/constructor/true">true</a></td>
|
||||
<td>If set, this custom emoji stickerset can be used in <a href="/api/emoji-status">channel emoji statuses</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>installed_date</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.0?<a href="/type/int">int</a></td>
|
||||
<td>When was this stickerset installed</td>
|
||||
|
@ -161,6 +171,8 @@
|
|||
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
|
||||
<p><a href="/type/StickerSet">StickerSet</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="#emoji-status" id="emoji-status" name="emoji-status"><i class="anchor-icon"></i></a><a href="/api/emoji-status">Emoji status</a></h4>
|
||||
<p>Telegram allows users to set an emoticon or a custom emoji as status, to show next to their name in chats and profiles.</p>
|
||||
<h4><a class="anchor" href="#deep-links" id="deep-links" name="deep-links"><i class="anchor-icon"></i></a><a href="/api/links">Deep links</a></h4>
|
||||
<p>Telegram clients must handle special tg:// and t.me deep links encountered in messages, link entities and in other apps by registering OS handlers.</p>
|
||||
<h4><a class="anchor" href="#messagesgetcustomemojidocuments" id="messagesgetcustomemojidocuments" name="messagesgetcustomemojidocuments"><i class="anchor-icon"></i></a><a href="/method/messages.getCustomEmojiDocuments">messages.getCustomEmojiDocuments</a></h4>
|
||||
|
|
|
@ -61,10 +61,10 @@
|
|||
<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="#bot-attachment-menu-entries" id="bot-attachment-menu-entries" name="bot-attachment-menu-entries"><i class="anchor-icon"></i></a><a href="/api/bots/attach">Bot attachment menu entries</a></h4>
|
||||
<p>Bots can install attachment menu entries, offering conveniently accessible, versatile web apps.</p>
|
||||
<h4><a class="anchor" href="#bot-attachment-menu-and-side-menu-entries" id="bot-attachment-menu-and-side-menu-entries" name="bot-attachment-menu-and-side-menu-entries"><i class="anchor-icon"></i></a><a href="/api/bots/attach">Bot attachment menu and side menu entries</a></h4>
|
||||
<p>Bots can install attachment menu and side menu entries, offering conveniently accessible, versatile web apps.</p>
|
||||
<h4><a class="anchor" href="#messagesgetattachmenubots" id="messagesgetattachmenubots" name="messagesgetattachmenubots"><i class="anchor-icon"></i></a><a href="/method/messages.getAttachMenuBots">messages.getAttachMenuBots</a></h4>
|
||||
<p>Returns installed attachment menu <a href="/api/bots/attach">bot web apps »</a></p></div>
|
||||
<p>Returns installed attachment menu <a href="/api/bots/attach">bot mini apps »</a></p></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -4,24 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>updateNewAuthorization</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Authorized to the current user's account through an unknown device.
|
||||
Parameters
|
||||
Name
|
||||
Type
|
||||
Description
|
||||
auth_key_id
|
||||
long
|
||||
Identifier…">
|
||||
<meta property="description" content="A new session logged into the current user's account through an unknown device.">
|
||||
<meta property="og:title" content="updateNewAuthorization">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Authorized to the current user's account through an unknown device.
|
||||
Parameters
|
||||
Name
|
||||
Type
|
||||
Description
|
||||
auth_key_id
|
||||
long
|
||||
Identifier…">
|
||||
<meta property="og:description" content="A new session logged into the current user's account through an unknown device.">
|
||||
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
|
||||
|
@ -56,7 +42,7 @@ Identifier…">
|
|||
<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/updateNewAuthorization" >updateNewAuthorization</a></li></ul></div>
|
||||
<h1 id="dev_page_title">updateNewAuthorization</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Authorized to the current user's account through an unknown device.</p>
|
||||
<div id="dev_page_content"><p>A new session logged into the current user's account through an unknown device.</p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
@ -81,29 +67,44 @@ Identifier…">
|
|||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><strong>auth_key_id</strong></td>
|
||||
<td><strong>flags</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/%23">#</a></td>
|
||||
<td>Flags, see <a href="/mtproto/TL-combinators#conditional-fields">TL conditional fields</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>unconfirmed</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.0?<a href="/constructor/true">true</a></td>
|
||||
<td>Whether the session is <a href="/api/auth#confirming-login">unconfirmed, see here »</a> for more info.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>hash</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/long">long</a></td>
|
||||
<td>Identifier of an authorization key to which the account is linked</td>
|
||||
<td><a href="/api/offsets#hash-generation">Hash for pagination, for more info click here</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>date</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/int">int</a></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.0?<a href="/type/int">int</a></td>
|
||||
<td>Authorization date</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>device</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/string">string</a></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.0?<a href="/type/string">string</a></td>
|
||||
<td>Name of device, for example <em>Android</em></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>location</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/string">string</a></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.0?<a href="/type/string">string</a></td>
|
||||
<td>Location, for example <em>USA, NY (IP=1.2.3.4)</em></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></div>
|
||||
<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="#user-authorization" id="user-authorization" name="user-authorization"><i class="anchor-icon"></i></a><a href="/api/auth">User Authorization</a></h4>
|
||||
<p>How to register a user's phone to start using the API.</p>
|
||||
<h4><a class="anchor" href="#pagination-in-the-api" id="pagination-in-the-api" name="pagination-in-the-api"><i class="anchor-icon"></i></a><a href="/api/offsets">Pagination in the API</a></h4>
|
||||
<p>How to fetch results from large lists of objects.</p></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>updates.channelDifferenceTooLong</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="The provided pts + limit < remote pts. Simply, there are too many updates to be fetched (more than limit), the client has to resolve the update gap in one of the following ways (assuming the existence of a persistent database to locally store messages):">
|
||||
<meta property="description" content="The provided pts + limit < remote pts. Simply, there are too many updates to be fetched (more than limit), the client has to resolve the update gap in one of the following ways (assuming the existence of a persistent database to locally store messages): 1. Delete all known messages in the chat, begin from scratch by refetching all messages manually with messages.getHistory. It is easy to implement, but suddenly disappearing messages look awful to the user. 2. Save all messages loaded in the memory until application restart, but delete all messages from the database. Messages left in the memory must be lazily updated using calls to messages.getHistory. It will look much smoother to the user, they will need to redownload messages only after client restart. Unsynchronized messages left in memory shouldn't be saved to the database, results of messages.getHistory and messages.getMessages must be used to update the state of deleted and edited messages left in the memory. 3. Save all messages loaded in the memory and stored in the database without saving that some messages form continuous ranges. Messages in the database will be excluded when paginating through or searching the local message history after application restart and will be available only through individual message queries. Every message should still be checked using messages.getHistory. It has more disadvantages over 2) than advantages. 4. Save all messages with saving all data about continuous message ranges. Messages from the database may be used when paginating through or searching the local message history. The messages should still be lazily checked using messages.getHistory, but they are still available offline. It is the best way for gaps support, but it is pretty hard to implement correctly. It should be also noted that some messages like live location messages shouldn't be deleted.">
|
||||
<meta property="og:title" content="updates.channelDifferenceTooLong">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="The provided pts + limit < remote pts. Simply, there are too many updates to be fetched (more than limit), the client has to resolve the update gap in one of the following ways (assuming the existence of a persistent database to locally store messages):">
|
||||
<meta property="og:description" content="The provided pts + limit < remote pts. Simply, there are too many updates to be fetched (more than limit), the client has to resolve the update gap in one of the following ways (assuming the existence of a persistent database to locally store messages): 1. Delete all known messages in the chat, begin from scratch by refetching all messages manually with messages.getHistory. It is easy to implement, but suddenly disappearing messages look awful to the user. 2. Save all messages loaded in the memory until application restart, but delete all messages from the database. Messages left in the memory must be lazily updated using calls to messages.getHistory. It will look much smoother to the user, they will need to redownload messages only after client restart. Unsynchronized messages left in memory shouldn't be saved to the database, results of messages.getHistory and messages.getMessages must be used to update the state of deleted and edited messages left in the memory. 3. Save all messages loaded in the memory and stored in the database without saving that some messages form continuous ranges. Messages in the database will be excluded when paginating through or searching the local message history after application restart and will be available only through individual message queries. Every message should still be checked using messages.getHistory. It has more disadvantages over 2) than advantages. 4. Save all messages with saving all data about continuous message ranges. Messages from the database may be used when paginating through or searching the local message history. The messages should still be lazily checked using messages.getHistory, but they are still available offline. It is the best way for gaps support, but it is pretty hard to implement correctly. It should be also noted that some messages like live location messages shouldn't be deleted.">
|
||||
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
|
||||
|
|
|
@ -112,6 +112,21 @@
|
|||
<td>Whether the <a href="/api/translation">real-time chat translation popup</a> should be hidden.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>stories_pinned_available</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.26?<a href="/constructor/true">true</a></td>
|
||||
<td>Whether this user has some <a href="/api/stories#pinned-or-archived-stories">pinned stories</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>blocked_my_stories_from</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.27?<a href="/constructor/true">true</a></td>
|
||||
<td>Whether we've <a href="/api/block">blocked this user, preventing them from seeing our stories »</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>wallpaper_overridden</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.28?<a href="/constructor/true">true</a></td>
|
||||
<td>Whether the other user has chosen a custom wallpaper for us using <a href="/method/messages.setChatWallPaper">messages.setChatWallPaper</a> and the <code>for_both</code> flag, see <a href="/api/wallpapers#installing-wallpapers-in-a-specific-chat-or-channel">here »</a> for more info.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>id</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/long">long</a></td>
|
||||
<td>User ID</td>
|
||||
|
@ -201,6 +216,11 @@
|
|||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.24?<a href="/type/WallPaper">WallPaper</a></td>
|
||||
<td><a href="/api/wallpapers">Wallpaper</a> to use in the private chat with the user.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>stories</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.25?<a href="/type/PeerStories">PeerStories</a></td>
|
||||
<td>Active <a href="/api/stories">stories »</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
|
||||
|
@ -210,14 +230,20 @@
|
|||
<p>Telegram allows scheduling messages</p>
|
||||
<h4><a class="anchor" href="#translation" id="translation" name="translation"><i class="anchor-icon"></i></a><a href="/api/translation">Translation</a></h4>
|
||||
<p>Telegram allows translating chat messages: Telegram Premium users may even enable real-time chat translation.</p>
|
||||
<h4><a class="anchor" href="#stories" id="stories" name="stories"><i class="anchor-icon"></i></a><a href="/api/stories">Stories</a></h4>
|
||||
<p>Telegram users and channels can easily post and view stories through the API.</p>
|
||||
<h4><a class="anchor" href="#blocklist" id="blocklist" name="blocklist"><i class="anchor-icon"></i></a><a href="/api/block">Blocklist</a></h4>
|
||||
<p>Working with the blocklist.</p>
|
||||
<h4><a class="anchor" href="#messagessetchatwallpaper" id="messagessetchatwallpaper" name="messagessetchatwallpaper"><i class="anchor-icon"></i></a><a href="/method/messages.setChatWallPaper">messages.setChatWallPaper</a></h4>
|
||||
<p>Set a custom <a href="/api/wallpapers">wallpaper »</a> in a specific private chat with another user.</p>
|
||||
<h4><a class="anchor" href="#wallpapers" id="wallpapers" name="wallpapers"><i class="anchor-icon"></i></a><a href="/api/wallpapers">Wallpapers</a></h4>
|
||||
<p>Telegram apps support generating, sharing and synchronizing chat backgrounds.</p>
|
||||
<h4><a class="anchor" href="#pinned-messages" id="pinned-messages" name="pinned-messages"><i class="anchor-icon"></i></a><a href="/api/pin">Pinned messages</a></h4>
|
||||
<p>Telegram allows pinning multiple messages on top of a specific chat.</p>
|
||||
<h4><a class="anchor" href="#folders" id="folders" name="folders"><i class="anchor-icon"></i></a><a href="/api/folders">Folders</a></h4>
|
||||
<p>Telegram allows placing chats into folders, based on their type, mute status, or other custom criteria, thanks to folder blacklists and whitelists.</p>
|
||||
<h4><a class="anchor" href="#admin-banned-default-rights" id="admin-banned-default-rights" name="admin-banned-default-rights"><i class="anchor-icon"></i></a><a href="/api/rights">Admin, banned, default rights</a></h4>
|
||||
<p>How to handle admin permissions, granular bans and global permissions in channels, groups and supergroups.</p>
|
||||
<h4><a class="anchor" href="#wallpapers" id="wallpapers" name="wallpapers"><i class="anchor-icon"></i></a><a href="/api/wallpapers">Wallpapers</a></h4>
|
||||
<p>Telegram apps support generating, sharing and synchronizing chat backgrounds.</p></div>
|
||||
<p>How to handle admin permissions, granular bans and global permissions in channels, groups and supergroups.</p></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -71,12 +71,12 @@
|
|||
<tr>
|
||||
<td><strong>key</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/InputPrivacyKey">InputPrivacyKey</a></td>
|
||||
<td>Peers to which the privacy rules apply</td>
|
||||
<td>New privacy rule</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>rules</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/Vector%20t">Vector</a><<a href="/type/InputPrivacyRule">InputPrivacyRule</a>></td>
|
||||
<td>New privacy rules</td>
|
||||
<td>Peers to which the privacy rule will apply.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
@ -109,11 +109,6 @@
|
|||
<td>About string too long.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>403</td>
|
||||
<td>CHAT_WRITE_FORBIDDEN</td>
|
||||
<td>You can't write in this chat.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>FIRSTNAME_INVALID</td>
|
||||
<td>The first name is invalid.</td>
|
||||
|
|
|
@ -78,23 +78,6 @@
|
|||
</table>
|
||||
<h3><a class="anchor" href="#result" id="result" name="result"><i class="anchor-icon"></i></a>Result</h3>
|
||||
<p><a href="/type/Bool">Bool</a></p>
|
||||
<h3><a class="anchor" href="#possible-errors" id="possible-errors" name="possible-errors"><i class="anchor-icon"></i></a>Possible errors</h3>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Code</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>403</td>
|
||||
<td>CHAT_WRITE_FORBIDDEN</td>
|
||||
<td>You can't write in this chat.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
|
||||
<h4><a class="anchor" href="#booltrue" id="booltrue" name="booltrue"><i class="anchor-icon"></i></a><a href="/constructor/boolTrue">boolTrue</a></h4>
|
||||
<p>The constructor can be interpreted as a <strong>boolean</strong><code>true</code> value.</p>
|
||||
|
|
|
@ -115,6 +115,16 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>MSG_ID_INVALID</td>
|
||||
<td>Invalid message ID provided.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>PEER_ID_INVALID</td>
|
||||
<td>The provided peer id is invalid.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>USERNAME_INVALID</td>
|
||||
<td>The provided username is not valid.</td>
|
||||
</tr>
|
||||
|
|
|
@ -112,12 +112,12 @@
|
|||
<tr>
|
||||
<td><strong>geo_point</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.2?<a href="/type/InputGeoPoint">InputGeoPoint</a></td>
|
||||
<td>Geogroup location</td>
|
||||
<td>Geogroup location, see <a href="/api/nearby">here »</a> for more info on geogroups.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>address</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.2?<a href="/type/string">string</a></td>
|
||||
<td>Geogroup address</td>
|
||||
<td>Geogroup address, see <a href="/api/nearby">here »</a> for more info on geogroups.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>ttl_period</strong></td>
|
||||
|
@ -140,6 +140,11 @@
|
|||
<tbody>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>ADDRESS_INVALID</td>
|
||||
<td>The specified geopoint address is invalid.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHANNELS_ADMIN_LOCATED_TOO_MUCH</td>
|
||||
<td>The user has reached the limit of public geogroups.</td>
|
||||
</tr>
|
||||
|
@ -154,11 +159,21 @@
|
|||
<td>Chat about too long.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>500</td>
|
||||
<td>CHAT_INVALID</td>
|
||||
<td>Invalid chat.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHAT_TITLE_EMPTY</td>
|
||||
<td>No chat title provided.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>TTL_PERIOD_INVALID</td>
|
||||
<td>The specified TTL period is invalid.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>406</td>
|
||||
<td>USER_RESTRICTED</td>
|
||||
<td>You're spamreported, you can't create channels or chats.</td>
|
||||
|
@ -172,6 +187,8 @@
|
|||
<p>Import chat history from a foreign chat app into a specific Telegram chat, <a href="/api/import">click here for more info about imported chats »</a>.</p>
|
||||
<h4><a class="anchor" href="#forums" id="forums" name="forums"><i class="anchor-icon"></i></a><a href="/api/forum">Forums</a></h4>
|
||||
<p>Telegram allows creating forums with multiple distinct topics.</p>
|
||||
<h4><a class="anchor" href="#nearby-usersampchats" id="nearby-usersampchats" name="nearby-usersampchats"><i class="anchor-icon"></i></a><a href="/api/nearby">Nearby users&chats</a></h4>
|
||||
<p>How to work with geolocation-based features like geochats and the nearby users feature.</p>
|
||||
<h4><a class="anchor" href="#messagessetdefaulthistoryttl" id="messagessetdefaulthistoryttl" name="messagessetdefaulthistoryttl"><i class="anchor-icon"></i></a><a href="/method/messages.setDefaultHistoryTTL">messages.setDefaultHistoryTTL</a></h4>
|
||||
<p>Changes the default value of the Time-To-Live setting, applied to all new chats.</p></div>
|
||||
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>channels.getLeftChannels</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Get a list of channels/supergroups we left">
|
||||
<meta property="description" content="Get a list of channels/supergroups we left, requires a takeout session, see here » for more info.">
|
||||
<meta property="og:title" content="channels.getLeftChannels">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Get a list of channels/supergroups we left">
|
||||
<meta property="og:description" content="Get a list of channels/supergroups we left, requires a takeout session, see here » for more info.">
|
||||
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
|
||||
|
@ -42,7 +42,7 @@
|
|||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/methods" >All Methods</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/method/channels.getLeftChannels" >channels.getLeftChannels</a></li></ul></div>
|
||||
<h1 id="dev_page_title">channels.getLeftChannels</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Get a list of <a href="/api/channel">channels/supergroups</a> we left</p>
|
||||
<div id="dev_page_content"><p>Get a list of <a href="/api/channel">channels/supergroups</a> we left, requires a <a href="/api/takeout">takeout session, see here » for more info</a>.</p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
@ -91,7 +91,7 @@
|
|||
<tr>
|
||||
<td>403</td>
|
||||
<td>TAKEOUT_REQUIRED</td>
|
||||
<td>A takeout session has to be initialized, first.</td>
|
||||
<td>A <a href="/api/takeout">takeout</a> session needs to be initialized first, <a href="/api/takeout">see here » for more info</a>.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
@ -99,7 +99,9 @@
|
|||
<h4><a class="anchor" href="#pagination-in-the-api" id="pagination-in-the-api" name="pagination-in-the-api"><i class="anchor-icon"></i></a><a href="/api/offsets">Pagination in the API</a></h4>
|
||||
<p>How to fetch results from large lists of objects.</p>
|
||||
<h4><a class="anchor" href="#channels-supergroups-gigagroups-and-basic-groups" id="channels-supergroups-gigagroups-and-basic-groups" name="channels-supergroups-gigagroups-and-basic-groups"><i class="anchor-icon"></i></a><a href="/api/channel">Channels, supergroups, gigagroups and basic groups</a></h4>
|
||||
<p>How to handle channels, supergroups, gigagroups, basic groups, and what's the difference between them.</p></div>
|
||||
<p>How to handle channels, supergroups, gigagroups, basic groups, and what's the difference between them.</p>
|
||||
<h4><a class="anchor" href="#takeout-api" id="takeout-api" name="takeout-api"><i class="anchor-icon"></i></a><a href="/api/takeout">Takeout API</a></h4>
|
||||
<p>Telegram's API allows users to export all of their information through the takeout API.</p></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -115,6 +115,11 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>MSG_ID_INVALID</td>
|
||||
<td>Invalid message ID provided.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>USER_ID_INVALID</td>
|
||||
<td>The provided user ID is invalid.</td>
|
||||
</tr>
|
||||
|
|
|
@ -100,6 +100,11 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHAT_ID_INVALID</td>
|
||||
<td>The provided chat id is invalid.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>PARTICIPANTS_TOO_FEW</td>
|
||||
<td>Not enough participants.</td>
|
||||
</tr>
|
||||
|
|
|
@ -105,13 +105,18 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHAT_ADMIN_REQUIRED</td>
|
||||
<td>You must be an admin in this chat to do this.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHAT_ID_INVALID</td>
|
||||
<td>The provided chat id is invalid.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHAT_NOT_MODIFIED</td>
|
||||
<td>The pinned message wasn't modified.</td>
|
||||
<td>No changes were made to chat information because the new information you passed is identical to the current information.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
|
|
|
@ -100,6 +100,16 @@
|
|||
<tbody>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHANNEL_PRIVATE</td>
|
||||
<td>You haven't joined this channel/supergroup.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHAT_ADMIN_REQUIRED</td>
|
||||
<td>You must be an admin in this chat to do this.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>USERNAMES_ACTIVE_TOO_MUCH</td>
|
||||
<td>The maximum number of active usernames was reached.</td>
|
||||
</tr>
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>contacts.acceptContact</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="If the peer settings of a new user allow us to add them as contact, add that user as contact">
|
||||
<meta property="description" content="If the add contact action bar is active, add that user as contact">
|
||||
<meta property="og:title" content="contacts.acceptContact">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="If the peer settings of a new user allow us to add them as contact, add that user as contact">
|
||||
<meta property="og:description" content="If the add contact action bar is active, add that user as contact">
|
||||
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
|
||||
|
@ -42,7 +42,7 @@
|
|||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/methods" >All Methods</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/method/contacts.acceptContact" >contacts.acceptContact</a></li></ul></div>
|
||||
<h1 id="dev_page_title">contacts.acceptContact</h1>
|
||||
|
||||
<div id="dev_page_content"><p>If the <a href="/constructor/peerSettings">peer settings</a> of a new user allow us to add them as contact, add that user as contact</p>
|
||||
<div id="dev_page_content"><p>If the <a href="/api/action-bar#add-contact">add contact action bar is active</a>, add that user as contact</p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
@ -116,8 +116,8 @@
|
|||
</tbody>
|
||||
</table>
|
||||
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
|
||||
<h4><a class="anchor" href="#peersettings" id="peersettings" name="peersettings"><i class="anchor-icon"></i></a><a href="/constructor/peerSettings">peerSettings</a></h4>
|
||||
<p>List of actions that are possible when interacting with this user, to be shown as suggested actions in the chat bar</p></div>
|
||||
<h4><a class="anchor" href="#action-bar" id="action-bar" name="action-bar"><i class="anchor-icon"></i></a><a href="/api/action-bar">Action bar</a></h4>
|
||||
<p>Sometimes, when interacting with Telegram users via private or secret chats, an action bar must be shown on top of the chat, offering convenient action buttons or notices regarding the user.</p></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -95,6 +95,11 @@
|
|||
<tbody>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHANNEL_PRIVATE</td>
|
||||
<td>You haven't joined this channel/supergroup.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHAT_ID_INVALID</td>
|
||||
<td>The provided chat id is invalid.</td>
|
||||
</tr>
|
||||
|
|
|
@ -126,7 +126,7 @@
|
|||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHAT_NOT_MODIFIED</td>
|
||||
<td>The pinned message wasn't modified.</td>
|
||||
<td>No changes were made to chat information because the new information you passed is identical to the current information.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>403</td>
|
||||
|
|
|
@ -93,7 +93,7 @@
|
|||
<tr>
|
||||
<td><strong>offset_id</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/int">int</a></td>
|
||||
<td><a href="/api/offsets">Offsets for pagination, for more info click here</a></td>
|
||||
<td><a href="/api/offsets">Offsets for pagination, for more info click here</a> (<code>top_message</code> ID used for pagination)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>offset_peer</strong></td>
|
||||
|
|
|
@ -86,12 +86,12 @@
|
|||
<tr>
|
||||
<td><strong>reaction</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.0?<a href="/type/Reaction">Reaction</a></td>
|
||||
<td>Get only reactions of this type (UTF8 emoji)</td>
|
||||
<td>Get only reactions of this type</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>offset</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.1?<a href="/type/string">string</a></td>
|
||||
<td>Offset (typically taken from the <code>next_offset</code> field of the returned <a href="/type/messages.MessageReactionsList">messages.MessageReactionsList</a>)</td>
|
||||
<td>Offset for pagination (taken from the <code>next_offset</code> field of the returned <a href="/type/messages.MessageReactionsList">messages.MessageReactionsList</a>); empty in the first request.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>limit</strong></td>
|
||||
|
@ -115,7 +115,7 @@
|
|||
<tr>
|
||||
<td>403</td>
|
||||
<td>BROADCAST_FORBIDDEN</td>
|
||||
<td>Participants of polls in channels should stay anonymous.</td>
|
||||
<td>Channel poll voters and reactions cannot be fetched to prevent deanonymization.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
|
|
|
@ -115,7 +115,7 @@
|
|||
<tr>
|
||||
<td>403</td>
|
||||
<td>BROADCAST_FORBIDDEN</td>
|
||||
<td>Participants of polls in channels should stay anonymous.</td>
|
||||
<td>Channel poll voters and reactions cannot be fetched to prevent deanonymization.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
|
|
|
@ -78,6 +78,11 @@
|
|||
<td>Peer where to search</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>saved_peer_id</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.2?<a href="/type/InputPeer">InputPeer</a></td>
|
||||
<td>Search within the <a href="/api/saved-messages">saved message dialog »</a> with this ID.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>top_msg_id</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.0?<a href="/type/int">int</a></td>
|
||||
<td>If set, consider only messages within the specified <a href="/api/forum#forum-topics">forum topic</a></td>
|
||||
|
@ -109,10 +114,12 @@
|
|||
</tbody>
|
||||
</table>
|
||||
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
|
||||
<h4><a class="anchor" href="#saved-messages" id="saved-messages" name="saved-messages"><i class="anchor-icon"></i></a><a href="/api/saved-messages">Saved messages</a></h4>
|
||||
<p>The Saved Messages chat allows users to bookmark messages and media: it's a personal cloud storage for any messages or media you may want to send or forward there.</p>
|
||||
<h4><a class="anchor" href="#forums" id="forums" name="forums"><i class="anchor-icon"></i></a><a href="/api/forum">Forums</a></h4>
|
||||
<p>Telegram allows creating forums with multiple distinct topics.</p>
|
||||
<h4><a class="anchor" href="#messagessearch" id="messagessearch" name="messagessearch"><i class="anchor-icon"></i></a><a href="/method/messages.search">messages.search</a></h4>
|
||||
<p>Returns found messages</p></div>
|
||||
<p>Search for messages.</p></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>messages.getSearchResultsCalendar</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Returns information about the next messages of the specified type in the chat split by days.">
|
||||
<meta property="description" content="Returns information about the next messages of the specified type in the chat split by days. Returns the results in reverse chronological order. Can return partial results for the last returned day.">
|
||||
<meta property="og:title" content="messages.getSearchResultsCalendar">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Returns information about the next messages of the specified type in the chat split by days.">
|
||||
<meta property="og:description" content="Returns information about the next messages of the specified type in the chat split by days. Returns the results in reverse chronological order. Can return partial results for the last returned day.">
|
||||
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
|
||||
|
@ -71,11 +71,21 @@ Can return partial results for the last returned day.</p>
|
|||
</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>peer</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/InputPeer">InputPeer</a></td>
|
||||
<td>Peer where to search</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>saved_peer_id</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.2?<a href="/type/InputPeer">InputPeer</a></td>
|
||||
<td>Search within the <a href="/api/saved-messages">saved message dialog »</a> with this ID.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>filter</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/MessagesFilter">MessagesFilter</a></td>
|
||||
<td>Message filter, <a href="/constructor/inputMessagesFilterEmpty">inputMessagesFilterEmpty</a>, <a href="/constructor/inputMessagesFilterMyMentions">inputMessagesFilterMyMentions</a> filters are not supported by this method.</td>
|
||||
|
@ -112,6 +122,8 @@ Can return partial results for the last returned day.</p>
|
|||
</tbody>
|
||||
</table>
|
||||
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
|
||||
<h4><a class="anchor" href="#saved-messages" id="saved-messages" name="saved-messages"><i class="anchor-icon"></i></a><a href="/api/saved-messages">Saved messages</a></h4>
|
||||
<p>The Saved Messages chat allows users to bookmark messages and media: it's a personal cloud storage for any messages or media you may want to send or forward there.</p>
|
||||
<h4><a class="anchor" href="#inputmessagesfilterempty" id="inputmessagesfilterempty" name="inputmessagesfilterempty"><i class="anchor-icon"></i></a><a href="/constructor/inputMessagesFilterEmpty">inputMessagesFilterEmpty</a></h4>
|
||||
<p>Filter is absent.</p>
|
||||
<h4><a class="anchor" href="#inputmessagesfiltermymentions" id="inputmessagesfiltermymentions" name="inputmessagesfiltermymentions"><i class="anchor-icon"></i></a><a href="/constructor/inputMessagesFilterMyMentions">inputMessagesFilterMyMentions</a></h4>
|
||||
|
|
|
@ -84,7 +84,7 @@
|
|||
</tbody>
|
||||
</table>
|
||||
<h3><a class="anchor" href="#result" id="result" name="result"><i class="anchor-icon"></i></a>Result</h3>
|
||||
<p><a href="/type/WebPage">WebPage</a></p>
|
||||
<p><a href="/type/messages.WebPage">messages.WebPage</a></p>
|
||||
<h3><a class="anchor" href="#possible-errors" id="possible-errors" name="possible-errors"><i class="anchor-icon"></i></a>Possible errors</h3>
|
||||
<table class="table">
|
||||
<thead>
|
||||
|
|
|
@ -110,6 +110,16 @@
|
|||
<tbody>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHANNELS_TOO_MUCH</td>
|
||||
<td>You have joined too many channels/supergroups.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHANNEL_INVALID</td>
|
||||
<td>The provided channel is invalid.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHANNEL_PRIVATE</td>
|
||||
<td>You haven't joined this channel/supergroup.</td>
|
||||
</tr>
|
||||
|
|
|
@ -109,6 +109,11 @@
|
|||
<td>The provided chat id is invalid.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>500</td>
|
||||
<td>CHAT_INVALID</td>
|
||||
<td>Invalid chat.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>PEER_ID_INVALID</td>
|
||||
<td>The provided peer id is invalid.</td>
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>messages.requestWebView</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Open a bot web app, sending over user information after user confirmation.">
|
||||
<meta property="description" content="Open a bot mini app, sending over user information after user confirmation. After calling this method, until the user closes the webview, messages.prolongWebView must be called every 60 seconds.">
|
||||
<meta property="og:title" content="messages.requestWebView">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Open a bot web app, sending over user information after user confirmation.">
|
||||
<meta property="og:description" content="Open a bot mini app, sending over user information after user confirmation. After calling this method, until the user closes the webview, messages.prolongWebView must be called every 60 seconds.">
|
||||
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
|
||||
|
@ -42,7 +42,7 @@
|
|||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/methods" >All Methods</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/method/messages.requestWebView" >messages.requestWebView</a></li></ul></div>
|
||||
<h1 id="dev_page_title">messages.requestWebView</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Open a <a href="/bots/webapps">bot web app</a>, sending over user information after user confirmation.</p>
|
||||
<div id="dev_page_content"><p>Open a <a href="/bots/webapps">bot mini app</a>, sending over user information after user confirmation.</p>
|
||||
<p>After calling this method, until the user closes the webview, <a href="/method/messages.prolongWebView">messages.prolongWebView</a> must be called every 60 seconds.</p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
|
@ -102,7 +102,7 @@
|
|||
<tr>
|
||||
<td><strong>start_param</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.3?<a href="/type/string">string</a></td>
|
||||
<td>If the web app was opened from the attachment menu using a <a href="/api/links#bot-attachment-menu-links">attachment menu deep link</a>, <code>start_param</code> should contain the <code>data</code> from the <code>startattach</code> parameter.</td>
|
||||
<td>If the web app was opened from the attachment menu using a <a href="/api/links#bot-attachment-or-side-menu-links">attachment menu deep link</a>, <code>start_param</code> should contain the <code>data</code> from the <code>startattach</code> parameter.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>theme_params</strong></td>
|
||||
|
@ -115,14 +115,9 @@
|
|||
<td>Short name of the application; 0-64 English letters, digits, and underscores</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>reply_to_msg_id</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.0?<a href="/type/int">int</a></td>
|
||||
<td>Whether the inline message that will be sent by the bot on behalf of the user once the web app interaction is <a href="/method/messages.sendWebViewResultMessage">terminated</a> should be sent in reply to this message ID.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>top_msg_id</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.9?<a href="/type/int">int</a></td>
|
||||
<td>This field must contain the topic ID <strong>only</strong> when replying to messages in <a href="/api/forum#forum-topics">forum topics</a> different from the "General" topic (i.e. <code>reply_to_msg_id</code> is set and <code>reply_to_msg_id != topicID</code> and <code>topicID != 1</code>). <br>If the replied-to message is deleted before the method finishes execution, the value in this field will be used to send the message to the correct topic, instead of the "General" topic.</td>
|
||||
<td><strong>reply_to</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.0?<a href="/type/InputReplyTo">InputReplyTo</a></td>
|
||||
<td>If set, indicates that the inline message that will be sent by the bot on behalf of the user once the web app interaction is <a href="/method/messages.sendWebViewResultMessage">terminated</a> should be sent in reply to the specified message or story.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>send_as</strong></td>
|
||||
|
@ -133,18 +128,53 @@
|
|||
</table>
|
||||
<h3><a class="anchor" href="#result" id="result" name="result"><i class="anchor-icon"></i></a>Result</h3>
|
||||
<p><a href="/type/WebViewResult">WebViewResult</a></p>
|
||||
<h3><a class="anchor" href="#possible-errors" id="possible-errors" name="possible-errors"><i class="anchor-icon"></i></a>Possible errors</h3>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Code</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>BOT_INVALID</td>
|
||||
<td>This is not a valid bot.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>BOT_WEBVIEW_DISABLED</td>
|
||||
<td>A webview cannot be opened in the specified conditions: emitted for example if <code>from_bot_menu</code> or <code>url</code> are set and <code>peer</code> is not the chat with the bot.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>INPUT_USER_DEACTIVATED</td>
|
||||
<td>The specified user was deleted.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>PEER_ID_INVALID</td>
|
||||
<td>The provided peer id is invalid.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>YOU_BLOCKED_USER</td>
|
||||
<td>You blocked this user.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
|
||||
<h4><a class="anchor" href="#bot-menu-button" id="bot-menu-button" name="bot-menu-button"><i class="anchor-icon"></i></a><a href="/api/bots/menu">Bot menu button</a></h4>
|
||||
<p>Bots can choose the behavior of the menu button shown next to the text input field.</p>
|
||||
<h4><a class="anchor" href="#messagessendwebviewresultmessage" id="messagessendwebviewresultmessage" name="messagessendwebviewresultmessage"><i class="anchor-icon"></i></a><a href="/method/messages.sendWebViewResultMessage">messages.sendWebViewResultMessage</a></h4>
|
||||
<p>Terminate webview interaction started with <a href="/method/messages.requestWebView">messages.requestWebView</a>, sending the specified message to the chat on behalf of the user.</p>
|
||||
<h4><a class="anchor" href="#bot-web-apps" id="bot-web-apps" name="bot-web-apps"><i class="anchor-icon"></i></a><a href="/api/bots/webapps">Bot web apps</a></h4>
|
||||
<h4><a class="anchor" href="#mini-apps-on-telegram" id="mini-apps-on-telegram" name="mini-apps-on-telegram"><i class="anchor-icon"></i></a><a href="/api/bots/webapps">Mini Apps on Telegram</a></h4>
|
||||
<p>Bots can offer users interactive HTML5 web apps to completely replace any website.</p>
|
||||
<h4><a class="anchor" href="#deep-links" id="deep-links" name="deep-links"><i class="anchor-icon"></i></a><a href="/api/links">Deep links</a></h4>
|
||||
<p>Telegram clients must handle special tg:// and t.me deep links encountered in messages, link entities and in other apps by registering OS handlers.</p>
|
||||
<h4><a class="anchor" href="#forums" id="forums" name="forums"><i class="anchor-icon"></i></a><a href="/api/forum">Forums</a></h4>
|
||||
<p>Telegram allows creating forums with multiple distinct topics.</p>
|
||||
<h4><a class="anchor" href="#web-apps-for-bots" id="web-apps-for-bots" name="web-apps-for-bots"><i class="anchor-icon"></i></a><a href="/bots/webapps">Web Apps for Bots</a></h4>
|
||||
<h4><a class="anchor" href="#telegram-mini-apps" id="telegram-mini-apps" name="telegram-mini-apps"><i class="anchor-icon"></i></a><a href="/bots/webapps">Telegram Mini Apps</a></h4>
|
||||
<h4><a class="anchor" href="#messagesprolongwebview" id="messagesprolongwebview" name="messagesprolongwebview"><i class="anchor-icon"></i></a><a href="/method/messages.prolongWebView">messages.prolongWebView</a></h4>
|
||||
<p>Indicate to the server (from the user side) that the user is still using a web app.</p>
|
||||
<p>If the method returns a <code>QUERY_ID_INVALID</code> error, the webview must be closed.</p></div>
|
||||
|
|
|
@ -105,19 +105,19 @@
|
|||
<td>Whether to move used stickersets to top, <a href="/api/stickers#recent-stickersets">see here for more info on this flag »</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>invert_media</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.16?<a href="/constructor/true">true</a></td>
|
||||
<td>If set, any eventual webpage preview will be shown on top of the message instead of at the bottom.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>peer</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/InputPeer">InputPeer</a></td>
|
||||
<td>Destination</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>reply_to_msg_id</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.0?<a href="/type/int">int</a></td>
|
||||
<td>Message ID to which this message should reply to</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>top_msg_id</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.9?<a href="/type/int">int</a></td>
|
||||
<td>This field must contain the topic ID <strong>only</strong> when replying to messages in <a href="/api/forum#forum-topics">forum topics</a> different from the "General" topic (i.e. <code>reply_to_msg_id</code> is set and <code>reply_to_msg_id != topicID</code> and <code>topicID != 1</code>). <br>If the replied-to message is deleted before the method finishes execution, the value in this field will be used to send the message to the correct topic, instead of the "General" topic.</td>
|
||||
<td><strong>reply_to</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.0?<a href="/type/InputReplyTo">InputReplyTo</a></td>
|
||||
<td>If set, indicates that the message should be sent in reply to the specified message or story.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>media</strong></td>
|
||||
|
@ -250,6 +250,11 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td>403</td>
|
||||
<td>CHAT_SEND_PLAIN_FORBIDDEN</td>
|
||||
<td>You can't send non-media (text) messages in this chat.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>403</td>
|
||||
<td>CHAT_SEND_POLL_FORBIDDEN</td>
|
||||
<td>You can't send polls in this chat.</td>
|
||||
</tr>
|
||||
|
@ -355,6 +360,11 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>MESSAGE_EMPTY</td>
|
||||
<td>The provided message is empty.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>MSG_ID_INVALID</td>
|
||||
<td>Invalid message ID provided.</td>
|
||||
</tr>
|
||||
|
@ -535,6 +545,16 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>WEBPAGE_NOT_FOUND</td>
|
||||
<td>A preview for the specified webpage <code>url</code> could not be generated.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>WEBPAGE_URL_INVALID</td>
|
||||
<td>The specified webpage <code>url</code> is invalid.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>YOU_BLOCKED_USER</td>
|
||||
<td>You blocked this user.</td>
|
||||
</tr>
|
||||
|
@ -544,8 +564,6 @@
|
|||
<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="#stickers" id="stickers" name="stickers"><i class="anchor-icon"></i></a><a href="/api/stickers">Stickers</a></h4>
|
||||
<p>Telegram clients support displaying static and animated stickers.</p>
|
||||
<h4><a class="anchor" href="#forums" id="forums" name="forums"><i class="anchor-icon"></i></a><a href="/api/forum">Forums</a></h4>
|
||||
<p>Telegram allows creating forums with multiple distinct topics.</p>
|
||||
<h4><a class="anchor" href="#styled-text-with-message-entities" id="styled-text-with-message-entities" name="styled-text-with-message-entities"><i class="anchor-icon"></i></a><a href="/api/entities">Styled text with message entities</a></h4>
|
||||
<p>How to create styled text with message entities</p>
|
||||
<h4><a class="anchor" href="#scheduled-messages" id="scheduled-messages" name="scheduled-messages"><i class="anchor-icon"></i></a><a href="/api/scheduled-messages">Scheduled messages</a></h4>
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>messages.sendWebViewData</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Used by the user to relay data from an opened reply keyboard bot web app to the bot that owns it.">
|
||||
<meta property="description" content="Used by the user to relay data from an opened reply keyboard bot mini app to the bot that owns it.">
|
||||
<meta property="og:title" content="messages.sendWebViewData">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Used by the user to relay data from an opened reply keyboard bot web app to the bot that owns it.">
|
||||
<meta property="og:description" content="Used by the user to relay data from an opened reply keyboard bot mini app to the bot that owns it.">
|
||||
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
|
||||
|
@ -42,7 +42,7 @@
|
|||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/methods" >All Methods</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/method/messages.sendWebViewData" >messages.sendWebViewData</a></li></ul></div>
|
||||
<h1 id="dev_page_title">messages.sendWebViewData</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Used by the user to relay data from an opened <a href="/api/bots/webapps">reply keyboard bot web app</a> to the bot that owns it.</p>
|
||||
<div id="dev_page_content"><p>Used by the user to relay data from an opened <a href="/api/bots/webapps">reply keyboard bot mini app</a> to the bot that owns it.</p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
@ -100,11 +100,11 @@
|
|||
<p><a href="/type/Updates">Updates</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="#keyboardbuttonsimplewebview" id="keyboardbuttonsimplewebview" name="keyboardbuttonsimplewebview"><i class="anchor-icon"></i></a><a href="/constructor/keyboardButtonSimpleWebView">keyboardButtonSimpleWebView</a></h4>
|
||||
<p>Button to open a <a href="/api/bots/webapps">bot web app</a> using <a href="/method/messages.requestSimpleWebView">messages.requestSimpleWebView</a>, without sending user information to the web app.</p>
|
||||
<p>Button to open a <a href="/api/bots/webapps">bot mini app</a> using <a href="/method/messages.requestSimpleWebView">messages.requestSimpleWebView</a>, without sending user information to the web app.</p>
|
||||
<p>Can only be sent or received as part of a reply keyboard, use <a href="/constructor/keyboardButtonWebView">keyboardButtonWebView</a> for inline keyboards.</p>
|
||||
<h4><a class="anchor" href="#web-events" id="web-events" name="web-events"><i class="anchor-icon"></i></a><a href="/api/web-events">Web events</a></h4>
|
||||
<p>How telegram apps interact with webpages</p>
|
||||
<h4><a class="anchor" href="#bot-web-apps" id="bot-web-apps" name="bot-web-apps"><i class="anchor-icon"></i></a><a href="/api/bots/webapps">Bot web apps</a></h4>
|
||||
<h4><a class="anchor" href="#mini-apps-on-telegram" id="mini-apps-on-telegram" name="mini-apps-on-telegram"><i class="anchor-icon"></i></a><a href="/api/bots/webapps">Mini Apps on Telegram</a></h4>
|
||||
<p>Bots can offer users interactive HTML5 web apps to completely replace any website.</p></div>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -102,7 +102,7 @@
|
|||
<h3><a class="anchor" href="#bots-can-use-this-method" id="bots-can-use-this-method" name="bots-can-use-this-method"><i class="anchor-icon"></i></a>Bots can use this method</h3>
|
||||
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
|
||||
<h4><a class="anchor" href="#messagesrequestwebview" id="messagesrequestwebview" name="messagesrequestwebview"><i class="anchor-icon"></i></a><a href="/method/messages.requestWebView">messages.requestWebView</a></h4>
|
||||
<p>Open a <a href="/bots/webapps">bot web app</a>, sending over user information after user confirmation.</p>
|
||||
<p>Open a <a href="/bots/webapps">bot mini app</a>, sending over user information after user confirmation.</p>
|
||||
<p>After calling this method, until the user closes the webview, <a href="/method/messages.prolongWebView">messages.prolongWebView</a> must be called every 60 seconds.</p></div>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -80,6 +80,16 @@
|
|||
<td>Flags, see <a href="/mtproto/TL-combinators#conditional-fields">TL conditional fields</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>for_both</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.3?<a href="/constructor/true">true</a></td>
|
||||
<td>Only for <a href="/api/premium">Premium</a> users, sets the specified wallpaper for both users of the chat, without requiring confirmation from the other user.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>revert</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.4?<a href="/constructor/true">true</a></td>
|
||||
<td>If we don't like the new wallpaper the other user of the chat has chosen for us using the <code>for_both</code> flag, we can re-set our previous wallpaper just on our side using this flag.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>peer</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/InputPeer">InputPeer</a></td>
|
||||
<td>The private chat where the wallpaper will be set</td>
|
||||
|
@ -123,10 +133,17 @@
|
|||
<td>WALLPAPER_INVALID</td>
|
||||
<td>The specified wallpaper is invalid.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>WALLPAPER_NOT_FOUND</td>
|
||||
<td>The specified wallpaper could not be found.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3><a class="anchor" href="#bots-can-use-this-method" id="bots-can-use-this-method" name="bots-can-use-this-method"><i class="anchor-icon"></i></a>Bots can use this method</h3>
|
||||
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
|
||||
<h4><a class="anchor" href="#telegram-premium" id="telegram-premium" name="telegram-premium"><i class="anchor-icon"></i></a><a href="/api/premium">Telegram Premium</a></h4>
|
||||
<p>Telegram Premium is an optional subscription service that unlocks additional exclusive client-side and API-side features, while helping support the development of the app.</p>
|
||||
<h4><a class="anchor" href="#wallpapers" id="wallpapers" name="wallpapers"><i class="anchor-icon"></i></a><a href="/api/wallpapers">Wallpapers</a></h4>
|
||||
<p>Telegram apps support generating, sharing and synchronizing chat backgrounds.</p>
|
||||
<h4><a class="anchor" href="#messageactionsetchatwallpaper" id="messageactionsetchatwallpaper" name="messageactionsetchatwallpaper"><i class="anchor-icon"></i></a><a href="/constructor/messageActionSetChatWallPaper">messageActionSetChatWallPaper</a></h4>
|
||||
|
|
|
@ -78,6 +78,23 @@
|
|||
</table>
|
||||
<h3><a class="anchor" href="#result" id="result" name="result"><i class="anchor-icon"></i></a>Result</h3>
|
||||
<p><a href="/type/Bool">Bool</a></p>
|
||||
<h3><a class="anchor" href="#possible-errors" id="possible-errors" name="possible-errors"><i class="anchor-icon"></i></a>Possible errors</h3>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Code</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>TTL_PERIOD_INVALID</td>
|
||||
<td>The specified TTL period is invalid.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3><a class="anchor" href="#bots-can-use-this-method" id="bots-can-use-this-method" name="bots-can-use-this-method"><i class="anchor-icon"></i></a>Bots can use this method</h3></div>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -105,7 +105,7 @@
|
|||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHAT_NOT_MODIFIED</td>
|
||||
<td>The pinned message wasn't modified.</td>
|
||||
<td>No changes were made to chat information because the new information you passed is identical to the current information.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
@ -93,6 +93,11 @@
|
|||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>403</td>
|
||||
<td>GROUPCALL_FORBIDDEN</td>
|
||||
<td>The group call has already ended.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>GROUPCALL_INVALID</td>
|
||||
<td>The specified group call is invalid.</td>
|
||||
|
|
|
@ -102,7 +102,7 @@
|
|||
<tr>
|
||||
<td><strong>invite_hash</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.1?<a href="/type/string">string</a></td>
|
||||
<td>The invitation hash from the <a href="/api/links#video-chatlivestream-links">invite link »</a>, if provided allows speaking in a livestream or muted group chat.</td>
|
||||
<td>The invitation hash from the <a href="/api/links#video-chat-livestream-links">invite link »</a>, if provided allows speaking in a livestream or muted group chat.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>params</strong></td>
|
||||
|
|
|
@ -82,7 +82,7 @@
|
|||
<tr>
|
||||
<td><strong>max_id</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/long">long</a></td>
|
||||
<td>If a positive value was transferred, the method will return only photos with IDs less than the set one</td>
|
||||
<td>If a positive value was transferred, the method will return only photos with IDs less than the set one. This parameter is often useful when <a href="/api/file_reference">refetching file references »</a>, as in conjuction with <code>limit=1</code> and <code>offset=-1</code> the <a href="/constructor/photo">photo</a> object with the <code>id</code> specified in <code>max_id</code> can be fetched.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>limit</strong></td>
|
||||
|
@ -120,7 +120,12 @@
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3><a class="anchor" href="#bots-can-use-this-method" id="bots-can-use-this-method" name="bots-can-use-this-method"><i class="anchor-icon"></i></a>Bots can use this method</h3></div>
|
||||
<h3><a class="anchor" href="#bots-can-use-this-method" id="bots-can-use-this-method" name="bots-can-use-this-method"><i class="anchor-icon"></i></a>Bots can use this method</h3>
|
||||
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
|
||||
<h4><a class="anchor" href="#file-references" id="file-references" name="file-references"><i class="anchor-icon"></i></a><a href="/api/file_reference">File references</a></h4>
|
||||
<p>How to handle file references.</p>
|
||||
<h4><a class="anchor" href="#photo" id="photo" name="photo"><i class="anchor-icon"></i></a><a href="/constructor/photo">photo</a></h4>
|
||||
<p>Photo</p></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>photos.uploadContactProfilePhoto</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Upload a custom profile picture for a contact, or suggest a new profile picture to a contact.">
|
||||
<meta property="description" content="Upload a custom profile picture for a contact, or suggest a new profile picture to a contact. The file, video and video_emoji_markup flags are mutually exclusive.">
|
||||
<meta property="og:title" content="photos.uploadContactProfilePhoto">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Upload a custom profile picture for a contact, or suggest a new profile picture to a contact.">
|
||||
<meta property="og:description" content="Upload a custom profile picture for a contact, or suggest a new profile picture to a contact. The file, video and video_emoji_markup flags are mutually exclusive.">
|
||||
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
|
||||
|
@ -125,6 +125,11 @@
|
|||
<tbody>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>CONTACT_MISSING</td>
|
||||
<td>The specified user is not a contact.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>USER_ID_INVALID</td>
|
||||
<td>The provided user ID is invalid.</td>
|
||||
</tr>
|
||||
|
|
|
@ -92,6 +92,11 @@
|
|||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>CDN_METHOD_INVALID</td>
|
||||
<td>You can't call this method in a CDN DC.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>500</td>
|
||||
<td>CDN_UPLOAD_TIMEOUT</td>
|
||||
<td>A server-side timeout occurred while reuploading the file to the CDN DC.</td>
|
||||
|
|
|
@ -82,7 +82,7 @@
|
|||
<tr>
|
||||
<td><strong>bytes</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/bytes">bytes</a></td>
|
||||
<td>Binary data, contend of a part</td>
|
||||
<td>Binary data, content of a part</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
@ -89,6 +89,11 @@
|
|||
<tbody>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHANNEL_INVALID</td>
|
||||
<td>The provided channel is invalid.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>CHANNEL_PRIVATE</td>
|
||||
<td>You haven't joined this channel/supergroup.</td>
|
||||
</tr>
|
||||
|
@ -99,6 +104,11 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>USERNAME_OCCUPIED</td>
|
||||
<td>The provided username is already occupied.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>400</td>
|
||||
<td>USER_ID_INVALID</td>
|
||||
<td>The provided user ID is invalid.</td>
|
||||
</tr>
|
||||
|
|
|
@ -83,16 +83,35 @@ OR
|
|||
+-+---+----...----+</code></pre>
|
||||
<p>Before sending <em>anything</em> into the underlying socket (see <a href="transports">transports</a>), the client must first send <code>0xef</code> as the first byte (the server <strong>will not</strong> send <code>0xef</code> as the first byte in the first reply).<br>
|
||||
Then, payloads are wrapped in the following envelope:</p>
|
||||
<p>If the packet length divided by four is smaller than 127:</p>
|
||||
<ul>
|
||||
<li>Length: payload length, divided by four, and encoded as a single byte, only if the resulting packet length is a value between <code>0x01..0x7e</code>.</li>
|
||||
<li>Length: payload length, divided by four, and encoded as a single byte</li>
|
||||
<li>Payload: the MTProto payload</li>
|
||||
</ul>
|
||||
<p>If the packet length divided by four is bigger than or equal to 127 (>= <code>0x7f</code>), the following envelope must be used, instead:</p>
|
||||
<p>If the packet length divided by four is bigger than or equal to 127, the following envelope must be used, instead:</p>
|
||||
<ul>
|
||||
<li>Header: A single byte of value <code>0x7f</code></li>
|
||||
<li>Header: A single byte of value <code>0x7f</code> (127)</li>
|
||||
<li>Length: payload length, divided by four, and encoded as 3 length bytes (little endian)</li>
|
||||
<li>Payload: the MTProto payload</li>
|
||||
</ul>
|
||||
<p><a href="#quick-ack">Quick ACK »</a> may be enabled for this transport. </p>
|
||||
<p>To request a quick ACK from the server for an encrypted MTProto payload, use the following envelope for <em>outgoing</em> messages, instead of the one specified above.</p>
|
||||
<p>If the packet length divided by four is smaller than 127:</p>
|
||||
<ul>
|
||||
<li>Length: payload length, divided by four, plus 128, and encoded as a single byte (<code>(length/2)+128</code> or <code>(length >> 2) | (1 << 7)</code>); i.e. the most significant bit must be set.</li>
|
||||
<li>Payload: the MTProto payload</li>
|
||||
</ul>
|
||||
<p>If the packet length divided by four is bigger than or equal to 127, the following envelope must be used, instead:</p>
|
||||
<ul>
|
||||
<li>Header: A single byte of value <code>0xff</code> (255)</li>
|
||||
<li>Length: payload length, divided by four, and encoded as 3 length bytes (little endian); same as for a normal abridged envelope.</li>
|
||||
<li>Payload: the MTProto payload</li>
|
||||
</ul>
|
||||
<p>The server will send quick ACK tokens by bswapping them (i.e. inverting the order of the 4 bytes of the ACK token) and sending them as a standalone 4-byte packet without a length header. </p>
|
||||
<pre><code>+----+
|
||||
|dcba|
|
||||
+----+</code></pre>
|
||||
<p>These quick ACK packets can be easily distinguished from normal abridged packets because the first byte will always have the most-significant bit set (because quick ACK tokens have the most-significant bit of the last byte set, and since they are bswapped the last byte will come first), and the length/header of normal payload packets coming from the server is always less than or equal to 127 (thus the most-significant bit is not set for normal payloads). </p>
|
||||
<h3><a class="anchor" href="#intermediate" id="intermediate" name="intermediate"><i class="anchor-icon"></i></a>Intermediate</h3>
|
||||
<p>In case 4-byte data alignment is needed, an <em>intermediate</em> version of the original protocol may be used.</p>
|
||||
<ul>
|
||||
|
@ -110,6 +129,13 @@ Then, payloads are wrapped in the following envelope:</p>
|
|||
<li>Length: payload length encoded as 4 length bytes (little endian)</li>
|
||||
<li>Payload: the MTProto payload</li>
|
||||
</ul>
|
||||
<p><a href="#quick-ack">Quick ACK »</a> may be enabled for this transport. </p>
|
||||
<p>To request a quick ACK from the server for an encrypted MTProto payload, add <code>0x80000000</code> to the <code>len</code> field before encoding it (equivalent to doing <code>len = len | (1 << 31)</code>, i.e. set the most-significant bit of the length). </p>
|
||||
<p>The server will send quick ACK tokens as a standalone 4-byte packet without a length header.</p>
|
||||
<pre><code>+----+
|
||||
|abcd|
|
||||
+----+</code></pre>
|
||||
<p>These quick ACK packets can be easily distinguished from normal intermediate packets because quick ACK tokens always have the most-significant bit of the last byte set, and trying to decode an ACK token as a little-endian 32-bit integer will always yield a value bigger than or equal to <code>0x80000000</code>, which can never be a valid packet length. </p>
|
||||
<h3><a class="anchor" href="#padded-intermediate" id="padded-intermediate" name="padded-intermediate"><i class="anchor-icon"></i></a>Padded intermediate</h3>
|
||||
<p>Padded version of the <a href="#intermediate">intermediate protocol</a>, to use with <a href="#transport-obfuscation">obfuscation enabled</a> to <strong>bypass ISP blocks</strong>.</p>
|
||||
<ul>
|
||||
|
@ -128,6 +154,14 @@ Then, payloads are wrapped in the following envelope:</p>
|
|||
<li>Payload: the MTProto payload</li>
|
||||
<li>Padding: A random padding string of length <code>0-15</code></li>
|
||||
</ul>
|
||||
<p><a href="#quick-ack">Quick ACK »</a> may be enabled for this transport. </p>
|
||||
<p>To request a quick ACK from the server for an encrypted MTProto payload, add <code>0x80000000</code> to the <code>len</code> field before encoding it (equivalent to doing <code>len = len | (1 << 31)</code>, i.e. set the most-significant bit of the length). </p>
|
||||
<p>The server will send quick ACK tokens as a standalone 8 to 16-byte packet (excluding the length of the packet itself, encoded as usual), containing a 4-byte header with all bits set, followed by the ACK token (<code>abcd</code>), followed by 0 to 8 random padding bytes.</p>
|
||||
<pre><code>+----+----+----+----...----+
|
||||
|tlen|FFFF|abcd| padding |
|
||||
+----+----+----+----...----+</code></pre>
|
||||
<p>These quick ACK packets can be easily distinguished from normal intermediate padded packets because their length will be always smaller than or equal to 16, smaller than any MTProto packet.<br>
|
||||
They can be distinguished from transport errors because the first 4 bytes of the payload are equal to <code>0xFFFFFFFF</code>, not a valid transport error. </p>
|
||||
<h3><a class="anchor" href="#full" id="full" name="full"><i class="anchor-icon"></i></a>Full</h3>
|
||||
<p>The basic MTProto transport protocol</p>
|
||||
<ul>
|
||||
|
@ -149,17 +183,25 @@ Then, payloads are wrapped in the following envelope:</p>
|
|||
<h3><a class="anchor" href="#transport-features" id="transport-features" name="transport-features"><i class="anchor-icon"></i></a>Transport features</h3>
|
||||
<p>Additionally, the following transport features can be used: </p>
|
||||
<h4><a class="anchor" href="#quick-ack" id="quick-ack" name="quick-ack"><i class="anchor-icon"></i></a>Quick ack</h4>
|
||||
<p>These MTProto transport protocols have support for quick acknowledgment.
|
||||
In this case, the client sets the highest-order length bit in the query packet, and the server responds with a special 4 bytes as a separate packet.
|
||||
They are the 32 higher-order bits of SHA256 of the encrypted portion of the packet prepended by 32 bytes from the authorization key (the same hash as computed for verifying the message key), with the most significant bit set to make clear that this is not the length of a regular server response packet; if the abridged version is used, bswap is applied to these four bytes.</p>
|
||||
<p>Some of the TCP transports listed above support quick ACKs: quick ACKs are a way for clients to get quick receipt acknowledgements for packets. </p>
|
||||
<p>To request a quick ack for a specific outgoing payload, clients must set the MSB of an appropriate field in the transport envelope (as described in the documentation for each transport protocol above). </p>
|
||||
<p>Also, clients must generate and store a quick ACK token, associating it with the outgoing MTProto payload, by:</p>
|
||||
<ul>
|
||||
<li>Taking the first 32 bits of the SHA256 of the encrypted portion of the payload prepended by 32 bytes from the authorization key (the same hash generated when computing the <a href="/mtproto/description#message-key-msg-key">message key</a>, except that instead of taking the middle 128 bits, the first 32 bits are taken instead). </li>
|
||||
<li>Setting the MSB of the last byte to 1: in other words, treat the 32 bits generated above as a little-endian integer, then add <code>0x80000000</code> to it (i.e. <code>ack_token = msg_key_long[0:4] | (1 << 31)</code> on a little-endian system). </li>
|
||||
</ul>
|
||||
<p>Once the payload is successfully received, decrypted and accepted for processing by the server, the server will send back the same quick ACK token we generated above, using the encoding described in the documentation for each transport protocol. </p>
|
||||
<p>Note that reception of a quick ACK <strong>does not</strong> indicate that any of the RPC queries contained in the message have succeeded, failed or finished execution at all, it simply indicates that they have been received, decrypted and accepted for processing by the server. </p>
|
||||
<p>The server will still send <code>msgs_ack</code> constructors for content-related constructors and methods contained in payloads which were quick ACKed, as well as replies/errors for methods and constructors, as usual. </p>
|
||||
<h4><a class="anchor" href="#transport-errors" id="transport-errors" name="transport-errors"><i class="anchor-icon"></i></a>Transport errors</h4>
|
||||
<p>In the event of a transport error (missing auth key, transport flood, etc.), the server may send a packet with a signed little-endian number of 4 bytes, whose <strong>absolute value</strong> contains the error code (the error itself is actually negative). </p>
|
||||
<p>For example, error Code 403 corresponds to situations where the corresponding HTTP error would have been returned by the HTTP protocol.</p>
|
||||
<p>Error 404 (auth key not found) is returned when the specified auth key ID cannot be found by the DC.</p>
|
||||
<p>Error 429 (transport flood) is returned when too many transport connections are established to the same IP in a too short lapse of time, or if any of the <a href="/mtproto/service_messages#simple-container">container</a>/<a href="/mtproto/service_messages_about_messages#acknowledgment-of-receipt">service message limits</a> are reached.</p>
|
||||
<p>Error 444 (invalid DC) is returned while <a href="/mtproto/auth_key#presenting-proof-of-work-server-authentication">creating an auth key</a>, <a href="#transport-obfuscation">connecting to an MTProxy</a> or in other contexts if an invalid DC ID is specified.</p>
|
||||
<p>In the event of a transport error (missing auth key, transport flood, etc.), the server may send a packet (framed as an MTProto payload by the chosen MTProto transport) with a signed little-endian number of 4 bytes, whose <strong>absolute value</strong> contains the error code (the error itself is actually negative). </p>
|
||||
<p>For example, error Code 403 corresponds to situations where the corresponding HTTP error would have been returned by the HTTP protocol. </p>
|
||||
<p>Error 404 (auth key not found) is returned when the specified auth key ID cannot be found by the DC, during the initial MTProto handshake if any of the specified queries is incorrect, or during normal operation for example if some MTProto fields are incorrect (i.e. the MTProto packet length is bigger than the transport-specified packet length, and so on). </p>
|
||||
<p>Error 429 (transport flood) is returned when too many transport connections are established to the same IP in a too short lapse of time, or if any of the <a href="/mtproto/service_messages#simple-container">container</a>/<a href="/mtproto/service_messages_about_messages#acknowledgment-of-receipt">service message limits</a> are reached. </p>
|
||||
<p>Error 444 (invalid DC) is returned while <a href="/mtproto/auth_key#presenting-proof-of-work-server-authentication">creating an auth key</a>, <a href="#transport-obfuscation">connecting to an MTProxy</a> or in other contexts if an invalid DC ID is specified. </p>
|
||||
<p>When using the <a href="/mtproto/transports#http">HTTP</a>/<a href="/mtproto/transports#https">HTTPS</a> transports, transport errors are not transmitted as specified above, instead they are simply returned as normal HTTP status codes (and the HTTP payload must be ignored). </p>
|
||||
<h4><a class="anchor" href="#transport-obfuscation" id="transport-obfuscation" name="transport-obfuscation"><i class="anchor-icon"></i></a>Transport obfuscation</h4>
|
||||
<p>Transport obfuscation is required to use the <a href="transports#websocket">websocket transports</a>.</p>
|
||||
<p>Transport obfuscation is required to use the <a href="transports#websocket">WebSocket transports</a>.</p>
|
||||
<p>Transport obfuscation to <strong>prevent ISP blocks</strong> is implemented using the following protocol, situated under the MTProto transport in the ISO/OSI stack, see the <a href="/mtproto#recap">recap</a>; this means that the payload is first wrapped in the <a href="/mtproto/mtproto-transports">MTProto transport envelope</a> (all transports are supported), and then obfuscated: </p>
|
||||
<p>Prior to establishing the connection (and eventually sending the protocol header of a specific <a href="/mtproto/mtproto-transports">MTProto transport</a>), a 64-byte (512-bit) <strong>random</strong> initialization payload is generated.
|
||||
During the generation process, special care must be taken in order to avoid a situation where that the first int (first four bytes) of the random string are equal to one of the known protocol identifiers (see above).<br>
|
||||
|
@ -182,12 +224,12 @@ In other words, reuse the two encryption and decryption <strong>AES-256-CTR</str
|
|||
<p>The first thing that must be encrypted using the encryption key is the initialization payload itself.
|
||||
Then bytes <code>56-64</code> of the encrypted initialization payload are substituted in the original initialization payload: this is the part that contains the constant MTProto transport protocol identifier and the DC ID (<strong>only for MTProxies</strong>).</p>
|
||||
<p>The final initialization payload must then be sent in the socket as <strong>first 64 bytes</strong> after the TCP handshake.</p>
|
||||
<p>Example pseudocode for the generation of an MTProxy connection payload (media DC 4) using the obfuscated <a href="#padded-intermediate">padded intermediate</a> transport.
|
||||
<p>Example pseudocode for the generation of an MTProxy connection payload (media DC 4) using the obfuscated <a href="#padded-intermediate">padded intermediate</a> transport.<br>
|
||||
<strong>Warning</strong>: do not use the specified proxy secret in any MTProxy exposed on the internet.</p>
|
||||
<pre><code>protocol := 0xdddddddd
|
||||
dc := 0xfcff
|
||||
|
||||
while 1:
|
||||
while True:
|
||||
init := (56 random bytes) + protocol + dc + (2 random bytes)
|
||||
|
||||
if init[0] == 0xef:
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>AttachMenuBots</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Represents a list of bot web apps that can be launched from the attachment menu »">
|
||||
<meta property="description" content="Represents a list of bot mini apps that can be launched from the attachment menu »">
|
||||
<meta property="og:title" content="AttachMenuBots">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Represents a list of bot web apps that can be launched from the attachment menu »">
|
||||
<meta property="og:description" content="Represents a list of bot mini apps that can be launched from the attachment menu »">
|
||||
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
|
||||
|
@ -42,7 +42,7 @@
|
|||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/type/AttachMenuBots" >AttachMenuBots</a></li></ul></div>
|
||||
<h1 id="dev_page_title">AttachMenuBots</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Represents a list of <a href="/bots/webapps#launching-web-apps-from-the-attachment-menu">bot web apps that can be launched from the attachment menu »</a></p>
|
||||
<div id="dev_page_content"><p>Represents a list of <a href="/bots/webapps#launching-mini-apps-from-the-attachment-menu">bot mini apps that can be launched from the attachment menu »</a></p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
@ -72,11 +72,11 @@
|
|||
<tbody>
|
||||
<tr>
|
||||
<td><a href="/constructor/attachMenuBotsNotModified">attachMenuBotsNotModified</a></td>
|
||||
<td>The list of bot web apps hasn't changed</td>
|
||||
<td>The list of bot mini apps hasn't changed</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/attachMenuBots">attachMenuBots</a></td>
|
||||
<td>Represents a list of <a href="/api/bots/attach">bot web apps that can be launched from the attachment menu »</a></td>
|
||||
<td>Represents a list of <a href="/api/bots/attach">bot mini apps that can be launched from the attachment menu »</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
@ -91,12 +91,12 @@
|
|||
<tbody>
|
||||
<tr>
|
||||
<td><a href="/method/messages.getAttachMenuBots">messages.getAttachMenuBots</a></td>
|
||||
<td>Returns installed attachment menu <a href="/api/bots/attach">bot web apps »</a></td>
|
||||
<td>Returns installed attachment menu <a href="/api/bots/attach">bot mini apps »</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
|
||||
<h4><a class="anchor" href="#web-apps-for-bots" id="web-apps-for-bots" name="web-apps-for-bots"><i class="anchor-icon"></i></a><a href="/bots/webapps">Web Apps for Bots</a></h4></div>
|
||||
<h4><a class="anchor" href="#telegram-mini-apps" id="telegram-mini-apps" name="telegram-mini-apps"><i class="anchor-icon"></i></a><a href="/bots/webapps">Telegram Mini Apps</a></h4></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -99,6 +99,10 @@
|
|||
<td><a href="/constructor/inputBotInlineMessageMediaInvoice">inputBotInlineMessageMediaInvoice</a></td>
|
||||
<td>An invoice</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/inputBotInlineMessageMediaWebPage">inputBotInlineMessageMediaWebPage</a></td>
|
||||
<td>Specifies options that will be used to generate the link preview for the message, or even a standalone link preview without an attached message.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
|
||||
|
|
|
@ -92,7 +92,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/inputTakeoutFileLocation">inputTakeoutFileLocation</a></td>
|
||||
<td>Empty constructor for takeout</td>
|
||||
<td>Used to download a JSON file that will contain all personal data related to features that do not have a specialized <a href="/api/takeout">takeout method</a> yet, see <a href="/api/takeout">here »</a> for more info on the takeout API.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/inputPhotoFileLocation">inputPhotoFileLocation</a></td>
|
||||
|
|
|
@ -139,6 +139,14 @@
|
|||
<td><a href="/constructor/inputMediaDice">inputMediaDice</a></td>
|
||||
<td>Send a <a href="/api/dice">dice-based animated sticker</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/inputMediaStory">inputMediaStory</a></td>
|
||||
<td>Forwarded story</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/inputMediaWebPage">inputMediaWebPage</a></td>
|
||||
<td>Specifies options that will be used to generate the link preview for the caption, or even a standalone link preview without an attached message.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
|
||||
|
|
|
@ -135,6 +135,18 @@
|
|||
<td><a href="/constructor/messageMediaDice">messageMediaDice</a></td>
|
||||
<td><a href="/api/dice">Dice-based animated sticker</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/messageMediaStory">messageMediaStory</a></td>
|
||||
<td>Represents a forwarded <a href="/api/stories">story</a> or a story mention.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/messageMediaGiveaway">messageMediaGiveaway</a></td>
|
||||
<td>Contains info about a <a href="/api/giveaways">giveaway, see here »</a> for more info.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/constructor/messageMediaGiveawayResults">messageMediaGiveawayResults</a></td>
|
||||
<td>A <a href="/api/giveaways">giveaway</a> with public winners has finished, this constructor contains info about the winners.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3><a class="anchor" href="#methods" id="methods" name="methods"><i class="anchor-icon"></i></a>Methods</h3>
|
||||
|
|
|
@ -86,7 +86,7 @@
|
|||
<tbody>
|
||||
<tr>
|
||||
<td><a href="/method/messages.requestSimpleWebView">messages.requestSimpleWebView</a></td>
|
||||
<td>Open a <a href="/api/bots/webapps">bot web app</a>.</td>
|
||||
<td>Open a <a href="/api/bots/webapps">bot mini app</a>.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
|
|
|
@ -86,7 +86,7 @@
|
|||
<tbody>
|
||||
<tr>
|
||||
<td><a href="/method/messages.requestWebView">messages.requestWebView</a></td>
|
||||
<td>Open a <a href="/bots/webapps">bot web app</a>, sending over user information after user confirmation.<br><br>After calling this method, until the user closes the webview, <a href="/method/messages.prolongWebView">messages.prolongWebView</a> must be called every 60 seconds.</td>
|
||||
<td>Open a <a href="/bots/webapps">bot mini app</a>, sending over user information after user confirmation.<br><br>After calling this method, until the user closes the webview, <a href="/method/messages.prolongWebView">messages.prolongWebView</a> must be called every 60 seconds.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
|
|
|
@ -123,7 +123,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/messages.search">messages.search</a></td>
|
||||
<td>Returns found messages</td>
|
||||
<td>Search for messages.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/channels.getMessages">channels.getMessages</a></td>
|
||||
|
@ -154,10 +154,6 @@
|
|||
<td>Get messages in a reply thread</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/stats.getMessagePublicForwards">stats.getMessagePublicForwards</a></td>
|
||||
<td>Obtains a list of messages, indicating to which other public channels was a channel message forwarded. <br>Will return a list of <a href="/constructor/message">messages</a> with <code>peer_id</code> equal to the public channel to which this message was forwarded.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/messages.getUnreadReactions">messages.getUnreadReactions</a></td>
|
||||
<td>Get unread reactions to messages you sent</td>
|
||||
</tr>
|
||||
|
@ -165,6 +161,10 @@
|
|||
<td><a href="/method/messages.searchSentMedia">messages.searchSentMedia</a></td>
|
||||
<td>View and search recently sent media. <br>This method does not support pagination.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/method/messages.getSavedHistory">messages.getSavedHistory</a></td>
|
||||
<td>Returns <a href="/api/saved-messages">saved messages »</a> forwarded from a specific peer</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
|
||||
<p>Admins of supergroups with a certain number of members can choose to unleash the full proactive power of Telegram's own antispam algorithms – turning on the new Aggressive mode for the automated spam filters.</p>
|
||||
<p>Schema:</p>
|
||||
<pre><code><a href='/constructor/channelFull'>channelFull</a>#f2355507 flags:<a href='/type/%23'>#</a> can_view_participants:flags.3?<a href='/constructor/true'>true</a> can_set_username:flags.6?<a href='/constructor/true'>true</a> can_set_stickers:flags.7?<a href='/constructor/true'>true</a> hidden_prehistory:flags.10?<a href='/constructor/true'>true</a> can_set_location:flags.16?<a href='/constructor/true'>true</a> has_scheduled:flags.19?<a href='/constructor/true'>true</a> can_view_stats:flags.20?<a href='/constructor/true'>true</a> blocked:flags.22?<a href='/constructor/true'>true</a> flags2:<a href='/type/%23'>#</a> can_delete_channel:flags2.0?<a href='/constructor/true'>true</a> antispam:flags2.1?<a href='/constructor/true'>true</a> participants_hidden:flags2.2?<a href='/constructor/true'>true</a> translations_disabled:flags2.3?<a href='/constructor/true'>true</a> id:<a href='/type/long'>long</a> about:<a href='/type/string'>string</a> participants_count:flags.0?<a href='/type/int'>int</a> admins_count:flags.1?<a href='/type/int'>int</a> kicked_count:flags.2?<a href='/type/int'>int</a> banned_count:flags.2?<a href='/type/int'>int</a> online_count:flags.13?<a href='/type/int'>int</a> read_inbox_max_id:<a href='/type/int'>int</a> read_outbox_max_id:<a href='/type/int'>int</a> unread_count:<a href='/type/int'>int</a> chat_photo:<a href='/type/Photo'>Photo</a> notify_settings:<a href='/type/PeerNotifySettings'>PeerNotifySettings</a> exported_invite:flags.23?<a href='/type/ExportedChatInvite'>ExportedChatInvite</a> bot_info:<a href='/type/Vector%20t'>Vector</a><<a href='/type/BotInfo'>BotInfo</a>> migrated_from_chat_id:flags.4?<a href='/type/long'>long</a> migrated_from_max_id:flags.4?<a href='/type/int'>int</a> pinned_msg_id:flags.5?<a href='/type/int'>int</a> stickerset:flags.8?<a href='/type/StickerSet'>StickerSet</a> available_min_id:flags.9?<a href='/type/int'>int</a> folder_id:flags.11?<a href='/type/int'>int</a> linked_chat_id:flags.14?<a href='/type/long'>long</a> location:flags.15?<a href='/type/ChannelLocation'>ChannelLocation</a> slowmode_seconds:flags.17?<a href='/type/int'>int</a> slowmode_next_send_date:flags.18?<a href='/type/int'>int</a> stats_dc:flags.12?<a href='/type/int'>int</a> pts:<a href='/type/int'>int</a> call:flags.21?<a href='/type/InputGroupCall'>InputGroupCall</a> ttl_period:flags.24?<a href='/type/int'>int</a> pending_suggestions:flags.25?<a href='/type/Vector%20t'>Vector</a><<a href='/type/string'>string</a>> groupcall_default_join_as:flags.26?<a href='/type/Peer'>Peer</a> theme_emoticon:flags.27?<a href='/type/string'>string</a> requests_pending:flags.28?<a href='/type/int'>int</a> recent_requesters:flags.28?<a href='/type/Vector%20t'>Vector</a><<a href='/type/long'>long</a>> default_send_as:flags.29?<a href='/type/Peer'>Peer</a> available_reactions:flags.30?<a href='/type/ChatReactions'>ChatReactions</a> = <a href='/type/ChatFull'>ChatFull</a>;
|
||||
<pre><code><a href='/constructor/channelFull'>channelFull</a>#f2bcb6f flags:<a href='/type/%23'>#</a> can_view_participants:flags.3?<a href='/constructor/true'>true</a> can_set_username:flags.6?<a href='/constructor/true'>true</a> can_set_stickers:flags.7?<a href='/constructor/true'>true</a> hidden_prehistory:flags.10?<a href='/constructor/true'>true</a> can_set_location:flags.16?<a href='/constructor/true'>true</a> has_scheduled:flags.19?<a href='/constructor/true'>true</a> can_view_stats:flags.20?<a href='/constructor/true'>true</a> blocked:flags.22?<a href='/constructor/true'>true</a> flags2:<a href='/type/%23'>#</a> can_delete_channel:flags2.0?<a href='/constructor/true'>true</a> antispam:flags2.1?<a href='/constructor/true'>true</a> participants_hidden:flags2.2?<a href='/constructor/true'>true</a> translations_disabled:flags2.3?<a href='/constructor/true'>true</a> stories_pinned_available:flags2.5?<a href='/constructor/true'>true</a> view_forum_as_messages:flags2.6?<a href='/constructor/true'>true</a> id:<a href='/type/long'>long</a> about:<a href='/type/string'>string</a> participants_count:flags.0?<a href='/type/int'>int</a> admins_count:flags.1?<a href='/type/int'>int</a> kicked_count:flags.2?<a href='/type/int'>int</a> banned_count:flags.2?<a href='/type/int'>int</a> online_count:flags.13?<a href='/type/int'>int</a> read_inbox_max_id:<a href='/type/int'>int</a> read_outbox_max_id:<a href='/type/int'>int</a> unread_count:<a href='/type/int'>int</a> chat_photo:<a href='/type/Photo'>Photo</a> notify_settings:<a href='/type/PeerNotifySettings'>PeerNotifySettings</a> exported_invite:flags.23?<a href='/type/ExportedChatInvite'>ExportedChatInvite</a> bot_info:<a href='/type/Vector%20t'>Vector</a><<a href='/type/BotInfo'>BotInfo</a>> migrated_from_chat_id:flags.4?<a href='/type/long'>long</a> migrated_from_max_id:flags.4?<a href='/type/int'>int</a> pinned_msg_id:flags.5?<a href='/type/int'>int</a> stickerset:flags.8?<a href='/type/StickerSet'>StickerSet</a> available_min_id:flags.9?<a href='/type/int'>int</a> folder_id:flags.11?<a href='/type/int'>int</a> linked_chat_id:flags.14?<a href='/type/long'>long</a> location:flags.15?<a href='/type/ChannelLocation'>ChannelLocation</a> slowmode_seconds:flags.17?<a href='/type/int'>int</a> slowmode_next_send_date:flags.18?<a href='/type/int'>int</a> stats_dc:flags.12?<a href='/type/int'>int</a> pts:<a href='/type/int'>int</a> call:flags.21?<a href='/type/InputGroupCall'>InputGroupCall</a> ttl_period:flags.24?<a href='/type/int'>int</a> pending_suggestions:flags.25?<a href='/type/Vector%20t'>Vector</a><<a href='/type/string'>string</a>> groupcall_default_join_as:flags.26?<a href='/type/Peer'>Peer</a> theme_emoticon:flags.27?<a href='/type/string'>string</a> requests_pending:flags.28?<a href='/type/int'>int</a> recent_requesters:flags.28?<a href='/type/Vector%20t'>Vector</a><<a href='/type/long'>long</a>> default_send_as:flags.29?<a href='/type/Peer'>Peer</a> available_reactions:flags.30?<a href='/type/ChatReactions'>ChatReactions</a> stories:flags2.4?<a href='/type/PeerStories'>PeerStories</a> wallpaper:flags2.7?<a href='/type/WallPaper'>WallPaper</a> = <a href='/type/ChatFull'>ChatFull</a>;
|
||||
|
||||
<a href='/constructor/channelAdminLogEventActionToggleAntiSpam'>channelAdminLogEventActionToggleAntiSpam</a>#64f36dfc new_value:<a href='/type/Bool'>Bool</a> = <a href='/type/ChannelAdminLogEventAction'>ChannelAdminLogEventAction</a>;
|
||||
<a href='/constructor/channelAdminLogEventActionDeleteMessage'>channelAdminLogEventActionDeleteMessage</a>#42e047bb message:<a href='/type/Message'>Message</a> = <a href='/type/ChannelAdminLogEventAction'>ChannelAdminLogEventAction</a>;
|
||||
|
|
|
@ -207,16 +207,52 @@ After obtaining the ID token, call <a href="/method/account.verifyEmail">account
|
|||
</ul>
|
||||
<p>If the user cannot access their email address, an email reset may be requested using <a href="/method/auth.resetLoginEmail">auth.resetLoginEmail</a>. </p>
|
||||
<p>To change the login email after login, pass <a href="/constructor/emailVerifyPurposeLoginChange">emailVerifyPurposeLoginChange</a> as <code>purpose</code>, following the exact same Google ID/Apple ID/email code login flow as above: on success, the <a href="/method/account.verifyEmail">account.verifyEmail</a> method will return an <a href="/constructor/account.emailVerified">account.emailVerified</a> constructor.</p>
|
||||
<h3><a class="anchor" href="#sign-insign-up" id="sign-insign-up" name="sign-insign-up"><i class="anchor-icon"></i></a>Sign in/sign up</h3>
|
||||
<h3><a class="anchor" href="#sign-in-sign-up" id="sign-in-sign-up" name="sign-in-sign-up"><i class="anchor-icon"></i></a>Sign in/sign up</h3>
|
||||
<p>When user enters verification code, the <a href="/method/auth.signIn">auth.signIn</a> method must be used to validate it and possibly sign user in.</p>
|
||||
<p>If the code was entered correctly, but the method returns <a href="/constructor/auth.authorizationSignUpRequired">auth.authorizationSignUpRequired</a>, it means that account with this phone number doesn't exist yet: user needs to provide basic information, accept terms of service and then the new user registration method (<a href="/method/auth.signUp">auth.signUp</a>) must be invoked.</p>
|
||||
<h3><a class="anchor" href="#2fa" id="2fa" name="2fa"><i class="anchor-icon"></i></a>2FA</h3>
|
||||
<p>When trying to sign in using <a href="/method/auth.signIn">auth.signIn</a>, an <a href="/method/auth.signIn#possible-errors">error 400 SESSION_PASSWORD_NEEDED</a> may be returned, if the user has two-factor authentication enabled.
|
||||
In this case, instructions for <a href="/api/srp">SRP 2FA authentication</a> must be followed.</p>
|
||||
<p>To set up two-factor authorization on an already authorized account, follow the <a href="/api/srp">SRP 2FA authentication docs</a>.</p>
|
||||
<h4><a class="anchor" href="#test-accounts" id="test-accounts" name="test-accounts"><i class="anchor-icon"></i></a>Test Accounts</h4>
|
||||
<h3><a class="anchor" href="#confirming-login" id="confirming-login" name="confirming-login"><i class="anchor-icon"></i></a>Confirming login</h3>
|
||||
<pre><code><a href='/constructor/authorization'>authorization</a>#ad01d61d flags:<a href='/type/%23'>#</a> current:flags.0?<a href='/constructor/true'>true</a> official_app:flags.1?<a href='/constructor/true'>true</a> password_pending:flags.2?<a href='/constructor/true'>true</a> encrypted_requests_disabled:flags.3?<a href='/constructor/true'>true</a> call_requests_disabled:flags.4?<a href='/constructor/true'>true</a> unconfirmed:flags.5?<a href='/constructor/true'>true</a> hash:<a href='/type/long'>long</a> device_model:<a href='/type/string'>string</a> platform:<a href='/type/string'>string</a> system_version:<a href='/type/string'>string</a> api_id:<a href='/type/int'>int</a> app_name:<a href='/type/string'>string</a> app_version:<a href='/type/string'>string</a> date_created:<a href='/type/int'>int</a> date_active:<a href='/type/int'>int</a> ip:<a href='/type/string'>string</a> country:<a href='/type/string'>string</a> region:<a href='/type/string'>string</a> = <a href='/type/Authorization'>Authorization</a>;
|
||||
|
||||
<a href='/constructor/account.authorizations'>account.authorizations</a>#4bff8ea0 authorization_ttl_days:<a href='/type/int'>int</a> authorizations:<a href='/type/Vector%20t'>Vector</a><<a href='/type/Authorization'>Authorization</a>> = <a href='/type/account.Authorizations'>account.Authorizations</a>;
|
||||
|
||||
<a href='/constructor/updateNewAuthorization'>updateNewAuthorization</a>#8951abef flags:<a href='/type/%23'>#</a> unconfirmed:flags.0?<a href='/constructor/true'>true</a> hash:<a href='/type/long'>long</a> date:flags.0?<a href='/type/int'>int</a> device:flags.0?<a href='/type/string'>string</a> location:flags.0?<a href='/type/string'>string</a> = <a href='/type/Update'>Update</a>;
|
||||
|
||||
---functions---
|
||||
|
||||
<a href='/method/account.getAuthorizations'>account.getAuthorizations</a>#e320c158 = <a href='/type/account.Authorizations'>account.Authorizations</a>;
|
||||
|
||||
<a href='/method/account.changeAuthorizationSettings'>account.changeAuthorizationSettings</a>#40f48462 flags:<a href='/type/%23'>#</a> confirmed:flags.3?<a href='/constructor/true'>true</a> hash:<a href='/type/long'>long</a> encrypted_requests_disabled:flags.0?<a href='/type/Bool'>Bool</a> call_requests_disabled:flags.1?<a href='/type/Bool'>Bool</a> = <a href='/type/Bool'>Bool</a>;
|
||||
|
||||
<a href='/method/account.resetAuthorization'>account.resetAuthorization</a>#df77f3bc hash:<a href='/type/long'>long</a> = <a href='/type/Bool'>Bool</a>;</code></pre>
|
||||
<p>When logging in, other logged-in sessions will receive an <a href="/constructor/updateNewAuthorization">updateNewAuthorization</a> update.<br>
|
||||
If the <code>unconfirmed</code> flag is set, clients should display a notification, asking the user if they recognize the session. </p>
|
||||
<p>If the user clicks on the Yes button, invoke <a href="/method/account.changeAuthorizationSettings">account.changeAuthorizationSettings</a> with the new session's <code>hash</code> and the <code>confirmed</code> flag set, confirming the specified session. </p>
|
||||
<p>If the user clicks on the No button, invoke <a href="/method/account.resetAuthorization">account.resetAuthorization</a> with the new session's <code>hash</code>, logging out the specified session. </p>
|
||||
<p>If no action is taken by the user, the session will be autoconfirmed <code>authorization_autoconfirm_period</code> seconds after login (see the associated <a href="/api/config#authorization-autoconfirm-period">client configuration parameter »</a>). </p>
|
||||
<h3><a class="anchor" href="#invalidating-login-codes" id="invalidating-login-codes" name="invalidating-login-codes"><i class="anchor-icon"></i></a>Invalidating login codes</h3>
|
||||
<p>Telegram's servers will automatically invalidate login codes if they are sent by the user to another Telegram chat, either by forwarding them or by sending them inside of a message: however, clients should also manually and immediately invalidate login codes if the user attempts to screenshot or forward a message sent by the login notification service user (ID <code>777000</code>) containing login codes. </p>
|
||||
<p>If an incoming message that is:</p>
|
||||
<ul>
|
||||
<li>Sent by the login notification service user (ID <code>777000</code>)</li>
|
||||
<li>AND is a text message (not a media)</li>
|
||||
<li>AND contains one or more login codes, defined as a sequence of 5 to 7 decimal digits, optionally interleaved with or followed by any number of <code>-</code> characters (<a href="https://github.com/tdlib/td/blob/07c1d53a6d3cb1fad58d2822e55eef6d57363581/td/telegram/MessagesManager.cpp#L6513">example implementation »</a>)</li>
|
||||
</ul>
|
||||
<p>Is either:</p>
|
||||
<ul>
|
||||
<li>Screenshotted by the user</li>
|
||||
<li>OR forwarded by the user to any chat</li>
|
||||
</ul>
|
||||
<p><a href="/method/account.invalidateSignInCodes">account.invalidateSignInCodes</a> should be invoked, passing the extracted login <code>codes</code> (excluding any <code>-</code> characeters). </p>
|
||||
<pre><code>---functions---
|
||||
|
||||
<a href='/method/account.invalidateSignInCodes'>account.invalidateSignInCodes</a>#ca8ae8ba codes:<a href='/type/Vector%20t'>Vector</a><<a href='/type/string'>string</a>> = <a href='/type/Bool'>Bool</a>;</code></pre>
|
||||
<h3><a class="anchor" href="#test-accounts" id="test-accounts" name="test-accounts"><i class="anchor-icon"></i></a>Test Accounts</h3>
|
||||
<p>Each phone number is limited to only a certain amount of logins per day (e.g. 5, but this is subject to change) after which the API will return a FLOOD error until the next day. This might not be enough for testing the implementation of User Authorization flows in client applications.</p>
|
||||
<p>There are several reserved phone number prefixes for testing that your application handles redirects between DCs, sign up, sign in and 2FA flows correctly. These numbers are only available on <strong>Test DCs</strong> (their IP addresses for TCP transport are available in <a href="https://my.telegram.org/apps">API development tools</a> panel after <a href="https://core.telegram.org/api/obtaining_api_id#obtaining-api-id">api_id was obtained</a>, <a href="https://core.telegram.org/mtproto/transports#uri-format">URI format</a> for HTTPS/Websocket transport).</p>
|
||||
<p>There are several reserved phone number prefixes for testing that your application handles redirects between DCs, sign up, sign in and 2FA flows correctly. These numbers are only available on <strong>Test DCs</strong> (their IP addresses for TCP transport are available in <a href="https://my.telegram.org/apps">API development tools</a> panel after <a href="https://core.telegram.org/api/obtaining_api_id#obtaining-api-id">api_id was obtained</a>, <a href="https://core.telegram.org/mtproto/transports#uri-format">URI format</a> for HTTPS/WebSocket transport).</p>
|
||||
<p>If you wish to emulate an application of a user associated with DC number X, it is sufficient to specify the phone number as <code>99966XYYYY</code>, where YYYY are random numbers, when registering the user. A user like this would always get XXXXX as the login confirmation code (the DC number, repeated five times). Note that the value of X must be in the range of 1-3 because there are only 3 Test DCs. When the flood limit is reached for any particular test number, just choose another number (changing the YYYY random part).</p>
|
||||
<p>Do not store any important or private information in the messages of such test accounts; anyone can make use of the simplified authorization mechanism – and we periodically wipe all information stored there.</p>
|
||||
<p>Proceed with User Authorization flows in <strong>Production DCs</strong> only after you make sure everything works correctly on <strong>Test DCs</strong> first to avoid reaching flood limits.</p>
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Page not found</title>
|
||||
<title>Nearby users&chats</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="">
|
||||
<meta property="og:title" content="Page not found">
|
||||
<meta property="description" content="How to work with geolocation-based features like geochats and the nearby users feature.">
|
||||
<meta property="og:title" content="Nearby users&chats">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="">
|
||||
<meta property="og:description" content="How to work with geolocation-based features like geochats and the nearby users feature.">
|
||||
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
|
||||
|
@ -39,10 +39,44 @@
|
|||
<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></li></ul></div>
|
||||
<h1 id="dev_page_title">Page not found</h1>
|
||||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/api/nearby" >Nearby users&chats</a></li></ul></div>
|
||||
<h1 id="dev_page_title">Nearby users&chats</h1>
|
||||
|
||||
<div id="dev_page_content">The page has not been saved</div>
|
||||
<div id="dev_page_content"><!-- scroll_nav -->
|
||||
|
||||
<p>How to work with geolocation-based features like geochats and the nearby users feature.</p>
|
||||
<h3><a class="anchor" href="#fetching-nearby-users-and-geogroups" id="fetching-nearby-users-and-geogroups" name="fetching-nearby-users-and-geogroups"><i class="anchor-icon"></i></a>Fetching nearby users and geogroups</h3>
|
||||
<pre><code><a href='/constructor/inputGeoPoint'>inputGeoPoint</a>#48222faf flags:<a href='/type/%23'>#</a> lat:<a href='/type/double'>double</a> long:<a href='/type/double'>double</a> accuracy_radius:flags.0?<a href='/type/int'>int</a> = <a href='/type/InputGeoPoint'>InputGeoPoint</a>;
|
||||
|
||||
---functions---
|
||||
|
||||
<a href='/method/contacts.getLocated'>contacts.getLocated</a>#d348bc44 flags:<a href='/type/%23'>#</a> background:flags.1?<a href='/constructor/true'>true</a> geo_point:<a href='/type/InputGeoPoint'>InputGeoPoint</a> self_expires:flags.0?<a href='/type/int'>int</a> = <a href='/type/Updates'>Updates</a>;</code></pre>
|
||||
<p>Use <a href="/method/contacts.getLocated">contacts.getLocated</a> to fetch a list of nearby users and groups. </p>
|
||||
<p>Do <strong>not</strong> set any of the <code>background</code>, <code>self_expires</code> flags: only populate <code>geo_point</code> with the current geolocation of the user: a list of users and geochats located nearby will be returned (<strong>without</strong> publishing the current location of the user). </p>
|
||||
<p>This functionality is useful for example to <a href="/api/contacts#adding-telegram-users-as-contacts">exchange contacts</a> with a nearby Telegram user, or <a href="/method/channels.joinChannel">join</a> a location-based group chat, see <a href="https://telegram.org/blog/contacts-local-groups">here »</a> for more usecases. </p>
|
||||
<p>See <a href="#creating-a-geogroup">here »</a> for more info on how to create a geogroup, and <a href="#advertising-our-current-location">here »</a> for more info on how to advertise our current location to other users. </p>
|
||||
<h3><a class="anchor" href="#creating-a-geogroup" id="creating-a-geogroup" name="creating-a-geogroup"><i class="anchor-icon"></i></a>Creating a geogroup</h3>
|
||||
<pre><code><a href='/constructor/inputGeoPoint'>inputGeoPoint</a>#48222faf flags:<a href='/type/%23'>#</a> lat:<a href='/type/double'>double</a> long:<a href='/type/double'>double</a> accuracy_radius:flags.0?<a href='/type/int'>int</a> = <a href='/type/InputGeoPoint'>InputGeoPoint</a>;
|
||||
|
||||
---functions---
|
||||
|
||||
<a href='/method/channels.createChannel'>channels.createChannel</a>#91006707 flags:<a href='/type/%23'>#</a> broadcast:flags.0?<a href='/constructor/true'>true</a> megagroup:flags.1?<a href='/constructor/true'>true</a> for_import:flags.3?<a href='/constructor/true'>true</a> forum:flags.5?<a href='/constructor/true'>true</a> title:<a href='/type/string'>string</a> about:<a href='/type/string'>string</a> geo_point:flags.2?<a href='/type/InputGeoPoint'>InputGeoPoint</a> address:flags.2?<a href='/type/string'>string</a> ttl_period:flags.4?<a href='/type/int'>int</a> = <a href='/type/Updates'>Updates</a>;
|
||||
|
||||
<a href='/method/channels.editLocation'>channels.editLocation</a>#58e63f6d channel:<a href='/type/InputChannel'>InputChannel</a> geo_point:<a href='/type/InputGeoPoint'>InputGeoPoint</a> address:<a href='/type/string'>string</a> = <a href='/type/Bool'>Bool</a>;</code></pre>
|
||||
<p>Pass a <code>geo_point</code> to <a href="/method/channels.createChannel">channels.createChannel</a> when creating a <a href="/api/channel">supergroup</a> in order to create a geogroup associated to a geolocation, that will be returned to <a href="#fetching-nearby-users-and-geogroups">nearby users »</a>. </p>
|
||||
<p>A textual description of the location (1-64 UTF-8 chars) should also be passed in <code>address</code>. </p>
|
||||
<p>Use <a href="/method/channels.editLocation">channels.editLocation</a> to change the group's location.</p>
|
||||
<h3><a class="anchor" href="#advertising-our-current-location" id="advertising-our-current-location" name="advertising-our-current-location"><i class="anchor-icon"></i></a>Advertising our current location</h3>
|
||||
<pre><code><a href='/constructor/inputGeoPoint'>inputGeoPoint</a>#48222faf flags:<a href='/type/%23'>#</a> lat:<a href='/type/double'>double</a> long:<a href='/type/double'>double</a> accuracy_radius:flags.0?<a href='/type/int'>int</a> = <a href='/type/InputGeoPoint'>InputGeoPoint</a>;
|
||||
|
||||
---functions---
|
||||
|
||||
<a href='/method/contacts.getLocated'>contacts.getLocated</a>#d348bc44 flags:<a href='/type/%23'>#</a> background:flags.1?<a href='/constructor/true'>true</a> geo_point:<a href='/type/InputGeoPoint'>InputGeoPoint</a> self_expires:flags.0?<a href='/type/int'>int</a> = <a href='/type/Updates'>Updates</a>;</code></pre>
|
||||
<p>Our current location may be <a href="#fetching-nearby-users-and-geogroups">advertised to other users</a> using <a href="/method/contacts.getLocated">contacts.getLocated</a>: in this case the <code>self_expires</code> flag <strong>must always be set</strong>.</p>
|
||||
<p>This flag is used to specify the expiration TTL of the passed geolocation (i.e. the geolocation will expire after <code>self_expires</code> seconds); pass <code>0x7fffffff</code> to disable expiry, 0 to make the current geolocation private. </p>
|
||||
<p>The method will also return a list of nearby users and chats, but only if the passed expiration TTL is not equal to zero.<br>
|
||||
Users may still fetch nearby users and chats without making their geolocation public by simply not setting the flag, see <a href="#fetching-nearby-users-and-geogroups">here »</a> for more info. </p>
|
||||
<p>While the geolocation of the current user is public, clients should update it in the background every half-an-hour or so (or in any case before the expiration date specified with <code>self_expires</code>), while setting this flag: if the new location is more than 1 KM away from the previous one, or if the previous location is unknown, the <code>background</code> flag should be set.</p></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
@ -109,8 +143,11 @@
|
|||
</div>
|
||||
</div>
|
||||
<script src="/js/main.js?47"></script>
|
||||
|
||||
<script>backToTopInit("Go up");
|
||||
<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>
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
<html class="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Page not found</title>
|
||||
<title>Privacy</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="">
|
||||
<meta property="og:title" content="Page not found">
|
||||
<meta property="description" content="Telegram allows users to specify granular privacy settings, choosing which users can or can't interact with them in certain ways.">
|
||||
<meta property="og:title" content="Privacy">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="">
|
||||
<meta property="og:description" content="Telegram allows users to specify granular privacy settings, choosing which users can or can't interact with them in certain ways.">
|
||||
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
|
||||
|
@ -39,10 +39,95 @@
|
|||
<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></li></ul></div>
|
||||
<h1 id="dev_page_title">Page not found</h1>
|
||||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/api/privacy" >Privacy</a></li></ul></div>
|
||||
<h1 id="dev_page_title">Privacy</h1>
|
||||
|
||||
<div id="dev_page_content">The page has not been saved</div>
|
||||
<div id="dev_page_content"><!-- scroll_nav -->
|
||||
|
||||
<p>Telegram allows users to specify granular privacy settings, choosing which users can or can't interact with them in certain ways.</p>
|
||||
<h3><a class="anchor" href="#privacy-rules" id="privacy-rules" name="privacy-rules"><i class="anchor-icon"></i></a>Privacy rules</h3>
|
||||
<p>Schema:</p>
|
||||
<pre><code><a href='/constructor/inputPrivacyValueAllowContacts'>inputPrivacyValueAllowContacts</a>#d09e07b = <a href='/type/InputPrivacyRule'>InputPrivacyRule</a>;
|
||||
<a href='/constructor/inputPrivacyValueAllowAll'>inputPrivacyValueAllowAll</a>#184b35ce = <a href='/type/InputPrivacyRule'>InputPrivacyRule</a>;
|
||||
<a href='/constructor/inputPrivacyValueAllowUsers'>inputPrivacyValueAllowUsers</a>#131cc67f users:<a href='/type/Vector%20t'>Vector</a><<a href='/type/InputUser'>InputUser</a>> = <a href='/type/InputPrivacyRule'>InputPrivacyRule</a>;
|
||||
<a href='/constructor/inputPrivacyValueDisallowContacts'>inputPrivacyValueDisallowContacts</a>#ba52007 = <a href='/type/InputPrivacyRule'>InputPrivacyRule</a>;
|
||||
<a href='/constructor/inputPrivacyValueDisallowAll'>inputPrivacyValueDisallowAll</a>#d66b66c9 = <a href='/type/InputPrivacyRule'>InputPrivacyRule</a>;
|
||||
<a href='/constructor/inputPrivacyValueDisallowUsers'>inputPrivacyValueDisallowUsers</a>#90110467 users:<a href='/type/Vector%20t'>Vector</a><<a href='/type/InputUser'>InputUser</a>> = <a href='/type/InputPrivacyRule'>InputPrivacyRule</a>;
|
||||
<a href='/constructor/inputPrivacyValueAllowChatParticipants'>inputPrivacyValueAllowChatParticipants</a>#840649cf chats:<a href='/type/Vector%20t'>Vector</a><<a href='/type/long'>long</a>> = <a href='/type/InputPrivacyRule'>InputPrivacyRule</a>;
|
||||
<a href='/constructor/inputPrivacyValueDisallowChatParticipants'>inputPrivacyValueDisallowChatParticipants</a>#e94f0f86 chats:<a href='/type/Vector%20t'>Vector</a><<a href='/type/long'>long</a>> = <a href='/type/InputPrivacyRule'>InputPrivacyRule</a>;
|
||||
<a href='/constructor/inputPrivacyValueAllowCloseFriends'>inputPrivacyValueAllowCloseFriends</a>#2f453e49 = <a href='/type/InputPrivacyRule'>InputPrivacyRule</a>;
|
||||
|
||||
<a href='/constructor/privacyValueAllowContacts'>privacyValueAllowContacts</a>#fffe1bac = <a href='/type/PrivacyRule'>PrivacyRule</a>;
|
||||
<a href='/constructor/privacyValueAllowAll'>privacyValueAllowAll</a>#65427b82 = <a href='/type/PrivacyRule'>PrivacyRule</a>;
|
||||
<a href='/constructor/privacyValueAllowUsers'>privacyValueAllowUsers</a>#b8905fb2 users:<a href='/type/Vector%20t'>Vector</a><<a href='/type/long'>long</a>> = <a href='/type/PrivacyRule'>PrivacyRule</a>;
|
||||
<a href='/constructor/privacyValueDisallowContacts'>privacyValueDisallowContacts</a>#f888fa1a = <a href='/type/PrivacyRule'>PrivacyRule</a>;
|
||||
<a href='/constructor/privacyValueDisallowAll'>privacyValueDisallowAll</a>#8b73e763 = <a href='/type/PrivacyRule'>PrivacyRule</a>;
|
||||
<a href='/constructor/privacyValueDisallowUsers'>privacyValueDisallowUsers</a>#e4621141 users:<a href='/type/Vector%20t'>Vector</a><<a href='/type/long'>long</a>> = <a href='/type/PrivacyRule'>PrivacyRule</a>;
|
||||
<a href='/constructor/privacyValueAllowChatParticipants'>privacyValueAllowChatParticipants</a>#6b134e8e chats:<a href='/type/Vector%20t'>Vector</a><<a href='/type/long'>long</a>> = <a href='/type/PrivacyRule'>PrivacyRule</a>;
|
||||
<a href='/constructor/privacyValueDisallowChatParticipants'>privacyValueDisallowChatParticipants</a>#41c87565 chats:<a href='/type/Vector%20t'>Vector</a><<a href='/type/long'>long</a>> = <a href='/type/PrivacyRule'>PrivacyRule</a>;
|
||||
<a href='/constructor/privacyValueAllowCloseFriends'>privacyValueAllowCloseFriends</a>#f7e8d89b = <a href='/type/PrivacyRule'>PrivacyRule</a>;
|
||||
|
||||
<a href='/constructor/user'>user</a>#215c4438 flags:<a href='/type/%23'>#</a> self:flags.10?<a href='/constructor/true'>true</a> contact:flags.11?<a href='/constructor/true'>true</a> mutual_contact:flags.12?<a href='/constructor/true'>true</a> deleted:flags.13?<a href='/constructor/true'>true</a> bot:flags.14?<a href='/constructor/true'>true</a> bot_chat_history:flags.15?<a href='/constructor/true'>true</a> bot_nochats:flags.16?<a href='/constructor/true'>true</a> verified:flags.17?<a href='/constructor/true'>true</a> restricted:flags.18?<a href='/constructor/true'>true</a> min:flags.20?<a href='/constructor/true'>true</a> bot_inline_geo:flags.21?<a href='/constructor/true'>true</a> support:flags.23?<a href='/constructor/true'>true</a> scam:flags.24?<a href='/constructor/true'>true</a> apply_min_photo:flags.25?<a href='/constructor/true'>true</a> fake:flags.26?<a href='/constructor/true'>true</a> bot_attach_menu:flags.27?<a href='/constructor/true'>true</a> premium:flags.28?<a href='/constructor/true'>true</a> attach_menu_enabled:flags.29?<a href='/constructor/true'>true</a> flags2:<a href='/type/%23'>#</a> bot_can_edit:flags2.1?<a href='/constructor/true'>true</a> close_friend:flags2.2?<a href='/constructor/true'>true</a> stories_hidden:flags2.3?<a href='/constructor/true'>true</a> stories_unavailable:flags2.4?<a href='/constructor/true'>true</a> id:<a href='/type/long'>long</a> access_hash:flags.0?<a href='/type/long'>long</a> first_name:flags.1?<a href='/type/string'>string</a> last_name:flags.2?<a href='/type/string'>string</a> username:flags.3?<a href='/type/string'>string</a> phone:flags.4?<a href='/type/string'>string</a> photo:flags.5?<a href='/type/UserProfilePhoto'>UserProfilePhoto</a> status:flags.6?<a href='/type/UserStatus'>UserStatus</a> bot_info_version:flags.14?<a href='/type/int'>int</a> restriction_reason:flags.18?<a href='/type/Vector%20t'>Vector</a><<a href='/type/RestrictionReason'>RestrictionReason</a>> bot_inline_placeholder:flags.19?<a href='/type/string'>string</a> lang_code:flags.22?<a href='/type/string'>string</a> emoji_status:flags.30?<a href='/type/EmojiStatus'>EmojiStatus</a> usernames:flags2.0?<a href='/type/Vector%20t'>Vector</a><<a href='/type/Username'>Username</a>> stories_max_id:flags2.5?<a href='/type/int'>int</a> color:flags2.8?<a href='/type/PeerColor'>PeerColor</a> profile_color:flags2.9?<a href='/type/PeerColor'>PeerColor</a> = <a href='/type/User'>User</a>;
|
||||
|
||||
---functions---
|
||||
|
||||
<a href='/method/contacts.editCloseFriends'>contacts.editCloseFriends</a>#ba6705f0 id:<a href='/type/Vector%20t'>Vector</a><<a href='/type/long'>long</a>> = <a href='/type/Bool'>Bool</a>;</code></pre>
|
||||
<p>Privacy <strong>rules</strong> indicate <em>who</em> can or can't do something and are specified by a <a href="/type/PrivacyRule">PrivacyRule</a>, and its input counterpart <a href="/type/InputPrivacyRule">InputPrivacyRule</a>.<br>
|
||||
<a href="/type/InputPrivacyRule">InputPrivacyRule</a> constructors are <em>passed</em> as input to methods that accept privacy rules, while <a href="/type/PrivacyRule">PrivacyRule</a>s are contained in constructors <em>returned</em> by the API. </p>
|
||||
<p>See <a href="/type/InputPrivacyRule">the type page »</a> for a full list of privacy rules and their descriptions. </p>
|
||||
<p>One privacy rule in particular should be mentioned separately, (input)<a href="/constructor/privacyValueAllowCloseFriends">privacyValueAllowCloseFriends</a>: this privacy rule, which can be used only when <a href="/api/stories">posting stories</a>, refers exclusively to a list of "close friends", that can be modified using <a href="/method/contacts.editCloseFriends">contacts.editCloseFriends</a>, passing the full close friend list as a list of user IDs: note that only users <a href="/api/contacts">in the contact list (even without a phone number) »</a> can be added to the close friends list. </p>
|
||||
<p>The current list of close friends can be checking which users in our contact list have the <code>close_friend</code> flag set in the associated <a href="/constructor/user">user</a> constructor, see <a href="/api/contacts#fetching-the-contact-list">here »</a> for more info on how to fetch the contact list.</p>
|
||||
<h3><a class="anchor" href="#privacy-keys" id="privacy-keys" name="privacy-keys"><i class="anchor-icon"></i></a>Privacy keys</h3>
|
||||
<p>Schema:</p>
|
||||
<pre><code><a href='/constructor/inputPrivacyKeyStatusTimestamp'>inputPrivacyKeyStatusTimestamp</a>#4f96cb18 = <a href='/type/InputPrivacyKey'>InputPrivacyKey</a>;
|
||||
<a href='/constructor/inputPrivacyKeyChatInvite'>inputPrivacyKeyChatInvite</a>#bdfb0426 = <a href='/type/InputPrivacyKey'>InputPrivacyKey</a>;
|
||||
<a href='/constructor/inputPrivacyKeyPhoneCall'>inputPrivacyKeyPhoneCall</a>#fabadc5f = <a href='/type/InputPrivacyKey'>InputPrivacyKey</a>;
|
||||
<a href='/constructor/inputPrivacyKeyPhoneP2P'>inputPrivacyKeyPhoneP2P</a>#db9e70d2 = <a href='/type/InputPrivacyKey'>InputPrivacyKey</a>;
|
||||
<a href='/constructor/inputPrivacyKeyForwards'>inputPrivacyKeyForwards</a>#a4dd4c08 = <a href='/type/InputPrivacyKey'>InputPrivacyKey</a>;
|
||||
<a href='/constructor/inputPrivacyKeyProfilePhoto'>inputPrivacyKeyProfilePhoto</a>#5719bacc = <a href='/type/InputPrivacyKey'>InputPrivacyKey</a>;
|
||||
<a href='/constructor/inputPrivacyKeyPhoneNumber'>inputPrivacyKeyPhoneNumber</a>#352dafa = <a href='/type/InputPrivacyKey'>InputPrivacyKey</a>;
|
||||
<a href='/constructor/inputPrivacyKeyAddedByPhone'>inputPrivacyKeyAddedByPhone</a>#d1219bdd = <a href='/type/InputPrivacyKey'>InputPrivacyKey</a>;
|
||||
<a href='/constructor/inputPrivacyKeyVoiceMessages'>inputPrivacyKeyVoiceMessages</a>#aee69d68 = <a href='/type/InputPrivacyKey'>InputPrivacyKey</a>;
|
||||
<a href='/constructor/inputPrivacyKeyAbout'>inputPrivacyKeyAbout</a>#3823cc40 = <a href='/type/InputPrivacyKey'>InputPrivacyKey</a>;
|
||||
|
||||
<a href='/constructor/privacyKeyStatusTimestamp'>privacyKeyStatusTimestamp</a>#bc2eab30 = <a href='/type/PrivacyKey'>PrivacyKey</a>;
|
||||
<a href='/constructor/privacyKeyChatInvite'>privacyKeyChatInvite</a>#500e6dfa = <a href='/type/PrivacyKey'>PrivacyKey</a>;
|
||||
<a href='/constructor/privacyKeyPhoneCall'>privacyKeyPhoneCall</a>#3d662b7b = <a href='/type/PrivacyKey'>PrivacyKey</a>;
|
||||
<a href='/constructor/privacyKeyPhoneP2P'>privacyKeyPhoneP2P</a>#39491cc8 = <a href='/type/PrivacyKey'>PrivacyKey</a>;
|
||||
<a href='/constructor/privacyKeyForwards'>privacyKeyForwards</a>#69ec56a3 = <a href='/type/PrivacyKey'>PrivacyKey</a>;
|
||||
<a href='/constructor/privacyKeyProfilePhoto'>privacyKeyProfilePhoto</a>#96151fed = <a href='/type/PrivacyKey'>PrivacyKey</a>;
|
||||
<a href='/constructor/privacyKeyPhoneNumber'>privacyKeyPhoneNumber</a>#d19ae46d = <a href='/type/PrivacyKey'>PrivacyKey</a>;
|
||||
<a href='/constructor/privacyKeyAddedByPhone'>privacyKeyAddedByPhone</a>#42ffd42b = <a href='/type/PrivacyKey'>PrivacyKey</a>;
|
||||
<a href='/constructor/privacyKeyVoiceMessages'>privacyKeyVoiceMessages</a>#697f414 = <a href='/type/PrivacyKey'>PrivacyKey</a>;
|
||||
<a href='/constructor/privacyKeyAbout'>privacyKeyAbout</a>#a486b761 = <a href='/type/PrivacyKey'>PrivacyKey</a>;
|
||||
|
||||
<a href='/constructor/account.privacyRules'>account.privacyRules</a>#50a04e45 rules:<a href='/type/Vector%20t'>Vector</a><<a href='/type/PrivacyRule'>PrivacyRule</a>> chats:<a href='/type/Vector%20t'>Vector</a><<a href='/type/Chat'>Chat</a>> users:<a href='/type/Vector%20t'>Vector</a><<a href='/type/User'>User</a>> = <a href='/type/account.PrivacyRules'>account.PrivacyRules</a>;
|
||||
|
||||
<a href='/constructor/updatePrivacy'>updatePrivacy</a>#ee3b272a key:<a href='/type/PrivacyKey'>PrivacyKey</a> rules:<a href='/type/Vector%20t'>Vector</a><<a href='/type/PrivacyRule'>PrivacyRule</a>> = <a href='/type/Update'>Update</a>;
|
||||
|
||||
---functions---
|
||||
|
||||
<a href='/method/account.getPrivacy'>account.getPrivacy</a>#dadbc950 key:<a href='/type/InputPrivacyKey'>InputPrivacyKey</a> = <a href='/type/account.PrivacyRules'>account.PrivacyRules</a>;
|
||||
<a href='/method/account.setPrivacy'>account.setPrivacy</a>#c9f81ce8 key:<a href='/type/InputPrivacyKey'>InputPrivacyKey</a> rules:<a href='/type/Vector%20t'>Vector</a><<a href='/type/InputPrivacyRule'>InputPrivacyRule</a>> = <a href='/type/account.PrivacyRules'>account.PrivacyRules</a>;</code></pre>
|
||||
<p>Privacy <strong>keys</strong> together with <a href="#privacy-rules">privacy rules »</a> indicate <em>what</em> can or can't someone do and are specified by a <a href="/type/PrivacyKey">PrivacyKey</a> constructor, and its input counterpart <a href="/type/InputPrivacyKey">InputPrivacyKey</a>.<br>
|
||||
<a href="/type/InputPrivacyKey">InputPrivacyKey</a> constructors are <em>passed</em> as input to methods that accept privacy keys, while <a href="/type/PrivacyKey">PrivacyKey</a>s are contained in constructors <em>returned</em> by the API. </p>
|
||||
<p>See <a href="/type/InputPrivacyRule">the type page »</a> for a full list of privacy keys and their descriptions. </p>
|
||||
<p>Use <a href="/method/account.getPrivacy">account.getPrivacy</a> to obtain the current set of <a href="#privacy-rules">rules</a> associated to a key, and <a href="/method/account.setPrivacy">account.setPrivacy</a> to change it.</p>
|
||||
<p>Changing the privacy settings will trigger an <a href="/constructor/updatePrivacy">updatePrivacy</a>, sent to all currently logged in sessions of the current account.</p>
|
||||
<h3><a class="anchor" href="#global-privacy-settings" id="global-privacy-settings" name="global-privacy-settings"><i class="anchor-icon"></i></a>Global privacy settings</h3>
|
||||
<pre><code><a href='/constructor/globalPrivacySettings'>globalPrivacySettings</a>#734c4ccb flags:<a href='/type/%23'>#</a> archive_and_mute_new_noncontact_peers:flags.0?<a href='/constructor/true'>true</a> keep_archived_unmuted:flags.1?<a href='/constructor/true'>true</a> keep_archived_folders:flags.2?<a href='/constructor/true'>true</a> = <a href='/type/GlobalPrivacySettings'>GlobalPrivacySettings</a>;
|
||||
|
||||
---functions---
|
||||
|
||||
<a href='/method/account.getGlobalPrivacySettings'>account.getGlobalPrivacySettings</a>#eb2b4cf6 = <a href='/type/GlobalPrivacySettings'>GlobalPrivacySettings</a>;
|
||||
<a href='/method/account.setGlobalPrivacySettings'>account.setGlobalPrivacySettings</a>#1edaaac2 settings:<a href='/type/GlobalPrivacySettings'>GlobalPrivacySettings</a> = <a href='/type/GlobalPrivacySettings'>GlobalPrivacySettings</a>;</code></pre>
|
||||
<p>Some global privacy settings can also be fetched and modified using <a href="/method/account.getGlobalPrivacySettings">account.getGlobalPrivacySettings</a> and <a href="/method/account.setGlobalPrivacySettings">account.setGlobalPrivacySettings</a>. </p>
|
||||
<p>Global privacy settings are represented by the <a href="/constructor/globalPrivacySettings">globalPrivacySettings</a> constructor, that contains the following parameters:</p>
|
||||
<ul>
|
||||
<li><strong>archive_and_mute_new_noncontact_peers</strong> - Whether to archive and mute new chats from non-contacts.</li>
|
||||
<li><strong>keep_archived_unmuted</strong> - Whether unmuted chats will be kept in the Archive chat list when they get a new message.</li>
|
||||
<li><strong>keep_archived_folders</strong> - Whether unmuted chats that are always included or pinned in a <a href="/api/folders">folder</a>, will be kept in the Archive chat list when they get a new message. Ignored if <code>keep_archived_unmuted</code> is set.</li>
|
||||
</ul></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
@ -109,8 +194,11 @@
|
|||
</div>
|
||||
</div>
|
||||
<script src="/js/main.js?47"></script>
|
||||
|
||||
<script>backToTopInit("Go up");
|
||||
<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>
|
||||
|
|
|
@ -5,11 +5,11 @@
|
|||
<title>Sponsored messages</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Related TL schema:
|
||||
sponsoredMessage#fc25b828 flags:# recommended:flags.5?true show_peer_photo:flags.6?true random_id:bytes…">
|
||||
sponsoredWebPage#3db8ec63 flags:# url:string site_name:string photo:flags.0?Photo = SponsoredWebPage;…">
|
||||
<meta property="og:title" content="Sponsored messages">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Related TL schema:
|
||||
sponsoredMessage#fc25b828 flags:# recommended:flags.5?true show_peer_photo:flags.6?true random_id:bytes…">
|
||||
sponsoredWebPage#3db8ec63 flags:# url:string site_name:string photo:flags.0?Photo = SponsoredWebPage;…">
|
||||
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
|
||||
|
@ -45,30 +45,58 @@ sponsoredMessage#fc25b828 flags:# recommended:flags.5?true show_peer_photo:flags
|
|||
<h1 id="dev_page_title">Sponsored messages</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Related TL schema:</p>
|
||||
<pre><code><a href='/constructor/sponsoredMessage'>sponsoredMessage</a>#fc25b828 flags:<a href='/type/%23'>#</a> recommended:flags.5?<a href='/constructor/true'>true</a> show_peer_photo:flags.6?<a href='/constructor/true'>true</a> random_id:<a href='/type/bytes'>bytes</a> from_id:flags.3?<a href='/type/Peer'>Peer</a> chat_invite:flags.4?<a href='/type/ChatInvite'>ChatInvite</a> chat_invite_hash:flags.4?<a href='/type/string'>string</a> channel_post:flags.2?<a href='/type/int'>int</a> start_param:flags.0?<a href='/type/string'>string</a> message:<a href='/type/string'>string</a> entities:flags.1?<a href='/type/Vector%20t'>Vector</a><<a href='/type/MessageEntity'>MessageEntity</a>> sponsor_info:flags.7?<a href='/type/string'>string</a> additional_info:flags.8?<a href='/type/string'>string</a> = <a href='/type/SponsoredMessage'>SponsoredMessage</a>;
|
||||
<pre><code><a href='/constructor/sponsoredWebPage'>sponsoredWebPage</a>#3db8ec63 flags:<a href='/type/%23'>#</a> url:<a href='/type/string'>string</a> site_name:<a href='/type/string'>string</a> photo:flags.0?<a href='/type/Photo'>Photo</a> = <a href='/type/SponsoredWebPage'>SponsoredWebPage</a>;
|
||||
|
||||
<a href='/constructor/sponsoredMessage'>sponsoredMessage</a>#ed5383f7 flags:<a href='/type/%23'>#</a> recommended:flags.5?<a href='/constructor/true'>true</a> show_peer_photo:flags.6?<a href='/constructor/true'>true</a> random_id:<a href='/type/bytes'>bytes</a> from_id:flags.3?<a href='/type/Peer'>Peer</a> chat_invite:flags.4?<a href='/type/ChatInvite'>ChatInvite</a> chat_invite_hash:flags.4?<a href='/type/string'>string</a> channel_post:flags.2?<a href='/type/int'>int</a> start_param:flags.0?<a href='/type/string'>string</a> webpage:flags.9?<a href='/type/SponsoredWebPage'>SponsoredWebPage</a> app:flags.10?<a href='/type/BotApp'>BotApp</a> message:<a href='/type/string'>string</a> entities:flags.1?<a href='/type/Vector%20t'>Vector</a><<a href='/type/MessageEntity'>MessageEntity</a>> button_text:flags.11?<a href='/type/string'>string</a> sponsor_info:flags.7?<a href='/type/string'>string</a> additional_info:flags.8?<a href='/type/string'>string</a> = <a href='/type/SponsoredMessage'>SponsoredMessage</a>;
|
||||
|
||||
<a href='/constructor/messages.sponsoredMessages'>messages.sponsoredMessages</a>#c9ee1d87 flags:<a href='/type/%23'>#</a> posts_between:flags.0?<a href='/type/int'>int</a> messages:<a href='/type/Vector%20t'>Vector</a><<a href='/type/SponsoredMessage'>SponsoredMessage</a>> chats:<a href='/type/Vector%20t'>Vector</a><<a href='/type/Chat'>Chat</a>> users:<a href='/type/Vector%20t'>Vector</a><<a href='/type/User'>User</a>> = <a href='/type/messages.SponsoredMessages'>messages.SponsoredMessages</a>;
|
||||
|
||||
---functions---
|
||||
|
||||
<a href='/method/channels.getSponsoredMessages'>channels.getSponsoredMessages</a>#ec210fbf channel:<a href='/type/InputChannel'>InputChannel</a> = <a href='/type/messages.SponsoredMessages'>messages.SponsoredMessages</a>;
|
||||
<a href='/method/channels.viewSponsoredMessage'>channels.viewSponsoredMessage</a>#beaedb94 channel:<a href='/type/InputChannel'>InputChannel</a> random_id:<a href='/type/bytes'>bytes</a> = <a href='/type/Bool'>Bool</a>;</code></pre>
|
||||
<a href='/method/channels.viewSponsoredMessage'>channels.viewSponsoredMessage</a>#beaedb94 channel:<a href='/type/InputChannel'>InputChannel</a> random_id:<a href='/type/bytes'>bytes</a> = <a href='/type/Bool'>Bool</a>;
|
||||
<a href='/method/channels.clickSponsoredMessage'>channels.clickSponsoredMessage</a>#18afbc93 channel:<a href='/type/InputChannel'>InputChannel</a> random_id:<a href='/type/bytes'>bytes</a> = <a href='/type/Bool'>Bool</a>;</code></pre>
|
||||
<h4><a class="anchor" href="#getting-sponsored-messages" id="getting-sponsored-messages" name="getting-sponsored-messages"><i class="anchor-icon"></i></a>Getting sponsored messages</h4>
|
||||
<p>Each time the user opens a channel, <code>channels.getSponsoredMessages</code> must be called to receive <a href="https://promote.telegram.org">sponsored messages</a> available for this channel. The result must be cached for <strong>5 minutes</strong>.</p>
|
||||
<blockquote>
|
||||
<p><a href="https://t.me/durov/172">More about sponsored messages on Telegram</a></p>
|
||||
</blockquote>
|
||||
<h4><a class="anchor" href="#displaying-sponsored-messages" id="displaying-sponsored-messages" name="displaying-sponsored-messages"><i class="anchor-icon"></i></a>Displaying sponsored messages</h4>
|
||||
<p>Sponsored messages must be displayed below all other posts in the channel, after the user scrolls further down, past the last message. The promoted channel or bot specified in the <code>from_id</code> or <code>chat_invite</code> mutually exclusive fields must be displayed as the author of the message. The message should also contain one of the following buttons at the bottom:</p>
|
||||
<p>Sponsored messages must be displayed below all other posts in the channel, after the user scrolls further down, past the last message. The promoted channel or bot specified in the <code>from_id</code> or <code>chat_invite</code> mutually exclusive fields must be displayed as the author of the message. The message should also contain a button at the bottom with one of the following labels:</p>
|
||||
<ul>
|
||||
<li>==<strong>View Bot</strong>== — if a bot is being promoted. Tapping the button must open the chat with the bot. If <code>start_param</code> is specified, the app must use the <a href="/api/links#bot-links">deep linking mechanism</a> to open the bot.</li>
|
||||
<li>==<strong>View Channel</strong>== — if a channel is being promoted. Tapping the button must open the channel using the <code>from_id</code> or by <a href="/api/invites#invite-links">importing</a> the <code>chat_invite_hash</code> <a href="/api/invites#invite-links">invitation link hash »</a>.</li>
|
||||
<li>==<strong>View Post</strong>== — if a channel is being promoted and <code>channel_post</code> is specified. Tapping the button must open the particular channel post.</li>
|
||||
<li><mark><strong>View Bot</strong></mark> — if a bot is being promoted. Tapping the button must open the chat with the bot. If <code>start_param</code> is specified, the app must use the <a href="/api/links#bot-links">deep linking mechanism</a> to open the bot.</li>
|
||||
<li><mark><strong>View Channel</strong></mark> — if a channel is being promoted. Tapping the button must open the channel using the <code>from_id</code> or by <a href="/api/invites#invite-links">importing</a> the <code>chat_invite_hash</code> <a href="/api/invites#invite-links">invitation link hash »</a>.</li>
|
||||
<li><mark><strong>View Post</strong></mark> — if a channel is being promoted and <code>channel_post</code> is specified. Tapping the button must open the particular channel post.</li>
|
||||
<li><mark><strong>Launch App</strong></mark> — if the <code>app</code> flag is set, the specified <a href="/api/bots/webapps">Mini App</a> should be opened when clicking on the button. </li>
|
||||
<li><mark><strong>Open Website</strong></mark> — If the <code>webpage</code> flag is set, clicking on the button should open the external website specified in <code>webpage.url</code>. </li>
|
||||
<li>The contents of the <code>button_text</code> field — if the <code>button_text</code> field is set.</li>
|
||||
</ul>
|
||||
<p>The message should be marked as "Recommended" instead of "Sponsored" if the <code>recommended</code> flag is set. </p>
|
||||
<p>If the <code>show_peer_photo</code> flag is set, a profile photo bubble should be displayed for this message, like for messages sent in groups. The photo shown in the bubble is obtained either from the peer contained in <code>from_id</code>, or from <code>chat_invite</code>. </p>
|
||||
<p>A profile photo bubble should be displayed for the sponsored message, like for messages sent in groups, using:</p>
|
||||
<ul>
|
||||
<li><code>app.photo</code>, if the <code>app</code> flag is set, otherwise</li>
|
||||
<li><code>webpage.photo</code>, if the <code>webpage</code> flag is set, otherwise</li>
|
||||
<li>The profile picture of the chat in <code>chat_invite</code>, if the <code>chat_invite</code> flag is set, otherwise</li>
|
||||
<li><code>webpage.photo</code>, if the <code>webpage</code> flag is set, otherwise</li>
|
||||
<li>The profile picture of the peer in <code>from_id</code>, if the <code>show_peer_photo</code> flag is set.</li>
|
||||
</ul>
|
||||
<p>A sender name should be displayed for the sponsored message, like for messages sent in groups, using:</p>
|
||||
<ul>
|
||||
<li><code>app.title</code>, if the <code>app</code> flag is set, otherwise</li>
|
||||
<li><code>webpage.site_name</code>, if the <code>webpage</code> flag is set, otherwise</li>
|
||||
<li>The title of the chat in <code>chat_invite</code>, if the <code>chat_invite</code> flag is set.</li>
|
||||
</ul>
|
||||
<p>If the <code>sponsor_info</code> or <code>additional_info</code> flags are set, an additional "Sponsor info" menu item must be present in the message context menu (the menu that pops up when clicking on a button), that when clicked, displays the contents of the flags. </p>
|
||||
<h4><a class="anchor" href="#counting-sponsored-message-views" id="counting-sponsored-message-views" name="counting-sponsored-message-views"><i class="anchor-icon"></i></a>Counting sponsored message views</h4>
|
||||
<p>Once the entire text is shown on the screen (excluding the button), <code>channels.viewSponsoredMessage</code> must be called with the <code>random_id</code> of this sponsored message.</p>
|
||||
<p>Once the entire text is shown on the screen (excluding the button), <a href="/method/channels.viewSponsoredMessage">channels.viewSponsoredMessage</a> must be called with the <code>random_id</code> of the sponsored message.</p>
|
||||
<h4><a class="anchor" href="#clicking-on-sponsored-messages" id="clicking-on-sponsored-messages" name="clicking-on-sponsored-messages"><i class="anchor-icon"></i></a>Clicking on sponsored messages</h4>
|
||||
<p>If the user either:</p>
|
||||
<ul>
|
||||
<li>Clicks on a link in the sponsored message</li>
|
||||
<li>Opens a sponsored chat or a sponsored website via the associated button</li>
|
||||
<li>Opens the sponsored chat via the sponsored message name, the sponsored message photo, or a mention in the sponsored message</li>
|
||||
</ul>
|
||||
<p><a href="/method/channels.clickSponsoredMessage">channels.clickSponsoredMessage</a> must be called with the <code>random_id</code> of the sponsored message.</p>
|
||||
<h4><a class="anchor" href="#testing-sponsored-messages" id="testing-sponsored-messages" name="testing-sponsored-messages"><i class="anchor-icon"></i></a>Testing sponsored messages</h4>
|
||||
<p>For the channel <a href="https://t.me/SecretAdTestChannel">https://t.me/SecretAdTestChannel</a> the system will <strong>always</strong> return a sponsored message: promoting either a channel, a particular message in a channel, or a bot with a start parameter.</p>
|
||||
<hr>
|
||||
|
|
|
@ -391,7 +391,6 @@ width=44% /></a>
|
|||
<p>Telegram also offers a dedicated <strong>test environment</strong> suitable for more advanced testing. Bots and users in this environment generally have more flexible restrictions – for example:</p>
|
||||
<ul>
|
||||
<li>When working with the test environment, you may use HTTP links without TLS to test your <a href="https://core.telegram.org/bots/features#web-apps">Web Apps</a> or <a href="https://core.telegram.org/bots/features#web-login">Web Login</a>.</li>
|
||||
<li>You can test <a href="https://telegram.org/blog/topics-in-groups-collectible-usernames#topics-in-groups">topics</a> without needing 200 users in your group.</li>
|
||||
</ul>
|
||||
<blockquote>
|
||||
<p><strong>Flood limits</strong> are not raised in the test environment, and may at times be stricter. To minimize how this impacts your bot, you should make sure that it handles errors with retry policies and does not depend on hardcoded limit values.</p>
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>appWebViewResultUrl</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Contains the link that must be used to open a named bot web app.">
|
||||
<meta property="description" content="Contains the link that must be used to open a direct link Mini App.">
|
||||
<meta property="og:title" content="appWebViewResultUrl">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Contains the link that must be used to open a named bot web app.">
|
||||
<meta property="og:description" content="Contains the link that must be used to open a direct link Mini App.">
|
||||
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
|
||||
|
@ -42,7 +42,7 @@
|
|||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/appWebViewResultUrl" >appWebViewResultUrl</a></li></ul></div>
|
||||
<h1 id="dev_page_title">appWebViewResultUrl</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Contains the link that must be used to open a <a href="/api/bots/webapps#named-bot-web-apps">named bot web app</a>.</p>
|
||||
<div id="dev_page_content"><p>Contains the link that must be used to open a <a href="/api/bots/webapps#direct-link-mini-apps">direct link Mini App</a>.</p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
@ -76,7 +76,7 @@
|
|||
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
|
||||
<p><a href="/type/AppWebViewResult">AppWebViewResult</a></p>
|
||||
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
|
||||
<h4><a class="anchor" href="#bot-web-apps" id="bot-web-apps" name="bot-web-apps"><i class="anchor-icon"></i></a><a href="/api/bots/webapps">Bot web apps</a></h4>
|
||||
<h4><a class="anchor" href="#mini-apps-on-telegram" id="mini-apps-on-telegram" name="mini-apps-on-telegram"><i class="anchor-icon"></i></a><a href="/api/bots/webapps">Mini Apps on Telegram</a></h4>
|
||||
<p>Bots can offer users interactive HTML5 web apps to completely replace any website.</p></div>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>attachMenuBotIconColor</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Represents an attachment menu icon color for bot web apps »">
|
||||
<meta property="description" content="Represents an attachment menu icon color for bot mini apps »">
|
||||
<meta property="og:title" content="attachMenuBotIconColor">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Represents an attachment menu icon color for bot web apps »">
|
||||
<meta property="og:description" content="Represents an attachment menu icon color for bot mini apps »">
|
||||
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
|
||||
|
@ -42,7 +42,7 @@
|
|||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/attachMenuBotIconColor" >attachMenuBotIconColor</a></li></ul></div>
|
||||
<h1 id="dev_page_title">attachMenuBotIconColor</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Represents an attachment menu icon color for <a href="/api/bots/attach">bot web apps »</a></p>
|
||||
<div id="dev_page_content"><p>Represents an attachment menu icon color for <a href="/api/bots/attach">bot mini apps »</a></p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
@ -81,8 +81,8 @@
|
|||
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
|
||||
<p><a href="/type/AttachMenuBotIconColor">AttachMenuBotIconColor</a></p>
|
||||
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
|
||||
<h4><a class="anchor" href="#bot-attachment-menu-entries" id="bot-attachment-menu-entries" name="bot-attachment-menu-entries"><i class="anchor-icon"></i></a><a href="/api/bots/attach">Bot attachment menu entries</a></h4>
|
||||
<p>Bots can install attachment menu entries, offering conveniently accessible, versatile web apps.</p></div>
|
||||
<h4><a class="anchor" href="#bot-attachment-menu-and-side-menu-entries" id="bot-attachment-menu-and-side-menu-entries" name="bot-attachment-menu-and-side-menu-entries"><i class="anchor-icon"></i></a><a href="/api/bots/attach">Bot attachment menu and side menu entries</a></h4>
|
||||
<p>Bots can install attachment menu and side menu entries, offering conveniently accessible, versatile web apps.</p></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -69,7 +69,7 @@
|
|||
<tr>
|
||||
<td><strong>expires</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/int">int</a></td>
|
||||
<td>Expiry date of QR code</td>
|
||||
<td>Expiration date of QR code</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>token</strong></td>
|
||||
|
|
|
@ -137,6 +137,16 @@
|
|||
<td>Whether the <a href="/api/translation">real-time chat translation popup</a> should be hidden.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>stories_pinned_available</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags2</a>.5?<a href="/constructor/true">true</a></td>
|
||||
<td>Whether this user has some <a href="/api/stories#pinned-or-archived-stories">pinned stories</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>view_forum_as_messages</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags2</a>.6?<a href="/constructor/true">true</a></td>
|
||||
<td>Users may also choose to display messages from all topics of a <a href="/api/forum">forum</a> as if they were sent to a normal group, using a "View as messages" setting in the local client. <br>This setting only affects the current account, and is synced to other logged in sessions using the <a href="/method/channels.toggleViewForumAsMessages">channels.toggleViewForumAsMessages</a> method; invoking this method will update the value of this flag.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>id</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/long">long</a></td>
|
||||
<td>ID of the channel</td>
|
||||
|
@ -311,6 +321,16 @@
|
|||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.30?<a href="/type/ChatReactions">ChatReactions</a></td>
|
||||
<td>Allowed <a href="/api/reactions">message reactions »</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>stories</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags2</a>.4?<a href="/type/PeerStories">PeerStories</a></td>
|
||||
<td>Channel <a href="/api/stories">stories</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>wallpaper</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags2</a>.7?<a href="/type/WallPaper">WallPaper</a></td>
|
||||
<td><a href="/api/wallpapers">Wallpaper</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
|
||||
|
@ -326,6 +346,13 @@
|
|||
<p>Admins of supergroups with a certain number of members can choose to unleash the full proactive power of Telegram's own antispam algorithms – turning on the new Aggressive mode for the automated spam filters.</p>
|
||||
<h4><a class="anchor" href="#translation" id="translation" name="translation"><i class="anchor-icon"></i></a><a href="/api/translation">Translation</a></h4>
|
||||
<p>Telegram allows translating chat messages: Telegram Premium users may even enable real-time chat translation.</p>
|
||||
<h4><a class="anchor" href="#stories" id="stories" name="stories"><i class="anchor-icon"></i></a><a href="/api/stories">Stories</a></h4>
|
||||
<p>Telegram users and channels can easily post and view stories through the API.</p>
|
||||
<h4><a class="anchor" href="#forums" id="forums" name="forums"><i class="anchor-icon"></i></a><a href="/api/forum">Forums</a></h4>
|
||||
<p>Telegram allows creating forums with multiple distinct topics.</p>
|
||||
<h4><a class="anchor" href="#channelstoggleviewforumasmessages" id="channelstoggleviewforumasmessages" name="channelstoggleviewforumasmessages"><i class="anchor-icon"></i></a><a href="/method/channels.toggleViewForumAsMessages">channels.toggleViewForumAsMessages</a></h4>
|
||||
<p>Users may also choose to display messages from all topics of a <a href="/api/forum">forum</a> as if they were sent to a normal group, using a "View as messages" setting in the local client: this setting only affects the current account, and is synced to other logged in sessions using this method.</p>
|
||||
<p>Invoking this method will update the value of the <code>view_forum_as_messages</code> flag of <a href="/constructor/channelFull">channelFull</a> or <a href="/constructor/dialog">dialog</a> and emit an <a href="/constructor/updateChannelViewForumAsMessages">updateChannelViewForumAsMessages</a>.</p>
|
||||
<h4><a class="anchor" href="#admin-banned-default-rights" id="admin-banned-default-rights" name="admin-banned-default-rights"><i class="anchor-icon"></i></a><a href="/api/rights">Admin, banned, default rights</a></h4>
|
||||
<p>How to handle admin permissions, granular bans and global permissions in channels, groups and supergroups.</p>
|
||||
<h4><a class="anchor" href="#channels-supergroups-gigagroups-and-basic-groups" id="channels-supergroups-gigagroups-and-basic-groups" name="channels-supergroups-gigagroups-and-basic-groups"><i class="anchor-icon"></i></a><a href="/api/channel">Channels, supergroups, gigagroups and basic groups</a></h4>
|
||||
|
@ -343,7 +370,9 @@
|
|||
<h4><a class="anchor" href="#invites" id="invites" name="invites"><i class="anchor-icon"></i></a><a href="/api/invites">Invites</a></h4>
|
||||
<p>Chats and channels may have a public username or a private invite link: private invite links may be further enhanced with per-user join requests.</p>
|
||||
<h4><a class="anchor" href="#message-reactions" id="message-reactions" name="message-reactions"><i class="anchor-icon"></i></a><a href="/api/reactions">Message reactions</a></h4>
|
||||
<p>Telegram allows users to react on any message using specific emojis, triggering cute lottie animations.</p></div>
|
||||
<p>Telegram allows users to react on any message using specific emojis, triggering cute lottie animations.</p>
|
||||
<h4><a class="anchor" href="#wallpapers" id="wallpapers" name="wallpapers"><i class="anchor-icon"></i></a><a href="/api/wallpapers">Wallpapers</a></h4>
|
||||
<p>Telegram apps support generating, sharing and synchronizing chat backgrounds.</p></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -97,6 +97,21 @@
|
|||
<td>Whether the <a href="/api/invites#join-requests">join request »</a> must be first approved by an administrator</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>verified</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.7?<a href="/constructor/true">true</a></td>
|
||||
<td>Is this chat or channel verified by Telegram?</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>scam</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.8?<a href="/constructor/true">true</a></td>
|
||||
<td>This chat is probably a scam</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>fake</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.9?<a href="/constructor/true">true</a></td>
|
||||
<td>If set, this chat was reported by many users as a fake or scam: be careful when interacting with it.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>title</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/string">string</a></td>
|
||||
<td>Chat/supergroup/channel title</td>
|
||||
|
@ -121,6 +136,11 @@
|
|||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.4?<a href="/type/Vector%20t">Vector</a><<a href="/type/User">User</a>></td>
|
||||
<td>A few of the participants that are in the group</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>color</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/int">int</a></td>
|
||||
<td><a href="/api/colors">Profile color palette ID</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
|
||||
|
@ -129,7 +149,9 @@
|
|||
<h4><a class="anchor" href="#channels-supergroups-gigagroups-and-basic-groups" id="channels-supergroups-gigagroups-and-basic-groups" name="channels-supergroups-gigagroups-and-basic-groups"><i class="anchor-icon"></i></a><a href="/api/channel">Channels, supergroups, gigagroups and basic groups</a></h4>
|
||||
<p>How to handle channels, supergroups, gigagroups, basic groups, and what's the difference between them.</p>
|
||||
<h4><a class="anchor" href="#invites" id="invites" name="invites"><i class="anchor-icon"></i></a><a href="/api/invites">Invites</a></h4>
|
||||
<p>Chats and channels may have a public username or a private invite link: private invite links may be further enhanced with per-user join requests.</p></div>
|
||||
<p>Chats and channels may have a public username or a private invite link: private invite links may be further enhanced with per-user join requests.</p>
|
||||
<h4><a class="anchor" href="#accent-colors" id="accent-colors" name="accent-colors"><i class="anchor-icon"></i></a><a href="/api/colors">Accent colors</a></h4>
|
||||
<p>Telegram users and channels can change the accent color and background pattern of their profile page and their messages!</p></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
<tr>
|
||||
<td><strong>expires</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/int">int</a></td>
|
||||
<td>Its expiry date</td>
|
||||
<td>Its expiration date</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>inputBotAppID</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Used to fetch information about a named bot web app by its ID">
|
||||
<meta property="description" content="Used to fetch information about a direct link Mini App by its ID">
|
||||
<meta property="og:title" content="inputBotAppID">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Used to fetch information about a named bot web app by its ID">
|
||||
<meta property="og:description" content="Used to fetch information about a direct link Mini App by its ID">
|
||||
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
|
||||
|
@ -42,7 +42,7 @@
|
|||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/inputBotAppID" >inputBotAppID</a></li></ul></div>
|
||||
<h1 id="dev_page_title">inputBotAppID</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Used to fetch information about a <a href="/api/bots/webapps#named-bot-web-apps">named bot web app</a> by its ID</p>
|
||||
<div id="dev_page_content"><p>Used to fetch information about a <a href="/api/bots/webapps#direct-link-mini-apps">direct link Mini App</a> by its ID</p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
@ -69,7 +69,7 @@
|
|||
<tr>
|
||||
<td><strong>id</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/long">long</a></td>
|
||||
<td><a href="/api/bots/webapps#named-bot-web-apps">named bot web app</a> ID.</td>
|
||||
<td><a href="/api/bots/webapps#direct-link-mini-apps">direct link Mini App</a> ID.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>access_hash</strong></td>
|
||||
|
@ -81,10 +81,10 @@
|
|||
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
|
||||
<p><a href="/type/InputBotApp">InputBotApp</a></p>
|
||||
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
|
||||
<h4><a class="anchor" href="#bot-web-apps" id="bot-web-apps" name="bot-web-apps"><i class="anchor-icon"></i></a><a href="/api/bots/webapps">Bot web apps</a></h4>
|
||||
<h4><a class="anchor" href="#mini-apps-on-telegram" id="mini-apps-on-telegram" name="mini-apps-on-telegram"><i class="anchor-icon"></i></a><a href="/api/bots/webapps">Mini Apps on Telegram</a></h4>
|
||||
<p>Bots can offer users interactive HTML5 web apps to completely replace any website.</p>
|
||||
<h4><a class="anchor" href="#botapp" id="botapp" name="botapp"><i class="anchor-icon"></i></a><a href="/constructor/botApp">botApp</a></h4>
|
||||
<p>Contains information about a <a href="/api/bots/webapps#named-bot-web-apps">named bot web app</a>.</p></div>
|
||||
<p>Contains information about a <a href="/api/bots/webapps#direct-link-mini-apps">direct link Mini App</a>.</p></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>inputBotAppShortName</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Used to fetch information about a named bot web app by its short name">
|
||||
<meta property="description" content="Used to fetch information about a direct link Mini App by its short name">
|
||||
<meta property="og:title" content="inputBotAppShortName">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Used to fetch information about a named bot web app by its short name">
|
||||
<meta property="og:description" content="Used to fetch information about a direct link Mini App by its short name">
|
||||
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
|
||||
|
@ -42,7 +42,7 @@
|
|||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/inputBotAppShortName" >inputBotAppShortName</a></li></ul></div>
|
||||
<h1 id="dev_page_title">inputBotAppShortName</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Used to fetch information about a <a href="/api/bots/webapps#named-bot-web-apps">named bot web app</a> by its short name</p>
|
||||
<div id="dev_page_content"><p>Used to fetch information about a <a href="/api/bots/webapps#direct-link-mini-apps">direct link Mini App</a> by its short name</p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
@ -69,12 +69,12 @@
|
|||
<tr>
|
||||
<td><strong>bot_id</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/InputUser">InputUser</a></td>
|
||||
<td>ID of the bot that owns the bot web app</td>
|
||||
<td>ID of the bot that owns the bot mini app</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>short_name</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/string">string</a></td>
|
||||
<td>Short name, obtained from a <a href="/api/links#named-bot-web-app-links">named bot web app deep link</a></td>
|
||||
<td>Short name, obtained from a <a href="/api/links#direct-mini-app-links">Direct Mini App deep link</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
@ -83,7 +83,7 @@
|
|||
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
|
||||
<h4><a class="anchor" href="#deep-links" id="deep-links" name="deep-links"><i class="anchor-icon"></i></a><a href="/api/links">Deep links</a></h4>
|
||||
<p>Telegram clients must handle special tg:// and t.me deep links encountered in messages, link entities and in other apps by registering OS handlers.</p>
|
||||
<h4><a class="anchor" href="#bot-web-apps" id="bot-web-apps" name="bot-web-apps"><i class="anchor-icon"></i></a><a href="/api/bots/webapps">Bot web apps</a></h4>
|
||||
<h4><a class="anchor" href="#mini-apps-on-telegram" id="mini-apps-on-telegram" name="mini-apps-on-telegram"><i class="anchor-icon"></i></a><a href="/api/bots/webapps">Mini Apps on Telegram</a></h4>
|
||||
<p>Bots can offer users interactive HTML5 web apps to completely replace any website.</p></div>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>messageActionWebViewDataSent</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Data from an opened reply keyboard bot web app was relayed to the bot that owns it (user side service message).">
|
||||
<meta property="description" content="Data from an opened reply keyboard bot mini app was relayed to the bot that owns it (user side service message). Clients should display a service message with the text Data from the «$text» button was transferred to the bot.">
|
||||
<meta property="og:title" content="messageActionWebViewDataSent">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Data from an opened reply keyboard bot web app was relayed to the bot that owns it (user side service message).">
|
||||
<meta property="og:description" content="Data from an opened reply keyboard bot mini app was relayed to the bot that owns it (user side service message). Clients should display a service message with the text Data from the «$text» button was transferred to the bot.">
|
||||
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
|
||||
|
@ -42,7 +42,7 @@
|
|||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/messageActionWebViewDataSent" >messageActionWebViewDataSent</a></li></ul></div>
|
||||
<h1 id="dev_page_title">messageActionWebViewDataSent</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Data from an opened <a href="/api/bots/webapps">reply keyboard bot web app</a> was relayed to the bot that owns it (user side service message).</p>
|
||||
<div id="dev_page_content"><p>Data from an opened <a href="/api/bots/webapps">reply keyboard bot mini app</a> was relayed to the bot that owns it (user side service message).</p>
|
||||
<p>Clients should display a service message with the text <code>Data from the «$text» button was transferred to the bot.</code></p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
|
@ -78,9 +78,9 @@
|
|||
<p><a href="/type/MessageAction">MessageAction</a></p>
|
||||
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
|
||||
<h4><a class="anchor" href="#keyboardbuttonsimplewebview" id="keyboardbuttonsimplewebview" name="keyboardbuttonsimplewebview"><i class="anchor-icon"></i></a><a href="/constructor/keyboardButtonSimpleWebView">keyboardButtonSimpleWebView</a></h4>
|
||||
<p>Button to open a <a href="/api/bots/webapps">bot web app</a> using <a href="/method/messages.requestSimpleWebView">messages.requestSimpleWebView</a>, without sending user information to the web app.</p>
|
||||
<p>Button to open a <a href="/api/bots/webapps">bot mini app</a> using <a href="/method/messages.requestSimpleWebView">messages.requestSimpleWebView</a>, without sending user information to the web app.</p>
|
||||
<p>Can only be sent or received as part of a reply keyboard, use <a href="/constructor/keyboardButtonWebView">keyboardButtonWebView</a> for inline keyboards.</p>
|
||||
<h4><a class="anchor" href="#bot-web-apps" id="bot-web-apps" name="bot-web-apps"><i class="anchor-icon"></i></a><a href="/api/bots/webapps">Bot web apps</a></h4>
|
||||
<h4><a class="anchor" href="#mini-apps-on-telegram" id="mini-apps-on-telegram" name="mini-apps-on-telegram"><i class="anchor-icon"></i></a><a href="/api/bots/webapps">Mini Apps on Telegram</a></h4>
|
||||
<p>Bots can offer users interactive HTML5 web apps to completely replace any website.</p></div>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>messageActionWebViewDataSentMe</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Data from an opened reply keyboard bot web app was relayed to the bot that owns it (bot side service message).">
|
||||
<meta property="description" content="Data from an opened reply keyboard bot mini app was relayed to the bot that owns it (bot side service message).">
|
||||
<meta property="og:title" content="messageActionWebViewDataSentMe">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Data from an opened reply keyboard bot web app was relayed to the bot that owns it (bot side service message).">
|
||||
<meta property="og:description" content="Data from an opened reply keyboard bot mini app was relayed to the bot that owns it (bot side service message).">
|
||||
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
|
||||
|
@ -42,7 +42,7 @@
|
|||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/messageActionWebViewDataSentMe" >messageActionWebViewDataSentMe</a></li></ul></div>
|
||||
<h1 id="dev_page_title">messageActionWebViewDataSentMe</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Data from an opened <a href="/api/bots/webapps">reply keyboard bot web app</a> was relayed to the bot that owns it (bot side service message).</p>
|
||||
<div id="dev_page_content"><p>Data from an opened <a href="/api/bots/webapps">reply keyboard bot mini app</a> was relayed to the bot that owns it (bot side service message).</p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
@ -82,9 +82,9 @@
|
|||
<p><a href="/type/MessageAction">MessageAction</a></p>
|
||||
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
|
||||
<h4><a class="anchor" href="#keyboardbuttonsimplewebview" id="keyboardbuttonsimplewebview" name="keyboardbuttonsimplewebview"><i class="anchor-icon"></i></a><a href="/constructor/keyboardButtonSimpleWebView">keyboardButtonSimpleWebView</a></h4>
|
||||
<p>Button to open a <a href="/api/bots/webapps">bot web app</a> using <a href="/method/messages.requestSimpleWebView">messages.requestSimpleWebView</a>, without sending user information to the web app.</p>
|
||||
<p>Button to open a <a href="/api/bots/webapps">bot mini app</a> using <a href="/method/messages.requestSimpleWebView">messages.requestSimpleWebView</a>, without sending user information to the web app.</p>
|
||||
<p>Can only be sent or received as part of a reply keyboard, use <a href="/constructor/keyboardButtonWebView">keyboardButtonWebView</a> for inline keyboards.</p>
|
||||
<h4><a class="anchor" href="#bot-web-apps" id="bot-web-apps" name="bot-web-apps"><i class="anchor-icon"></i></a><a href="/api/bots/webapps">Bot web apps</a></h4>
|
||||
<h4><a class="anchor" href="#mini-apps-on-telegram" id="mini-apps-on-telegram" name="mini-apps-on-telegram"><i class="anchor-icon"></i></a><a href="/api/bots/webapps">Mini Apps on Telegram</a></h4>
|
||||
<p>Bots can offer users interactive HTML5 web apps to completely replace any website.</p></div>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -77,6 +77,11 @@
|
|||
<td>Whether this message was <a href="/api/import">imported from a foreign chat service, click here for more info »</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>saved_out</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.11?<a href="/constructor/true">true</a></td>
|
||||
<td>Only for messages forwarded to <a href="/api/saved-messages">saved messages »</a>, set if the original message was outgoing (though the message may have been originally outgoing even if this flag is not set, if <code>from_id</code> points to the current user).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>from_id</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.0?<a href="/type/Peer">Peer</a></td>
|
||||
<td>The ID of the user that originally sent the message</td>
|
||||
|
@ -104,12 +109,27 @@
|
|||
<tr>
|
||||
<td><strong>saved_from_peer</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.4?<a href="/type/Peer">Peer</a></td>
|
||||
<td>Only for messages forwarded to the current user (inputPeerSelf), full info about the user/channel that originally sent the message</td>
|
||||
<td>Only for messages forwarded to <a href="/api/saved-messages">saved messages »</a>, contains the dialog where the message was originally sent.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>saved_from_msg_id</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.4?<a href="/type/int">int</a></td>
|
||||
<td>Only for messages forwarded to the current user (inputPeerSelf), ID of the message that was forwarded from the original user/channel</td>
|
||||
<td>Only for messages forwarded to <a href="/api/saved-messages">saved messages »</a>, contains the original ID of the message in <code>saved_from_peer</code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>saved_from_id</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.8?<a href="/type/Peer">Peer</a></td>
|
||||
<td>Only for forwarded messages reforwarded to <a href="/api/saved-messages">saved messages »</a>, contains the sender of the original message (i.e. if user A sends a message, then user B forwards it somewhere, then user C saves it to saved messages, this field will contain the ID of user B and <code>from_id</code> will contain the ID of user A).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>saved_from_name</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.9?<a href="/type/string">string</a></td>
|
||||
<td>Only for forwarded messages from users with forward privacy enabled, sent by users with forward privacy enabled, reforwarded to <a href="/api/saved-messages">saved messages »</a>, contains the sender of the original message (i.e. if user A (fwd privacy enabled) sends a message, then user B (fwd privacy enabled) forwards it somewhere, then user C saves it to saved messages, this field will contain the name of user B and <code>from_name</code> will contain the name of user A).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>saved_date</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.10?<a href="/type/int">int</a></td>
|
||||
<td>Only for forwarded messages reforwarded to <a href="/api/saved-messages">saved messages »</a>, indicates when was the original message sent (i.e. if user A sends a message @ unixtime 1, then user B forwards it somewhere @ unixtime 2, then user C saves it to saved messages @ unixtime 3, this field will contain 2, <code>date</code> will contain 1 and the <code>date</code> of the containing <a href="/constructor/message">message</a> will contain 3).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>psa_type</strong></td>
|
||||
|
@ -122,7 +142,11 @@
|
|||
<p><a href="/type/MessageFwdHeader">MessageFwdHeader</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="#imported-messages" id="imported-messages" name="imported-messages"><i class="anchor-icon"></i></a><a href="/api/import">Imported messages</a></h4>
|
||||
<p>Telegram allows importing messages and media from foreign chat apps.</p></div>
|
||||
<p>Telegram allows importing messages and media from foreign chat apps.</p>
|
||||
<h4><a class="anchor" href="#saved-messages" id="saved-messages" name="saved-messages"><i class="anchor-icon"></i></a><a href="/api/saved-messages">Saved messages</a></h4>
|
||||
<p>The Saved Messages chat allows users to bookmark messages and media: it's a personal cloud storage for any messages or media you may want to send or forward there.</p>
|
||||
<h4><a class="anchor" href="#message" id="message" name="message"><i class="anchor-icon"></i></a><a href="/constructor/message">message</a></h4>
|
||||
<p>A message</p></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -82,11 +82,31 @@
|
|||
<td>Whether this media should be hidden behind a spoiler warning</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>video</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.6?<a href="/constructor/true">true</a></td>
|
||||
<td>Whether this is a video.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>round</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.7?<a href="/constructor/true">true</a></td>
|
||||
<td>Whether this is a round video.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>voice</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.8?<a href="/constructor/true">true</a></td>
|
||||
<td>Whether this is a voice message.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>document</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.0?<a href="/type/Document">Document</a></td>
|
||||
<td>Attached document</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>alt_document</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.5?<a href="/type/Document">Document</a></td>
|
||||
<td>Currently only used for story videos, may contain an alternative version of the story video, explicitly encoded using H.264 (in MPEG4 transport) at a lower resolution than <code>document</code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>ttl_seconds</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.2?<a href="/type/int">int</a></td>
|
||||
<td>Time to live of self-destructing document</td>
|
||||
|
|
|
@ -67,6 +67,31 @@
|
|||
</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>force_large_media</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>If set, specifies that a large media preview should be used.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>force_small_media</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.1?<a href="/constructor/true">true</a></td>
|
||||
<td>If set, specifies that a small media preview should be used.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>manual</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.3?<a href="/constructor/true">true</a></td>
|
||||
<td>If set, indicates that the URL used for the webpage preview was specified manually using <a href="/constructor/inputMediaWebPage">inputMediaWebPage</a>, and may not be related to any of the URLs specified in the message.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>safe</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.4?<a href="/constructor/true">true</a></td>
|
||||
<td>If set, the webpage can be opened directly without user confirmation; otherwise, user confirmation is required, showing the exact URL that will be opened.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>webpage</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/WebPage">WebPage</a></td>
|
||||
<td>Webpage preview</td>
|
||||
|
@ -74,7 +99,10 @@
|
|||
</tbody>
|
||||
</table>
|
||||
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
|
||||
<p><a href="/type/MessageMedia">MessageMedia</a></p></div>
|
||||
<p><a href="/type/MessageMedia">MessageMedia</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="#inputmediawebpage" id="inputmediawebpage" name="inputmediawebpage"><i class="anchor-icon"></i></a><a href="/constructor/inputMediaWebPage">inputMediaWebPage</a></h4>
|
||||
<p>Specifies options that will be used to generate the link preview for the caption, or even a standalone link preview without an attached message.</p></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<meta charset="utf-8">
|
||||
<title>messages.botApp</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Contains information about a named bot web app">
|
||||
<meta property="description" content="Contains information about a direct link Mini App">
|
||||
<meta property="og:title" content="messages.botApp">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Contains information about a named bot web app">
|
||||
<meta property="og:description" content="Contains information about a direct link Mini App">
|
||||
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
|
||||
|
@ -42,7 +42,7 @@
|
|||
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/messages.botApp" >messages.botApp</a></li></ul></div>
|
||||
<h1 id="dev_page_title">messages.botApp</h1>
|
||||
|
||||
<div id="dev_page_content"><p>Contains information about a <a href="/api/bots/webapps#named-bot-web-apps">named bot web app</a></p>
|
||||
<div id="dev_page_content"><p>Contains information about a <a href="/api/bots/webapps#direct-link-mini-apps">direct link Mini App</a></p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
|
@ -82,6 +82,11 @@
|
|||
<td>The bot is asking permission to send messages to the user: if the user agrees, set the <code>write_allowed</code> flag when invoking <a href="/method/messages.requestAppWebView">messages.requestAppWebView</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>has_settings</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.2?<a href="/constructor/true">true</a></td>
|
||||
<td>Deprecated flag, can be ignored.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>app</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/BotApp">BotApp</a></td>
|
||||
<td>Bot app information</td>
|
||||
|
@ -92,9 +97,9 @@
|
|||
<p><a href="/type/messages.BotApp">messages.BotApp</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="#messagesrequestappwebview" id="messagesrequestappwebview" name="messagesrequestappwebview"><i class="anchor-icon"></i></a><a href="/method/messages.requestAppWebView">messages.requestAppWebView</a></h4>
|
||||
<p>Open a <a href="/bots/webapps">bot web app</a> from a <a href="/api/links#named-bot-web-app-links">named bot web app deep link</a>, sending over user information after user confirmation.</p>
|
||||
<p>Open a <a href="/bots/webapps">bot mini app</a> from a <a href="/api/links#direct-mini-app-links">direct Mini App deep link</a>, sending over user information after user confirmation.</p>
|
||||
<p>After calling this method, until the user closes the webview, <a href="/method/messages.prolongWebView">messages.prolongWebView</a> must be called every 60 seconds.</p>
|
||||
<h4><a class="anchor" href="#bot-web-apps" id="bot-web-apps" name="bot-web-apps"><i class="anchor-icon"></i></a><a href="/api/bots/webapps">Bot web apps</a></h4>
|
||||
<h4><a class="anchor" href="#mini-apps-on-telegram" id="mini-apps-on-telegram" name="mini-apps-on-telegram"><i class="anchor-icon"></i></a><a href="/api/bots/webapps">Mini Apps on Telegram</a></h4>
|
||||
<p>Bots can offer users interactive HTML5 web apps to completely replace any website.</p></div>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -92,7 +92,7 @@
|
|||
<p><a href="/type/messages.SearchCounter">messages.SearchCounter</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="#messagessearch" id="messagessearch" name="messagessearch"><i class="anchor-icon"></i></a><a href="/method/messages.search">messages.search</a></h4>
|
||||
<p>Returns found messages</p></div>
|
||||
<p>Search for messages.</p></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -86,6 +86,16 @@
|
|||
<td style="text-align: center;"><a href="/type/string">string</a></td>
|
||||
<td>Transcripted text</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>trial_remains_num</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.1?<a href="/type/int">int</a></td>
|
||||
<td>For non-<a href="/api/premium">Premium</a> users, this flag will be set, indicating the remaining transcriptions in the free trial period.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>trial_remains_until_date</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.1?<a href="/type/int">int</a></td>
|
||||
<td>For non-<a href="/api/premium">Premium</a> users, this flag will be set, indicating the date when the <code>trial_remains_num</code> counter will be reset to the maximum value of <a href="/api/config#transcribe-audio-trial-weekly-number">transcribe_audio_trial_weekly_number</a>.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
|
||||
|
@ -93,6 +103,10 @@
|
|||
<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="#updatetranscribedaudio" id="updatetranscribedaudio" name="updatetranscribedaudio"><i class="anchor-icon"></i></a><a href="/constructor/updateTranscribedAudio">updateTranscribedAudio</a></h4>
|
||||
<p>A pending <a href="/api/transcribe">voice message transcription »</a> initiated with <a href="/method/messages.transcribeAudio">messages.transcribeAudio</a> was updated.</p>
|
||||
<h4><a class="anchor" href="#telegram-premium" id="telegram-premium" name="telegram-premium"><i class="anchor-icon"></i></a><a href="/api/premium">Telegram Premium</a></h4>
|
||||
<p>Telegram Premium is an optional subscription service that unlocks additional exclusive client-side and API-side features, while helping support the development of the app.</p>
|
||||
<h4><a class="anchor" href="#client-configuration" id="client-configuration" name="client-configuration"><i class="anchor-icon"></i></a><a href="/api/config">Client configuration</a></h4>
|
||||
<p>The MTProto API has multiple configuration parameters that can be fetched with the appropriate methods.</p>
|
||||
<h4><a class="anchor" href="#voice-message-transcription" id="voice-message-transcription" name="voice-message-transcription"><i class="anchor-icon"></i></a><a href="/api/transcribe">Voice message transcription</a></h4>
|
||||
<p>How to transcribe voice messages.</p></div>
|
||||
|
||||
|
|
|
@ -88,7 +88,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td><strong>recent_voters</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.3?<a href="/type/Vector%20t">Vector</a><<a href="/type/long">long</a>></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.3?<a href="/type/Vector%20t">Vector</a><<a href="/type/Peer">Peer</a>></td>
|
||||
<td>IDs of the last users that recently voted in the poll</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
|
@ -86,7 +86,8 @@
|
|||
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
|
||||
<p><a href="/type/RequestPeerType">RequestPeerType</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-premium" id="telegram-premium" name="telegram-premium"><i class="anchor-icon"></i></a><a href="/api/premium">Telegram Premium</a></h4></div>
|
||||
<h4><a class="anchor" href="#telegram-premium" id="telegram-premium" name="telegram-premium"><i class="anchor-icon"></i></a><a href="/api/premium">Telegram Premium</a></h4>
|
||||
<p>Telegram Premium is an optional subscription service that unlocks additional exclusive client-side and API-side features, while helping support the development of the app.</p></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -112,6 +112,16 @@
|
|||
<td>Parameter for the bot start message if the sponsored chat is a chat with a bot.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>webpage</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.9?<a href="/type/SponsoredWebPage">SponsoredWebPage</a></td>
|
||||
<td>Sponsored website</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>app</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.10?<a href="/type/BotApp">BotApp</a></td>
|
||||
<td><a href="/api/bots/webapps">Mini App »</a> to open when the sponsored message is clicked.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>message</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/string">string</a></td>
|
||||
<td>Sponsored message</td>
|
||||
|
@ -122,6 +132,11 @@
|
|||
<td><a href="/api/entities">Message entities for styled text</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>button_text</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.11?<a href="/type/string">string</a></td>
|
||||
<td>Text of the sponsored message button.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>sponsor_info</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.7?<a href="/type/string">string</a></td>
|
||||
<td>If set, contains additional information about the sponsor to be shown along with the message.</td>
|
||||
|
@ -136,6 +151,8 @@
|
|||
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
|
||||
<p><a href="/type/SponsoredMessage">SponsoredMessage</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="#mini-apps-on-telegram" id="mini-apps-on-telegram" name="mini-apps-on-telegram"><i class="anchor-icon"></i></a><a href="/api/bots/webapps">Mini Apps on Telegram</a></h4>
|
||||
<p>Bots can offer users interactive HTML5 web apps to completely replace any website.</p>
|
||||
<h4><a class="anchor" href="#styled-text-with-message-entities" id="styled-text-with-message-entities" name="styled-text-with-message-entities"><i class="anchor-icon"></i></a><a href="/api/entities">Styled text with message entities</a></h4>
|
||||
<p>How to create styled text with message entities</p></div>
|
||||
|
||||
|
|
|
@ -102,6 +102,16 @@
|
|||
<td>This is a custom emoji stickerset</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>text_color</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.9?<a href="/constructor/true">true</a></td>
|
||||
<td>Whether the color of this TGS custom emoji stickerset should be changed to the text color when used in messages, the accent color if used as emoji status, white on chat photos, or another appropriate color based on context.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>channel_emoji_status</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.10?<a href="/constructor/true">true</a></td>
|
||||
<td>If set, this custom emoji stickerset can be used in <a href="/api/emoji-status">channel emoji statuses</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>installed_date</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.0?<a href="/type/int">int</a></td>
|
||||
<td>When was this stickerset installed</td>
|
||||
|
@ -161,6 +171,8 @@
|
|||
<h3><a class="anchor" href="#type" id="type" name="type"><i class="anchor-icon"></i></a>Type</h3>
|
||||
<p><a href="/type/StickerSet">StickerSet</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="#emoji-status" id="emoji-status" name="emoji-status"><i class="anchor-icon"></i></a><a href="/api/emoji-status">Emoji status</a></h4>
|
||||
<p>Telegram allows users to set an emoticon or a custom emoji as status, to show next to their name in chats and profiles.</p>
|
||||
<h4><a class="anchor" href="#deep-links" id="deep-links" name="deep-links"><i class="anchor-icon"></i></a><a href="/api/links">Deep links</a></h4>
|
||||
<p>Telegram clients must handle special tg:// and t.me deep links encountered in messages, link entities and in other apps by registering OS handlers.</p>
|
||||
<h4><a class="anchor" href="#messagesgetcustomemojidocuments" id="messagesgetcustomemojidocuments" name="messagesgetcustomemojidocuments"><i class="anchor-icon"></i></a><a href="/method/messages.getCustomEmojiDocuments">messages.getCustomEmojiDocuments</a></h4>
|
||||
|
|
|
@ -61,10 +61,10 @@
|
|||
<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="#bot-attachment-menu-entries" id="bot-attachment-menu-entries" name="bot-attachment-menu-entries"><i class="anchor-icon"></i></a><a href="/api/bots/attach">Bot attachment menu entries</a></h4>
|
||||
<p>Bots can install attachment menu entries, offering conveniently accessible, versatile web apps.</p>
|
||||
<h4><a class="anchor" href="#bot-attachment-menu-and-side-menu-entries" id="bot-attachment-menu-and-side-menu-entries" name="bot-attachment-menu-and-side-menu-entries"><i class="anchor-icon"></i></a><a href="/api/bots/attach">Bot attachment menu and side menu entries</a></h4>
|
||||
<p>Bots can install attachment menu and side menu entries, offering conveniently accessible, versatile web apps.</p>
|
||||
<h4><a class="anchor" href="#messagesgetattachmenubots" id="messagesgetattachmenubots" name="messagesgetattachmenubots"><i class="anchor-icon"></i></a><a href="/method/messages.getAttachMenuBots">messages.getAttachMenuBots</a></h4>
|
||||
<p>Returns installed attachment menu <a href="/api/bots/attach">bot web apps »</a></p></div>
|
||||
<p>Returns installed attachment menu <a href="/api/bots/attach">bot mini apps »</a></p></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue