加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 资源网站 > 资源 > 正文

开发集成云信IM小程序聊天室流程

发布时间:2020-12-14 20:27:45 所属栏目:资源 来源:网络整理
导读:? h2 id="src-cnt-6"请求白名单的设置 相关配置列表如下: request 合法域名: socket 合法域名: wss://wlnimsc0.netease.im wss://wlnimsc1.netease.im uploadFile 合法域名: downloadFile 合法域名 地址: h2 id="src-cnt-0"调用聊天室API h3 id="src-cnt-
<tr>

curl请求示例

<pre class="has">
curl -X POST -H "CheckSum: fc040248923c881f2fe7cc39602b79565230155c" -H "AppKey: f1234540c12345673123456847aaaaaa" -H "Nonce: 1" -H "CurTime: 1451217360" -H "Content-Type: application/x-www-form-urlencoded" -d 'name=mychatroom&announcement=&broadcasturl=xxxxxx&creator=zhangsan' 'https://api.netease.im/nimserver/chatroom/create.action'

返回说明

http 响应:json

<pre class="has">

"Content-Type": "application/json; charset=utf-8"
{
"chatroom": {
"roomid": 66,"valid": true,"announcement": null,"name": "mychatroom","broadcasturl": "xxxxxx","ext": "","creator": "zhangsan"
},"code": 200
}

主要的返回码

200、403、414、416、419、431、500

具体请参考


请求说明

<pre class="has">
POST https://api.netease.im/nimserver/chatroom/get.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8

请求中Headers的设置请参考

接口描述

查询聊天室信息

参数说明

<table border="1">

<tr>

curl请求示例

<pre class="has">
curl -X POST -H "CheckSum: fc040248923c881f2fe7cc39602b79565230155c" -H "AppKey: f1234540c12345673123456847aaaaaa" -H "Nonce: 1" -H "CurTime: 1451217360" -H "Content-Type: application/x-www-form-urlencoded" -d 'roomid=66&needOnlineUserCount=true' 'https://api.netease.im/nimserver/chatroom/get.action'

返回说明

http 响应:json

<pre class="has">
"Content-Type": "application/json; charset=utf-8"
{
"chatroom": {
"roomid": 66,"muted":false,//聊天室是否处于全体禁言状态,全体禁言时仅管理员和创建者可以发言
"announcement": null,"onlineusercount": 1,"creator": "zhangsan","queuelevel": 0
},"code": 200
}

主要的返回码

200、403、404、414、416、431、500

具体请参考


请求说明

<pre class="has">
POST https://api.netease.im/nimserver/chatroom/getBatch.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8

请求中Headers的设置请参考

接口描述

查询聊天室信息

参数说明

<table border="1">

<tr>

curl请求示例

<pre class="has">
curl -X POST -H "CheckSum: fc040248923c881f2fe7cc39602b79565230155c" -H "AppKey: f1234540c12345673123456847aaaaaa" -H "Nonce: 1" -H "CurTime: 1451217360" -H "Content-Type: application/x-www-form-urlencoded" -d 'roomids=["6001","6003"]&needOnlineUserCount=true' 'https://api.netease.im/nimserver/chatroom/getBatch.action'

返回说明

http 响应:json

<pre class="has">
"Content-Type": "application/json; charset=utf-8"
{
"noExistRooms": [ //不存在的聊天室id列表
6001
],"succRooms": [
{
"roomid": 6002,"announcement": "hi,this is announcement","muted": false,"name": "6002 chatroom","broadcasturl": "","onlineusercount": 0,"ext": "6002 ext","queuelevel": 0
}
],"failRooms": [ //失败的聊天室id,有可能是查的时候有500错误
6003
],"code": 200
}

主要的返回码

200、403、404、414、416、431、500

具体请参考


请求说明

<pre class="has">
POST https://api.netease.im/nimserver/chatroom/update.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8

请求中Headers的设置请参考

接口描述

