当前浏览的是 v7 预览版文档(v7 尚未正式发布,API 可能随版本调整)。本页是 v7 新增内容,去 v6 正式版文档首页
@ikenxuan/amagi

直播间初始化信息

取房间的标识与开播状态;标题、封面等展示信息用 `liveRoomInfo`。

GET
/api/bilibili/fetch_liveroom_def

Authorization

bearerAuth
AuthorizationBearer <token>

仅在 startServer 传了 token 时生效

In: header

Query Parameters

room_id*string

直播间 ID

Length1 <= length

Response Body

application/json

application/json

curl -X GET "https://example.com/api/bilibili/fetch_liveroom_def?room_id=string"
{  "success": true,  "data": {    "code": 0,    "data": {      "encrypted": true,      "hidden_till": 0,      "is_hidden": true,      "is_locked": true,      "is_portrait": true,      "is_sp": 0,      "live_status": 0,      "live_time": 0,      "lock_till": 0,      "need_p2p": 0,      "pwd_verified": true,      "room_id": 0,      "room_shield": 0,      "short_id": 0,      "special_type": 0,      "uid": 0    },    "message": "string",    "msg": "string"  },  "error": {    "kind": "validation",    "code": "string",    "message": "string",    "retryable": true,    "platform": {      "code": "string",      "message": "string"    },    "http": {      "status": 0,      "statusText": "string"    },    "issues": [      {        "path": "string",        "message": "string",        "received": null      }    ]  },  "message": "string",  "meta": {    "requestId": "string",    "clientId": "string",    "platform": "douyin",    "endpoint": "string",    "durationMs": 0,    "attempts": 0,    "trace": [      {        "url": "string",        "method": "string",        "status": 0,        "durationMs": 0,        "reason": "initial",        "retryOf": "string"      }    ]  },  "requestPath": "/api/bilibili/fetch_one_video?bvid=BV1xx"}