消息抄送

消息抄送功能概述

说明

1、网易云信服务器可以通过消息抄送功能,将消息数据和事件通知等实时同步(云信发出HTTP-POST请求,用JSON格式的body来承载实际的内容)给开发者预设的服务器。请前往网易云信控制台 > 通信与视频(云信) > 选择对应的应用 > 消息抄送配置 > 设置接收抄送的服务器地址。抄送地址支持httphttps,如果是https地址,开发者需要保证https证书的有效性,且配置时需携带http://https://前缀。抄送地址支持IP和域名。

2、输入有效的地址后,请点击确定按钮进行地址校验。校验的过程是云信服务器会往该地址post一条内容为空的请求(header见下方抄送HTTP Header定义,body为json格式,内容为空,即{}),如果在5秒内收到该地址返回HTTP 200状态码,则校验成功。若发现校验不成功,可以使用postman等工具辅助自测。

3、地址校验通过后,可以勾选需要的抄送信息。部分功能需要联系商务经理申请开通后方可勾选,详见各自抄送类型的说明。完成后,当应用内发生对应的事件或产生对应的消息,开发者即可通过解析来自云信的post请求来获取内容。

4、消息抄送的超时时间是5秒,如果在5秒内收到开发者服务器返回HTTP 200HTTP 500状态码,则认为消息抄送成功,否则认为抄送失败。如果开发者在接收到消息之后,会做比较耗时的操作(例如DB入库等)的话,建议将该接口做成异步机制(例如可以将消息先存到MQ中),以免被网易云信判定为超时。若有特殊需求不能丢弃消息抄送,请联系商务经理开通高保障抄送。开通后,如果抄送失败,网易云信服务器将会尝试重新抄送一定次数(目前最多1000次)。如果开发者接收消息抄送的接口在一段时间内持续无法响应,网易云信服务器支持将最多50万条消息缓存下来,待开发者消息消息接收接口恢复后,手动提交任务重新进行抄送。

5、考虑到网络环境的不稳定,为了确保开发者的消息接口能收到抄送的消息,网易云信可能会重复发送同一条消息,建议开发者对所收到的消息与事件通知进行一定的去重操作

6、在消息抄送服务中,post请求的header中的CheckSum = sha1(AppSecret + MD5 + CurTime), 其中AppSecretMD5CurTime均为String类型。在验证数据是否在传输过程中被篡改时,需要计算验证MD5值是否被修改,以及计算验证CheckSum。AppSecret值为开发者的AppSecret(请勿与AppKey混淆), MD5值为根据request body计算出来的值, 即MD5 = md5(request body)

7、特别的,对于部分抄送类型(如API发消息、SDK发消息等),可以在发消息的参数里设置环境变量,服务器将根据环境抄送到不同的地址,环境和抄送地址的映射关系配置请联系商务经理。

8、抄送的Content-Typeapplication/json,而非application/x-www-form-urlencoded,请注意区分解析方式

抄送HTTP Header定义

Header 说明
AppKey 抄送事件所属的云信应用Appkey
CurTime 当前UTC时间戳,从1970年1月1日0点0 分0 秒开始到现在的毫秒数
CheckSum sha1(AppSecret + MD5 + CurTime)
MD5 md5(request body)

MD5值计算举例

String requestBody = "{}";
String MD5 = CheckSumBuilder.getMD5(requestBody); //参考 接口概述 -> API checksum校验 部分

CheckSum值计算举例

String AppSecret = "90u757h67n87"; //注意:此处是AppSecret,不是AppKey。
String MD5 = "9894907e4ad9de4678091277509361f7";
String CurTime = "1440570500855";  ////当前UTC时间戳,从1970年1月1日0点0 分0 秒开始到现在的毫秒数(String)
String CheckSum = CheckSumBuilder.getCheckSum(AppSecret, MD5, CurTime); //参考 接口概述 -> API checksum校验 部分

抄送消息类型

目前包含15类:

1). "eventType"="1", 表示CONVERSATION消息,即会话类型的消息(目前包括P2P会话内消息与自定义系统通知,群聊会话内消息与自定义系统通知,以及云信内置系统通知)

2). "eventType"="2", 表示LOGIN消息,即用户登录事件的消息

3). "eventType"="3", 表示LOGOUT消息,即用户登出/离线事件的消息

4). "eventType"="4", 表示CHATROOM消息,即聊天室中聊天的消息

5). "eventType"="5", 表示AUDIO/VEDIO/DataTunnel消息,即汇报实时音视频通话时长、白板事件时长的消息

6). "eventType"="6", 表示音视频/白板文件存储信息,即汇报音视频/白板文件的大小、下载地址等消息

7). "eventType"="7", 表示单聊消息撤回抄送

8). "eventType"="8", 表示群聊消息撤回抄送 "eventType"="25", 表示超大群聊消息撤回抄送

9). "eventType"="9", 表示CHATROOM_INOUT信息,即汇报主播或管理员进出聊天室事件消息

10). "eventType"="10" / "type":"CALL", 表示ECP_CALLBACK信息,即汇报专线电话通话结束回调抄送的消息

11). "eventType"="11", 表示SMS_CALLBACK信息,即汇报短信回执抄送的消息

12). "eventType"="12", 表示SMS_REPLY信息,即汇报短信上行消息

13). "eventType"="13", 表示AVROOM_INOUT信息,即汇报用户进出音视频/白板房间的消息

14). "eventType"="14", 表示CHATROOM_QUEUE_OPERATE信息,即汇报聊天室队列操作的事件消息

15). "eventType"="20", 表示易盾异步反垃圾结果信息,仅抄送反垃圾结果为“命中”状态的详细信息。目前支持点对点、群聊、聊天室三类语音、视频消息

16). "eventType"="21", 表示G2的AUDIO/VEDIO消息,即汇报G2实时音视频通话时长

17). "eventType"="22", 表示G2的音视频文件存储信息,即汇报G2音视频文件的大小、下载地址等消息

18). "eventType"="23", 表示G2的用户进出1音视频房间的消息

19). "eventType"="26", 表示音视频房间结束的消息

20). "eventType"="27", 表示G2音视频房间结束的消息

21). "eventType"="28", 表示音视频房间开始的消息

22). "eventType"="29", 表示G2音视频房间开始的消息

23). "eventType"="30", 表示点对点消息已读回执抄送

24). "eventType"="31", 表示独立信令抄送

25). "eventType"="35", 表示实时音RTMP事件抄送

26). "eventType"="36", 表示上传任务抄送

会话类型消息抄送

假设第三方开发者的消息接收地址为:http://yunxinservice.com.cn/receiveMsg.action.以下的抄送地址均假设为此接口,不再赘述。

1. "eventType"="1"。目前包括P2P聊天消息,群组聊天消息,群组操作,好友操作等。网易云控制台上细分为三类:1 P2P聊天消息、群组聊天消息与系统通知消息。分别对应消息体convType属性为PERSON与TEAM/SUPER_TEAM与CUSTOM_PERSON/CUSTOM_TEAM。 

HTTP示例

以下为云信向开发者的服务器发起HTTP-POST请求的示例:

POST  /receiveMsg.action   HTTP/1.1
Host:  yunxinservice.com.cn
Content-Type:  application/json
CurTime: 1440570500855    //当前UTC时间戳,从1970年1月1日0点0 分0 秒开始到现在的毫秒数(String)
MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx   //根据请求中的request body计算出来的MD5值。
CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01

{"attach":"thisisattach","body":"hello","convType":"PERSON","eventType":"1","fromAccount":"111","fromClientType":"IOS","fromDeviceId":"thisisfromdeviceid","fromNick":"mike","msgTimestamp":"1441977355557","msgType":"TEXT","msgidClient":"1234567","msgidServer":"3456789","resendFlag":"0","to":"222"}

cURL示例

curl -X POST -H "Content-Type: application/json" -H "CurTime: 1440570500855" -H "MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01" -d '{"attach":"thisisattach","body":"hello","convType":"PERSON","eventType":"1","fromAccount":"111","fromClientType":"IOS","fromDeviceId":"thisisfromdeviceid","fromNick":"mike","msgTimestamp":"1441977355557","msgType":"TEXT","msgidClient":"1234567","msgidServer":"3456789","resendFlag":"0","to":"222"}' 'http://yunxinservice.com.cn/receiveMsg.action'

消息体中的JSON字段说明

会话类型消息中,并不是每个字段都会一定抄送,请注意对各字段的判空处理。
以下为一般情况下必有的字段:
eventType、convType、tofromAccount、msgTimestamp、msgType、msgidClient、msgidServer
名称类型说明
eventType String值为1,表示是会话类型的消息
convType String会话具体类型:
PERSON(点对点会话内消息)、TEAM(群聊会话内消息)、SUPER_TEAM(超大群聊会话内消息)
CUSTOM_PERSON(点对点自定义系统通知及内置好友系统通知)、CUSTOM_TEAM(群聊自定义系统通知及内置群聊系统通知),字符串类型
to String若convType为PERSON或CUSTOM_PERSON,则to为消息接收者的用户账号,字符串类型;
若convType为TEAM或SUPER_TEAM或CUSTOM_TEAM,则to为tid,即群id,可转为Long型数据
fromAccount String消息发送者的用户账号,字符串类型
fromClientType String发送客户端类型: AOS、IOS、PC、WINPHONE、WEB、REST,字符串类型
fromDeviceId String发送设备id,字符串类型
fromNick String发送方昵称,字符串类型
msgTimestamp String消息发送时间,字符串类型
msgType String convType为PERSON、TEAM、SUPER_TEAM时对应的消息类型:
TEXT //文本消息
PICTURE //图片消息
AUDIO //语音消息
VIDEO //视频消息
LOCATION //地理位置消息
NOTIFICATION //群通知消息,如群资料更新通知、群解散通知等。
FILE //文件消息
TIPS //提示消息
CUSTOM //自定义消息

convType为CUSTOM_PERSON对应的通知消息类型:
FRIEND_ADD //对方 请求/已经 添加为好友
FRIEND_DELETE //被对方删除好友
CUSTOM_P2P_MSG //点对点自定义系统通知

convType为CUSTOM_TEAM对应的通知消息类型(请注意与NOTIFICATION区分):
TEAM_APPLY //申请入群
TEAM_APPLY_REJECT //拒绝入群申请
TEAM_INVITE //邀请进群
TEAM_INVITE_REJECT //拒绝邀请
CUSTOM_TEAM_MSG //群组自定义系统通知
SUPERTEAM_APPLY //超大群申请入群 SUPERTEAM_APPLY_REJECT //超大群拒绝入群申请 SUPERTEAM_INVITE //超大群邀请进群 SUPERTEAM_INVITE_REJECT //超大群拒绝进群邀请 CUSTOM_SUPERTEAM_MSG //超大群组自定义系统通知
body String消息内容,字符串类型。针对聊天室消息而言,无此字段。内容转由attach承载。
attach String附加消息,字符串类型
msgidClient String客户端生成的消息id,仅在convType为PERSON或TEAM或SUPER_TEAM含此字段,字符串类型
msgidServer String服务端生成的消息id,可转为Long型数据
resendFlag String重发标记:0不是重发, 1是重发。仅在convType为PERSON或TEAM或SUPER_TEAM时含此字段,可转为Integer类型数据
customSafeFlag String自定义系统通知消息是否存离线:0:不存,1:存。
仅在convType为CUSTOM_PERSON或CUSTOM_TEAM时含此字段,可转为Integer类型数据
customApnsText String自定义系统通知消息推送文本。仅在convType为CUSTOM_PERSON或CUSTOM_TEAM时含此字段,字符串类型
tMembers String 当前群成员accid列表。仅在群成员不超过200人,且convType为TEAM或CUSTOM_TEAM时包含此字段,字符串类型。
tMembers格式举例:
{
... // 其他字段
"tMembers":"[123, 456]" //相关的accid为 123 和 456
}
ext String消息扩展字段
antispam String标识是否被反垃圾,仅在被反垃圾时才有此字段,可转为Boolean类型数据
yidunRes String易盾反垃圾的原始处理细节,只有接入了相关功能易盾反垃圾的应用才会有这个字段。详见以下1.4.5.1、P2P:文本消息 和 1.4.5.2、P2P:图片消息的举例说明。

该字段中子字段释义如下:
yidunBusType:0:易盾文本反垃圾业务;1、易盾图片反垃圾业务;2、用户资料反垃圾业务;3、用户头像反垃圾业务。

action:处理结果:检测结果,0:通过,1:嫌疑,2:不通过。 (只有yidunBusType为0或2时,抄送时才有此字段)

labels:具体的反垃圾判断细节:
文本类反垃圾参考:
http://support.dun.163.com/documents/2018041901?docId=150425947576913920 labels字段的释义
图片类反垃圾参考:
http://support.dun.163.com/documents/2018041902?docId=150429557194936320 labels字段的释义
blacklist String标识点对点消息是否黑名单,仅在消息发送方被拉黑时才有此字段,可转为Boolean类型数据
ip String消息发送方的客户端IP地址(仅SDK发送的消息才有该字段)
port String消息发送方的客户端端口号(仅SDK发送的消息才有该字段)

消息抄送详细示例

1.相关字段释义
2.普通群相关示例
3.高级群相关示例
4.超大群相关示例
5.好友相关示例
6.点对点消息相关示例
7.群组消息相关示例
8.超大群组消息相关示例

相关字段释义
普通群和高级群和超大群相关消息抄送中部分字段的格式定义如下:
———————————————————————————————————————————————————————————————
attach字段中tinfo字段的定义,为JSONObject:
    //群信息

    "tinfo": {
        "1":"群组id,可转为Long型",
        "3":"群名称",
        "4":"群类型,0表示普通群,1表示高级群,超大群未定义",
        "5":"创建者用户帐号",
        "7":"群公告等各种属性",
        "8":"群有效标记,0表示无效,1表示有效",
        "9":"群有效成员个数",
        "10":"群组成员列表更新的时间戳,精确到毫秒",
        "11":"创建时间,精确到毫秒",
        "12":"更新时间,精确到毫秒",
        "14":"群介绍",
        "15":"群公告,为JSONArray的toString,格式参考下文",
        "16":"群属性,0表示入群不需要申请,1表示入群需要申请",
        "18":"第三方扩展字段",
        "19":"第三方服务器扩展字段",
        "20":"群头像",
        "21":"被邀请人同意方式", 0:需要统一(默认),1:不需要同意,
        "22":"谁可以邀请他人入群", 0:管理员(默认),1:所有人,
        "23":"谁可以修改群资料", 0:管理员(默认),1:所有人,
        "24":"谁可以更新群自定义属性"0:管理员(默认),1:所有人
    }   

tinfo中"15"群公告字段的格式如下:
    "tinfo": {
        "15": "
         [
            {
                "title":"这是群公告标题",
                "content":"这是群公告内容",
                "creator":"群公告发表者",
                "time":1457075964         //群公告发表时间,10位时间戳,精确到秒
            },
            {}
         ]
        ",
        //其他的字段
    }
———————————————————————————————————————————————————————————————
attach字段中uinfos字段的定义,为JSONArray:
    //用户信息
    "uinfos": [
        {
            "1":"用户帐号",
            "3":"用户昵称",
            "4":"用户头像地址",
            "5":"个性签名",
            "6":"性别",
            "7":"邮箱",
            "8":"生日",
            "9":"手机号",
            "10":"扩展字段",
            "12":"创建时间",
            "13":"更新时间"
        },
        {}
    ]
———————————————————————————————————————————————————————————————
attach字段中id字段的释义:
0:TEAM_INVITE,即群拉人
1:TEAM_KICK,即群踢人
2:TEAM_LEAVE,即退出群
3:TEAM_UPDATE,即更新群信息
4:TEAM_DISMISS,即群解散
5:TEAM_APPLY_PASS,即群申请加入成功
6:TEAM_OWNER_TRANSFER,即群主退群并移交群主
7:TEAM_ADD_MANAGER,即增加管理员
8:TEAM_REMOVE_MANAGER,即删除管理员
9:TEAM_INVITE_ACCEPT,即群接受邀请进群
10:TEAM_MUTE_TLIST,即禁言群成员
401:SUPER_TEAM_INVITE,超大群拉人
402:SUPER_TEAM_KICK,超大群踢人
403:SUPER_TEAM_LEAVE,超大群退群
404:SUPER_TEAM_UPDATE_TINFO,超大群修改群信息
405:SUPER_TEAM_DISMISS,超大群解散
406:SUPER_TEAM_CHANGE_OWNER,超大群移交群主
407:SUPER_TEAM_ADD_MANAGER,超大群添加管理员
408:SUPER_TEAM_REMOVE_MANAGER,超大群删除管理员
409:SUPER_TEAM_MUTE_TLIST,超大群禁言群成员
410:SUPER_TEAM_APPLY_PASS,超大群申请成功进群
411:SUPER_TEAM_INVITE_ACCEPT,超大群接受邀请进群
———————————————————————————————————————————————————————————————
注意:没有给出定义的字段都是第三方无需关心的字段,可忽略
普通群相关示例
创建普通群
抄送示例:
{"attach":"{\"data\":{\"ids\":[\"wangwu\",\"zhaoliu\",\"lisi\"],\"tinfo\":{\"1\":\"11927\",\"10\":\"1458886362629\",\"11\":\"1458886362629\",\"12\":\"1458886362629\",\"16\":\"0\",\"17\":\"0\",\"2\":\"11011\",\"21\":\"0\",\"22\":\"0\",\"23\":\"0\",\"24\":\"0\",\"3\":\"普通群\",\"4\":\"0\",\"5\":\"zhangsan\",\"6\":\"10000\",\"8\":\"1\",\"9\":\"4\"},\"uinfos\":[{\"1\":\"wangwu\",\"11\":\"236911\",\"12\":\"1457417052774\",\"13\":\"1457491548992\",\"2\":\"11011\",\"3\":\"wangwu\",\"6\":\"0\"},{\"1\":\"zhaoliu\",\"11\":\"237017\",\"12\":\"1457492303776\",\"13\":\"1457492303776\",\"2\":\"11011\",\"3\":\"zhaoliu\",\"6\":\"0\"},{\"1\":\"lisi\",\"11\":\"142916\",\"12\":\"1438740370586\",\"13\":\"1438740370586\",\"2\":\"11011\",\"3\":\"lisi\",\"6\":\"0\"},{\"1\":\"zhangsan\",\"11\":\"142915\",\"12\":\"1438738423546\",\"13\":\"1456885865056\",\"2\":\"11011\",\"3\":\"zhangsan\",\"4\":\"http://b12026.nos.netease.com/MTAxMTAxMA==/bmltYV8xNDI5MTZfMTQzODg2NDI4ODE0Ml81NjM3ZTIxMC1iMjE5LTRhYjgtOGZlOS02MzBjZWFjYmMwZDE=\",\"6\":\"1\"}]},\"id\":0}","convType":"TEAM","eventType":"1","fromAccount":"zhangsan","fromClientType":"IOS","msgTimestamp":"1458886362746","msgType":"NOTIFICATION","msgidClient":"731f5145-0f98-4ae2-aaa4-ee0f210507d2","msgidServer":"800407420929","resendFlag":"0","tMembers":"[zhangsan]","to":"11927"}

