MyChat Integration API: MCIAPI_CS_IsUINOnline, check if a user is online

MyChat Integration API: MCIAPI_CS_IsUINOnline, check if a user is online

Check if a specified user is online by using his unique identifier (UIN).

 

Syntax

{

 "cmd"       : "0003",

 "ServerKey" : "iddqd",

 "APIStype"  : "mydata",

 

 "UIN"       : 18

}

 

If "UserFrom" and "UserTo" will match (e.g. you are trying to send messages to yourself), then instead of a sender will be UIN=0 (built-in bot).

 

Parameters

Parameters

Type

Value

cmd

string

"0003", the number of the command MCIAPI_CS_IsUINOnline;

ServerKey

string

IntegrationAPI key, configured in server's setting;

APIStype

string

integration type. You can set any string;

UIN

integer

numeric identifier of a user (he must be registered on the server).

 

Work result

{

 "cmd"    : "0003",

 "UIN"    : 18,

 "Online" : true

}

 

Field

Type

Value

cmd

string

HEX number of a command that run successfully;

UIN

integer

unique identifier of a user;

Online

boolean

true — if a user online, false — disconnected from the server.

 

Possible errors

#5, MCIAPI_Error_WrongIntegrationKey

#19, MCIAPI_Error_UINNotFound

 

See also

MCIAPI_CS_GetUINByEmail

MCIAPI_CS_GetUINByNick