Views: 2013
Last Modified: 13.05.2022

Deletes a command processing

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.

Note: Command processing requires for application to process a command-adding event ONIMCOMMANDADD.

Method call

$result = restCommand('imbot.command.unregister', Array(

    'COMMAND_ID' => 13, // Deletion command ID 
    'CLIENT_ID' => '', // Chatbot string ID, used only in Webhooks mode
), $_REQUEST["auth"]);


true or error.

Possible error codes

Code Description
COMMAND_ID_ERROR Command not found.
APP_ID_ERROR Chatbot is not a part of this application: you can only work with chatbots, installed within application framework.
WRONG_REQUEST Something went wrong.

Courses developed by Bitrix24