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 1c29830c-d66e-4232-b39d-e36835df2192" \
--icon "5357419403325481346"
Result
{
"ok": true,
"result": {
"message_thread_id": 11655,
"name": "TestTopic 1c29830c-d66e-4232-b39d-e36835df2192",
"icon_color": 7322096,
"icon_custom_emoji_id": "5357419403325481346"
}
}