Views: 2066
Last Modified: 13.05.2022
Chat title update
Attention! restCommand function is used here for illustration purposes only. It is taken from the
EchoBot example. You can send a REST command with your own function, or use the
BX24.callMethod or
bitrix24-php-sdk methods.
Method call
$result = restCommand('imbot.chat.updateTitle', Array(
'CHAT_ID' => 13 // Chat ID
'TITLE' => 'New name for chat' // New title
'BOT_ID' => 39, // Chatbot ID from which the request is sent. May not be specified, if there is only one chatbot
), $_REQUEST["auth"]);
Return:
true
or error.
Possible error codes
Code |
Description |
CHAT_ID_EMPTY |
Chat ID is unavailable. |
TITLE_EMPTY |
Fail to send new chat title. |
WRONG_REQUEST |
Title is already set or the specified chat already exists. |
|