telegram-crawler/data/core.telegram.org/api/config.html

402 lines
32 KiB
HTML
Raw Normal View History

2022-02-23 06:45:45 +01:00
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>Client configuration</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="The MTProto API has multiple configuration parameters that can be fetched with the appropriate methods.">
<meta property="og:title" content="Client configuration">
<meta property="og:image" content="">
<meta property="og:description" content="The MTProto API has multiple configuration parameters that can be fetched with the appropriate methods.">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
2022-03-18 20:48:38 +01:00
<link href="/css/telegram.css?224" rel="stylesheet" media="screen">
2022-02-23 06:45:45 +01:00
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class="active"><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class=""><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/api/config" >Client configuration</a></li></ul></div>
<h1 id="dev_page_title">Client configuration</h1>
<div id="dev_page_content"><!-- scroll_nav -->
<p>The MTProto API has multiple configuration parameters that can be fetched with the appropriate methods. </p>
2022-04-15 23:44:07 +02:00
<h3><a class="anchor" name="mtproto-configuration" href="#mtproto-configuration"><i class="anchor-icon"></i></a>MTProto configuration</h3>
<pre><code>config#330b4067 flags:# phonecalls_enabled:flags.1?true default_p2p_contacts:flags.3?true preload_featured_stickers:flags.4?true ignore_phone_entities:flags.5?true revoke_pm_inbox:flags.6?true blocked_mode:flags.8?true pfs_enabled:flags.13?true date:int expires:int test_mode:Bool this_dc:int dc_options:Vector&lt;DcOption&gt; dc_txt_domain_name:string chat_size_max:int megagroup_size_max:int forwarded_count_max:int online_update_period_ms:int offline_blur_timeout_ms:int offline_idle_timeout_ms:int online_cloud_timeout_ms:int notify_cloud_delay_ms:int notify_default_delay_ms:int push_chat_period_ms:int push_chat_limit:int saved_gifs_limit:int edit_time_limit:int revoke_time_limit:int revoke_pm_time_limit:int rating_e_decay:int stickers_recent_limit:int stickers_faved_limit:int channels_read_media_period:int tmp_sessions:flags.0?int pinned_dialogs_count_max:int pinned_infolder_count_max:int call_receive_timeout_ms:int call_ring_timeout_ms:int call_connect_timeout_ms:int call_packet_timeout_ms:int me_url_prefix:string autoupdate_url_prefix:flags.7?string gif_search_username:flags.9?string venue_search_username:flags.10?string img_search_username:flags.11?string static_maps_provider:flags.12?string caption_length_max:int message_length_max:int webfile_dc_id:int suggested_lang_code:flags.2?string lang_pack_version:flags.2?int base_lang_pack_version:flags.2?int = Config;
nearestDc#8e1a1775 country:string this_dc:int nearest_dc:int = NearestDc;
2022-02-23 06:45:45 +01:00
---functions---
2022-04-15 23:44:07 +02:00
help.getConfig#c4f9186b = Config;
help.getNearestDc#1fb33026 = NearestDc;</code></pre>
2022-02-23 06:45:45 +01:00
<p>The huge <a href="/constructor/config">config</a> constructor contains lots of useful information, from chat and message size limitations, to privacy settings, online status refresh interval and timeout, VoIP configuration, default inline bot usernames for GIF, image and venue lookup, and lots of other global and user-specific information, check out the <a href="/constructor/config">constructor page</a> for more information.</p>
2022-04-15 23:44:07 +02:00
<h3><a class="anchor" name="client-configuration" href="#client-configuration"><i class="anchor-icon"></i></a>Client configuration</h3>
<pre><code>jsonObjectValue#c0de1bd9 key:string value:JSONValue = JSONObjectValue;
2022-02-23 06:45:45 +01:00
2022-04-15 23:44:07 +02:00
jsonNull#3f6d7b68 = JSONValue;
jsonBool#c7345e6a value:Bool = JSONValue;
jsonNumber#2be0dfa4 value:double = JSONValue;
jsonString#b71e767a value:string = JSONValue;
jsonArray#f7444763 value:Vector&lt;JSONValue&gt; = JSONValue;
jsonObject#99c1d49d value:Vector&lt;JSONObjectValue&gt; = JSONValue;
2022-02-23 06:45:45 +01:00
---functions---
2022-04-15 23:44:07 +02:00
help.getAppConfig#98914110 = JSONValue;</code></pre>
<p>The <a href="/method/help.getAppConfig">help.getAppConfig</a> method returns a JSON object containing rapidly evolving, client-specific configuration parameters.<br>While <a href="/method/help.getConfig">help.getConfig</a> returns MTProto-specific configuration with information about server-side limitations and other MTProto-related information, <a href="/method/help.getAppConfig">help.getAppConfig</a> returns configuration parameters useful for graphical Telegram clients.</p>
<p>Typical fields included in the resulting JSON object are:<br><em> <code>emojies_animated_zoom</code> - <a href="/api/animated-emojis">Animated emojis</a> and <a href="/api/dice">animated dice</a> should be scaled by this factor before being shown to the user (float)
</em> <code>keep_alive_service</code> - Whether app clients should start a keepalive service to keep the app running and fetch updates even when the app is closed (boolean)<br><em> <code>background_connection</code> - Whether app clients should start a background TCP connection for MTProto update fetching (boolean)
</em> <code>emojies_send_dice</code> - A list of supported <a href="/api/dice">animated dice</a> stickers (array of strings).<br><em> <code>emojies_send_dice_success</code> - For <a href="/api/dice">animated dice</a> emojis other than the basic <img class="emoji" src="//telegram.org/img/emoji/40/F09F8EB2.png" width="20" height="20" alt="🎲" />, indicates the winning dice value and the final frame of the animated sticker, at which to show the fireworks <img class="emoji" src="//telegram.org/img/emoji/40/F09F8E86.png" width="20" height="20" alt="🎆" /> (object with emoji keys and object values, containing <code>value</code> and <code>frame_start</code> float values)
</em> <code>emojies_sounds</code> - A map of soundbites to be played when the user clicks on the specified <a href="/api/animated-emojis">animated emoji</a>; the <a href="/api/file_reference">file reference field</a> should be base64-decoded before <a href="/api/files">downloading the file</a> (map of <a href="/api/files">file IDs</a>, with emoji string keys)<br><em> <code>gif_search_branding</code> - Specifies the name of the service providing GIF search through <a href="#mtproto-configuration">gif_search_username</a> (string)
</em> <code>gif_search_emojies</code> - Specifies a list of emojies that should be suggested as search term in a bar above the GIF search box (array of string emojis)<br><em> <code>stickers_emoji_suggest_only_api</code> - Specifies that the app should not display local sticker suggestions for emojis at all and just use the result of <a href="/method/messages.getStickers">messages.getStickers</a> (bool)
</em> <code>stickers_emoji_cache_time</code> - Specifies the validity period of the local cache of <a href="/method/messages.getStickers">messages.getStickers</a>, also relevant when generating the <a href="/api/offsets#hash-generation">pagination hash</a> when invoking the method. (int)<br><em> <code>qr_login_camera</code> - Whether the Settings-&gt;Devices menu should show an option to scan a <a href="/api/qr-login">QR login code</a> (boolean)
</em> <code>qr_login_code</code> - Whether the login screen should show a <a href="/api/qr-login">QR code login option</a>, possibly as default login method (string, “disabled”, “primary” or “secondary”)<br><em> <code>dialog_filters_enabled</code> - Whether clients should show an option for managing <a href="/api/folders">dialog filters AKA folders</a> (boolean)
</em> <code>dialog_filters_tooltip</code> - Whether clients should actively show a tooltip, inviting the user to configure <a href="/api/folders">dialog filters AKA folders</a>; typically this happens when the chat list is long enough to start getting cluttered. (boolean)<br><em> <code>autoarchive_setting_available</code> - Whether clients <em>can</em> invoke <a href="/method/account.setGlobalPrivacySettings">account.setGlobalPrivacySettings</a> with <a href="/constructor/globalPrivacySettings"><code>globalPrivacySettings.archive_and_mute_new_noncontact_peers = boolTrue</code></a>, to automatically archive and mute new incoming chats from non-contacts. (boolean)
</em> <code>pending_suggestions</code> - Contains a list of suggestions that should be actively shown as a tooltip to the user. (Array of strings, possible values shown <a href="#suggestions">in the suggestions section &raquo;</a>.<br><em> <code>url_auth_domains</code> - A list of domains that support automatic login with manual user confirmation, <a href="/api/url-authorization#link-url-authorization">click here for more info on URL authorization &raquo;</a>. (array of strings)
</em> <code>autologin_domains</code> - A list of Telegram domains that support automatic login with no user confirmation, <a href="/api/url-authorization#link-url-authorization">click here for more info on URL authorization &raquo;</a>. (array of strings)<br><em> <code>autologin_token</code> - Autologin token, <a href="/api/url-authorization#link-url-authorization">click here for more info on URL authorization &raquo;</a>. (string)
</em> <code>round_video_encoding</code> - Contains a set of recommended codec parameters for round videos.<br><em> <code>chat_read_mark_size_threshold</code> - Per-user read receipts, fetchable using <a href="/method/messages.getMessageReadParticipants">messages.getMessageReadParticipants</a>, will be available in groups with an amount of participants less or equal to <code>chat_read_mark_size_threshold</code>. (int)
</em> <code>chat_read_mark_expire_period</code> - To protect user privacy, read receipts are only stored for <code>chat_read_mark_expire_period</code> seconds after the message was sent. (int)<br><em> <code>groupcall_video_participants_max</code> - Maximum number of participants in a group call (livestreams allow ∞ participants) (int)
</em> <code>reactions_default</code> - Default emoji reaction to use in the quick reaction menu, this value can be changed using <a href="/method/messages.setDefaultReaction">messages.setDefaultReaction</a> (string)<br>* <code>reactions_uniq_max</code> - Maximum number of unique reaction-emojis for any given message: for example, if there are 2000 <img class="emoji" src="//telegram.org/img/emoji/40/F09F918D.png" width="20" height="20" alt="👍" /> and 1000 <img class="emoji" src="//telegram.org/img/emoji/40/F09F9881.png" width="20" height="20" alt="😁" /> reactions and reactions_uniq_max = 2, you can&#39;t add a <img class="emoji" src="//telegram.org/img/emoji/40/F09F918E.png" width="20" height="20" alt="👎" /> reaction, because that would raise the number of unique reaction-emojis to 3 &gt; 2. (integer)</p>
2022-02-23 06:45:45 +01:00
<p>Example value: </p>
2022-04-15 23:44:07 +02:00
<pre><code class="lang-json">{
&quot;test&quot;: 1,
&quot;emojies_animated_zoom&quot;: 0.625,
&quot;keep_alive_service&quot;: true,
&quot;background_connection&quot;: true,
&quot;emojies_send_dice&quot;: [
&quot;\ud83c\udfb2&quot;,
&quot;\ud83c\udfaf&quot;,
&quot;\ud83c\udfc0&quot;,
&quot;\u26bd&quot;,
&quot;\u26bd\ufe0f&quot;,
&quot;\ud83c\udfb0&quot;,
&quot;\ud83c\udfb3&quot;
2022-02-23 06:45:45 +01:00
],
2022-04-15 23:44:07 +02:00
&quot;emojies_send_dice_success&quot;: {
&quot;\ud83c\udfaf&quot;: {
&quot;value&quot;: 6,
&quot;frame_start&quot;: 62
2022-02-23 06:45:45 +01:00
},
2022-04-15 23:44:07 +02:00
&quot;\ud83c\udfc0&quot;: {
&quot;value&quot;: 5,
&quot;frame_start&quot;: 110
2022-02-23 06:45:45 +01:00
},
2022-04-15 23:44:07 +02:00
&quot;\u26bd&quot;: {
&quot;value&quot;: 5,
&quot;frame_start&quot;: 110
2022-02-23 06:45:45 +01:00
},
2022-04-15 23:44:07 +02:00
&quot;\u26bd\ufe0f&quot;: {
&quot;value&quot;: 5,
&quot;frame_start&quot;: 110
2022-02-23 06:45:45 +01:00
},
2022-04-15 23:44:07 +02:00
&quot;\ud83c\udfb0&quot;: {
&quot;value&quot;: 64,
&quot;frame_start&quot;: 110
2022-02-23 06:45:45 +01:00
},
2022-04-15 23:44:07 +02:00
&quot;\ud83c\udfb3&quot;: {
&quot;value&quot;: 6,
&quot;frame_start&quot;: 110
2022-02-23 06:45:45 +01:00
}
},
2022-04-15 23:44:07 +02:00
&quot;emojies_sounds&quot;: {
&quot;\ud83c\udf83&quot;: {
&quot;id&quot;: &quot;4956223179606458539&quot;,
&quot;access_hash&quot;: &quot;-2107001400913062971&quot;,
&quot;file_reference_base64&quot;: &quot;AGIaeBZckszt-s71DzCHhSkfZI_l&quot;
2022-02-23 06:45:45 +01:00
},
2022-04-15 23:44:07 +02:00
&quot;\u26b0&quot;: {
&quot;id&quot;: &quot;4956223179606458540&quot;,
&quot;access_hash&quot;: &quot;-1498869544183595185&quot;,
&quot;file_reference_base64&quot;: &quot;AGIaeBZRfKxsAgnaLEDh5XIa8Gri&quot;
2022-02-23 06:45:45 +01:00
},
2022-04-15 23:44:07 +02:00
&quot;\ud83e\udddf\u200d\u2642&quot;: {
&quot;id&quot;: &quot;4960929110848176331&quot;,
&quot;access_hash&quot;: &quot;3986395821757915468&quot;,
&quot;file_reference_base64&quot;: &quot;AGIaeBZcFga_bS9BsPvVNA2zuYCI&quot;
2022-02-23 06:45:45 +01:00
},
2022-04-15 23:44:07 +02:00
&quot;\ud83e\udddf&quot;: {
&quot;id&quot;: &quot;4960929110848176332&quot;,
&quot;access_hash&quot;: &quot;-8929417974289765626&quot;,
&quot;file_reference_base64&quot;: &quot;AGIaeBbUbidUDCl4nImJXPTl2wWj&quot;
2022-02-23 06:45:45 +01:00
},
2022-04-15 23:44:07 +02:00
&quot;\ud83e\udddf\u200d\u2640&quot;: {
&quot;id&quot;: &quot;4960929110848176333&quot;,
&quot;access_hash&quot;: &quot;9161696144162881753&quot;,
&quot;file_reference_base64&quot;: &quot;AGIaeBb-ulJ2E-rSI2B8EKyAXs-8&quot;
2022-02-23 06:45:45 +01:00
},
2022-04-15 23:44:07 +02:00
&quot;\ud83c\udf51&quot;: {
&quot;id&quot;: &quot;4963180910661861548&quot;,
&quot;access_hash&quot;: &quot;-7431729439735063448&quot;,
&quot;file_reference_base64&quot;: &quot;AGIaeBa940aXpIVLThj0J2ctxYFe&quot;
2022-02-23 06:45:45 +01:00
},
2022-04-15 23:44:07 +02:00
&quot;\ud83c\udf8a&quot;: {
&quot;id&quot;: &quot;5094064004578410732&quot;,
&quot;access_hash&quot;: &quot;8518192996098758509&quot;,
&quot;file_reference_base64&quot;: &quot;AGIaeBZFqTTp5drt0JZ86DGDAu1t&quot;
2022-02-23 06:45:45 +01:00
},
2022-04-15 23:44:07 +02:00
&quot;\ud83c\udf84&quot;: {
&quot;id&quot;: &quot;5094064004578410733&quot;,
&quot;access_hash&quot;: &quot;-4142643820629256996&quot;,
&quot;file_reference_base64&quot;: &quot;AGIaeBbEqu-gV0qAUdP5lD3MxLSK&quot;
2022-02-23 06:45:45 +01:00
},
2022-04-15 23:44:07 +02:00
&quot;\ud83e\uddbe&quot;: {
&quot;id&quot;: &quot;5094064004578410734&quot;,
&quot;access_hash&quot;: &quot;-8934384022571962340&quot;,
&quot;file_reference_base64&quot;: &quot;AGIaeBZ0YCp8_Zl_cmP4nvKkkSfF&quot;
2022-02-23 06:45:45 +01:00
}
},
2022-04-15 23:44:07 +02:00
&quot;gif_search_branding&quot;: &quot;tenor&quot;,
&quot;gif_search_emojies&quot;: [
&quot;\ud83d\udc4d&quot;,
&quot;\ud83d\ude18&quot;,
&quot;\ud83d\ude0d&quot;,
&quot;\ud83d\ude21&quot;,
&quot;\ud83e\udd73&quot;,
&quot;\ud83d\ude02&quot;,
&quot;\ud83d\ude2e&quot;,
&quot;\ud83d\ude44&quot;,
&quot;\ud83d\ude0e&quot;,
&quot;\ud83d\udc4e&quot;
2022-02-23 06:45:45 +01:00
],
2022-04-15 23:44:07 +02:00
&quot;stickers_emoji_suggest_only_api&quot;: false,
&quot;stickers_emoji_cache_time&quot;: 86400,
&quot;groupcall_video_participants_max&quot;: 1000,
&quot;qr_login_camera&quot;: true,
&quot;qr_login_code&quot;: &quot;primary&quot;,
&quot;dialog_filters_enabled&quot;: true,
&quot;dialog_filters_tooltip&quot;: true,
&quot;autoarchive_setting_available&quot;: false,
&quot;pending_suggestions&quot;: [
&quot;AUTOARCHIVE_POPULAR&quot;,
&quot;VALIDATE_PASSWORD&quot;,
&quot;VALIDATE_PHONE_NUMBER&quot;,
&quot;NEWCOMER_TICKS&quot;
2022-02-23 06:45:45 +01:00
],
2022-04-15 23:44:07 +02:00
&quot;autologin_token&quot;: &quot;string&quot;,
&quot;autologin_domains&quot;: [
&quot;instantview.telegram.org&quot;,
&quot;translations.telegram.org&quot;,
&quot;contest.dev&quot;,
&quot;contest.com&quot;,
&quot;bugs.telegram.org&quot;,
&quot;suggestions.telegram.org&quot;,
&quot;themes.telegram.org&quot;,
&quot;promote.telegram.org&quot;
2022-02-23 06:45:45 +01:00
],
2022-04-15 23:44:07 +02:00
&quot;round_video_encoding&quot;: {
&quot;diameter&quot;: 384,
&quot;video_bitrate&quot;: 1000,
&quot;audio_bitrate&quot;: 64,
&quot;max_size&quot;: 12582912
2022-02-23 06:45:45 +01:00
},
2022-04-15 23:44:07 +02:00
&quot;chat_read_mark_expire_period&quot;: 604800,
&quot;chat_read_mark_size_threshold&quot;: 100,
&quot;reactions_default&quot;: &quot;\ud83d\udc4d&quot;,
&quot;reactions_uniq_max&quot;: 11
2022-02-23 06:45:45 +01:00
}</code></pre>
2022-04-15 23:44:07 +02:00
<h3><a class="anchor" name="suggestions" href="#suggestions"><i class="anchor-icon"></i></a>Suggestions</h3>
2022-02-23 06:45:45 +01:00
<p>The API can return a set of useful suggestions for users of graphical clients. </p>
2022-04-15 23:44:07 +02:00
<h4><a class="anchor" name="basic-suggestions" href="#basic-suggestions"><i class="anchor-icon"></i></a>Basic suggestions</h4>
<pre><code>jsonObjectValue#c0de1bd9 key:string value:JSONValue = JSONObjectValue;
2022-02-23 06:45:45 +01:00
2022-04-15 23:44:07 +02:00
jsonNull#3f6d7b68 = JSONValue;
jsonBool#c7345e6a value:Bool = JSONValue;
jsonNumber#2be0dfa4 value:double = JSONValue;
jsonString#b71e767a value:string = JSONValue;
jsonArray#f7444763 value:Vector&lt;JSONValue&gt; = JSONValue;
jsonObject#99c1d49d value:Vector&lt;JSONObjectValue&gt; = JSONValue;
2022-02-23 06:45:45 +01:00
---functions---
2022-04-15 23:44:07 +02:00
help.getAppConfig#98914110 = JSONValue;</code></pre>
<p>The <a href="/method/help.getAppConfig">help.getAppConfig</a> method returns a JSON object containing rapidly evolving, client-specific configuration parameters.<br>A full list of these parameters can be seen in the <a href="#client-configuration">Client Configuration section &raquo;</a>, but we&#39;re mostly interested in the <code>pending_suggestions</code> and <code>autoarchive_setting_available</code> fields of the returned JSON object: </p>
2022-02-23 06:45:45 +01:00
<ul>
<li><code>autoarchive_setting_available</code> - Whether clients <em>can</em> invoke <a href="/method/account.setGlobalPrivacySettings">account.setGlobalPrivacySettings</a> with <a href="/constructor/globalPrivacySettings"><code>globalPrivacySettings.archive_and_mute_new_noncontact_peers = boolTrue</code></a>, to automatically archive and mute new incoming chats from non-contacts. (boolean)</li>
<li><code>pending_suggestions</code> - Contains a list of suggestions that should be actively shown as a tooltip to the user. Array of strings, possible values shown below:<ul>
2022-04-15 23:44:07 +02:00
<li><code>&quot;AUTOARCHIVE_POPULAR&quot;</code> - Users <em>should</em> invoke <a href="/method/account.setGlobalPrivacySettings">account.setGlobalPrivacySettings</a> with <a href="/constructor/globalPrivacySettings"><code>globalPrivacySettings.archive_and_mute_new_noncontact_peers = boolTrue</code></a>, to automatically archive and mute new incoming chats from non-contacts.</li>
<li><code>&quot;VALIDATE_PASSWORD&quot;</code> - Users should make sure they still remember their <a href="/api/srp">2-step verification password</a>.</li>
<li><code>&quot;VALIDATE_PHONE_NUMBER&quot;</code> - Users should check whether their <a href="/api/auth">authorization phone number</a> is correct and change the phone number if it is inaccessible.</li>
<li><code>&quot;NEWCOMER_TICKS&quot;</code> - Show the user a hint about the meaning of one and two ticks on sent messages.</li>
2022-02-23 06:45:45 +01:00
</ul>
</li>
</ul>
2022-04-15 23:44:07 +02:00
<h4><a class="anchor" name="channel-suggestions" href="#channel-suggestions"><i class="anchor-icon"></i></a>Channel suggestions</h4>
<pre><code>messages.chatFull#e5d7d19c full_chat:ChatFull chats:Vector&lt;Chat&gt; users:Vector&lt;User&gt; = messages.ChatFull;
2022-02-23 06:45:45 +01:00
2022-04-15 23:44:07 +02:00
channelFull#e13c3d20 flags:# can_view_participants:flags.3?true can_set_username:flags.6?true can_set_stickers:flags.7?true hidden_prehistory:flags.10?true can_set_location:flags.16?true has_scheduled:flags.19?true can_view_stats:flags.20?true blocked:flags.22?true id:long about:string participants_count:flags.0?int admins_count:flags.1?int kicked_count:flags.2?int banned_count:flags.2?int online_count:flags.13?int read_inbox_max_id:int read_outbox_max_id:int unread_count:int chat_photo:Photo notify_settings:PeerNotifySettings exported_invite:flags.23?ExportedChatInvite bot_info:Vector&lt;BotInfo&gt; migrated_from_chat_id:flags.4?long migrated_from_max_id:flags.4?int pinned_msg_id:flags.5?int stickerset:flags.8?StickerSet available_min_id:flags.9?int folder_id:flags.11?int linked_chat_id:flags.14?long location:flags.15?ChannelLocation slowmode_seconds:flags.17?int slowmode_next_send_date:flags.18?int stats_dc:flags.12?int pts:int call:flags.21?InputGroupCall ttl_period:flags.24?int pending_suggestions:flags.25?Vector&lt;string&gt; groupcall_default_join_as:flags.26?Peer theme_emoticon:flags.27?string requests_pending:flags.28?int recent_requesters:flags.28?Vector&lt;long&gt; default_send_as:flags.29?Peer available_reactions:flags.30?Vector&lt;string&gt; = ChatFull;
2022-02-23 06:45:45 +01:00
---functions---
2022-04-15 23:44:07 +02:00
channels.getFullChannel#8736a09 channel:InputChannel = messages.ChatFull;</code></pre>
<p>Some <a href="/api/channel">channel/supergroup</a>-related suggestions can also be contained in the <code>pending_suggestions</code> field of the <a href="/constructor/channelFull">channelFull</a> constructor, returned by <a href="/method/channels.getFullChannel">channels.getFullChannel</a>.<br>Here&#39;s a list of possible suggestions:<br>* <code>CONVERT_GIGAGROUP</code> - The <a href="/api/channel">supergroup</a> has many participants: the admin should call <a href="/method/channels.convertToGigagroup">channels.convertToGigagroup</a> to convert it to a gigagroup.</p>
<h4><a class="anchor" name="dismissing-suggestions" href="#dismissing-suggestions"><i class="anchor-icon"></i></a>Dismissing suggestions</h4>
<pre><code>boolFalse#bc799737 = Bool;
boolTrue#997275b5 = Bool;
2022-02-23 06:45:45 +01:00
---functions---
2022-04-15 23:44:07 +02:00
help.dismissSuggestion#f50dbaa1 peer:InputPeer suggestion:string = Bool;</code></pre>
<p><a href="/method/help.dismissSuggestion">help.dismissSuggestion</a> can be used to dismiss a suggestion.<br>Pass <a href="/constructor/inputPeerEmpty">inputPeerEmpty</a> to <code>peer</code> for <a href="#basic-suggestions">basic suggestions</a> and the <a href="/api/channel">channel/supergroup</a>&#39;s peer for <a href="#channel-suggestions">channel suggestions</a>.</p>
<h3><a class="anchor" name="app-specific-configuration" href="#app-specific-configuration"><i class="anchor-icon"></i></a>App-specific configuration</h3>
<pre><code>help.appUpdate#ccbbce30 flags:# can_not_skip:flags.0?true id:int version:string text:string entities:Vector&lt;MessageEntity&gt; document:flags.1?Document url:flags.2?string sticker:flags.3?Document = help.AppUpdate;
help.noAppUpdate#c45a6536 = help.AppUpdate;
2022-02-23 06:45:45 +01:00
2022-04-15 23:44:07 +02:00
updates#74ae4240 updates:Vector&lt;Update&gt; users:Vector&lt;User&gt; chats:Vector&lt;Chat&gt; date:int seq:int = Updates;
updateServiceNotification#ebe46819 flags:# popup:flags.0?true inbox_date:flags.1?int type:string message:string media:MessageMedia entities:Vector&lt;MessageEntity&gt; = Update;
2022-02-23 06:45:45 +01:00
2022-04-15 23:44:07 +02:00
help.inviteText#18cb9f78 message:string = help.InviteText;
2022-02-23 06:45:45 +01:00
---functions---
2022-04-15 23:44:07 +02:00
help.getAppUpdate#522d5a7d source:string = help.AppUpdate;
help.getAppChangelog#9010ef6f prev_app_version:string = Updates;
2022-02-23 06:45:45 +01:00
2022-04-15 23:44:07 +02:00
help.getInviteText#4d392343 = help.InviteText;</code></pre>
2022-02-23 06:45:45 +01:00
<ul>
<li><a href="/method/help.getAppUpdate">help.getAppUpdate</a> - Get info about an application update, can contain the updated application binary in the attached document</li>
<li><a href="/method/help.getAppChangelog">help.getAppChangelog</a> - Get a list of service messages with app-specific changelogs</li>
2022-04-15 23:44:07 +02:00
<li><a href="/method/help.getInviteText">help.getInviteText</a> - Returns a localized invitation message that can be sent via SMS to contacts that haven&#39;t signed up to Telegram yet</li>
2022-02-23 06:45:45 +01:00
</ul>
2022-04-15 23:44:07 +02:00
<h3><a class="anchor" name="terms-of-service" href="#terms-of-service"><i class="anchor-icon"></i></a>Terms of service</h3>
<pre><code>help.termsOfServiceUpdateEmpty#e3309f7f expires:int = help.TermsOfServiceUpdate;
help.termsOfServiceUpdate#28ecf961 expires:int terms_of_service:help.TermsOfService = help.TermsOfServiceUpdate;
2022-02-23 06:45:45 +01:00
2022-04-15 23:44:07 +02:00
help.termsOfService#780a0310 flags:# popup:flags.0?true id:DataJSON text:string entities:Vector&lt;MessageEntity&gt; min_age_confirm:flags.1?int = help.TermsOfService;
2022-02-23 06:45:45 +01:00
2022-04-15 23:44:07 +02:00
auth.authorizationSignUpRequired#44747e9a flags:# terms_of_service:flags.0?help.TermsOfService = auth.Authorization;
2022-02-23 06:45:45 +01:00
---functions---
2022-04-15 23:44:07 +02:00
help.getTermsOfServiceUpdate#2ca51fd1 = help.TermsOfServiceUpdate;
help.acceptTermsOfService#ee72f79a id:DataJSON = Bool;
2022-02-23 06:45:45 +01:00
2022-04-15 23:44:07 +02:00
auth.signIn#bcd51581 phone_number:string phone_code_hash:string phone_code:string = auth.Authorization;
2022-02-23 06:45:45 +01:00
2022-04-15 23:44:07 +02:00
account.deleteAccount#418d4e0b reason:string = Bool;</code></pre>
<p>These methods can be used for managing consent to Telegram&#39;s <a href="https://telegram.org/tos">Terms Of Service</a>. </p>
<p>Typically, before a user <a href="/api/auth#sign-insign-up">signs up</a> by invoking <a href="/method/auth.signUp">auth.signUp</a>, apps should show a pop-up (if the <code>popup</code> flag of the <a href="/constructor/help.termsOfService">help.termsOfService</a> method is set), asking the user to accept Telegram&#39;s terms of service; in case of denial, the user is to be returned to the initial page of the login flow. </p>
2022-02-23 06:45:45 +01:00
<p>When signing up for the first time, the <a href="/constructor/help.termsOfService">help.termsOfService</a> is to be obtained from the <a href="/constructor/auth.authorizationSignUpRequired">auth.authorizationSignUpRequired</a> constructor returned by the <a href="/method/auth.signIn">auth.signIn</a>. </p>
2022-04-15 23:44:07 +02:00
<p>After signing up, or when logging in as an existing user, apps are supposed to call <a href="/method/help.getTermsOfServiceUpdate">help.getTermsOfServiceUpdate</a> to check for any updates to the Terms of Service; this call should be repeated after <code>expires</code> seconds have elapsed.<br>If an update to the Terms Of Service is available, clients are supposed to show a consent popup; if accepted, clients should call <a href="/method/help.acceptTermsOfService">help.acceptTermsOfService</a>, providing the <a href="/constructor/help.termsOfService">termsOfService <code>id</code> JSON object</a>; in case of denial, clients are to delete the account using <a href="/method/account.deleteAccount">account.deleteAccount</a>, providing <code>Decline ToS update</code> as deletion <code>reason</code>. </p>
2022-02-23 06:45:45 +01:00
<p>Example implementation: <a href="https://github.com/DrKLO/Telegram/blob/dbf81a34affcd1c24d78e1403347ea8b3a186154/TMessagesProj/src/main/java/org/telegram/ui/LoginActivity.java#L3510">android (signup)</a>, <a href="https://github.com/DrKLO/Telegram/blob/ed9e38da5b3b6ca80a7cb719a000d310d07497b0/TMessagesProj/src/main/java/org/telegram/ui/Components/TermsOfServiceView.java">android (after login)</a></p>
2022-04-15 23:44:07 +02:00
<h3><a class="anchor" name="telegram-support-info" href="#telegram-support-info"><i class="anchor-icon"></i></a>Telegram support info</h3>
<pre><code>user#3ff6ecb0 flags:# self:flags.10?true contact:flags.11?true mutual_contact:flags.12?true deleted:flags.13?true bot:flags.14?true bot_chat_history:flags.15?true bot_nochats:flags.16?true verified:flags.17?true restricted:flags.18?true min:flags.20?true bot_inline_geo:flags.21?true support:flags.23?true scam:flags.24?true apply_min_photo:flags.25?true fake:flags.26?true id:long access_hash:flags.0?long first_name:flags.1?string last_name:flags.2?string username:flags.3?string phone:flags.4?string photo:flags.5?UserProfilePhoto status:flags.6?UserStatus bot_info_version:flags.14?int restriction_reason:flags.18?Vector&lt;RestrictionReason&gt; bot_inline_placeholder:flags.19?string lang_code:flags.22?string = User;
2022-02-23 06:45:45 +01:00
2022-04-15 23:44:07 +02:00
help.support#17c6b5f6 phone_number:string user:User = help.Support;
help.supportName#8c05f1c9 name:string = help.SupportName;
2022-02-23 06:45:45 +01:00
---functions---
2022-04-15 23:44:07 +02:00
help.getSupport#9cdf08cd = help.Support;
help.getSupportName#d360e72c = help.SupportName;</code></pre>
<p>These methods can be used for fetching info about Telegram&#39;s support user, that users can use to get support and ask questions about the app.<br>- <a href="/method/help.getSupport">help.getSupport</a> - Will return the <a href="/constructor/user">user</a> object that can be used for contacting support.<br>- <a href="/method/help.getSupportName">help.getSupportName</a> - Will return a localized name for the support chat.</p>
<h3><a class="anchor" name="country-information-and-login-phone-patterns" href="#country-information-and-login-phone-patterns"><i class="anchor-icon"></i></a>Country information and login phone patterns</h3>
<pre><code>help.countryCode#4203c5ef flags:# country_code:string prefixes:flags.0?Vector&lt;string&gt; patterns:flags.1?Vector&lt;string&gt; = help.CountryCode;
2022-02-23 06:45:45 +01:00
2022-04-15 23:44:07 +02:00
help.country#c3878e23 flags:# hidden:flags.0?true iso2:string default_name:string name:flags.1?string country_codes:Vector&lt;help.CountryCode&gt; = help.Country;
2022-02-23 06:45:45 +01:00
2022-04-15 23:44:07 +02:00
help.countriesListNotModified#93cc1f32 = help.CountriesList;
help.countriesList#87d0759e countries:Vector&lt;help.Country&gt; hash:int = help.CountriesList;
2022-02-23 06:45:45 +01:00
---functions---
2022-04-15 23:44:07 +02:00
help.getCountriesList#735787a8 lang_code:string hash:int = help.CountriesList;</code></pre>
2022-02-23 06:45:45 +01:00
<p><a href="/method/help.getCountriesList">help.getCountriesList</a> can be used to fetch a list of localized names for all available countries and phone code patterns for logging in. </p>
2022-04-15 23:44:07 +02:00
<p>The phone code pattern should be used when showing the <a href="/api/auth">login</a> screen, or when changing phone number: for example, a pattern value of <code>XXX XXX XXX</code> with <code>country_code</code> <code>+39</code> indicates that the phone field for login should accept a spaced pattern like <code>+39 123 456 789</code>.<br>Also, the beginning of the national part of the phone number (<code>123 456 789</code>) should match one of the <code>prefixes</code>, if any were returned. </p>
</div>
2022-02-23 06:45:45 +01:00
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
2022-04-15 15:43:57 +02:00
<script src="/js/main.js?45"></script>
2022-02-23 06:45:45 +01:00
<script src="/js/jquery.min.js?1"></script>
<script src="/js/bootstrap.min.js?1"></script>
<script>window.initDevPageNav&&initDevPageNav();
backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>