attach字段释义
{
  "data": {
    //ids表示创建普通群时被拉入普通群的用户账号
    "ids":[
        "wangwu","zhaoliu","lisi"
    ],
    //群信息,具体参考tinfo字段的定义
    "tinfo": {

    },
    //创建普通群时被拉入普通群的用户,以及普通群创建者的用户帐号信息
    //具体参考uinfos字段的定义
    "uinfos": [
        {},
        {}
    ]
  },
  "id": 0    //普通群拉人,创建普通群时需拉人
}

tMembers字段释义:
{
    "tMembers":"[zhangsan]" //普通群创建者
}
修改普通群信息
抄送示例:
{"attach":"{\"data\":{\"tinfo\":{\"1\":\"11927\",\"3\":\"修改后的普通群名称\"},\"uinfos\":[{\"1\":\"zhangsan\",\"11\":\"142915\",\"12\":\"1438738423546\",\"13\":\"1456885865056\",\"2\":\"11011\",\"3\":\"zhangsan\",\"4\":\"http://b12026.nos.netease.com/MTAxMTAxMA==/bmltYV8xNDI5MTZfMTQzODg2NDI4ODE0Ml81NjM3ZTIxMC1iMjE5LTRhYjgtOGZlOS02MzBjZWFjYmMwZDE=\",\"6\":\"1\"}]},\"id\":3}","convType":"TEAM","eventType":"1","fromAccount":"zhangsan","fromClientType":"IOS","msgTimestamp":"1458886916106","msgType":"NOTIFICATION","msgidClient":"dd741c41-0a3a-4ef4-900b-ffbceffe3d22","msgidServer":"800407420931","resendFlag":"0","tMembers":"[zhaoliu, wangwu, zhangsan, lisi]","to":"11927"}

attach字段释义
{
  "data": {
    //群信息
    //具体参考tinfo字段的定义
    "tinfo": {

    },
    //创建普通群时被拉入普通群的用户,以及普通群创建者的用户帐号信息
    //具体参考uinfos字段的定义
    "uinfos": [
        {},
        {}
    ]
  },
  "id": 3    //修改普通群信息
}

tMembers字段释义:
{
    "tMembers":"[zhaoliu, wangwu, zhangsan, lisi]" //普通群内成员
}
普通群拉人
抄送示例:
{"attach":"{\"data\":{\"ids\":[\"lisi\"],\"tinfo\":{\"1\":\"11927\",\"10\":\"1458887669091\",\"11\":\"1458886362629\",\"12\":\"1458887669121\",\"16\":\"0\",\"17\":\"0\",\"2\":\"11011\",\"21\":\"0\",\"22\":\"0\",\"23\":\"0\",\"24\":\"0\",\"3\":\"修改后的普通群名称\",\"4\":\"0\",\"5\":\"zhangsan\",\"6\":\"10000\",\"8\":\"1\",\"9\":\"3\"},\"uinfos\":[{\"1\":\"lisi\",\"11\":\"142916\",\"12\":\"1438740370586\",\"13\":\"1438740370586\",\"2\":\"11011\",\"3\":\"lisi\",\"6\":\"0\"},{\"1\":\"zhangsan\",\"11\":\"142915\",\"12\":\"1438738423546\",\"13\":\"1456885865056\",\"2\":\"11011\",\"3\":\"zhangsan\",\"4\":\"http://b12026.nos.netease.com/MTAxMTAxMA==/bmltYV8xNDI5MTZfMTQzODg2NDI4ODE0Ml81NjM3ZTIxMC1iMjE5LTRhYjgtOGZlOS02MzBjZWFjYmMwZDE=\",\"6\":\"1\"}]},\"id\":0}","convType":"TEAM","eventType":"1","fromAccount":"zhangsan","fromClientType":"IOS","msgTimestamp":"1458887669137","msgType":"NOTIFICATION","msgidClient":"e5fe2160-de34-4e1c-a87b-7f298aa7b7b2","msgidServer":"800407420940","resendFlag":"0","tMembers":"[zhaoliu, zhangsan]","to":"11927"}

attach字段释义
{
  "data": {
      //ids表示被加入的用户帐号
      "ids":[
          "lisi"
      ],
      //群组信息
    //具体参考tinfo字段的定义
    "tinfo": {

    },
    //被加入的用户,以及操作人的用户信息
    //具体参考uinfos字段的定义
    "uinfos": [
        {},
        {}
    ]
  },
  "id": 0    //群拉人
}

tMembers字段释义:
{
    "tMembers":"[zhaoliu, zhangsan]" //普通群内原有成员,不包含被拉人的用户
}
普通群踢人
抄送示例:
{"attach":"{\"data\":{\"ids\":[\"wangwu\"],\"tinfo\":{\"1\":\"11927\",\"10\":\"1458887253106\",\"11\":\"1458886362629\",\"12\":\"1458887253159\",\"16\":\"0\",\"17\":\"0\",\"2\":\"11011\",\"21\":\"0\",\"22\":\"0\",\"23\":\"0\",\"24\":\"0\",\"3\":\"修改后的普通群名称\",\"4\":\"0\",\"5\":\"zhangsan\",\"6\":\"10000\",\"8\":\"1\",\"9\":\"3\"},\"uinfos\":[{\"1\":\"wangwu\",\"11\":\"236911\",\"12\":\"1457417052774\",\"13\":\"1457491548992\",\"2\":\"11011\",\"3\":\"wangwu\",\"6\":\"0\"},{\"1\":\"zhangsan\",\"11\":\"142915\",\"12\":\"1438738423546\",\"13\":\"1456885865056\",\"2\":\"11011\",\"3\":\"zhangsan\",\"4\":\"http://b12026.nos.netease.com/MTAxMTAxMA==/bmltYV8xNDI5MTZfMTQzODg2NDI4ODE0Ml81NjM3ZTIxMC1iMjE5LTRhYjgtOGZlOS02MzBjZWFjYmMwZDE=\",\"6\":\"1\"}]},\"id\":1}","convType":"TEAM","eventType":"1","fromAccount":"zhangsan","fromClientType":"IOS","msgTimestamp":"1458887253168","msgType":"NOTIFICATION","msgidClient":"693b8b53-3d0e-445e-b086-debaffa7a376","msgidServer":"800407420932","resendFlag":"0","tMembers":"[zhaoliu, wangwu, zhangsan, lisi]","to":"11927"}

attach字段释义
{
  "data": {
      //ids表示被踢出普通群的用户帐号
      "ids":[
          "wangwu"
      ],
      //群信息
    //具体参考tinfo字段的定义
    "tinfo": {

    },
    //被踢的用户,以及操作人的用户信息
    //具体参考uinfos字段的定义
    "uinfos": [
        {},
        {}
    ]
  },
  "id": 1    //普通群踢人
}

tMembers字段释义:
{
    "tMembers":"[zhaoliu, wangwu, zhangsan, lisi]" //普通群内成员,包含被踢出的用户
}
普通群退群
抄送示例:
{"attach":"{\"data\":{\"tinfo\":{\"1\":\"11927\",\"10\":\"1458887477194\",\"11\":\"1458886362629\",\"12\":\"1458887477199\",\"16\":\"0\",\"17\":\"0\",\"2\":\"11011\",\"21\":\"0\",\"22\":\"0\",\"23\":\"0\",\"24\":\"0\",\"3\":\"修改后的普通群名称\",\"4\":\"0\",\"5\":\"zhangsan\",\"6\":\"10000\",\"8\":\"1\",\"9\":\"2\"},\"uinfos\":[{\"1\":\"zhangsan\",\"11\":\"142915\",\"12\":\"1438738423546\",\"13\":\"1456885865056\",\"2\":\"11011\",\"3\":\"zhangsan\",\"4\":\"http://b12026.nos.netease.com/MTAxMTAxMA==/bmltYV8xNDI5MTZfMTQzODg2NDI4ODE0Ml81NjM3ZTIxMC1iMjE5LTRhYjgtOGZlOS02MzBjZWFjYmMwZDE=\",\"6\":\"1\"}]},\"id\":2}","convType":"TEAM","eventType":"1","fromAccount":"zhangsan","fromClientType":"IOS","fromDeviceId":"","fromNick":"zhangsan","msgTimestamp":"1458887477210","msgType":"NOTIFICATION","msgidClient":"4bcad22a-12de-4691-9ba7-fa112aa46ea7","msgidServer":"800407420936","resendFlag":"0","tMembers":"[wangwu, zhaoliu, zhangsan, lisi]","to":"11927"}

attach字段释义
{
  "data": {
    //群信息
    //具体参考tinfo字段的定义
    "tinfo": {

    },
    //退出普通群的用户信息
    //具体参考uinfos字段的定义
    "uinfos": [
        {}
    ]
  },
  "id": 2    //退出普通群
}

tMembers字段释义:
{
    "tMembers":"[zhaoliu, wangwu, zhangsan, lisi]" //普通群内成员,包含退出的用户
}
高级群相关示例
创建高级群
抄送示例:
{"attach":"{\"tinfo\":{\"1\":\"11620\",\"10\":\"1456802852027\",\"11\":\"1456802852027\",\"12\":\"1456802852027\",\"16\":\"0\",\"17\":\"0\",\"2\":\"11011\",\"21\":\"0\",\"22\":\"0\",\"23\":\"0\",\"24\":\"0\",\"3\":\"高级群\",\"4\":\"1\",\"5\":\"zhangsan\",\"6\":\"10\",\"8\":\"1\",\"9\":\"1\"}}","body":"邀请你加入群组","convType":"CUSTOM_TEAM","customSafeFlag":"0","eventType":"1","fromAccount":"zhangsan","msgTimestamp":"1456802852094","msgType":"TEAM_INVITE","msgidServer":"371929","tMembers":"[lisi]","to":"11620"}

attach字段释义
{
    //群信息
    //具体参考tinfo字段的定义
    "tinfo": {

    }
}
解散高级群
抄送示例:
{"attach":"{\"data\":{\"uinfos\":[{\"1\":\"zhangsan\",\"11\":\"142915\",\"12\":\"1438738423546\",\"13\":\"1446624332920\",\"2\":\"11011\",\"3\":\"zhangsan\",\"4\":\"http://b12026.nos.netease.com/MTAxMTAxMA==/bmltYV8xNDI5MTZfMTQzODg2NDI4ODE0Ml81NjM3ZTIxMC1iMjE5LTRhYjgtOGZlOS02MzBjZWFjYmMwZDE=\",\"6\":\"0\"}]},\"id\":4}","convType":"TEAM","eventType":"1","fromAccount":"zhangsan","fromClientType":"IOS","fromNick":"zhangsan","msgTimestamp":"1456810468999","msgType":"NOTIFICATION","msgidClient":"b697a6b2-be71-47f0-8fc0-3c7ff9b15dda","msgidServer":"779872108546","resendFlag":"0","tMembers":"[zhangsan, lisi]","to":"11621"}

attach字段释义
{
  "data": {
    //解散群的操作人的用户信息
    //具体参考uinfos字段的定义
    "uinfos": [
        {},
        {}
    ]
  },
  "id": 4    //解散群
}

tMembers字段释义:
{
    "tMembers":"[lisi]" //解散高级群时的群内所有成员列表,包含群主
}
高级群邀请他人加群
抄送示例:
{"attach":"{\"tinfo\":{\"1\":\"11623\",\"10\":\"1456817802112\",\"11\":\"1456811497999\",\"12\":\"1456817802112\",\"14\":\"这是群介绍\",\"15\":\"[{\\\"title\\\":\\\"这是群公告标题\\\",\\\"content\\\":\\\"这是群公告内容\\\",\\\"creator\\\":\\\"zhangsan\\\",\\\"time\\\":1457075964}]\",\"16\":\"0\",\"17\":\"0\",\"2\":\"11011\",\"21\":\"0\",\"22\":\"0\",\"23\":\"0\",\"24\":\"0\",\"3\":\"高级群\",\"4\":\"1\",\"5\":\"zhangsan\",\"6\":\"10\",\"8\":\"1\",\"9\":\"1\"}}","body":"邀请你加入群组","convType":"CUSTOM_TEAM","customSafeFlag":"0","eventType":"1","fromAccount":"zhangsan","msgTimestamp":"1456818444874","msgType":"TEAM_INVITE","msgidServer":"373171","tMembers":"[lisi]","to":"11623"}

attach字段释义:
{
  "data": {
    //群信息
    //具体参考tinfo字段的定义
    "tinfo": {

    }
  }
}

tMembers字段释义:
{
    "tMembers":"[zhangsan, lisi]" //被邀请入群的用户列表
}
高级群接受邀请入群
抄送示例:
{"attach":"{\"data\":{\"id\":\"zhangsan\",\"tinfo\":{\"1\":\"11623\",\"10\":\"1456811521765\",\"11\":\"1456811497999\",\"12\":\"1456811521899\",\"14\":\"这是群介绍\",\"15\":\"[{\\\"title\\\":\\\"这是群公告标题\\\",\\\"content\\\":\\\"这是群公告内容\\\",\\\"creator\\\":\\\"zhangsan\\\",\\\"time\\\":1457075964}]\",\"16\":\"0\",\"17\":\"0\",\"2\":\"11011\",\"21\":\"0\",\"22\":\"0\",\"23\":\"0\",\"24\":\"0\",\"3\":\"高级群\",\"4\":\"1\",\"5\":\"zhangsan\",\"6\":\"10\",\"8\":\"1\",\"9\":\"2\"},\"uinfos\":[{\"1\":\"lisi\",\"11\":\"142916\",\"12\":\"1438740370586\",\"13\":\"1438740370586\",\"2\":\"11011\",\"3\":\"lisi\",\"6\":\"0\"},{\"1\":\"zhangsan\",\"11\":\"142915\",\"12\":\"1438738423546\",\"13\":\"1446624332920\",\"2\":\"11011\",\"3\":\"zhangsan\",\"4\":\"http://b12026.nos.netease.com/MTAxMTAxMA==/bmltYV8xNDI5MTZfMTQzODg2NDI4ODE0Ml81NjM3ZTIxMC1iMjE5LTRhYjgtOGZlOS02MzBjZWFjYmMwZDE=\",\"6\":\"0\"}]},\"id\":9}","convType":"TEAM","eventType":"1","fromAccount":"lisi","fromClientType":"IOS","msgTimestamp":"1456811521946","msgType":"NOTIFICATION","msgidClient":"335cf3bb-8efa-4cde-953d-9aa775f1a2b2","msgidServer":"780006326273","resendFlag":"0","tMembers":"[zhangsan, lisi]","to":"11623"}

attach字段释义:
{
  "data": {
    //邀请人
    "id":"邀请人的帐号",
    //群信息
    //具体参考tinfo字段的定义
    "tinfo": {

    },
    //邀请人与被邀请人的用户信息
    //具体参考uinfos字段的定义
    "uinfos": [
        {},
        {}
    ]
  },
  "id": 9    //高级群接受邀请邀请入群
}

tMembers字段释义:
{
    "tMembers":"[zhangsan, lisi]" //群内有效用户帐号列表,包括邀请人和被邀请人
}
高级群拒绝邀请入群
抄送示例:
{"body":"","convType":"CUSTOM_TEAM","customSafeFlag":"0","eventType":"1","fromAccount":"lisi","msgTimestamp":"1456819928681","msgType":"TEAM_INVITE_REJECT","msgidServer":"373998","to":"11623"}
高级群增加管理员
抄送示例:
{"attach":"{\"data\":{\"ids\":[\"lisi\"],\"uinfos\":[{\"1\":\"lisi\",\"11\":\"142916\",\"12\":\"1438740370586\",\"13\":\"1438740370586\",\"2\":\"11011\",\"3\":\"lisi\",\"6\":\"0\"},{\"1\":\"zhangsan\",\"11\":\"142915\",\"12\":\"1438738423546\",\"13\":\"1446624332920\",\"2\":\"11011\",\"3\":\"zhangsan\",\"4\":\"http://b12026.nos.netease.com/MTAxMTAxMA==/bmltYV8xNDI5MTZfMTQzODg2NDI4ODE0Ml81NjM3ZTIxMC1iMjE5LTRhYjgtOGZlOS02MzBjZWFjYmMwZDE=\",\"6\":\"0\"}]},\"id\":7}","convType":"TEAM","eventType":"1","fromAccount":"zhangsan","fromClientType":"IOS","msgTimestamp":"1456813138663","msgType":"NOTIFICATION","msgidClient":"3e3e2efe-4f16-4ac2-8669-a8ee17be80bc","msgidServer":"780006326274","resendFlag":"0","tMembers":"[zhangsan, lisi]","to":"11623"}

