Skip to main content

Change chat color

Chat chat color for mobile app

Function ChangeChatColor(Val URL, Val ChatID, Val Color, Val Token = "") Export

ParameterCLI optionTypeRequiredDescription
URL--urlStringURL of webhook or a Bitrix24 domain, when token used
ChatID--chatString, NumberChat ID
Color--colorStringNew chat color
Token--tokenStringAccess token, when app auth method used

Returns: Map Of KeyAndValue - serialized JSON of answer from Bitrix24 API


tip

Method at API documentation: im.chat.updateTitle

Available colors: RED, GREEN, MINT, LIGHT_BLUE, DARK_BLUE, PURPLE, AQUA, PINK, LIME, BROWN, AZURE, KHAKI, SAND, MARENGO, GRAY, GRAPHITE


1C:Enterprise/OneScript code example
    URL    = "https://b24-ar17wx.bitrix24.by/rest/1/1o2...";
ChatID = "1106";

Color = "AZURE";

Result = OPI_Bitrix24.ChangeChatColor(URL, ChatID, Color);

URL = "b24-ar17wx.bitrix24.by";
Token = "35c31667006e9f06006b12e400000001000...";

Color = "PURPLE";

Result = OPI_Bitrix24.ChangeChatColor(URL, ChatID, Color, Token);
    oint bitrix24 ChangeChatColor \
--url "b24-ar17wx.bitrix24.by" \
--chat 1186 \
--color "PURPLE" \
--token "***"
Result
{
"result": true,
"time": {
"start": 1728454888.85994,
"finish": 1728454888.95268,
"duration": 0.0927419662475586,
"processing": 0.064525842666626,
"date_start": "2024-10-09T09:21:28+03:00",
"date_finish": "2024-10-09T09:21:28+03:00",
"operating_reset_at": 1728455488,
"operating": 0
}
}