Create forum topic
Creates a new topic in the group with theme functionality enabled
- Parameters
- Advanced call ?
Function CreateForumTopic(Val Token, Val ChatID, Val Title, Val IconID = "") Export
| Parameter | CLI option | Type | Required | Description |
|---|---|---|---|---|
| Token | --token | String | ✔ | Token |
| ChatID | --forum | String, Number | ✔ | Topic creation chat ID |
| Title | --title | String | ✔ | Topic title |
| IconID | --icon | String | ✖ | See GetAvatarIconList |
Returns
Map Of KeyAndValue - serialized JSON response from Telegram
| Parameter | Description |
|---|---|
| proxy | InternetProxy or a structure with fields Protocol, Host, Port, User, Password, UseOSAuthentication |
| timeout | Request execution timeout |
| adv_response | Formats the response as a complete HTTP structure with fields code, body, and headers |
| retries | Number of HTTP request send attempts on 5** status codes or internal client errors |
| dontwait | Creates a background job and returns its data (for 1C and OneScript only) |
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);
- Bash
- CMD/Bat
oint telegram CreateForumTopic \
--token "***" \
--forum "-1001971186208" \
--title "TestTopic 5519ec63-5dbb-43f8-a10b-ace130813f18" \
--icon "5357419403325481346"
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"
}
}