黑盒语音接口
  1. 房间角色接口
黑盒语音接口
  • 教程
  • 开发者服务协议
  • 使用交流
  • 更新日志
  • 开发计划
  • 资源
    • 请求速率限制
    • Websocket
    • Bot命令
  • WEBSOCKET 连接请求
    • 连接到黑盒语音服务
  • HTTP接口
    • 消息接口
      • 发送消息接口的参数
      • 发送消息接口的返回值
      • 发送图片形式的频道消息
      • 发送Markdown文档
      • 更新指定频道消息
      • 删除指定的频道消息
      • 对某条频道消息增加/取消回应(小表情)
      • 发送卡片消息
      • 给用户发送私聊消息
      • 发送频道图片消息
      • 发送频道消息
      • 发送卡片消息
      • 发送频道消息@全体成员/@在线成员
      • 更新指定的频道消息
      • 删除指定的频道消息
      • 对某条频道消息增加/取消回应(小表情)
      • 给用户发送私聊消息
    • 媒体文件上传
      • 上传媒体文件的参数解析
      • 上传媒体文件
    • 房间角色接口
      • 权限相关说明
      • 接口说明
      • 获取房间角色列表
        GET
      • 创建角色
        POST
      • 更新角色
        POST
      • 删除角色
        POST
      • 对指定用户授予指定权限
        POST
      • 对指定用户剥夺指定权限
        POST
    • 房间表情
      • 房间表情包
      • 获取房间上传的表情包
      • 房间删除表情包
      • 房间更新表情包名称
    • 房间接口
      • 房间相关接口文档
      • 修改房间内昵称
      • 分页获取加入的房间列表
      • 获取房间信息
      • 退出房间
      • 房间踢人
      • 获取房间用户列表
  • 服务端推送事件
    • 事件说明
    • 通用推送字段
    • 机器人命令
      • 用户使用Bot命令
    • 频道消息事件
      • 频道消息事件
    • 房间消息事件
      • 房间消息事件
  1. 房间角色接口

获取房间角色列表

开发中
GET
https://chat.xiaoheihe.cn/chatroom/v2/room_role/roles

请求参数

Authorization
在 header 添加参数
token
示例:
token: ********************
Query 参数
room_id
string 
房间ID
必需
client_type
string 
声明请求黑盒语音
必需
默认值:
heybox_chat
x_client_type
string 
声明客户端类型
必需
默认值:
web
os_type
string 
声明客户端类型
必需
默认值:
web
x_os_type
string 
声明客户端是bot
必需
默认值:
bot
x_app
string 
声明请求黑盒语音
必需
默认值:
heybox_chat
chat_os_type
string 
声明客户端是bot
必需
默认值:
bot
chat_version
string 
必需
客户端版本号,不同版本返回的结果可能有区别
默认值:
1.30.0
Header 参数
Content-Type
string 
必需
示例值:
application/json;charset=UTF-8

示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://chat.xiaoheihe.cn/chatroom/v2/room_role/roles?room_id=&client_type=&x_client_type=&os_type=&x_os_type=&x_app=&chat_os_type=&chat_version=' \
--header 'Content-Type: application/json;charset=UTF-8' \
--header 'token;'

返回响应

🟢200成功
application/json
Body
msg
string 
必需
result
object 
必需
roles
array[object (角色详情) {15}] 
必需
status
string 
必需
示例
{
  "msg": "",
  "result": {
    "roles": [
      {
        "name": "高级管理员",
        "icon": "",
        "color_list": null,
        "id": "3642878923738988546",
        "department_id": "3642878923633221632",
        "room_id": "3642878923633221632",
        "permissions": "1",
        "type": 7,
        "color": 3198065,
        "position": 0,
        "del_tag": 1,
        "hoist": 1,
        "mentionable": 0,
        "creator": "0",
        "create_time": 0
      },
      {
        "name": "成员管理员",
        "icon": "",
        "color_list": null,
        "id": "3642878923738988556",
        "department_id": "3642878923633221632",
        "room_id": "3642878923633221632",
        "permissions": "13824",
        "type": 3,
        "color": 3447000,
        "position": 32762,
        "del_tag": 1,
        "hoist": 0,
        "mentionable": 0,
        "creator": "0",
        "create_time": 0
      },
      {
        "name": "文字频道管理员",
        "icon": "",
        "color_list": null,
        "id": "3642878923738988554",
        "department_id": "3642878923633221632",
        "room_id": "3642878923633221632",
        "permissions": "344064",
        "type": 4,
        "color": 9792727,
        "position": 32763,
        "del_tag": 1,
        "hoist": 0,
        "mentionable": 0,
        "creator": "0",
        "create_time": 0
      },
      {
        "name": "语音频道管理员",
        "icon": "",
        "color_list": null,
        "id": "3642878923738988552",
        "department_id": "3642878923633221632",
        "room_id": "3642878923633221632",
        "permissions": "213909504",
        "type": 5,
        "color": 1883293,
        "position": 32764,
        "del_tag": 1,
        "hoist": 0,
        "mentionable": 0,
        "creator": "0",
        "create_time": 0
      },
      {
        "name": "社区共建者",
        "icon": "",
        "color_list": null,
        "id": "3642878923738988550",
        "department_id": "3642878923633221632",
        "room_id": "3642878923633221632",
        "permissions": "3221225472",
        "type": 6,
        "color": 7310033,
        "position": 32765,
        "del_tag": 1,
        "hoist": 0,
        "mentionable": 0,
        "creator": "0",
        "create_time": 0
      },
      {
        "name": "游客",
        "icon": "",
        "color_list": null,
        "id": "3642878923738988548",
        "department_id": "3642878923633221632",
        "room_id": "3642878923633221632",
        "permissions": "2",
        "type": 254,
        "color": 0,
        "position": 32766,
        "del_tag": 1,
        "hoist": 0,
        "mentionable": 0,
        "creator": "0",
        "create_time": 0
      },
      {
        "name": "123",
        "icon": "",
        "color_list": null,
        "id": "3647669220917534720",
        "department_id": "3642878923633221632",
        "room_id": "3642878923633221632",
        "permissions": "16402",
        "type": 2,
        "color": 12764101,
        "position": 32766,
        "del_tag": 1,
        "hoist": 0,
        "mentionable": 0,
        "creator": "8829761",
        "create_time": 1727083134
      },
      {
        "name": "全体成员",
        "icon": "",
        "color_list": null,
        "id": "3642878923738988544",
        "department_id": "3642878923633221632",
        "room_id": "3642878923633221632",
        "permissions": "133176672578",
        "type": 255,
        "color": 0,
        "position": 32767,
        "del_tag": 1,
        "hoist": 0,
        "mentionable": 0,
        "creator": "0",
        "create_time": 0
      }
    ]
  },
  "status": "ok"
}
修改于 2024-10-09 03:30:53
上一页
接口说明
下一页
创建角色
Built with