imopenlines.session.mode.silent
Scope: catalog Permissions to execute: for all
Method for enabling and disabling silent communication mode
Parameters
Parameter | Example | Required | Default | Description |
---|---|---|---|---|
CHAT_ID | 2020 | Yes | Chat ID. | |
ACTIVATE | Y | No | N | Active flag. |
Method call and response
JavaScript for Bitrix24 On-premise.
BX.rest.callMethod( 'imopenlines.session.mode.silent', { CHAT_ID: 2047, ACTIVATE: 'Y' } ) .then(result => console.log(result.data())) .catch(result => console.warn(result.error().ex)) ;
JavaScript for Bitrix24 Cloud:
BX24.callMethod( 'imopenlines.session.mode.silent', { CHAT_ID: 2024 }, function(result) { if(result.error()) { console.warn(result.error().ex); return false; } console.log(result.data()); } );
Response example:
true
Possible error codes
Code | Description |
---|---|
ACCESS_DENIED | Current user doesn't have access to the specified chat. |
CHAT_TYPE | Specified chat isn't an Open Channel. |
CHAT_ID | Chat ID is incorrect . |
© «Bitrix24», 2001-2024