Views: 1031 (Data available since 06.02.2017)

The method gets information on the specified user status

Revision: 18
Get information on the current API revision (platform version) – im.revision.get.

Parameters

None

Method call

JavaScript

BX24.callMethod('im.user.status.get', {}, function(result){
	if(result.error())
	{
		console.error(result.error().ex);
	}
	else
	{
		console.log(result.data());
	}
});

PHP

$result = restCommand('im.user.status.get', Array(
), $_REQUEST["auth"]);

Example of response

{
	"result": "dnd"
}

Description of result:

  • online – Online
  • dnd – Do not disturb
  • away – Away

Attention! The method is specified with using of the restCommand function. This method is used to send data in Bitrix24 and is available in the EchoBot example as well as in this article. You can use your own function or BX24.callMethod, or bitrix24-php-sdk JavaScript methods.





Courses developed by «Bitrix», Inc.