Update content of files

This commit is contained in:
GitHub Action 2022-09-07 19:51:22 +00:00
parent a48c0f3088
commit e13c010278
3 changed files with 149 additions and 75 deletions

View file

@ -69,79 +69,6 @@
<a href='/method/help.getAppConfig'>help.getAppConfig</a>#98914110 = <a href='/type/JSONValue'>JSONValue</a>;</code></pre>
<p>The <a href="/method/help.getAppConfig">help.getAppConfig</a> method returns a JSON object containing rapidly evolving, client-specific configuration parameters.<br>
While <a href="/method/help.getConfig">help.getConfig</a> returns MTProto-specific configuration with information about server-side limitations and other MTProto-related information, <a href="/method/help.getAppConfig">help.getAppConfig</a> returns configuration parameters useful for graphical Telegram clients.</p>
<p>Typical fields included in the resulting JSON object are: </p>
<ul>
<li><code>emojies_animated_zoom</code> - <a href="/api/animated-emojis">Animated emojis</a> and <a href="/api/dice">animated dice</a> should be scaled by this factor before being shown to the user (float)</li>
<li><code>keep_alive_service</code> - Whether app clients should start a keepalive service to keep the app running and fetch updates even when the app is closed (boolean)</li>
<li><code>background_connection</code> - Whether app clients should start a background TCP connection for MTProto update fetching (boolean)</li>
<li><code>emojies_send_dice</code> - A list of supported <a href="/api/dice">animated dice</a> stickers (array of strings).</li>
<li><code>emojies_send_dice_success</code> - For <a href="/api/dice">animated dice</a> emojis other than the basic <img class="emoji" src="//telegram.org/img/emoji/40/F09F8EB2.png" width="20" height="20" alt="🎲" />, indicates the winning dice value and the final frame of the animated sticker, at which to show the fireworks <img class="emoji" src="//telegram.org/img/emoji/40/F09F8E86.png" width="20" height="20" alt="🎆" /> (object with emoji keys and object values, containing <code>value</code> and <code>frame_start</code> float values)</li>
<li><code>emojies_sounds</code> - A map of soundbites to be played when the user clicks on the specified <a href="/api/animated-emojis">animated emoji</a>; the <a href="/api/file_reference">file reference field</a> should be base64-decoded before <a href="/api/files">downloading the file</a> (map of <a href="/api/files">file IDs</a>, with emoji string keys)</li>
<li><code>gif_search_branding</code> - Specifies the name of the service providing GIF search through <a href="#mtproto-configuration">gif_search_username</a> (string)</li>
<li><code>gif_search_emojies</code> - Specifies a list of emojies that should be suggested as search term in a bar above the GIF search box (array of string emojis)</li>
<li><code>stickers_emoji_suggest_only_api</code> - Specifies that the app should not display <a href="/api/stickers#sticker-suggestions">local sticker suggestions »</a> for emojis at all and just use the result of <a href="/method/messages.getStickers">messages.getStickers</a> (bool)</li>
<li><code>stickers_emoji_cache_time</code> - Specifies the validity period of the local cache of <a href="/method/messages.getStickers">messages.getStickers</a>, also relevant when generating the <a href="/api/offsets#hash-generation">pagination hash</a> when invoking the method. (int)</li>
<li><code>qr_login_camera</code> - Whether the Settings-&gt;Devices menu should show an option to scan a <a href="/api/qr-login">QR login code</a> (boolean)</li>
<li><code>qr_login_code</code> - Whether the login screen should show a <a href="/api/qr-login">QR code login option</a>, possibly as default login method (string, "disabled", "primary" or "secondary")</li>
<li><code>dialog_filters_enabled</code> - Whether clients should show an option for managing <a href="/api/folders">dialog filters AKA folders</a> (boolean)</li>
<li><code>dialog_filters_tooltip</code> - Whether clients should actively show a tooltip, inviting the user to configure <a href="/api/folders">dialog filters AKA folders</a>; typically this happens when the chat list is long enough to start getting cluttered. (boolean)</li>
<li><code>autoarchive_setting_available</code> - Whether clients <em>can</em> invoke <a href="/method/account.setGlobalPrivacySettings">account.setGlobalPrivacySettings</a> with <a href="/constructor/globalPrivacySettings"><code>globalPrivacySettings.archive_and_mute_new_noncontact_peers = boolTrue</code></a>, to automatically archive and mute new incoming chats from non-contacts. (boolean)</li>
<li><code>pending_suggestions</code> - Contains a list of suggestions that should be actively shown as a tooltip to the user. (Array of strings, possible values shown <a href="#suggestions">in the suggestions section »</a>. </li>
<li><code>url_auth_domains</code> - A list of domains that support automatic login with manual user confirmation, <a href="/api/url-authorization#link-url-authorization">click here for more info on URL authorization »</a>. (array of strings)</li>
<li><code>autologin_domains</code> - A list of Telegram domains that support automatic login with no user confirmation, <a href="/api/url-authorization#link-url-authorization">click here for more info on URL authorization »</a>. (array of strings)</li>
<li><code>autologin_token</code> - Autologin token, <a href="/api/url-authorization#link-url-authorization">click here for more info on URL authorization »</a>. (string)</li>
<li><code>round_video_encoding</code> - Contains a set of recommended codec parameters for round videos. </li>
<li><code>chat_read_mark_size_threshold</code> - Per-user read receipts, fetchable using <a href="/method/messages.getMessageReadParticipants">messages.getMessageReadParticipants</a>, will be available in groups with an amount of participants less or equal to <code>chat_read_mark_size_threshold</code>. (int)</li>
<li><code>chat_read_mark_expire_period</code> - To protect user privacy, read receipts are only stored for <code>chat_read_mark_expire_period</code> seconds after the message was sent. (int)</li>
<li><code>groupcall_video_participants_max</code> - Maximum number of participants in a group call (livestreams allow ∞ participants) (int)</li>
<li><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)</li>
<li><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'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)</li>
<li><code>ringtone_duration_max</code> - The maximum duration in seconds of <a href="/api/ringtones">uploadable notification sounds »</a> (integer)</li>
<li><code>ringtone_size_max</code> - The maximum post-conversion size in bytes of <a href="/api/ringtones">uploadable notification sounds »</a></li>
<li><code>ringtone_saved_count_max</code> - The maximum number of <a href="/api/ringtones">saveable notification sounds »</a></li>
<li><code>message_animated_emoji_max</code> - Maximum number of custom animated emojis that may be present in a message. (integer)</li>
<li><code>stickers_premium_by_emoji_num</code> - Defines how many premium stickers to show in the sticker suggestion popup when entering an emoji into the text field, see the <a href="/api/stickers#sticker-suggestions">sticker docs for more info</a> (integer, defaults to 0)</li>
<li><code>stickers_normal_by_emoji_per_premium_num</code> - For Premium users, used to define the suggested sticker list, see the <a href="/api/stickers#sticker-suggestions">sticker docs for more info</a> (integer, defaults to 2)</li>
<li><code>premium_purchase_blocked</code> - The user can't purchase premium. The app must also hide all Premium features, including stars for other users, et cetera. (boolean)</li>
<li><code>channels_limit_default</code> - The maximum number of <a href="/api/channel">channels and supergroups</a> a non-Premium user may join (integer)</li>
<li><code>channels_limit_premium</code> - The maximum number of <a href="/api/channel">channels and supergroups</a> a Premium user may join (integer)</li>
<li><code>saved_gifs_limit_default</code> - The maximum number of GIFs a non-Premium user may save (integer)</li>
<li><code>saved_gifs_limit_premium</code> - The maximum number of GIFs a Premium user may save (integer)</li>
<li><code>stickers_faved_limit_default</code> - The maximum number of stickers a non-Premium user may <a href="/api/stickers#favorite-stickers">add to Favorites »</a> (integer)</li>
<li><code>stickers_faved_limit_premium</code> - The maximum number of stickers a Premium user may <a href="/api/stickers#favorite-stickers">add to Favorites »</a> (integer)</li>
<li><code>dialog_filters_limit_default</code> - The maximum number of <a href="/api/folders">folders</a> a non-Premium user may create (integer)</li>
<li><code>dialog_filters_limit_premium</code> - The maximum number of <a href="/api/folders">folders</a> a Premium user may create (integer)</li>
<li><code>dialog_filters_chats_limit_default</code> - The maximum number of chats a non-Premium user may add to a <a href="/api/folders">folder</a> (integer)</li>
<li><code>dialog_filters_chats_limit_premium</code> - The maximum number of chats a Premium user may add to a <a href="/api/folders">folder</a> (integer)</li>
<li><code>dialogs_pinned_limit_default</code> - The maximum number of chats a non-Premium user may pin (integer)</li>
<li><code>dialogs_pinned_limit_premium</code> - The maximum number of chats a Premium user may pin (integer)</li>
<li><code>dialogs_folder_pinned_limit_default</code> - The maximum number of chats a non-Premium user may pin in a folder (integer)</li>
<li><code>dialogs_folder_pinned_limit_premium</code> - The maximum number of chats a Premium user may pin in a folder (integer)</li>
<li><code>channels_public_limit_default</code> - The maximum number of public <a href="/api/channel">channels or supergroups</a> a non-Premium user may create (integer)</li>
<li><code>channels_public_limit_premium</code> - The maximum number of public <a href="/api/channel">channels or supergroups</a> a Premium user may create (integer)</li>
<li><code>caption_length_limit_default</code> - The maximum UTF-8 length of media captions sendable by non-Premium users (integer)</li>
<li><code>caption_length_limit_premium</code> - The maximum UTF-8 length of media captions sendable by non-Premium users (integer)</li>
<li><code>upload_max_fileparts_default</code> - The maximum size of files uploadable by non-Premium users (integer, indicates the number of 512kb file parts, so the size in bytes is determined by multiplying by <code>524288</code>)</li>
<li><code>upload_max_fileparts_premium</code> - The maximum size of files uploadable by Premium users (integer, indicates the number of 512kb file parts, so the size in bytes is determined by multiplying by <code>524288</code>)</li>
<li><code>about_length_limit_default</code> - The maximum UTF-8 length of bios of non-Premium users (integer)</li>
<li><code>about_length_limit_premium</code> - The maximum UTF-8 length of bios of Premium users (integer)</li>
<li><code>premium_promo_order</code> - Array of string identifiers, indicating the order of Telegram Premium features in the Telegram Premimum promotion popup, possible values:<ul>
<li><code>double_limits</code> - Should open a secondary popup with a list of the default/premium limits mentioned above</li>
<li><code>more_upload</code> - Premium users can upload bigger files, as specified by the <code>upload_max_fileparts_*</code> config keys</li>
<li><code>faster_download</code> - Premium users have no download speed limits</li>
<li><code>voice_to_text</code> - Premium users can <a href="/api/transcribe">transcribe voice messages</a></li>
<li><code>no_ads</code> - Premium users see no <a href="/api/sponsored-messages">Sponsored Messages</a></li>
<li><code>unique_reactions</code> - Premium users have access to more <a href="/api/reactions">message reactions</a></li>
<li><code>premimum_stickers</code> - Premium users have access to premium stickersets</li>
<li><code>animated_emoji</code> - Premium users can send custom animated emojis</li>
<li><code>advanced_chat_management</code> - Premium users can <a href="/api/folders">reorder the default folder</a>, auto-archive and hide new chats from non-contacts.</li>
<li><code>profile_badge</code> - Premium users have a badge next to their name, showing that they are helping support Telegram</li>
<li><code>animated_userpics</code> - <a href="/api/files#animated-profile-pictures">Animated profile pictures</a> of Premium users will play in-chat and when browsing the dialog list</li>
<li><code>app_icons</code> - Premium users can change the default icon of the Telegram app</li>
</ul>
</li>
<li><code>premium_bot_username</code> - Contains the username of the official Telegram Premium bot that may be used to buy a Telegram Premium subscription (string)</li>
</ul>
<p>Example value: </p>
<pre><code class="language-json">{
"test": 1,
@ -323,6 +250,135 @@ While <a href="/method/help.getConfig">help.getConfig</a> returns MTProto-specif
],
"premium_bot_username": "PremiumBot"
}</code></pre>
<p>Typical fields included in the resulting JSON object are: </p>
<h4><a class="anchor" href="#emojies-animated-zoom" id="emojies-animated-zoom" name="emojies-animated-zoom"><i class="anchor-icon"></i></a><code>emojies_animated_zoom</code></h4>
<p><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)</p>
<h4><a class="anchor" href="#keep-alive-service" id="keep-alive-service" name="keep-alive-service"><i class="anchor-icon"></i></a><code>keep_alive_service</code></h4>
<p>Whether app clients should start a keepalive service to keep the app running and fetch updates even when the app is closed (boolean)</p>
<h4><a class="anchor" href="#background-connection" id="background-connection" name="background-connection"><i class="anchor-icon"></i></a><code>background_connection</code></h4>
<p>Whether app clients should start a background TCP connection for MTProto update fetching (boolean)</p>
<h4><a class="anchor" href="#emojies-send-dice" id="emojies-send-dice" name="emojies-send-dice"><i class="anchor-icon"></i></a><code>emojies_send_dice</code></h4>
<p>A list of supported <a href="/api/dice">animated dice</a> stickers (array of strings).</p>
<h4><a class="anchor" href="#emojies-send-dice-success" id="emojies-send-dice-success" name="emojies-send-dice-success"><i class="anchor-icon"></i></a><code>emojies_send_dice_success</code></h4>
<p>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)</p>
<h4><a class="anchor" href="#emojies-sounds" id="emojies-sounds" name="emojies-sounds"><i class="anchor-icon"></i></a><code>emojies_sounds</code></h4>
<p>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)</p>
<h4><a class="anchor" href="#gif-search-branding" id="gif-search-branding" name="gif-search-branding"><i class="anchor-icon"></i></a><code>gif_search_branding</code></h4>
<p>Specifies the name of the service providing GIF search through <a href="#mtproto-configuration">gif_search_username</a> (string)</p>
<h4><a class="anchor" href="#gif-search-emojies" id="gif-search-emojies" name="gif-search-emojies"><i class="anchor-icon"></i></a><code>gif_search_emojies</code></h4>
<p>Specifies a list of emojies that should be suggested as search term in a bar above the GIF search box (array of string emojis)</p>
<h4><a class="anchor" href="#stickers-emoji-suggest-only-api" id="stickers-emoji-suggest-only-api" name="stickers-emoji-suggest-only-api"><i class="anchor-icon"></i></a><code>stickers_emoji_suggest_only_api</code></h4>
<p>Specifies that the app should not display <a href="/api/stickers#sticker-suggestions">local sticker suggestions »</a> for emojis at all and just use the result of <a href="/method/messages.getStickers">messages.getStickers</a> (bool)</p>
<h4><a class="anchor" href="#stickers-emoji-cache-time" id="stickers-emoji-cache-time" name="stickers-emoji-cache-time"><i class="anchor-icon"></i></a><code>stickers_emoji_cache_time</code></h4>
<p>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)</p>
<h4><a class="anchor" href="#qr-login-camera" id="qr-login-camera" name="qr-login-camera"><i class="anchor-icon"></i></a><code>qr_login_camera</code></h4>
<p>Whether the Settings-&gt;Devices menu should show an option to scan a <a href="/api/qr-login">QR login code</a> (boolean)</p>
<h4><a class="anchor" href="#qr-login-code" id="qr-login-code" name="qr-login-code"><i class="anchor-icon"></i></a><code>qr_login_code</code></h4>
<p>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")</p>
<h4><a class="anchor" href="#dialog-filters-enabled" id="dialog-filters-enabled" name="dialog-filters-enabled"><i class="anchor-icon"></i></a><code>dialog_filters_enabled</code></h4>
<p>Whether clients should show an option for managing <a href="/api/folders">dialog filters AKA folders</a> (boolean)</p>
<h4><a class="anchor" href="#dialog-filters-tooltip" id="dialog-filters-tooltip" name="dialog-filters-tooltip"><i class="anchor-icon"></i></a><code>dialog_filters_tooltip</code></h4>
<p>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)</p>
<h4><a class="anchor" href="#autoarchive-setting-available" id="autoarchive-setting-available" name="autoarchive-setting-available"><i class="anchor-icon"></i></a><code>autoarchive_setting_available</code></h4>
<p>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)</p>
<h4><a class="anchor" href="#pending-suggestions" id="pending-suggestions" name="pending-suggestions"><i class="anchor-icon"></i></a><code>pending_suggestions</code></h4>
<p>Contains a list of suggestions that should be actively shown as a tooltip to the user. (Array of strings, possible values shown <a href="#suggestions">in the suggestions section »</a>. </p>
<h4><a class="anchor" href="#url-auth-domains" id="url-auth-domains" name="url-auth-domains"><i class="anchor-icon"></i></a><code>url_auth_domains</code></h4>
<p>A list of domains that support automatic login with manual user confirmation, <a href="/api/url-authorization#link-url-authorization">click here for more info on URL authorization »</a>. (array of strings)</p>
<h4><a class="anchor" href="#autologin-domains" id="autologin-domains" name="autologin-domains"><i class="anchor-icon"></i></a><code>autologin_domains</code></h4>
<p>A list of Telegram domains that support automatic login with no user confirmation, <a href="/api/url-authorization#link-url-authorization">click here for more info on URL authorization »</a>. (array of strings)</p>
<h4><a class="anchor" href="#autologin-token" id="autologin-token" name="autologin-token"><i class="anchor-icon"></i></a><code>autologin_token</code></h4>
<p>Autologin token, <a href="/api/url-authorization#link-url-authorization">click here for more info on URL authorization »</a>. (string)</p>
<h4><a class="anchor" href="#round-video-encoding" id="round-video-encoding" name="round-video-encoding"><i class="anchor-icon"></i></a><code>round_video_encoding</code></h4>
<p>Contains a set of recommended codec parameters for round videos. </p>
<h4><a class="anchor" href="#chat-read-mark-size-threshold" id="chat-read-mark-size-threshold" name="chat-read-mark-size-threshold"><i class="anchor-icon"></i></a><code>chat_read_mark_size_threshold</code></h4>
<p>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)</p>
<h4><a class="anchor" href="#chat-read-mark-expire-period" id="chat-read-mark-expire-period" name="chat-read-mark-expire-period"><i class="anchor-icon"></i></a><code>chat_read_mark_expire_period</code></h4>
<p>To protect user privacy, read receipts are only stored for <code>chat_read_mark_expire_period</code> seconds after the message was sent. (int)</p>
<h4><a class="anchor" href="#groupcall-video-participants-max" id="groupcall-video-participants-max" name="groupcall-video-participants-max"><i class="anchor-icon"></i></a><code>groupcall_video_participants_max</code></h4>
<p>Maximum number of participants in a group call (livestreams allow ∞ participants) (int)</p>
<h4><a class="anchor" href="#reactions-default" id="reactions-default" name="reactions-default"><i class="anchor-icon"></i></a><code>reactions_default</code></h4>
<p>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)</p>
<h4><a class="anchor" href="#reactions-uniq-max" id="reactions-uniq-max" name="reactions-uniq-max"><i class="anchor-icon"></i></a><code>reactions_uniq_max</code></h4>
<p>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'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>
<h4><a class="anchor" href="#ringtone-duration-max" id="ringtone-duration-max" name="ringtone-duration-max"><i class="anchor-icon"></i></a><code>ringtone_duration_max</code></h4>
<p>The maximum duration in seconds of <a href="/api/ringtones">uploadable notification sounds »</a> (integer)</p>
<h4><a class="anchor" href="#ringtone-size-max" id="ringtone-size-max" name="ringtone-size-max"><i class="anchor-icon"></i></a><code>ringtone_size_max</code></h4>
<p>The maximum post-conversion size in bytes of <a href="/api/ringtones">uploadable notification sounds »</a></p>
<h4><a class="anchor" href="#ringtone-saved-count-max" id="ringtone-saved-count-max" name="ringtone-saved-count-max"><i class="anchor-icon"></i></a><code>ringtone_saved_count_max</code></h4>
<p>The maximum number of <a href="/api/ringtones">saveable notification sounds »</a></p>
<h4><a class="anchor" href="#message-animated-emoji-max" id="message-animated-emoji-max" name="message-animated-emoji-max"><i class="anchor-icon"></i></a><code>message_animated_emoji_max</code></h4>
<p>Maximum number of custom animated emojis that may be present in a message. (integer)</p>
<h4><a class="anchor" href="#stickers-premium-by-emoji-num" id="stickers-premium-by-emoji-num" name="stickers-premium-by-emoji-num"><i class="anchor-icon"></i></a><code>stickers_premium_by_emoji_num</code></h4>
<p>Defines how many premium stickers to show in the sticker suggestion popup when entering an emoji into the text field, see the <a href="/api/stickers#sticker-suggestions">sticker docs for more info</a> (integer, defaults to 0)</p>
<h4><a class="anchor" href="#stickers-normal-by-emoji-per-premium-num" id="stickers-normal-by-emoji-per-premium-num" name="stickers-normal-by-emoji-per-premium-num"><i class="anchor-icon"></i></a><code>stickers_normal_by_emoji_per_premium_num</code></h4>
<p>For Premium users, used to define the suggested sticker list, see the <a href="/api/stickers#sticker-suggestions">sticker docs for more info</a> (integer, defaults to 2)</p>
<h4><a class="anchor" href="#premium-purchase-blocked" id="premium-purchase-blocked" name="premium-purchase-blocked"><i class="anchor-icon"></i></a><code>premium_purchase_blocked</code></h4>
<p>The user can't purchase premium. The app must also hide all Premium features, including stars for other users, et cetera. (boolean)</p>
<h4><a class="anchor" href="#channels-limit-default" id="channels-limit-default" name="channels-limit-default"><i class="anchor-icon"></i></a><code>channels_limit_default</code></h4>
<p>The maximum number of <a href="/api/channel">channels and supergroups</a> a non-Premium user may join (integer)</p>
<h4><a class="anchor" href="#channels-limit-premium" id="channels-limit-premium" name="channels-limit-premium"><i class="anchor-icon"></i></a><code>channels_limit_premium</code></h4>
<p>The maximum number of <a href="/api/channel">channels and supergroups</a> a Premium user may join (integer)</p>
<h4><a class="anchor" href="#saved-gifs-limit-default" id="saved-gifs-limit-default" name="saved-gifs-limit-default"><i class="anchor-icon"></i></a><code>saved_gifs_limit_default</code></h4>
<p>The maximum number of GIFs a non-Premium user may save (integer)</p>
<h4><a class="anchor" href="#saved-gifs-limit-premium" id="saved-gifs-limit-premium" name="saved-gifs-limit-premium"><i class="anchor-icon"></i></a><code>saved_gifs_limit_premium</code></h4>
<p>The maximum number of GIFs a Premium user may save (integer)</p>
<h4><a class="anchor" href="#stickers-faved-limit-default" id="stickers-faved-limit-default" name="stickers-faved-limit-default"><i class="anchor-icon"></i></a><code>stickers_faved_limit_default</code></h4>
<p>The maximum number of stickers a non-Premium user may <a href="/api/stickers#favorite-stickers">add to Favorites »</a> (integer)</p>
<h4><a class="anchor" href="#stickers-faved-limit-premium" id="stickers-faved-limit-premium" name="stickers-faved-limit-premium"><i class="anchor-icon"></i></a><code>stickers_faved_limit_premium</code></h4>
<p>The maximum number of stickers a Premium user may <a href="/api/stickers#favorite-stickers">add to Favorites »</a> (integer)</p>
<h4><a class="anchor" href="#dialog-filters-limit-default" id="dialog-filters-limit-default" name="dialog-filters-limit-default"><i class="anchor-icon"></i></a><code>dialog_filters_limit_default</code></h4>
<p>The maximum number of <a href="/api/folders">folders</a> a non-Premium user may create (integer)</p>
<h4><a class="anchor" href="#dialog-filters-limit-premium" id="dialog-filters-limit-premium" name="dialog-filters-limit-premium"><i class="anchor-icon"></i></a><code>dialog_filters_limit_premium</code></h4>
<p>The maximum number of <a href="/api/folders">folders</a> a Premium user may create (integer)</p>
<h4><a class="anchor" href="#dialog-filters-chats-limit-default" id="dialog-filters-chats-limit-default" name="dialog-filters-chats-limit-default"><i class="anchor-icon"></i></a><code>dialog_filters_chats_limit_default</code></h4>
<p>The maximum number of chats a non-Premium user may add to a <a href="/api/folders">folder</a> (integer)</p>
<h4><a class="anchor" href="#dialog-filters-chats-limit-premium" id="dialog-filters-chats-limit-premium" name="dialog-filters-chats-limit-premium"><i class="anchor-icon"></i></a><code>dialog_filters_chats_limit_premium</code></h4>
<p>The maximum number of chats a Premium user may add to a <a href="/api/folders">folder</a> (integer)</p>
<h4><a class="anchor" href="#dialogs-pinned-limit-default" id="dialogs-pinned-limit-default" name="dialogs-pinned-limit-default"><i class="anchor-icon"></i></a><code>dialogs_pinned_limit_default</code></h4>
<p>The maximum number of chats a non-Premium user may pin (integer)</p>
<h4><a class="anchor" href="#dialogs-pinned-limit-premium" id="dialogs-pinned-limit-premium" name="dialogs-pinned-limit-premium"><i class="anchor-icon"></i></a><code>dialogs_pinned_limit_premium</code></h4>
<p>The maximum number of chats a Premium user may pin (integer)</p>
<h4><a class="anchor" href="#dialogs-folder-pinned-limit-default" id="dialogs-folder-pinned-limit-default" name="dialogs-folder-pinned-limit-default"><i class="anchor-icon"></i></a><code>dialogs_folder_pinned_limit_default</code></h4>
<p>The maximum number of chats a non-Premium user may pin in a folder (integer)</p>
<h4><a class="anchor" href="#dialogs-folder-pinned-limit-premium" id="dialogs-folder-pinned-limit-premium" name="dialogs-folder-pinned-limit-premium"><i class="anchor-icon"></i></a><code>dialogs_folder_pinned_limit_premium</code></h4>
<p>The maximum number of chats a Premium user may pin in a folder (integer)</p>
<h4><a class="anchor" href="#channels-public-limit-default" id="channels-public-limit-default" name="channels-public-limit-default"><i class="anchor-icon"></i></a><code>channels_public_limit_default</code></h4>
<p>The maximum number of public <a href="/api/channel">channels or supergroups</a> a non-Premium user may create (integer)</p>
<h4><a class="anchor" href="#channels-public-limit-premium" id="channels-public-limit-premium" name="channels-public-limit-premium"><i class="anchor-icon"></i></a><code>channels_public_limit_premium</code></h4>
<p>The maximum number of public <a href="/api/channel">channels or supergroups</a> a Premium user may create (integer)</p>
<h4><a class="anchor" href="#caption-length-limit-default" id="caption-length-limit-default" name="caption-length-limit-default"><i class="anchor-icon"></i></a><code>caption_length_limit_default</code></h4>
<p>The maximum UTF-8 length of media captions sendable by non-Premium users (integer)</p>
<h4><a class="anchor" href="#caption-length-limit-premium" id="caption-length-limit-premium" name="caption-length-limit-premium"><i class="anchor-icon"></i></a><code>caption_length_limit_premium</code></h4>
<p>The maximum UTF-8 length of media captions sendable by non-Premium users (integer)</p>
<h4><a class="anchor" href="#upload-max-fileparts-default" id="upload-max-fileparts-default" name="upload-max-fileparts-default"><i class="anchor-icon"></i></a><code>upload_max_fileparts_default</code></h4>
<p>The maximum size of files uploadable by non-Premium users (integer, indicates the number of 512kb file parts, so the size in bytes is determined by multiplying by <code>524288</code>)</p>
<h4><a class="anchor" href="#upload-max-fileparts-premium" id="upload-max-fileparts-premium" name="upload-max-fileparts-premium"><i class="anchor-icon"></i></a><code>upload_max_fileparts_premium</code></h4>
<p>The maximum size of files uploadable by Premium users (integer, indicates the number of 512kb file parts, so the size in bytes is determined by multiplying by <code>524288</code>)</p>
<h4><a class="anchor" href="#about-length-limit-default" id="about-length-limit-default" name="about-length-limit-default"><i class="anchor-icon"></i></a><code>about_length_limit_default</code></h4>
<p>The maximum UTF-8 length of bios of non-Premium users (integer)</p>
<h4><a class="anchor" href="#about-length-limit-premium" id="about-length-limit-premium" name="about-length-limit-premium"><i class="anchor-icon"></i></a><code>about_length_limit_premium</code></h4>
<p>The maximum UTF-8 length of bios of Premium users (integer)</p>
<h4><a class="anchor" href="#premium-promo-order" id="premium-promo-order" name="premium-promo-order"><i class="anchor-icon"></i></a><code>premium_promo_order</code></h4>
<p>Array of string identifiers, indicating the order of Telegram Premium features in the Telegram Premimum promotion popup, possible values:</p>
<ul>
<li><code>double_limits</code> - Should open a secondary popup with a list of the default/premium limits mentioned above</li>
<li><code>more_upload</code> - Premium users can upload bigger files, as specified by the <code>upload_max_fileparts_*</code> config keys</li>
<li><code>faster_download</code> - Premium users have no download speed limits</li>
<li><code>voice_to_text</code> - Premium users can <a href="/api/transcribe">transcribe voice messages</a></li>
<li><code>no_ads</code> - Premium users see no <a href="/api/sponsored-messages">Sponsored Messages</a></li>
<li><code>unique_reactions</code> - Premium users have access to more <a href="/api/reactions">message reactions</a></li>
<li><code>premimum_stickers</code> - Premium users have access to premium stickersets</li>
<li><code>animated_emoji</code> - Premium users can send custom animated emojis</li>
<li><code>advanced_chat_management</code> - Premium users can <a href="/api/folders">reorder the default folder</a>, auto-archive and hide new chats from non-contacts.</li>
<li><code>profile_badge</code> - Premium users have a badge next to their name, showing that they are helping support Telegram</li>
<li><code>animated_userpics</code> - <a href="/api/files#animated-profile-pictures">Animated profile pictures</a> of Premium users will play in-chat and when browsing the dialog list</li>
<li><code>app_icons</code> - Premium users can change the default icon of the Telegram app</li>
</ul>
<h4><a class="anchor" href="#premium-bot-username" id="premium-bot-username" name="premium-bot-username"><i class="anchor-icon"></i></a><code>premium_bot_username</code></h4>
<p>Contains the username of the official Telegram Premium bot that may be used to buy a Telegram Premium subscription (string)</p>
<h4><a class="anchor" href="#premium-invoice-slug" id="premium-invoice-slug" name="premium-invoice-slug"><i class="anchor-icon"></i></a><code>premium_invoice_slug</code></h4>
<p>Contains an <a href="/api/payments">invoice slug</a> that may be used to buy a Telegram Premium subscription (string)</p>
<h3><a class="anchor" href="#suggestions" id="suggestions" name="suggestions"><i class="anchor-icon"></i></a>Suggestions</h3>
<p>The API can return a set of useful suggestions for users of graphical clients. </p>
<h4><a class="anchor" href="#basic-suggestions" id="basic-suggestions" name="basic-suggestions"><i class="anchor-icon"></i></a>Basic suggestions</h4>

