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; |
context |
string |
optional parameter, any text that returns in a response command; |
UserFrom |
string |
UIN, email, nickname, or "domain\login" of a user-sender. If you have nothing to specify, or it is "0", then the bot Elisa will be as a sender; |
UsersList |
string |
list of UINs divided by commas; |
MustRead |
boolean |
a message must be read; |
ReadNotify |
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); |
ActualTo |
string |
relevance date/time "dd.mm.yyyy.hh.nn.ss" in UTC. |
Possible errors
#2, MCIAPI_Error_WrongSenderUser
#3, MCIAPI_Error_WrongReceiverUser
#5, MCIAPI_Error_WrongIntegrationKey
#35 MCIAPI_Error_UINIsAlreadyInCommonContactList
#36: MCIAPI_Error_WrongUsersList