Other IM Message Delivery
Update time: 2021/12/03 10:05:06
Login event Message Delivery
Login event Message delivery
2. "eventType"="2"。 It needs to be activated separately. If requiring this feature, please contact CommsEase business administrator.
Note: If you enable the Message delivery feature to achieve online status, you should pay attention to the fact that login and logout Message delivery do not necessarily appear in pairs and may be out of order or lost. Therefore, you should parse the timestamp of login/ logout Message delivery and maintain online status. If the timestamp of the new login/ logout Message delivery is less than the saved online timestamp, the new login/logout copy can be ignored.
HTTP example
httpPOST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
Content-Type: application/json
CurTime: 1440570500855 //The current UTC timestamp, in milliseconds counted since January 1, 1970 at 0:00:0 (String)
MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx //MD5 value calculated based on the request body of the request.
CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01
{"clientType":"AOS","code":"200","clientIp":"60.27.79.202","customTag":"Custom login field","accid":"t3","sdkVersion":"152","eventType":"2","deviceId":"c25f82d0-5f2e-492f-b5cc-3f4a585c25a2","timestamp":"1608877682237"}
cURL example
curlcurl -X POST -H "Content-Type: application/json" -H "CurTime: 1440570500855" -H "MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01" -d '{"accid":"t3","clientIp":"60.27.79.202","clientType":"AOS","code":"200","eventType":"2","sdkVersion":"152","timestamp":"1608877682237"}' 'http://yunxinservice.com.cn/receiveMsg.action'
Fields in the JSON data in the message body
Name | Type | Description |
---|---|---|
eventType | String | Value is 2, which indicates login event message |
accid | String | User account corresponding to the login event, string type |
clientIp | String | Ip address used when logging in |
clientType | String | Sender's client type AOS, IOS, PC, WINPHONE, WEB, REST, string type |
code | String | Return code of the login event, can be converted to Integer data type |
sdkVersion | String | Current SDK version, string type |
sdkHumanVersion | String | Readable version of current SDK, string type |
timestamp | String | Timestamp for login event occurrence, can be converted to Long data type |
customTag | String | Custom Tag set during login. If not set, then it is not included in message delivery. String type |
Logout event Message delivery
3. "eventType"="3"。 CommsEase initiates message delivery for of logout event when the client user actively logs out, is kicked out, disconnects from the Internet, and when the app is cleaned up. It needs to be activated separately. If requiring this feature, please contact CommsEase business administrator.
Note: If you enable the Message delivery feature to achieve online status, you should pay attention to the fact that login and logout Message delivery do not necessarily appear in pairs and may be out of order or lost. Therefore, you should parse the timestamp of login/ logout Message delivery and maintain online status. If the timestamp of the new login/ logout Message delivery is less than the saved online timestamp, the new login/logout copy can be ignored.
HTTP example
httpPOST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
Content-Type: application/json
CurTime: 1440570500855 //The current UTC timestamp, in milliseconds counted since January 1, 1970 at 0:00:0 (String)
MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx //MD5 value calculated based on the request body of the request.
CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01
{"clientType":"IOS","code":"200","accid":"tes","sdkVersion":"155","eventType":"3","timestamp":"1608872658452"}
cURL example
curlcurl -X POST -H "Content-Type: application/json" -H "CurTime: 1440570500855" -H "MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01" -d '{"accid":"tes","clientType":"IOS","code":"200","eventType":"3","sdkVersion":"155","timestamp":"1608872658452"}' 'http://yunxinservice.com.cn/receiveMsg.action'
Fields in the JSON data in the message body
javamessage delivery for may not include the clientIp field in a logout event message; but it must cover this field in a login event message.
Name | Type | Description |
---|---|---|
eventType | String | Value is 3, which indicates logout event message |
accid | String | User account corresponding to the logout event, string type |
clientIp | String | Ip address used when logging out |
clientType | String | Sender's client type AOS, IOS, PC, WINPHONE, WEB, REST, string type |
code | String | Return code of the logout event, can be converted to Integer data type |
sdkVersion | String | Current SDK version, string type |
sdkHumanVersion | String | Readable version of current SDK, string type |
timestamp | String | Timestamp for logout event occurrence, can be converted to Long data type |
logoutReason | String | Reason for logout: 1: logging off 2: Disconnection 3: Kicked offline by other own client 4: Kicked offline due to mutual kickout policy |
Chat room Message delivery
4. "eventType"="4"。
HTTP example
httpPOST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
Content-Type: application/json
CurTime: 1440570500855 //The current UTC timestamp, in milliseconds counted since January 1, 1970 at 0:00:0 (String)
MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx //MD5 value calculated based on the request body of the request.
CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01
{"attach":"{\"type\":1,\"data\":{\"value\":3}}","eventType":"4","ext":"{\"type\":-2}","fromAccount":"zqpret1101","fromAvator":"","fromClientType":"WEB","fromExt":"","fromNick":"zhangsan","msgTimestamp":"1456123424339","msgType":"CUSTOM","msgidClient":"e4d9065fdb5fde927b16d87b7e861d46","resendFlag":"0","roleInfoTimetag":"1456123382533","roomId":"2016"}
cURL example
curlcurl -X POST -H "Content-Type: application/json" -H "CurTime: 1440570500855" -H "MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01" -d '{"attach":"{\"type\":1,\"data\":{\"value\":3}}","eventType":"4","ext":"{\"type\":-2}","fromAccount":"zhangsan","fromAvator":"","fromClientType":"WEB","fromExt":"","fromNick":"zhangsan","msgTimestamp":"1456123424339","msgType":"CUSTOM","msgidClient":"e4d9065fdb5fde927b16d87b7e861d46","resendFlag":"0","roleInfoTimetag":"1456123382533","roomId":"2016"}' 'http://yunxinservice.com.cn/receiveMsg.action'
Fields in the JSON data in the message body
javamessage delivery for may not cover every field in a chat room messages, please pay attention to null judgment of each field.
The following are fields that are required under normal circumstances:
eventType, attach, fromAccount, msgTimestamp, msgType, msgidClient, roomId
Name | Type | Description |
---|---|---|
eventType | String | Value is 4, meaning it is a chat room message |
attach | String | Message content. If msgType is CUSTOM (custom message), this field is in JSON format. Otherwise it is an ordinary string |
ext | String | Third-party extension field, with no limitation on format, a string with length limited to 4096 |
fromAccount | String | Account number of sender, string type |
fromAvator | String | Sender's profile picture, string type |
fromClientType | String | Sender's client type AOS, IOS, PC, WINPHONE, WEB, REST, string type |
fromExt | String | Extension field of sender's identity, can be customized by the developer, string type |
fromNick | String | Sender's profile name, string type |
msgTimestamp | String | Timestamp of message sending |
msgType | String | Message type: TEXT, PICTURE, AUDIO, VIDEO, LOCATION, FILE, //File message NETCALL_AUDIO, //audio chat with net phone NETCALL_VEDIO, //video chat with net phone DATATUNNEL_NEW, //notification for new data channel request TIPS, //alert message CUSTOM //Custom message |
msgidClient | String | Message ID generated by client |
resendFlag | String | Resend tag: 0 indicates not resend, 1 indicates resend |
roleInfoTimetag | String | Time of last update to the message sender's name card, can be converted to Long data type |
roomId | String | ID of the chat room the message belongs to, can be converted to Long data type |
antispam | String | Identifies whether having been through anti-spam process, this field only exists when having gone through the process, can be converted to Boolean type data |
yidunRes | String | Contains original processing details of GuardEase anti-spam, this field is only available for applications that have access to related features of GuardEase anti-spam. For details, see examples given in the sections below, 4.4.1, chat room: sending text messages and 4.4.2, chat room: sending image messages. Sub-fields of this field are defined as follows: yidunBusType: 0: GuardEase text anti-spam service; 1. GuardEase image anti-spam service; 2. User profile anti-spam service; 3. User profile picture anti-spam service. action: processing result: detection result, 0: pass, 1: suspicion, 2: fail. (Only when yidunBusType is 0 or 2, this field is included in message delivery) labels: Specific anti-spam judgment details: Reference for text anti-spam: http://support.dun.163.com/antispam/api/#_18 Interpretation of labels field Reference for image anti-spam: http://support.dun.163.com/antispam/api/#_34 Interpretation of labels field |
Text message
Cc example:
{"attach":"Chat room text message","eventType":"4","ext":"","fromAccount":"zhangsan","fromAvator":"http://b12026.nos.netease.com/MTAxMTAxMA==/bmltYV8xNDI5MTZfMTQzODg2NDI4ODE0Ml81NjM3ZTIxMC1iMjE5LTRhYjgtOGZlOS02MzBjZWFjYmMwZDE=","fromClientType":"REST","fromNick":"zhangsan","msgTimestamp":"1456986458240","msgType":"TEXT","msgidClient":"wangwue-12345-9876543210123","resendFlag":"0","roleInfoTimetag":"0","roomId":"64","yidunRes":"{\"yidunBusType\":0,\"action\":0,\"labels\":[]}"}
Interpretation of attach field: See the interpretation of attach field in peer-to-peer text message
Image message
Cc example:
{"attach":"{\"md5\":\"d0323f8d447abf3df7256bd66f9d5b62\",\"h\":500,\"ext\":\"jpg\",\"size\":9093,\"w\":500,\"name\":\"Image sent on 18:29 03-02-2016\",\"url\":\"http:\\/\\/b12026.nos.netease.com\\/MTAxMTAxMA==\\/bmltYV8xNDI5MTVfMTQ1NTY4NzIxMDkyNl84NzBmZjY5Ni0yOGI5LTRiZDgtYjQ4Yy02ZmVjYWI0NjcxM2Y=\"}","eventType":"4","ext":"","fromAccount":"zhangsan","fromAvator":"http://b12026.nos.netease.com/MTAxMTAxMA==/bmltYV8xNDI5MTZfMTQzODg2NDI4ODE0Ml81NjM3ZTIxMC1iMjE5LTRhYjgtOGZlOS02MzBjZWFjYmMwZDE=","fromClientType":"REST","fromNick":"zhangsan","msgTimestamp":"1456974764820","msgType":"PICTURE","msgidClient":"abcde-12345-987654","resendFlag":"0","roleInfoTimetag":"0","roomId":"113","yidunRes":"{\"yidunBusType\":1,\"labels\":[{\"level\":0,\"rate\":0.0,\"label\":100},{\"level\":0,\"rate\":0.0,\"label\":200},{\"level\":0,\"rate\":0.0,\"label\":110},{\"level\":0,\"rate\":0.0,\"label\":400},{\"level\":0,\"rate\":0.0,\"label\":300},{\"level\":0,\"rate\":0.0,\"label\":210}]}"}
Interpretation of attach field: See the interpretation of attach field in peer-to-peer image message
Audio message
Cc example:
{"attach":"{\"size\":13738,\"ext\":\"aac\",\"dur\":3808,\"url\":\"http:\\/\\/b12026.nos.netease.com\\/MTAxMTAxMA==\\/bmltYV8xNDI5MTVfMTQ1NTY4NzIxMDkyNl9lOWExMmNmMy1lZDhkLTQ2Y2UtYWRiYS1mOTA4ODhjZTliNTM=\",\"md5\":\"35411b36f22077309daec3b970b46e89\"}","eventType":"4","ext":"","fromAccount":"zhangsan","fromAvator":"http://b12026.nos.netease.com/MTAxMTAxMA==/bmltYV8xNDI5MTZfMTQzODg2NDI4ODE0Ml81NjM3ZTIxMC1iMjE5LTRhYjgtOGZlOS02MzBjZWFjYmMwZDE=","fromClientType":"REST","fromNick":"zhangsan","msgTimestamp":"1456983964169","msgType":"AUDIO","msgidClient":"abcde-12345-98765432","resendFlag":"0","roleInfoTimetag":"0","roomId":"113"}
Interpretation of attach field: See the interpretation of attach field in peer-to-peer audio message
Video message
Cc example:
{"attach":"{\"dur\":1473,\"ext\":\"mp4\",\"h\":480,\"md5\":\"6ba2b50225469d46263ba70736c37cd3\",\"size\":150495,\"url\":\"http:\\/\\/b12026.nos.netease.com\\/MTAxMTAxMA==\\/bmltYV8xNDI5MTVfMTQ1NTY4NzIxMDkyNl9hMmJhOTIzMS1mM2NkLTQ0MTctOWI0OC1kZWRhOTFjNGUzZjA=\",\"w\":360}","eventType":"4","ext":"","fromAccount":"zhangsan","fromAvator":"http://b12026.nos.netease.com/MTAxMTAxMA==/bmltYV8xNDI5MTZfMTQzODg2NDI4ODE0Ml81NjM3ZTIxMC1iMjE5LTRhYjgtOGZlOS02MzBjZWFjYmMwZDE=","fromClientType":"REST","fromNick":"zhangsan","msgTimestamp":"1456985454300","msgType":"VIDEO","msgidClient":"abcde-12345-9876543210","resendFlag":"0","roleInfoTimetag":"0","roomId":"64"}
Interpretation of attach field: See the interpretation of attach field in peer-to-peer video message
Location message
Cc example:
{"attach":"{\"lat\":30.18704515647036,\"lng\":120.1908686708565,\"title\":\"No. 599 Wangshang Road, Hangzhou City, Zhejiang Province, China\"}","eventType":"4","ext":"","fromAccount":"zhangsan","fromAvator":"http://b12026.nos.netease.com/MTAxMTAxMA==/bmltYV8xNDI5MTZfMTQzODg2NDI4ODE0Ml81NjM3ZTIxMC1iMjE5LTRhYjgtOGZlOS02MzBjZWFjYmMwZDE=","fromClientType":"REST","fromNick":"zhangsan","msgTimestamp":"1456986934675","msgType":"LOCATION","msgidClient":"abcde-12345-98765432101234567","resendFlag":"0","roleInfoTimetag":"0","roomId":"64"}
Interpretation of attach field: See the interpretation of attach field in peer-to-peer location message
File message
Cc example:
{"attach":"{\"ext\":\"ttf\",\"md5\":\"79d62a35fa3d34c367b20c66afc2a500\",\"name\":\"BlizzardReg.ttf\",\"size\":\"91680\",\"url\":\"http:\\/\\/nimtest.nos.netease.com\\/08c9859d-183f-4daa-9904-d6cacb51c95b\"}","eventType":"4","ext":"","fromAccount":"zhangsan","fromAvator":"http://b12026.nos.netease.com/MTAxMTAxMA==/bmltYV8xNDI5MTZfMTQzODg2NDI4ODE0Ml81NjM3ZTIxMC1iMjE5LTRhYjgtOGZlOS02MzBjZWFjYmMwZDE=","fromClientType":"REST","fromNick":"zhangsan","msgTimestamp":"1456987025760","msgType":"FILE","msgidClient":"abcde-12345-987654321012345678","resendFlag":"0","roleInfoTimetag":"0","roomId":"64"}
Interpretation of attach field: See the interpretation of attach field in peer-to-peer file message
Custom message
Cc example:
{"attach":"{\"myKey1\":\"myValue1\",\"myKey2\":10}","eventType":"4","ext":"","fromAccount":"zhangsan","fromAvator":"http://b12026.nos.netease.com/MTAxMTAxMA==/bmltYV8xNDI5MTZfMTQzODg2NDI4ODE0Ml81NjM3ZTIxMC1iMjE5LTRhYjgtOGZlOS02MzBjZWFjYmMwZDE=","fromClientType":"REST","fromNick":"zhangsan","msgTimestamp":"1456987119256","msgType":"CUSTOM","msgidClient":"abcde-12345-9876543210123456789","resendFlag":"0","roleInfoTimetag":"0","roomId":"64"}
Definition of attach field: third party itself is responsible for defining and parsing the corresponding Key-Value
Definitions of several types of custom messages in the SDK:
————————————————
Rock-paper-scissors (type = 1):
{"attach":"{\"type\":1,\"data\":{\"value\":3}}","eventType":"4","ext":"{\"type\":-2}","fromAccount":"zhangsan","fromAvator":"http://b12026.nos.netease.com/MTAxMTAxMA==/bmltYV8xNDI5MTZfMTQzODg2NDI4ODE0Ml81NjM3ZTIxMC1iMjE5LTRhYjgtOGZlOS02MzBjZWFjYmMwZDE=","fromClientType":"IOS","fromExt":"","fromNick":"zhangsan","msgTimestamp":"1456987221992","msgType":"CUSTOM","msgidClient":"aba76741-f5c4-40ce-9f84-4b76c89d9b71","resendFlag":"0","roleInfoTimetag":"1456987212647","roomId":"64"}
Definition of attach field:
{
"type": 1 //type=1 indicates rock-paper-scissors
"data": {
"value":3 //1: Rock; 2: Scissors; 3: Paper
}
}
————————————————
Sticker emoji (type = 3):
{"attach":"{\"type\":3,\"data\":{\"catalog\":\"xxy\",\"chartlet\":\"xxy001\"}}","eventType":"4","ext":"","fromAccount":"zhangsan","fromAvator":"http://b12026.nos.netease.com/MTAxMTAxMA==/bmltYV8xNDI5MTZfMTQzODg2NDI4ODE0Ml81NjM3ZTIxMC1iMjE5LTRhYjgtOGZlOS02MzBjZWFjYmMwZDE=","fromClientType":"REST","fromNick":"zhangsan","msgTimestamp":"1456987840942","msgType":"CUSTOM","msgidClient":"abcde-12345-987654321012345678901","resendFlag":"0","roleInfoTimetag":"0","roomId":"64"}
Definition of attach field:
{
"type":3 //type=3 indicates sticker emoji
"data": {
"catalog":"xxy", //name of the folder containing the sticker
"chartlet":"xxy002" //name of the sticker file
}
}
message delivery for the event of recalling one-to-one chat messages
7. "eventType"="7"。
HTTP example
httpPOST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
Content-Type: application/json
CurTime: 1440570500855 //The current UTC timestamp, in milliseconds counted since January 1, 1970 at 0:00:0 (String)
MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx //MD5 value calculated based on the request body of the request.
CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01
{"clientId":"9e549196-1bb4-4143-a428-d13eaa0cd732","deleteTime":"1487308054709","eventType":"7","from":"zhangsan","fromClientType":"IOS","msgId":"11555996","selfMsg":"Recalled a message","sendTime":"1487308046652","to":"lisi"}
cURL example
curlcurl -X POST -H "Content-Type: application/json" -H "CurTime: 1440570500855" -H "MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01" -d '{"clientId":"9e549196-1bb4-4143-a428-d13eaa0cd732","deleteTime":"1487308054709","eventType":"7","from":"zhangsan","fromClientType":"IOS","msgId":"11555996","selfMsg":"Recalled a message","sendTime":"1487308046652","to":"lisi"}'
'http://yunxinservice.com.cn/receiveMsg.action'
Fields in the JSON data in the message body
Name | Type | Description |
---|---|---|
eventType | String | Value is 7, which indicates one-to-one chat message recall message delivery for event |
clientId | String | Client id, string type |
deleteTime | String | Message recall time, 13-digit timestamp |
from | String | User account of message sender, string type |
fromClientType | String | Client type upon message recall: AOS, IOS, PC, WINPHONE, WEB, REST, string type |
msgId | String | server ID of the recalled message, can be converted to a Long type value |
selfMsg | String | Postscript of the recalled message, string type |
sendTime | String | The time the message was sent, 13-bit timestamp |
to | String | User account, message recipient, string type |
attach | String | Message recall custom extension field, string type |
message delivery for the event of recalling team chat messages
8. "eventType"="8"。
HTTP example
httpPOST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
Content-Type: application/json
CurTime: 1440570500855 //The current UTC timestamp, in milliseconds counted since January 1, 1970 at 0:00:0 (String)
MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx //MD5 value calculated based on the request body of the request.
CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01
{"clientId":"3651689e-53a0-4a1c-beba-7e3703203ef6","deleteTime":"1487309158801","eventType":"8","from":"zhangsan","fromClientType":"IOS","msgId":"927914262574","selfMsg":"Recalled a message","sendTime":"1487309155228","to":"13827"}
cURL example
curlcurl -X POST -H "Content-Type: application/json" -H "CurTime: 1440570500855" -H "MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01" -d '{"clientId":"3651689e-53a0-4a1c-beba-7e3703203ef6","deleteTime":"1487309158801","eventType":"8","from":"zhangsan","fromClientType":"IOS","msgId":"927914262574","selfMsg":"Recalled a message","sendTime":"1487309155228","to":"13827"}'
'http://yunxinservice.com.cn/receiveMsg.action'
Fields in the JSON data in the message body
Name | Type | Description |
---|---|---|
eventType | String | Value is 8, which indicates team chat message recall message delivery for event |
clientId | String | Client id, string type |
deleteTime | String | Message recall time, 13-digit timestamp |
from | String | User account of message sender, string type |
fromClientType | String | Client type upon message recall: AOS, IOS, PC, WINPHONE, WEB, REST, string type |
msgId | String | server ID of the recalled message, can be converted to a Long type value |
selfMsg | String | Postscript of the recalled message, string type |
sendTime | String | The time the message was sent, 13-bit timestamp |
to | String | Team id, can be converted to Long type value |
attach | String | Message recall custom extension field, string type |
Recall of Superteam chat message
8. "eventType"="25"。
HTTP example
httpPOST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
Content-Type: application/json
CurTime: 1440570500855 //The current UTC timestamp, in milliseconds counted since January 1, 1970 at 0:00:0 (String)
MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx //MD5 value calculated based on the request body of the request.
CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01
{"clientId":"3651689e-53a0-4a1c-beba-7e3703203ef6","deleteTime":"1487309158801","eventType":"25","from":"zhangsan","fromClientType":"IOS","msgId":"927914262574","selfMsg":"Recalled a message","sendTime":"1487309155228","to":"13827"}
cURL example
curlcurl -X POST -H "Content-Type: application/json" -H "CurTime: 1440570500855" -H "MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01" -d '{"clientId":"3651689e-53a0-4a1c-beba-7e3703203ef6","deleteTime":"1487309158801","eventType":"8","from":"zhangsan","fromClientType":"IOS","msgId":"927914262574","selfMsg":"Recalled a message","sendTime":"1487309155228","to":"13827"}'
'http://yunxinservice.com.cn/receiveMsg.action'
Fields in the JSON data in the message body
Name | Type | Description |
---|---|---|
eventType | String | Value is 25, which indicates Superteam chat message recall message delivery for event |
clientId | String | Client id, string type |
deleteTime | String | Message recall time, 13-digit timestamp |
from | String | User account of message sender, string type |
fromClientType | String | Client type upon message recall: AOS, IOS, PC, WINPHONE, WEB, REST, string type |
msgId | String | server ID of the recalled message, can be converted to a Long type value |
selfMsg | String | Postscript of the recalled message, string type |
sendTime | String | The time the message was sent, 13-bit timestamp |
to | String | Team id, can be converted to Long type value |
message delivery for the event of anchor or administrator joining or leaving chat room
9. "eventType"="9"。
HTTP example
httpPOST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
Content-Type: application/json
CurTime: 1440570500855 //The current UTC timestamp, in milliseconds counted since January 1, 1970 at 0:00:0 (String)
MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx //MD5 value calculated based on the request body of the request.
CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01
{"roomId":"1001","event":"IN","accid":"test","clientIp":"192.168.1.100","clientType":"PC","code":"200","eventType":"9","sdkVersion":"18","timestamp":"1452504942126"}
cURL example
curlcurl -X POST -H "Content-Type: application/json" -H "CurTime: 1440570500855" -H "MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01" -d '{"roomId":"1001","event":"IN","accid":"test","clientIp":"192.168.1.100","clientType":"PC","code":"200","eventType":"9","sdkVersion":"18","timestamp":"1452504942126"}' 'http://yunxinservice.com.cn/receiveMsg.action'
Fields in the JSON data in the message body
Name | Type | Description |
---|---|---|
eventType | String | Value is 9, which requires special attention as it indicates an event of anchor or administrator joining and leaving the chat room |
roomId | String | Chat room ID |
event | String | Enter or leave. IN: Entering the chat room; OUT: Actively leaving the chat room, or drop-out |
accid | String | User account, string type |
clientIp | String | ip address of the client, may not be available in case of OUT |
clientType | String | Sender's client type AOS, IOS, PC, WINPHONE, WEB, REST, string type |
code | String | Return code, can be converted to Integer type data |
sdkVersion | String | Current SDK version, string type |
timestamp | String | Timestamp of event occurrence, can be converted to Long type data |
7. "eventType"="7"。
HTTP example
httpPOST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
Content-Type: application/json
CurTime: 1440570500855 //The current UTC timestamp, in milliseconds counted since January 1, 1970 at 0:00:0 (String)
MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx //MD5 value calculated based on the request body of the request.
CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01
{"clientId":"9e549196-1bb4-4143-a428-d13eaa0cd732","deleteTime":"1487308054709","eventType":"7","from":"zhangsan","fromClientType":"IOS","msgId":"11555996","selfMsg":"Recalled a message","sendTime":"1487308046652","to":"lisi"}
cURL example
curlcurl -X POST -H "Content-Type: application/json" -H "CurTime: 1440570500855" -H "MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01" -d '{"clientId":"9e549196-1bb4-4143-a428-d13eaa0cd732","deleteTime":"1487308054709","eventType":"7","from":"zhangsan","fromClientType":"IOS","msgId":"11555996","selfMsg":"Recalled a message","sendTime":"1487308046652","to":"lisi"}'
'http://yunxinservice.com.cn/receiveMsg.action'
Fields in the JSON data in the message body
Name | Type | Description |
---|---|---|
eventType | String | Value is 7, which indicates one-to-one chat message recall message delivery for event |
clientId | String | Client id, string type |
deleteTime | String | Message recall time, 13-digit timestamp |
from | String | User account of message sender, string type |
fromClientType | String | Client type upon message recall: AOS, IOS, PC, WINPHONE, WEB, REST, string type |
msgId | String | server ID of the recalled message, can be converted to a Long type value |
selfMsg | String | Postscript of the recalled message, string type |
sendTime | String | The time the message was sent, 13-bit timestamp |
to | String | User account, message recipient, string type |
attach | String | Message recall custom extension field, string type |
message delivery for the event of recalling team chat messages
8. "eventType"="8"。
HTTP example
httpPOST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
Content-Type: application/json
CurTime: 1440570500855 //The current UTC timestamp, in milliseconds counted since January 1, 1970 at 0:00:0 (String)
MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx //MD5 value calculated based on the request body of the request.
CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01
{"clientId":"3651689e-53a0-4a1c-beba-7e3703203ef6","deleteTime":"1487309158801","eventType":"8","from":"zhangsan","fromClientType":"IOS","msgId":"927914262574","selfMsg":"Recalled a message","sendTime":"1487309155228","to":"13827"}
cURL example
curlcurl -X POST -H "Content-Type: application/json" -H "CurTime: 1440570500855" -H "MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01" -d '{"clientId":"3651689e-53a0-4a1c-beba-7e3703203ef6","deleteTime":"1487309158801","eventType":"8","from":"zhangsan","fromClientType":"IOS","msgId":"927914262574","selfMsg":"Recalled a message","sendTime":"1487309155228","to":"13827"}'
'http://yunxinservice.com.cn/receiveMsg.action'
Fields in the JSON data in the message body
Name | Type | Description |
---|---|---|
eventType | String | Value is 8, which indicates team chat message recall message delivery for event |
clientId | String | Client id, string type |
deleteTime | String | Message recall time, 13-digit timestamp |
from | String | User account of message sender, string type |
fromClientType | String | Client type upon message recall: AOS, IOS, PC, WINPHONE, WEB, REST, string type |
msgId | String | server ID of the recalled message, can be converted to a Long type value |
selfMsg | String | Postscript of the recalled message, string type |
sendTime | String | The time the message was sent, 13-bit timestamp |
to | String | Team id, can be converted to Long type value |
attach | String | Message recall custom extension field, string type |
Recall of Superteam chat message
8. "eventType"="25"。
HTTP example
httpPOST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
Content-Type: application/json
CurTime: 1440570500855 //The current UTC timestamp, in milliseconds counted since January 1, 1970 at 0:00:0 (String)
MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx //MD5 value calculated based on the request body of the request.
CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01
{"clientId":"3651689e-53a0-4a1c-beba-7e3703203ef6","deleteTime":"1487309158801","eventType":"25","from":"zhangsan","fromClientType":"IOS","msgId":"927914262574","selfMsg":"Recalled a message","sendTime":"1487309155228","to":"13827"}
cURL example
curlcurl -X POST -H "Content-Type: application/json" -H "CurTime: 1440570500855" -H "MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01" -d '{"clientId":"3651689e-53a0-4a1c-beba-7e3703203ef6","deleteTime":"1487309158801","eventType":"8","from":"zhangsan","fromClientType":"IOS","msgId":"927914262574","selfMsg":"Recalled a message","sendTime":"1487309155228","to":"13827"}'
'http://yunxinservice.com.cn/receiveMsg.action'
Fields in the JSON data in the message body
Name | Type | Description |
---|---|---|
eventType | String | Value is 25, which indicates Superteam chat message recall message delivery for event |
clientId | String | Client id, string type |
deleteTime | String | Message recall time, 13-digit timestamp |
from | String | User account of message sender, string type |
fromClientType | String | Client type upon message recall: AOS, IOS, PC, WINPHONE, WEB, REST, string type |
msgId | String | server ID of the recalled message, can be converted to a Long type value |
selfMsg | String | Postscript of the recalled message, string type |
sendTime | String | The time the message was sent, 13-bit timestamp |
to | String | Team id, can be converted to Long type value |
message delivery for the event of anchor or administrator joining or leaving chat room
9. "eventType"="9"。
HTTP example
httpPOST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
Content-Type: application/json
CurTime: 1440570500855 //The current UTC timestamp, in milliseconds counted since January 1, 1970 at 0:00:0 (String)
MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx //MD5 value calculated based on the request body of the request.
CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01
{"roomId":"1001","event":"IN","accid":"test","clientIp":"192.168.1.100","clientType":"PC","code":"200","eventType":"9","sdkVersion":"18","timestamp":"1452504942126"}
cURL example
curlcurl -X POST -H "Content-Type: application/json" -H "CurTime: 1440570500855" -H "MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01" -d '{"roomId":"1001","event":"IN","accid":"test","clientIp":"192.168.1.100","clientType":"PC","code":"200","eventType":"9","sdkVersion":"18","timestamp":"1452504942126"}' 'http://yunxinservice.com.cn/receiveMsg.action'
Fields in the JSON data in the message body
Name | Type | Description |
---|---|---|
eventType | String | Value is 9, which requires special attention as it indicates an event of anchor or administrator joining and leaving the chat room |
roomId | String | Chat room ID |
event | String | Enter or leave. IN: Entering the chat room; OUT: Actively leaving the chat room, or drop-out |
accid | String | User account, string type |
clientIp | String | ip address of the client, may not be available in case of OUT |
clientType | String | Sender's client type AOS, IOS, PC, WINPHONE, WEB, REST, string type |
code | String | Return code, can be converted to Integer type data |
sdkVersion | String | Current SDK version, string type |
timestamp | String | Timestamp of event occurrence, can be converted to Long type data |
message delivery for the callback of the end of dedicated phone call
10. "eventType"="10" / "type":"CALL"。 It needs to be activated separately. If requiring this feature, please contact a relevant CommsEase administrator.
New special call message delivery for is marked "type":"CALL"
. The actual content must prevail
HTTP example
httpPOST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
Content-Type: application/json
CurTime: 1440570500855 //The current UTC timestamp, in milliseconds counted since January 1, 1970 at 0:00:0 (String)
MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx //MD5 value calculated based on the request body of the request.
CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01
//Example of two-person private call
{"callback":"{\"callee\":\"15967161234\",\"caller\":\"18605815678\",\"createtime\":1484118614911,\"durationSec\":0,\"initAccount\":\"abcd\",\"legs\":[{\"endTime\":\"2017-01-11 15:10:30\",\"endpoint\":\"18605815678\",\"hangCause\":\"NO_USER_RESPONSE\"},{\"endTime\":\"2017-01-11 15:10:30\",\"endpoint\":\"15967161234\",\"hangCause\":\"NO_USER_RESPONSE\"}],\"session\":\"7c4b7673-4f70-4164-82a0-decb84d77914\",\"starttime\":\"2017-01-11 15:10:30\",\"status\":\"SUCCESS\"}","eventType":"10"}
//Example of dedicated line conference
{"callback":"{\"createtime\":1484103244335,\"durationSec\":0,\"initAccount\":\"call817\",\"members\":\"[\\\"18605811234\\\",\\\"18158125678\\\",\\\"15967169012\\\"]\",\"session\":\"4ea1e712-cfd5-4891-b66a-4aa71fe65383\",\"starttime\":\"2017-01-11 10:52:38\",\"status\":\"SUCCESS\"}","eventType":"10"}
cURL example
curl//Example of two-person private call
curl -X POST -H "Content-Type: application/json" -H "CurTime: 1440570500855" -H "MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01" -d '{"callback":"{\"callee\":\"15967161234\",\"caller\":\"18605815678\",\"createtime\":1484118614911,\"durationSec\":0,\"initAccount\":\"abcd\",\"legs\":[{\"endTime\":\"2017-01-11 15:10:30\",\"endpoint\":\"18605815678\",\"hangCause\":\"NO_USER_RESPONSE\"},{\"endTime\":\"2017-01-11 15:10:30\",\"endpoint\":\"15967161234\",\"hangCause\":\"NO_USER_RESPONSE\"}],\"session\":\"7c4b7673-4f70-4164-82a0-decb84d77914\",\"starttime\":\"2017-01-11 15:10:30\",\"status\":\"SUCCESS\"}","eventType":"10"}' 'http://yunxinservice.com.cn/receiveMsg.action'
curl//Example of dedicated line conference
curl -X POST -H "Content-Type: application/json" -H "CurTime: 1440570500855" -H "MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01" -d '{"callback":"{\"createtime\":1484103244335,\"durationSec\":0,\"initAccount\":\"call817\",\"members\":\"[\\\"18605811234\\\",\\\"18158125678\\\",\\\"15967169012\\\"]\",\"session\":\"4ea1e712-cfd5-4891-b66a-4aa71fe65383\",\"starttime\":\"2017-01-11 10:52:38\",\"status\":\"SUCCESS\"}","eventType":"10"}' 'http://yunxinservice.com.cn/receiveMsg.action'
Fields in the JSON data in the message body
Name | Type | Description |
---|---|---|
eventType | String | Value is 10, which requires special attention as it indicates a callback event of anchor or administrator joining and leaving the chat room |
callback | String | Specific content of CDR callback, String type, can be converted to JSONObject. Reference for specific definitions of the fields: [Query the details of dedicated line call or conference] (/en/docs/TM5MzM5Njk/TYyMDI1MTg?#Query the details of dedicated line call or conference) |
SMS receipt message delivery
11. "eventType"="11"。
HTTP example
httpPOST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
Content-Type: application/json
CurTime: 1440570500855 //The current UTC timestamp, in milliseconds counted since January 1, 1970 at 0:00:0 (String)
MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx //MD5 value calculated based on the request body of the request.
CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01
{ "eventType": "11", "objects": [ { "mobile": "18605818212", "sendid": "1490", "result": "DELIVRD", "sendTime": "2017-06-02 14:40:45", "reportTime": "2017-06-06 10:40:30", "spliced": "1","templateId":1234 }, { "mobile": "18605818212", "sendid": "1491", "result": "DELIVRD", "sendTime": "2017-06-02 14:41:00", "reportTime": "2017-06-02 10:41:20", "spliced": "2" ,"templateId":1234} ]}
cURL example
curlcurl -X POST -H "Content-Type: application/json" -H "CurTime: 1440570500855" -H "MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01" -d '{ "eventType": "11", "objects": [ { "mobile": "18605818212", "sendid": "1490", "result": "DELIVRD", "sendTime": "2017-06-02 14:40:45", "reportTime": "2017-06-06 10:40:30", "spliced": "1" ,"templateId":1234}, { "mobile": "18605818212", "sendid": "1491", "result": "DELIVRD", "sendTime": "2017-06-02 14:41:00", "reportTime": "2017-06-02 10:41:20", "spliced": "2","templateId":1234 } ]}' 'http://yunxinservice.com.cn/receiveMsg.action'
Fields in the JSON data in the message body
Name | Type | Description |
---|---|---|
mobile | String | Mobile number |
sendid | String | Sendid returned by SMS sending interface |
result | String | SMS sending status code returned by telecom operator |
sendTime | String | SMS sending time, by which sms-api interface is called to send the SMS |
reportTime | String | SMS delivery time returned by telecom operator |
spliced | String | SMS billing count |
templateId | Long | Template ID corresponding to the SMS |
SMS uplink message delivery
12. "eventType"="12"。
HTTP example
httpPOST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
Content-Type: application/json
CurTime: 1440570500855 //The current UTC timestamp, in milliseconds counted since January 1, 1970 at 0:00:0 (String)
MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx //MD5 value calculated based on the request body of the request.
CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01
{"eventType":"12","objects":"[{ \"mobile\": \"18605818212\", \"content\": \"TD\", \"replytime\": \"2017-09-20 10:40:30\"},{ \"mobile\": \"18605818213\", \"content\": \"TD\", \"replytime\": \"2017-09-20 10:40:30\" }]"}
cURL example
curlcurl -X POST -H "Content-Type: application/json" -H "CurTime: 1440570500855" -H "MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01" -d '{"eventType":"12","objects":"[{ \"mobile\": \"18605818212\", \"content\": \"TD\", \"replytime\": \"2017-09-20 10:40:30\"},{ \"mobile\": \"18605818213\", \"content\": \"TD\", \"replytime\": \"2017-09-20 10:40:30\" }]"}' 'http://yunxinservice.com.cn/receiveMsg.action'
Fields in the JSON data in the message body
Name | Type | Description |
---|---|---|
mobile | String | Mobile number |
content | String | Uplink SMS content |
replytime | String | SMS reply time |
14. "eventType"="14"。
HTTP example
httpPOST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
Content-Type: application/json
CurTime: 1440570500855 //The current UTC timestamp, in milliseconds counted since January 1, 1970 at 0:00:0 (String)
MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx //MD5 value calculated based on the request body of the request.
CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01
//==== "qEvent":"1" ====
{"fromWebApi":"true","eventType":"14","roomid":"32","qEvent":"1","operator":"zyy"}
//==== "qEvent":"2" ====
{"transient":"false","elements":"{\"2\":\"1512702269.556135-2\"}","fromWebApi":"false","belongTo":"zyy","eventType":"14","roomid":"101","qEvent":"2","operator":"zyy"}
//==== "qEvent":"3" ====
{"transient":"false","elements":"{\"2\":\"2\"}","fromWebApi":"true","belongTo":"zyy","eventType":"14","roomid":"48","qEvent":"3","operator":"zyy"}
//==== "qEvent":"4" ====
{"keys":"[\"2\"]","fromWebApi":"false","eventType":"14","roomid":"57","qEvent":"4","operator":"zyy"}
//==== "qEvent":"5" ====
{"elements":"{\"1\":\"1512702269.686414-1\"}","fromWebApi":"false","eventType":"14","roomid":"101","qEvent":"5","operator":"zyy"}
//==== "qEvent":"6" ====
{"elements":"{\"1\":\"1512702269.686414-1\"}","fromWebApi":"false","eventType":"14","roomid":"101","qEvent":"6","operator":"zyy"}
//==== "qEvent":"7" ====
{"fromWebApi":"false","eventType":"14","roomid":"101","qEvent":"7","operator":"zyy"}
//==== "qEvent":"8" ====
{"fromWebApi":"false","eventType":"14","roomid":"101","qEvent":"8","operator":"zyy"}
cURL example
curlcurl -X POST -H "Content-Type: application/json" -H "CurTime: 1440570500855" -H "MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01" -d '{"fromWebApi":"true","eventType":"14","roomid":"32","qEvent":"1","operator":"zyy"}' 'http://yunxinservice.com.cn/receiveMsg.action'
Fields in the JSON data in the message body
Name | Type | Description |
---|---|---|
qEvent | String | Specific operation, can be converted to int, detailed enumeration is as follows: 1: INIT, queue initialization 2: ADD, adding key-value to the queue 3: UPDATE, updating the value corresponding to the existing key 4: DELETE, deleting queue elements 5: POLL, pulling out (specified/header) elements 6: PEAK, viewing (not deleting) the first element of the header 7: LIST, listing all elements in order 8: DROP, clearing the queue |
fromWebApi | String | Whether the operation is initiated by CommsEase server api, can be converted to Boolean type |
roomid | String | Chat room id, can be converted to Long type value |
operator | String | accid of the user owning the element |
belongTo | String | Element key and the corresponding value |
elements | String | Element key and the corresponding value |
keys | String | Element keys, excluding value |
transient | String | When all chat room connections of the operator of this new element are dropped or the operator leaves the chat room, whether to delete all elements submitted by the operator. Can be converted to Boolean type value. true: deletion needed; false: deletion not needed. |
GuardEase asynchronous anti-spam message delivery
15. "eventType"="20"。 It needs to be activated separately. If requiring this feature, please contact CommsEase business administrator.
-
Example - video Message delivery
15.1. HTTP example
15.2. cURL example
15.3. JSON field in message body
HTTP example
httpPOST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
Content-Type: application/json
CurTime: 1440570500855 //The current UTC timestamp, in milliseconds counted since January 1, 1970 at 0:00:0 (String)
MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx //MD5 value calculated based on the request body of the request.
CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01
{"objects":"[{\"audioUrl\":\"http://nim-nosdn.netease.im/MTAxMTAwMA==/bmltd18wXzE1NTg2NDYxMjAxNDNfYWEwOTQ3YTAtNTg1Ny00ZTVmLTlmMTgtZThmMWUzYmY3NTQ0\",\"serverMsgId\":\"171450683457798182\",\"antispam\":true,\"clientMsgId\":\"90ad7356-b591-4fa4-8edb-c042d9caa3ea\",\"yidunRes\":{\"asrResult\":0.0,\"action\":1.0,\"asrStatus\":3.0,\"taskId\":\"342f252af8014bb7a2005794050f06af\",\"labels\":[{\"level\":1.0,\"details\":{\"hitType\":30.0,\"hint\":[{\"value\":\"Text with anti-spam hit\",\"segments\":[{\"startTime\":0.0,\"endTime\":2.0}]}]},\"label\":600.0}]},\"from\":\"pre00001\",\"to\":\"2554814271\",\"type\":\"TEAM_MSG_AUDIO\"}]","eventType":"20"}
cURL example
curlcurl -X POST -H "Content-Type: application/json" -H "CurTime: 1440570500855" -H "MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01" -d '{"objects":"[{\"audioUrl\":\"http://nim-nosdn.netease.im/MTAxMTAwMA==/bmltd18wXzE1NTg2NDYxMjAxNDNfYWEwOTQ3YTAtNTg1Ny00ZTVmLTlmMTgtZThmMWUzYmY3NTQ0\",\"serverMsgId\":\"171450683457798182\",\"antispam\":true,\"clientMsgId\":\"90ad7356-b591-4fa4-8edb-c042d9caa3ea\",\"yidunRes\":{\"asrResult\":0.0,\"action\":1.0,\"asrStatus\":3.0,\"taskId\":\"342f252af8014bb7a2005794050f06af\",\"labels\":[{\"level\":1.0,\"details\":{\"hitType\":30.0,\"hint\":[{\"value\":\"Text with anti-spam hit\",\"segments\":[{\"startTime\":0.0,\"endTime\":2.0}]}]},\"label\":600.0}]},\"from\":\"pre00001\",\"to\":\"2554814271\",\"type\":\"TEAM_MSG_AUDIO\"}]","eventType":"20"}'
'http://yunxinservice.com.cn/receiveMsg.action'
Fields in the JSON data in the message body
javaSome of the fields in GuardEase asynchronous anti-spam message delivery for results may be null, please pay attention to the null judgment of each field. The following are general required fields: eventType, antispam, type, yidunRes
Name | Type | Description |
---|---|---|
eventType | String | Cc event type |
antispam | String | Whether there is anti-spam hit true: hit (message delivery for currently only covers hits) false: no hit |
type | String | GuardEase asynchronous anti-spam type: peer-to-peer_MSG_AUDIO: peer-to-peer audio message, corresponding to is recipient account TEAM_MSG_AUDIO: team chat audio message, corresponding to is team ID Superteam_MSG_AUDIO: Superteam audio message, corresponding to is team ID CHATROOM_MSG_AUDIO: chat room audio message, corresponding to is chat room ID peer-to-peer_MSG_VIDEO: peer-to-peer video message, corresponding to is recipient account TEAM_MSG_VIDEO: team chat video message, corresponding to is team ID Superteam_MSG_VIDEO: Superteam video message, corresponding to is team ID CHATROOM_MSG_VIDEO: chat room video message, corresponding to is chat room id |
audioUrl | String | Audio/video file download address |
from | String | Account of message sender |
to | String | Message recipient, see type field description for details |
serverMsgId | String | Server message ID |
clientMsgId | String | Client message id |
yidunRes | String | GuardEase anti-spam results, see GuardEase document for details |
peer-to-peer read receipt message delivery
16. "eventType"="30"
-
Example - peer-to-peer message read receipt message delivery:
16.1. HTTP example
16.2. cURL example
16.3. JSON field in message body
HTTP example
httpPOST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
Content-Type: application/json
CurTime: 1440570500855 //The current UTC timestamp, in milliseconds counted since January 1, 1970 at 0:00:0 (String)
MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx //MD5 value calculated based on the request body of the request.
CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01
{"objects":"[{\"toAccount\":\"test100\",\"clientType\":\"AOS\",\"fromAccount\":\"test101\",\"msgidClient\":\"076a5519-59c0-42c9-916d-9652ab390310\",\"timestamp\":1578551421737}]","eventType":"30"}
cURL example
curlcurl -X POST -H "Content-Type: application/json" -H "CurTime: 1440570500855" -H "MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01" -d '{"objects":"[{\"toAccount\":\"test100\",\"clientType\":\"AOS\",\"fromAccount\":\"test101\",\"msgidClient\":\"076a5519-59c0-42c9-916d-9652ab390310\",\"timestamp\":1578551421737}]","eventType":"30"}' 'http://yunxinservice.com.cn/receiveMsg.action'
Fields in the JSON data in the message body
javaPlease pay attention to null judgment of each field. The following are general required fields: eventType, fromAccount, toAccount, clientType, timestamp
Name | Type | Description |
---|---|---|
eventType | String | Cc event type |
fromAccount | String | Accounts having the message read tag |
toAccount | String | Accounts that have received the message read notification (i.e. accounts of peer-to-peer message sender) |
clientType | String | Sender's client type AOS, IOS, PC, WINPHONE, WEB, REST, string type |
msgidClient | String | Client message ID |
timestamp | String | Timestamp of message read event |
Independent signal message delivery
17. "eventType"="31"
-
Example - independent signal message delivery:
17.1. HTTP example
17.2. cURL example
17.3. JSON field in message body
HTTP example
httpPOST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
Content-Type: application/json
CurTime: 1440570500855 //The current UTC timestamp, in milliseconds counted since January 1, 1970 at 0:00:0 (String)
MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx //MD5 value calculated based on the request body of the request.
CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01
{"type":"CREATE_ROOM","channelId":"xxxx","channelName":"abc","createTime":"1234","creator":"aaa","ext":"aaa","eventType":"31"}
cURL example
curlcurl -X POST -H "Content-Type: application/json" -H "CurTime: 1440570500855" -H "MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01" -d '{"type":"CREATE_ROOM","channelId":"xxxx","channelName":"abc","createTime":"1234","creator":"aaa","ext":"aaa","eventType":"31"}' 'http://yunxinservice.com.cn/receiveMsg.action'
Fields in the JSON data in the message body
javaPlease pay attention to the null judgment of each field. Generally speaking, only eventType, type, channalId are required
Name | Type | Description |
---|---|---|
eventType | String | message delivery for event type, 31 indicates independent signaling message delivery |
type | String | Independent signaling message delivery for types include: CREATE_ROOM, CLOSE_ROOM, LEAVE_ROOM, JOIN_ROOM, INVITE, CANCEL_INVITE, ACCEPT, REJECT, CTRL |
channelId | String | ChannelId of the room |
channelName | String | ChannelName of the room |
createTime | String | Room creation time |
creator | String | Room creator |
ext | String | Extension field |
from | String | Operator |
to | String | Operation recipient |
timestamp | String | Operation time |
attachExt | String | Notification extension field |
isSave | String | Whether to enable offline save, true/false |
uid | String | uid, returned when joining a room |
requestId | String | Request id, included when inviting or cancelling/accepting/rejecting invitation |
needPush | String | Whether third-party push is needed, true/false, included when inviting |
pushTitle | String | Third-party push title, included when inviting |
pushContent | String | Third-party push content, included when inviting |
pushPayload | String | Third party push extension field, included when inviting |
needBadge | String | Whether the third-party push needs to be included in unread count, true/false, included when inviting |
Upload task message delivery
18. "eventType"="36"
-
Example - upload task message delivery:
18.1. HTTP example
18.2. cURL example
18.3. JSON field in message body
HTTP example
httpPOST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
Content-Type: application/json
CurTime: 1440570500855 //The current UTC timestamp, in milliseconds counted since January 1, 1970 at 0:00:0 (String)
MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx //MD5 value calculated based on the request body of the request.
CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01
{"type":"1","uploadInfo":{"uploadMsg":"attach","sdkLogUrl":"https://nim-nosdn.netease.im/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"},"eventType":"36"}
cURL example
curlcurl -X POST -H "Content-Type: application/json" -H "CurTime: 1440570500855" -H "MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01" -d '{"type":"1","uploadInfo":{"uploadMsg":"attach","sdkLogUrl":"https://nim-nosdn.netease.im/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"},"eventType":"36"}' 'http://yunxinservice.com.cn/receiveMsg.action'
Fields in the JSON data in the message body
Name | Type | Description |
---|---|---|
eventType | String | Cc event type, 36 indicates Cc for upload task |
type | String | Upload task type: 1: upload SDK log |
uploadInfo | String | Specific information uploaded |
21. "eventType"="42"
-
Example - keep-alive connection and heartbeats:
21.1. HTTP example
21.2. cURL example
21.3. JSON field in message body
HTTP example
httpPOST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
Content-Type: application/json
CurTime: 1440570500855 //The current UTC timestamp, in milliseconds counted since January 1, 1970 at 0:00:0 (String)
MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx //MD5 value calculated based on the request body of the request.
CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01
{"clientType":"PC","consid":"e824d8aa-8b07-4684-89c8-574fc73fd140","clientIp":"183.136.182.138","customTag":"PC","clientPort":"44772","accid":"qdf666","eventType":"42","deviceId":"71054493e01cb62968f4914a20078409ab3719357756e05da99e5563299550a9","timestamp":"1614687765251"}
cURL example
curlcurl -X POST -H "Content-Type: application/json" -H "CurTime: 1440570500855" -H "MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01" -d '{"clientType":"PC","consid":"e824d8aa-8b07-4684-89c8-574fc73fd140","clientIp":"183.136.182.138","customTag":"PC","clientPort":"44772","accid":"qdf666","eventType":"42","deviceId":"71054493e01cb62968f4914a20078409ab3719357756e05da99e5563299550a9","timestamp":"1614687765251"}' 'http://yunxinservice.com.cn/receiveMsg.action'
Fields in the JSON data in the message body
Name | Type | Description |
---|---|---|
eventType | String | message delivery for event type, 42 indicates message delivery for for long connection heartbeat |
accid | String | CommsEase accid |
consid | String | Connection number of the long connection |
clientIp | String | Client IP |
clientPort | String | Client port |
clientType | String | Client type |
deviceId | String | Device ID |
timestamp | String | Timestamp |