attach字段释义:
{
  "data": {
    //邀请人
    "ids":[
        "被设为管理员的用户帐号1",
        "被设为管理员的用户帐号2"
    ],
    //操作人与被操作人的用户信息
    //具体参考uinfos字段的定义
    "uinfos": [
        {},
        {}
    ]
  },
  "id": 7    //高级群增加管理员
}

tMembers字段释义:
{
    "tMembers":"[zhangsan, lisi]" //群内有效用户帐号列表,包括操作人和被操作人
}
高级群删除管理员
抄送示例:
{"attach":"{\"data\":{\"ids\":[\"lisi\"],\"uinfos\":[{\"1\":\"lisi\",\"11\":\"142916\",\"12\":\"1438740370586\",\"13\":\"1438740370586\",\"2\":\"11011\",\"3\":\"lisi\",\"6\":\"0\"},{\"1\":\"zhangsan\",\"11\":\"142915\",\"12\":\"1438738423546\",\"13\":\"1446624332920\",\"2\":\"11011\",\"3\":\"zhangsan\",\"4\":\"http://b12026.nos.netease.com/MTAxMTAxMA==/bmltYV8xNDI5MTZfMTQzODg2NDI4ODE0Ml81NjM3ZTIxMC1iMjE5LTRhYjgtOGZlOS02MzBjZWFjYmMwZDE=\",\"6\":\"0\"}]},\"id\":8}","convType":"TEAM","eventType":"1","fromAccount":"zhangsan","fromClientType":"IOS","msgTimestamp":"1456815660948","msgType":"NOTIFICATION","msgidClient":"a2b8f49a-cc06-4784-a8e4-84b59c9ac85f","msgidServer":"780006326275","resendFlag":"0","tMembers":"[zhangsan, lisi]","to":"11623"}

attach字段释义:
{
  "data": {
    //邀请人
    "ids":[
        "被删除管理员的用户帐号1",
        "被删除管理员的用户帐号2"
    ],
    //操作人与被操作人的用户信息
    //具体参考uinfos字段的定义
    "uinfos": [
        {},
        {}
    ]
  },
  "id": 8    //高级群删除管理员
}

tMembers字段释义:
{
    "tMembers":"[zhangsan, lisi]" //群内有效用户帐号列表,包括操作人和被操作人
}
高级群踢人出群
抄送示例:
{"attach":"{\"data\":{\"ids\":[\"lisi\"],\"tinfo\":{\"1\":\"11623\",\"10\":\"1456816081224\",\"11\":\"1456811497999\",\"12\":\"1456816081359\",\"14\":\"这是群介绍\",\"15\":\"[{\\\"title\\\":\\\"这是群公告标题\\\",\\\"content\\\":\\\"这是群公告内容\\\",\\\"creator\\\":\\\"zhangsan\\\",\\\"time\\\":1457075964}]\",\"16\":\"0\",\"17\":\"0\",\"2\":\"11011\",\"21\":\"0\",\"22\":\"0\",\"23\":\"0\",\"24\":\"0\",\"3\":\"高级群\",\"4\":\"1\",\"5\":\"zhangsan\",\"6\":\"10\",\"8\":\"1\",\"9\":\"1\"},\"uinfos\":[{\"1\":\"lisi\",\"11\":\"142916\",\"12\":\"1438740370586\",\"13\":\"1438740370586\",\"2\":\"11011\",\"3\":\"lisi\",\"6\":\"0\"},{\"1\":\"zhangsan\",\"11\":\"142915\",\"12\":\"1438738423546\",\"13\":\"1446624332920\",\"2\":\"11011\",\"3\":\"zhangsan\",\"4\":\"http://b12026.nos.netease.com/MTAxMTAxMA==/bmltYV8xNDI5MTZfMTQzODg2NDI4ODE0Ml81NjM3ZTIxMC1iMjE5LTRhYjgtOGZlOS02MzBjZWFjYmMwZDE=\",\"6\":\"0\"}]},\"id\":1}","convType":"TEAM","eventType":"1","fromAccount":"zhangsan","fromClientType":"IOS","msgTimestamp":"1456816081368","msgType":"NOTIFICATION","msgidClient":"f3c0437d-fd3c-4900-9b80-ef9c86c1f91f","msgidServer":"780006326276","resendFlag":"0","tMembers":"[zhangsan, lisi]","to":"11623"}

attach字段释义:
{
  "data": {
    //邀请人
    "ids":[
        "被踢出群的用户帐号1",
        "被踢出群的用户帐号2"
    ],
    //群信息
    //具体参考tinfo字段的定义
    "tinfo": {

    },
    //操作人与被操作人的用户信息
    //具体参考uinfos字段的定义
    "uinfos": [
        {},
        {}
    ]
  },
  "id": 1    //高级群踢人出群
}

tMembers字段释义:
{
    "tMembers":"[zhangsan, lisi]" //群内有效用户帐号列表,包括操作人和被操作人
}
高级群申请加入成功(无需加群验证)
抄送示例:
{"attach":"{\"data\":{\"id\":\"lisi\",\"tinfo\":{\"1\":\"11631\",\"10\":\"1457075685304\",\"11\":\"1456823028193\",\"12\":\"1457075963090\",\"14\":\"这是群介绍\",\"15\":\"[{\\\"title\\\":\\\"这是群公告标题\\\",\\\"content\\\":\\\"这是群公告内容\\\",\\\"creator\\\":\\\"zhangsan\\\",\\\"time\\\":1457075964}]\",\"16\":\"0\",\"17\":\"0\",\"2\":\"11011\",\"21\":\"0\",\"22\":\"0\",\"23\":\"0\",\"24\":\"0\",\"3\":\"高级群\",\"4\":\"1\",\"5\":\"zhangsan\",\"6\":\"10\",\"8\":\"1\",\"9\":\"2\"},\"uinfos\":[{\"1\":\"lisi\",\"11\":\"142916\",\"12\":\"1438740370586\",\"13\":\"1438740370586\",\"2\":\"11011\",\"3\":\"lisi\",\"6\":\"0\"},{\"1\":\"lisi\",\"11\":\"142916\",\"12\":\"1438740370586\",\"13\":\"1438740370586\",\"2\":\"11011\",\"3\":\"lisi\",\"6\":\"0\"}]},\"id\":5}","convType":"TEAM","eventType":"1","fromAccount":"lisi","fromClientType":"IOS","msgTimestamp":"1457076245920","msgType":"NOTIFICATION","msgidClient":"39a89280-edda-47ff-8f2a-3a2a9ae03cf4","msgidServer":"780543197222","resendFlag":"0","tMembers":"[zhangsan, lisi]","to":"11631"}

attach字段释义:
{
  "data": {
    //邀请人
    "id":"申请加入成功的用户帐号",
    //群信息
    //具体参考tinfo字段的定义
    "tinfo": {

    },
    //操作人与被操作人的用户信息,
    //此处操作人与被操作人是同一个人,uinfos包含两条同样的信息
    //具体参考uinfos字段的定义
    "uinfos": [
        {},
        {}
    ]
  },
  "id": 5    //高级群申请加入成功
}

tMembers字段释义:
{
    "tMembers":"[zhangsan, lisi]" //群内有效用户帐号列表,包括加入成功的用户
}
申请加入高级群(需要验证)
抄送示例:
{"body":"wangwu申请加群","convType":"CUSTOM_TEAM","customSafeFlag":"0","eventType":"1","fromAccount":"lisi","msgTimestamp":"1456821259709","msgType":"TEAM_APPLY","msgidServer":"375024","tMembers":"[zhangsan, li]","to":"11623"}

tMembers字段释义:
{
    "tMembers":"[zhangsan, lisi]" //群主和管理员帐号
}
允许加群申请
抄送示例:
{"attach":"{\"data\":{\"id\":\"lisi\",\"tinfo\":{\"1\":\"11623\",\"10\":\"1456821386734\",\"11\":\"1456811497999\",\"12\":\"1456821386758\",\"14\":\"这是群介绍\",\"15\":\"[{\\\"title\\\":\\\"这是群公告标题\\\",\\\"content\\\":\\\"这是群公告内容\\\",\\\"creator\\\":\\\"zhangsan\\\",\\\"time\\\":1457075964}]\",\"16\":\"1\",\"17\":\"0\",\"2\":\"11011\",\"21\":\"0\",\"22\":\"0\",\"23\":\"0\",\"24\":\"0\",\"3\":\"高级群\",\"4\":\"1\",\"5\":\"zhangsan\",\"6\":\"10\",\"8\":\"1\",\"9\":\"2\"},\"uinfos\":[{\"1\":\"zhangsan\",\"11\":\"142915\",\"12\":\"1438738423546\",\"13\":\"1446624332920\",\"2\":\"11011\",\"3\":\"zhangsan\",\"4\":\"http://b12026.nos.netease.com/MTAxMTAxMA==/bmltYV8xNDI5MTZfMTQzODg2NDI4ODE0Ml81NjM3ZTIxMC1iMjE5LTRhYjgtOGZlOS02MzBjZWFjYmMwZDE=\",\"6\":\"0\"},{\"1\":\"lisi\",\"11\":\"142916\",\"12\":\"1438740370586\",\"13\":\"1438740370586\",\"2\":\"11011\",\"3\":\"lisi\",\"6\":\"0\"}]},\"id\":5}","convType":"TEAM","eventType":"1","fromAccount":"zhangsan","fromClientType":"IOS","msgTimestamp":"1456821386769","msgType":"NOTIFICATION","msgidClient":"dd36c8a2-30e7-476a-9608-48879f4d3146","msgidServer":"780006326282","resendFlag":"0","tMembers":"[zhangsan, lisi]","to":"11623"}

attach字段释义:
{
  "data": {
    //邀请人
    "id":"申请加群的用户帐号",
    //群信息
    //具体参考tinfo字段的定义
    "tinfo": {

    },
    //操作人与被操作人的用户信息,
    //具体参考uinfos字段的定义
    "uinfos": [
        {},
        {}
    ]
  },
  "id": 5    //高级群申请加入成功
}

tMembers字段释义:
{
    "tMembers":"[zhangsan, lisi]" //群内有效用户帐号列表,包括加入成功的用户
}
拒绝加群申请
抄送示例:
{"attach":"{\"tinfo\":{\"1\":\"11623\",\"10\":\"1456821961295\",\"11\":\"1456811497999\",\"12\":\"1456821961295\",\"14\":\"这是群介绍\",\"15\":\"[{\\\"title\\\":\\\"这是群公告标题\\\",\\\"content\\\":\\\"这是群公告内容\\\",\\\"creator\\\":\\\"zhangsan\\\",\\\"time\\\":1457075964}]\",\"16\":\"1\",\"17\":\"0\",\"2\":\"11011\",\"21\":\"0\",\"22\":\"0\",\"23\":\"0\",\"24\":\"0\",\"3\":\"高级群\",\"4\":\"1\",\"5\":\"zhangsan\",\"6\":\"10\",\"8\":\"1\",\"9\":\"1\"}}","body":"","convType":"CUSTOM_TEAM","customSafeFlag":"0","eventType":"1","fromAccount":"zhangsan","msgTimestamp":"1456822044104","msgType":"TEAM_APPLY_REJECT","msgidServer":"375093","to":"11623"}

attach字段释义:
{
    //群信息
    //具体参考tinfo字段的定义
    "tinfo": {

    }
}
退出高级群
抄送示例:
{"attach":"{\"data\":{\"tinfo\":{\"1\":\"11623\",\"10\":\"1456817802112\",\"11\":\"1456811497999\",\"12\":\"1456817802112\",\"14\":\"这是群介绍\",\"15\":\"[{\\\"title\\\":\\\"这是群公告标题\\\",\\\"content\\\":\\\"这是群公告内容\\\",\\\"creator\\\":\\\"zhangsan\\\",\\\"time\\\":1457075964}]\",\"16\":\"0\",\"17\":\"0\",\"2\":\"11011\",\"21\":\"0\",\"22\":\"0\",\"23\":\"0\",\"24\":\"0\",\"3\":\"高级群\",\"4\":\"1\",\"5\":\"zhangsan\",\"6\":\"10\",\"8\":\"1\",\"9\":\"1\"},\"uinfos\":[{\"1\":\"lisi\",\"11\":\"142916\",\"12\":\"1438740370586\",\"13\":\"1438740370586\",\"2\":\"11011\",\"3\":\"lisi\",\"6\":\"0\"}]},\"id\":2}","convType":"TEAM","eventType":"1","fromAccount":"lisi","fromClientType":"IOS","fromNick":"lisi","msgTimestamp":"1456817802118","msgType":"NOTIFICATION","msgidClient":"9ea8ad94-7b8e-4793-8302-23b554b3d5ca","msgidServer":"780006326278","resendFlag":"0","tMembers":"[zhangsan, lisi]","to":"11623"}

attach字段释义:
{
  "data": {
    //群信息
    //具体参考tinfo字段的定义
    "tinfo": {

    },
    //退出群的用户信息,
    //具体参考uinfos字段的定义
    "uinfos": [
        {},
        {}
    ]
  },
  "id": 2    //退出高级群
}

tMembers字段释义:
{
    "tMembers":"[zhangsan, lisi]" //群内有效用户帐号列表,包括退出群的用户
}
更新高级群
抄送示例:
{"attach":"{\"data\":{\"tinfo\":{\"1\":\"11623\",\"14\":\"这是群介绍\",\"15\":\"[{\\\"title\\\":\\\"这是群公告标题\\\",\\\"content\\\":\\\"这是群公告内容\\\",\\\"creator\\\":\\\"zhangsan\\\",\\\"time\\\":1457075964}]\",\"16\":\"1\"},\"uinfos\":[{\"1\":\"zhangsan\",\"11\":\"142915\",\"12\":\"1438738423546\",\"13\":\"1446624332920\",\"2\":\"11011\",\"3\":\"zhangsan\",\"4\":\"http://b12026.nos.netease.com/MTAxMTAxMA==/bmltYV8xNDI5MTZfMTQzODg2NDI4ODE0Ml81NjM3ZTIxMC1iMjE5LTRhYjgtOGZlOS02MzBjZWFjYmMwZDE=\",\"6\":\"0\"}]},\"id\":3}","convType":"TEAM","eventType":"1","fromAccount":"zhangsan","fromClientType":"IOS","msgTimestamp":"1456822570528","msgType":"NOTIFICATION","msgidClient":"473b64e3-5b76-4fd8-ba74-b29a8ec71f7d","msgidServer":"780006326286","resendFlag":"0","tMembers":"[zhangsan, lisi]","to":"11623"}

attach字段释义:
{
  "data": {
    //群信息
    //具体参考tinfo字段的定义
    "tinfo": {

    },
    //更新群信息的操作人信息,
    //具体参考uinfos字段的定义
    "uinfos": [
        {},
        {}
    ]
  },
  "id": 3    //更新群信息
}

tMembers字段释义:
{
    "tMembers":"[zhangsan, lisi]" //群内有效用户帐号列表,包括更新群的用户
}
移交群主
抄送示例:
{"attach":"{\"data\":{\"id\":\"lisi\",\"tinfo\":{\"1\":\"11631\",\"10\":\"1456823264040\",\"11\":\"1456823028193\",\"12\":\"1456823264170\",\"14\":\"这是群介绍\",\"15\":\"[{\\\"title\\\":\\\"这是群公告标题\\\",\\\"content\\\":\\\"这是群公告内容\\\",\\\"creator\\\":\\\"zhangsan\\\",\\\"time\\\":1457075964}]\",\"16\":\"0\",\"17\":\"0\",\"2\":\"11011\",\"21\":\"0\",\"22\":\"0\",\"23\":\"0\",\"24\":\"0\",\"3\":\"高级群\",\"4\":\"1\",\"5\":\"lisi\",\"6\":\"10\",\"8\":\"1\",\"9\":\"2\"},\"uinfos\":[{\"1\":\"zhangsan\",\"11\":\"142915\",\"12\":\"1438738423546\",\"13\":\"1446624332920\",\"2\":\"11011\",\"3\":\"zhangsan\",\"4\":\"http://b12026.nos.netease.com/MTAxMTAxMA==/bmltYV8xNDI5MTZfMTQzODg2NDI4ODE0Ml81NjM3ZTIxMC1iMjE5LTRhYjgtOGZlOS02MzBjZWFjYmMwZDE=\",\"6\":\"0\"},{\"1\":\"lisi\",\"11\":\"142916\",\"12\":\"1438740370586\",\"13\":\"1438740370586\",\"2\":\"11011\",\"3\":\"lisi\",\"6\":\"0\"}]},\"id\":6}","convType":"TEAM","eventType":"1","fromAccount":"zhangsan","fromClientType":"REST","msgTimestamp":"1456823264181","msgType":"NOTIFICATION","msgidClient":"92606e37-e22f-4cd1-a13c-fc6ec7353a1b","msgidServer":"780543197186","resendFlag":"0","tMembers":"[zhangsan, lisi]","to":"11631"}

