MyChat Integration API: MCIAPI_CS_SendBroadcastMessage, send a broadcast

MyChat Integration API: MCIAPI_CS_SendBroadcastMessage, send a broadcast

Send a broadcast for any number of MyChat users.

 

Syntax

{

"cmd"        : "0013",

"ServerKey"  : "iddqd",

"APIStype"   : "mydata",

 

"UserFrom"   : "17",

"UsersList"  : "6,14,21",

"MustRead"   : true,

"ReadNofify" : false,

"ActualTo"   : "2021.12.12.10.00.00",

"Msg"        : "bla-bla-bla"

}

 

Parameters

Parameter

Type

Value

cmd

string

"0013", number of the command MCIAPI_CS_SendBroacastMessage;

ServerKey

string

Integration API key, can be set in the server settings;

APIStype

string

integration type. You can set any string;

UsersList

string

list of UINs divided by commas;

MustRead

boolean

a message must be read;

MsgReadNotify

boolean

notify a user when a receiver read a broadcast;

ActualTo

string

broadcast relevance date; the format is "yyyy.mm.dd.hh.nn.ss" specified in UTC;

Msg

string

message text; can be multi-line; lines divided by CRLF.

 

Work result

{

"cmd" : "0013",

"ID"  : 1749

}

 

Field

Type

Value

сmd

string

HEX number of a command that was successfully executed;

ID

integer

received unique identifier of a message sender (UIN).

 

Possible errors

#2, MCIAPI_Error_WrongSenderUser

#3, MCIAPI_Error_WrongReceiverUser

#4, MCIAPI_Error_EmptyMessage

#5, MCIAPI_Error_WrongIntegrationKey

#35 MCIAPI_Error_UINIsAlreadyInCommonContactList

#36: MCIAPI_Error_WrongUsersList

 

Se also

0002:MCIAPI_CS_SendPrivateMessage

0004:MCIAPI_CS_SendChannelMessage