圈组
更新时间: 2024/03/14 16:34:39
圈组
创建服务器
请求说明
httpPOST https://api.netease.im/nimserver/qchat/createServer.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8
请求中Headers的设置请参考接口概述
接口描述
- 创建服务器。
参数说明
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
accid | String | 是 | 用户帐号 |
name | String | 否 | 名称,最大长度64字符 |
icon | String | 否 | 图标,最大长度1024字符 |
custom | String | 否 | 自定义扩展,最大长度1024字符 |
inviteMode | String | 否 | 邀请模式:0-邀请需要同意(默认),1-邀请不需要同意。其它返回414 |
applyMode | String | 否 | 申请模式:0-申请不需要同意(默认),1-申请需要同意。其它返回414 |
curl请求示例
curlcurl -X POST -H "AppKey: go9dnk49bkd9jd9vmel1kglw0803mgq3" -H "Nonce: 4tgggergigwow323t23t" -H "CurTime: 1443592222" -H "CheckSum: 9e9db3b6c9abb2e1962cf3e6f7316fcc55583f86" -H "Content-Type: application/x-www-form-urlencoded" -d 'accid=zhangsan' 'https://api.netease.im/nimserver/qchat/createServer.action'
返回说明
http 响应:json
json"Content-Type": "application/json; charset=utf-8"
{
"code":200,
"serverInfo": {
"serverId": 123, //服务器唯一标识
"name": "name", //名称
"icon": "icon", //图标
"custom": "custom", //自定义扩展
"owner": "zhangsan", //所有者的用户帐号
"memberNumber": 1, //成员数量
"inviteMode": 0, //邀请模式
"applyMode": 0, //申请模式
"channelNumber": 0, //频道数量
"validFlag": 1, //有效标志:0-无效,1-有效
"createTime": 1234, //创建时间
"updateTime": 1234 //更新时间
}
}
主要的返回码
200、403、414、416、431、500
具体请参考code状态表
删除服务器
请求说明
httpPOST https://api.netease.im/nimserver/qchat/removeServer.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8
请求中Headers的设置请参考接口概述
接口描述
- 删除服务器。
参数说明
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
accid | String | 是 | 用户帐号 |
serverId | String | 是 | 服务器唯一标识 |
curl请求示例
curlcurl -X POST -H "AppKey: go9dnk49bkd9jd9vmel1kglw0803mgq3" -H "Nonce: 4tgggergigwow323t23t" -H "CurTime: 1443592222" -H "CheckSum: 9e9db3b6c9abb2e1962cf3e6f7316fcc55583f86" -H "Content-Type: application/x-www-form-urlencoded" -d 'accid=zhangsan&serverId=1513535' 'https://api.netease.im/nimserver/qchat/removeServer.action'
返回说明
http 响应:json
json"Content-Type": "application/json; charset=utf-8"
{
"code":200
}
主要的返回码
200、403、414、416、431、500
具体请参考code状态表
修改服务器信息
请求说明
httpPOST https://api.netease.im/nimserver/qchat/updateServer.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8
请求中Headers的设置请参考接口概述
接口描述
- 修改服务器信息。
参数说明
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
accid | String | 是 | 用户帐号 |
serverId | String | 是 | 服务器唯一标识 |
name | String | 否 | 名称,最大长度64字符 |
icon | String | 否 | 图标,最大长度1024字符 |
custom | String | 否 | 自定义扩展,最大长度1024字符 |
inviteMode | String | 否 | 邀请模式:0-邀请需要同意(默认),1-邀请不需要同意。其它返回414 |
applyMode | String | 否 | 申请模式:0-申请不需要同意(默认),1-申请需要同意。其它返回414 |
curl请求示例
curlcurl -X POST -H "AppKey: go9dnk49bkd9jd9vmel1kglw0803mgq3" -H "Nonce: 4tgggergigwow323t23t" -H "CurTime: 1443592222" -H "CheckSum: 9e9db3b6c9abb2e1962cf3e6f7316fcc55583f86" -H "Content-Type: application/x-www-form-urlencoded" -d 'accid=zhangsan&serverId=1513535&name=update' 'https://api.netease.im/nimserver/qchat/updateServer.action'
返回说明
http 响应:json
json"Content-Type": "application/json; charset=utf-8"
{
"code":200,
"serverInfo": {
"serverId": 123, //服务器唯一标识
"name": "name", //名称
"icon": "icon", //图标
"custom": "custom", //自定义扩展
"owner": "zhangsan", //所有者的用户帐号
"memberNumber": 1, //成员数量
"inviteMode": 0, //邀请模式
"applyMode": 0, //申请模式
"channelNumber": 0, //频道数量
"validFlag": 1, //有效标志:0-无效,1-有效
"createTime": 1234, //创建时间
"updateTime": 1234 //更新时间
}
}
主要的返回码
200、403、414、416、431、500
具体请参考code状态表
查询服务器信息
请求说明
httpPOST https://api.netease.im/nimserver/qchat/getServers.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8
请求中Headers的设置请参考接口概述
接口描述
- 查询服务器信息
参数说明
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
serverIds | String | 是 | 服务器唯一标识列表,JSONArray格式,最大数量200 |
curl请求示例
curlcurl -X POST -H "AppKey: go9dnk49bkd9jd9vmel1kglw0803mgq3" -H "Nonce: 4tgggergigwow323t23t" -H "CurTime: 1443592222" -H "CheckSum: 9e9db3b6c9abb2e1962cf3e6f7316fcc55583f86" -H "Content-Type: application/x-www-form-urlencoded" -d 'serverIds=["123","234"]' 'https://api.netease.im/nimserver/qchat/getServers.action'
返回说明
http 响应:json
json"Content-Type": "application/json; charset=utf-8"
{
"code":200,
"serverInfos": [
{
"serverId": 123, //服务器唯一标识
"name": "name", //名称
"icon": "icon", //图标
"custom": "custom", //自定义扩展
"owner": "zhangsan", //所有者的用户帐号
"memberNumber": 1, //成员数量
"inviteMode": 0, //邀请模式
"applyMode": 0, //申请模式
"channelNumber": 0, //频道数量
"validFlag": 1, //有效标志:0-无效,1-有效
"createTime": 1234, //创建时间
"updateTime": 1234 //更新时间
},
{
"serverId": 123,
"name": "name",
"icon": "icon",
"custom": "custom",
"owner": "zhangsan",
"memberNumber": 1,
"inviteMode": 0,
"applyMode": 0,
"channelNumber": 1,
"validFlag": 1,
"createTime": 1234,
"updateTime": 1234
}
]
}
主要的返回码
200、403、414、416、431、500
具体请参考code状态表
分页查询服务器信息列表
请求说明
httpPOST https://api.netease.im/nimserver/qchat/getServerListPage.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8
请求中Headers的设置请参考接口概述
接口描述
- 分页查询服务器信息列表
参数说明
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
accid | String | 是 | 用户帐号 |
timetag | String | 是 | 用户加入服务器时间,单位毫秒,如果传0表示查询首页,分页查询按照加入时间逆序 |
limit | String | 是 | 本次查询的数量上限,最大数量200 |
curl请求示例
curlcurl -X POST -H "AppKey: go9dnk49bkd9jd9vmel1kglw0803mgq3" -H "Nonce: 4tgggergigwow323t23t" -H "CurTime: 1443592222" -H "CheckSum: 9e9db3b6c9abb2e1962cf3e6f7316fcc55583f86" -H "Content-Type: application/x-www-form-urlencoded" -d 'accid=zhangsan&timetag=1558938768520&limit=10' 'https://api.netease.im/nimserver/qchat/getServerListPage.action'
返回说明
http 响应:json
json"Content-Type": "application/json; charset=utf-8"
{
"code":200,
"pageInfo": {
"hasMore": true, //是否需要查询下一页
"nextTimetag": 1234 //查询下一页时需要的时间戳
},
"serverInfos": [
{
"serverId": 123, //服务器唯一标识
"name": "name", //名称
"icon": "icon", //图标
"custom": "custom", //自定义扩展
"owner": "zhangsan", //所有者的用户帐号
"memberNumber": 1, //成员数量
"inviteMode": 0, //邀请模式
"applyMode": 0, //申请模式
"channelNumber": 0, //频道数量
"validFlag": 1, //有效标志:0-无效,1-有效
"createTime": 1234, //创建时间
"updateTime": 1234 //更新时间
},
{
"serverId": 123,
"name": "name",
"icon": "icon",
"custom": "custom",
"owner": "zhangsan",
"memberNumber": 1,
"inviteMode": 0,
"applyMode": 0,
"channelNumber": 1,
"validFlag": 1,
"createTime": 1234,
"updateTime": 1234
}
]
}
主要的返回码
200、403、414、416、431、500
具体请参考code状态表
邀请服务器成员
请求说明
httpPOST https://api.netease.im/nimserver/qchat/inviteServerMember.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8
请求中Headers的设置请参考接口概述
接口描述
- 邀请服务器成员
参数说明
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
accid | String | 是 | 用户帐号 |
serverId | String | 是 | 服务器唯一标识 |
invitedAccids | String | 是 | 被邀请者的用户帐号列表,JSONArray格式,最大数量200 |
msg | String | 是 | 发出邀请的消息内容,最大长度150字符 |
curl请求示例
curlcurl -X POST -H "AppKey: go9dnk49bkd9jd9vmel1kglw0803mgq3" -H "Nonce: 4tgggergigwow323t23t" -H "CurTime: 1443592222" -H "CheckSum: 9e9db3b6c9abb2e1962cf3e6f7316fcc55583f86" -H "Content-Type: application/x-www-form-urlencoded" -d 'accid=zhangsan&serverId=1513535&invitedAccids=["lisi","wangwu"]&msg=invite' 'https://api.netease.im/nimserver/qchat/inviteServerMember.action'
返回说明
http 响应:json
json"Content-Type": "application/json; charset=utf-8"
{
"code":200,
"failAccid": { // 如果被邀请者中存在加入服务器数量超过限制的情况返回failAccid
"accid": ["lisi"],
"msg": "user server count exceed"
}
}
主要的返回码
200、403、414、416、431、500
具体请参考code状态表
接受邀请
请求说明
httpPOST https://api.netease.im/nimserver/qchat/acceptServerInvite.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8
请求中Headers的设置请参考接口概述
接口描述
- 接受邀请
参数说明
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
accid | String | 是 | 用户帐号 |
serverId | String | 是 | 服务器唯一标识 |
inviteAccid | String | 是 | 邀请者的用户帐号 |
curl请求示例
curlcurl -X POST -H "AppKey: go9dnk49bkd9jd9vmel1kglw0803mgq3" -H "Nonce: 4tgggergigwow323t23t" -H "CurTime: 1443592222" -H "CheckSum: 9e9db3b6c9abb2e1962cf3e6f7316fcc55583f86" -H "Content-Type: application/x-www-form-urlencoded" -d 'accid=zhangsan&serverId=1513535&inviteAccid=lisi' 'https://api.netease.im/nimserver/qchat/acceptServerInvite.action'
返回说明
http 响应:json
json"Content-Type": "application/json; charset=utf-8"
{
"code":200
}
主要的返回码
200、403、414、416、431、500
具体请参考code状态表
拒绝邀请
请求说明
httpPOST https://api.netease.im/nimserver/qchat/rejectServerInvite.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8
请求中Headers的设置请参考接口概述
接口描述
- 拒绝邀请
参数说明
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
accid | String | 是 | 用户帐号 |
serverId | String | 是 | 服务器唯一标识 |
inviteAccid | String | 是 | 邀请者的用户帐号 |
msg | String | 是 | 拒绝邀请的消息内容,最大长度150字符 |
curl请求示例
curlcurl -X POST -H "AppKey: go9dnk49bkd9jd9vmel1kglw0803mgq3" -H "Nonce: 4tgggergigwow323t23t" -H "CurTime: 1443592222" -H "CheckSum: 9e9db3b6c9abb2e1962cf3e6f7316fcc55583f86" -H "Content-Type: application/x-www-form-urlencoded" -d 'accid=zhangsan&serverId=1513535&inviteAccid=lisi&msg=reject' 'https://api.netease.im/nimserver/qchat/rejectServerInvite.action'
返回说明
http 响应:json
json"Content-Type": "application/json; charset=utf-8"
{
"code":200
}
主要的返回码
200、403、414、416、431、500
具体请参考code状态表
申请加入服务器
请求说明
httpPOST https://api.netease.im/nimserver/qchat/applyServer.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8
请求中Headers的设置请参考接口概述
接口描述
- 申请加入服务器
参数说明
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
accid | String | 是 | 用户帐号 |
serverId | String | 是 | 服务器唯一标识 |
msg | String | 是 | 发出申请的消息内容,最大长度150字符 |
curl请求示例
curlcurl -X POST -H "AppKey: go9dnk49bkd9jd9vmel1kglw0803mgq3" -H "Nonce: 4tgggergigwow323t23t" -H "CurTime: 1443592222" -H "CheckSum: 9e9db3b6c9abb2e1962cf3e6f7316fcc55583f86" -H "Content-Type: application/x-www-form-urlencoded" -d 'accid=zhangsan&serverId=1513535&msg=apply' 'https://api.netease.im/nimserver/qchat/applyServer.action'
返回说明
http 响应:json
json"Content-Type": "application/json; charset=utf-8"
{
"code":200
}
主要的返回码
200、403、414、416、431、500
具体请参考code状态表
接受申请
请求说明
httpPOST https://api.netease.im/nimserver/qchat/acceptServerApply.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8
请求中Headers的设置请参考接口概述
接口描述
- 接受申请
参数说明
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
accid | String | 是 | 用户帐号 |
serverId | String | 是 | 服务器唯一标识 |
applyAccid | String | 是 | 申请者的用户帐号 |
curl请求示例
curlcurl -X POST -H "AppKey: go9dnk49bkd9jd9vmel1kglw0803mgq3" -H "Nonce: 4tgggergigwow323t23t" -H "CurTime: 1443592222" -H "CheckSum: 9e9db3b6c9abb2e1962cf3e6f7316fcc55583f86" -H "Content-Type: application/x-www-form-urlencoded" -d 'accid=zhangsan&serverId=1513535&applyAccid=lisi' 'https://api.netease.im/nimserver/qchat/acceptServerApply.action'
返回说明
http 响应:json
json"Content-Type": "application/json; charset=utf-8"
{
"code":200
}
主要的返回码
200、403、414、416、431、500
具体请参考code状态表
拒绝申请
请求说明
httpPOST https://api.netease.im/nimserver/qchat/rejectServerApply.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8
请求中Headers的设置请参考接口概述
接口描述
- 拒绝申请
参数说明
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
accid | String | 是 | 用户帐号 |
serverId | String | 是 | 服务器唯一标识 |
applyAccid | String | 是 | 申请者的用户帐号 |
msg | String | 是 | 拒绝申请的消息内容,最大长度150字符 |
curl请求示例
curlcurl -X POST -H "AppKey: go9dnk49bkd9jd9vmel1kglw0803mgq3" -H "Nonce: 4tgggergigwow323t23t" -H "CurTime: 1443592222" -H "CheckSum: 9e9db3b6c9abb2e1962cf3e6f7316fcc55583f86" -H "Content-Type: application/x-www-form-urlencoded" -d 'accid=zhangsan&serverId=1513535&applyAccid=lisi&msg=reject' 'https://api.netease.im/nimserver/qchat/rejectServerApply.action'
返回说明
http 响应:json
json"Content-Type": "application/json; charset=utf-8"
{
"code":200
}
主要的返回码
200、403、414、416、431、500
具体请参考code状态表
踢除服务器成员
请求说明
httpPOST https://api.netease.im/nimserver/qchat/kickServerMember.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8
请求中Headers的设置请参考接口概述
接口描述
- 踢除服务器成员
参数说明
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
accid | String | 是 | 用户帐号 |
serverId | String | 是 | 服务器唯一标识 |
kickedAccids | String | 是 | 被踢除者的用户帐号列表,JSONArray格式,最大数量200 |
curl请求示例
curlcurl -X POST -H "AppKey: go9dnk49bkd9jd9vmel1kglw0803mgq3" -H "Nonce: 4tgggergigwow323t23t" -H "CurTime: 1443592222" -H "CheckSum: 9e9db3b6c9abb2e1962cf3e6f7316fcc55583f86" -H "Content-Type: application/x-www-form-urlencoded" -d 'accid=zhangsan&serverId=1513535&kickedAccids=["lisi","wangwu"]' 'https://api.netease.im/nimserver/qchat/kickServerMember.action'
返回说明
http 响应:json
json"Content-Type": "application/json; charset=utf-8"
{
"code":200
}
主要的返回码
200、403、414、416、431、500
具体请参考code状态表
主动离开服务器
请求说明
httpPOST https://api.netease.im/nimserver/qchat/leaveServer.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8
请求中Headers的设置请参考接口概述
接口描述
- 主动离开服务器
参数说明
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
accid | String | 是 | 用户帐号 |
serverId | String | 是 | 服务器唯一标识 |
curl请求示例
curlcurl -X POST -H "AppKey: go9dnk49bkd9jd9vmel1kglw0803mgq3" -H "Nonce: 4tgggergigwow323t23t" -H "CurTime: 1443592222" -H "CheckSum: 9e9db3b6c9abb2e1962cf3e6f7316fcc55583f86" -H "Content-Type: application/x-www-form-urlencoded" -d 'accid=zhangsan&serverId=1513535' 'https://api.netease.im/nimserver/qchat/leaveServer.action'
返回说明
http 响应:json
json"Content-Type": "application/json; charset=utf-8"
{
"code":200
}
主要的返回码
200、403、414、416、431、500
具体请参考code状态表
修改服务器成员信息
请求说明
httpPOST https://api.netease.im/nimserver/qchat/updateServerMember.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8
请求中Headers的设置请参考接口概述
接口描述
- 修改服务器成员信息
参数说明
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
accid | String | 是 | 用户帐号 |
serverId | String | 是 | 服务器唯一标识 |
nick | String | 否 | 昵称,最大长度64字符 |
avatar | String | 否 | 头像,最大长度1024字符 |
custom | String | 否 | 自定义扩展,最大长度1024字符 |
curl请求示例
curlcurl -X POST -H "AppKey: go9dnk49bkd9jd9vmel1kglw0803mgq3" -H "Nonce: 4tgggergigwow323t23t" -H "CurTime: 1443592222" -H "CheckSum: 9e9db3b6c9abb2e1962cf3e6f7316fcc55583f86" -H "Content-Type: application/x-www-form-urlencoded" -d 'accid=zhangsan&serverId=1513535&nick=update' 'https://api.netease.im/nimserver/qchat/updateServerMember.action'
返回说明
http 响应:json
json"Content-Type": "application/json; charset=utf-8"
{
"code":200,
"serverMember": {
"serverId": 123, //服务器唯一标识
"accid": "lisi", //成员的用户帐号
"nick": "nick", //昵称
"avatar": "avatar", //头像
"custom": "custom", //自定义扩展
"type": 0, //类型:0-普通成员,1-所有者
"joinTime": 1234, //加入时间
"inviter": "zhangsan", //邀请者的用户帐号
"validFlag": 1, //有效标志:0-无效,1-有效
"createTime": 1234, //创建时间
"updateTime": 1234 //更新时间
}
}
主要的返回码
200、403、414、416、431、500
具体请参考code状态表
修改他人服务器成员信息
请求说明
httpPOST https://api.netease.im/nimserver/qchat/updateOtherServerMember.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8
请求中Headers的设置请参考接口概述
接口描述
- 修改他人服务器成员信息
参数说明
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
accid | String | 是 | 用户帐号 |
serverId | String | 是 | 服务器唯一标识 |
otherAccid | String | 是 | 他人用户帐号 |
nick | String | 否 | 昵称,最大长度64字符 |
avatar | String | 否 | 头像,最大长度1024字符 |
curl请求示例
curlcurl -X POST -H "AppKey: go9dnk49bkd9jd9vmel1kglw0803mgq3" -H "Nonce: 4tgggergigwow323t23t" -H "CurTime: 1443592222" -H "CheckSum: 9e9db3b6c9abb2e1962cf3e6f7316fcc55583f86" -H "Content-Type: application/x-www-form-urlencoded" -d 'accid=zhangsan&serverId=1513535&otherAccid=lisi&nick=update' 'https://api.netease.im/nimserver/qchat/updateOtherServerMember.action'
返回说明
http 响应:json
json"Content-Type": "application/json; charset=utf-8"
{
"code":200,
"serverMember": {
"serverId": 123, //服务器唯一标识
"accid": "lisi", //成员的用户帐号
"nick": "nick", //昵称
"avatar": "avatar", //头像
"custom": "custom", //自定义扩展
"type": 0, //类型:0-普通成员,1-所有者
"joinTime": 1234, //加入时间
"inviter": "zhangsan", //邀请者的用户帐号
"validFlag": 1, //有效标志:0-无效,1-有效
"createTime": 1234, //创建时间
"updateTime": 1234 //更新时间
}
}
主要的返回码
200、403、414、416、431、500
具体请参考code状态表
查询服务器成员信息
请求说明
httpPOST https://api.netease.im/nimserver/qchat/getServerMembers.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8
请求中Headers的设置请参考接口概述
接口描述
- 查询服务器成员信息
参数说明
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
serverIdAccids | String | 是 | 服务器唯一标识|用户账号列表,JSONArray格式,具体格式serverId|accid |
curl请求示例
curlcurl -X POST -H "AppKey: go9dnk49bkd9jd9vmel1kglw0803mgq3" -H "Nonce: 4tgggergigwow323t23t" -H "CurTime: 1443592222" -H "CheckSum: 9e9db3b6c9abb2e1962cf3e6f7316fcc55583f86" -H "Content-Type: application/x-www-form-urlencoded" -d 'serverIdAccids=["123|lisi","234|wangwu"]' 'https://api.netease.im/nimserver/qchat/getServerMembers.action'
返回说明
http 响应:json
json"Content-Type": "application/json; charset=utf-8"
{
"code":200,
"serverMembers": [
{
"serverId": 123, //服务器唯一标识
"accid": "lisi", //成员的用户帐号
"nick": "nick", //昵称
"avatar": "avatar", //头像
"custom": "custom", //自定义扩展
"type": 0, //类型:0-普通成员,1-所有者
"joinTime": 1234, //加入时间
"inviter": "zhangsan", //邀请者的用户帐号
"validFlag": 1, //有效标志:0-无效,1-有效
"createTime": 1234, //创建时间
"updateTime": 1234 //更新时间
},
{
"serverId": 123,
"accid": "lisi",
"nick": "nick",
"avatar": "avatar",
"custom": "custom",
"type": 0,
"joinTime": 1234,
"inviter": "zhangsan",
"validFlag": 1,
"createTime": 1234,
"updateTime": 1234
}
]
}
主要的返回码
200、403、414、416、431、500
具体请参考code状态表
分页查询服务器成员信息列表
请求说明
httpPOST https://api.netease.im/nimserver/qchat/getServerMemberListPage.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8
请求中Headers的设置请参考接口概述
接口描述
- 分页查询服务器成员信息列表
参数说明
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
serverId | String | 是 | 服务器唯一标识 |
timetag | String | 是 | 用户加入服务器时间,单位毫秒,如果传0表示查询首页,分页查询按照加入时间逆序 |
limit | String | 是 | 本次查询的数量上限,最大数量200 |
accid | String | 否 | 用户帐号,如果传入校验该用户是否为服务器成员 |
curl请求示例
curlcurl -X POST -H "AppKey: go9dnk49bkd9jd9vmel1kglw0803mgq3" -H "Nonce: 4tgggergigwow323t23t" -H "CurTime: 1443592222" -H "CheckSum: 9e9db3b6c9abb2e1962cf3e6f7316fcc55583f86" -H "Content-Type: application/x-www-form-urlencoded" -d 'serverId=1513535&timetag=1558938768520&limit=10' 'https://api.netease.im/nimserver/qchat/getServerMemberListPage.action'
返回说明
http 响应:json
json"Content-Type": "application/json; charset=utf-8"
{
"code":200,
"pageInfo": {
"hasMore": true, //是否需要查询下一页
"nextTimetag": 1234 //查询下一页时需要的时间戳
},
"serverMembers": [
{
"serverId": 123, //服务器唯一标识
"accid": "lisi", //成员的用户帐号
"nick": "nick", //昵称
"avatar": "avatar", //头像
"custom": "custom", //自定义扩展
"type": 0, //类型:0-普通成员,1-所有者
"joinTime": 1234, //加入时间
"inviter": "zhangsan", //邀请者的用户帐号
"validFlag": 1, //有效标志:0-无效,1-有效
"createTime": 1234, //创建时间
"updateTime": 1234 //更新时间
},
{
"serverId": 123,
"accid": "lisi",
"nick": "nick",
"avatar": "avatar",
"custom": "custom",
"type": 0,
"joinTime": 1234,
"inviter": "zhangsan",
"validFlag": 1,
"createTime": 1234,
"updateTime": 1234
}
]
}
主要的返回码
200、403、414、416、431、500
具体请参考code状态表
创建频道
请求说明
httpPOST https://api.netease.im/nimserver/qchat/createChannel.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8
请求中Headers的设置请参考接口概述
接口描述
- 创建频道
参数说明
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
accid | String | 是 | 用户帐号 |
serverId | String | 是 | 服务器唯一标识 |
type | String | 是 | 类型:0-消息频道,100-自定义频道。其它返回414 |
name | String | 否 | 名称,最大长度64字符 |
topic | String | 否 | 主题,最大长度64字符 |
custom | String | 否 | 自定义扩展,最大长度1024字符 |
viewMode | String | 否 | 查看模式:0-公开(默认),1-私密。其它返回414 |
curl请求示例
curlcurl -X POST -H "AppKey: go9dnk49bkd9jd9vmel1kglw0803mgq3" -H "Nonce: 4tgggergigwow323t23t" -H "CurTime: 1443592222" -H "CheckSum: 9e9db3b6c9abb2e1962cf3e6f7316fcc55583f86" -H "Content-Type: application/x-www-form-urlencoded" -d 'accid=zhangsan&serverId=1513535&type=0' 'https://api.netease.im/nimserver/qchat/createChannel.action'
返回说明
http 响应:json
json"Content-Type": "application/json; charset=utf-8"
{
"code":200,
"channelInfo": {
"channelId": 123, //频道唯一标识
"serverId": 123, //服务器唯一标识
"name": "name", //名称
"topic": "topic", //主题
"custom": "custom", //自定义扩展
"type": 0, //类型:0-消息频道,100-自定义频道
"owner": "zhangsan", //所有者
"viewMode": 0, //查看模式
"validFlag": 1, //有效标志:0-无效,1-有效
"createTime": 1234, //创建时间
"updateTime": 1234 //更新时间
}
}
主要的返回码
200、403、414、416、431、500
具体请参考code状态表
删除频道
请求说明
httpPOST https://api.netease.im/nimserver/qchat/removeChannel.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8
请求中Headers的设置请参考接口概述
接口描述
- 删除频道
参数说明
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
accid | String | 是 | 用户帐号 |
channelId | String | 是 | 频道唯一标识 |
curl请求示例
curlcurl -X POST -H "AppKey: go9dnk49bkd9jd9vmel1kglw0803mgq3" -H "Nonce: 4tgggergigwow323t23t" -H "CurTime: 1443592222" -H "CheckSum: 9e9db3b6c9abb2e1962cf3e6f7316fcc55583f86" -H "Content-Type: application/x-www-form-urlencoded" -d 'accid=zhangsan&channelId=1513535' 'https://api.netease.im/nimserver/qchat/removeChannel.action'
返回说明
http 响应:json
json"Content-Type": "application/json; charset=utf-8"
{
"code":200
}
主要的返回码
200、403、414、416、431、500
具体请参考code状态表
修改频道信息
请求说明
httpPOST https://api.netease.im/nimserver/qchat/updateChannel.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8
请求中Headers的设置请参考接口概述
接口描述
- 修改频道信息
参数说明
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
accid | String | 是 | 用户帐号 |
channelId | String | 是 | 频道唯一标识 |
name | String | 否 | 名称,最大长度64字符 |
topic | String | 否 | 主题,最大长度64字符 |
custom | String | 否 | 自定义扩展,最大长度1024字符 |
viewMode | String | 否 | 查看模式:0-公开(默认),1-私密。其它返回414 |
curl请求示例
curlcurl -X POST -H "AppKey: go9dnk49bkd9jd9vmel1kglw0803mgq3" -H "Nonce: 4tgggergigwow323t23t" -H "CurTime: 1443592222" -H "CheckSum: 9e9db3b6c9abb2e1962cf3e6f7316fcc55583f86" -H "Content-Type: application/x-www-form-urlencoded" -d 'accid=zhangsan&channelId=1513535&name=update' 'https://api.netease.im/nimserver/qchat/updateChannel.action'
返回说明
http 响应:json
json"Content-Type": "application/json; charset=utf-8"
{
"code":200,
"channelInfo": {
"channelId": 123, //频道唯一标识
"serverId": 123, //服务器唯一标识
"name": "name", //名称
"topic": "topic", //主题
"custom": "custom", //自定义扩展
"type": 0, //类型:0-消息频道,100-自定义频道
"owner": "zhangsan", //所有者
"viewMode": 0, //查看模式
"validFlag": 1, //有效标志:0-无效,1-有效
"createTime": 1234, //创建时间
"updateTime": 1234 //更新时间
}
}
主要的返回码
200、403、414、416、431、500
具体请参考code状态表
查询频道信息
请求说明
httpPOST https://api.netease.im/nimserver/qchat/getChannels.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8
请求中Headers的设置请参考接口概述
接口描述
- 查询频道信息
参数说明
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
channelIds | String | 是 | 频道唯一标识列表,JSONArray格式,最大数量200 |
curl请求示例
curlcurl -X POST -H "AppKey: go9dnk49bkd9jd9vmel1kglw0803mgq3" -H "Nonce: 4tgggergigwow323t23t" -H "CurTime: 1443592222" -H "CheckSum: 9e9db3b6c9abb2e1962cf3e6f7316fcc55583f86" -H "Content-Type: application/x-www-form-urlencoded" -d 'channelIds=["123","234"]' 'https://api.netease.im/nimserver/qchat/getChannels.action'
返回说明
http 响应:json
json"Content-Type": "application/json; charset=utf-8"
{
"code":200,
"channelInfos": [
{
"channelId": 123, //频道唯一标识
"serverId": 123, //服务器唯一标识
"name": "name", //名称
"topic": "topic", //主题
"custom": "custom", //自定义扩展
"type": 0, //类型:0-消息频道,100-自定义频道
"owner": "zhangsan", //所有者
"viewMode": 0, //查看模式
"validFlag": 1, //有效标志:0-无效,1-有效
"createTime": 1234, //创建时间
"updateTime": 1234 //更新时间
},
{
"channelId": 123,
"serverId": 123,
"name": "name",
"topic": "topic",
"custom": "custom",
"type": 0,
"owner": "zhangsan",
"viewMode": 0,
"validFlag": 1,
"createTime": 1234,
"updateTime": 1234
}
]
}
主要的返回码
200、403、414、416、431、500
具体请参考code状态表
分页查询频道信息列表
请求说明
httpPOST https://api.netease.im/nimserver/qchat/getChannelListPage.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8
请求中Headers的设置请参考接口概述
接口描述
- 分页查询频道信息列表
参数说明
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
serverId | String | 是 | 服务器唯一标识 |
timetag | String | 是 | 频道创建时间,单位毫秒,如果传0表示查询首页,分页查询按照创建时间逆序 |
limit | String | 是 | 本次查询的数量上限,最大数量200 |
accid | String | 否 | 用户帐号,如果不传返回服务器下频道,如果传入返回服务器下用户可查看的频道 |
curl请求示例
curlcurl -X POST -H "AppKey: go9dnk49bkd9jd9vmel1kglw0803mgq3" -H "Nonce: 4tgggergigwow323t23t" -H "CurTime: 1443592222" -H "CheckSum: 9e9db3b6c9abb2e1962cf3e6f7316fcc55583f86" -H "Content-Type: application/x-www-form-urlencoded" -d 'serverId=1513535&timetag=1558938768520&limit=10' 'https://api.netease.im/nimserver/qchat/getChannelListPage.action'
返回说明
http 响应:json
json"Content-Type": "application/json; charset=utf-8"
{
"code":200,
"pageInfo": {
"hasMore": true, //是否需要查询下一页
"nextTimetag": 1234 //查询下一页时需要的时间戳
},
"channelInfos": [
{
"channelId": 123, //频道唯一标识
"serverId": 123, //服务器唯一标识
"name": "name", //名称
"topic": "topic", //主题
"custom": "custom", //自定义扩展
"type": 0, //类型:0-消息频道,100-自定义频道
"owner": "zhangsan", //所有者
"viewMode": 0, //查看模式
"validFlag": 1, //有效标志:0-无效,1-有效
"createTime": 1234, //创建时间
"updateTime": 1234 //更新时间
},
{
"channelId": 123,
"serverId": 123,
"name": "name",
"topic": "topic",
"custom": "custom",
"type": 0,
"owner": "zhangsan",
"viewMode": 0,
"validFlag": 1,
"createTime": 1234,
"updateTime": 1234
}
]
}
主要的返回码
200、403、414、416、431、500
具体请参考code状态表
分页查询频道成员列表
请求说明
httpPOST https://api.netease.im/nimserver/qchat/getChannelMemberListPage.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8
请求中Headers的设置请参考接口概述
接口描述
分页查询频道成员列表
分页时请根据分页参数确定是否翻页,返回结果可能不足limit,但是hasMore为true,此外对于首页可能返回limit+1条
参数说明
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
serverId | String | 是 | 服务器唯一标识 |
channelId | String | 是 | 频道唯一标识 |
timetag | String | 是 | 频道创建时间,单位毫秒,如果传0表示查询首页,分页查询按照创建时间逆序 |
limit | String | 是 | 本次查询的数量上限,最大数量200 |
accid | String | 否 | 用户帐号,如果传,则会校验该账号是否有权限,否则不校验 |
curl请求示例
curlcurl -X POST -H "AppKey: go9dnk49bkd9jd9vmel1kglw0803mgq3" -H "Nonce: 4tgggergigwow323t23t" -H "CurTime: 1443592222" -H "CheckSum: 9e9db3b6c9abb2e1962cf3e6f7316fcc55583f86" -H "Content-Type: application/x-www-form-urlencoded" -d 'serverId=1513535&serverId=1235&timetag=1558938768520&limit=10' 'https://api.netease.im/nimserver/qchat/getChannelMemberListPage.action'
返回说明
http 响应:json
json"Content-Type": "application/json; charset=utf-8"
{
"code": 200,
"pageInfo": {
"hasMore": true, //是否有下一页
"nextTimetag": 1234 //查询下一页时需要的timetag
},
"members": [] //是一个数组,每一项都是一个服务器成员信息
}
主要的返回码
200、403、414、416、431、500
具体请参考code状态表
修改频道黑白名单身份组
请求说明
httpPOST https://api.netease.im/nimserver/qchat/updateWhiteBlackIdentify.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8
请求中Headers的设置请参考接口概述
接口描述
修改频道黑白名单身份组
参数说明
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
serverId | String | 是 | 服务器唯一标识 |
channelId | String | 是 | 频道唯一标识 |
type | String | 是 | 1表示白名单,2表示黑名单 |
opeType | String | 是 | 1表示增加,2表示移除 |
accid | String | 是 | 操作者accid |
roleid | String | 是 | 被操作的服务器身份组id |
curl请求示例
curlcurl -X POST -H "AppKey: go9dnk49bkd9jd9vmel1kglw0803mgq3" -H "Nonce: 4tgggergigwow323t23t" -H "CurTime: 1443592222" -H "CheckSum: 9e9db3b6c9abb2e1962cf3e6f7316fcc55583f86" -H "Content-Type: application/x-www-form-urlencoded" -d 'serverId=1513535&channelId=12222&type=1&opeType=1&roleid=12&accid=acc' 'https://api.netease.im/nimserver/qchat/updateWhiteBlackIdentify.action'
返回说明
http 响应:json
json"Content-Type": "application/json; charset=utf-8"
{
"code": 200
}
主要的返回码
200、403、414、416、419、500
具体请参考code状态表
修改频道黑白名单成员
请求说明
httpPOST https://api.netease.im/nimserver/qchat/updateWhiteBlackIdentifyUser.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8
请求中Headers的设置请参考接口概述
接口描述
修改频道黑白名单成员
参数说明
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
serverId | String | 是 | 服务器唯一标识 |
channelId | String | 是 | 频道唯一标识 |
type | String | 是 | 1表示白名单,2表示黑名单 |
opeType | String | 是 | 1表示增加,2表示移除 |
accid | String | 是 | 操作者accid |
toAccids | String | 是 | 被操作的账号列表,JSONArray格式,最多100个账号 |
curl请求示例
curlcurl -X POST -H "AppKey: go9dnk49bkd9jd9vmel1kglw0803mgq3" -H "Nonce: 4tgggergigwow323t23t" -H "CurTime: 1443592222" -H "CheckSum: 9e9db3b6c9abb2e1962cf3e6f7316fcc55583f86" -H "Content-Type: application/x-www-form-urlencoded" -d 'serverId=1513535&channelId=12222&type=1&opeType=1&toAccids=["sasas"]&accid=acc' 'https://api.netease.im/nimserver/qchat/updateWhiteBlackIdentifyUser.action'
返回说明
http 响应:json
json"Content-Type": "application/json; charset=utf-8"
{
"code": 200
}
主要的返回码
200、403、414、416、419、500
具体请参考code状态表
分页查询频道黑白名单身份组
请求说明
httpPOST https://api.netease.im/nimserver/qchat/queryWhiteBlackIdentify.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8
请求中Headers的设置请参考接口概述
接口描述
分页查询频道黑白名单身份组
参数说明
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
serverId | String | 是 | 服务器唯一标识 |
channelId | String | 是 | 频道唯一标识 |
accid | String | 是 | 操作者accid |
type | String | 是 | 1表示白名单,2表示黑名单 |
timetag | String | 是 | 时间戳,毫秒对应的字符串,0则表示查询最近的一页 |
limit | String | 是 | 本次查询的条数上限 |
curl请求示例
curlcurl -X POST -H "AppKey: go9dnk49bkd9jd9vmel1kglw0803mgq3" -H "Nonce: 4tgggergigwow323t23t" -H "CurTime: 1443592222" -H "CheckSum: 9e9db3b6c9abb2e1962cf3e6f7316fcc55583f86" -H "Content-Type: application/x-www-form-urlencoded" -d 'serverId=1513535&channelId=12222&type=1&timetag=0&limit=10&accid=acc' 'https://api.netease.im/nimserver/qchat/queryWhiteBlackIdentify.action'
返回说明
http 响应:json
json"Content-Type": "application/json; charset=utf-8"
{
"code": 200,
"pageInfo": {
"hasMore": true, //是否有下一页
"nextTimetag": 1234 //查询下一页时需要的timetag
},
"identifies": [] //是一个数组,每一项都是一个服务器身份组信息
}
主要的返回码
200、403、414、416、419、500
具体请参考code状态表
分页查询频道黑白名单成员
请求说明
httpPOST https://api.netease.im/nimserver/qchat/queryWhiteBlackIdentifyUser.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8
请求中Headers的设置请参考接口概述
接口描述
分页查询频道黑白名单成员
参数说明
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
serverId | String | 是 | 服务器唯一标识 |
channelId | String | 是 | 频道唯一标识 |
accid | String | 是 | 操作者accid |
type | String | 是 | 1表示白名单,2表示黑名单 |
timetag | String | 是 | 时间戳,毫秒对应的字符串,0则表示查询最近的一页 |
limit | String | 是 | 本次查询的条数上限 |
curl请求示例
curlcurl -X POST -H "AppKey: go9dnk49bkd9jd9vmel1kglw0803mgq3" -H "Nonce: 4tgggergigwow323t23t" -H "CurTime: 1443592222" -H "CheckSum: 9e9db3b6c9abb2e1962cf3e6f7316fcc55583f86" -H "Content-Type: application/x-www-form-urlencoded" -d 'serverId=1513535&channelId=12222&type=1&timetag=0&limit=10&accid=acc' 'https://api.netease.im/nimserver/qchat/queryWhiteBlackIdentifyUser.action'
返回说明
http 响应:json
json"Content-Type": "application/json; charset=utf-8"
{
"code": 200,
"pageInfo": {
"hasMore": true, //是否有下一页
"nextTimetag": 1234 //查询下一页时需要的timetag
},
"members": [
{
"serverId": 123, //服务器唯一标识
"accid": "lisi", //成员的用户帐号
"nick": "nick", //昵称
"avatar": "avatar", //头像
"custom": "custom", //自定义扩展
"type": 0, //类型:0-普通成员,1-所有者
"joinTime": 1234, //加入时间
"inviter": "zhangsan", //邀请者的用户帐号
"validFlag": 1, //有效标志:0-无效,1-有效
"createTime": 1234, //创建时间
"updateTime": 1234 //更新时间
},
{
"serverId": 123,
"accid": "lisi",
"nick": "nick",
"avatar": "avatar",
"custom": "custom",
"type": 0,
"joinTime": 1234,
"inviter": "zhangsan",
"validFlag": 1,
"createTime": 1234,
"updateTime": 1234
}
] //是一个数组,每一项都是一个服务器成员信息
}
主要的返回码
200、403、414、416、419、500
具体请参考code状态表
批量查询频道黑白名单身份组
请求说明
httpPOST https://api.netease.im/nimserver/qchat/batchGetWhiteBlackIdentify.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8
请求中Headers的设置请参考接口概述
接口描述
批量查询频道黑白名单身份组
参数说明
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
serverId | String | 是 | 服务器唯一标识 |
channelId | String | 是 | 频道唯一标识 |
accid | String | 是 | 操作者accid |
type | String | 是 | 1表示白名单,2表示黑名单 |
roleids | String | 是 | 服务器身份组id列表,JSONArray格式,最多100个 |
curl请求示例
curlcurl -X POST -H "AppKey: go9dnk49bkd9jd9vmel1kglw0803mgq3" -H "Nonce: 4tgggergigwow323t23t" -H "CurTime: 1443592222" -H "CheckSum: 9e9db3b6c9abb2e1962cf3e6f7316fcc55583f86" -H "Content-Type: application/x-www-form-urlencoded" -d 'serverId=1513535&channelId=12222&type=1&timetag=0&roleids=["10"]' 'https://api.netease.im/nimserver/qchat/batchGetWhiteBlackIdentify.action'
返回说明
http 响应:json
json"Content-Type": "application/json; charset=utf-8"
{
"code": 200,
"identifies": [] //是一个数组,每一项都是一个服务器身份组信息
}
主要的返回码
200、403、414、416、419、500
具体请参考code状态表
批量查询频道黑白名单成员
请求说明
httpPOST https://api.netease.im/nimserver/qchat/batchGetWhiteBlackIdentifyUser.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8
请求中Headers的设置请参考接口概述
接口描述
批量查询频道黑白名单成员
参数说明
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
serverId | String | 是 | 服务器唯一标识 |
channelId | String | 是 | 频道唯一标识 |
accid | String | 是 | 操作者accid |
type | String | 是 | 1表示白名单,2表示黑名单 |
accids | String | 是 | 被查询的账号列表,JSONArray格式,最多100个 |
curl请求示例
curlcurl -X POST -H "AppKey: go9dnk49bkd9jd9vmel1kglw0803mgq3" -H "Nonce: 4tgggergigwow323t23t" -H "CurTime: 1443592222" -H "CheckSum: 9e9db3b6c9abb2e1962cf3e6f7316fcc55583f86" -H "Content-Type: application/x-www-form-urlencoded" -d 'serverId=1513535&channelId=12222&type=1&timetag=0&accids=["asas"]' 'https://api.netease.im/nimserver/qchat/batchGetWhiteBlackIdentifyUser.action'
返回说明
http 响应:json
json"Content-Type": "application/json; charset=utf-8"
{
"code": 200,
"members": [
{
"serverId": 123, //服务器唯一标识
"accid": "lisi", //成员的用户帐号
"nick": "nick", //昵称
"avatar": "avatar", //头像
"custom": "custom", //自定义扩展
"type": 0, //类型:0-普通成员,1-所有者
"joinTime": 1234, //加入时间
"inviter": "zhangsan", //邀请者的用户帐号
"validFlag": 1, //有效标志:0-无效,1-有效
"createTime": 1234, //创建时间
"updateTime": 1234 //更新时间
},
{
"serverId": 123,
"accid": "lisi",
"nick": "nick",
"avatar": "avatar",
"custom": "custom",
"type": 0,
"joinTime": 1234,
"inviter": "zhangsan",
"validFlag": 1,
"createTime": 1234,
"updateTime": 1234
}
] //是一个数组,每一项都是一个服务器成员信息
}
主要的返回码
200、403、414、416、419、500
具体请参考code状态表
请求客户端接入地址
请求说明
httpPOST https://api.netease.im/nimserver/qchat/requestAddr.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8
请求中Headers的设置请参考接口概述
接口描述
请求圈组服务器地址
参数说明
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
accid | String | 是 | 用户账号 |
type | String | 是 | 0表示非web端,1表示web端 |
clientIp | String | 是 | 客户端ip |
curl请求示例
curlcurl -X POST -H "AppKey: go9dnk49bkd9jd9vmel1kglw0803mgq3" -H "Nonce: 4tgggergigwow323t23t" -H "CurTime: 1443592222" -H "CheckSum: 9e9db3b6c9abb2e1962cf3e6f7316fcc55583f86" -H "Content-Type: application/x-www-form-urlencoded" -d 'accid=zhangsan&type=1&clientIp=59.111.1.1' 'https://api.netease.im/nimserver/qchat/requestAddr.action'
返回说明
http 响应:json
json"Content-Type": "application/json; charset=utf-8"
{
"code":200,
"data":["59.11.1.1:8080", "59.11.1.2:8080"]
}
主要的返回码
200、403、414、416、431、500
具体请参考code状态表
发送圈组消息
请求说明
httpPOST https://api.netease.im/nimserver/qchat/sendMsg.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8
请求中Headers的设置请参考接口概述
接口描述
发送圈组消息
参数说明
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
serverId | String | 是 | 服务器唯一标识 |
channelId | String | 是 | 频道唯一标识 |
from | String | 是 | 用户帐号,消息发送者 |
type | String | 是 | 0 表示文本消息, 1 表示图片, 2 表示语音, 3 表示视频, 4 表示地理位置信息, 6 表示文件, 10 表示提示消息, 100 自定义消息类型(特别注意,对于未对接易盾反垃圾功能的应用,该类型的消息不会提交反垃圾系统检测) |
body | String | 否 | 消息内容,最大5000字符 文本消息:请在body字段填写消息文案; 其它类型消息,请填写attach字段,格式参考 消息格式示例; |
attach | String | 否 | 消息附件,最大5000字符 |
ext | String | 否 | 扩展字段,最大1024字符 |
msgIdClient | String | 否 | 客户端消息id |
pushContent | String | 否 | 推送文案,最长500个字符。具体参见 推送配置参数详解。 |
pushPayload | String | 否 | 必须是JSON,不能超过2k字符。该参数与APNs推送的payload含义不同。具体参见 推送配置参数详解。 |
option | String | 否 | 消息时特殊指定的行为选项,JSON格式,可用于指定消息的存云端历史,推送等特殊行为;option中字段不填时表示默认值
,option示例: {"push":false,"history":false,"badge":false,"needPushNick":true} 字段说明: 1. history: 该消息是否存云端历史,默认true; 2. push: 该消息是否需要APNS推送或安卓系统通知栏推送,默认true; 3. badge:该消息是否需要计入到未读计数中,默认true; 4. needPushNick: 推送文案是否需要带上昵称,不设置该参数时默认true; |
mentionedAll | String | 否 | 是否艾特所有人,0或者1,默认0 |
mentionedAccidList | String | 否 | 艾特的accid列表,JSONArray格式,最大100个,如果mentionedAll=1,则本参数无效 |
curl请求示例
curlcurl -X POST -H "AppKey: go9dnk49bkd9jd9vmel1kglw0803mgq3" -H "Nonce: 4tgggergigwow323t23t" -H "CurTime: 1443592222" -H "CheckSum: 9e9db3b6c9abb2e1962cf3e6f7316fcc55583f86" -H "Content-Type: application/x-www-form-urlencoded" -d 'accid=zhangsan&type=0&serverId=1&channelId=1&body=abc' 'https://api.netease.im/nimserver/qchat/sendMsg.action'
返回说明
http 响应:json
json"Content-Type": "application/json; charset=utf-8"
{
"code":200,
"data": {
"time": 112121,
"msgIdClient": "sasas",
"msgIdServer": 123
}
}
主要的返回码
200、403、414、416、431、500
具体请参考code状态表
发送圈组自定义系统通知
请求说明
httpPOST https://api.netease.im/nimserver/qchat/sendAttachMsg.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8
请求中Headers的设置请参考接口概述
接口描述
发送圈组自定义系统通知
参数说明
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
toType | String | 是 | 1表示发给server 2表示发给channel 3表示发给server下的某些账号 4表示发给channel下的某些账号 |
serverId | String | 是 | 服务器唯一标识 |
channelId | String | 否 | 频道唯一标识 |
from | String | 是 | 用户帐号,通知发送者 |
toAccids | String | 否 | 通知接收者,JSONArray格式,最多100个账号 |
body | String | 否 | 通知内容,最大5000字符 |
attach | String | 否 | 消息附件,最大5000字符 |
ext | String | 否 | 扩展字段,最大1024字符 |
msgIdClient | String | 否 | 客户端消息id |
pushContent | String | 否 | 推送文案,最长500个字符。具体参见 推送配置参数详解。 |
pushPayload | String | 否 | 必须是JSON,不能超过2k字符。该参数与APNs推送的payload含义不同。具体参见 推送配置参数详解。 |
option | String | 否 | 消息时特殊指定的行为选项,JSON格式,可用于指定消息的存离线,推送等特殊行为;option中字段不填时表示默认值
,option示例: {"push":false,"persist":false,"badge":false,"needPushNick":true} 字段说明: 1. persist: 该消息是否存离线,只有是发给某些账号的通知支持存离线,默认false; 2. push: 该消息是否需要APNS推送或安卓系统通知栏推送,默认true; 3. badge:该消息是否需要计入到未读计数中,默认true; 4. needPushNick: 推送文案是否需要带上昵称,不设置该参数时默认true; |
curl请求示例
curlcurl -X POST -H "AppKey: go9dnk49bkd9jd9vmel1kglw0803mgq3" -H "Nonce: 4tgggergigwow323t23t" -H "CurTime: 1443592222" -H "CheckSum: 9e9db3b6c9abb2e1962cf3e6f7316fcc55583f86" -H "Content-Type: application/x-www-form-urlencoded" -d 'accid=zhangsan&toType=0&serverId=1&body=abc' 'https://api.netease.im/nimserver/qchat/sendAttachMsg.action'
返回说明
http 响应:json
json"Content-Type": "application/json; charset=utf-8"
{
"code":200,
"data": {
"type": 100,//自定义系统通知固定为100
"time": 112121,
"msgIdClient": "sasas",
"msgIdServer": 123
}
}
主要的返回码
200、403、414、416、431、500
具体请参考code状态表
更新消息
请求说明
httpPOST https://api.netease.im/nimserver/qchat/updateMsg.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8
请求中Headers的设置请参考接口概述
接口描述
更新消息
参数说明
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
operatorAccid | String | 是 | 操作者accid |
operatorMsg | String | 否 | 更新操作的附言,最大128字符 |
operatorExt | String | 否 | 更新操作的扩展字段,最大128字符 |
serverId | String | 是 | 服务器唯一标识 |
channelId | String | 是 | 频道唯一标识 |
msgIdServer | String | 是 | 服务器消息id |
time | String | 是 | 消息发送时间 |
body | String | 否 | 消息body内容,最大5000字符 |
ext | String | 否 | 消息扩展字段,最大1024字符 |
status | String | 否 | 消息状态 0是消息默认状态 1表示表示撤回 2表示删除 支持设置大于等于10000的数字作为自定义状态 |
curl请求示例
curlcurl -X POST -H "AppKey: go9dnk49bkd9jd9vmel1kglw0803mgq3" -H "Nonce: 4tgggergigwow323t23t" -H "CurTime: 1443592222" -H "CheckSum: 9e9db3b6c9abb2e1962cf3e6f7316fcc55583f86" -H "Content-Type: application/x-www-form-urlencoded" -d 'operatorAccid=zhangsan&msgIdServer=1&serverId=1&channelId=1&time=123&body=abc' 'https://api.netease.im/nimserver/qchat/updateMsg.action'
返回说明
http 响应:json
json"Content-Type": "application/json; charset=utf-8"
{
"code":200
}
主要的返回码
200、403、414、416、431、500
具体请参考code状态表
更新通知
请求说明
httpPOST https://api.netease.im/nimserver/qchat/updateAttachMsg.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8
请求中Headers的设置请参考接口概述
接口描述
更新通知,只有存离线的系统通知支持更新,并且只有通知接受者可以更新
参数说明
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
operatorAccid | String | 是 | 操作者accid |
operatorMsg | String | 否 | 更新操作的附言,最大128字符 |
operatorExt | String | 否 | 更新操作的扩展字段,最大128字符 |
serverId | String | 是 | 服务器唯一标识 |
channelId | String | 是 | 频道唯一标识 |
msgIdServer | String | 是 | 服务器消息id |
time | String | 是 | 通知发送时间 |
type | String | 是 | 通知类型 |
body | String | 否 | 通知body内容,最大5000字符 |
ext | String | 否 | 通知扩展字段,最大1024字符 |
status | String | 否 | 消息状态 0是消息默认状态 支持设置大于等于10000的数字作为自定义状态 |
curl请求示例
curlcurl -X POST -H "AppKey: go9dnk49bkd9jd9vmel1kglw0803mgq3" -H "Nonce: 4tgggergigwow323t23t" -H "CurTime: 1443592222" -H "CheckSum: 9e9db3b6c9abb2e1962cf3e6f7316fcc55583f86" -H "Content-Type: application/x-www-form-urlencoded" -d 'operatorAccid=zhangsan&msgIdServer=1&serverId=1&channelId=1&time=123&type=100&body=abc' 'https://api.netease.im/nimserver/qchat/updateAttachMsg.action'
返回说明
http 响应:json
json"Content-Type": "application/json; charset=utf-8"
{
"code":200
}
主要的返回码
200、403、414、416、431、500
具体请参考code状态表
查询云端历史消息
请求说明
httpPOST https://api.netease.im/nimserver/qchat/queryHistoryMsg.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8
请求中Headers的设置请参考接口概述
接口描述
查询云端历史消息
参数说明
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
accid | String | 是 | 操作者accid |
fromTime | String | 否 | 开始时间,默认0,单位毫秒 |
toTime | String | 否 | 结束时间,默认当前时间,单位毫秒 |
serverId | String | 是 | 服务器唯一标识 |
channelId | String | 是 | 频道唯一标识 |
excludeMsgId | String | 否 | 排除的消息id,分页时请填写上一页最后一条消息的消息id,用于定位锚点 主要是为了处理分页时,边界上多条消息的发送时间戳相同的情况 |
limit | String | 否 | 查询条数,默认100,最大100 |
reverse | String | 否 | 是否逆序,0或者1,默认0,表示从现在往过去查 |
curl请求示例
curlcurl -X POST -H "AppKey: go9dnk49bkd9jd9vmel1kglw0803mgq3" -H "Nonce: 4tgggergigwow323t23t" -H "CurTime: 1443592222" -H "CheckSum: 9e9db3b6c9abb2e1962cf3e6f7316fcc55583f86" -H "Content-Type: application/x-www-form-urlencoded" -d 'accid=zhangsan&serverId=1&channelId=1' 'https://api.netease.im/nimserver/qchat/queryHistoryMsg.action'
返回说明
http 响应:json
json"Content-Type": "application/json; charset=utf-8"
{
"code": 200,
"data":
[
{
"fromAccount": "zhangsan",
"fromNick": "张三",
"fromClientType": "IOS",
"time": 1234,
"updateTime": 1234,
"status": 1,
"body": "abc",
"attach": "sasa",
"ext": "sasa",
"msgIdServer": 123,
"msgIdClient": "assas"
},
{
"fromAccount": "zhangsan",
"fromNick": "张三",
"fromClientType": "IOS",
"time": 1234,
"updateTime": 1234,
"status": 1,
"body": "abc",
"attach": "sasa",
"ext": "sasa",
"msgIdServer": 123,
"msgIdClient": "assas"
}
]
}
主要的返回码
200、403、414、416、431、500
具体请参考code状态表
创建服务器身份组
请求说明
httpPOST https://api.netease.im/nimserver/qchat/createServerIdentify.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8
请求中Headers的设置请参考接口概述
接口描述
创建服务器身份组
参数说明
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
accid | String | 是 | 操作者accid |
serverId | String | 是 | 服务器唯一标识 |
type | int | 是 | 类型:2为自定义身份组,目前只能设置为2 |
name | String | 是 | 身份组名称 |
icon | String | 否 | 身份组图标url |
ext | String | 否 | 自定义扩展,最大长度1024 |
priority | String | 否 | 优先级数字,正数。数字越小,优先级越大,最小为1,everyone身份组为0,但不参与比较 |
curl请求示例
curlcurl -X POST -H "AppKey: go9dnk49bkd9jd9vmel1kglw0803mgq3" -H "Nonce: 4tgggergigwow323t23t" -H "CurTime: 1443592222" -H "CheckSum: 9e9db3b6c9abb2e1962cf3e6f7316fcc55583f86" -H "Content-Type: application/x-www-form-urlencoded" -d 'serverId=1513535&accid="accid"&type=2&name="新身份组1"&icon="iconurl"&ext="ext"&priority=12' 'http://imtest.netease.im/nimserver/qchat/createServerIdentify.action'
返回说明
http 响应:json
json"Content-Type": "application/json; charset=utf-8"
{
"code": 200,
"identify": {
"ext": "ext",//扩展字段
"membercount": 1,//身份组的成员数
"createtime": 1,//创建时间
"roleId": 1,//身份组的唯一标识
"auths": "{\"1\":-1, \"2\":1}",//身份组的权限,key为权限的枚举值,value为1允许,-1拒绝,服务器身份组只有允许和拒绝
"name": "name",//身份组名称
"icon": "icon",//身份组图标url
"priority": 1,//身份组的优先级,优先级数字越小优先级越高,1为最高,everyone为特殊身份组为0不参与其他身份组的比较
"type": 1,//身份组的类型1:everyone身份组,2:自定义身份组
"updatetime": 1//更新时间
}
}
主要的返回码
200、403、414、416、431、500
具体请参考code状态表
删除服务器身份组
请求说明
httpPOST https://api.netease.im/nimserver/qchat/removeServerIdentify.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8
请求中Headers的设置请参考接口概述
接口描述
删除服务器身份组
参数说明
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
accid | String | 是 | 操作者accid |
serverId | String | 是 | 服务器唯一标识 |
roleId | int | 是 | 身份组唯一标识 |
curl请求示例
curlcurl -X POST -H "AppKey: go9dnk49bkd9jd9vmel1kglw0803mgq3" -H "Nonce: 4tgggergigwow323t23t" -H "CurTime: 1443592222" -H "CheckSum: 9e9db3b6c9abb2e1962cf3e6f7316fcc55583f86" -H "Content-Type: application/x-www-form-urlencoded" -d 'serverId=1513535&accid="accid"&roleId=2' 'http://imtest.netease.im/nimserver/qchat/removeServerIdentify.action'
返回说明
http 响应:json
json"Content-Type": "application/json; charset=utf-8"
{
"code":200
}
主要的返回码
200、403、414、416、431、500
具体请参考code状态表
更新服务器身份组
请求说明
httpPOST https://api.netease.im/nimserver/qchat/updateServerIdentify.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8
请求中Headers的设置请参考接口概述
接口描述
更新服务器身份组
参数说明
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
accid | String | 是 | 操作者accid |
serverId | String | 是 | 服务器唯一标识 |
roleId | String | 是 | 服务器身份组唯一标识 |
name | String | 否 | 身份组名称 |
icon | String | 否 | 身份组图标url |
ext | String | 否 | 自定义扩展,最大长度1024 |
auths | String | 否 |
用于修改权限的 JSON 字段, 其格式为 {resource1:type1,resource2:type2,resource3:type3}。
注:单次最多可批量更新当前身份组的所有权限。 |
curl请求示例
curlcurl -X POST -H "AppKey: go9dnk49bkd9jd9vmel1kglw0803mgq3" -H "Nonce: 4tgggergigwow323t23t" -H "CurTime: 1443592222" -H "CheckSum: 9e9db3b6c9abb2e1962cf3e6f7316fcc55583f86" -H "Content-Type: application/x-www-form-urlencoded" -d 'serverId=1513535&accid="accid"&roleId=2&name="新身份组1"&icon="iconurl"&ext="ext"&auths="{\"1\":1}"' 'http://imtest.netease.im/nimserver/qchat/updateServerIdentify.action'
返回说明
http 响应:json
json"Content-Type": "application/json; charset=utf-8"
{
"code": 200,
"identify": {
"ext": "ext",//扩展字段
"membercount": 1,//身份组的成员数
"createtime": 1,//创建时间
"roleId": 1,//身份组的唯一标识
"auths": "{\"1\":-1, \"2\":1}",//身份组的权限,key为权限的枚举值,value为1允许,-1拒绝,服务器身份组只有允许和拒绝
"name": "name",//身份组名称
"icon": "icon",//身份组图标url
"priority": 1,//身份组的优先级,优先级数字越小优先级越高,1为最高,everyone为特殊身份组为0不参与其他身份组的比较
"type": 1,//身份组的类型1:everyone身份组,2:自定义身份组
"updatetime": 1//更新时间
}
}
主要的返回码
200、403、414、416、431、500
具体请参考code状态表
分页查询服务器身份组
请求说明
httpPOST https://api.netease.im/nimserver/qchat/getServerIdentifyPages.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8
请求中Headers的设置请参考接口概述
接口描述
分页查询服务器身份组
参数说明
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
accid | String | 是 | 操作者accid |
serverId | String | 是 | 服务器唯一标识 |
priority | String | 否 | 优先级从小到大(数值)排序,分页的锚点,每页的页尾数据的优先级,不传或者传0默认为首页,首页会返回everyone身份组放在返回结果集的首条 |
limit | String | 否 | 每页限制查询多少条,不传时默认为200,最大限制为200 |
curl请求示例
curlcurl -X POST -H "AppKey: go9dnk49bkd9jd9vmel1kglw0803mgq3" -H "Nonce: 4tgggergigwow323t23t" -H "CurTime: 1443592222" -H "CheckSum: 9e9db3b6c9abb2e1962cf3e6f7316fcc55583f86" -H "Content-Type: application/x-www-form-urlencoded" -d 'serverId=1513535&accid="accid"&priority=1&limit=10' 'http://imtest.netease.im/nimserver/qchat/getServerIdentifyPages.action'
返回说明
http 响应:json
json"Content-Type": "application/json; charset=utf-8"
{
"code":200,
"identify":[{
"ext": "ext",//扩展字段
"membercount": 1,//身份组的成员数
"createtime": 1,//创建时间
"roleId": 1,//身份组的唯一标识
"auths": "{\"1\":-1, \"2\":1}",//身份组的权限,key为权限的枚举值,value为1允许,-1拒绝,服务器身份组只有允许和拒绝
"name": "name",//身份组名称
"icon": "icon",//身份组图标url
"priority": 1,//身份组的优先级,优先级数字越小优先级越高,1为最高,everyone为特殊身份组为0不参与其他身份组的比较
"type": 1,//身份组的类型1:everyone身份组,2:自定义身份组
"updatetime": 1,//更新时间
"ismember": 0//操作者是否属于服务器成员,0不属于,1属于
}]
}
主要的返回码
200、403、414、416、431、500
具体请参考code状态表
创建频道身份组
请求说明
httpPOST https://api.netease.im/nimserver/qchat/createChannelIdentify.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8
请求中Headers的设置请参考接口概述
接口描述
创建频道身份组
参数说明
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
accid | String | 是 | 操作者accid |
serverId | String | 是 | 服务器唯一标识 |
serverRoleId | String | 是 | 继承自服务器哪个身份组的id |
channelId | String | 是 | 频道的唯一标识 |
curl请求示例
curlcurl -X POST -H "AppKey: go9dnk49bkd9jd9vmel1kglw0803mgq3" -H "Nonce: 4tgggergigwow323t23t" -H "CurTime: 1443592222" -H "CheckSum: 9e9db3b6c9abb2e1962cf3e6f7316fcc55583f86" -H "Content-Type: application/x-www-form-urlencoded" -d 'serverId=1513535&accid="accid"&serverRoleId=2&channelId=10001' 'http://imtest.netease.im/nimserver/qchat/createChannelIdentify.action'
返回说明
http 响应:json
json"Content-Type": "application/json; charset=utf-8"
{
"code": 200,
"identify": {
"serverId": 2,//服务器唯一标识
"channelId": 1,//频道唯一标识
"createtime": 1,//创建时间
"roleId": 1,//频道身份组唯一标识
"auths": "{\"1\":-1, \"2\":1}",//频道身份组的权限,key为权限的枚举值,value为1允许,-1拒接,0忽略(也叫继承服务器权限)
"serverRoleId": 1,//继承自服务器身份组的id
"name": "name",//继承自服务器身份组的名称
"icon": "icon",//继承自服务器身份组的头像
"ext": "ext",//继承自服务器身份组的扩展字段
"type": 1,//继承自服务器身份组的类型,1everyone身份组,2自定义身份组
"updatetime": 1
}
}
主要的返回码
200、403、414、416、431、500
具体请参考code状态表
删除频道身份组
请求说明
httpPOST https://api.netease.im/nimserver/qchat/deleteChannelIdentify.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8
请求中Headers的设置请参考接口概述
接口描述
删除频道身份组
参数说明
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
accid | String | 是 | 操作者accid |
serverId | String | 是 | 服务器唯一标识 |
roleId | String | 是 | 频道身份组的id,新建和查询频道身份组返回的roleid,非服务器身份组的roleid |
channelId | String | 是 | 频道的唯一标识 |
curl请求示例
curl
curl -X POST -H "AppKey: go9dnk49bkd9jd9vmel1kglw0803mgq3" -H "Nonce: 4tgggergigwow323t23t" -H "CurTime: 1443592222" -H "CheckSum: 9e9db3b6c9abb2e1962cf3e6f7316fcc55583f86" -H "Content-Type: application/x-www-form-urlencoded" -d 'serverId=1513535&accid="accid"&roleId=2&channelId=10001' 'http://imtest.netease.im/nimserver/qchat/deleteChannelIdentify.action'
返回说明
http 响应:json
json"Content-Type": "application/json; charset=utf-8"
"Content-Type": "application/json; charset=utf-8"
{
"code":200
}
主要的返回码
200、403、414、416、431、500
具体请参考code状态表
更新频道身份组
请求说明
httpPOST https://api.netease.im/nimserver/qchat/updateChannelIdentify.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8
请求中Headers的设置请参考接口概述
接口描述
更新频道身份组
参数说明
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
accid | String | 是 | 操作者accid |
serverId | String | 是 | 服务器唯一标识 |
roleId | String | 是 | 频道身份组的id,新建和查询频道身份组返回的roleid,非服务器身份组的roleid |
channelId | String | 是 | 频道的唯一标识 |
auths | String | 否 | 用于修改权限的 JSON 字段, 其格式为 {resource1:type1,resource2:type2,resource3:type3}。
|
curl请求示例
curlcurl -X POST -H "AppKey: go9dnk49bkd9jd9vmel1kglw0803mgq3" -H "Nonce: 4tgggergigwow323t23t" -H "CurTime: 1443592222" -H "CheckSum: 9e9db3b6c9abb2e1962cf3e6f7316fcc55583f86" -H "Content-Type: application/x-www-form-urlencoded" -d 'serverId=1513535&accid="accid"&roleId=2&channelId=10010&auths="{\"1\":1}"' 'http://imtest.netease.im/nimserver/qchat/updateChannelIdentify.action'
返回说明
http 响应:json
json"Content-Type": "application/json; charset=utf-8"
{
"code": 200,
"identify": {
"serverId": 2,//服务器唯一标识
"channelId": 1,//频道唯一标识
"createtime": 1,//创建时间
"roleId": 1,//频道身份组唯一标识
"auths": "{\"1\":-1, \"2\":1}",//频道身份组的权限,key为权限的枚举值,value为1允许,-1拒接,0忽略(也叫继承服务器权限)
"serverRoleId": 1,//继承自服务器身份组的id
"name": "name",//继承自服务器身份组的名称
"icon": "icon",//继承自服务器身份组的头像
"ext": "ext",//继承自服务器身份组的扩展字段
"type": 1,//继承自服务器身份组的类型,1everyone身份组,2自定义身份组
"updatetime": 1
}
}
主要的返回码
200、403、414、416、431、500
具体请参考code状态表
分页查询频道身份组
请求说明
httpPOST https://api.netease.im/nimserver/qchat/getChannelIdentifyPages.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8
请求中Headers的设置请参考接口概述
接口描述
分页查询频道身份组
参数说明
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
accid | String | 是 | 操作者accid |
serverId | String | 是 | 服务器唯一标识 |
channelId | String | 是 | 频道的唯一标识 |
timetag | String | 否 | 频道身份组按照创建时间由大到小排序,分页的锚点,每页页尾数据的创建时间,不传或者传0默认为首页,首页会将everyone身份组放在返回结果第一条返回,比其他页多一条数据 |
limit | String | 否 | 每页限制查询的数量,不穿时默认为200条,最大为200 |
curl请求示例
curlcurl -X POST -H "AppKey: go9dnk49bkd9jd9vmel1kglw0803mgq3" -H "Nonce: 4tgggergigwow323t23t" -H "CurTime: 1443592222" -H "CheckSum: 9e9db3b6c9abb2e1962cf3e6f7316fcc55583f86" -H "Content-Type: application/x-www-form-urlencoded" -d 'serverId=1513535&accid="accid"&channelId=10010&timetag=1111111111111&limit=10' 'http://imtest.netease.im/nimserver/qchat/getChannelIdentifyPages.action'
返回说明
http 响应:json
json"Content-Type": "application/json; charset=utf-8"
{
"code":200,
"identifies":[{
"serverId": 2,//服务器唯一标识
"channelId": 1,//频道唯一标识
"createtime": 1,//创建时间
"roleId": 1,//频道身份组唯一标识
"auths": "{\"1\":-1, \"2\":1}",//频道身份组的权限,key为权限的枚举值,value为1允许,-1拒接,0忽略(也叫继承服务器权限)
"serverRoleId": 1,//继承自服务器身份组的id
"name": "name",//继承自服务器身份组的名称
"icon": "icon",//继承自服务器身份组的头像
"ext": "ext",//继承自服务器身份组的扩展字段
"type": 1,//继承自服务器身份组的类型,1everyone身份组,2自定义身份组
"updatetime": 1
}]
}
主要的返回码
200、403、414、416、431、500
具体请参考code状态表
在频道下为某个人定制权限
请求说明
httpPOST https://api.netease.im/nimserver/qchat/createUserIdentify.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8
请求中Headers的设置请参考接口概述
接口描述
在频道下为某个人定制权限
参数说明
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
accid | String | 是 | 操作者accid |
serverId | String | 是 | 服务器唯一标识 |
channelId | String | 是 | 频道的唯一标识 |
faccid | String | 是 | 被操作的用户的accid |
curl请求示例
curlcurl -X POST -H "AppKey: go9dnk49bkd9jd9vmel1kglw0803mgq3" -H "Nonce: 4tgggergigwow323t23t" -H "CurTime: 1443592222" -H "CheckSum: 9e9db3b6c9abb2e1962cf3e6f7316fcc55583f86" -H "Content-Type: application/x-www-form-urlencoded" -d 'serverId=1513535&accid="accid"&channelId=10010&faccid="faccid"' 'http://imtest.netease.im/nimserver/qchat/createUserIdentify.action'
返回说明
http 响应:json
json"Content-Type": "application/json; charset=utf-8"
{
"code": 200,
"identify": {
"serverId": 2,//服务器唯一标识
"channelId": 1,//频道唯一标识
"createtime": 1,//创建时间
"accid": "accid",//用户的accid
"auths": "{\"1\":-1, \"2\":1}",//个人定制权限,key为权限的枚举值,value为1允许,-1拒绝,0忽略
"avatar": "name",//用户在服务器下的头像
"inviter": "icon",//邀请者的用户账号
"joinTime": 1,//用户加入服务器的时间
"nick": "icon",//昵称
"memberType": 1,//类型:0-普通成员,1-所有者
"custom": "icon",//用户的自定义扩展字段
"updatetime": 1//更新时间
}
}
主要的返回码
200、403、414、416、431、500
具体请参考code状态表
删除频道下某人的定制权限
请求说明
httpPOST https://api.netease.im/nimserver/qchat/deleteUserIdentify.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8
请求中Headers的设置请参考接口概述
接口描述
删除频道下某人的定制权限
参数说明
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
accid | String | 是 | 操作者accid |
serverId | String | 是 | 服务器唯一标识 |
channelId | String | 是 | 频道的唯一标识 |
faccid | String | 是 | 被操作的用户的accid |
curl请求示例
curlcurl -X POST -H "AppKey: go9dnk49bkd9jd9vmel1kglw0803mgq3" -H "Nonce: 4tgggergigwow323t23t" -H "CurTime: 1443592222" -H "CheckSum: 9e9db3b6c9abb2e1962cf3e6f7316fcc55583f86" -H "Content-Type: application/x-www-form-urlencoded" -d 'serverId=1513535&accid="accid"&channelId=10010&faccid="faccid"' 'http://imtest.netease.im/nimserver/qchat/deleteUserIdentify.action'
返回说明
http 响应:json
json"Content-Type": "application/json; charset=utf-8"
{
"code":200
}
主要的返回码
200、403、414、416、431、500
具体请参考code状态表
更新频道下用户定制权限
请求说明
httpPOST https://api.netease.im/nimserver/qchat/updateUserIdentify.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8
请求中Headers的设置请参考接口概述
接口描述
更新频道下用户定制权限
参数说明
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
accid | String | 是 | 操作者accid |
serverId | String | 是 | 服务器唯一标识 |
channelId | String | 是 | 频道的唯一标识 |
faccid | String | 是 | 被操作的用户的accid |
auths | String | 否 |
用于修改权限的 JSON 字段, 其格式为 {resource1:type1,resource2:type2,resource3:type3}。
|
curl请求示例
curlcurl -X POST -H "AppKey: go9dnk49bkd9jd9vmel1kglw0803mgq3" -H "Nonce: 4tgggergigwow323t23t" -H "CurTime: 1443592222" -H "CheckSum: 9e9db3b6c9abb2e1962cf3e6f7316fcc55583f86" -H "Content-Type: application/x-www-form-urlencoded" -d 'serverId=1513535&accid="accid"&channelId=10010&faccid="faccid"&auths="{\"1\":1}"' 'http://imtest.netease.im/nimserver/qchat/updateUserIdentify.action'
返回说明
http 响应:json
json"Content-Type": "application/json; charset=utf-8"
{
"code": 200,
"identify": {
"serverId": 2,//服务器唯一标识
"channelId": 1,//频道唯一标识
"createtime": 1,//创建时间
"accid": "accid",//用户的accid
"auths": "{\"1\":-1, \"2\":1}",//个人定制权限,key为权限的枚举值,value为1允许,-1拒绝,0忽略
"avatar": "name",//用户在服务器下的头像
"inviter": "icon",//邀请者的用户账号
"joinTime": 1,//用户加入服务器的时间
"nick": "icon",//昵称
"memberType": 1,//类型:0-普通成员,1-所有者
"custom": "icon",//用户的自定义扩展字段
"updatetime": 1//更新时间
}
}
主要的返回码
200、403、414、416、431、500
具体请参考code状态表
分页查询频道下用户的定制权限
请求说明
httpPOST https://api.netease.im/nimserver/qchat/getUserIdentifyPages.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8
请求中Headers的设置请参考接口概述
接口描述
分页查询频道下用户们的定制权限
参数说明
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
accid | String | 是 | 操作者accid |
serverId | String | 是 | 服务器唯一标识 |
channelId | String | 是 | 频道的唯一标识 |
timetag | String | 否 | 个人定制权限按照创建时间由大到小排序,分页的锚点,每页页尾数据的创建时间,不传或者传0默认为查询服务器当前时间之前的limit条数据 |
limit | String | 否 | 每页查询的数量 |
curl请求示例
curlcurl -X POST -H "AppKey: go9dnk49bkd9jd9vmel1kglw0803mgq3" -H "Nonce: 4tgggergigwow323t23t" -H "CurTime: 1443592222" -H "CheckSum: 9e9db3b6c9abb2e1962cf3e6f7316fcc55583f86" -H "Content-Type: application/x-www-form-urlencoded" -d 'serverId=1513535&accid="accid"&channelId=10010&timetag=11111111111&limit=20' 'http://imtest.netease.im/nimserver/qchat/getUserIdentifyPages.action'
返回说明
http 响应:json
json"Content-Type": "application/json; charset=utf-8"
{
"code":200,
"identifies":[{
"serverId": 2,//服务器唯一标识
"channelId": 1,//频道唯一标识
"createtime": 1,//创建时间
"accid": "accid",//用户的accid
"auths": "{\"1\":-1, \"2\":1}",//个人定制权限,key为权限的枚举值,value为1允许,-1拒绝,0忽略
"avatar": "name",//用户在服务器下的头像
"inviter": "icon",//邀请者的用户账号
"joinTime": 1,//用户加入服务器的时间
"nick": "icon",//昵称
"memberType": 1,//类型:0-普通成员,1-所有者
"custom": "icon",//用户的自定义扩展字段
"updatetime": 1//更新时间
}]
}
主要的返回码
200、403、414、416、431、500
具体请参考code状态表
把某些人拉进某服务器身份组
请求说明
httpPOST https://api.netease.im/nimserver/qchat/createServerIdentifyMember.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8
请求中Headers的设置请参考接口概述
接口描述
把某些人拉进某服务器身份组
参数说明
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
accid | String | 是 | 操作者accid |
serverId | String | 是 | 服务器唯一标识 |
roleId | String | 是 | 服务器身份组唯一标识 |
faccids | String | 是 | 被操作的用户的accid集合,jsonarray格式 ["accid1","accid2"] |
curl请求示例
curlcurl -X POST -H "AppKey: go9dnk49bkd9jd9vmel1kglw0803mgq3" -H "Nonce: 4tgggergigwow323t23t" -H "CurTime: 1443592222" -H "CheckSum: 9e9db3b6c9abb2e1962cf3e6f7316fcc55583f86" -H "Content-Type: application/x-www-form-urlencoded" -d 'serverId=1513535&accid="accid"&roleId=1&faccids="[\"accid1\",\"accid2\"]"' 'http://imtest.netease.im/nimserver/qchat/createServerIdentifyMember.action'
返回说明
http 响应:json
json"Content-Type": "application/json; charset=utf-8"
{
"code":200,
"successAccids":["accid1"],//添加成功的accid集合
"failAccids":["accid2"]//添加失败的acci集合
}
主要的返回码
200、403、414、416、431、500
具体请参考code状态表
将某些人移除某个服务器身份组
请求说明
httpPOST https://api.netease.im/nimserver/qchat/deleteServerIdentifyMember.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8
请求中Headers的设置请参考接口概述
接口描述
将某些人移除某个服务器身份组
参数说明
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
accid | String | 是 | 操作者accid |
serverId | String | 是 | 服务器唯一标识 |
roleId | String | 是 | 服务器身份组唯一标识 |
faccids | String | 是 | 被操作的用户的accid集合,jsonarray格式 ["accid1","accid2"] |
curl请求示例
curlcurl -X POST -H "AppKey: go9dnk49bkd9jd9vmel1kglw0803mgq3" -H "Nonce: 4tgggergigwow323t23t" -H "CurTime: 1443592222" -H "CheckSum: 9e9db3b6c9abb2e1962cf3e6f7316fcc55583f86" -H "Content-Type: application/x-www-form-urlencoded" -d 'serverId=1513535&accid="accid"&roleId=1&faccids="[\"accid1\",\"accid2\"]"' 'http://imtest.netease.im/nimserver/qchat/deleteServerIdentifyMember.action'
返回说明
http 响应:json
json"Content-Type": "application/json; charset=utf-8"
{
"code":200,
"successAccids":["accid1"],//移除成功的accid集合
"failAccids":["accid2"]//移除失败的accid集合
}
主要的返回码
200、403、414、416、431、500
具体请参考code状态表
分页查询某个服务器身份组中有哪些人
请求说明
httpPOST https://api.netease.im/nimserver/qchat/getServerIdentifyMemberPages.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8
请求中Headers的设置请参考接口概述
接口描述
分页查询某个服务器身份组中有哪些人
参数说明
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
accid | String | 是 | 操作者accid |
serverId | String | 是 | 服务器唯一标识 |
roleId | String | 是 | 服务器身份组唯一标识 |
timetag | String | 否 | 根据用户进入身份组的时间从大到小排序,分页的锚点,每页页尾数据的创建时间,不传或者传0默认查当前时间往前limit条数据 |
faccid | String | 否 | 当一页数据页尾多条数据的创建时间相同时,根据用户的accid作为锚点来拉取下一页数据 |
limit | String | 否 | 每页查询的条数,不填时为200,最大200 |
curl请求示例
curlcurl -X POST -H "AppKey: go9dnk49bkd9jd9vmel1kglw0803mgq3" -H "Nonce: 4tgggergigwow323t23t" -H "CurTime: 1443592222" -H "CheckSum: 9e9db3b6c9abb2e1962cf3e6f7316fcc55583f86" -H "Content-Type: application/x-www-form-urlencoded" -d 'serverId=1513535&accid="accid"&roleId=1&timetag=1111111111111&faccid="accid1"&limit=20' 'http://imtest.netease.im/nimserver/qchat/getServerIdentifyMemberPages.action'
返回说明
http 响应:json
json"Content-Type": "application/json; charset=utf-8"
"Content-Type": "application/json; charset=utf-8"
{
"code":200,
"serverMembers":[{
"serverId": 123, //服务器唯一标识
"accid": "lisi", //成员的用户帐号
"nick": "nick", //昵称
"avatar": "avatar", //头像
"custom": "custom", //自定义扩展
"type": 0, //类型:0-普通成员,1-所有者
"joinTime": 1234, //加入时间
"inviter": "zhangsan", //邀请者的用户帐号
"validFlag": 1, //有效标志:0-无效,1-有效
"createTime": 1234, //创建时间
"updateTime": 1234 //更新时间
}]
}
主要的返回码
200、403、414、416、431、500
具体请参考code状态表
分页查询某个用户在哪些身份组
请求说明
httpPOST https://api.netease.im/nimserver/qchat/getUserServerIdentify.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8
请求中Headers的设置请参考接口概述
接口描述
分页查询某个用户在哪些身份组
参数说明
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
accid | String | 是 | 操作者accid |
serverId | String | 是 | 服务器唯一标识 |
faccid | String | 是 | 要查询那个用户的accid |
timetag | String | 是 | 根据用户加入不同身份组的时间从大到小排序,分页的锚点,每页页尾数据的创建时间,不传或者传0默认查当前时间往前limit条数据 |
limit | String | 是 | 每页查询的条数,不填时为200,最大200 |
curl请求示例
curlcurl -X POST -H "AppKey: go9dnk49bkd9jd9vmel1kglw0803mgq3" -H "Nonce: 4tgggergigwow323t23t" -H "CurTime: 1443592222" -H "CheckSum: 9e9db3b6c9abb2e1962cf3e6f7316fcc55583f86" -H "Content-Type: application/x-www-form-urlencoded" -d 'serverId=1513535&accid="accid"&timetag=1111111111111&faccid="accid1"&limit=20' 'http://imtest.netease.im/nimserver/qchat/getUserServerIdentify.action'
返回说明
http 响应:json
json"Content-Type": "application/json; charset=utf-8"
{
"code":200,
"serverIdentifies":[{
"ext": "ext",//服务器身份组扩展字段
"membercount": 1,//服务器身份组成员数
"createtime": 1,//创建时间
"roleId": 1,//服务器身份组唯一标识
"auths": "{\"1\":-1, \"2\":1}",//服务器身份组的权限,key为权限的枚举值,value为1允许,-1不允许
"name": "name",//服务器身份组的名称
"icon": "icon",//服务器身份组的图标url
"priority": 1,//优先级
"type": 2,//类型,1是everyone身份组,2是自定义身份组
"updatetime": 1,//更新时间
"ismember": 0//操作者是否在这个身份组中
}]
}
主要的返回码
200、403、414、416、431、500
具体请参考code状态表