attach字段释义:
{
  "data": {
    "id":"新群主的用户帐号"
    //群信息
    //具体参考tinfo字段的定义
    "tinfo": {

    },
    //新群主和老群主的信息,
    //具体参考uinfos字段的定义
    "uinfos": [
        {},
        {}
    ]
  },
  "id": 6    //更新群信息
}

tMembers字段释义:
{
    "tMembers":"[zhangsan, lisi]" //群内有效用户帐号列表,包括新群主和老群主
}
超大群相关示例
创建超大群
抄送示例:
{"attach":"{\"tinfo\":{\"1\":\"11620\",\"10\":\"1456802852027\",\"11\":\"1456802852027\",\"12\":\"1456802852027\",\"16\":\"0\",\"17\":\"0\",\"2\":\"11011\",\"21\":\"0\",\"22\":\"0\",\"23\":\"0\",\"24\":\"0\",\"3\":\"超大群\",\"4\":\"1\",\"5\":\"zhangsan\",\"6\":\"10\",\"8\":\"1\",\"9\":\"1\"}}","body":"邀请你加入群组","convType":"SUPER_TEAM","customSafeFlag":"0","eventType":"1","fromAccount":"zhangsan","msgTimestamp":"1456802852094","msgType":"NOTIFICATION","msgidServer":"371929","to":"11620"}

attach字段释义
{
    //群信息
    //具体参考tinfo字段的定义
    "tinfo": {

    }
}
解散超大群
抄送示例:
{"attach":"{\"data\":{\"uinfos\":[{\"1\":\"zhangsan\",\"11\":\"142915\",\"12\":\"1438738423546\",\"13\":\"1446624332920\",\"2\":\"11011\",\"3\":\"zhangsan\",\"4\":\"http://b12026.nos.netease.com/MTAxMTAxMA==/bmltYV8xNDI5MTZfMTQzODg2NDI4ODE0Ml81NjM3ZTIxMC1iMjE5LTRhYjgtOGZlOS02MzBjZWFjYmMwZDE=\",\"6\":\"0\"}]},\"id\":4}","convType":"SUPER_TEAM","eventType":"1","fromAccount":"zhangsan","fromClientType":"IOS","fromNick":"zhangsan","msgTimestamp":"1456810468999","msgType":"NOTIFICATION","msgidClient":"b697a6b2-be71-47f0-8fc0-3c7ff9b15dda","msgidServer":"779872108546","resendFlag":"0","to":"11621"}

attach字段释义
{
  "data": {
    //解散群的操作人的用户信息
    //具体参考uinfos字段的定义
    "uinfos": [
        {},
        {}
    ]
  },
  "id": 405    //超大群解散
}
超大群邀请他人加群
抄送示例:
{"attach":"{\"tinfo\":{\"1\":\"11623\",\"10\":\"1456817802112\",\"11\":\"1456811497999\",\"12\":\"1456817802112\",\"14\":\"这是群介绍\",\"15\":\"[{\\\"title\\\":\\\"这是群公告标题\\\",\\\"content\\\":\\\"这是群公告内容\\\",\\\"creator\\\":\\\"zhangsan\\\",\\\"time\\\":1457075964}]\",\"16\":\"0\",\"17\":\"0\",\"2\":\"11011\",\"21\":\"0\",\"22\":\"0\",\"23\":\"0\",\"24\":\"0\",\"3\":\"超大群\",\"4\":\"1\",\"5\":\"zhangsan\",\"6\":\"10\",\"8\":\"1\",\"9\":\"1\"}}","body":"邀请你加入群组","convType":"CUSTOM_TEAM","customSafeFlag":"0","eventType":"1","fromAccount":"zhangsan","msgTimestamp":"1456818444874","msgType":"SUPERTEAM_INVITE","msgidServer":"373171","to":"11623"}

attach字段释义:
{
  "data": {
    //群信息
    //具体参考tinfo字段的定义
    "tinfo": {

    }
  }
}
超大群接受邀请入群
抄送示例:
{"attach":"{\"data\":{\"id\":\"zhangsan\",\"tinfo\":{\"1\":\"11623\",\"10\":\"1456811521765\",\"11\":\"1456811497999\",\"12\":\"1456811521899\",\"14\":\"这是群介绍\",\"15\":\"[{\\\"title\\\":\\\"这是群公告标题\\\",\\\"content\\\":\\\"这是群公告内容\\\",\\\"creator\\\":\\\"zhangsan\\\",\\\"time\\\":1457075964}]\",\"16\":\"0\",\"17\":\"0\",\"2\":\"11011\",\"21\":\"0\",\"22\":\"0\",\"23\":\"0\",\"24\":\"0\",\"3\":\"超大群\",\"4\":\"1\",\"5\":\"zhangsan\",\"6\":\"10\",\"8\":\"1\",\"9\":\"2\"},\"uinfos\":[{\"1\":\"lisi\",\"11\":\"142916\",\"12\":\"1438740370586\",\"13\":\"1438740370586\",\"2\":\"11011\",\"3\":\"lisi\",\"6\":\"0\"},{\"1\":\"zhangsan\",\"11\":\"142915\",\"12\":\"1438738423546\",\"13\":\"1446624332920\",\"2\":\"11011\",\"3\":\"zhangsan\",\"4\":\"http://b12026.nos.netease.com/MTAxMTAxMA==/bmltYV8xNDI5MTZfMTQzODg2NDI4ODE0Ml81NjM3ZTIxMC1iMjE5LTRhYjgtOGZlOS02MzBjZWFjYmMwZDE=\",\"6\":\"0\"}]},\"id\":9}","convType":"SUPER_TEAM","eventType":"1","fromAccount":"lisi","fromClientType":"IOS","msgTimestamp":"1456811521946","msgType":"NOTIFICATION","msgidClient":"335cf3bb-8efa-4cde-953d-9aa775f1a2b2","msgidServer":"780006326273","resendFlag":"0","to":"11623"}

attach字段释义:
{
  "data": {
    //邀请人
    "id":"邀请人的帐号",
    //群信息
    //具体参考tinfo字段的定义
    "tinfo": {

    },
    //邀请人与被邀请人的用户信息
    //具体参考uinfos字段的定义
    "uinfos": [
        {},
        {}
    ]
  },
  "id": 411    //超大群接受邀请进群
}
超大群拒绝邀请入群
抄送示例:
{"body":"","convType":"CUSTOM_TEAM","customSafeFlag":"0","eventType":"1","fromAccount":"lisi","msgTimestamp":"1456819928681","msgType":"SUPERTEAM_INVITE_REJECT","msgidServer":"373998","to":"11623"}
超大群增加管理员
抄送示例:
{"attach":"{\"data\":{\"ids\":[\"lisi\"],\"uinfos\":[{\"1\":\"lisi\",\"11\":\"142916\",\"12\":\"1438740370586\",\"13\":\"1438740370586\",\"2\":\"11011\",\"3\":\"lisi\",\"6\":\"0\"},{\"1\":\"zhangsan\",\"11\":\"142915\",\"12\":\"1438738423546\",\"13\":\"1446624332920\",\"2\":\"11011\",\"3\":\"zhangsan\",\"4\":\"http://b12026.nos.netease.com/MTAxMTAxMA==/bmltYV8xNDI5MTZfMTQzODg2NDI4ODE0Ml81NjM3ZTIxMC1iMjE5LTRhYjgtOGZlOS02MzBjZWFjYmMwZDE=\",\"6\":\"0\"}]},\"id\":7}","convType":"SUPER_TEAM","eventType":"1","fromAccount":"zhangsan","fromClientType":"IOS","msgTimestamp":"1456813138663","msgType":"NOTIFICATION","msgidClient":"3e3e2efe-4f16-4ac2-8669-a8ee17be80bc","msgidServer":"780006326274","resendFlag":"0","to":"11623"}

attach字段释义:
{
  "data": {
    //邀请人
    "ids":[
        "被设为管理员的用户帐号1",
        "被设为管理员的用户帐号2"
    ],
    //操作人与被操作人的用户信息
    //具体参考uinfos字段的定义
    "uinfos": [
        {},
        {}
    ]
  },
  "id": 407    //超大群添加管理员
}
超大群删除管理员
抄送示例:
{"attach":"{\"data\":{\"ids\":[\"lisi\"],\"uinfos\":[{\"1\":\"lisi\",\"11\":\"142916\",\"12\":\"1438740370586\",\"13\":\"1438740370586\",\"2\":\"11011\",\"3\":\"lisi\",\"6\":\"0\"},{\"1\":\"zhangsan\",\"11\":\"142915\",\"12\":\"1438738423546\",\"13\":\"1446624332920\",\"2\":\"11011\",\"3\":\"zhangsan\",\"4\":\"http://b12026.nos.netease.com/MTAxMTAxMA==/bmltYV8xNDI5MTZfMTQzODg2NDI4ODE0Ml81NjM3ZTIxMC1iMjE5LTRhYjgtOGZlOS02MzBjZWFjYmMwZDE=\",\"6\":\"0\"}]},\"id\":8}","convType":"SUPER_TEAM","eventType":"1","fromAccount":"zhangsan","fromClientType":"IOS","msgTimestamp":"1456815660948","msgType":"NOTIFICATION","msgidClient":"a2b8f49a-cc06-4784-a8e4-84b59c9ac85f","msgidServer":"780006326275","resendFlag":"0","to":"11623"}

attach字段释义:
{
  "data": {
    //邀请人
    "ids":[
        "被删除管理员的用户帐号1",
        "被删除管理员的用户帐号2"
    ],
    //操作人与被操作人的用户信息
    //具体参考uinfos字段的定义
    "uinfos": [
        {},
        {}
    ]
  },
  "id": 408    //超大群删除管理员
}
超大群踢人出群
抄送示例:
{"attach":"{\"data\":{\"ids\":[\"lisi\"],\"tinfo\":{\"1\":\"11623\",\"10\":\"1456816081224\",\"11\":\"1456811497999\",\"12\":\"1456816081359\",\"14\":\"这是群介绍\",\"15\":\"[{\\\"title\\\":\\\"这是群公告标题\\\",\\\"content\\\":\\\"这是群公告内容\\\",\\\"creator\\\":\\\"zhangsan\\\",\\\"time\\\":1457075964}]\",\"16\":\"0\",\"17\":\"0\",\"2\":\"11011\",\"21\":\"0\",\"22\":\"0\",\"23\":\"0\",\"24\":\"0\",\"3\":\"超大群\",\"4\":\"1\",\"5\":\"zhangsan\",\"6\":\"10\",\"8\":\"1\",\"9\":\"1\"},\"uinfos\":[{\"1\":\"lisi\",\"11\":\"142916\",\"12\":\"1438740370586\",\"13\":\"1438740370586\",\"2\":\"11011\",\"3\":\"lisi\",\"6\":\"0\"},{\"1\":\"zhangsan\",\"11\":\"142915\",\"12\":\"1438738423546\",\"13\":\"1446624332920\",\"2\":\"11011\",\"3\":\"zhangsan\",\"4\":\"http://b12026.nos.netease.com/MTAxMTAxMA==/bmltYV8xNDI5MTZfMTQzODg2NDI4ODE0Ml81NjM3ZTIxMC1iMjE5LTRhYjgtOGZlOS02MzBjZWFjYmMwZDE=\",\"6\":\"0\"}]},\"id\":1}","convType":"SUPER_TEAM","eventType":"1","fromAccount":"zhangsan","fromClientType":"IOS","msgTimestamp":"1456816081368","msgType":"NOTIFICATION","msgidClient":"f3c0437d-fd3c-4900-9b80-ef9c86c1f91f","msgidServer":"780006326276","resendFlag":"0","to":"11623"}

attach字段释义:
{
  "data": {
    //邀请人
    "ids":[
        "被踢出群的用户帐号1",
        "被踢出群的用户帐号2"
    ],
    //群信息
    //具体参考tinfo字段的定义
    "tinfo": {

    },
    //操作人与被操作人的用户信息
    //具体参考uinfos字段的定义
    "uinfos": [
        {},
        {}
    ]
  },
  "id": 402    //超大群踢人
}
超大群申请加入成功(无需加群验证)
抄送示例:
{"attach":"{\"data\":{\"id\":\"lisi\",\"tinfo\":{\"1\":\"11631\",\"10\":\"1457075685304\",\"11\":\"1456823028193\",\"12\":\"1457075963090\",\"14\":\"这是群介绍\",\"15\":\"[{\\\"title\\\":\\\"这是群公告标题\\\",\\\"content\\\":\\\"这是群公告内容\\\",\\\"creator\\\":\\\"zhangsan\\\",\\\"time\\\":1457075964}]\",\"16\":\"0\",\"17\":\"0\",\"2\":\"11011\",\"21\":\"0\",\"22\":\"0\",\"23\":\"0\",\"24\":\"0\",\"3\":\"超大群\",\"4\":\"1\",\"5\":\"zhangsan\",\"6\":\"10\",\"8\":\"1\",\"9\":\"2\"},\"uinfos\":[{\"1\":\"lisi\",\"11\":\"142916\",\"12\":\"1438740370586\",\"13\":\"1438740370586\",\"2\":\"11011\",\"3\":\"lisi\",\"6\":\"0\"},{\"1\":\"lisi\",\"11\":\"142916\",\"12\":\"1438740370586\",\"13\":\"1438740370586\",\"2\":\"11011\",\"3\":\"lisi\",\"6\":\"0\"}]},\"id\":5}","convType":"SUPER_TEAM","eventType":"1","fromAccount":"lisi","fromClientType":"IOS","msgTimestamp":"1457076245920","msgType":"NOTIFICATION","msgidClient":"39a89280-edda-47ff-8f2a-3a2a9ae03cf4","msgidServer":"780543197222","resendFlag":"0","to":"11631"}

attach字段释义:
{
  "data": {
    //邀请人
    "id":"申请加入成功的用户帐号",
    //群信息
    //具体参考tinfo字段的定义
    "tinfo": {

    },
    //操作人与被操作人的用户信息,
    //此处操作人与被操作人是同一个人,uinfos包含两条同样的信息
    //具体参考uinfos字段的定义
    "uinfos": [
        {},
        {}
    ]
  },
  "id": 410    //超大群申请成功进群
}
申请加入超大群(需要验证)
抄送示例:
{"body":"wangwu申请加群","convType":"CUSTOM_TEAM","customSafeFlag":"0","eventType":"1","fromAccount":"lisi","msgTimestamp":"1456821259709","msgType":"SUPERTEAM_APPLY","msgidServer":"375024","to":"11623"}
允许加超大群申请
抄送示例:
{"attach":"{\"data\":{\"id\":\"lisi\",\"tinfo\":{\"1\":\"11623\",\"10\":\"1456821386734\",\"11\":\"1456811497999\",\"12\":\"1456821386758\",\"14\":\"这是群介绍\",\"15\":\"[{\\\"title\\\":\\\"这是群公告标题\\\",\\\"content\\\":\\\"这是群公告内容\\\",\\\"creator\\\":\\\"zhangsan\\\",\\\"time\\\":1457075964}]\",\"16\":\"1\",\"17\":\"0\",\"2\":\"11011\",\"21\":\"0\",\"22\":\"0\",\"23\":\"0\",\"24\":\"0\",\"3\":\"超大群\",\"4\":\"1\",\"5\":\"zhangsan\",\"6\":\"10\",\"8\":\"1\",\"9\":\"2\"},\"uinfos\":[{\"1\":\"zhangsan\",\"11\":\"142915\",\"12\":\"1438738423546\",\"13\":\"1446624332920\",\"2\":\"11011\",\"3\":\"zhangsan\",\"4\":\"http://b12026.nos.netease.com/MTAxMTAxMA==/bmltYV8xNDI5MTZfMTQzODg2NDI4ODE0Ml81NjM3ZTIxMC1iMjE5LTRhYjgtOGZlOS02MzBjZWFjYmMwZDE=\",\"6\":\"0\"},{\"1\":\"lisi\",\"11\":\"142916\",\"12\":\"1438740370586\",\"13\":\"1438740370586\",\"2\":\"11011\",\"3\":\"lisi\",\"6\":\"0\"}]},\"id\":5}","convType":"SUPER_TEAM","eventType":"1","fromAccount":"zhangsan","fromClientType":"IOS","msgTimestamp":"1456821386769","msgType":"NOTIFICATION","msgidClient":"dd36c8a2-30e7-476a-9608-48879f4d3146","msgidServer":"780006326282","resendFlag":"0","to":"11623"}

attach字段释义:
{
  "data": {
    //邀请人
    "id":"申请加群的用户帐号",
    //群信息
    //具体参考tinfo字段的定义
    "tinfo": {

    },
    //操作人与被操作人的用户信息,
    //具体参考uinfos字段的定义
    "uinfos": [
        {},
        {}
    ]
  },
  "id": 410    //超大群申请成功进群
}
拒绝加超大群申请
抄送示例:
{"attach":"{\"tinfo\":{\"1\":\"11623\",\"10\":\"1456821961295\",\"11\":\"1456811497999\",\"12\":\"1456821961295\",\"14\":\"这是群介绍\",\"15\":\"[{\\\"title\\\":\\\"这是群公告标题\\\",\\\"content\\\":\\\"这是群公告内容\\\",\\\"creator\\\":\\\"zhangsan\\\",\\\"time\\\":1457075964}]\",\"16\":\"1\",\"17\":\"0\",\"2\":\"11011\",\"21\":\"0\",\"22\":\"0\",\"23\":\"0\",\"24\":\"0\",\"3\":\"超大群\",\"4\":\"1\",\"5\":\"zhangsan\",\"6\":\"10\",\"8\":\"1\",\"9\":\"1\"}}","body":"","convType":"CUSTOM_TEAM","customSafeFlag":"0","eventType":"1","fromAccount":"zhangsan","msgTimestamp":"1456822044104","msgType":"SUPERTEAM_APPLY_REJECT","msgidServer":"375093","to":"11623"}