View file

@ -49,7 +49,25 @@
<p>This page describes how should client apps handle Premium features: for a user-friendly overview of Telegram Premium features, see the <a href="https://telegram.org/faq_premium">Telegram Premium FAQ</a>.</p>
</blockquote>
<h3><a class="anchor" href="#subscribing-to-telegram-premium" id="subscribing-to-telegram-premium" name="subscribing-to-telegram-premium"><i class="anchor-icon"></i></a>Subscribing to Telegram Premium</h3>
<p>Telegram </p></div>
<p>Apps should implement a Telegram Premium modal, listing the Premium features contained in the <code>premium_promo_order</code> <a href="/api/config#client-configuration">app configuration parameter »</a>. </p>
<p>Here's how to pay for a Telegram Premium subscription, when the user clicks on the subscribe button:</p>
<ul>
<li>If the <code>premium_bot_username</code> field is set, call <a href="/method/messages.startBot">messages.startBot</a>, specifying the following parameters:<ul>
<li><code>peer</code> and <code>bot</code>: The bot mentioned in <code>premium_bot_username</code></li>
<li><code>start_param</code>: One of the following values:<ul>
<li>If the user clicks on the subscribe button when viewing the promo page for a specific Premium feature, provide the feature identifier.</li>
<li>If the user clicks on the subscribe button after hitting a limit that Telegram Premium raises, provide <code>double_limits</code></li>
<li>If the user clicks on the subscribe button from the Telegram Premium button in the settings, provide <code>settings</code></li>
<li>If the user clicks on the subscribe button from the Telegram Premium star in a profile page, provide <code>profile</code>
Then, when the user clicks on the subscribe button in the sent invoice, follow the <a href="/api/payments">usual payment flow for message invoices</a>. </li>
</ul>
</li>
</ul>
</li>
<li>Otherwise, if the <code>premium_invoice_slug</code> field is set, handle the payment as you would handle a <code>t.me/$premium_invoice_slug</code> <a href="/api/links#invoice-links">invoice deep link</a>.</li>
</ul>
<h3><a class="anchor" href="#blocked-telegram-premium" id="blocked-telegram-premium" name="blocked-telegram-premium"><i class="anchor-icon"></i></a>Blocked Telegram Premium</h3>
<p>If the <code>premium_purchase_blocked</code> <a href="/api/config#client-configuration">app configuration parameter</a> is set, the user can't purchase a Premium account, and all Telegram Premium features must be hidden (like the stars of Premium users, Telegram Premium purchase buttons, and so on). </p></div>
</div>

