更新时间: 2021-03-08
# 功能描述
销毁聊天室两种方式:
通过调用 Server API 接口主动销毁聊天室。
聊天室 1 个小时内没有人说话,且没有人加入聊天室时,会把聊天室内所有成员踢出聊天室并销毁聊天室。
# 实现方法
# 功能接口
请求地址: https://数据中心域名/chatroom/destroy.json
请求方法: POST
调用频率: 无限制
签名规则: 所有请求融云服务端 API 接口的请求均需要进行规则校验,详细请参考 通用 API 接口签名规则
# 输入参数
参数 | 类型 | 必传 | 说明 |
---|---|---|---|
chatroomId | String | 是 | 要销毁的聊天室 Id。每次可销毁多个聊天室。 |
# 返回结果
返回值 | 返回类型 | 说明 |
---|---|---|
code | Int | 返回码,200 为正常。 |
# 示例代码
Request:
POST /chatroom/destroy.json HTTP/1.1 Host: api-cn.ronghub.com App-Key: uwd1c0sxdlx2 Timestamp: 1408710653491 Nonce: 14314 Signature: 45beb7cc7307889a8e711219a47b7cf6a5b000e8 Content-Type: Application/x-www-form-urlencoded chatroomId=10001&chatroomId=10002
已复制
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
Response:
HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 {"code":200}
已复制
1
2
3
4
2
3
4