获取房间信息
开发中
GET
https://chat.xiaoheihe.cn/chatroom/v2/room/view
请求参数
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
Body 参数application/json
object {0}
示例
{}
示例代码
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/view?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;' \
--data-raw '{}'
返回响应
🟢200成功
application/json
Body
msg
string
必需
result
object
必需
room_id
string
必需
room
object
必需
channels
array [object {27}]
必需
roles
array [object {15}]
必需
my_roles
array[string]
必需
my_room_info
object
必需
user_notify_settings
object
必需
read_states
object
必需
bot_infos
array [object {6}]
必需
integration
object
必需
status
string
必需
示例
{
"room_id": "3713907767125508096",
"room": {
"room_join_verify": {
"question": "",
"room_id": "0",
"verify_switch": false
},
"room_setting": {
"show_room_level": 1,
"game_theme": null,
"room_notify_type": 1,
"room_default_channel": null,
"room_show_offline_user": 1,
"show_recommend_set_only_at": 0,
"show_bind_game": 2,
"welcome_channel": null,
"use_voice_pack_room_only": 0,
"show_apply_hot": 1,
"room_icon_id": null,
"bind_game_ids": null,
"similar_game_ids": null,
"similar_game_infos": null,
"bind_game_infos": null,
"auto_mod": {
"filter_word_list": [],
"filter_urls": {
"name": "",
"filter_words": null,
"actions": [],
"id": "0",
"enable": false,
"only_send_chat_url": false
},
"filter_qrcode": null
},
"talkable": null,
"default_permissions": "270615626050",
"hide_room_fire_flag": false,
"hide_member_fire_flag": false
},
"room_bind_team": {
"appid": 0,
"room_id": "0",
"channel_id": "0",
"room_sync_team": 0,
"team_sync_room": 0
},
"room_fire_flag": {
"cumulative_days": 0,
"continuous_days": 0,
"active_members": 0,
"inactive_days": 0
},
"room_id": "3713907767125508096",
"room_name": "1",
"room_avatar": "",
"room_pic": "",
"public_id": "704494",
"introduction": "",
"main_color_v2": null,
"bar_main_color": 0,
"bar_main_color_v2": null,
"bg_pic": "",
"bg_color": "",
"bar_color": "",
"bg_pic_main_color": "",
"blur_rate": 0,
"transparency": 20,
"main_color": 0,
"show_channel_bar_filter": false,
"can_change_bg_pic": null,
"show_room_level": 1,
"game_theme": null,
"room_notify_type": 1,
"room_default_channel": null,
"room_show_offline_user": 1,
"show_recommend_set_only_at": 0,
"show_bind_game": 2,
"welcome_channel": null,
"use_voice_pack_room_only": 0,
"show_apply_hot": 1,
"room_icon_id": null,
"bind_game_ids": null,
"similar_game_ids": null,
"similar_game_infos": null,
"auto_mod": {
"filter_word_list": [],
"filter_urls": {
"name": "",
"filter_words": null,
"actions": [],
"id": "0",
"enable": false,
"only_send_chat_url": false
},
"filter_qrcode": null
},
"talkable": null,
"default_permissions": "0",
"hide_room_fire_flag": false,
"hide_member_fire_flag": false,
"create_by": 32108666,
"link_id": 0,
"is_public": 1,
"is_hot": 0,
"room_type": 0,
"apply_hot_status": 0,
"can_decorate": false,
"room_task": {
"room_level": 1,
"finish_rate": 0.041666666666666664,
"now_level_finish_rate": 0.08333333333333333,
"max_room_level": 3,
"tasks": [
{
"task_id": 0,
"task_name": "房间人数${now_counts}/${target_counts}",
"task_pic": "icon-friends",
"target_counts": 6,
"now_counts": 1,
"finished": 0,
"reachable": 1
},
{
"task_id": 1,
"task_name": "近7天房间成员累计语音时长${now_counts}/${target_counts}分钟",
"task_pic": "icon-history",
"target_counts": 300,
"now_counts": 0,
"finished": 0,
"reachable": 1
}
],
"warn_tasks": null
},
"room_icon": null,
"member_count": 1,
"online_count": 0,
"audio_count": 0,
"update_time": 0,
"enable_switch_line": true,
"av_line_list": [
{
"name": "线路1",
"value": "trtc",
"resolution_map": null
},
{
"name": "线路2",
"value": "volc",
"resolution_map": null
}
],
"channel_fold_user": 15,
"members": null,
"screen_share_members": null,
"audio_share_members": null,
"promise_display_info": "",
"bind_game_infos": null,
"customization": {
"room_id": "3713907767125508096",
"customization_switch": false,
"available_channels": null,
"questions": null,
"update_time": 0,
"create_time": 0
},
"enable_customization": true,
"rec_desc": "",
"anc": null
},
"channels": [
{
"api_type": "trtc",
"max_count": 100,
"follow_group": 15,
"follow_group_v1": 0,
"slow_mode": 0,
"audio_bitrate": 128,
"tip_sound_user_limit": 15,
"is_private": 0,
"mini_pro_id": "",
"channel_icon": "",
"channel_url": "",
"tab": "",
"channel_id": "3713907767219945472",
"channel_name": "文字频道",
"channel_type": 3,
"channel_create_by": 32108666,
"bind_topic_id": 0,
"create_by": 32108666,
"level": 999,
"state": 0,
"bind_app_id": 0,
"password": false,
"channel_list": [
{
"api_type": "trtc",
"max_count": 100,
"follow_group": 15,
"follow_group_v1": 0,
"slow_mode": 0,
"audio_bitrate": 128,
"tip_sound_user_limit": 15,
"is_private": 0,
"parent_id": "3713907767219945472",
"mini_pro_id": "",
"channel_icon": "",
"channel_url": "",
"tab": "",
"channel_id": "3713907767219945474",
"channel_name": "默认频道",
"channel_type": 1,
"channel_create_by": 32108666,
"bind_topic_id": 0,
"create_by": 32108666,
"level": 999,
"state": 0,
"bind_app_id": 0,
"password": false,
"channel_list": [],
"permission_overwrites": null,
"permission_sync": 0,
"channel_mini_pro": null,
"user_perm": {
"allow": "0",
"deny": "0"
}
}
],
"permission_overwrites": null,
"permission_sync": 0,
"channel_mini_pro": null,
"user_perm": {
"allow": "0",
"deny": "0"
}
},
{
"api_type": "volc",
"max_count": 100,
"follow_group": 15,
"follow_group_v1": 0,
"slow_mode": 0,
"audio_bitrate": 128,
"tip_sound_user_limit": 15,
"is_private": 0,
"mini_pro_id": "",
"channel_icon": "",
"channel_url": "",
"tab": "",
"channel_id": "3713907767219945476",
"channel_name": "语音频道",
"channel_type": 3,
"channel_create_by": 32108666,
"bind_topic_id": 0,
"create_by": 32108666,
"level": 999,
"state": 0,
"bind_app_id": 0,
"password": false,
"channel_list": [],
"permission_overwrites": null,
"permission_sync": 0,
"channel_mini_pro": null,
"user_perm": {
"allow": "0",
"deny": "0"
}
}
],
"roles": [
{
"name": "高级管理员",
"icon": "",
"color_list": null,
"id": "3713907767152844802",
"department_id": "3713907767125508096",
"room_id": "3713907767125508096",
"permissions": "1",
"type": 7,
"color": 3198065,
"position": 0,
"del_tag": 1,
"hoist": 1,
"mentionable": 0,
"creator": 32108666,
"create_time": 1731567281
},
{
"name": "游客",
"icon": "",
"color_list": null,
"id": "3713907767152844804",
"department_id": "3713907767125508096",
"room_id": "3713907767125508096",
"permissions": "2",
"type": 254,
"color": 0,
"position": 32766,
"del_tag": 1,
"hoist": 0,
"mentionable": 0,
"creator": 32108666,
"create_time": 1731567281
},
{
"name": "全体成员",
"icon": "",
"color_list": null,
"id": "3713907767152844800",
"department_id": "3713907767125508096",
"room_id": "3713907767125508096",
"permissions": "270615626050",
"type": 255,
"color": 0,
"position": 32767,
"del_tag": 1,
"hoist": 0,
"mentionable": 0,
"creator": 32108666,
"create_time": 1731567281
}
],
"my_roles": [],
"my_room_info": {
"room_nickname": "",
"show_room_bg": 1,
"ban": {
"operator_id": null,
"reason": "",
"until": "0",
"notify": false
},
"mute_earphone": {
"operator_id": null,
"mute": false
},
"mute_room": {
"operator_id": null,
"mute": false
},
"show_game_name": null,
"show_game_card": null,
"read_anc_time": 0,
"is_visitor": false,
"customization": {
"finish": true,
"responses": null
},
"create_time": 1731567281033,
"continuous_days": 0,
"hide_fire_flag": null,
"show_fire_tip_time": 0
},
"user_notify_settings": {
"3713907767125508096": {
"dnds": null,
"flags": null,
"room_id": "3713907767125508096",
"department_id": "3713907767125508096",
"notify_type": 1
},
"3713907767219945472": {
"dnds": null,
"flags": null,
"room_id": "3713907767125508096",
"department_id": "3713907767219945472",
"notify_type": 0
},
"3713907767219945474": {
"dnds": null,
"flags": null,
"room_id": "3713907767125508096",
"department_id": "3713907767219945474",
"notify_type": 0
},
"3713907767219945476": {
"dnds": null,
"flags": null,
"room_id": "3713907767125508096",
"department_id": "3713907767219945476",
"notify_type": 0
}
},
"read_states": {
"3713907767219945474": {
"message_count": 0,
"mention_count": 0,
"last_read_message_id": "1870221897717407744",
"last_read_time": 1734730626956,
"last_at_message_id": "0"
}
},
"bot_infos": [
{
"bot_account_info": {
"avatar_decoration": null,
"tag": null,
"nickname": "内置命令",
"avatar": "",
"medals": null,
"user_id": -1,
"level": 0,
"bot": false,
"room_nickname": "",
"roles": null
},
"commands": [
{
"protocol": "heyboxchat://bot-command/?command=add_bot",
"permission": "1",
"name": "/addBot",
"description": "邀请新的机器人进入房间",
"options": [
{
"key": "bot_id",
"required": true,
"description": "请输入Bot的ID,可以通过点击Bot的头像获得",
"name": "Bot的ID",
"type": 4
}
],
"id": "1",
"type": 1
},
{
"protocol": "heyboxchat://bot-command/?command=del_bot",
"permission": "1024",
"name": "/deleteBot",
"description": "移出已有机器人",
"options": [
{
"key": "bot_id",
"required": true,
"description": "请选择移出房间的Bot成员",
"name": "Bot成员",
"type": 6
}
],
"id": "2",
"type": 1
},
{
"protocol": "heyboxchat://bot-command/?command=black_add",
"permission": "4096",
"name": "/ban",
"description": "移出房间并将用户加入房间黑名单",
"options": [
{
"key": "to_user_id",
"required": true,
"name": "移出用户",
"type": 6
},
{
"key": "delete_msg_range",
"required": true,
"name": "删除最近发言",
"choices": [
{
"key": null,
"value": "0",
"name": "不删除",
"type": 4
},
{
"key": null,
"value": "3600",
"name": "过去1小时",
"type": 4
},
{
"key": null,
"value": "21600",
"name": "过去6小时",
"type": 4
},
{
"key": null,
"value": "43200",
"name": "过去12小时",
"type": 4
},
{
"key": null,
"value": "86400",
"name": "过去24小时",
"type": 4
}
],
"type": 3
},
{
"key": "reason",
"required": false,
"name": "拉黑理由",
"type": 3
}
],
"id": "4",
"type": 1
}
],
"bot_bind_role": null,
"creator": null,
"permissions": null,
"joined_time": 0
}
],
"integration": {
"used_bot_commands": null
}
}
修改于 2024-12-23 06:26:12