View file

@ -64,7 +64,7 @@ The same must be done if the user opens the link while refusing the authorizatio
<h3><a class="anchor" href="#link-url-authorization" id="link-url-authorization" name="link-url-authorization"><i class="anchor-icon"></i></a>Link URL authorization</h3>
<p>Telegram supports automatic authorization on certain websites upon opening an HTTP URL in-app, upon clicking a link in a message or clicking on a <a href="/constructor/keyboardButtonUrl">keyboardButtonUrl</a>.</p>
<h4><a class="anchor" href="#automatic-authorization" id="automatic-authorization" name="automatic-authorization"><i class="anchor-icon"></i></a>Automatic authorization</h4>
<p>Clients should automatically authenticate users when opening official Telegram websites, listed in the <code>url_auth_domains</code> key of the <a href="/api/config#client-configuration">client configuration object »</a>. </p>
<p>Clients should automatically authenticate users when opening official Telegram websites, listed in the <code>autologin_domains</code> key of the <a href="/api/config#client-configuration">client configuration object »</a>. </p>
<p>Upon clicking a link, the URL must be modified by appending the <code>autologin_token</code> from the <a href="/api/config#client-configuration">client configuration object »</a> to the <a href="https://datatracker.ietf.org/doc/html/rfc3986#section-3.4">query string</a>, like so: </p>
<p>Original URL: <code>https://somedomain.telegram.org/path?query=string#fragment=value</code><br>
Modified URL: <code>https://somedomain.telegram.org/path?query=string&amp;autologin_token=$autologin_token#fragment=value</code> </p>