Skip to main content

Create forum thread

Creates a new thread in the group with theme functionality enabled

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

ParameterCLI optionTypeRequiredDescription
Token--tokenStringToken
ChatID--forumString, NumberThread creation chat ID
Title--titleStringThread 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.CreateForumThread(Token, Chat, Name, Icon);
    oint telegram CreateForumThread \
--token "***" \
--forum "-1001971186208" \
--icon "5357419403325481346" \
--title "TestTopic 75b47427-11ce-43fa-b25c-95f9dab918e5"
Result
{
"ok": true,
"result": {
"message_thread_id": 5407,
"name": "TestTopic 6e8a9d01-e4f4-4c9e-80fc-004f9bd0d697",
"icon_color": 7322096,
"icon_custom_emoji_id": "5357419403325481346"
}
}