attach字段释义:
{
    //群信息
    //具体参考tinfo字段的定义
    "tinfo": {

    }
}
退出超大群
抄送示例:
{"attach":"{\"data\":{\"tinfo\":{\"1\":\"11623\",\"10\":\"1456817802112\",\"11\":\"1456811497999\",\"12\":\"1456817802112\",\"14\":\"这是群介绍\",\"15\":\"[{\\\"title\\\":\\\"这是群公告标题\\\",\\\"content\\\":\\\"这是群公告内容\\\",\\\"creator\\\":\\\"zhangsan\\\",\\\"time\\\":1457075964}]\",\"16\":\"0\",\"17\":\"0\",\"2\":\"11011\",\"21\":\"0\",\"22\":\"0\",\"23\":\"0\",\"24\":\"0\",\"3\":\"超大群\",\"4\":\"1\",\"5\":\"zhangsan\",\"6\":\"10\",\"8\":\"1\",\"9\":\"1\"},\"uinfos\":[{\"1\":\"lisi\",\"11\":\"142916\",\"12\":\"1438740370586\",\"13\":\"1438740370586\",\"2\":\"11011\",\"3\":\"lisi\",\"6\":\"0\"}]},\"id\":2}","convType":"SUPER_TEAM","eventType":"1","fromAccount":"lisi","fromClientType":"IOS","fromNick":"lisi","msgTimestamp":"1456817802118","msgType":"NOTIFICATION","msgidClient":"9ea8ad94-7b8e-4793-8302-23b554b3d5ca","msgidServer":"780006326278","resendFlag":"0","to":"11623"}

attach字段释义:
{
  "data": {
    //群信息
    //具体参考tinfo字段的定义
    "tinfo": {

    },
    //退出群的用户信息,
    //具体参考uinfos字段的定义
    "uinfos": [
        {},
        {}
    ]
  },
  "id": 403    //超大群退群
}
更新超大群
抄送示例:
{"attach":"{\"data\":{\"tinfo\":{\"1\":\"11623\",\"14\":\"这是群介绍\",\"15\":\"[{\\\"title\\\":\\\"这是群公告标题\\\",\\\"content\\\":\\\"这是群公告内容\\\",\\\"creator\\\":\\\"zhangsan\\\",\\\"time\\\":1457075964}]\",\"16\":\"1\"},\"uinfos\":[{\"1\":\"zhangsan\",\"11\":\"142915\",\"12\":\"1438738423546\",\"13\":\"1446624332920\",\"2\":\"11011\",\"3\":\"zhangsan\",\"4\":\"http://b12026.nos.netease.com/MTAxMTAxMA==/bmltYV8xNDI5MTZfMTQzODg2NDI4ODE0Ml81NjM3ZTIxMC1iMjE5LTRhYjgtOGZlOS02MzBjZWFjYmMwZDE=\",\"6\":\"0\"}]},\"id\":3}","convType":"SUPER_TEAM","eventType":"1","fromAccount":"zhangsan","fromClientType":"IOS","msgTimestamp":"1456822570528","msgType":"NOTIFICATION","msgidClient":"473b64e3-5b76-4fd8-ba74-b29a8ec71f7d","msgidServer":"780006326286","resendFlag":"0","to":"11623"}

attach字段释义:
{
  "data": {
    //群信息
    //具体参考tinfo字段的定义
    "tinfo": {

    },
    //更新群信息的操作人信息,
    //具体参考uinfos字段的定义
    "uinfos": [
        {},
        {}
    ]
  },
  "id": 404    //超大群修改群信息
}
移交超大群群主
抄送示例:
{"attach":"{\"data\":{\"id\":\"lisi\",\"tinfo\":{\"1\":\"11631\",\"10\":\"1456823264040\",\"11\":\"1456823028193\",\"12\":\"1456823264170\",\"14\":\"这是群介绍\",\"15\":\"[{\\\"title\\\":\\\"这是群公告标题\\\",\\\"content\\\":\\\"这是群公告内容\\\",\\\"creator\\\":\\\"zhangsan\\\",\\\"time\\\":1457075964}]\",\"16\":\"0\",\"17\":\"0\",\"2\":\"11011\",\"21\":\"0\",\"22\":\"0\",\"23\":\"0\",\"24\":\"0\",\"3\":\"超大群\",\"4\":\"1\",\"5\":\"lisi\",\"6\":\"10\",\"8\":\"1\",\"9\":\"2\"},\"uinfos\":[{\"1\":\"zhangsan\",\"11\":\"142915\",\"12\":\"1438738423546\",\"13\":\"1446624332920\",\"2\":\"11011\",\"3\":\"zhangsan\",\"4\":\"http://b12026.nos.netease.com/MTAxMTAxMA==/bmltYV8xNDI5MTZfMTQzODg2NDI4ODE0Ml81NjM3ZTIxMC1iMjE5LTRhYjgtOGZlOS02MzBjZWFjYmMwZDE=\",\"6\":\"0\"},{\"1\":\"lisi\",\"11\":\"142916\",\"12\":\"1438740370586\",\"13\":\"1438740370586\",\"2\":\"11011\",\"3\":\"lisi\",\"6\":\"0\"}]},\"id\":6}","convType":"SUPER_TEAM","eventType":"1","fromAccount":"zhangsan","fromClientType":"REST","msgTimestamp":"1456823264181","msgType":"NOTIFICATION","msgidClient":"92606e37-e22f-4cd1-a13c-fc6ec7353a1b","msgidServer":"780543197186","resendFlag":"0","to":"11631"}

attach字段释义:
{
  "data": {
    "id":"新群主的用户帐号"
    //群信息
    //具体参考tinfo字段的定义
    "tinfo": {

    },
    //新群主和老群主的信息,
    //具体参考uinfos字段的定义
    "uinfos": [
        {},
        {}
    ]
  },
  "id": 406    //超大群移交群主
}
好友相关示例
加好友
抄送示例:
{"attach":"{\"vt\":1}","body":"","convType":"CUSTOM_PERSON","customSafeFlag":"0","eventType":"1","fromAccount":"zhangsan","msgTimestamp":"1456827801260","msgType":"FRIEND_ADD","msgidServer":"375387","to":"lisi"}

attach字段释义:
{
  "vt": 1   //vt即verify type,加好友验证类型。1:直接加好友,无需验证;2:请求加好友,需要验证;3:同意加好友申请;4:拒绝加好友申请
}
删除好友
抄送示例:
{"convType":"CUSTOM_PERSON","customSafeFlag":"0","eventType":"1","fromAccount":"zhangsan","msgTimestamp":"1456827724200","msgType":"FRIEND_DELETE","msgidServer":"375386","to":"lisi"}
点对点消息相关示例
文本消息
抄送示例:
{"attach":"","body":"文字消息","convType":"PERSON","eventType":"1","fromAccount":"zhangsan","fromClientType":"IOS","fromDeviceId":"B0BFF2EB-E2E1-4063-9E73-92FB926BF388","fromNick":"zhangsan","msgTimestamp":"1456888017105","msgType":"TEXT","msgidClient":"f33f0716-6027-47de-a582-37a8dc2d217c","msgidServer":"8364607","resendFlag":"0","to":"lisi","yidunRes":"{\"yidunBusType\":0,\"action\":0,\"labels\":[]}"}
图片消息
抄送示例:
{"attach":"{\"md5\":\"d0323f8d447abf3df7256bd66f9d5b62\",\"h\":500,\"ext\":\"jpg\",\"size\":9093,\"w\":500,\"name\":\"图片发送于2016-03-02 11:09\",\"url\":\"http:\\/\\/b12026.nos.netease.com\\/MTAxMTAxMA==\\/bmltYV8xNDI5MTVfMTQ1NTY4NzIxMDkyOF8wOWE1ZmVlMS1lOGQ4LTQwMzItOGZkMS0yMWE1ODBjYjA1MWE=\"}","body":"","convType":"PERSON","eventType":"1","fromAccount":"zhangsan","fromClientType":"IOS","fromDeviceId":"B0BFF2EB-E2E1-4063-9E73-92FB926BF388","fromNick":"zhangsan","msgTimestamp":"1456888195062","msgType":"PICTURE","msgidClient":"472f2f50-2b00-4d7b-8b8d-d8870daa0dbd","msgidServer":"8364613","resendFlag":"0","to":"lisi","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}]}"}

attach字段释义:
{
  "md5":"xxxxxxxx",      //图片的md5值
  "h":500,               //图片的高
  "w":500,               //图片的宽
  "size":9093,           //图片的大小
  "name":"xxxxxxxx",     //图片的名称
  "url":"xxxxxxxx",      //图片的url
  "ext":"jpg"            //图片格式
}
音频消息
抄送示例:
{"attach":"{\"size\":14181,\"ext\":\"aac\",\"dur\":3900,\"url\":\"http:\\/\\/b12026.nos.netease.com\\/MTAxMTAxMA==\\/bmltYV8xNDI5MTVfMTQ1NTY4NzIxMDkyN18xYjRlOTc4My0zYzFkLTQ5NzUtOTY2NC1hOTkzMzAzOGZiZjc=\",\"md5\":\"4c5cc81dd00817b548b5eef42eac4d11\"}","body":"发来了一段语音","convType":"PERSON","eventType":"1","fromAccount":"zhangsan","fromClientType":"IOS","fromDeviceId":"B0BFF2EB-E2E1-4063-9E73-92FB926BF388","fromNick":"zhangsan","msgTimestamp":"1456888940830","msgType":"AUDIO","msgidClient":"b0b703ea-3e10-453e-8650-e3a2802130bd","msgidServer":"8364635","resendFlag":"0","to":"lisi"}

attach字段释义:
{
  "size":14181,          //音频的大小
  "ext":"aac",           //音频的格式
  "dur":3900,            //音频的时长
  "url":"xxxxxxxx",      //音频的url
  "md5":"xxxxxxxx"       //音频的md5值
}
视频消息
抄送示例:
{"attach":"{\"url\":\"http:\\/\\/b12026.nos.netease.com\\/MTAxMTAxMA==\\/bmltYV8xNDI5MTVfMTQ1NTY4NzIxMDkyN18xZGNkMjQzNi02OTg2LTQxNGEtYWE5ZC04ZDhmYjQyMTE2OTQ=\",\"md5\":\"c2f2e15af1c9e341187f81e5f8453399\",\"ext\":\"mp4\",\"h\":480,\"size\":114347,\"w\":360,\"name\":\"视频发送于2016-03-02 11:16\",\"dur\":1456}","body":"","convType":"PERSON","eventType":"1","fromAccount":"zhangsan","fromClientType":"IOS","fromDeviceId":"B0BFF2EB-E2E1-4063-9E73-92FB926BF388","fromNick":"zhangsan","msgTimestamp":"1456888595916","msgType":"VIDEO","msgidClient":"57a33622-cd80-4c65-b8d3-15f3c2bb128f","msgidServer":"8364616","resendFlag":"0","to":"lisi"}

attach字段释义:
{
  "url":"xxxxxxxx",      //视频的url
  "md5":"xxxxxxxx",      //视频的md5值
  "ext":"mp4",           //视频的格式
  "h":"480",             //视频的高
  "w":"360",             //视频的宽
  "size":14181,          //视频的大小
  "name":"xxxxxxxx",     //视频的名称
  "dur":1456             //视频的时长
}
地理位置消息
抄送示例:
{"attach":"{\"lat\":30.18704515647036,\"lng\":120.1908686708565,\"title\":\"中国 浙江省 杭州市 网商路 599号\"}","body":"","convType":"PERSON","eventType":"1","fromAccount":"zhangsan","fromClientType":"REST","fromDeviceId":"","fromNick":"zhangsan","msgTimestamp":"1456897243862","msgType":"LOCATION","msgidClient":"6f9804ac-d584-422e-85a2-5f0167df65cf","msgidServer":"8364682","resendFlag":"0","to":"lisi"}

attach字段释义:
{
  "lat":30.18704515647036,   //纬度
  "lng":120.1908686708565,   //经度
  "title":"xxxxxxxx"         //地理位置的title
}
文件消息
抄送示例:
{"attach":"{\"ext\":\"ttf\",\"md5\":\"79d62a35fa3d34c367b20c66afc2a500\",\"name\":\"BlizzardReg.ttf\",\"size\":\"91680\",\"url\":\"http:\\/\\/nimtest.nos.netease.com\\/08c9859d-183f-4daa-9904-d6cacb51c95b\"}","body":"","convType":"PERSON","eventType":"1","fromAccount":"zhangsan","fromClientType":"IOS","fromDeviceId":"E8977274-3CD1-494D-95C4-EA633G63B5B5","fromNick":"zhangsan","msgTimestamp":"1456897960993","msgType":"FILE","msgidClient":"e1177d7c-c693-4a91-b0ef-f47f48793d9e","msgidServer":"8364686","resendFlag":"0","to":"lisi"}

attach字段释义:
{
  "ext":"xxxxxxxx",          //文件的类型
  "md5":"xxxxxxxx",          //文件的md5值
  "name":"xxxxxxxx",         //文件名
  "size":"xxxxxxxx",         //文件的大小
  "url":"xxxxxxxx"           //文件的URL
}
自定义消息
抄送示例:
{"attach":"{"myKey1":\"myValue1\",\"myKey2\":2}","body":"","convType":"PERSON","eventType":"1","fromAccount":"zhangsan","fromClientType":"REST","fromDeviceId":"","fromNick":"zhangsan","msgTimestamp":"1456898248757","msgType":"CUSTOM","msgidClient":"1f929f45-1b5e-495e-b76c-465a4187be52","msgidServer":"8364702","resendFlag":"0","to":"lisi"}

attach字段释义:由第三方自己定义并解析相应的Key-Value值


SDK中定义的几类自定义消息释义: 
————————————————
剪刀石头布(type = 1):
{"attach":"{\"type\":1,\"data\":{\"value\":1}}","body":"","convType":"PERSON","eventType":"1","fromAccount":"zhangsan","fromClientType":"IOS","fromDeviceId":"B0BFF2EB-E2E1-4063-9E73-92FB926BF388","fromNick":"zhangsan","msgTimestamp":"1456904008340","msgType":"CUSTOM","msgidClient":"39efd6b1-a6f4-41cd-88f8-357cdf385d3e","msgidServer":"8365170","resendFlag":"0","to":"lisi"}

attach字段释义:
{
  "type":1                                    //type=1表示是剪刀石头布
  "data": {
    "value":1                                 //1:石头;2:剪刀;3:布
  }
}
————————————————
阅后即焚(type = 2):
{"attach":"{\"type\":2,\"data\":{\"md5\":\"8C40A5F0F56A8FA2CAC5D2A487D3D429\",\"fired\":false,\"url\":\"http:\\/\\/b12026.nos.netease.com\\/MTAxMTAxMA==\\/bmltYV8xNDI5MTVfMTQ1NTY4NzIxMDkyNl9iOTI4MmVhMC02ZTM2LTQ3YjYtOTVhNC01MWRmNmI3NjZjMzg=\"}}","body":"","convType":"PERSON","eventType":"1","fromAccount":"zhangsan","fromClientType":"IOS","fromDeviceId":"B0BFF2EB-E2E1-4063-9E73-92FB926BF388","fromNick":"zhangsan","msgTimestamp":"1456904040460","msgType":"CUSTOM","msgidClient":"f11be78c-31d9-48f3-92f8-35a3806c3511","msgidServer":"8365185","resendFlag":"0","to":"lisi"}

attach字段释义:
{
  "type":2                                    //type=2表示是阅后即焚
  "data": {
    "md5":8C40A5F0F56A8FA2CAC5D2A487D3D429,   //阅后即焚的图片的md5值
    "url":"图片地址",                          //阅后即焚的图片地址
    "fired":false                             //标记在查看前是否焚毁,一般都为false,可以不理会
  }
}
————————————————
贴图表情(type = 3):
{"attach":"{\"type\":3,\"data\":{\"catalog\":\"xxy\",\"chartlet\":\"xxy002\"}}","body":"","convType":"PERSON","eventType":"1","fromAccount":"zhangsan","fromClientType":"IOS","fromDeviceId":"B0BFF2EB-E2E1-4063-9E73-92FB926BF388","fromNick":"zhangsan","msgTimestamp":"1458815489454","msgType":"CUSTOM","msgidClient":"e9ff8a99-1fc2-4646-8907-3312f4538c09","msgidServer":"8414888","resendFlag":"0","to":"lisi"}

attach字段释义:
{
  "type":3                                    //type=3表示是贴图表情
  "data": {
    "catalog":"xxy",                          //贴图所在文件夹的名称
    "chartlet":"xxy002"                       //贴图文件的名称
  }
}
————————————————
白板会话(type = 4):
{"attach":"{\"type\":4,\"data\":{\"flag\":0}}","body":"","convType":"PERSON","eventType":"1","fromAccount":"zhangsan","fromClientType":"IOS","fromDeviceId":"B0BFF2EB-E2E1-4063-9E73-92FB926BF388","fromNick":"zhangsan","msgTimestamp":"1456904076370","msgType":"CUSTOM","msgidClient":"5545d9c6-7700-45bd-9fff-7e18294f159b","msgidServer":"8365186","resendFlag":"0","to":"lisi"}

