Channels

Channels, chats & supergrups

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.

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.

Channels and supergroup can be created using the channels.createChannel method, by setting the appropriate broadcast or megagroup flags.
Supergroups can also be assigned a geo_point to become geochats.

In previous versions of telegram, only normal groups (represented by chat constructors) could be created using messages.createChat: these groups have fewer features, and can only have 200 members at max.

Migration

To upgrade a legacy group to a supergroup, messages.migrateChat can be used.
The chats field of the result will have two objects:

  • A chat constructor with a migrated_to field, indicating the address of the new supergroup
  • The new channel megagroup constructor

When 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 legacy group and the new supergroup. This is done by merging the two messages lists (requested with different Peer values) client side.

Rights

Channels and supergroups allow setting granular permissions both for admins and specific users; channels, supergroups and legacy groups also allow setting global granular permissions for users.

For more info on how to set and modify rights, see here.