Views: 2029
Last Modified: 14.06.2022

Finish current session

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.

Parameters

Parameter Example Required Description Revision
CHAT_ID 112 Yes Chat ID 1


Method call and response

PHP

$result = restCommand('imopenlines.bot.session.finish', Array(

    'CHAT_ID' => 112

), $_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
CHAT_ID_EMPTY No chat ID.
BOT_ID_ERROR Incorrect chat bot ID.




Courses developed by Bitrix24