telegram api method · layer 229 · #91006707

channels.createChannel

usable by users

Create a supergroup/channel.

definition

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.

returns

Updates

errors (12)

codeerrordescription
400ADDRESS_INVALIDThe specified geopoint address is invalid.
400BUSINESS_CONNECTION_NOT_ALLOWEDThis method was invoked over a business connection using invokeWithBusinessConnection, but either (1) we're a user, and users cannot invoke methods over a business connection; (2) we're a bot, but business mode was disabled in @botfather or (3); we're a bot, but this method cannot be invoked over a business connection.
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.
400CHAT_TITLE_EMPTYNo chat title provided.
400TTL_PERIOD_INVALIDThe specified TTL period is invalid.
401AUTH_KEY_UNREGISTEREDThe specified authorization key is not registered in the system (for example, a PFS temporary key has expired).
403USER_RESTRICTEDYou're spamreported, you can't create channels or chats.
406USER_RESTRICTEDYou're spamreported, you can't create channels or chats.
420ADDRESS_INVALIDThe specified geopoint address is invalid.
500CHAT_INVALIDInvalid chat.

history

present in layers 46–229 · constructor id changed 2×

idlayers
#f4893d7f46–101
#3d5fb10f102–149
#91006707150–229