telegram-crawler/data/web/core.telegram.org/api/privacy.html

207 lines
19 KiB
HTML
Raw Normal View History

2024-02-10 15:29:33 +01:00
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
2024-02-10 15:30:03 +01:00
<title>Privacy</title>
2024-02-10 15:29:33 +01:00
<meta name="viewport" content="width=device-width, initial-scale=1.0">
2024-02-10 15:30:03 +01:00
<meta property="description" content="Telegram allows users to specify granular privacy settings, choosing which users can or can&#39;t interact with them in certain ways.">
<meta property="og:title" content="Privacy">
2024-02-10 15:29:33 +01:00
<meta property="og:image" content="">
2024-02-10 15:30:03 +01:00
<meta property="og:description" content="Telegram allows users to specify granular privacy settings, choosing which users can or can&#39;t interact with them in certain ways.">
2024-02-10 15:29:33 +01:00
<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">
<link rel="icon" type="image/png" sizes="16x16" href="/img/favicon-16x16.png">
<link rel="alternate icon" href="/img/favicon.ico" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?236" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class="active"><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class=""><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
2024-02-10 15:30:03 +01:00
<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>
2024-02-10 15:29:33 +01:00
2024-02-10 15:30:03 +01:00
<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>&lt;<a href='/type/InputUser'>InputUser</a>&gt; = <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>&lt;<a href='/type/InputUser'>InputUser</a>&gt; = <a href='/type/InputPrivacyRule'>InputPrivacyRule</a>;
<a href='/constructor/inputPrivacyValueAllowChatParticipants'>inputPrivacyValueAllowChatParticipants</a>#840649cf chats:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/long'>long</a>&gt; = <a href='/type/InputPrivacyRule'>InputPrivacyRule</a>;
<a href='/constructor/inputPrivacyValueDisallowChatParticipants'>inputPrivacyValueDisallowChatParticipants</a>#e94f0f86 chats:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/long'>long</a>&gt; = <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>&lt;<a href='/type/long'>long</a>&gt; = <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>&lt;<a href='/type/long'>long</a>&gt; = <a href='/type/PrivacyRule'>PrivacyRule</a>;
<a href='/constructor/privacyValueAllowChatParticipants'>privacyValueAllowChatParticipants</a>#6b134e8e chats:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/long'>long</a>&gt; = <a href='/type/PrivacyRule'>PrivacyRule</a>;
<a href='/constructor/privacyValueDisallowChatParticipants'>privacyValueDisallowChatParticipants</a>#41c87565 chats:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/long'>long</a>&gt; = <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>&lt;<a href='/type/RestrictionReason'>RestrictionReason</a>&gt; 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>&lt;<a href='/type/Username'>Username</a>&gt; 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>&lt;<a href='/type/long'>long</a>&gt; = <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>&lt;<a href='/type/PrivacyRule'>PrivacyRule</a>&gt; chats:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/Chat'>Chat</a>&gt; users:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/User'>User</a>&gt; = <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>&lt;<a href='/type/PrivacyRule'>PrivacyRule</a>&gt; = <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>&lt;<a href='/type/InputPrivacyRule'>InputPrivacyRule</a>&gt; = <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>
2024-02-10 15:29:33 +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/privacy">Privacy</a></li>
<li><a href="//telegram.org/press">Press</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/android">Android</a></li>
<li><a href="//telegram.org/dl/web">Mobile Web</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">
2024-02-14 20:28:53 +01:00
<h5><a href="//telegram.org/press">Press</a></h5>
2024-02-10 15:29:33 +01:00
</div>
</div>
</div>
</div>
<script src="/js/main.js?47"></script>
2024-02-10 15:30:03 +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");
2024-02-10 15:29:33 +01:00
removePreloadInit();
</script>
</body>
</html>