channels.createChannel #

Create a supergroup/channel.

Layer 223

updatesTooLong#e317af7e = Updates;
updateShortMessage#313bc7f8 flags:# out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true id:int user_id:long message:string pts:int pts_count:int date:int fwd_from:flags.2?MessageFwdHeader via_bot_id:flags.11?long reply_to:flags.3?MessageReplyHeader entities:flags.7?Vector<MessageEntity> ttl_period:flags.25?int = Updates;
updateShortChatMessage#4d6deea5 flags:# out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true id:int from_id:long chat_id:long message:string pts:int pts_count:int date:int fwd_from:flags.2?MessageFwdHeader via_bot_id:flags.11?long reply_to:flags.3?MessageReplyHeader entities:flags.7?Vector<MessageEntity> ttl_period:flags.25?int = Updates;
updateShort#78d4dec1 update:Update date:int = Updates;
updatesCombined#725b04c3 updates:Vector<Update> users:Vector<User> chats:Vector<Chat> date:int seq_start:int seq:int = Updates;
updates#74ae4240 updates:Vector<Update> users:Vector<User> chats:Vector<Chat> date:int seq:int = Updates;
updateShortSentMessage#9015e101 flags:# out:flags.1?true id:int pts:int pts_count:int date:int media:flags.9?MessageMedia entities:flags.7?Vector<MessageEntity> ttl_period:flags.25?int = Updates;
---functions---
channels.createChannel#91006707 flags:# broadcast:flags.0?true megagroup:flags.1?true for_import:flags.3?true forum:flags.5?true title:string about:string geo_point:flags.2?InputGeoPoint address:flags.2?string ttl_period:flags.4?int = Updates;

Parameters #

NameTypeDescription
flags#Flags, see TL conditional fields
broadcastflags.0?trueWhether to create a channel
megagroupflags.1?trueWhether to create a supergroup
for_importflags.3?trueWhether the supergroup is being created to import messages from a foreign chat service using messages.initHistoryImport
forumflags.5?trueWhether to create a forum
titlestringChannel title
aboutstringChannel description
geo_pointflags.2?InputGeoPointGeogroup location, see here » for more info on geogroups.
addressflags.2?stringGeogroup address, see here » for more info on geogroups.
ttl_periodflags.4?intTime-to-live of all messages that will be sent in the supergroup: once message.date+message.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well. You can use messages.setDefaultHistoryTTL to edit this value later.

Result #

Updates

Only users can use this method #

Possible errors #

CodeTypeDescription
400ADDRESS_INVALIDThe specified geopoint address is invalid.
400CHANNELS_ADMIN_LOCATED_TOO_MUCHThe user has reached the limit of public geogroups.
400CHANNELS_TOO_MUCHYou have joined too many channels/supergroups.
400CHAT_ABOUT_TOO_LONGChat about too long.
500CHAT_INVALIDInvalid chat.
400CHAT_TITLE_EMPTYNo chat title provided.
400TTL_PERIOD_INVALIDThe specified TTL period is invalid.
406USER_RESTRICTEDYou're spamreported, you can't create channels or chats.

Channels, supergroups, gigagroups and basic groups #

How to handle channels, supergroups, gigagroups, basic groups, and what's the difference between them.

messages.initHistoryImport #

Import chat history from a foreign chat app into a specific Telegram chat, click here for more info about imported chats ».

Forum topics #

Telegram allows creating forums with multiple distinct topics.

Nearby users&chats #

How to work with geolocation-based features like geochats and the nearby users feature.

messages.setDefaultHistoryTTL #

Changes the default value of the Time-To-Live setting, applied to all new chats.