Views: 1589
Last Modified: 14.06.2022

Switch conversation to free operator

Revision You can get information about the current API version (platform version) as follows: im.revision.get : 1

Attention! To use the IMOPENLINES REST methods you need to have access permissions for imbot (Creating and managing chat bots) as well as access to the imopenlines (Open channels) scope.


Parameter Example Required Description Revision
CHAT_ID 12 Yes Chat ID 1

Method call and response


$result = restCommand('', Array(

    'CHAT_ID' => 12

), $_REQUEST["auth"]);

Response example

	"result": true
Result: true or error.

Example of response on error

    "error": "CHAT_ID_EMPTY",
    "error_description": "No chat ID"

Key description:

  • error – error code
  • error_description – error brief description

Possible error codes

Code Description
WRONG_CHAT Specified chat is not under bot control.
BOT_ID_ERROR Incorrect chatbot ID.

Courses developed by Bitrix24