Views: 2068
Last Modified: 14.06.2022

Send automatic chat bot message

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 2 Yes Chat ID, taken by current agent 1
MESSAGE message text Yes Sent message 1
NAME WELCOME Yes Message type: WELCOME - greetings message, DEFAULT - standard message. Empty be default 1

Method call and response


$result = restCommand('', Array(

	'CHAT_ID' => 2,
	'MESSAGE' => 'message text',
), $_REQUEST["auth"]);

Response example

	"result": true
Result: true or error.

Courses developed by Bitrix24