attach字段释义:
{
  "type":4                            //type=4表示是白板会话
  "data": {
    "flag":0                          //0:邀请白板会话;1:关闭白板会话
  }
}
自定义系统通知
抄送示例:
{"attach":"{\"myKey1\":\"myValue1\",\"myKey2\":10}","body":"","convType":"CUSTOM_PERSON","customApnsText":"","customSafeFlag":"0","eventType":"1","fromAccount":"zhangsan","msgTimestamp":"1456913798613","msgType":"CUSTOM_P2P_MSG","msgidServer":"381209","to":"lisi"}
群组消息相关示例
文本消息
抄送示例:
{"attach":"","body":"文本消息","convType":"TEAM","eventType":"1","fromAccount":"zhangsan","fromClientType":"IOS","fromDeviceId":"B0BFF2EB-E2E1-4063-9E73-92FB926BF388","fromNick":"zhangsan","msgTimestamp":"1456914408870","msgType":"TEXT","msgidClient":"f4c98f2c-b2bf-4d22-8cca-cb5c32e7aa3a","msgidServer":"780543197190","resendFlag":"0","tMembers":"[lisi]","to":"11631"}
tMembers字段说明:tMembers字段为群内除发送者外所有的有效群成员帐号的JSONArray串,以下群消息中的tMembers字段为相同概念,下略。
图片消息
抄送示例:
{"attach":"{\"md5\":\"d0323f8d447abf3df7256bd66f9d5b62\",\"h\":500,\"ext\":\"jpg\",\"size\":9093,\"w\":500,\"name\":\"图片发送于2016-03-02 18:29\",\"url\":\"http:\\/\\/b12026.nos.netease.com\\/MTAxMTAxMA==\\/bmltYV8xNDI5MTVfMTQ1NTY4NzIxMDkyNl84NzBmZjY5Ni0yOGI5LTRiZDgtYjQ4Yy02ZmVjYWI0NjcxM2Y=\"}","body":"","convType":"TEAM","eventType":"1","fromAccount":"zhangsan","fromClientType":"IOS","fromDeviceId":"B0BFF2EB-E2E1-4063-9E73-92FB926BF388","fromNick":"zhangsan","msgTimestamp":"1456914540323","msgType":"PICTURE","msgidClient":"b3b1f911-d174-4417-9ffc-8f0e2b8becf5","msgidServer":"779603673092","resendFlag":"0","tMembers":"[lisi]","to":"11617"}
attach字段释义:参考P2P消息中的图片消息中attach字段释义
音频消息
抄送示例:
{"attach":"{\"size\":13738,\"ext\":\"aac\",\"dur\":3808,\"url\":\"http:\\/\\/b12026.nos.netease.com\\/MTAxMTAxMA==\\/bmltYV8xNDI5MTVfMTQ1NTY4NzIxMDkyNl9lOWExMmNmMy1lZDhkLTQ2Y2UtYWRiYS1mOTA4ODhjZTliNTM=\",\"md5\":\"35411b36f22077309daec3b970b46e89\"}","body":"发来了一段语音","convType":"TEAM","eventType":"1","fromAccount":"zhangsan","fromClientType":"IOS","fromDeviceId":"B0BFF2EB-E2E1-4063-9E73-92FB926BF388","fromNick":"zhangsan","msgTimestamp":"1456914620057","msgType":"AUDIO","msgidClient":"652d7015-9ee8-4e25-b1e7-40a3b534f4a5","msgidServer":"779603673093","resendFlag":"0","tMembers":"[lisi]","to":"11617"}
attach字段释义:参考P2P消息中的音频消息中attach字段释义
视频消息
抄送示例:
{"attach":"{\"url\":\"http:\\/\\/b12026.nos.netease.com\\/MTAxMTAxMA==\\/bmltYV8xNDI5MTVfMTQ1NTY4NzIxMDkyNl9hMmJhOTIzMS1mM2NkLTQ0MTctOWI0OC1kZWRhOTFjNGUzZjA=\",\"md5\":\"6ba2b50225469d46263ba70736c37cd3\",\"ext\":\"mp4\",\"h\":480,\"size\":150495,\"w\":360,\"name\":\"视频发送于2016-03-02 18:31\",\"dur\":1473}","body":"","convType":"TEAM","eventType":"1","fromAccount":"zhangsan","fromClientType":"IOS","fromDeviceId":"B0BFF2EB-E2E1-4063-9E73-92FB926BF388","fromNick":"zhangsan","msgTimestamp":"1456914687808","msgType":"VIDEO","msgidClient":"d4ce8255-b9f8-4682-8ba2-a60f31be454a","msgidServer":"779603673094","resendFlag":"0","tMembers":"[lisi]","to":"11617"}
attach字段释义:参考P2P消息中的视频消息中attach字段释义
地理位置消息
抄送示例:
{"attach":"{\"lat\":30.18704515647036,\"lng\":120.1908686708565,\"title\":\"中国 浙江省 杭州市 网商路 599号\"}","body":"","convType":"TEAM","eventType":"1","fromAccount":"zhangsan","fromClientType":"REST","fromDeviceId":"","fromNick":"zhangsan","msgTimestamp":"1456914808531","msgType":"LOCATION","msgidClient":"1bc0a22a-e255-4ac7-8638-6ba3e9648550","msgidServer":"780543197191","resendFlag":"0","tMembers":"[lisi]","to":"11631"}
attach字段释义:参考P2P消息中的地理位置消息中attach字段释义
文件消息
抄送示例:
{"attach":"{\"ext\":\"ttf\",\"md5\":\"79d62a35fa3d34c367b20c66afc2a500\",\"name\":\"BlizzardReg.ttf\",\"size\":\"91680\",\"url\":\"http:\\/\\/nimtest.nos.netease.com\\/08c9859d-183f-4daa-9904-d6cacb51c95b\"}","body":"","convType":"TEAM","eventType":"1","fromAccount":"zhangsan","fromClientType":"REST","fromDeviceId":"","fromNick":"zhangsan","msgTimestamp":"1456969602600","msgType":"FILE","msgidClient":"5abd008f-4d94-41a4-89f4-bc6aa3c5dc1f","msgidServer":"780543197192","resendFlag":"0","tMembers":"[lisi]","to":"11631"}
attach字段释义:参考P2P消息中的发送文件消息中attach字段释义
自定义消息
抄送示例:
{"attach":"{\"myKey1\":\"myValue1\",\"myKey2\":10}","body":"","convType":"TEAM","eventType":"1","fromAccount":"zhangsan","fromClientType":"REST","fromDeviceId":"","fromNick":"zhangsan","msgTimestamp":"1456969938208","msgType":"CUSTOM","msgidClient":"4e330c5e-7f71-4f69-a51b-e6c884760866","msgidServer":"780543197194","resendFlag":"0","tMembers":"[lisi]","to":"11631"}

attach字段释义:由第三方自己定义并解析相应的Key-Value值


SDK中定义的几类自定义消息释义:
————————————————
剪刀石头布(type = 1):
{"attach":"{\"type\":1,\"data\":{\"value\":3}}","body":"","convType":"TEAM","eventType":"1","fromAccount":"zhangsan","fromClientType":"IOS","fromDeviceId":"B0BFF2EB-E2E1-4063-9E73-92FB926BF388","fromNick":"zhangsan","msgTimestamp":"1456970142720","msgType":"CUSTOM","msgidClient":"f051c3ab-89a4-4278-b311-02d679f97898","msgidServer":"780543197195","resendFlag":"0","tMembers":"[lisi]","to":"11631"}

attach字段释义:
{
  "type":1                                    //type=1表示是剪刀石头布
  "data": {
    "value":3                                 //1:石头;2:剪刀;3:布
  }
}

————————————————
贴图表情(type = 3):
{"attach":"{\"type\":3,\"data\":{\"catalog\":\"xxy\",\"chartlet\":\"xxy001\"}}","body":"","convType":"TEAM","eventType":"1","fromAccount":"zhangsan","fromClientType":"IOS","fromDeviceId":"B0BFF2EB-E2E1-4063-9E73-92FB926BF388","fromNick":"zhangsan","msgTimestamp":"1456971231090","msgType":"CUSTOM","msgidClient":"a0989c85-f85a-43a6-8ba5-d2509cf30d4b","msgidServer":"780543197215","resendFlag":"0","tMembers":"[lisi]","to":"11631"}

attach字段释义:
{
  "type":3                                    //type=3表示是贴图表情
  "data": {
    "catalog":"xxy",                          //贴图所在文件夹的名称
    "chartlet":"xxy002"                       //贴图文件的名称
  }
}
自定义系统通知
抄送示例:
{"attach":"{\"myKey1\":\"myValue1\",\"myKey2\":10}","body":"","convType":"CUSTOM_TEAM","customApnsText":"","customSafeFlag":"0","eventType":"1","fromAccount":"zhangsan","msgTimestamp":"1456972250344","msgType":"CUSTOM_TEAM_MSG","msgidServer":"382250","tMembers":"[lisi]","to":"11631"}
超大群组消息相关示例
文本消息
抄送示例:
{"attach":"","body":"文本消息","convType":"SUPER_TEAM","eventType":"1","fromAccount":"zhangsan","fromClientType":"IOS","fromDeviceId":"B0BFF2EB-E2E1-4063-9E73-92FB926BF388","fromNick":"zhangsan","msgTimestamp":"1456914408870","msgType":"TEXT","msgidClient":"f4c98f2c-b2bf-4d22-8cca-cb5c32e7aa3a","msgidServer":"780543197190","resendFlag":"0","to":"11631"}
tMembers字段说明:tMembers字段为群内除发送者外所有的有效群成员帐号的JSONArray串,以下群消息中的tMembers字段为相同概念,下略。
图片消息
抄送示例:
{"attach":"{\"md5\":\"d0323f8d447abf3df7256bd66f9d5b62\",\"h\":500,\"ext\":\"jpg\",\"size\":9093,\"w\":500,\"name\":\"图片发送于2016-03-02 18:29\",\"url\":\"http:\\/\\/b12026.nos.netease.com\\/MTAxMTAxMA==\\/bmltYV8xNDI5MTVfMTQ1NTY4NzIxMDkyNl84NzBmZjY5Ni0yOGI5LTRiZDgtYjQ4Yy02ZmVjYWI0NjcxM2Y=\"}","body":"","convType":"SUPER_TEAM","eventType":"1","fromAccount":"zhangsan","fromClientType":"IOS","fromDeviceId":"B0BFF2EB-E2E1-4063-9E73-92FB926BF388","fromNick":"zhangsan","msgTimestamp":"1456914540323","msgType":"PICTURE","msgidClient":"b3b1f911-d174-4417-9ffc-8f0e2b8becf5","msgidServer":"779603673092","resendFlag":"0","to":"11617"}
attach字段释义:参考P2P消息中的图片消息中attach字段释义
音频消息
抄送示例:
{"attach":"{\"size\":13738,\"ext\":\"aac\",\"dur\":3808,\"url\":\"http:\\/\\/b12026.nos.netease.com\\/MTAxMTAxMA==\\/bmltYV8xNDI5MTVfMTQ1NTY4NzIxMDkyNl9lOWExMmNmMy1lZDhkLTQ2Y2UtYWRiYS1mOTA4ODhjZTliNTM=\",\"md5\":\"35411b36f22077309daec3b970b46e89\"}","body":"发来了一段语音","convType":"SUPER_TEAM","eventType":"1","fromAccount":"zhangsan","fromClientType":"IOS","fromDeviceId":"B0BFF2EB-E2E1-4063-9E73-92FB926BF388","fromNick":"zhangsan","msgTimestamp":"1456914620057","msgType":"AUDIO","msgidClient":"652d7015-9ee8-4e25-b1e7-40a3b534f4a5","msgidServer":"779603673093","resendFlag":"0","to":"11617"}
attach字段释义:参考P2P消息中的音频消息中attach字段释义
视频消息
抄送示例:
{"attach":"{\"url\":\"http:\\/\\/b12026.nos.netease.com\\/MTAxMTAxMA==\\/bmltYV8xNDI5MTVfMTQ1NTY4NzIxMDkyNl9hMmJhOTIzMS1mM2NkLTQ0MTctOWI0OC1kZWRhOTFjNGUzZjA=\",\"md5\":\"6ba2b50225469d46263ba70736c37cd3\",\"ext\":\"mp4\",\"h\":480,\"size\":150495,\"w\":360,\"name\":\"视频发送于2016-03-02 18:31\",\"dur\":1473}","body":"","convType":"SUPER_TEAM","eventType":"1","fromAccount":"zhangsan","fromClientType":"IOS","fromDeviceId":"B0BFF2EB-E2E1-4063-9E73-92FB926BF388","fromNick":"zhangsan","msgTimestamp":"1456914687808","msgType":"VIDEO","msgidClient":"d4ce8255-b9f8-4682-8ba2-a60f31be454a","msgidServer":"779603673094","resendFlag":"0","to":"11617"}
attach字段释义:参考P2P消息中的视频消息中attach字段释义
地理位置消息
抄送示例:
{"attach":"{\"lat\":30.18704515647036,\"lng\":120.1908686708565,\"title\":\"中国 浙江省 杭州市 网商路 599号\"}","body":"","convType":"SUPER_TEAM","eventType":"1","fromAccount":"zhangsan","fromClientType":"REST","fromDeviceId":"","fromNick":"zhangsan","msgTimestamp":"1456914808531","msgType":"LOCATION","msgidClient":"1bc0a22a-e255-4ac7-8638-6ba3e9648550","msgidServer":"780543197191","resendFlag":"0","to":"11631"}
attach字段释义:参考P2P消息中的地理位置消息中attach字段释义
文件消息
抄送示例:
{"attach":"{\"ext\":\"ttf\",\"md5\":\"79d62a35fa3d34c367b20c66afc2a500\",\"name\":\"BlizzardReg.ttf\",\"size\":\"91680\",\"url\":\"http:\\/\\/nimtest.nos.netease.com\\/08c9859d-183f-4daa-9904-d6cacb51c95b\"}","body":"","convType":"SUPER_TEAM","eventType":"1","fromAccount":"zhangsan","fromClientType":"REST","fromDeviceId":"","fromNick":"zhangsan","msgTimestamp":"1456969602600","msgType":"FILE","msgidClient":"5abd008f-4d94-41a4-89f4-bc6aa3c5dc1f","msgidServer":"780543197192","resendFlag":"0","to":"11631"}
attach字段释义:参考P2P消息中的发送文件消息中attach字段释义
自定义消息
抄送示例:
{"attach":"{\"myKey1\":\"myValue1\",\"myKey2\":10}","body":"","convType":"SUPER_TEAM","eventType":"1","fromAccount":"zhangsan","fromClientType":"REST","fromDeviceId":"","fromNick":"zhangsan","msgTimestamp":"1456969938208","msgType":"CUSTOM","msgidClient":"4e330c5e-7f71-4f69-a51b-e6c884760866","msgidServer":"780543197194","resendFlag":"0","to":"11631"}

attach字段释义:由第三方自己定义并解析相应的Key-Value值


SDK中定义的几类自定义消息释义:
————————————————
剪刀石头布(type = 1):
{"attach":"{\"type\":1,\"data\":{\"value\":3}}","body":"","convType":"SUPER_TEAM","eventType":"1","fromAccount":"zhangsan","fromClientType":"IOS","fromDeviceId":"B0BFF2EB-E2E1-4063-9E73-92FB926BF388","fromNick":"zhangsan","msgTimestamp":"1456970142720","msgType":"CUSTOM","msgidClient":"f051c3ab-89a4-4278-b311-02d679f97898","msgidServer":"780543197195","resendFlag":"0","to":"11631"}

attach字段释义:
{
  "type":1                                    //type=1表示是剪刀石头布
  "data": {
    "value":3                                 //1:石头;2:剪刀;3:布
  }
}

————————————————
贴图表情(type = 3):
{"attach":"{\"type\":3,\"data\":{\"catalog\":\"xxy\",\"chartlet\":\"xxy001\"}}","body":"","convType":"SUPER_TEAM","eventType":"1","fromAccount":"zhangsan","fromClientType":"IOS","fromDeviceId":"B0BFF2EB-E2E1-4063-9E73-92FB926BF388","fromNick":"zhangsan","msgTimestamp":"1456971231090","msgType":"CUSTOM","msgidClient":"a0989c85-f85a-43a6-8ba5-d2509cf30d4b","msgidServer":"780543197215","resendFlag":"0","to":"11631"}

attach字段释义:
{
  "type":3                                    //type=3表示是贴图表情
  "data": {
    "catalog":"xxy",                          //贴图所在文件夹的名称
    "chartlet":"xxy002"                       //贴图文件的名称
  }
}
自定义系统通知
抄送示例:
{"attach":"{\"myKey1\":\"myValue1\",\"myKey2\":10}","body":"","convType":"CUSTOM_TEAM","customApnsText":"","customSafeFlag":"0","eventType":"1","fromAccount":"zhangsan","msgTimestamp":"1456972250344","msgType":"CUSTOM_SUPERTEAM_MSG","msgidServer":"382250","to":"11631"}

登录事件消息抄送

2. "eventType"="2"。需要单独开通,如有需要,请联系网易云信商务经理。

