Link Search Menu Expand Document

Method: channels.createForumTopic

Back to methods index

Create a forum topic; requires manage_topics rights.


channelUsername, chat ID, Update, Message or InputChannelThe forumOptional
titlestringTopic title (maximum UTF-8 length: 128)Optional
icon_colorintIf no custom emoji icon is specified, specifies the color of the fallback topic icon (RGB), one of 0x6FB9F0, 0xFFD67E, 0xCB86DB, 0x8EEE98, 0xFF93B2, or 0xFB6F5F.Optional
icon_emoji_idlongID of the custom emoji used as topic icon. Telegram Premium users can use any custom emoji, other users can only use the custom emojis contained in the inputStickerSetEmojiDefaultTopicIcons emoji pack.Optional
send_asUsername, chat ID, Update, Message or InputPeerCreate the topic as the specified peerOptional

Return type: Updates

Can bots use this method: YES

MadelineProto Example (now async for huge speed and parallelism!):

if (!file_exists('madeline.php')) {
    copy('', 'madeline.php');
include 'madeline.php';

$MadelineProto = new \danog\MadelineProto\API('session.madeline');

$Updates = $MadelineProto->channels->createForumTopic(channel: $InputChannel, title: 'string', icon_color: $int, icon_emoji_id: $long, send_as: $InputPeer, );