Create a supergroup/channel.
Method schema is available as of layer 41. Switch »
| Name | Type | Description |
|---|---|---|
| flags | # | Flags, see TL conditional fields |
| broadcast | flags.0?true | Whether to create a channel |
| megagroup | flags.1?true | Whether to create a supergroup |
| for_import | flags.3?true | Whether the supergroup is being created to import messages from a foreign chat service using messages.initHistoryImport |
| forum | flags.5?true | Whether to create a forum |
| title | string | Channel title |
| about | string | Channel description |
| geo_point | flags.2?InputGeoPoint | Geogroup location, see here » for more info on geogroups. |
| address | flags.2?string | Geogroup address, see here » for more info on geogroups. |
| ttl_period | flags.4?int | Time-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. |
| Code | Type | Description |
|---|---|---|
| 400 | ADDRESS_INVALID | The specified geopoint address is invalid. |
| 400 | CHANNELS_ADMIN_LOCATED_TOO_MUCH | The user has reached the limit of public geogroups. |
| 400 | CHANNELS_TOO_MUCH | You have joined too many channels/supergroups. |
| 400 | CHAT_ABOUT_TOO_LONG | Chat about too long. |
| 500 | CHAT_INVALID | Invalid chat. |
| 400 | CHAT_TITLE_EMPTY | No chat title provided. |
| 400 | TTL_PERIOD_INVALID | The specified TTL period is invalid. |
| 403 | USER_RESTRICTED | You're spamreported, you can't create channels or chats. |
How to handle channels, supergroups, gigagroups, basic groups, and what's the difference between them.
Import chat history from a foreign chat app into a specific Telegram chat, click here for more info about imported chats ».
Telegram allows creating forums with multiple distinct topics.
How to work with geolocation-based features like geochats and the nearby users feature.
Changes the default value of the Time-To-Live setting, applied to all new chats.