注意:如果使用消息抄送功能来实现在线状态,需要注意登录登出消息抄送并不一定成对出现,可能出现乱序或丢失,因此,需要解析登录登出消息抄送的时间戳字段timestamp并将其维护为在线状态时间戳,如果新到达的登录登出消息抄送时间戳小于已保存的在线状态时间戳,则需要忽略新到达的登录登出抄送。

HTTP示例

POST  /receiveMsg.action   HTTP/1.1
Host:  yunxinservice.com.cn
Content-Type:  application/json
CurTime: 1440570500855    //当前UTC时间戳,从1970年1月1日0点0 分0 秒开始到现在的毫秒数(String)
MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx //根据请求中的request body计算出来的MD5值
CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01

{"accid":"test","clientIp":"192.168.1.100","clientType":"PC","code":"200","eventType":"2","sdkVersion":"18","timestamp":"1452504942126"}

cURL示例

curl -X POST -H "Content-Type: application/json" -H "CurTime: 1440570500855" -H "MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01" -d '{"accid":"test","clientIp":"192.168.1.100","clientType":"PC","code":"200","eventType":"2","sdkVersion":"18","timestamp":"1452504942126"}' 'http://yunxinservice.com.cn/receiveMsg.action'

消息体中的JSON字段说明

名称类型说明
eventType String值为2,表示是登录事件的消息
accid String发生登录事件的用户帐号,字符串类型
clientIp String登录时的ip地址
clientType String客户端类型: AOS、IOS、PC、WINPHONE、WEB、REST,字符串类型
code String登录事件的返回码,可转为Integer类型数据
sdkVersion String当前sdk的版本信息,字符串类型
timestamp String登录事件发生时的时间戳,可转为Long型数据
customTag String登录时设置的自定义Tag,如未设置则不抄送该字段,字符串类型

登出事件消息抄送

3. "eventType"="3"。当终端用户主动登出、被踢出、断网离线、应用被清理后,云信将会发起登出事件抄送。需要单独开通,如有需要,请联系网易云信商务经理。

注意:如果使用消息抄送功能来实现在线状态,需要注意登录登出消息抄送并不一定成对出现,可能出现乱序或丢失,因此,需要解析登录登出消息抄送的时间戳字段timestamp并将其维护为在线状态时间戳,如果新到达的登录登出消息抄送时间戳小于已保存的在线状态时间戳,则需要忽略新到达的登录登出抄送。

HTTP示例

POST  /receiveMsg.action   HTTP/1.1
Host:  yunxinservice.com.cn
Content-Type:  application/json
CurTime: 1440570500855    //当前UTC时间戳,从1970年1月1日0点0 分0 秒开始到现在的毫秒数(String)
MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx //根据请求中的request body计算出来的MD5值
CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01

{"accid":"test","clientIp":"192.168.1.100","clientType":"PC","code":"200","eventType":"3","sdkVersion":"18","timestamp":"1452504942126"}

cURL示例

curl -X POST -H "Content-Type: application/json" -H "CurTime: 1440570500855" -H "MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01" -d '{"accid":"test","clientIp":"192.168.1.100","clientType":"PC","code":"200","eventType":"3","sdkVersion":"18","timestamp":"1452504942126"}' 'http://yunxinservice.com.cn/receiveMsg.action'

消息体中的JSON字段说明

登出事件消息中,clientIp字段并不一定保证抄送;登录事件消息中的该字段是一定保证抄送的。
名称类型说明
eventType String值为3,表示是登出事件的消息
accid String发生登出事件的用户帐号,字符串类型
clientIp String登出时的ip地址
clientType String客户端类型: AOS、IOS、PC、WINPHONE、WEB、REST,字符串类型
code String登出事件的返回码,可转为Integer类型数据
sdkVersion String当前sdk的版本信息,字符串类型
timestamp String登出事件发生时的时间戳,可转为Long型数据
logoutReason String登出原因:
1:注销
2:断开连接
3:被自己其它端踢下线
4:根据互踢策略被踢下线

聊天室消息抄送

4. "eventType"="4"

HTTP示例

POST  /receiveMsg.action   HTTP/1.1
Host:  yunxinservice.com.cn
Content-Type:  application/json
CurTime: 1440570500855    //当前UTC时间戳,从1970年1月1日0点0 分0 秒开始到现在的毫秒数(String)
MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx //根据请求中的request body计算出来的MD5值
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示例

curl -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'

消息体中的JSON字段说明

聊天室类型消息中,并不是每个字段都会一定抄送,请注意对各字段的判空处理。
以下为一般情况下必有的字段:
eventType、attach、fromAccount、msgTimestamp、msgType、msgidClient、roomId
名称类型说明
eventType String值为4,表示是聊天室消息
attach String消息内容,若msgType为CUSTOM自定义消息,该字段为JSON格式;否则该字段为普通字符串类型
ext String第三方扩展字段, 格式不限,长度限制4096,字符串类型
fromAccount String消息发送者的账号,字符串类型
fromAvator String发送者的头像,字符串类型
fromClientType String客户端类型: AOS、IOS、PC、WINPHONE、WEB、REST,字符串类型
fromExt String发送者身份的扩展字段,开发者可以自定义,字符串类型
fromNick String发送方昵称,字符串类型
msgTimestamp String消息发送的时间戳
msgType String 消息类型:
TEXT、
PICTURE、
AUDIO、
VIDEO、
LOCATION 、
NOTIFICATION、
FILE、 //文件消息
NETCALL_AUDIO、 //网络电话音频聊天
NETCALL_VEDIO、 //网络电话视频聊天
DATATUNNEL_NEW、 //新的数据通道请求通知
TIPS、 //提示类型消息
CUSTOM //自定义消息
msgidClient String客户端生成的消息id
resendFlag String重发标记:0不是重发, 1是重发
roleInfoTimetag String消息发送者用户名片的最后更新时间,可转为Long型数据
roomId String消息所属的聊天室id,可转为Long型数据
antispam String标识是否被反垃圾,仅在被反垃圾时才有此字段,可转为Boolean类型数据
yidunRes String易盾反垃圾的原始处理细节,只有接入了相关功能易盾反垃圾的应用才会有这个字段。详见以下4.4.1、聊天室:发送文本消息 和 4.4.2、聊天室:发送图片消息的举例说明。

该字段中子字段释义如下:
yidunBusType:0:易盾文本反垃圾业务;1、易盾图片反垃圾业务;2、用户资料反垃圾业务;3、用户头像反垃圾业务。

action:处理结果:检测结果,0:通过,1:嫌疑,2:不通过。 (只有yidunBusType为0或2时,抄送时才有此字段)

labels:具体的反垃圾判断细节:
文本类反垃圾参考:
http://support.dun.163.com/antispam/api/#_18 labels字段的释义
图片类反垃圾参考:
http://support.dun.163.com/antispam/api/#_34 labels字段的释义

消息抄送详细示例

文本消息
抄送示例:
{"attach":"聊天室文本消息","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\":[]}"}
attach字段释义:参考P2P消息中的文本消息中attach字段释义
图片消息
抄送示例:
{"attach":"{\"md5\":\"d0323f8d447abf3df7256bd66f9d5b62\",\"h\":500,\"ext\":\"jpg\",\"size\":9093,\"w\":500,\"name\":\"图片发送于2016-03-02 18:29\",\"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}]}"}
attach字段释义:参考P2P消息中的图片消息中attach字段释义
音频消息
抄送示例:
{"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"}
attach字段释义:参考P2P消息中的音频消息中attach字段释义
视频消息
抄送示例:
{"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"}
attach字段释义:参考P2P消息中的视频消息中attach字段释义
地理位置消息
抄送示例:
{"attach":"{\"lat\":30.18704515647036,\"lng\":120.1908686708565,\"title\":\"中国 浙江省 杭州市 网商路 599号\"}","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"}
attach字段释义:参考P2P消息中的地理位置消息中attach字段释义
文件消息
抄送示例:
{"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"}
attach字段释义:参考P2P消息中的发送文件消息中attach字段释义
自定义消息
抄送示例:
{"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"}
attach字段释义:由第三方自己定义并解析相应的Key-Value值

