Last Modified: 13.05.2022
Chatbot changes a chat owner
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
$result = restCommand('imbot.chat.setOwner', Array(
'CHAT_ID' => 13 // Chat ID
'USER_ID' => '2' // New chat owner ID
'BOT_ID' => 39, // Chatbot ID from which the request is sent. May not be specified, if there is only one chatbot
true or error.
Possible error codes
||Chat ID was not transmitted.
||New chat owner ID was not transmitted.
||Method is called by user without owner's rights or indicated user is not a chat participant.