mirror of
https://github.com/MarshalX/telegram-crawler.git
synced 2024-11-24 08:16:34 +01:00
142 lines
9.1 KiB
HTML
142 lines
9.1 KiB
HTML
<!DOCTYPE html>
|
|
<html class="">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Admin, banned, default rights</title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta property="description" content="How to handle admin permissions, granular bans and global permissions in channels, groups and supergroups.">
|
|
<meta property="og:title" content="Admin, banned, default rights">
|
|
<meta property="og:image" content="d82fcde297bd0276c3">
|
|
<meta property="og:description" content="How to handle admin permissions, granular bans and global permissions in channels, groups and supergroups.">
|
|
<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=" ">
|
|
<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/rights" >Admin, banned, default rights</a></li></ul></div>
|
|
<h1 id="dev_page_title">Admin, banned, default rights</h1>
|
|
|
|
<div id="dev_page_content"><!-- scroll_nav -->
|
|
|
|
<p><a href="/api/channel">Channels and supergroups</a> allow setting <a href="https://telegram.org/blog/permissions-groups-undo">granular permissions</a> both for admins and specific users.
|
|
<a href="/api/channel">Channels, supergroups and basic groups</a> also allow setting global granular permissions for users.</p>
|
|
<p>They can be modified as follows:</p>
|
|
<h3><a class="anchor" href="#admin-rights" id="admin-rights" name="admin-rights"><i class="anchor-icon"></i></a>Admin rights</h3>
|
|
<p><a href="/method/channels.editAdmin">channels.editAdmin</a> can be used to modify the admin rights of a user in a channel or supergroup.
|
|
<a href="/api/channel#basic-groups">Basic groups</a> do not allow setting granular admin permissions, <a href="/method/messages.editChatAdmin">messages.editChatAdmin</a> has to be used, instead.</p>
|
|
<p>Permissions are defined by the <a href="/constructor/chatAdminRights">chatAdminRights</a> constructor, some admin rights can only be used for channels, others both for channels and supergroups (see the constructor page).</p>
|
|
<h3><a class="anchor" href="#banned-rights" id="banned-rights" name="banned-rights"><i class="anchor-icon"></i></a>Banned rights</h3>
|
|
<p><a href="/method/channels.editBanned">channels.editBanned</a> can be used to modify the rights of a user in a channel or supergroup, to ban/kick a user from the group, or restrict the user from doing certain things.
|
|
<a href="/api/channel#basic-groups">Basic groups</a> do not allow setting granular user permissions for single users, single users can only be removed from groups using <a href="/method/messages.deleteChatUser">messages.deleteChatUser</a>: however, setting <a href="#default-rights">global granular permissions with basic groups is supported</a>.</p>
|
|
<p>Permissions are defined by the <a href="/constructor/chatBannedRights">chatBannedRights</a> constructor, for more info see the constructor page.</p>
|
|
<h3><a class="anchor" href="#default-rights" id="default-rights" name="default-rights"><i class="anchor-icon"></i></a>Default rights</h3>
|
|
<p><a href="/method/messages.editChatDefaultBannedRights">messages.editChatDefaultBannedRights</a> can be used to modify the rights of <strong>all</strong> users in a <a href="/api/channel#channels">channel</a>, <a href="/api/channel#supergroups">supergroup</a> or <a href="/api/channel#basic-groups">basic group</a>, to restrict them from doing certain things.</p>
|
|
<p>Permissions are defined by the <a href="/constructor/chatBannedRights">chatBannedRights</a> constructor: all flags can be used except for <code>view_messages</code>, for more info see the constructor page.</p>
|
|
<h3><a class="anchor" href="#suggested-bot-rights" id="suggested-bot-rights" name="suggested-bot-rights"><i class="anchor-icon"></i></a>Suggested bot rights</h3>
|
|
<p><a href="/api/bots">Bots</a> can suggest a set of admin rights when being added to groups and channels. </p>
|
|
<p>Bots can use <a href="/method/bots.setBotBroadcastDefaultAdminRights">bots.setBotBroadcastDefaultAdminRights</a> to indicate a suggested set of <a href="/api/rights">admin rights »</a> to use when adding the bot to a <a href="/api/channel">channel</a>, and <a href="/method/bots.setBotGroupDefaultAdminRights">bots.setBotGroupDefaultAdminRights</a> when adding the bot to a <a href="/api/channel">group</a>. </p>
|
|
<p>These suggested admin rights are contained in the <code>bot_broadcast_admin_rights</code> and <code>bot_group_admin_rights</code> paremeters of <a href="/constructor/userFull">userFull</a>, obtainable using <a href="/method/users.getFullUser">users.getFullUser</a>. </p>
|
|
<p>A client application trying to add a bot as admin should fetch the default rights and present them as editable defaults to the user: the rights can then be modified before <a href="#admin-rights">setting the bot as admin</a>.</p>
|
|
<p>Note that admin rights suggested by a <a href="/api/links#groupchannel-bot-links">bot deep link</a> take priority over the suggested rights specified by <code>bot_broadcast_admin_rights</code> and <code>bot_group_admin_rights</code>: they can still be modified by the user before setting the bot as admin. </p></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="footer_wrap">
|
|
<div class="footer_columns_wrap footer_desktop">
|
|
<div class="footer_column footer_column_telegram">
|
|
<h5>Telegram</h5>
|
|
<div class="footer_telegram_description"></div>
|
|
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
|
|
</div>
|
|
|
|
<div class="footer_column">
|
|
<h5><a href="//telegram.org/faq">About</a></h5>
|
|
<ul>
|
|
<li><a href="//telegram.org/faq">FAQ</a></li>
|
|
<li><a href="//telegram.org/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">
|
|
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script src="/js/main.js?47"></script>
|
|
<script src="/js/jquery.min.js?1"></script>
|
|
<script src="/js/bootstrap.min.js?1"></script>
|
|
|
|
<script>window.initDevPageNav&&initDevPageNav();
|
|
backToTopInit("Go up");
|
|
removePreloadInit();
|
|
</script>
|
|
</body>
|
|
</html>
|
|
|