直播房间长链心跳
https://member.bilibili.com/arcopen/fn/live/room/ws-heartbeat
开放能力 / 直播能力 / 直播间长连和消息
直播房间长链心跳
url 参数
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
| client_id | string | 是 | 申请应用时获得的client_id |
body 参数
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
| conn_id | string | 是 | 获取长链地址时得到的心跳ID |
调用方式
javascript
// 让 AI 直接调(需要开放平台凭据)
bili_api_call { "ref": "45", "query": {…}, "body": {…} }
// 只看将要发出的请求(不需要凭据)
bili_api_call { "ref": "45", "dryRun": true }
// 生成完整调用代码
bili_codegen { "ref": "45", "lang": "python" }官方请求示例
bash
curl --location --request POST 'https://member.bilibili.com/arcopen/fn/live/room/ws-heartbeat' \
--header 'Host: member.bilibili.com' \
--header 'Connection: keep-alive' \
--data-raw '{"conn_id": "00000000-0000-0000-0000-000000000000"}'原始文档:045_直播房间长链心跳.md(1052 字节)。用 bili_docs_get { "ref": "45" } 读全文,或用 bili_api_spec { "ref": "45" } 取结构化规格。