Channels are a tool for broadcasting your messages to large audiences. They can have an unlimited number of subscribers, they can be public with a permanent URL and each post in a channel has its own view counter.
Technically, they are represented by channel constructors.
Channels can be created using the channels.createChannel method, by setting the broadcast flag.
Messages posted on channels can be:
signatures_enabled set.signatures_enabled and profiles_enabled set.send_as flag of messages.sendMessage and other message sending methods, see here » for more info. Supergroups are a powerful tool for building communities and can support up to 200,000 members each.
Technically, supergroups are actually channels: they are represented by channel constructors, with the megagroup flag set to true.
Supergroups can be created using the channels.createChannel method, by setting the megagroup flag.
Supergroups can also be assigned a geo_point to become geochats ».
When posting messages to channels and supergroups using messages.sendMessage and other message sending methods, we can choose to send the message as the currently logged in user account (default), or as a channel we own, or as the current group (for anonymous group admins »), by populating the send_as flag of messages.sendMessage et al, see here » for more info.
Supergroups can be converted into forums, splitting conversion into distinct forum topics, see the forum documentation for more info ».
Monoforums are a special kind of forum », used to implement direct messages to channels, see the monoforum documentation for more info ».
Gigagroups are something between a channel and a supergroup.
An admin, when prompted by the API using suggestions », can convert a supergroup into a gigagroup using channels.convertToGigagroup (one way only).
After that, only admins will be able to write in the group (like when send_messages rights are disabled for all group participants by default), but the participant limit is removed and the group can become much bigger than a supergroup (e.g. >200,000 currently).
Also, one can't invite people into gigagroups and participants of voice chats in gigagroups are muted by default.
In previous versions of telegram, only basic groups (represented by chat constructors) could be created using messages.createChat: these groups have fewer features, and can only have 200 members at max.
Messages from all basic groups are stored in the user's message box »: this means that all basic groups and all private chats share the same, single message ID and PTS sequence.
To upgrade a basic group to a supergroup, messages.migrateChat can be used.
Clients should automatically migrate basic groups to supergroups if an admin tries to execute an action that is only supported by supergroups.
The chats field of the result will have two objects:
migrated_to field, indicating the address of the new supergroupWhen getting full info about the migrated channel, the channelFull object will have migrated_from_chat_id and migrated_from_max_id fields indicating the original ID of the chat, and the message ID in the original chat at which the group was migrated.
All users of the chat will receive an updateNewMessage from the old chat with a messageService containing a messageActionChatMigrateTo constructor.
All new messages have to be sent to the new supergroup.
When working with migrated groups clients need to handle loading of the message history (as well as search results et cetera) from both the basic group and the new supergroup. This is done by merging the two messages lists (requested with different Peer values) client side.
message#3ae56482 flags:# out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true post:flags.14?true from_scheduled:flags.18?true legacy:flags.19?true edit_hide:flags.21?true pinned:flags.24?true noforwards:flags.26?true invert_media:flags.27?true flags2:# offline:flags2.1?true video_processing_pending:flags2.4?true paid_suggested_post_stars:flags2.8?true paid_suggested_post_ton:flags2.9?true id:int from_id:flags.8?Peer from_boosts_applied:flags.29?int from_rank:flags2.12?string peer_id:Peer saved_peer_id:flags.28?Peer fwd_from:flags.2?MessageFwdHeader via_bot_id:flags.11?long via_business_bot_id:flags2.0?long reply_to:flags.3?MessageReplyHeader date:int message:string media:flags.9?MessageMedia reply_markup:flags.6?ReplyMarkup entities:flags.7?Vector<MessageEntity> views:flags.10?int forwards:flags.10?int replies:flags.23?MessageReplies edit_date:flags.15?int post_author:flags.16?string grouped_id:flags.17?long reactions:flags.20?MessageReactions restriction_reason:flags.22?Vector<RestrictionReason> ttl_period:flags.25?int quick_reply_shortcut_id:flags.30?int effect:flags2.2?long factcheck:flags2.3?FactCheck report_delivery_until_date:flags2.5?int paid_message_stars:flags2.6?long suggested_post:flags2.7?SuggestedPost schedule_repeat_period:flags2.10?int summary_from_language:flags2.11?string = Message;
sendAsPeer#b81c7034 flags:# premium_required:flags.0?true peer:Peer = SendAsPeer;
channels.sendAsPeers#f496b0c6 peers:Vector<SendAsPeer> chats:Vector<Chat> users:Vector<User> = channels.SendAsPeers;
---functions---
messages.sendMessage#545cd15a flags:# no_webpage:flags.1?true silent:flags.5?true background:flags.6?true clear_draft:flags.7?true noforwards:flags.14?true update_stickersets_order:flags.15?true invert_media:flags.16?true allow_paid_floodskip:flags.19?true peer:InputPeer reply_to:flags.0?InputReplyTo message:string random_id:long reply_markup:flags.2?ReplyMarkup entities:flags.3?Vector<MessageEntity> schedule_date:flags.10?int schedule_repeat_period:flags.24?int send_as:flags.13?InputPeer quick_reply_shortcut:flags.17?InputQuickReplyShortcut effect:flags.18?long allow_paid_stars:flags.21?long suggested_post:flags.22?SuggestedPost = Updates;
channels.getSendAs#e785a43f flags:# for_paid_reactions:flags.0?true for_live_stories:flags.1?true peer:InputPeer = channels.SendAsPeers;
messages.saveDefaultSendAs#ccfddf96 peer:InputPeer send_as:InputPeer = Bool;
When posting messages to channels and supergroups using messages.sendMessage and other message sending methods, we can choose to send the message as the currently logged in user account (default), or as a channel we own, or as the current group (for anonymous group admins »), by populating the send_as flag of messages.sendMessage et al.
The last two options offer an extra level of anonymization, as the sent message.from_id will point to the specified channel/group, not to our account.
The list of peers that can be passed to send_as can be fetched using channels.getSendAs, populating peer with the channel/group where we intend to send the message.
This method will return a list of sendAsPeer constructors for each peer that can be passed to send_as only for peer, along with an optional premium_required flag that will be set if a Premium subscription is required to pass it to send_as.
Returned peers for supergroups include:
Returned peers for channels include:
signatures_enabled and profiles_enabled flags set.Only the peers returned by channels.getSendAs can be used in send_as for the specified peer.
Set the for_paid_reactions flag to return a list of peers that can be used to send paid reactions » with paidReactionPrivacyPeer.
messages.saveDefaultSendAs can be used to change the default value for send_as, for a specific channel/supergroup: it will be also applied to reactions, paid reactions and all other interaction types (including for methods that do not explicitly require a send_as, such as messages.sendReaction and messages.toggleTodoCompleted).
Channels, basic groups and supergroups may have a public username or a private invite link: private invite links may be further enhanced with per-user join requests.
For more info on how to work with public usernames, invite links and join requests, see here ».
Channels, basic groups and supergroups allow setting granular permissions both for admins and specific users; channels, supergroups and basic groups also allow setting global granular permissions for users.
For more info on how to set and modify rights, see here ».
Telegram allows pinning multiple messages on top in a chat, group, supergroup or channel.
See here » for more info on pinning and unpinning messages.
Groups can be associated to a channel as a discussion group, to allow users to discuss about posts.
For more info on how to set a discussion group in channel, see here »
Both supergroups and channels offer a so-called admin log, a log of recent relevant supergroup and channel actions, like the modification of group/channel settings or information on behalf of an admin, user kicks and bans, and more.
See here » for more info.
The search view » has a separate Channel tab for channel-related global searches, see here » for more info.