SDK中定义的几类自定义消息释义:
————————————————
剪刀石头布(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"}

attach字段释义:
{
"type":1                                    //type=1表示是剪刀石头布
"data": {
    "value":3                                 //1:石头;2:剪刀;3:布
  }
}

————————————————
贴图表情(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"}

attach字段释义:
{
"type":3                                    //type=3表示是贴图表情
"data": {
    "catalog":"xxy",                          //贴图所在文件夹的名称
    "chartlet":"xxy002"                       //贴图文件的名称
  }
}

音视频/白板时长消息抄送

5. "eventType"="5""21"

抄送情景说明

抄送时长场景说明:

1. 主被叫接通,正常结束(通话时长大于0);
2. 主被叫接通,接通的同时立刻挂断(双方都成功进入频道),抄送时长及主被叫账号。备注:立即挂断时,时长也可能不为03. 主被叫接通后出现异常(如:接通时一方网络出现问题),只有一个人成功进入频道(单人进入,抄送时长为0,status是SINGLE_PARTICIPATE),则只抄送成功进入频道的帐号的时长信息;
4. 特别的,对于时长超长通话(通话时长超过12小时)会按照12小时的间隔将时长信息抄送给客户服务器,少于12小时的音视频会话/互动白板会话均不受影响。

HTTP示例

POST  /receiveMsg.action   HTTP/1.1
Host:  yunxinservice.com.cn
Content-Type:  application/json
CurTime: 1440570500855    //当前UTC时间戳,从1970年1月1日0点0 分0 秒开始到现在的毫秒数(String)
MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx     //根据请求中的request body计算出来的MD5值
CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01

{"channelId":"6265489843204131361","createtime":"1458798033925","duration":"25","eventType":"5","live":"1","members":"[{\"accid\":\"lisi\",\"duration\":13},{\"accid\":\"zhangsan\",\"caller\":true,\"duration\":12}]","status":"SUCCESS","type":"AUDIO"}

cURL示例

curl -X POST -H "Content-Type: application/json" -H "CurTime: 1440570500855" -H "MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01" -d '{"channelId":"6265489843204131361","createtime":"1458798033925","duration":"25","eventType":"5","live":"0","members":"[{\"accid\":\"lisi\",\"duration\":13},{\"accid\":\"zhangsan\",\"caller\":true,\"duration\":12}]","status":"SUCCESS","type":"AUDIO"}' 'http://yunxinservice.com.cn/receiveMsg.action'

消息体中的JSON字段说明

名称类型说明
channelName String音视频房间名。点对点通话无此字段。
channelId String通道号
createtime String音视频通话/白板开始的事件, 可转为13位时间戳
duration String此通通话/白板的通话时长,精确到秒,可转为Integer类型
eventType String为5,表示是实时音视频/白板时长类型事件
live String是否是互动直播的音视频,0:否,1:是
members String members表示音视频通话或白板的参与者列表,每位参与者的accid字段表示其账号。
对于点对点音视频通话:如果是主叫,该参与者的caller字段为true;被叫无caller字段。
对于多人音视频通话:房间创建者的caller字段为true(若创建者未加入该音视频房间参与通话,则抄送中不会有caller为true的参与者)。
duration字段表示该参与者的单方时长,白板暂无此字段。
userType字段表示用户类型,1-nrtc用户 2-webrtc用户 3-webrtc H5用户 4-小程序用户。
status String 通话/白板状态:
SUCCESS:表示正常挂断;
TIMEOUT:表示超时;
SINGLE_PARTICIPATE:表示只有一个参与者;
RUNNING:表示音视频通话还未结束的中间一次抄送;特别的对于级联场景,没有SUCCESS的状态,都是RUNNING状态,此时若要判断房间是否结束,请参考eventType=26/27的音视频房间结束抄送;
UNKNOWN:表示未知状态
type String 类型:
AUDIO:表示音频通话;
VEDIO:表示视频通话;
DataTunnel:表示白板事件
ext String 音视频发起时的自定义字段,可选,由用户指定
running Boolean 若为true表示超长时长通话的过程中的抄送,缺省或者false表示普通时长通话的抄送或者超长时长通话的最后一次抄送

消息抄送详细示例

实时音频通话时长消息
抄送示例:
{"channelId":"6265489843204131361","createtime":"1458798033925","duration":"25","eventType":"5","live":"0","members":"[{\"accid\":\"lisi\",\"duration\":13},{\"accid\":\"zhangsan\",\"caller\":true,\"duration\":12}]","status":"SUCCESS","type":"AUDIO"}
实时视频通话时长消息
抄送示例:
{"channelId":"6265490045067594274","createtime":"1458798080073","duration":"22","eventType":"5","live":"1","members":"[{\"accid\":\"lisi\",\"duration\":11},{\"accid\":\"zhangsan\",\"caller\":true,\"duration\":11}]","status":"SUCCESS","type":"VEDIO"}
白板时长消息
抄送示例:
{"channelId":"6668145522152249926","createtime":"1473385450643","duration":"12","eventType":"5","members":"[{\"accid\":\"zhangsan\",\"duration\":6},{\"accid\":\"lisi\",\"caller\":true,\"duration\":6}]","status":"SUCCESS","type":"DataTunnel"}

音视频/白板文件下载信息抄送

6. "eventType"="6""22"

说明:

2018710日(v5.4.0版本)开始,网易云信对音视频录制服务进行录制架构优化,对于超过2小时的音视频通话录制文件,会以2小时(若有需要,可向商务经理发起更改申请)为间隔生成文件并进行抄送,需要开发者在处理抄送时了解上述逻辑并做兼容。

HTTP示例

POST  /receiveMsg.action   HTTP/1.1
Host:  yunxinservice.com.cn
Content-Type:  application/json
CurTime: 1440570500855    //当前UTC时间戳,从1970年1月1日0点0 分0 秒开始到现在的毫秒数(String)
MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx     //根据请求中的request body计算出来的MD5值
CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01

{"eventType":"6","fileinfo":"[{\"caller\":true,\"channelid\":\"6290737000999815988\",\"filename\":\"xxxxxx.type\",\"md5\":\"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\",\"mix\":false,\"size\":\"2167\",\"type\":\"gz\",\"vid\":\"1062591\",\"url\":\"http://xxxxxxxxxxxxxxxxxxxx.type\",\"user\":\"zhangsan\"}]"}

cURL示例

curl -X POST -H "Content-Type: application/json" -H "CurTime: 1440570500855" -H "MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01" -d '{"eventType":"6","fileinfo":"[{\"caller\":true,\"channelid\":\"6290737000999815988\",\"filename\":\"xxxxxx.type\",\"md5\":\"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\",\"mix\":false,\"size\":\"2167\",\"type\":\"gz\",\"vid\":\"1062591\",\"url\":\"http://xxxxxxxxxxxxxxxxxxxx.type\",\"user\":\"zhangsan\"}]"}' 'http://yunxinservice.com.cn/receiveMsg.action'

消息体中的JSON字段说明:

注意:音视频/白板文件下载信息抄送,其中fileinfo字段为JSON数组,最多可包含10个数组元素(即10条文件信息/10个channelid),请开发者注意解析区分。

名称类型说明
eventType String值为6,表示是音视频/白板文件下载信息类型的消息
fileinfo String 可转为JSONArray,其中的字段释义如下:
caller:是否是此通通话的发起者,若是则为true,若不是则没有此字段,可转为Boolean值
channelid:通道号,可转为Long值
filename:文件名,直接存储,混合录制文件filename带有"-mix"标记
md5:文件的md5值
size:文件大小,单位为字符,可转为Long值
type:文件的类型(扩展名),包括:实时音频录制文件(aac)、白板录制文件(gz)、实时视频录制文件(mp4)、互动直播视频录制文件(flv)
url:文件的下载地址
user:用户帐号,若该文件为混合录制文件,则该字段为"0"
mix:是否为混合录制文件,true:混合录制文件;false:单人录制文件
vid:点播文件id,注意白板录制文件(gz)无此字段。通过该参数可以调用点播接口查询相关信息。
pieceindex:录制文件的切片索引,如果单通通话录制时长超过切片时长,则录制文件会被且被切割成多个文件
timestamp:文件生成的系统时间

单聊消息撤回抄送

7. "eventType"="7"

HTTP示例

POST  /receiveMsg.action   HTTP/1.1
Host:  yunxinservice.com.cn
Content-Type:  application/json
CurTime: 1440570500855    //当前UTC时间戳,从1970年1月1日0点0 分0 秒开始到现在的毫秒数(String)
MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx //根据请求中的request body计算出来的MD5值
CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01

{"clientId":"9e549196-1bb4-4143-a428-d13eaa0cd732","deleteTime":"1487308054709","eventType":"7","from":"zhangsan","fromClientType":"IOS","msgId":"11555996","selfMsg":"撤回了一条消息","sendTime":"1487308046652","to":"lisi"}

cURL示例

curl -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":"撤回了一条消息","sendTime":"1487308046652","to":"lisi"}' 'http://yunxinservice.com.cn/receiveMsg.action'

消息体中的JSON字段说明:

名称类型说明
eventType String值为7,表示是一个单聊消息撤回抄送事件
clientId String客户端id,字符串类型
deleteTime String消息撤回时间,13位时间戳
from String用户帐号,消息发送者,字符串类型
fromClientType String消息撤回时的客户端类型: AOS、IOS、PC、WINPHONE、WEB、REST,字符串类型
msgId String撤回的消息的服务端id,可转为Long值
selfMsg String撤回消息的附言,字符串类型
sendTime String消息发送的时间,13位时间戳
to String用户帐号,消息接收者,字符串类型

群聊消息撤回抄送

8. "eventType"="8"

HTTP示例

POST  /receiveMsg.action   HTTP/1.1
Host:  yunxinservice.com.cn
Content-Type:  application/json
CurTime: 1440570500855    //当前UTC时间戳,从1970年1月1日0点0 分0 秒开始到现在的毫秒数(String)
MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx //根据请求中的request body计算出来的MD5值
CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01

{"clientId":"3651689e-53a0-4a1c-beba-7e3703203ef6","deleteTime":"1487309158801","eventType":"8","from":"zhangsan","fromClientType":"IOS","msgId":"927914262574","selfMsg":"撤回了一条消息","sendTime":"1487309155228","to":"13827"}

cURL示例

curl -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":"撤回了一条消息","sendTime":"1487309155228","to":"13827"}' 'http://yunxinservice.com.cn/receiveMsg.action'

消息体中的JSON字段说明

名称类型说明
eventType String值为8,表示是一个群聊消息撤回抄送事件
clientId String客户端id,字符串类型
deleteTime String消息撤回时间,13位时间戳
from String用户帐号,消息发送者,字符串类型
fromClientType String消息撤回时的客户端类型: AOS、IOS、PC、WINPHONE、WEB、REST,字符串类型
msgId String撤回的消息的服务端id,可转为Long值
selfMsg String撤回消息的附言,字符串类型
sendTime String消息发送的时间,13位时间戳
to String群id,可转为Long值

超大群聊消息撤回抄送

8. "eventType"="25"

HTTP示例

POST  /receiveMsg.action   HTTP/1.1
Host:  yunxinservice.com.cn
Content-Type:  application/json
CurTime: 1440570500855    //当前UTC时间戳,从1970年1月1日0点0 分0 秒开始到现在的毫秒数(String)
MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx //根据请求中的request body计算出来的MD5值
CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01

{"clientId":"3651689e-53a0-4a1c-beba-7e3703203ef6","deleteTime":"1487309158801","eventType":"25","from":"zhangsan","fromClientType":"IOS","msgId":"927914262574","selfMsg":"撤回了一条消息","sendTime":"1487309155228","to":"13827"}

cURL示例

curl -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":"撤回了一条消息","sendTime":"1487309155228","to":"13827"}' 'http://yunxinservice.com.cn/receiveMsg.action'

消息体中的JSON字段说明

名称类型说明
eventType String值为25,表示是一个超大群聊消息撤回抄送事件
clientId String客户端id,字符串类型
deleteTime String消息撤回时间,13位时间戳
from String用户帐号,消息发送者,字符串类型
fromClientType String消息撤回时的客户端类型: AOS、IOS、PC、WINPHONE、WEB、REST,字符串类型
msgId String撤回的消息的服务端id,可转为Long值
selfMsg String撤回消息的附言,字符串类型
sendTime String消息发送的时间,13位时间戳
to String群id,可转为Long值

主播或管理员进出聊天室事件抄送

9. "eventType"="9"

HTTP示例

POST  /receiveMsg.action   HTTP/1.1
Host:  yunxinservice.com.cn
Content-Type:  application/json
CurTime: 1440570500855    //当前UTC时间戳,从1970年1月1日0点0 分0 秒开始到现在的毫秒数(String)
MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx //根据请求中的request body计算出来的MD5值
CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01

{"roomId":"1001","event":"IN","accid":"test","clientIp":"192.168.1.100","clientType":"PC","code":"200","eventType":"9","sdkVersion":"18","timestamp":"1452504942126"}

cURL示例

curl -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'

消息体中的JSON字段说明

名称类型说明
eventType String值为9,特别注意这里是9,表示是一个主播或管理员进出聊天室事件
roomId String聊天室id
event String进入或退出。IN:进入聊天室;OUT:主动退出聊天室,或掉线
accid String用户帐号,字符串类型
clientIp String客户端的ip地址,OUT时不保证能提供此字段
clientType String客户端类型: AOS、IOS、PC、WINPHONE、WEB、REST,字符串类型
code String返回码,可转为Integer类型数据
sdkVersion String当前sdk的版本信息,字符串类型
timestamp String事件发生时的时间戳,可转为Long型数据

专线电话通话结束回调抄送

10. "eventType"="10" / "type":"CALL"。需要单独开通,如有需要,请联系相关网易云信商务经理。

新版专线电话抄送由"type":"CALL"标识,请以实际收到的内容为准。

HTTP示例

POST  /receiveMsg.action   HTTP/1.1
Host:  yunxinservice.com.cn
Content-Type:  application/json
CurTime: 1440570500855    //当前UTC时间戳,从1970年1月1日0点0 分0 秒开始到现在的毫秒数(String)
MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx //根据请求中的request body计算出来的MD5值
CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01

//双人专线电话示例
{"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"}

//专线会议示例
{"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示例

//双人专线电话示例
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 -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'

消息体中的JSON字段说明

名称类型说明
eventType String值为10,特别注意这里是10,表示是一个专线电话通话结束回调事件
callback String话单回调的具体内容,为String类型,可转为JSONObject,字段具体释义参考:查询专线电话或会议的详情

短信回执抄送

11. "eventType"="11"

HTTP示例

POST  /receiveMsg.action   HTTP/1.1
Host:  yunxinservice.com.cn
Content-Type:  application/json
CurTime: 1440570500855    //当前UTC时间戳,从1970年1月1日0点0 分0 秒开始到现在的毫秒数(String)
MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx //根据请求中的request body计算出来的MD5值
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示例

curl -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'

消息体中的JSON字段说明

名称类型说明
mobile String手机号码
sendid String短信发送接口返回的sendid
result String运营商返回的短信发送状态码
sendTime String短信发送时间,调用sms-api接口发送短信的时间
reportTime String运营商返回的短信送达时间
spliced String短信计费条数
templateId Long短信对应的模版ID

短信上行抄送

12. "eventType"="12"

HTTP示例

POST  /receiveMsg.action   HTTP/1.1
Host:  yunxinservice.com.cn
Content-Type:  application/json
CurTime: 1440570500855    //当前UTC时间戳,从1970年1月1日0点0 分0 秒开始到现在的毫秒数(String)
MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx //根据请求中的request body计算出来的MD5值
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示例

curl -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'

消息体中的JSON字段说明

名称类型说明
mobile String手机号码
content String上行短信内容
replytime String短信回复时间

用户进出音视频/白板房间抄送

13. "eventType"="13""23"。需要单独开通,如有需要,请联系网易云信商务经理。

HTTP示例

POST  /receiveMsg.action   HTTP/1.1
Host:  yunxinservice.com.cn
Content-Type:  application/json
CurTime: 1440570500855    //当前UTC时间戳,从1970年1月1日0点0 分0 秒开始到现在的毫秒数(String)
MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx //根据请求中的request body计算出来的MD5值
CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01

{"eventType":"13","event":"1","user":"abcd","channelid":"193384021111101","timestamp":"1510812687298","roomtype":"2"}

cURL示例

curl -X POST -H "Content-Type: application/json" -H "CurTime: 1440570500855" -H "MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01" -d '{"eventType":"13","event":"1","user":"abcd","channelid":"193384021111101","timestamp":"1510812687298","roomtype":"2"}' ‘http://yunxinservice.com.cn/receiveMsg.action’

消息体中的JSON字段说明

名称类型说明
event String进入或离开音视频/白板房间:
0:离开音视频/白板房间;注:针对点对点通话,由于断网等异常原因导致超时离开通话频道的用户,不一定会产生离开行为的抄送。
1:进入音视频/白板房间。
可转为Integer值
user String用户账号
channelid String通道号,可转为Long值
timestamp String进入或离开音视频/白板房间的13位时间戳,可转为Long值
roomtype String房间类型:
1:点对点双人房间;
2:多人会议房间;
3:互动直播房间;
4:白板房间。
可转为Integer值

聊天室队列操作事件抄送

14. "eventType"="14"

HTTP示例

POST  /receiveMsg.action   HTTP/1.1
Host:  yunxinservice.com.cn
Content-Type:  application/json
CurTime: 1440570500855    //当前UTC时间戳,从1970年1月1日0点0 分0 秒开始到现在的毫秒数(String)
MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx //根据请求中的request body计算出来的MD5值
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示例

curl -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'

消息体中的JSON字段说明

名称类型说明
qEvent String具体的操作,可转为int,具体枚举如下:
1:表示INIT操作, 队列初始化
2:表示ADD操作,队列新增key-value
3:表示UPDATE操作,队列更新已有key对应的value
4:表示DELETE操作,队列删除元素
5:表示POLL操作,取出(指定/头)元素
6:表示PEAK操作,查看头上的第一个元素,但是不删除
7:表示LIST操作,排序列出所有元素
8:表示DROP操作,队列清空
fromWebApi String是不是由云信服务端api发起的操作,可转为Boolean类型
roomid String聊天室id,可转为Long值
operator String该操作的发起者accid
belongTo String该元素归属用户的accid
elements String元素的key和对应value
keys String元素的keys,不包含value
transient String这个新元素的提交者operator的所有聊天室连接在从该聊天室掉线或者离开该聊天室的时候,提交的元素是否需要删除。 可转为Boolean值。
true:需要删除;false:不需要删除。

易盾异步反垃圾抄送

15. "eventType"="20"。需要单独开通,如有需要,请联系网易云信商务经理。

HTTP示例

POST  /receiveMsg.action   HTTP/1.1
Host:  yunxinservice.com.cn
Content-Type:  application/json
CurTime: 1440570500855    //当前UTC时间戳,从1970年1月1日0点0 分0 秒开始到现在的毫秒数(String)
MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx //根据请求中的request body计算出来的MD5值
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\":\"命中反垃圾的文字\",\"segments\":[{\"startTime\":0.0,\"endTime\":2.0}]}]},\"label\":600.0}]},\"from\":\"pre00001\",\"to\":\"2554814271\",\"type\":\"TEAM_MSG_AUDIO\"}]","eventType":"20"}

cURL示例

curl -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\":\"命中反垃圾的文字\",\"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'

消息体中的JSON字段说明

易盾异步反垃圾抄送结果中部分字段可能为空,请注意对各字段的判空处理。以下为一般情况下必有的字段:eventType、antispam、type、yidunRes
名称类型说明
eventType String抄送事件类型
antispam String是否命中反垃圾
true:命中(目前仅抄送命中的情况)
false:没有命中
type String易盾异步反垃圾类型:
P2P_MSG_AUDIO:点对点语音消息,对应to为接收方账号
TEAM_MSG_AUDIO:群聊语音消息,对应to为群id
SUPERTEAM_MSG_AUDIO:超大群语音消息,对应to为群id
CHATROOM_MSG_AUDIO:聊天室语音消息,对应to为聊天室id
P2P_MSG_VIDEO:点对点视频消息,对应to为接收方账号
TEAM_MSG_VIDEO:群聊视频消息,对应to为群id
SUPERTEAM_MSG_VIDEO:超大群视频消息,对应to为群id
CHATROOM_MSG_VIDEO:聊天室视频消息,对应to为聊天室id
audioUrl String音频、视频文件下载地址
from String消息发送人的账号
to String消息接收方,详细参考type字段
serverMsgId String服务器消息id
clientMsgId String客户端消息id
yidunRes String易盾反垃圾结果,详细请参考易盾文档

点对点消息已读回执抄送

16. "eventType"="30"

HTTP示例

POST  /receiveMsg.action   HTTP/1.1
Host:  yunxinservice.com.cn
Content-Type:  application/json
CurTime: 1440570500855    //当前UTC时间戳,从1970年1月1日0点0 分0 秒开始到现在的毫秒数(String)
MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx //根据请求中的request body计算出来的MD5值
CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01

{"objects":"[{\"toAccount\":\"test100\",\"clientType\":\"AOS\",\"fromAccount\":\"test101\",\"msgidClient\":\"076a5519-59c0-42c9-916d-9652ab390310\",\"timestamp\":1578551421737}]","eventType":"30"}

cURL示例

curl -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'

消息体中的JSON字段说明

请注意对各字段的判空处理。以下为一般情况下必有的字段:eventType、fromAccount、toAccount、clientType、timestamp
名称类型说明
eventType String抄送事件类型
fromAccount String标记消息已读的账号
toAccount String接收消息已读通知的账号(即点对点消息发送方账号)
clientType String客户端类型: AOS、IOS、PC、WINPHONE、WEB、REST,字符串类型
msgidClient String客户端消息ID
timestamp String消息已读事件时间戳

独立信令抄送

17. "eventType"="31"

HTTP示例

POST  /receiveMsg.action   HTTP/1.1
Host:  yunxinservice.com.cn
Content-Type:  application/json
CurTime: 1440570500855    //当前UTC时间戳,从1970年1月1日0点0 分0 秒开始到现在的毫秒数(String)
MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx //根据请求中的request body计算出来的MD5值
CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01

{"type":"CREATE_ROOM","channelId":"xxxx","channelName":"abc","createTime":"1234","creator":"aaa","ext":"aaa","eventType":"31"}

cURL示例

curl -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'

消息体中的JSON字段说明

请注意对各字段的判空处理,一般来说,只有eventType、type、channalId是必填的
名称类型说明
eventType String抄送事件类型,31表示独立信令抄送
type String独立信令抄送类型,包括:CREATE_ROOM、CLOSE_ROOM、LEAVE_ROOM、JOIN_ROOM、INVITE、CANCEL_INVITE、ACCEPT、REJECT、CTRL
channelId String房间的channelId
channelName String房间的channelName
createTime String房间创建时间
creator String房间创建者
ext String扩展字段
from String操作者
to String被操作者
timestamp String操作时间
attachExt String通知扩展字段
isSave String是否存离线,true/false
uid Stringuid,加入房间时会返回
requestId String请求id,邀请/取消邀请/接受/拒绝时包含该字段
needPush String是否需要第三方推送,true/false,邀请时包含该字段
pushTitle String第三方推送标题,邀请时包含该字段
pushContent String第三方推送内容,邀请时包含该字段
pushPayload String第三方推送扩展字段,邀请时包含该字段
needBadge String第三方推送是否需要计入未读计数,true/false,邀请时包含该字段

上传任务抄送

18. "eventType"="36"

HTTP示例

POST  /receiveMsg.action   HTTP/1.1
Host:  yunxinservice.com.cn
Content-Type:  application/json
CurTime: 1440570500855    //当前UTC时间戳,从1970年1月1日0点0 分0 秒开始到现在的毫秒数(String)
MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx //根据请求中的request body计算出来的MD5值
CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01

{"type":"1","uploadInfo":{"uploadMsg":"attach","sdkLogUrl":"https://nim-nosdn.netease.im/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"},"eventType":"36"}

cURL示例

curl -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'

消息体中的JSON字段说明

名称类型说明
eventType String抄送事件类型,36表示上传任务抄送
type String上传任务类型:1:上传sdk日志
uploadInfo String上传的具体信息

音视频房间开始/结束抄送

19. "eventType"="26""27""28""29" 

HTTP示例

POST  /receiveMsg.action   HTTP/1.1
Host:  yunxinservice.com.cn
Content-Type:  application/json
CurTime: 1440570500855    //当前UTC时间戳,从1970年1月1日0点0 分0 秒开始到现在的毫秒数(String)
MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx //根据请求中的request body计算出来的MD5值
CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01

{"channelId": "1234","createtime": "123", "timestamp": "233", eventType":"26"}

cURL示例

curl -X POST -H "Content-Type: application/json" -H "CurTime: 1440570500855" -H "MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01" -d '{"channelId": "1234","createtime": "123", "timestamp": "233", eventType":"26"}' 'http://yunxinservice.com.cn/receiveMsg.action'

消息体中的JSON字段说明

名称类型说明
eventType String抄送事件类型,26表示音视频房间结束抄送,27表示G2音视频房间结束抄送,28表示音视频房间开始抄送,29表示G2音视频房间开始抄送。
说明:以上类型抄送只有在房间为级联房间时会产生
channelId String通道号
createtime String音视频房间创建时间
timestamp String事件发生时间

RTMP事件抄送

20. "eventType"="35"

HTTP示例

POST  /receiveMsg.action   HTTP/1.1
Host:  yunxinservice.com.cn
Content-Type:  application/json
CurTime: 1440570500855    //当前UTC时间戳,从1970年1月1日0点0 分0 秒开始到现在的毫秒数(String)
MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx //根据请求中的request body计算出来的MD5值
CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01

{"cid": "1234","code": "123", "msg": "aaa", "taskId": "abc", "streamUrl": "sassss","eventType":"35"}

cURL示例

curl -X POST -H "Content-Type: application/json" -H "CurTime: 1440570500855" -H "MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "CheckSum: 001511b8435e0b28044ca50a78e8f983026c5e01" -d '{"cid": "1234","code": "123", "msg": "aaa", "taskId": "abc", "streamUrl": "sassss","eventType":"35"}' 'http://yunxinservice.com.cn/receiveMsg.action'

消息体中的JSON字段说明

名称类型说明
eventType String抄送事件类型,35表示RTMP事件抄送,仅支持音视频通话1.0的客户开通
cid String通道号
code String错误码:
推流成功 505 stream push succeeded
推流地址推流失败 506 stream push failed

过程中推流地址被禁用 506 session forbidden
过程中源站转推cdn失败 506 cdn forward failed
开启录制,但应用无录制权限 510 no record permission
推流停止 511 stop pushing stream
msg String描述
taskId String任务ID
streamUrl StringstreamUrl