Skip to main content

Create forum topic

Creates a new topic in the group with theme functionality enabled

Function CreateForumTopic(Val Token, Val ChatID, Val Title, Val IconID = "") Export

ParameterCLI optionTypeRequiredDescription
Token--tokenStringToken
ChatID--forumString, NumberTopic creation chat ID
Title--titleStringTopic title
IconID--iconStringSee GetAvatarIconList
Returns

Map Of KeyAndValue - serialized JSON response from Telegram

tip

Method at API documentation: createForumTopic


1C:Enterprise/OneScript code example
Token = "6129457865:AAFyzNYOAFbu...";
Chat = "-1001971186208";
Icon = "5357419403325481346";
Name = "TestTopic " + String(New UUID);

Result = OPI_Telegram.CreateForumTopic(Token, Chat, Name, Icon);
oint telegram CreateForumTopic \
--token "***" \
--forum "-1001971186208" \
--title "TestTopic 5519ec63-5dbb-43f8-a10b-ace130813f18" \
--icon "5357419403325481346"
Result
{
"ok": true,
"result": {
"message_thread_id": 16545,
"name": "TestTopic edff2de3-93b2-4a70-83b2-7ca29b5e45cf",
"icon_color": 7322096,
"icon_custom_emoji_id": "5357419403325481346"
}
}