更新聊天室信息

参数说明

<table border="1">

<tr>

curl请求示例

<pre class="has">
curl -X POST -H "CheckSum: 95a26060d002a473057a71cb7d949d6e91d6d167" -H "AppKey: f1234540c12345673123456847aaaaaa" -H "Nonce: 1" -H "CurTime: 1451214690" -H "Content-Type: application/x-www-form-urlencoded" -d 'roomid=66&name=mynewchatroom&announcement=mynewchatroom' 'https://api.netease.im/nimserver/chatroom/update.action'

返回说明

http 响应:json

<pre class="has">
"Content-Type": "application/json; charset=utf-8"
{
"chatroom": {
"roomid": 66,"announcement": "这是聊天室","code": 200
}

主要的返回码

200、403、404、414、416、431、500、13002

具体请参考


请求说明

<pre class="has">
POST https://api.netease.im/nimserver/chatroom/toggleCloseStat.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8

请求中Headers的设置请参考

接口描述

修改聊天室开/关闭状态

参数说明

<table border="1">

<tr>

curl请求示例

<pre class="has">
curl -X POST -H "CheckSum: 95a26060d002a473057a71cb7d949d6e91d6d167" -H "AppKey: f1234540c12345673123456847aaaaaa" -H "Nonce: 1" -H "CurTime: 1451214690" -H "Content-Type: application/x-www-form-urlencoded" -d 'roomid=66&operator=zhangsan&valid=true' 'https://api.netease.im/nimserver/chatroom/toggleCloseStat.action'

返回说明

http 响应:json

<pre class="has">
"Content-Type": "application/json; charset=utf-8"
{
"desc": {
"roomid": 13,"name": "myChatroom","broadcasturl": "http://www.xxxx.com/xxxxxx","code": 200
}

主要的返回码

200、403、404、414、416、417、419、431、500

具体请参考


请求说明

<pre class="has">
POST https://api.netease.im/nimserver/chatroom/setMemberRole.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8

请求中Headers的设置请参考

接口描述

设置聊天室内用户角色

参数说明

<table border="1">

<tr>

curl请求示例

<pre class="has">
curl -X POST -H "CheckSum: 51eb13ea5ee3a2c00e8388e48e61c65c7866c366" -H "AppKey: fe416640c8e8a72734219e1847ad2547" -H "Nonce: 1" -H "CurTime: 1451207708" -H "Content-Type: application/x-www-form-urlencoded" -d 'roomid=66&operator=zhangsan&target=lisi&opt=2&optvalue=true' 'https://api.netease.im/nimserver/chatroom/setMemberRole.action'

返回说明

http 响应:json

<pre class="has">
"Content-Type": "application/json; charset=utf-8"
{
"desc": {
"roomid": 16,"level": 10,"accid": "zhangsan","type": "COMMON"
},"code": 200
}

备注:
返回的type字段可能为:
LIMITED,//受限用户,黑名单+禁言
COMMON,//普通固定成员
CREATOR,//创建者
MANAGER,//管理员
TEMPORARY,//临时用户,非固定成员

主要的返回码

200、403、404、414、416、417、419、431、500、13002

具体请参考


请求说明

<pre class="has">
POST https://api.netease.im/nimserver/chatroom/requestAddr.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8

请求中Headers的设置请参考

接口描述

请求聊天室地址与令牌

参数说明

<table border="1">

<tr>

curl请求示例

<pre class="has">
curl -X POST -H "CheckSum: 51eb13ea5ee3a2c00e8388e48e61c65c7866c366" -H "AppKey: f1234540c12345673123456847aaaaaa" -H "Nonce: 1" -H "CurTime: 1451217708" -H "Content-Type: application/x-www-form-urlencoded" -d 'roomid=66&accidzhangsan&clienttype=1' 'https://api.netease.im/nimserver/chatroom/requestAddr.action'

返回说明

http 响应:json

<pre class="has">
"Content-Type": "application/json; charset=utf-8"
{
"addr": [
"testchat.netease.im:6666","testchat.netease.im:8888"
],"code": 200
}

主要的返回码

200、403、414、416、431、500、514、13002

具体请参考


请求说明

<pre class="has">
POST https://api.netease.im/nimserver/chatroom/sendMsg.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8

请求中Headers的设置请参考

接口描述

往聊天室内发消息

参数说明

<table border="1">

<tr>

消息格式示例中的body字段,长度限制4096字符curl请求示例

<pre class="has">
curl -X POST -H "CheckSum: 51eb13ea5ee3a2c00e8388e48e61c65c7866c366" -H "AppKey: f541664055e557244421661866ad7799" -H "Nonce: 1" -H "CurTime: 1451207708" -H "Content-Type: application/x-www-form-urlencoded" -d 'roomid=36&fromAccid=zhangsan&msgType=0&attach=This+is+test+msg&msgId=c9e6c306-804f-4ec3-b8f0-573778829419' 'https://api.netease.im/nimserver/chatroom/sendMsg.action'

返回说明

http 响应:json

<pre class="has">

"Content-Type": "application/json; charset=utf-8"
{
"code":200,"desc":{
"time": "1456396333115","fromAvator":"http://b12026.nos.netease.com/MTAxMTAxMA==/bmltYV84NDU4OF8xNDU1ODczMjA2NzUwX2QzNjkxMjI2LWY2NmQtNDQ3Ni0E2LTg4NGE4MDNmOGIwMQ==","msgid_client": "c9e6c306-804f-4ec3-b8f0-573778829419","fromClientType": "REST","attach": "This+is+test+msg","roomId": "36","fromAccount": "zhangsan","fromNick": "张三","type": "0","highPriorityFlag":1,//高优先级消息标记,不带此标记表示非高优先级
}
}

主要的返回码

200、403、414、416、431、500

具体请参考


请求说明

<pre class="has">
POST https://api.netease.im/nimserver/chatroom/addRobot.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8

请求中Headers的设置请参考

接口描述

往聊天室内添加机器人,机器人过期时间为24小时。

参数说明

<table border="1">

<tr>

curl请求示例

<pre class="has">
curl -X POST -H "CheckSum: 51eb13ea5ee3a2c00e8388e48e61c65c7866c366" -H "AppKey: f541664055e557244421661866ad7799" -H "Nonce: 1" -H "CurTime: 1451207708" -H "Content-Type: application/x-www-form-urlencoded" -d 'roomid=70&accids=["zhangsan","lisi"]' 'https://api.netease.im/nimserver/chatroom/addRobot.action'

返回说明

http 响应:json

<pre class="has">

"Content-Type": "application/json; charset=utf-8"
{
"desc": {
"failAccids": "["hzzhangsan"]","successAccids": "["hzlisi"]","oldAccids": "["hzwangwu"]"
},"code": 200
}

主要的返回码

200、403、414、416、417、419、431、500、13003

具体请参考


请求说明

<pre class="has">
POST https://api.netease.im/nimserver/chatroom/removeRobot.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8

请求中Headers的设置请参考

接口描述

从聊天室内删除机器人

参数说明

<table border="1">

<tr>

curl请求示例

<pre class="has">
curl -X POST -H "CheckSum: 51eb13ea5ee3a2c00e8388e48e61c65c7866c366" -H "AppKey: f541664055e557244421661866ad7799" -H "Nonce: 1" -H "CurTime: 1451207708" -H "Content-Type: application/x-www-form-urlencoded" -d 'roomid=70&accids=["zhangsan","lisi"]' 'https://api.netease.im/nimserver/chatroom/removeRobot.action'

返回说明

http 响应:json

<pre class="has">

"Content-Type": "application/json; charset=utf-8"
{
"desc": {
"failAccids": "["hzzhangsan"]","successAccids": "["hzlisi"]"
},"code": 200
}

主要的返回码

200、403、404、414、416、419、431、500

具体请参考


请求说明

<pre class="has">
POST https://api.netease.im/nimserver/chatroom/temporaryMute.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8

请求中Headers的设置请参考

接口描述

将聊天室内成员设置为临时禁言

参数说明

<table border="1">

<tr>

0设置禁言的秒数,不能超过2592000秒(30天)curl请求示例

<pre class="has">
curl -X POST -H "CheckSum: 66dc1ad0166a37037abcdfeb749bhh049c937777" -H "AppKey: acd7y640c85j8kf734219e1847aggggg" -H "Nonce: 1" -H "CurTime: 1451200147" -H "Content-Type: application/x-www-form-urlencoded" -d 'roomid=123&operator=zhangsan&target=lisi&muteDuration=300&notifyExt=这是扩展字段' "https://api.netease.im/nimserver/chatroom/temporaryMute.action"

返回说明

http 响应:json

<pre class="has">

"Content-Type": "application/json; charset=utf-8"
{
"desc": {
"muteDuration": 300
},"code": 200
}

主要的返回码

200、403、404、414、416、417、419、431、500、13002

具体请参考


请求说明

<pre class="has">
POST https://api.netease.im/nimserver/chatroom/queueOffer.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8

请求中Headers的设置请参考

接口描述

往聊天室有序队列中新加或更新元素

参数说明

<table border="1">

<tr>

curl请求示例

<pre class="has">
curl -X POST -H "CheckSum: 35dc67d0890f67007abc9feb749bbf049c9367e7" -H "AppKey: fe416640c8e8a72734219e1847ad2547" -H "Nonce: 1" -H "CurTime: 1451200147" -H "Content-Type: application/x-www-form-urlencoded" -d 'roomid=36&key=1111&value=66666' "https://api.netease.im/nimserver/chatroom/queueOffer.action"

返回说明

http 响应:json

<pre class="has">

"Content-Type": "application/json; charset=utf-8"
{
"desc": {
},"code": 200
}

主要的返回码

200、403、414、416、431、500

具体请参考


请求说明

<pre class="has">
POST https://api.netease.im/nimserver/chatroom/queuePoll.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8

请求中Headers的设置请参考

接口描述

从队列中取出元素

参数说明

<table border="1">

<tr>

curl请求示例

<pre class="has">
curl -X POST -H "CheckSum: 37dc19d0190007037abc9feb749bbf049c9367e7" -H "AppKey: fe416640c8e8a72734219e1847ad2547" -H "Nonce: 1" -H "CurTime: 1451200147" -H "Content-Type: application/x-www-form-urlencoded" -d 'roomid=36&key=333334444' "https://api.netease.im/nimserver/chatroom/queuePoll.action"

返回说明

http 响应:json

<pre class="has">

"Content-Type": "application/json; charset=utf-8"
{
"desc": {
"value": "66666","key": "1111"
},"code": 200
}

主要的返回码

200、403、404、414、416、431、500

具体请参考


请求说明

<pre class="has">
POST https://api.netease.im/nimserver/chatroom/queueList.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8

请求中Headers的设置请参考

接口描述

排序列出队列中所有元素

参数说明

<table border="1">

<tr>

curl请求示例

<pre class="has">
curl -X POST -H "CheckSum: 37dc87di0190037037900999b74kkbf049c9367e7" -H "AppKey: fe416640c8e8a72734219e1847ad2547" -H "Nonce: 1" -H "CurTime: 1451200147" -H "Content-Type: application/x-www-form-urlencoded" -d 'roomid=36&key=1111' "https://api.netease.im/nimserver/chatroom/queueList.action"

返回说明

http 响应:json

<pre class="has">

"Content-Type": "application/json; charset=utf-8"
{
"desc": {
"list": [
{
"33333": "33333"
}
]
},"code": 200
}

主要的返回码

200、403、414、416、431、500

具体请参考


请求说明

<pre class="has">
POST https://api.netease.im/nimserver/chatroom/queueDrop.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8

请求中Headers的设置请参考

接口描述

删除清理整个队列

参数说明

<table border="1">

<tr>

curl请求示例

<pre class="has">
curl -X POST -H "CheckSum: 32dc17d0190f37037abc9feb749bbf049c9367e7" -H "AppKey: fe416640c8e8a72734219e1847ad2547" -H "Nonce: 1" -H "CurTime: 1451200147" -H "Content-Type: application/x-www-form-urlencoded" -d 'roomid=36&key=k2&value=v2' "https://api.netease.im/nimserver/chatroom/queueDrop.action"

返回说明

http 响应:json

<pre class="has">

"Content-Type": "application/json; charset=utf-8"
{
"desc": {
},"code": 200
}

主要的返回码

200、403、414、416、431、500

具体请参考


请求说明

<pre class="has">
POST https://api.netease.im/nimserver/chatroom/queueInit.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8

请求中Headers的设置请参考

接口描述

初始化队列

参数说明

<table border="1">

<tr>

curl请求示例

<pre class="has">
curl -X POST -H "CheckSum: 32dc17d0190f37037abc9feb749bbf049c9367e7" -H "AppKey: fe416640c8e8a72734219e1847ad2547" -H "Nonce: 1" -H "CurTime: 1451200147" -H "Content-Type: application/x-www-form-urlencoded" -d 'roomid=38&sizeLimit=10' "https://api.netease.im/nimserver/chatroom/queueInit.action"

返回说明

http 响应:json

<pre class="has">

"Content-Type": "application/json; charset=utf-8"
{
"desc": {
},"code": 200
}

主要的返回码

200、403、414、416、431、500

具体请参考


请求说明

<pre class="has">
POST https://api.netease.im/nimserver/chatroom/muteRoom.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8

请求中Headers的设置请参考

接口描述

设置聊天室整体禁言状态(仅创建者和管理员能发言)

参数说明

<table border="1">

<tr>

curl请求示例

<pre class="has">
curl -X POST -H "CheckSum: 32dc17d0190f37037abc9feb749bbf049c9367e7" -H "AppKey: fe416640c8e8a72734219e1847ad2547" -H "Nonce: 1" -H "CurTime: 1451200147" -H "Content-Type: application/x-www-form-urlencoded" -d 'roomid=4235&operator=zhangsan&mute=true' "https://api.netease.im/nimserver/chatroom/muteRoom.action"

返回说明

http 响应:json

<pre class="has">

"Content-Type": "application/json; charset=utf-8"
{
"desc": {
"success": true
},"code": 200
}

主要的返回码

200、403、414、416、431、500

具体请参考


请求说明

<pre class="has">
POST https://api.netease.im/nimserver/stats/chatroom/topn.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8

请求中Headers的设置请参考

接口描述

1、根据时间戳,按指定周期列出聊天室相关指标的TopN列表? 2、当天的统计指标需要到第二天才能查询

参数说明

<table border="1">

<tr>

curl请求示例

<pre class="has">
curl -X POST -H "CheckSum: 32dc17d0190f37037abc9feb749bbf049c9367e7" -H "AppKey: fe416640c8e8a72734219e1847ad2547" -H "Nonce: 1" -H "CurTime: 1451200147" -H "Content-Type: application/x-www-form-urlencoded" -d 'timestamp=1471781873&period=hour&topn=3&orderby=enter' "https://api.netease.im/nimserver/stats/chatroom/topn.action"

返回说明

http 响应:json

<pre class="has">

"Content-Type": "application/json; charset=utf-8"
{
"code": 200,"data": [
{
"activeNums": 5955,// 该聊天室内的活跃数
"datetime": 1471712400,// 统计时间点,单位秒,按天统计的是当天的0点整点;按小时统计的是指定小时的整点
"enterNums": 18621,// 进入人次数量
"msgs": 2793,// 聊天室内发生的消息数
"period": "HOUR",// 统计周期,HOUR表示按小时统计;DAY表示按天统计
"roomId": 3571337 // 聊天室ID号
},{
"activeNums": 6047,"datetime": 1471708800,"enterNums": 15785,"msgs": 2706,"period": "HOUR","roomId": 3573737
},{
"activeNums": 5498,"enterNums": 14590,"msgs": 2258,"roomId": 3513774
}
]
}

主要的返回码

200、403、414、416、431、500

具体请参考


请求说明

<pre class="has">
POST https://api.netease.im/nimserver/chatroom/membersByPage.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8

请求中Headers的设置请参考

接口描述

分页获取成员列表

参数说明

<table border="1">

<tr>

curl请求示例

<pre class="has">
curl -X POST -H "CheckSum: 32dc17d0190f37037abc9feb749bbf049c9367e7" -H "AppKey: fe416640c8e8a72734219e1847ad2547" -H "Nonce: 1" -H "CurTime: 1451207708" -H "Content-Type: application/x-www-form-urlencoded" -d 'roomid=4235&type=0&endtime=0&limit=20' "https://api.netease.im/nimserver/chatroom/membersByPage.action"

返回说明

http 响应:json

<pre class="has">

"Content-Type": "application/json; charset=utf-8"
{
"desc": {
"data": [
{
"roomid": 111,"accid": "abc","nick": "abc","avator": "http://nim.nos.netease.com/MTAxMTAwMg==/bmltYV8xNzg4NTA1NF8xNDU2Mjg0NDQ3MDcyX2E4NmYzNWI5LWRhYWEtNDRmNC05ZjU1LTJhMDUyMGE5MzQ4ZA==","ext": "ext","type": "MANAGER","level": 2,"onlineStat": true,"enterTime": 1487145487971,"blacklisted": true,"muted": true,"tempMuted": true,"tempMuteTtl": 120,"isRobot": true,"robotExpirAt":120
}
]
},"code": 200
}

返回结果中字段说明

<table border="1">

<tr>

主要的返回码

200、403、414、416、431、500

具体请参考


请求说明

<pre class="has">
POST https://api.netease.im/nimserver/chatroom/queryMembers.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8

请求中Headers的设置请参考

接口描述

批量获取在线成员信息

参数说明

<table border="1">

<tr>

curl请求示例

<pre class="has">
curl -X POST -H "CheckSum: 32dc17d0190f37037abc9feb749bbf049c9367e7" -H "AppKey: fe416640c8e8a72734219e1847ad2547" -H "Nonce: 1" -H "CurTime: 1451207708" -H "Content-Type: application/x-www-form-urlencoded" -d 'roomid=4235&accids=["abc","def"]' "https://api.netease.im/nimserver/chatroom/queryMembers.action"

返回说明

http 响应:json

<pre class="has">

"Content-Type": "application/json; charset=utf-8"
{
"desc": {
"data": [
{
"roomid": 111,"nick": "cba","type": 1,//0:普通成员(固定成员);1:聊天室创建者;2:聊天室管理员;3:临时用户(非聊天室固定成员);4:匿名用户(未注册账号);-1:受限用户(黑名单+禁言)
"onlineStat": true
}
]
},"code": 200
}

主要的返回码

200、403、414、416、431、500

具体请参考


请求说明

<pre class="has">
POST https://api.netease.im/nimserver/chatroom/updateMyRoomRole.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8

请求中Headers的设置请参考

接口描述

变更聊天室内的角色信息

参数说明

<table border="1">

<tr>

curl请求示例

<pre class="has">
curl -X POST -H "CheckSum: 51eb13ea5ee3a2c00e8388e48e61c65c7866c366" -H "AppKey: he516640c8e8a72734219eh847ad2547" -H "Nonce: 1" -H "CurTime: 1451207708" -H "Content-Type: application/x-www-form-urlencoded" -d 'roomid=36&accid=hzyangfeng201403&save=true&needNotify=true&nick=myNick' "https://api.netease.im/nimserver/chatroom/updateMyRoomRole.action"

返回说明

http 响应:json

<pre class="has">

"Content-Type": "application/json; charset=utf-8"
{
"code": 200
}

主要的返回码

200、403、414、416、431、500

具体请参考


请求说明

<pre class="has">
POST https://api.netease.im/nimserver/chatroom/queueBatchUpdateElements.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8

请求中Headers的设置请参考

接口描述

批量更新聊天室队列元素

参数说明

<table border="1">

<tr>

curl请求示例

<pre class="has">
curl -X POST -H 'appkey: fe416640c8e8a72734219e1847ad2547' -H 'cache-control: no-cache' -H 'checksum: 18f5435a7bf287af9150ad608797f75265495034' -H 'content-type: application/x-www-form-urlencoded' -H 'curtime: 1508481877' -H 'nonce: 12345' -d 'roomid=18&operator=xiaoming01&elements=%7b%22k1%22%3a%22v1%22%2c%22k2%22%3a%22v2%22%7d' "https://api.netease.im/nimserver/chatroom/queueBatchUpdateElements.action"

返回说明

http 响应:json

<pre class="has">

"Content-Type": "application/json; charset=utf-8"
{
"code": 200,"desc":{
"noExistElementKey":[
"k1"
]
}
}

主要的返回码

200、403、414、416、431、500

具体请参考


请求说明

<pre class="has">
POST https://api.netease.im/nimserver/chatroom/queryUserRoomIds.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8

请求中Headers的设置请参考

接口描述

批量更新聊天室队列元素

参数说明

<table border="1">

<tr>

curl请求示例

<pre class="has">
curl -X POST -H 'appkey: fe416640c8e8a72734219e1847ad2547' -H 'cache-control: no-cache' -H 'checksum: 18f5435a7bf287af9150ad608797f75265495034' -H 'content-type: application/x-www-form-urlencoded' -H 'curtime: 1508481877' -H 'nonce: 12345' -d 'creator=xiaoming01' "https://api.netease.im/nimserver/chatroom/queryUserRoomIds.action"

返回说明

http 响应:json

<pre class="has">

"Content-Type": "application/json; charset=utf-8"
{
"code": 200,"desc":{
"roomids": [
"1015","2016","2017","5062","23037398"
]
}
}

主要的返回码

200、403、414、416、431、500

具体请参考

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

?

<h2 id="src-cnt-6">请求白名单的设置

  • 相关配置列表如下:
    • request 合法域名:
    • socket 合法域名:
      • wss://wlnimsc0.netease.im
      • wss://wlnimsc1.netease.im
    • uploadFile 合法域名:
    • downloadFile 合法域名

地址:

<h2 id="src-cnt-0">调用聊天室API

<h3 id="src-cnt-0-0">创建聊天室

请求说明

<pre class="has">
POST https://api.netease.im/nimserver/chatroom/create.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8

请求中Headers的设置请参考

接口描述

创建聊天室

参数说明

<table border="1">

参数 类型 必须 说明
参数 类型 必须 说明
参数 类型 必须 说明
参数 类型 必须 说明
参数 类型 必须 说明
参数 类型 必须 说明
参数 类型 必须 说明
参数 类型 必须 说明
参数 类型 必须 说明
参数 类型 必须 说明
参数 类型 必须 说明
参数 类型 必须 说明
参数 类型 必须 说明
参数 类型 必须 说明
参数 类型 必须 说明
参数 类型 必须 说明
参数 类型 必须 说明
参数 类型 必须 说明
参数 类型 必须 说明
字段 类型 说明
参数 类型 必须 说明
参数 类型 必须 说明
参数 类型 必须 说明
参数 类型 必须 说明
    推荐文章
      热点阅读