高级群相关回调
更新时间: 2024/10/31 15:07:19
本文介绍高级群相关 API 的回调接口。
回调消息中并不是每个字段都会一定抄送,请注意对各字段的判空处理。
创建群回调
使用场景
在创建群过程中,如果需要针对创建过程进行处理,例如校验群名或者控制群创建权限,则可以开启创建群回调,干预创建群的流程,达成业务目标。
HTTP 示例
HTTPPOST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
AppKey: 15898388**2194d219453d6542
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}
cURL 示例
cURLcurl -X POST \
http://yunxinservice.com.cn/receiveMsg.action \
-H 'appkey: 1589838**2194d219453d6542' \
-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}'
消息体说明
JSON{
"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
}
名称 | 类型 | 必须 | 说明 |
---|---|---|---|
eventType | Integer | 是 | 值为 7,表示是创建群回调 |
type | Integer | 是 | 群组类型,1 表示高级群 |
creator | String | 是 | 创建者账号 |
fromDeviceId | String | 是 | 创建者设备 ID |
fromClientType | String | 是 | 创建者客户端类型:AOS(1)、IOS(2)、PC(4)、WEB(16)、REST(32),MAC(64)、HARMONY(65) |
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 | 是 | 操作时间,字符串类型 |
解散群回调
HTTP 示例
HTTPPOST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
AppKey: 15898388**94d219453d6542
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"}
cURL 示例
cURLcurl -X POST \
http://yunxinservice.com.cn/receiveMsg.action \
-H 'appkey: 15898388**94d219453d6542' \
-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"}'
消息体说明
JSON{
"eventType": 8,
"fromAccount": "wmtest3",
"fromClientType": "IOS",
"fromDeviceId": "4f60d2c0-559d-4b84-8315-29c94d8a4ea8",
"tid": 2637250619,
"timestamp": "1564575855993"
}
名称 | 类型 | 必须 | 说明 |
---|---|---|---|
eventType | Integer | 是 | 值为 8,表示是解散群回调 |
tid | Long | 是 | 群 ID |
fromAccount | String | 是 | 操作者账号 |
fromDeviceId | String | 是 | 操作者设备 ID |
fromClientType | String | 是 | 操作者客户端类型:AOS(1)、IOS(2)、PC(4)、WEB(16)、REST(32),MAC(64)、HARMONY(65) |
timestamp | String | 是 | 操作时间,字符串类型 |
群邀请回调
HTTP 示例
HTTPPOST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
AppKey: 158983**19453d6542
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}
cURL 示例
cURLcurl -X POST \
http://yunxinservice.com.cn/receiveMsg.action \
-H 'appkey: 15898388**d219453d6542' \
-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}'
消息体说明
JSON{
"beinvitemode": 0,
"eventType": 9,
"fromAccount": "wmtest1",
"fromClientType": "IOS",
"fromDeviceId": "abe0f670-ee18-453b-af5f-54d5a08bd57f",
"inviteList": ["wmtest10"],
"msg": "普通人邀请",
"tid": 2637216281,
"timestamp": "1564572716247",
"type": 1
}
名称 | 类型 | 必须 | 说明 |
---|---|---|---|
eventType | Integer | 是 | 值为 9,表示是群邀请回调 |
tid | Long | 是 | 群 ID |
fromAccount | String | 是 | 操作者账号 |
fromDeviceId | String | 是 | 操作者设备 ID |
fromClientType | String | 是 | 操作者客户端类型:AOS(1)、IOS(2)、PC(4)、WEB(16)、REST(32),MAC(64)、HARMONY(65) |
type | Integer | 是 | 群组类型,1 表示高级群 |
beinvitemode | Integer | 是 | 被邀请人同意方式,0 表示需要同意,1 表示不需要同意 |
inviteList | JSONArray | 是 | 邀请的人 |
msg | String | 否 | 邀请附言 |
attach | String | 否 | 拉人的 attach 信息 |
timestamp | String | 是 | 操作时间,字符串类型 |
退群回调
HTTP 示例
HTTPPOST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
AppKey: 1589838**194d219453d6542
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"}
cURL 示例
cURLcurl -X POST \
http://yunxinservice.com.cn/receiveMsg.action \
-H 'appkey: 158983881**19453d6542' \
-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"}'
消息体说明
JSON{
"eventType": 10,
"fromAccount": "wmtest7",
"fromClientType": "IOS",
"fromDeviceId": "543d2548-140d-434c-804c-f931fdc23ea9",
"tid": 2637216281,
"timestamp": "1564573486382"
}
名称 | 类型 | 必须 | 说明 |
---|---|---|---|
eventType | Integer | 是 | 值为 10,表示是退群回调 |
tid | Long | 是 | 群 ID |
fromAccount | String | 是 | 操作者账号 |
fromDeviceId | String | 是 | 操作者设备 ID |
fromClientType | String | 是 | 操作者客户端类型:AOS(1)、IOS(2)、PC(4)、WEB(16)、REST(32),MAC(64)、HARMONY(65) |
timestamp | String | 是 | 操作时间,字符串类型 |
增加群管理员回调
HTTP 示例
HTTPPOST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
AppKey: 158983881**d219453d6542
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"}
cURL 示例
cURLcurl -X POST \
http://yunxinservice.com.cn/receiveMsg.action \
-H 'appkey: 15898**d219453d6542' \
-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"}'
消息体说明
JSON{
"eventType": 11,
"fromAccount": "wmtest1",
"fromClientType": "IOS",
"fromDeviceId": "6c11bb65-5506-4fdb-ac37-6ec3c8bdd220",
"managerList": ["wmtest3"],
"tid": 2637250619,
"timestamp": "1564575715262"
}
名称 | 类型 | 必须 | 说明 |
---|---|---|---|
eventType | Integer | 是 | 值为 11,表示是增加群管理员回调 |
tid | Long | 是 | 群 ID |
fromAccount | String | 是 | 操作者账号 |
fromDeviceId | String | 是 | 操作者设备 ID |
fromClientType | String | 是 | 操作者客户端类型:AOS(1)、IOS(2)、PC(4)、WEB(16)、REST(32),MAC(64)、HARMONY(65) |
managerList | JSONArray | 是 | 管理员列表 |
timestamp | String | 是 | 操作时间,字符串类型 |
取消群管理员回调
HTTP 示例
HTTPPOST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
AppKey: 158983**4d219453d6542
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"}
cURL 示例
cURLcurl -X POST \
http://yunxinservice.com.cn/receiveMsg.action \
-H 'appkey: 15898**19453d6542' \
-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"}'
消息体说明
{ "eventType": 12, "fromAccount": "wmtest1", "fromClientType": "iOS", "fromDeviceId": "ccdb6218-8672-4aca-8e26-f8843a2c4eeb", "managerList": ["wmtest3"], "tid": 2637250619, "timestamp": "1564575744921" }
名称 | 类型 | 必须 | 说明 |
---|---|---|---|
eventType | Integer | 是 | 值为 12,表示是取消群管理员回调 |
tid | Long | 是 | 群 ID |
fromAccount | String | 是 | 操作者账号 |
fromDeviceId | String | 是 | 操作者设备 ID |
fromClientType | String | 是 | 操作者客户端类型:AOS(1)、IOS(2)、PC(4)、WEB(16)、REST(32),MAC(64)、HARMONY(65) |
managerList | JSONArray | 是 | 管理员列表 |
timestamp | String | 是 | 操作时间,字符串类型 |
转让群回调
HTTP 示例
HTTPPOST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
AppKey: 15898388**9453d6542
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"}
cURL 示例
cURLcurl -X POST \
http://yunxinservice.com.cn/receiveMsg.action \
-H 'appkey: 1589838**d219453d6542' \
-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"}'
消息体说明
JSON{
"eventType": 13,
"fromAccount": "wmtest1",
"fromClientType": "IOS",
"fromDeviceId": "4777fe02-b9d2-42c0-9586-f29c2ca32f5d",
"leave": false,
"tid": 2637250619,
"timestamp": "1564575814255",
"toAccount": "wmtest3"
}
名称 | 类型 | 必须 | 说明 |
---|---|---|---|
eventType | Integer | 是 | 值为 13,表示是转让群回调 |
tid | Long | 是 | 群 ID |
fromAccount | String | 是 | 操作者账号 |
fromDeviceId | String | 是 | 操作者设备 ID |
fromClientType | String | 是 | 操作者客户端类型:AOS(1)、IOS(2)、PC(4)、WEB(16)、REST(32),MAC(64)、HARMONY(65) |
toAccount | String | 是 | 对方账户 |
leave | Boolean | 是 | 操作者是否退群 |
timestamp | String | 是 | 操作时间,字符串类型 |
踢人出群回调
HTTP 示例
HTTPPOST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
AppKey: 158983881e**9453d6542
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"}
cURL 示例
cURLcurl -X POST \
http://yunxinservice.com.cn/receiveMsg.action \
-H 'appkey: 1589838**194d219453d6542' \
-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"}'
消息体说明
JSON{
"eventType": 14,
"fromAccount": "wmtest1",
"fromClientType": "IOS",
"fromDeviceId": "15bff89f-ae12-426a-8b0e-834b78177879",
"kickList": ["wmtest10"],
"tid": 2637250619,
"timestamp": "1564575473172"
}
名称 | 类型 | 必须 | 说明 |
---|---|---|---|
eventType | Integer | 是 | 值为 14,表示是踢人出群回调 |
tid | Long | 是 | 群 ID |
fromAccount | String | 是 | 操作者账号 |
fromDeviceId | String | 是 | 操作者设备 ID |
fromClientType | String | 是 | 操作者客户端类型:AOS(1)、IOS(2)、PC(4)、WEB(16)、REST(32),MAC(64)、HARMONY(65) |
kickList | JSONArray | 是 | 被踢列表 |
timestamp | String | 是 | 操作时间,字符串类型 |
更新群信息回调
HTTP 示例
HTTPPOST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
AppKey: 15898388**d219453d6542
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"}
cURL 示例
cURLcurl -X POST \
http://yunxinservice.com.cn/receiveMsg.action \
-H 'appkey: 158983881e**4d219453d6542' \
-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"}'
消息体说明
JSON{
"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"
}
名称 | 类型 | 必须 | 说明 |
---|---|---|---|
eventType | Integer | 是 | 值为 15,表示是更新群信息回调 |
fromAccount | String | 是 | 操作者账号 |
fromDeviceId | String | 是 | 操作者设备 ID |
fromClientType | String | 是 | 操作者客户端类型:AOS(1)、IOS(2)、PC(4)、WEB(16)、REST(32),MAC(64)、HARMONY(65) |
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 | 是 | 操作时间,字符串类型 |
更新群成员信息回调
HTTP 示例
HTTPPOST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
AppKey: 158983881e**453d6542
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"}
cURL 示例
cURLcurl -X POST \
http://yunxinservice.com.cn/receiveMsg.action \
-H 'appkey: 15898**4d219453d6542' \
-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"}'
消息体说明
JSON{
"eventType": 16,
"fromAccount": "wmtest1",
"fromClientType": "IOS",
"fromDeviceId": "bda08b34-4dff-4754-929d-e32ce10b8835",
"nick": "wmtest1Dagn5",
"notifyType": 1,
"tid": 2637250619,
"timestamp": "1564575756458"
}
名称 | 类型 | 必须 | 说明 |
---|---|---|---|
eventType | Integer | 是 | 值为 16,表示是更新群成员信息回调 |
fromAccount | String | 是 | 操作者账号 |
fromDeviceId | String | 是 | 操作者设备 ID |
fromClientType | String | 是 | 操作者客户端类型:AOS(1)、IOS(2)、PC(4)、WEB(16)、REST(32),MAC(64)、HARMONY(65) |
tid | Long | 是 | 群 ID |
nick | String | 否 | 群昵称 |
custom | String | 否 | 自定义字段 |
notifyType | Integer | 否 | 通知类型,0 表示通知,1 表示关闭通知,2 表示仅接受管理员消息 |
timestamp | String | 是 | 操作时间,字符串类型 |
更新其他群成员信息回调
HTTP 示例
HTTPPOST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
AppKey: 15898388**219453d6542
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"}
cURL 示例
cURLcurl -X POST \
http://yunxinservice.com.cn/receiveMsg.action \
-H 'appkey: 1589**219453d6542' \
-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"}'
消息体说明
JSON{
"eventType": 17,
"fromAccount": "wmtest1",
"fromClientType": "IOS",
"fromDeviceId": "831557c3-a892-4c37-b1e4-90b72d989c32",
"nick": "wmtest2-29",
"tid": 2637250619,
"timestamp": "1564575767978",
"toAccount": "wmtest2"
}
名称 | 类型 | 必须 | 说明 |
---|---|---|---|
eventType | Integer | 是 | 值为 17,表示是更新其他群成员信息回调 |
fromAccount | String | 是 | 操作者账号 |
fromDeviceId | String | 是 | 操作者设备 ID |
fromClientType | String | 是 | 操作者客户端类型:AOS(1)、IOS(2)、PC(4)、WEB(16)、REST(32),MAC(64)、HARMONY(65) |
tid | Long | 是 | 群 ID |
toAccount | String | 是 | 被操作者 |
nick | String | 否 | 群昵称 |
timestamp | String | 是 | 操作时间,字符串类型 |
禁言群成员回调
HTTP 示例
HTTPPOST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
AppKey: 15898388**219453d6542
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"}
cURL 示例
cURLcurl -X POST \
http://yunxinservice.com.cn/receiveMsg.action \
-H 'appkey: 1589838**d219453d6542' \
-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"}'
消息体说明
JSON{
"eventType": 18,
"fromAccount": "wmtest1",
"fromClientType": "IOS",
"fromDeviceId": "c41545f3-7e67-49fb-a477-c82e0f235c94",
"mute": 1,
"tid": 2637250619,
"timestamp": "1564575792745",
"toAccount": "wmtest2"
}
名称 | 类型 | 必须 | 说明 |
---|---|---|---|
eventType | Integer | 是 | 值为 18,表示是禁言群成员回调 |
fromAccount | String | 是 | 操作者账号 |
fromDeviceId | String | 是 | 操作者设备 ID |
fromClientType | String | 是 | 操作者客户端类型:AOS(1)、IOS(2)、PC(4)、WEB(16)、REST(32),MAC(64)、HARMONY(65) |
tid | Long | 是 | 群 ID |
toAccount | String | 是 | 被操作者 |
mute | Integer | 否 | 0 表示不禁言,1 表示禁言 |
timestamp | String | 是 | 操作时间,字符串类型 |
申请入群回调
HTTP 示例
HTTPPOST /receiveMsg.action HTTP/1.1
Host: yunxinservice.com.cn
AppKey: 158983**d219453d6542
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"}
cURL 示例
cURLcurl -X POST \
http://yunxinservice.com.cn/receiveMsg.action \
-H 'appkey: 15898388**94d219453d6542' \
-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"}'
消息体说明
JSON{
"eventType": 19,
"fromAccount": "wmtest7",
"fromClientType": "IOS",
"fromDeviceId": "6faac69b-02d0-487b-a4fe-693e36af70e6",
"joinmode": 0,
"msg": "applyInfo",
"tid": 2637216281,
"timestamp": "1564573451562"
}
名称 | 类型 | 必须 | 说明 |
---|---|---|---|
eventType | Integer | 是 | 值为 19,表示是申请入群回调 |
fromAccount | String | 是 | 操作者账号 |
fromDeviceId | String | 是 | 操作者设备 ID |
fromClientType | String | 是 | 操作者客户端类型:AOS(1)、IOS(2)、PC(4)、WEB(16)、REST(32),MAC(64)、HARMONY(65) |
tid | Long | 是 | 群 ID |
msg | String | 否 | 申请附言 |
joinmode | Integer | 否 | 申请入群权限,0 表示不需要申请,1 表示需要申请,2 表示不允许申请 |
timestamp | String | 是 | 操作时间,字符串类型 |
此文档是否对你有帮助?