第三方回调
功能概述
第三方回调是云信一项基于客户需求开放的事件回调能力。简单来讲,就是由客户应用服务器干预事件处理的结果。例如在企业办公场景、接入第三方反垃圾服务场景下,需要在发送方发送消息后,不直接投递给接收方,而是先由云信服务器向应用服务器发出POST请求到应用服务器,根据应用服务器返回的回调结果,决定是否放行。不回调和回调的消息处理流程对比如下:
说明与注意事项
1、第三方回调基于HTTP/HTTPS协议。
2、开通第三方回调服务后,云信服务器会在客户端发送消息时,将消息内容和用户信息发往应用服务器(注意:是云信服务器向应用服务器发起HTTP-POST请求),由应用服务器判断消息是否可以发送,并返回结果,云信服务器再选择是否投递消息。
注意:通过服务端API发送的消息,不会触发第三方回调。
3、请求方式为POST,消息体为application/json; charset=utf-8
,在请求业务方服务器时,会通过增加CheckSum头来进行安全校验,CheckSum = sha1(AppSecret + MD5 + CurTime), 其中AppSecret 、MD5、CurTime均为String类型。在验证数据是否在传输过程中被篡改时,需要计算验证MD5值是否被修改,以及计算验证CheckSum。AppSecret值为开发者的AppSecret(与AppKey对应), MD5值为根据request body计算出来的值。
4、云信服务器只会请求1次,超时时间为2秒,如果请求失败或者超时,云信服务器会使用网易云信控制台上配置的默认回调结果继续处理业务逻辑。可以前往云信控制台 > 选择应用 > IM专业版/免费版 > 功能配置 > 第三方回调
修改接口调用失败时的默认策略。
5、被拉黑后,给对方发消息,也会先进行第三方回调。如果不放行,SDK会返回403;如果放行,SDK会返回7101。
6、特别的,对于部分回调类型(如发点对点消息、群消息等),可以在发送消息时设置环境变量,服务器将根据不同的环境回调到不同的回调地址,环境和回调地址的映射关系配置请联系商务经理。
回调协议格式
第三方回调基于HTTP/HTTPS协议,为保证数据安全,建议开发者使用HTTPS,协议相关说明如下:
1、请求Http Header说明
Header | 类型 | 说明 |
---|---|---|
AppKey | String | 应用的AppKey |
CurTime | Long | 当前UTC时间戳,从1970年1月1日0点0 分0 秒开始到现在的毫秒数(String) |
MD5 | String | 根据请求中的request body计算出来的MD5值 |
CheckSum | String | 校验值 |
Content-Type | String | 请求消息体类型,一般为:application/json |
MD5值计算举例:
String requestBody = "{}";
String MD5 = CheckSumBuilder.getMD5(requestBody); //参考 接口概述 -> API checksum校验 部分
CheckSum值计算举例:
String AppSecret = "90ud57s67187";
String MD5 = "9894907e4ad9de4678091277509361f7";
String CurTime = "1440570500855"; ////当前UTC时间戳,从1970年1月1日0点0 分0 秒开始到现在的毫秒数(String)
String CheckSum = CheckSumBuilder.getCheckSum(AppSecret, MD5, CurTime); //参考 接口概述 -> API checksum校验 部分
2、请求Http Body说明
消息体统一为Json格式,示例:
{
"body": "Hello 云信!",
"eventType": 1,
"fromAccount": "000266",
"fromClientType": "WEB",
"fromDeviceId": "617715aa8579db03f0cf054c199cc71b",
"fromNick": "yj000266",
"msgTimestamp": "1541560157286",
"msgType": "TEXT",
"msgidClient": "",
"to": "005877",
"fromClientIp":"115.211.51.45",
"fromClientPort":"56802"
}
//Json中的属性请参考具体的回调类型
3、响应格式说明
第三方回调响应的Content-Type Header需要设置为:application/json; charset=utf-8
响应消息体为Json格式,示例:
{
"errCode":0,
"responseCode": 20000,
"modifyResponse": {},
"callbackExt": "aa"
}
字段说明:
字段 | 说明 |
---|---|
errCode |
0:表示回调通过,允许执行。 1:表示回调不通过,取消执行。如果设置了合法的自定义错误码(responseCode),则发送端会收到自定义错误码,否则发送端会收到403错误码。 |
responseCode |
1、当errCode=1时有效 2、范围是20000-20099,其他值无效,会被忽略 3、特别的,对于消息类型的第三方回调(eventType=1、2、6、22),支持设置为200的错误码,客户端表现为消息发送成功,其实消息发送失败 |
modifyResponse |
1、对于消息类型的第三方回调有效(eventType=1、2、6、22),用于篡改消息内容 2、JSON格式,支持body、attach、ext三个字段(均可选,若不填则不替换),三个字段的长度限制和正常发消息的限制一样。例子:{"body":"xxx","attach":"xxx","ext":"123"}。 3、效果:消息接收方收到的消息的上述三个字段将会被替换,消息发送方无感知,但是消息发送方的多端设备收到的消息是修改后的,此外,离线消息、漫游消息、云端历史消息,存储的均是修改后的消息内容,因此不管是消息发送方还是接收方,从云信服务器获取到的消息均是修改后的消息。 |
callbackExt |
1、对于消息类型的第三方回调有效(eventType=1、2、6、22),用于传递第三方回调的扩展信息,最大1024个字符 2、消息发送者和消息接收者均能获取该扩展字段(需要SDK版本大于等于v7.7.0) 3、若errCode=1,则只有消息发送者能获取到该字段 |
第三方回调事件类型
支持的回调事件类型如下:
eventType | 功能 | 说明 |
---|---|---|
1 | P2P消息回调 | 通过SDK发送P2P消息时,参数检查通过后先回调开发者服务器,回调通过后才发送消息,否则消息发送失败。 |
2 | 群组消息回调 | 通过SDK发送群组消息时,参数检查通过后先回调开发者服务器,回调通过后才发送消息,否则消息发送失败。 |
3 | 用户资料变更回调 | 通过SDK变更用户资料时,参数检查通过后先回调开发者服务器,回调通过后才允许变更,否则变更失败。 |
4 | 添加好友回调 | 通过SDK添加好友时,参数检查通过后先回调开发者服务器,回调通过后才允许添加,否则添加失败。 |
5 | 删除好友回调 | 通过SDK删除好友时,参数检查通过后先回调开发者服务器,回调通过后才允许删除,否则删除失败。 |
6 | 聊天室消息回调 | 通过SDK发送聊天室消息时,参数检查通过后先回调开发者服务器,回调通过后才发送消息,否则消息发送失败。 |
7 | 创建群回调 | 通过SDK创建群组时,参数检查通过后先回调开发者服务器,回调通过后才允许创建,否则创建失败。 |
8 | 解散群回调 | 通过SDK解散群组时,参数检查通过后先回调开发者服务器,回调通过后才允许解散,否则解散失败。 |
9 | 群邀请回调 | 通过SDK群邀请时,参数检查通过后先回调开发者服务器,回调通过后才允许邀请,否则邀请失败。 |
10 | 退群回调 | 通过SDK退群时,参数检查通过后先回调开发者服务器,回调通过后才允许退群,否则退群失败。 |
11 | 增加群管理员回调 | 通过SDK增加管理员时,参数检查通过后先回调开发者服务器,回调通过后才允许增加管理员,否则操作失败。 |
12 | 取消群管理员回调 | 通过SDK取消管理员时,参数检查通过后先回调开发者服务器,回调通过后才允许取消管理员,否则操作失败。 |
13 | 转让群回调 | 通过SDK转让群时,参数检查通过后先回调开发者服务器,回调通过后才允许转让群,否则转让失败。 |
14 | 踢人出群回调 | 通过SDK踢人出群时,参数检查通过后先回调开发者服务器,回调通过后才允许踢人出群,否则踢人失败。 |
15 | 更新群信息回调 | 通过SDK更新群信息时,参数检查通过后先回调开发者服务器,回调通过后才允许更新群信息,否则更新失败。 |
16 | 更新群成员信息回调 | 通过SDK更新群成员信息时,参数检查通过后先回调开发者服务器,回调通过后才允许更新群成员信息,否则更新失败。 |
17 | 更新其他人的群成员信息回调 | 通过SDK更新其他人的群成员信息时,参数检查通过后先回调开发者服务器,回调通过后才允许更新其他人的群成员信息,否则更新失败。 |
18 | 禁言群成员回调 | 通过SDK禁言群成员时,参数检查通过后先回调开发者服务器,回调通过后才允许禁言群成员,否则操作失败。 |
19 | 申请入群回调 | 通过SDK申请入群时,参数检查通过后先回调开发者服务器,回调通过后才允许申请入群,否则申请失败。 |
20 | 音视频呼叫回调 | 通过SDK发起点对点音视频呼叫,参数检查通过后先回调开发者服务器,回调通过后才允许发起呼叫,否则呼叫失败。 |
21 | 音视频会议创建回调 | 通过SDK创建音视频多人房间,参数检查通过后先回调开发者服务器,回调通过后才允许创建,否则创建失败。 |
22 | 超大群消息回调 | 通过SDK发送超大群消息时,参数检查通过后先回调开发者服务器,回调通过后才发送消息,否则消息发送失败。 |
23 | 超大群群邀请回调 | 通过SDK超大群的群邀请时,参数检查通过后先回调开发者服务器,回调通过后才允许邀请,否则邀请失败。 |
24 | 超大群踢人出群回调 | 通过SDK踢人出超大群时,参数检查通过后先回调开发者服务器,回调通过后才允许踢人出群,否则踢人失败。 |
25 | 超大群退群回调 | 通过SDK超大群的退群时,参数检查通过后先回调开发者服务器,回调通过后才允许退群,否则退群失败。 |
26 | 更新超大群群信息回调 | 通过SDK更新超大群的群信息时,参数检查通过后先回调开发者服务器,回调通过后才允许更新群信息,否则更新失败。 |
27 | 更新超大群群成员信息回调 | 通过SDK更新超大群的群成员信息时,参数检查通过后先回调开发者服务器,回调通过后才允许更新群成员信息,否则更新失败。 |
28 | 超大群申请入群回调 | 通过SDK申请超大群入群时,参数检查通过后先回调开发者服务器,回调通过后才允许申请入群,否则申请失败。 |
29 | 增加超大群管理员回调 | 通过SDK增加管理员时,参数检查通过后先回调开发者服务器,回调通过后才允许增加管理员,否则操作失败。 |
30 | 取消超大群管理员回调 | 通过SDK取消管理员时,参数检查通过后先回调开发者服务器,回调通过后才允许取消管理员,否则操作失败。 |
31 | 禁言超大群回调 | 通过SDK禁言超大群时,参数检查通过后先回调开发者服务器,回调通过后才允许禁言超大群,否则操作失败。 |
32 | 禁言超大群群成员回调 | 通过SDK禁言超大群群成员时,参数检查通过后先回调开发者服务器,回调通过后才允许禁言群成员,否则操作失败。 |
33 | 更新超大群里其他人的群成员信息回调 | 通过SDK更新其他人的群成员信息时,参数检查通过后先回调开发者服务器,回调通过后才允许更新其他人的群成员信息,否则更新失败。 |
34 | 转让超大群回调 | 通过SDK转让超大群时,参数检查通过后先回调开发者服务器,回调通过后才允许转让群,否则转让失败。 |
35 | 消息撤回回调 | 进行点对点消息撤回或者群消息撤回时,参数检查通过后先回调开发者服务器,回调通过后才允许撤回,否则撤回失败。 |
假设第三方开发者的消息接收地址为:
http://yunxinservice.com.cn/receiveMsg.action
以下的第三方接口均假设为此接口,不再赘述。
会话消息回调
示例-会话消息请求:
1.1. HTTP示例
1.2. cURL示例
1.3. 消息体中的JSON字段说明
1.1 HTTP示例:
POST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
AppKey: 158983881e092b052194d219453d6542
CurTime: 1541583920979
MD5: e89c284a5ad9a76b3176e23108920f81
CheckSum: 6f08c5ee2dd16a5fc34a12005e5d5f1411e657a1
Content-Type: application/json
Cache-Control: no-cache
{"body":"123456","eventType":1,"fromAccount":"000266","fromClientType":"WEB","fromDeviceId":"617715aa8579db03f0cf054c199cc71b","fromNick":"yj000266","msgTimestamp":"1541560157286","msgType":"TEXT","msgidClient":"","to":"005877","fromClientIp":"115.211.51.45","fromClientPort":"56802"}
1.2 cURL示例:
curl -X POST \
http://yunxinservice.com.cn/receiveMsg.action \
-H 'appkey: 158983881e092b052194d219453d6542' \
-H 'cache-control: no-cache' \
-H 'checksum: 6f08c5ee2dd16a5fc34a12005e5d5f1411e657a1' \
-H 'content-type: application/json' \
-H 'curtime: 1541583920979' \
-H 'md5: e89c284a5ad9a76b3176e23108920f81' \
-d '{"body":"123456","eventType":1,"fromAccount":"000266","fromClientType":"WEB","fromDeviceId":"617715aa8579db03f0cf054c199cc71b","fromNick":"yj000266","msgTimestamp":"1541560157286","msgType":"TEXT","msgidClient":"","to":"005877","fromClientIp":"115.211.51.45","fromClientPort":"56802"}'
1.3 消息体中的JSON字段说明:
回调消息中并不是每个字段都会一定抄送,请注意对各字段的判空处理。
注意:针对聊天室消息,body为空,文本内容、图片内容等均承载在attach中。
名称 | 类型 | 必须 | 说明 |
---|---|---|---|
eventType | Integer | 是 | 参见第三方回调事件类型,包括:点对点消息、群消息、聊天室消息、超大群消息 |
fromAccount | String | 是 | 消息发送者的用户账号 |
fromNick | String | 否 | 发送方昵称 |
fromClientType | String | 是 | 发送客户端类型: AOS、IOS、PC、WINPHONE、WEB、REST |
fromDeviceId | String | 是 | 发送设备id |
to | String | 是 | 若eventType为1,则to为消息接收者的用户账号,字符串类型 若eventType为2,则to为tid,即群id,可转为Long型数据 若eventType为6,则to为roomid,即聊天室id,可转为Long型数据 若eventType为22,则to为tid,即超大群id,可转为Long型数据 |
msgTimestamp | String | 是 | 消息发送时间 |
msgType | String | 是 |
TEXT :文本消息 PICTURE :图片消息 AUDIO :语音消息 VIDEO :视频消息 LOCATION :地理位置 NOTIFICATION :通知 FILE :文件消息 TIPS :提示类型消息 CUSTOM :自定义消息 |
fromClientIp | String | 否 | 消息发送方的客户端IP地址 |
fromClientPort | String | 否 | 消息发送方的客户端端口号 |
msgidClient | String | 否 | 客户端消息Id |
body | String | 否 | 消息内容 |
attach | String | 否 | 消息附件 |
ext | String | 否 | 消息扩展字段 |
用户资料变更回调
示例-用户资料变更请求:
2.1. HTTP示例
2.2. cURL示例
2.3. 消息体中的JSON字段说明
2.1 HTTP示例:
POST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
AppKey: 158983881e092b052194d219453d6542
CurTime: 1541583920979
MD5: e89c284a5ad9a76b3176e23108920f81
CheckSum: 6f08c5ee2dd16a5fc34a12005e5d5f1411e657a1
Content-Type: application/json
Cache-Control: no-cache
{"account":"yx0002","birth":"2009-11-30","clientType":"PC","deviceId":"4f716737-75dd-41cb-bc6c-d9516ff03f707bd899c82e64bdc8a5220c07c744","email":"555555@163.com","eventType":3,"ex":"","gender":1,"icon":"https://ss0.bdstatic.com/94oJfD_bAAcT8t7mm9GUKT-xh_/timg?image&quality=100&size=b4000_4000&sec=1552461348&di=536bb9721d145a07657df45a8da49321&src=http://img0.pconline.com.cn/pconline/1511/29/7257120_901_thumb.jpg","mobile":"18888888888","name":"0002","sign":"这是签名","timestamp":"1552461406587"}
2.2 cURL示例:
curl -X POST \
http://yunxinservice.com.cn/receiveMsg.action \
-H 'appkey: 158983881e092b052194d219453d6542' \
-H 'cache-control: no-cache' \
-H 'checksum: 6f08c5ee2dd16a5fc34a12005e5d5f1411e657a1' \
-H 'content-type: application/json' \
-H 'curtime: 1541583920979' \
-H 'md5: e89c284a5ad9a76b3176e23108920f81' \
-d '{"account":"yx0002","birth":"2009-11-30","clientType":"PC","deviceId":"4f716737-75dd-41cb-bc6c-d9516ff03f707bd899c82e64bdc8a5220c07c744","email":"555555@163.com","eventType":3,"ex":"","gender":1,"icon":"https://ss0.bdstatic.com/94oJfD_bAAcT8t7mm9GUKT-xh_/timg?image&quality=100&size=b4000_4000&sec=1552461348&di=536bb9721d145a07657df45a8da49321&src=http://img0.pconline.com.cn/pconline/1511/29/7257120_901_thumb.jpg","mobile":"18888888888","name":"0002","sign":"这是签名","timestamp":"1552461406587"}'
2.3 消息体中的JSON字段说明:
回调消息中并不是每个字段都会一定抄送,请注意对各字段的判空处理。
只抄送用户资料变更的字段
名称 | 类型 | 必须 | 说明 |
---|---|---|---|
eventType | Integer | 是 | 值为3,表示是用户资料变更回调 |
account | String | 是 | 用户账号 |
deviceId | String | 是 | 发送方设备id |
clientType | String | 是 | 发送客户端类型: AOS、IOS、PC、WINPHONE、WEB、REST |
name | String | 否 | 昵称 |
icon | String | 否 | 头像图标 |
sign | String | 否 | 签名 |
String | 否 | ||
birth | String | 否 | 生日 |
mobile | String | 否 | 手机号 |
gender | Integer | 否 | 用户性别,0表示未知,1表示男,2表示女 |
ex | String | 否 | 用户名片扩展字段 |
timestamp | String | 是 | 操作时间,字符串类型 |
好友关系变更回调
示例-好友关系变更请求:
3.1. HTTP示例
3.2. cURL示例
3.3. 消息体中的JSON字段说明
3.1 HTTP示例:
POST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
AppKey: 158983881e092b052194d219453d6542
CurTime: 1541583920979
MD5: e89c284a5ad9a76b3176e23108920f81
CheckSum: 6f08c5ee2dd16a5fc34a12005e5d5f1411e657a1
Content-Type: application/json
Cache-Control: no-cache
{"eventType":4,"fromAccount":"yx0001","fromClientType":"PC","fromDeviceId":"dd950b87-3c23-4c6d-863e-4c1fdeec1ecde54f68c09b22c55214cff7618ac5","msg":"加我加我","timestamp":"1552461598694","toAccount":"yx0002","verifyType":1}
3.2 cURL示例:
curl -X POST \
http://yunxinservice.com.cn/receiveMsg.action \
-H 'appkey: 158983881e092b052194d219453d6542' \
-H 'cache-control: no-cache' \
-H 'checksum: 6f08c5ee2dd16a5fc34a12005e5d5f1411e657a1' \
-H 'content-type: application/json' \
-H 'curtime: 1541583920979' \
-H 'md5: e89c284a5ad9a76b3176e23108920f81' \
-d '{"eventType":4,"fromAccount":"yx0001","fromClientType":"PC","fromDeviceId":"dd950b87-3c23-4c6d-863e-4c1fdeec1ecde54f68c09b22c55214cff7618ac5","msg":"加我加我","timestamp":"1552461598694","toAccount":"yx0002","verifyType":1}'
3.3 消息体中的JSON字段说明:
回调消息中并不是每个字段都会一定抄送,请注意对各字段的判空处理。
注意区分添加好友和删除好友抄送的字段有所不同
名称 | 类型 | 必须 | 说明 |
---|---|---|---|
eventType | Integer | 是 | 值为4,表示是添加好友回调; 值为5,表示是删除好友回调 |
fromAccount | String | 是 | 发起者账号 |
toAccount | String | 是 | 接收者账号 |
fromDeviceId | String | 是 | 发送方设备id |
fromClientType | String | 是 | 发送客户端类型: AOS、IOS、PC、WINPHONE、WEB、REST |
verifyType | Integer | 否 | 添加好友时此字段必有;含义:1直接加好友,2请求加好友,3同意加好友,4拒绝加好友 |
msg | String | 否 | 添加好友时此字段有效;含义:加好友对应的请求信息 |
timestamp | String | 是 | 操作时间,字符串类型 |
创建群回调
示例-创建群变更请求:
4.1. HTTP示例
4.2. cURL示例
4.3. 消息体中的JSON字段说明
4.1 HTTP示例:
POST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
AppKey: 158983881e092b052194d219453d6542
CurTime: 1541583920979
MD5: e89c284a5ad9a76b3176e23108920f81
CheckSum: 6f08c5ee2dd16a5fc34a12005e5d5f1411e657a1
Content-Type: application/json
Cache-Control: no-cache
{"announcement":"wmtest2创建群公告1564566444990","beinvitemode":1,"creator":"wmtest2","custom":"wmtest2创建群自定义属性","eventType":7,"fromClientType":"IOS","fromDeviceId":"d95488e2-94ee-4e9b-bc85-2df1d7f1f450","icon":"http://xxx.nos.netease.com/MTAxMTAxMA==/bmltYV8xNDMwMzVfMTQ0NzIwOTc4MTgyM18xMGY4YmMzYS1jOWI2LTQ0MjctYmZjNC1iMmY3NzdlODY2ZDI=","intro":"wmtest2测试同步期间在线群消息1564566444990","inviteList":["wmtest1","wmtest3","wmtest4","wmtest5"],"invitemode":1,"joinmode":0,"level":100,"msg":"快来加入吧","servercustom":"wmtest2群自定义属性","teamMuteType":0,"timestamp":"1564566441074","tname":"wmtest2wm3","type":1,"upcustommode":1,"uptinfomode":1}
4.2 cURL示例:
curl -X POST \
http://yunxinservice.com.cn/receiveMsg.action \
-H 'appkey: 158983881e092b052194d219453d6542' \
-H 'cache-control: no-cache' \
-H 'checksum: 6f08c5ee2dd16a5fc34a12005e5d5f1411e657a1' \
-H 'content-type: application/json' \
-H 'curtime: 1541583920979' \
-H 'md5: e89c284a5ad9a76b3176e23108920f81' \
-d '{"announcement":"wmtest2创建群公告1564566444990","beinvitemode":1,"creator":"wmtest2","custom":"wmtest2创建群自定义属性","eventType":7,"fromClientType":"IOS","fromDeviceId":"d95488e2-94ee-4e9b-bc85-2df1d7f1f450","icon":"http://xxx.nos.netease.com/MTAxMTAxMA==/bmltYV8xNDMwMzVfMTQ0NzIwOTc4MTgyM18xMGY4YmMzYS1jOWI2LTQ0MjctYmZjNC1iMmY3NzdlODY2ZDI=","intro":"wmtest2测试同步期间在线群消息1564566444990","inviteList":["wmtest1","wmtest3","wmtest4","wmtest5"],"invitemode":1,"joinmode":0,"level":100,"msg":"快来加入吧","servercustom":"wmtest2群自定义属性","teamMuteType":0,"timestamp":"1564566441074","tname":"wmtest2wm3","type":1,"upcustommode":1,"uptinfomode":1}'
4.3 消息体中的JSON字段说明:
回调消息中并不是每个字段都会一定抄送,请注意对各字段的判空处理。
名称 | 类型 | 必须 | 说明 |
---|---|---|---|
eventType | Integer | 是 | 值为7,表示是创建群回调 |
type | Integer | 是 | 群组类型,0表示普通群,1表示高级群 |
creator | String | 是 | 创建者账号 |
fromDeviceId | String | 是 | 创建者设备id |
fromClientType | String | 是 | 创建者客户端类型: AOS、IOS、PC、WINPHONE、WEB、REST |
tname | String | 否 | 群名称 |
icon | String | 否 | 群头像 |
custom | String | 否 | 自定义字段 |
intro | String | 否 | 群简介 |
msg | String | 否 | 加群信息 |
announcement | String | 否 | 群公告 |
servercustom | String | 否 | 服务器自定义字段 |
inviteList | JSONArray | 否 | 建群时邀请的人 |
teamMuteType | Integer | 否 | 群禁言类型,0表示不禁言,1表示禁言普通成员,3表示禁言整个群(包括群主) |
level | Integer | 是 | 最大群成员数量 |
joinmode | Integer | 否 | 申请入群权限,0表示不需要申请,1表示需要申请,2表示不允许申请 |
beinvitemode | Integer | 否 | 被邀请人同意方式,0表示需要同意,1表示不需要同意 |
invitemode | Integer | 否 | 谁可以邀请他人入群,0表示管理员,1表示所有人 |
uptinfomode | Integer | 否 | 谁可以修改群资料群,0表示管理员,1表示所有人 |
upcustommode | Integer | 否 | 谁可以更新自定义字段,0表示管理员,1表示所有人 |
timestamp | String | 是 | 操作时间,字符串类型 |
解散群回调
示例-解散群请求:
5.1. HTTP示例
5.2. cURL示例
5.3. 消息体中的JSON字段说明
5.1 HTTP示例:
POST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
AppKey: 158983881e092b052194d219453d6542
CurTime: 1541583920979
MD5: e89c284a5ad9a76b3176e23108920f81
CheckSum: 6f08c5ee2dd16a5fc34a12005e5d5f1411e657a1
Content-Type: application/json
Cache-Control: no-cache
{"eventType":8,"fromAccount":"wmtest3","fromClientType":"IOS","fromDeviceId":"4f60d2c0-559d-4b84-8315-29c94d8a4ea8","tid":2637250619,"timestamp":"1564575855993"}
5.2 cURL示例:
curl -X POST \
http://yunxinservice.com.cn/receiveMsg.action \
-H 'appkey: 158983881e092b052194d219453d6542' \
-H 'cache-control: no-cache' \
-H 'checksum: 6f08c5ee2dd16a5fc34a12005e5d5f1411e657a1' \
-H 'content-type: application/json' \
-H 'curtime: 1541583920979' \
-H 'md5: e89c284a5ad9a76b3176e23108920f81' \
-d '{"eventType":8,"fromAccount":"wmtest3","fromClientType":"IOS","fromDeviceId":"4f60d2c0-559d-4b84-8315-29c94d8a4ea8","tid":2637250619,"timestamp":"1564575855993"}'
5.3 消息体中的JSON字段说明:
回调消息中并不是每个字段都会一定抄送,请注意对各字段的判空处理。
名称 | 类型 | 必须 | 说明 |
---|---|---|---|
eventType | Integer | 是 | 值为8,表示是解散群回调 |
tid | Long | 是 | 群id |
fromAccount | String | 是 | 操作者账号 |
fromDeviceId | String | 是 | 操作者设备id |
fromClientType | String | 是 | 操作者客户端类型: AOS、IOS、PC、WINPHONE、WEB、REST |
timestamp | String | 是 | 操作时间,字符串类型 |
群邀请回调
示例-群邀请请求:
6.1. HTTP示例
6.2. cURL示例
6.3. 消息体中的JSON字段说明
6.1 HTTP示例:
POST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
AppKey: 158983881e092b052194d219453d6542
CurTime: 1541583920979
MD5: e89c284a5ad9a76b3176e23108920f81
CheckSum: 6f08c5ee2dd16a5fc34a12005e5d5f1411e657a1
Content-Type: application/json
Cache-Control: no-cache
{"beinvitemode":0,"eventType":9,"fromAccount":"wmtest1","fromClientType":"IOS","fromDeviceId":"abe0f670-ee18-453b-af5f-54d5a08bd57f","inviteList":["wmtest10"],"msg":"普通人邀请","tid":2637216281,"timestamp":"1564572716247","type":1}
6.2 cURL示例:
curl -X POST \
http://yunxinservice.com.cn/receiveMsg.action \
-H 'appkey: 158983881e092b052194d219453d6542' \
-H 'cache-control: no-cache' \
-H 'checksum: 6f08c5ee2dd16a5fc34a12005e5d5f1411e657a1' \
-H 'content-type: application/json' \
-H 'curtime: 1541583920979' \
-H 'md5: e89c284a5ad9a76b3176e23108920f81' \
-d '{"beinvitemode":0,"eventType":9,"fromAccount":"wmtest1","fromClientType":"IOS","fromDeviceId":"abe0f670-ee18-453b-af5f-54d5a08bd57f","inviteList":["wmtest10"],"msg":"普通人邀请","tid":2637216281,"timestamp":"1564572716247","type":1}'
6.3 消息体中的JSON字段说明:
回调消息中并不是每个字段都会一定抄送,请注意对各字段的判空处理。
名称 | 类型 | 必须 | 说明 |
---|---|---|---|
eventType | Integer | 是 | 值为9,表示是群邀请回调 |
tid | Long | 是 | 群id |
fromAccount | String | 是 | 操作者账号 |
fromDeviceId | String | 是 | 操作者设备id |
fromClientType | String | 是 | 操作者客户端类型: AOS、IOS、PC、WINPHONE、WEB、REST |
type | Integer | 是 | 群组类型,0表示普通群,1表示高级群 |
beinvitemode | Integer | 是 | 被邀请人同意方式,0表示需要同意,1表示不需要同意 |
inviteList | JSONArray | 是 | 邀请的人 |
msg | String | 否 | 邀请附言 |
attach | String | 否 | 拉人的attach信息 |
timestamp | String | 是 | 操作时间,字符串类型 |
退群回调
示例-退群请求:
7.1. HTTP示例
7.2. cURL示例
7.3. 消息体中的JSON字段说明
7.1 HTTP示例:
POST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
AppKey: 158983881e092b052194d219453d6542
CurTime: 1541583920979
MD5: e89c284a5ad9a76b3176e23108920f81
CheckSum: 6f08c5ee2dd16a5fc34a12005e5d5f1411e657a1
Content-Type: application/json
Cache-Control: no-cache
{"eventType":10,"fromAccount":"wmtest7","fromClientType":"IOS","fromDeviceId":"543d2548-140d-434c-804c-f931fdc23ea9","tid":2637216281,"timestamp":"1564573486382"}
7.2 cURL示例:
curl -X POST \
http://yunxinservice.com.cn/receiveMsg.action \
-H 'appkey: 158983881e092b052194d219453d6542' \
-H 'cache-control: no-cache' \
-H 'checksum: 6f08c5ee2dd16a5fc34a12005e5d5f1411e657a1' \
-H 'content-type: application/json' \
-H 'curtime: 1541583920979' \
-H 'md5: e89c284a5ad9a76b3176e23108920f81' \
-d '{"eventType":10,"fromAccount":"wmtest7","fromClientType":"IOS","fromDeviceId":"543d2548-140d-434c-804c-f931fdc23ea9","tid":2637216281,"timestamp":"1564573486382"}'
7.3 消息体中的JSON字段说明:
回调消息中并不是每个字段都会一定抄送,请注意对各字段的判空处理。
名称 | 类型 | 必须 | 说明 |
---|---|---|---|
eventType | Integer | 是 | 值为10,表示是退群回调 |
tid | Long | 是 | 群id |
fromAccount | String | 是 | 操作者账号 |
fromDeviceId | String | 是 | 操作者设备id |
fromClientType | String | 是 | 操作者客户端类型: AOS、IOS、PC、WINPHONE、WEB、REST |
timestamp | String | 是 | 操作时间,字符串类型 |
增加群管理员回调
示例-增加群管理员请求:
8.1. HTTP示例
8.2. cURL示例
8.3. 消息体中的JSON字段说明
8.1 HTTP示例:
POST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
AppKey: 158983881e092b052194d219453d6542
CurTime: 1541583920979
MD5: e89c284a5ad9a76b3176e23108920f81
CheckSum: 6f08c5ee2dd16a5fc34a12005e5d5f1411e657a1
Content-Type: application/json
Cache-Control: no-cache
{"eventType":11,"fromAccount":"wmtest1","fromClientType":"IOS","fromDeviceId":"6c11bb65-5506-4fdb-ac37-6ec3c8bdd220","managerList":["wmtest3"],"tid":2637250619,"timestamp":"1564575715262"}
8.2 cURL示例:
curl -X POST \
http://yunxinservice.com.cn/receiveMsg.action \
-H 'appkey: 158983881e092b052194d219453d6542' \
-H 'cache-control: no-cache' \
-H 'checksum: 6f08c5ee2dd16a5fc34a12005e5d5f1411e657a1' \
-H 'content-type: application/json' \
-H 'curtime: 1541583920979' \
-H 'md5: e89c284a5ad9a76b3176e23108920f81' \
-d '{"eventType":11,"fromAccount":"wmtest1","fromClientType":"IOS","fromDeviceId":"6c11bb65-5506-4fdb-ac37-6ec3c8bdd220","managerList":["wmtest3"],"tid":2637250619,"timestamp":"1564575715262"}'
8.3 消息体中的JSON字段说明:
回调消息中并不是每个字段都会一定抄送,请注意对各字段的判空处理。
名称 | 类型 | 必须 | 说明 |
---|---|---|---|
eventType | Integer | 是 | 值为11,表示是增加群管理员回调 |
tid | Long | 是 | 群id |
fromAccount | String | 是 | 操作者账号 |
fromDeviceId | String | 是 | 操作者设备id |
fromClientType | String | 是 | 操作者客户端类型: AOS、IOS、PC、WINPHONE、WEB、REST |
managerList | JSONArray | 是 | 管理员列表 |
timestamp | String | 是 | 操作时间,字符串类型 |
取消群管理员回调
示例-取消群管理员请求:
9.1. HTTP示例
9.2. cURL示例
9.3. 消息体中的JSON字段说明
9.1 HTTP示例:
POST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
AppKey: 158983881e092b052194d219453d6542
CurTime: 1541583920979
MD5: e89c284a5ad9a76b3176e23108920f81
CheckSum: 6f08c5ee2dd16a5fc34a12005e5d5f1411e657a1
Content-Type: application/json
Cache-Control: no-cache
{"eventType":12,"fromAccount":"wmtest1","fromClientType":"IOS","fromDeviceId":"ccdb6218-8672-4aca-8e26-f8843a2c4eeb","managerList":["wmtest3"],"tid":2637250619,"timestamp":"1564575744921"}
9.2 cURL示例:
curl -X POST \
http://yunxinservice.com.cn/receiveMsg.action \
-H 'appkey: 158983881e092b052194d219453d6542' \
-H 'cache-control: no-cache' \
-H 'checksum: 6f08c5ee2dd16a5fc34a12005e5d5f1411e657a1' \
-H 'content-type: application/json' \
-H 'curtime: 1541583920979' \
-H 'md5: e89c284a5ad9a76b3176e23108920f81' \
-d '{"eventType":12,"fromAccount":"wmtest1","fromClientType":"IOS","fromDeviceId":"ccdb6218-8672-4aca-8e26-f8843a2c4eeb","managerList":["wmtest3"],"tid":2637250619,"timestamp":"1564575744921"}'
9.3 消息体中的JSON字段说明:
回调消息中并不是每个字段都会一定抄送,请注意对各字段的判空处理。
名称 | 类型 | 必须 | 说明 |
---|---|---|---|
eventType | Integer | 是 | 值为12,表示是取消群管理员回调 |
tid | Long | 是 | 群id |
fromAccount | String | 是 | 操作者账号 |
fromDeviceId | String | 是 | 操作者设备id |
fromClientType | String | 是 | 操作者客户端类型: AOS、IOS、PC、WINPHONE、WEB、REST |
managerList | JSONArray | 是 | 管理员列表 |
timestamp | String | 是 | 操作时间,字符串类型 |
转让群回调
示例-转让群群管理员请求:
10.1. HTTP示例
10.2. cURL示例
10.3. 消息体中的JSON字段说明
10.1 HTTP示例:
POST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
AppKey: 158983881e092b052194d219453d6542
CurTime: 1541583920979
MD5: e89c284a5ad9a76b3176e23108920f81
CheckSum: 6f08c5ee2dd16a5fc34a12005e5d5f1411e657a1
Content-Type: application/json
Cache-Control: no-cache
{"eventType":13,"fromAccount":"wmtest1","fromClientType":"IOS","fromDeviceId":"4777fe02-b9d2-42c0-9586-f29c2ca32f5d","leave":false,"tid":2637250619,"timestamp":"1564575814255","toAccount":"wmtest3"}
10.2 cURL示例:
curl -X POST \
http://yunxinservice.com.cn/receiveMsg.action \
-H 'appkey: 158983881e092b052194d219453d6542' \
-H 'cache-control: no-cache' \
-H 'checksum: 6f08c5ee2dd16a5fc34a12005e5d5f1411e657a1' \
-H 'content-type: application/json' \
-H 'curtime: 1541583920979' \
-H 'md5: e89c284a5ad9a76b3176e23108920f81' \
-d '{"eventType":13,"fromAccount":"wmtest1","fromClientType":"IOS","fromDeviceId":"4777fe02-b9d2-42c0-9586-f29c2ca32f5d","leave":false,"tid":2637250619,"timestamp":"1564575814255","toAccount":"wmtest3"}'
10.3 消息体中的JSON字段说明:
回调消息中并不是每个字段都会一定抄送,请注意对各字段的判空处理。
名称 | 类型 | 必须 | 说明 |
---|---|---|---|
eventType | Integer | 是 | 值为13,表示是转让群回调 |
tid | Long | 是 | 群id |
fromAccount | String | 是 | 操作者账号 |
fromDeviceId | String | 是 | 操作者设备id |
fromClientType | String | 是 | 操作者客户端类型: AOS、IOS、PC、WINPHONE、WEB、REST |
toAccount | String | 是 | 对方账户 |
leave | Boolean | 是 | 操作者是否退群 |
timestamp | String | 是 | 操作时间,字符串类型 |
踢人出群回调
示例-踢人出群请求:
11.1. HTTP示例
11.2. cURL示例
11.3. 消息体中的JSON字段说明
11.1 HTTP示例:
POST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
AppKey: 158983881e092b052194d219453d6542
CurTime: 1541583920979
MD5: e89c284a5ad9a76b3176e23108920f81
CheckSum: 6f08c5ee2dd16a5fc34a12005e5d5f1411e657a1
Content-Type: application/json
Cache-Control: no-cache
{"eventType":14,"fromAccount":"wmtest1","fromClientType":"IOS","fromDeviceId":"15bff89f-ae12-426a-8b0e-834b78177879","kickList":["wmtest10"],"tid":2637250619,"timestamp":"1564575473172"}
11.2 cURL示例:
curl -X POST \
http://yunxinservice.com.cn/receiveMsg.action \
-H 'appkey: 158983881e092b052194d219453d6542' \
-H 'cache-control: no-cache' \
-H 'checksum: 6f08c5ee2dd16a5fc34a12005e5d5f1411e657a1' \
-H 'content-type: application/json' \
-H 'curtime: 1541583920979' \
-H 'md5: e89c284a5ad9a76b3176e23108920f81' \
-d '{"eventType":14,"fromAccount":"wmtest1","fromClientType":"IOS","fromDeviceId":"15bff89f-ae12-426a-8b0e-834b78177879","kickList":["wmtest10"],"tid":2637250619,"timestamp":"1564575473172"}'
11.3 消息体中的JSON字段说明:
回调消息中并不是每个字段都会一定抄送,请注意对各字段的判空处理。
名称 | 类型 | 必须 | 说明 |
---|---|---|---|
eventType | Integer | 是 | 值为14,表示是踢人出群回调 |
tid | Long | 是 | 群id |
fromAccount | String | 是 | 操作者账号 |
fromDeviceId | String | 是 | 操作者设备id |
fromClientType | String | 是 | 操作者客户端类型: AOS、IOS、PC、WINPHONE、WEB、REST |
kickList | JSONArray | 是 | 被踢列表 |
timestamp | String | 是 | 操作时间,字符串类型 |
更新群信息回调
示例-更新群信息请求:
12.1. HTTP示例
12.2. cURL示例
12.3. 消息体中的JSON字段说明
12.1 HTTP示例:
POST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
AppKey: 158983881e092b052194d219453d6542
CurTime: 1541583920979
MD5: e89c284a5ad9a76b3176e23108920f81
CheckSum: 6f08c5ee2dd16a5fc34a12005e5d5f1411e657a1
Content-Type: application/json
Cache-Control: no-cache
{"beinvitemode":1,"custom":"wmtest1群自定义属性122","eventType":15,"fromAccount":"wmtest1","fromClientType":"IOS","fromDeviceId":"5e4c2103-5417-4ec9-bf1a-80de992b42a8","icon":"https://nim.nosdn.127.net/MTAxMTAxMA==/bmltYV8yNDI1MTU3Nl8xNTM2NjcwOTQ3NTQxXzE0MGJmY2YyLTY0NTQtNGE3YS1iYWQ3LTk1MTg1MWFiMGU1Mg==?imageView&createTime=1536670947328?imageView&thumbnail=200x0&quality=85","invitemode":0,"teamMuteType":0,"tid":2637216281,"timestamp":"1564572978195"}
12.2 cURL示例:
curl -X POST \
http://yunxinservice.com.cn/receiveMsg.action \
-H 'appkey: 158983881e092b052194d219453d6542' \
-H 'cache-control: no-cache' \
-H 'checksum: 6f08c5ee2dd16a5fc34a12005e5d5f1411e657a1' \
-H 'content-type: application/json' \
-H 'curtime: 1541583920979' \
-H 'md5: e89c284a5ad9a76b3176e23108920f81' \
-d '{"beinvitemode":1,"custom":"wmtest1群自定义属性122","eventType":15,"fromAccount":"wmtest1","fromClientType":"IOS","fromDeviceId":"5e4c2103-5417-4ec9-bf1a-80de992b42a8","icon":"https://nim.nosdn.127.net/MTAxMTAxMA==/bmltYV8yNDI1MTU3Nl8xNTM2NjcwOTQ3NTQxXzE0MGJmY2YyLTY0NTQtNGE3YS1iYWQ3LTk1MTg1MWFiMGU1Mg==?imageView&createTime=1536670947328?imageView&thumbnail=200x0&quality=85","invitemode":0,"teamMuteType":0,"tid":2637216281,"timestamp":"1564572978195"}'
12.3 消息体中的JSON字段说明:
回调消息中并不是每个字段都会一定抄送,请注意对各字段的判空处理。
名称 | 类型 | 必须 | 说明 |
---|---|---|---|
eventType | Integer | 是 | 值为15,表示是更新群信息回调 |
fromAccount | String | 是 | 操作者账号 |
fromDeviceId | String | 是 | 操作者设备id |
fromClientType | String | 是 | 操作者客户端类型: AOS、IOS、PC、WINPHONE、WEB、REST |
tid | Long | 是 | 群id |
tname | String | 否 | 群名称 |
icon | String | 否 | 群头像 |
custom | String | 否 | 自定义字段 |
intro | String | 否 | 群简介 |
msg | String | 否 | 加群信息 |
announcement | String | 否 | 群公告 |
servercustom | String | 否 | 服务器自定义字段 |
teamMuteType | Integer | 否 | 群禁言类型,0表示不禁言,1表示禁言普通成员,3表示禁言整个群(包括群主) |
level | Integer | 否 | 最大群成员数量 |
beinvitemode | Integer | 否 | 被邀请人同意方式,0表示需要同意,1表示不需要同意 |
invitemode | Integer | 否 | 谁可以邀请他人入群,0表示管理员,1表示所有人 |
joinmode | Integer | 否 | 申请入群权限,0表示不需要申请,1表示需要申请,2表示不允许申请 |
uptinfomode | Integer | 否 | 谁可以修改群资料群,0表示管理员,1表示所有人 |
upcustommode | Integer | 否 | 谁可以更新自定义字段,0表示管理员,1表示所有人 |
timestamp | String | 是 | 操作时间,字符串类型 |
更新群成员信息回调
示例-更新群成员信息请求:
13.1. HTTP示例
13.2. cURL示例
13.3. 消息体中的JSON字段说明
13.1 HTTP示例:
POST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
AppKey: 158983881e092b052194d219453d6542
CurTime: 1541583920979
MD5: e89c284a5ad9a76b3176e23108920f81
CheckSum: 6f08c5ee2dd16a5fc34a12005e5d5f1411e657a1
Content-Type: application/json
Cache-Control: no-cache
{"eventType":16,"fromAccount":"wmtest1","fromClientType":"IOS","fromDeviceId":"bda08b34-4dff-4754-929d-e32ce10b8835","nick":"wmtest1Dagn5","notifyType":1,"tid":2637250619,"timestamp":"1564575756458"}
13.2 cURL示例:
curl -X POST \
http://yunxinservice.com.cn/receiveMsg.action \
-H 'appkey: 158983881e092b052194d219453d6542' \
-H 'cache-control: no-cache' \
-H 'checksum: 6f08c5ee2dd16a5fc34a12005e5d5f1411e657a1' \
-H 'content-type: application/json' \
-H 'curtime: 1541583920979' \
-H 'md5: e89c284a5ad9a76b3176e23108920f81' \
-d '{"eventType":16,"fromAccount":"wmtest1","fromClientType":"IOS","fromDeviceId":"bda08b34-4dff-4754-929d-e32ce10b8835","nick":"wmtest1Dagn5","notifyType":1,"tid":2637250619,"timestamp":"1564575756458"}'
13.3 消息体中的JSON字段说明:
回调消息中并不是每个字段都会一定抄送,请注意对各字段的判空处理。
名称 | 类型 | 必须 | 说明 |
---|---|---|---|
eventType | Integer | 是 | 值为16,表示是更新群成员信息回调 |
fromAccount | String | 是 | 操作者账号 |
fromDeviceId | String | 是 | 操作者设备id |
fromClientType | String | 是 | 操作者客户端类型: AOS、IOS、PC、WINPHONE、WEB、REST |
tid | Long | 是 | 群id |
nick | String | 否 | 群昵称 |
custom | String | 否 | 自定义字段 |
notifyType | Integer | 否 | 通知类型,0表示通知,1表示关闭通知,2表示仅接受管理员消息 |
timestamp | String | 是 | 操作时间,字符串类型 |
更新其他群成员信息回调
示例-更新其他群成员信息请求:
14.1. HTTP示例
14.2. cURL示例
14.3. 消息体中的JSON字段说明
14.1 HTTP示例:
POST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
AppKey: 158983881e092b052194d219453d6542
CurTime: 1541583920979
MD5: e89c284a5ad9a76b3176e23108920f81
CheckSum: 6f08c5ee2dd16a5fc34a12005e5d5f1411e657a1
Content-Type: application/json
Cache-Control: no-cache
{"eventType":17,"fromAccount":"wmtest1","fromClientType":"IOS","fromDeviceId":"831557c3-a892-4c37-b1e4-90b72d989c32","nick":"wmtest2-29","tid":2637250619,"timestamp":"1564575767978","toAccount":"wmtest2"}
14.2 cURL示例:
curl -X POST \
http://yunxinservice.com.cn/receiveMsg.action \
-H 'appkey: 158983881e092b052194d219453d6542' \
-H 'cache-control: no-cache' \
-H 'checksum: 6f08c5ee2dd16a5fc34a12005e5d5f1411e657a1' \
-H 'content-type: application/json' \
-H 'curtime: 1541583920979' \
-H 'md5: e89c284a5ad9a76b3176e23108920f81' \
-d '{"eventType":17,"fromAccount":"wmtest1","fromClientType":"IOS","fromDeviceId":"831557c3-a892-4c37-b1e4-90b72d989c32","nick":"wmtest2-29","tid":2637250619,"timestamp":"1564575767978","toAccount":"wmtest2"}'
14.3 消息体中的JSON字段说明:
回调消息中并不是每个字段都会一定抄送,请注意对各字段的判空处理。
名称 | 类型 | 必须 | 说明 |
---|---|---|---|
eventType | Integer | 是 | 值为17,表示是更新其他群成员信息回调 |
fromAccount | String | 是 | 操作者账号 |
fromDeviceId | String | 是 | 操作者设备id |
fromClientType | String | 是 | 操作者客户端类型: AOS、IOS、PC、WINPHONE、WEB、REST |
tid | Long | 是 | 群id |
toAccount | String | 是 | 被操作者 |
nick | String | 否 | 群昵称 |
timestamp | String | 是 | 操作时间,字符串类型 |
禁言群成员回调
示例-禁言群成员请求:
15.1. HTTP示例
15.2. cURL示例
15.3. 消息体中的JSON字段说明
15.1 HTTP示例:
POST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
AppKey: 158983881e092b052194d219453d6542
CurTime: 1541583920979
MD5: e89c284a5ad9a76b3176e23108920f81
CheckSum: 6f08c5ee2dd16a5fc34a12005e5d5f1411e657a1
Content-Type: application/json
Cache-Control: no-cache
{"eventType":18,"fromAccount":"wmtest1","fromClientType":"IOS","fromDeviceId":"c41545f3-7e67-49fb-a477-c82e0f235c94","mute":1,"tid":2637250619,"timestamp":"1564575792745","toAccount":"wmtest2"}
15.2 cURL示例:
curl -X POST \
http://yunxinservice.com.cn/receiveMsg.action \
-H 'appkey: 158983881e092b052194d219453d6542' \
-H 'cache-control: no-cache' \
-H 'checksum: 6f08c5ee2dd16a5fc34a12005e5d5f1411e657a1' \
-H 'content-type: application/json' \
-H 'curtime: 1541583920979' \
-H 'md5: e89c284a5ad9a76b3176e23108920f81' \
-d '{"eventType":18,"fromAccount":"wmtest1","fromClientType":"IOS","fromDeviceId":"c41545f3-7e67-49fb-a477-c82e0f235c94","mute":1,"tid":2637250619,"timestamp":"1564575792745","toAccount":"wmtest2"}'
15.3 消息体中的JSON字段说明:
回调消息中并不是每个字段都会一定抄送,请注意对各字段的判空处理。
名称 | 类型 | 必须 | 说明 |
---|---|---|---|
eventType | Integer | 是 | 值为18,表示是禁言群成员回调 |
fromAccount | String | 是 | 操作者账号 |
fromDeviceId | String | 是 | 操作者设备id |
fromClientType | String | 是 | 操作者客户端类型: AOS、IOS、PC、WINPHONE、WEB、REST |
tid | Long | 是 | 群id |
toAccount | String | 是 | 被操作者 |
mute | Integer | 否 | 0表示不禁言,1表示禁言 |
timestamp | String | 是 | 操作时间,字符串类型 |
申请入群回调
示例-申请入群请求:
16.1. HTTP示例
16.2. cURL示例
16.3. 消息体中的JSON字段说明
16.1 HTTP示例:
POST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
AppKey: 158983881e092b052194d219453d6542
CurTime: 1541583920979
MD5: e89c284a5ad9a76b3176e23108920f81
CheckSum: 6f08c5ee2dd16a5fc34a12005e5d5f1411e657a1
Content-Type: application/json
Cache-Control: no-cache
{"eventType":19,"fromAccount":"wmtest7","fromClientType":"IOS","fromDeviceId":"6faac69b-02d0-487b-a4fe-693e36af70e6","joinmode":0,"msg":"applyInfo","tid":2637216281,"timestamp":"1564573451562"}
16.2 cURL示例:
curl -X POST \
http://yunxinservice.com.cn/receiveMsg.action \
-H 'appkey: 158983881e092b052194d219453d6542' \
-H 'cache-control: no-cache' \
-H 'checksum: 6f08c5ee2dd16a5fc34a12005e5d5f1411e657a1' \
-H 'content-type: application/json' \
-H 'curtime: 1541583920979' \
-H 'md5: e89c284a5ad9a76b3176e23108920f81' \
-d '{"eventType":19,"fromAccount":"wmtest7","fromClientType":"IOS","fromDeviceId":"6faac69b-02d0-487b-a4fe-693e36af70e6","joinmode":0,"msg":"applyInfo","tid":2637216281,"timestamp":"1564573451562"}'
16.3 消息体中的JSON字段说明:
回调消息中并不是每个字段都会一定抄送,请注意对各字段的判空处理。
名称 | 类型 | 必须 | 说明 |
---|---|---|---|
eventType | Integer | 是 | 值为19,表示是申请入群回调 |
fromAccount | String | 是 | 操作者账号 |
fromDeviceId | String | 是 | 操作者设备id |
fromClientType | String | 是 | 操作者客户端类型: AOS、IOS、PC、WINPHONE、WEB、REST |
tid | Long | 是 | 群id |
msg | String | 否 | 申请附言 |
joinmode | Integer | 否 | 申请入群权限,0表示不需要申请,1表示需要申请,2表示不允许申请 |
timestamp | String | 是 | 操作时间,字符串类型 |
发起音视频通话回调
示例-发起音视频通话请求:
17.1. HTTP示例
17.2. cURL示例
17.3. 消息体中的JSON字段说明
17.1 HTTP示例:
POST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
AppKey: 158983881e092b052194d219453d6542
CurTime: 1541583920979
MD5: e89c284a5ad9a76b3176e23108920f81
CheckSum: 6f08c5ee2dd16a5fc34a12005e5d5f1411e657a1
Content-Type: application/json
Cache-Control: no-cache
{"callType":2,"eventType":20,"forceKeepCalling":true,"fromAccount":"rss02","fromClientIp":"240e:e8:f012:6fc1:ec15:1366:3ccb:2f18","fromClientPort":"50867","fromClientType":"IOS","fromDeviceId":"727EDBAF-AF84-42AE-9E09-EE586CCBCF2D","notifyAttach":"音视频请求扩展信息","timestamp":"1573459861008","toAccountList":["rss01"]}
17.2 cURL示例:
curl -X POST \
http://yunxinservice.com.cn/receiveMsg.action \
-H 'appkey: 158983881e092b052194d219453d6542' \
-H 'cache-control: no-cache' \
-H 'checksum: 6f08c5ee2dd16a5fc34a12005e5d5f1411e657a1' \
-H 'content-type: application/json' \
-H 'curtime: 1541583920979' \
-H 'md5: e89c284a5ad9a76b3176e23108920f81' \
-d '{"callType":2,"eventType":20,"forceKeepCalling":true,"fromAccount":"rss02","fromClientIp":"240e:e8:f012:6fc1:ec15:1366:3ccb:2f18","fromClientPort":"50867","fromClientType":"IOS","fromDeviceId":"727EDBAF-AF84-42AE-9E09-EE586CCBCF2D","notifyAttach":"音视频请求扩展信息","timestamp":"1573459861008","toAccountList":["rss01"]}'
17.3 消息体中的JSON字段说明:
回调消息中并不是每个字段都会一定抄送,请注意对各字段的判空处理。
名称 | 类型 | 必须 | 说明 |
---|---|---|---|
eventType | Integer | 是 | 值为20,表示是音视频通话发起回调 |
fromAccount | String | 是 | 操作者账号 |
fromDeviceId | String | 是 | 操作者设备id |
fromClientType | String | 是 | 操作者客户端类型: AOS、IOS、PC、WINPHONE、WEB、REST |
fromClientIp | String | 否 | 操作者的客户端IP地址 |
fromClientPort | String | 否 | 操作者的客户端端口号 |
callType | Integer | 是 | 音视频通话类型,1表示音频,2表示视频 |
forceKeepCalling | Boolean | 否 | 是否强制持续呼叫 |
notifyAttach | String | 否 | 自定义字段 |
toAccountList | JSON ARRAY | 是 | 被呼叫accid列表 |
timestamp | String | 是 | 操作时间,字符串类型 |
创建多人音视频房间回调
示例-创建多人音视频房间请求:
18.1. HTTP示例
18.2. cURL示例
18.3. 消息体中的JSON字段说明
18.1 HTTP示例:
POST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
AppKey: 158983881e092b052194d219453d6542
CurTime: 1541583920979
MD5: e89c284a5ad9a76b3176e23108920f81
CheckSum: 6f08c5ee2dd16a5fc34a12005e5d5f1411e657a1
Content-Type: application/json
Cache-Control: no-cache
{"channelName":"ss","eventType":21,"fromAccount":"lly1","fromClientIp":"115.236.119.138","fromClientPort":"46612","fromClientType":"WEB","fromDeviceId":"862e8f7463b0721f4a49d77bb14cc124","roomConfig":"","selfConfig":"","timestamp":"1573456122632"}
18.2 cURL示例:
curl -X POST \
http://yunxinservice.com.cn/receiveMsg.action \
-H 'appkey: 158983881e092b052194d219453d6542' \
-H 'cache-control: no-cache' \
-H 'checksum: 6f08c5ee2dd16a5fc34a12005e5d5f1411e657a1' \
-H 'content-type: application/json' \
-H 'curtime: 1541583920979' \
-H 'md5: e89c284a5ad9a76b3176e23108920f81' \
-d '{"channelName":"ss","eventType":21,"fromAccount":"lly1","fromClientIp":"115.236.119.138","fromClientPort":"46612","fromClientType":"WEB","fromDeviceId":"862e8f7463b0721f4a49d77bb14cc124","roomConfig":"","selfConfig":"","timestamp":"1573456122632"}'
18.3 消息体中的JSON字段说明:
回调消息中并不是每个字段都会一定抄送,请注意对各字段的判空处理。
名称 | 类型 | 必须 | 说明 |
---|---|---|---|
eventType | Integer | 是 | 值为21,表示是创建多人音视频房间回调 |
fromAccount | String | 是 | 操作者账号 |
fromDeviceId | String | 是 | 操作者设备id |
fromClientType | String | 是 | 操作者客户端类型: AOS、IOS、PC、WINPHONE、WEB、REST |
fromClientIp | String | 否 | 操作者的客户端IP地址 |
fromClientPort | String | 否 | 操作者的客户端端口号 |
roomConfig | String | 否 | 房间属性字段 |
selfConfig | String | 否 | 自定义字段 |
timestamp | String | 是 | 操作时间,字符串类型 |
超大群拉人入群回调
示例-超大群拉人入群请求:
19.1. HTTP示例
19.2. cURL示例
19.3. 消息体中的JSON字段说明
19.1 HTTP示例:
POST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
AppKey: 158983881e092b052194d219453d6542
CurTime: 1541583920979
MD5: e89c284a5ad9a76b3176e23108920f81
CheckSum: 6f08c5ee2dd16a5fc34a12005e5d5f1411e657a1
Content-Type: application/json
Cache-Control: no-cache
{"beinvitemode":1,"eventType":23,"fromAccount":"wmtest1","fromClientType":"IOS","fromDeviceId":"50fafe75-2491-4565-9601-aaf7ee4e78ae","inviteList":["wmtest230","wmtest231"],"msg":"拉人进群需要同意","tid"
:23005,"timestamp":"1578569254713"}
19.2 cURL示例:
curl -X POST \
http://yunxinservice.com.cn/receiveMsg.action \
-H 'appkey: 158983881e092b052194d219453d6542' \
-H 'cache-control: no-cache' \
-H 'checksum: 6f08c5ee2dd16a5fc34a12005e5d5f1411e657a1' \
-H 'content-type: application/json' \
-H 'curtime: 1541583920979' \
-H 'md5: e89c284a5ad9a76b3176e23108920f81' \
-d '{"beinvitemode":1,"eventType":23,"fromAccount":"wmtest1","fromClientType":"IOS","fromDeviceId":"50fafe75-2491-4565-9601-aaf7ee4e78ae","inviteList":["wmtest230","wmtest231"],"msg":"拉人进群需要同意","tid"
:23005,"timestamp":"1578569254713"}'
19.3 消息体中的JSON字段说明:
回调消息中并不是每个字段都会一定抄送,请注意对各字段的判空处理。
名称 | 类型 | 必须 | 说明 |
---|---|---|---|
eventType | Integer | 是 | 值为23,表示是超大群拉人入群回调 |
tid | Long | 是 | 超大群id |
fromAccount | String | 是 | 操作者账号 |
fromDeviceId | String | 是 | 操作者设备id |
fromClientType | String | 是 | 操作者客户端类型: AOS、IOS、PC、WINPHONE、WEB、REST |
beinvitemode | Integer | 是 | 被邀请人同意方式,0表示需要同意,1表示不需要同意 |
inviteList | JSONArray | 是 | 邀请的人 |
msg | String | 否 | 邀请附言 |
timestamp | String | 是 | 操作时间,字符串类型 |
超大群踢人出群回调
示例-超大群踢人出群请求:
20.1. HTTP示例
20.2. cURL示例
20.3. 消息体中的JSON字段说明
20.1 HTTP示例:
POST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
AppKey: 158983881e092b052194d219453d6542
CurTime: 1541583920979
MD5: e89c284a5ad9a76b3176e23108920f81
CheckSum: 6f08c5ee2dd16a5fc34a12005e5d5f1411e657a1
Content-Type: application/json
Cache-Control: no-cache
{"eventType":24,"fromAccount":"wmtest1","fromClientType":"IOS","fromDeviceId":"524fa527-db2f-420c-84e5-e606c02626e3","kickList":["wmtest230","wmtest231","wmtest232"],"tid":23005,"timestamp":"1578569287289"}
20.2 cURL示例:
curl -X POST \
http://yunxinservice.com.cn/receiveMsg.action \
-H 'appkey: 158983881e092b052194d219453d6542' \
-H 'cache-control: no-cache' \
-H 'checksum: 6f08c5ee2dd16a5fc34a12005e5d5f1411e657a1' \
-H 'content-type: application/json' \
-H 'curtime: 1541583920979' \
-H 'md5: e89c284a5ad9a76b3176e23108920f81' \
-d '{"eventType":24,"fromAccount":"wmtest1","fromClientType":"IOS","fromDeviceId":"524fa527-db2f-420c-84e5-e606c02626e3","kickList":["wmtest230","wmtest231","wmtest232"],"tid":23005,"timestamp":"1578569287289"}'
20.3 消息体中的JSON字段说明:
回调消息中并不是每个字段都会一定抄送,请注意对各字段的判空处理。
名称 | 类型 | 必须 | 说明 |
---|---|---|---|
eventType | Integer | 是 | 值为24,表示是超大群踢人出群回调 |
tid | Long | 是 | 超大群id |
fromAccount | String | 是 | 操作者账号 |
fromDeviceId | String | 是 | 操作者设备id |
fromClientType | String | 是 | 操作者客户端类型: AOS、IOS、PC、WINPHONE、WEB、REST |
kickList | JSONArray | 是 | 被踢列表 |
timestamp | String | 是 | 操作时间,字符串类型 |
超大群退群回调
示例-超大群退群请求:
21.1. HTTP示例
21.2. cURL示例
21.3. 消息体中的JSON字段说明
1.1 HTTP示例:
POST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
AppKey: 158983881e092b052194d219453d6542
CurTime: 1541583920979
MD5: e89c284a5ad9a76b3176e23108920f81
CheckSum: 6f08c5ee2dd16a5fc34a12005e5d5f1411e657a1
Content-Type: application/json
Cache-Control: no-cache
{"eventType":25,"fromAccount":"wmtest50","fromClientType":"IOS","fromDeviceId":"299a8845-092b-4673-a92e-a5e00d0db2ea","tid":23005,"timestamp":"1578569315872"}
21.2 cURL示例:
curl -X POST \
http://yunxinservice.com.cn/receiveMsg.action \
-H 'appkey: 158983881e092b052194d219453d6542' \
-H 'cache-control: no-cache' \
-H 'checksum: 6f08c5ee2dd16a5fc34a12005e5d5f1411e657a1' \
-H 'content-type: application/json' \
-H 'curtime: 1541583920979' \
-H 'md5: e89c284a5ad9a76b3176e23108920f81' \
-d '{"eventType":25,"fromAccount":"wmtest50","fromClientType":"IOS","fromDeviceId":"299a8845-092b-4673-a92e-a5e00d0db2ea","tid":23005,"timestamp":"1578569315872"'
21.3 消息体中的JSON字段说明:
回调消息中并不是每个字段都会一定抄送,请注意对各字段的判空处理。
名称 | 类型 | 必须 | 说明 |
---|---|---|---|
eventType | Integer | 是 | 值为25,表示是超大群退群回调 |
tid | Long | 是 | 超大群id |
fromAccount | String | 是 | 操作者账号 |
fromDeviceId | String | 是 | 操作者设备id |
fromClientType | String | 是 | 操作者客户端类型: AOS、IOS、PC、WINPHONE、WEB、REST |
timestamp | String | 是 | 操作时间,字符串类型 |
超大群更新群信息回调
示例-超大群更新群信息请求:
22.1. HTTP示例
22.2. cURL示例
22.3. 消息体中的JSON字段说明
22.1 HTTP示例:
POST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
AppKey: 158983881e092b052194d219453d6542
CurTime: 1541583920979
MD5: e89c284a5ad9a76b3176e23108920f81
CheckSum: 6f08c5ee2dd16a5fc34a12005e5d5f1411e657a1
Content-Type: application/json
Cache-Control: no-cache
{"announcement":"wmtest1修改群公告测ee","beinvitemode":0,"custom":
"wmtest1wmtest1ee4001","eventType":26,"fromAccount":"wmtest1","fromClientType":"IOS","fromDeviceId":"f17cb0e1-875a-4038-87f4-47104cde38cd","icon":"https://nimnosdn127.net/MTAxMTAxMA==/bmltYV8yNDI1MTU3Nl8xNTMee2NjcwOTQ3NTQxXzE0MGJmY2YyLTY0NTQtNGE3YS1iYWQ3LTk1MTg1MWFiMGU1Mg==?imageView&createTime=1536670947328?imageView&thumbnail=200x0&quality=85","intro":"666666666ee","teamMuteType":0,"tid":23005,"timestamp":"1578569340710","tname":"wmtest1第三遍1578569344989"}
22.2 cURL示例:
curl -X POST \
http://yunxinservice.com.cn/receiveMsg.action \
-H 'appkey: 158983881e092b052194d219453d6542' \
-H 'cache-control: no-cache' \
-H 'checksum: 6f08c5ee2dd16a5fc34a12005e5d5f1411e657a1' \
-H 'content-type: application/json' \
-H 'curtime: 1541583920979' \
-H 'md5: e89c284a5ad9a76b3176e23108920f81' \
-d '{"announcement":"wmtest1修改群公告测ee","beinvitemode":0,"custom":
"wmtest1wmtest1ee4001","eventType":26,"fromAccount":"wmtest1","fromClientType":"IOS","fromDeviceId":"f17cb0e1-875a-4038-87f4-47104cde38cd","icon":"https://nimnosdn127.net/MTAxMTAxMA==/bmltYV8yNDI1MTU3Nl8xNTMee2NjcwOTQ3NTQxXzE0MGJmY2YyLTY0NTQtNGE3YS1iYWQ3LTk1MTg1MWFiMGU1Mg==?imageView&createTime=1536670947328?imageView&thumbnail=200x0&quality=85","intro":"666666666ee","teamMuteType":0,"tid":23005,"timestamp":"1578569340710","tname":"wmtest1第三遍1578569344989"}'
22.3 消息体中的JSON字段说明:
回调消息中并不是每个字段都会一定抄送,请注意对各字段的判空处理。
名称 | 类型 | 必须 | 说明 |
---|---|---|---|
eventType | Integer | 是 | 值为26,表示是超大群更新群信息回调 |
fromAccount | String | 是 | 操作者账号 |
fromDeviceId | String | 是 | 操作者设备id |
fromClientType | String | 是 | 操作者客户端类型: AOS、IOS、PC、WINPHONE、WEB、REST |
tid | Long | 是 | 超大群id |
tname | String | 否 | 群名称 |
icon | String | 否 | 群头像 |
custom | String | 否 | 自定义字段 |
intro | String | 否 | 群简介 |
announcement | String | 否 | 群公告 |
servercustom | String | 否 | 服务器自定义字段 |
teamMuteType | Integer | 否 | 群禁言类型,0表示不禁言,1表示禁言普通成员,3表示禁言整个群(包括群主) |
level | Integer | 否 | 最大群成员数量 |
beinvitemode | Integer | 否 | 被邀请人同意方式,0表示需要同意,1表示不需要同意 |
invitemode | Integer | 否 | 谁可以邀请他人入群,0表示管理员,1表示所有人 |
uptinfomode | Integer | 否 | 谁可以修改群资料群,0表示管理员,1表示所有人 |
upcustommode | Integer | 否 | 谁可以更新自定义字段,0表示管理员,1表示所有人 |
timestamp | String | 是 | 操作时间,字符串类型 |
更新超大群群成员信息回调
示例-更新超大群群成员信息请求:
23.1. HTTP示例
23.2. cURL示例
23.3. 消息体中的JSON字段说明
23.1 HTTP示例:
POST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
AppKey: 158983881e092b052194d219453d6542
CurTime: 1541583920979
MD5: e89c284a5ad9a76b3176e23108920f81
CheckSum: 6f08c5ee2dd16a5fc34a12005e5d5f1411e657a1
Content-Type: application/json
Cache-Control: no-cache
{"custom":"自定义属性","eventType":27,"fromAccount":"wmtest1","fromClientType":"IOS","fromDeviceId":"129c6283-d3c0-4ee2-a6d9-831a2bbf8c5e","nick":"wmtest1wm修改资料测试线上wmtest12q2","notifyType":1,"tid":23005,"timestamp":"1578569382127"}
23.2 cURL示例:
curl -X POST \
http://yunxinservice.com.cn/receiveMsg.action \
-H 'appkey: 158983881e092b052194d219453d6542' \
-H 'cache-control: no-cache' \
-H 'checksum: 6f08c5ee2dd16a5fc34a12005e5d5f1411e657a1' \
-H 'content-type: application/json' \
-H 'curtime: 1541583920979' \
-H 'md5: e89c284a5ad9a76b3176e23108920f81' \
-d '{"custom":"wmtest1自定义属性haha线上wmtest122","eventType":27,"fromAccount":"wmtest1","fromClientType":"IOS","fromDeviceId":"129c6283-d3c0-4ee2-a6d9-831a2bbf8c5e","nick":"wmtest1wm修改资料测试线上wmtest12q2","notifyType":1,"tid":23005,"timestamp":"1578569382127"}'
23.3 消息体中的JSON字段说明:
回调消息中并不是每个字段都会一定抄送,请注意对各字段的判空处理。
名称 | 类型 | 必须 | 说明 |
---|---|---|---|
eventType | Integer | 是 | 值为27,表示是更新超大群群成员信息回调 |
fromAccount | String | 是 | 操作者账号 |
fromDeviceId | String | 是 | 操作者设备id |
fromClientType | String | 是 | 操作者客户端类型: AOS、IOS、PC、WINPHONE、WEB、REST |
tid | Long | 是 | 超大群id |
nick | String | 否 | 群昵称 |
custom | String | 否 | 自定义字段 |
notifyType | Integer | 否 | 通知类型,0表示正常消息提醒,1表示关闭通知 |
timestamp | String | 是 | 操作时间,字符串类型 |
超大群申请入群回调
示例-超大群申请入群请求:
24.1. HTTP示例
24.2. cURL示例
24.3. 消息体中的JSON字段说明
24.1 HTTP示例:
POST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
AppKey: 158983881e092b052194d219453d6542
CurTime: 1541583920979
MD5: e89c284a5ad9a76b3176e23108920f81
CheckSum: 6f08c5ee2dd16a5fc34a12005e5d5f1411e657a1
Content-Type: application/json
Cache-Control: no-cache
{"eventType":28,"fromAccount":"wmtest50","fromClientType":"IOS","fromDeviceId":"e06168fe-0484-4cdc-a383-3f04dc7b763f","joinmode":1,"msg":"申请加群","tid":23005,"timestamp":"1578569428537"}
24.2 cURL示例:
curl -X POST \
http://yunxinservice.com.cn/receiveMsg.action \
-H 'appkey: 158983881e092b052194d219453d6542' \
-H 'cache-control: no-cache' \
-H 'checksum: 6f08c5ee2dd16a5fc34a12005e5d5f1411e657a1' \
-H 'content-type: application/json' \
-H 'curtime: 1541583920979' \
-H 'md5: e89c284a5ad9a76b3176e23108920f81' \
-d '{"eventType":28,"fromAccount":"wmtest50","fromClientType":"IOS","fromDeviceId":"e06168fe-0484-4cdc-a383-3f04dc7b763f","joinmode":1,"msg":"申请加群","tid":23005,"timestamp":"1578569428537"}'
24.3 消息体中的JSON字段说明:
回调消息中并不是每个字段都会一定抄送,请注意对各字段的判空处理。
名称 | 类型 | 必须 | 说明 |
---|---|---|---|
eventType | Integer | 是 | 值为28,表示是超大群申请入群回调 |
fromAccount | String | 是 | 操作者账号 |
fromDeviceId | String | 是 | 操作者设备id |
fromClientType | String | 是 | 操作者客户端类型: AOS、IOS、PC、WINPHONE、WEB、REST |
tid | Long | 是 | 超大群id |
msg | String | 否 | 申请附言 |
joinmode | Integer | 否 | 申请入群权限,0表示不需要申请,1表示需要申请,2表示不允许申请 |
timestamp | String | 是 | 操作时间,字符串类型 |
超大群增加群管理员回调
示例-超大群增加群管理员请求:
25.1. HTTP示例
25.2. cURL示例
25.3. 消息体中的JSON字段说明
25.1 HTTP示例:
POST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
AppKey: 158983881e092b052194d219453d6542
CurTime: 1541583920979
MD5: e89c284a5ad9a76b3176e23108920f81
CheckSum: 6f08c5ee2dd16a5fc34a12005e5d5f1411e657a1
Content-Type: application/json
Cache-Control: no-cache
{"eventType":29,"fromAccount":"wmtest1","fromClientType":"IOS","fromDeviceId":"e88cbce5-0809-4ca3-a29f-0322b24724ce","managerList":["wmtest7"],"tid":23005,"timestamp":"1578569515550"}
25.2 cURL示例:
curl -X POST \
http://yunxinservice.com.cn/receiveMsg.action \
-H 'appkey: 158983881e092b052194d219453d6542' \
-H 'cache-control: no-cache' \
-H 'checksum: 6f08c5ee2dd16a5fc34a12005e5d5f1411e657a1' \
-H 'content-type: application/json' \
-H 'curtime: 1541583920979' \
-H 'md5: e89c284a5ad9a76b3176e23108920f81' \
-d '{"eventType":29,"fromAccount":"wmtest1","fromClientType":"IOS","fromDeviceId":"e88cbce5-0809-4ca3-a29f-0322b24724ce","managerList":["wmtest7"],"tid":23005,"timestamp":"1578569515550"}'
25.3 消息体中的JSON字段说明:
回调消息中并不是每个字段都会一定抄送,请注意对各字段的判空处理。
名称 | 类型 | 必须 | 说明 |
---|---|---|---|
eventType | Integer | 是 | 值为29,表示是超大群增加群管理员回调 |
tid | Long | 是 | 超大群id |
fromAccount | String | 是 | 操作者账号 |
fromDeviceId | String | 是 | 操作者设备id |
fromClientType | String | 是 | 操作者客户端类型: AOS、IOS、PC、WINPHONE、WEB、REST |
managerList | JSONArray | 是 | 管理员列表 |
timestamp | String | 是 | 操作时间,字符串类型 |
超大群取消群管理员回调
示例-超大群取消群管理员请求:
26.1. HTTP示例
26.2. cURL示例
26.3. 消息体中的JSON字段说明
26.1 HTTP示例:
POST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
AppKey: 158983881e092b052194d219453d6542
CurTime: 1541583920979
MD5: e89c284a5ad9a76b3176e23108920f81
CheckSum: 6f08c5ee2dd16a5fc34a12005e5d5f1411e657a1
Content-Type: application/json
Cache-Control: no-cache
{"eventType":30,"fromAccount":"wmtest1","fromClientType":"IOS","fromDeviceId":"a6d78083-9fac-4d1a-af44-0d270c2edac3","managerList":["wmtest2","wmtest3","wmtest4"],"tid":23005,"timestamp
":"1578569553081"}
26.2 cURL示例:
curl -X POST \
http://yunxinservice.com.cn/receiveMsg.action \
-H 'appkey: 158983881e092b052194d219453d6542' \
-H 'cache-control: no-cache' \
-H 'checksum: 6f08c5ee2dd16a5fc34a12005e5d5f1411e657a1' \
-H 'content-type: application/json' \
-H 'curtime: 1541583920979' \
-H 'md5: e89c284a5ad9a76b3176e23108920f81' \
-d '{"eventType":30,"fromAccount":"wmtest1","fromClientType":"IOS","fromDeviceId":"a6d78083-9fac-4d1a-af44-0d270c2edac3","managerList":["wmtest2","wmtest3","wmtest4"],"tid":23005,"timestamp
":"1578569553081"}'
26.3 消息体中的JSON字段说明:
回调消息中并不是每个字段都会一定抄送,请注意对各字段的判空处理。
名称 | 类型 | 必须 | 说明 |
---|---|---|---|
eventType | Integer | 是 | 值为30,表示是取消群管理员回调 |
tid | Long | 是 | 超大群id |
fromAccount | String | 是 | 操作者账号 |
fromDeviceId | String | 是 | 操作者设备id |
fromClientType | String | 是 | 操作者客户端类型: AOS、IOS、PC、WINPHONE、WEB、REST |
managerList | JSONArray | 是 | 管理员列表 |
timestamp | String | 是 | 操作时间,字符串类型 |
超大群群禁言回调
示例-超大群群禁言请求:
27.1. HTTP示例
27.2. cURL示例
27.3. 消息体中的JSON字段说明
27.1 HTTP示例:
POST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
AppKey: 158983881e092b052194d219453d6542
CurTime: 1541583920979
MD5: e89c284a5ad9a76b3176e23108920f81
CheckSum: 6f08c5ee2dd16a5fc34a12005e5d5f1411e657a1
Content-Type: application/json
Cache-Control: no-cache
{"eventType":31,"fromAccount":"wmtest1","fromClientType":"IOS","fromDeviceId":"c47e955b-546a-44c2-8d43b0dfc1769d3c","mute":1,"tid":23005,"timestamp":"1578569569398"}
27.2 cURL示例:
curl -X POST \
http://yunxinservice.com.cn/receiveMsg.action \
-H 'appkey: 158983881e092b052194d219453d6542' \
-H 'cache-control: no-cache' \
-H 'checksum: 6f08c5ee2dd16a5fc34a12005e5d5f1411e657a1' \
-H 'content-type: application/json' \
-H 'curtime: 1541583920979' \
-H 'md5: e89c284a5ad9a76b3176e23108920f81' \
-d '{"eventType":31,"fromAccount":"wmtest1","fromClientType":"IOS","fromDeviceId":"c47e955b-546a-44c2-8d43b0dfc1769d3c","mute":1,"tid":23005,"timestamp":"1578569569398"}'
27.3 消息体中的JSON字段说明:
回调消息中并不是每个字段都会一定抄送,请注意对各字段的判空处理。
名称 | 类型 | 必须 | 说明 |
---|---|---|---|
eventType | Integer | 是 | 值为31,表示是超大群群禁言回调 |
tid | Long | 是 | 超大群id |
fromAccount | String | 是 | 操作者账号 |
fromDeviceId | String | 是 | 操作者设备id |
fromClientType | String | 是 | 操作者客户端类型: AOS、IOS、PC、WINPHONE、WEB、REST |
mute | Integer | 是 | 0表示关闭禁言,1表示禁言普通群成员,3表示禁言整个群(包括群主) |
timestamp | String | 是 | 操作时间,字符串类型 |
超大群禁言群成员回调
示例-超大群禁言群成员请求:
28.1. HTTP示例
28.2. cURL示例
28.3. 消息体中的JSON字段说明
28.1 HTTP示例:
POST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
AppKey: 158983881e092b052194d219453d6542
CurTime: 1541583920979
MD5: e89c284a5ad9a76b3176e23108920f81
CheckSum: 6f08c5ee2dd16a5fc34a12005e5d5f1411e657a1
Content-Type: application/json
Cache-Control: no-cache
{"eventType":32,"fromAccount":"wmtest1","fromClientType":"IOS","fromDeviceId":"37460011-b2f4-4c98b30a4930073c04df","mute":1,"tid":23005,"timestamp":"1578569587591","toAccountList":["wmtest4","wmtest5"]}
28.2 cURL示例:
curl -X POST \
http://yunxinservice.com.cn/receiveMsg.action \
-H 'appkey: 158983881e092b052194d219453d6542' \
-H 'cache-control: no-cache' \
-H 'checksum: 6f08c5ee2dd16a5fc34a12005e5d5f1411e657a1' \
-H 'content-type: application/json' \
-H 'curtime: 1541583920979' \
-H 'md5: e89c284a5ad9a76b3176e23108920f81' \
-d '{"eventType":32,"fromAccount":"wmtest1","fromClientType":"IOS","fromDeviceId":"37460011-b2f4-4c98b30a4930073c04df","mute":1,"tid":23005,"timestamp":"1578569587591","toAccountList":["wmtest4","wmtest5"]}'
28.3 消息体中的JSON字段说明:
回调消息中并不是每个字段都会一定抄送,请注意对各字段的判空处理。
名称 | 类型 | 必须 | 说明 |
---|---|---|---|
eventType | Integer | 是 | 值为32,表示是超大群禁言群成员回调 |
fromAccount | String | 是 | 操作者账号 |
fromDeviceId | String | 是 | 操作者设备id |
fromClientType | String | 是 | 操作者客户端类型: AOS、IOS、PC、WINPHONE、WEB、REST |
tid | Long | 是 | 超大群id |
toAccountList | JSONArray | 是 | 被操作者 |
mute | Integer | 否 | 0表示不禁言,1表示禁言 |
timestamp | String | 是 | 操作时间,字符串类型 |
超大群更新其他群成员信息回调
示例-超大群更新其他群成员信息请求:
29.1. HTTP示例
29.2. cURL示例
29.3. 消息体中的JSON字段说明
29.1 HTTP示例:
POST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
AppKey: 158983881e092b052194d219453d6542
CurTime: 1541583920979
MD5: e89c284a5ad9a76b3176e23108920f81
CheckSum: 6f08c5ee2dd16a5fc34a12005e5d5f1411e657a1
Content-Type: application/json
Cache-Control: no-cache
{"eventType":33,"fromAccount":"wmtest1","fromClientType":"IOS","fromDeviceId":"0222eea7-282d-4a64-998d-4470b556e890","nick":"wmtest3037","tid":23005,"timestamp":"1578569623944","toAccount":"wmtest3"}"
29.2 cURL示例:
curl -X POST \
http://yunxinservice.com.cn/receiveMsg.action \
-H 'appkey: 158983881e092b052194d219453d6542' \
-H 'cache-control: no-cache' \
-H 'checksum: 6f08c5ee2dd16a5fc34a12005e5d5f1411e657a1' \
-H 'content-type: application/json' \
-H 'curtime: 1541583920979' \
-H 'md5: e89c284a5ad9a76b3176e23108920f81' \
-d '{"eventType":33,"fromAccount":"wmtest1","fromClientType":"IOS","fromDeviceId":"0222eea7-282d-4a64-998d-4470b556e890","nick":"wmtest3037","tid":23005,"timestamp":"1578569623944","toAccount":"wmtest3"}"'
29.3 消息体中的JSON字段说明:
回调消息中并不是每个字段都会一定抄送,请注意对各字段的判空处理。
名称 | 类型 | 必须 | 说明 |
---|---|---|---|
eventType | Integer | 是 | 值为33,表示是超大群更新其他群成员信息回调 |
fromAccount | String | 是 | 操作者账号 |
fromDeviceId | String | 是 | 操作者设备id |
fromClientType | String | 是 | 操作者客户端类型: AOS、IOS、PC、WINPHONE、WEB、REST |
tid | Long | 是 | 超大群id |
toAccount | String | 是 | 被操作者 |
nick | String | 否 | 群昵称 |
timestamp | String | 是 | 操作时间,字符串类型 |
超大群转让群回调
示例-超大群转让群群管理员请求:
30.1. HTTP示例
30.2. cURL示例
30.3. 消息体中的JSON字段说明
30.1 HTTP示例:
POST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
AppKey: 158983881e092b052194d219453d6542
CurTime: 1541583920979
MD5: e89c284a5ad9a76b3176e23108920f81
CheckSum: 6f08c5ee2dd16a5fc34a12005e5d5f1411e657a1
Content-Type: application/json
Cache-Control: no-cache
{"eventType":34,"fromAccount":"wmtest1","fromClientType":"IOS","fromDeviceId":"5cf30af4-f926-4e6c-bc3ef6fc45712e6f","leave":false,"tid":23005,"timestamp":"1578569643464","toAccount":"wmtest2"}
30.2 cURL示例:
curl -X POST \
http://yunxinservice.com.cn/receiveMsg.action \
-H 'appkey: 158983881e092b052194d219453d6542' \
-H 'cache-control: no-cache' \
-H 'checksum: 6f08c5ee2dd16a5fc34a12005e5d5f1411e657a1' \
-H 'content-type: application/json' \
-H 'curtime: 1541583920979' \
-H 'md5: e89c284a5ad9a76b3176e23108920f81' \
-d '{"eventType":34,"fromAccount":"wmtest1","fromClientType":"IOS","fromDeviceId":"5cf30af4-f926-4e6c-bc3ef6fc45712e6f","leave":false,"tid":23005,"timestamp":"1578569643464","toAccount":"wmtest2"}'
30.3 消息体中的JSON字段说明:
回调消息中并不是每个字段都会一定抄送,请注意对各字段的判空处理。
名称 | 类型 | 必须 | 说明 |
---|---|---|---|
eventType | Integer | 是 | 值为34,表示是超大群转让群回调 |
tid | Long | 是 | 超大群id |
fromAccount | String | 是 | 操作者账号 |
fromDeviceId | String | 是 | 操作者设备id |
fromClientType | String | 是 | 操作者客户端类型: AOS、IOS、PC、WINPHONE、WEB、REST |
toAccount | String | 是 | 对方账户 |
leave | Boolean | 是 | 操作者是否退群 |
timestamp | String | 是 | 操作时间,字符串类型 |
消息撤回回调
示例-消息撤回请求:
30.1. HTTP示例
30.2. cURL示例
30.3. 消息体中的JSON字段说明
31.1 HTTP示例:
POST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
AppKey: 158983881e092b052194d219453d6542
CurTime: 1541583920979
MD5: e89c284a5ad9a76b3176e23108920f81
CheckSum: 6f08c5ee2dd16a5fc34a12005e5d5f1411e657a1
Content-Type: application/json
Cache-Control: no-cache
{"eventType":35,"fromAccount":"wm1","fromClientIp":"36.18.111.225","fromClientPort":"39632","fromClientType":"AOS","fromDeviceId":"ef6b789c-3079-463b-a52b-4924ae539e01","msgFromAccid":"wm1","msgId":184409700039655569,"msgidClient":"b897b26234d246858031291f12bc498d","opeType":8,"time":1590482455336,"timestamp":"1590482457381","toAccount":"2747918666"}
31.2 cURL示例:
curl -X POST \
http://yunxinservice.com.cn/receiveMsg.action \
-H 'appkey: 158983881e092b052194d219453d6542' \
-H 'cache-control: no-cache' \
-H 'checksum: 6f08c5ee2dd16a5fc34a12005e5d5f1411e657a1' \
-H 'content-type: application/json' \
-H 'curtime: 1541583920979' \
-H 'md5: e89c284a5ad9a76b3176e23108920f81' \
-d '{"eventType":35,"fromAccount":"wm1","fromClientIp":"36.18.111.225","fromClientPort":"39632","fromClientType":"AOS","fromDeviceId":"ef6b789c-3079-463b-a52b-4924ae539e01","msgFromAccid":"wm1","msgId":184409700039655569,"msgidClient":"b897b26234d246858031291f12bc498d","opeType":8,"time":1590482455336,"timestamp":"1590482457381","toAccount":"2747918666"}'
31.3 消息体中的JSON字段说明:
回调消息中并不是每个字段都会一定抄送,请注意对各字段的判空处理。
名称 | 类型 | 必须 | 说明 |
---|---|---|---|
eventType | Integer | 是 | 值为35,表示是消息撤回回调 |
fromAccount | String | 是 | 操作者账号 |
fromDeviceId | String | 是 | 操作者设备id |
fromClientType | String | 是 | 操作者客户端类型: AOS、IOS、PC、WINPHONE、WEB、REST |
fromClientIp | String | 否 | 操作者的客户端IP地址 |
fromClientPort | String | 否 | 操作者的客户端端口号 |
msgFromAccid | String | 是 | 被撤回消息的消息发送者 |
msgId | Long | 是 | 被撤回消息的消息ID(服务器ID) |
time | Long | 是 | 被撤回消息的消息发送时间 |
opeType | int | 是 | 7表示p2p消息撤回,8表示群消息撤回 |
toAccount | String | 是 | 消息接收者accid,或者,群的tid |
msgidClient | String | 否 | 被撤回消息的消息ID(客户端ID) |
msg | String | 否 | 消息撤回附言 |
attach | String | 否 | 消息撤回扩展字段 |
timestamp | String | 是 | 操作时间,字符串类型 |


此文档对你是否有帮助

