mirror of
https://github.com/SocialSisterYi/bilibili-API-collect.git
synced 2024-12-25 20:10:06 +08:00
parent
2382b768aa
commit
70eb852101
@ -1,5 +1,83 @@
|
||||
# 直播间管理
|
||||
|
||||
## 开通直播间
|
||||
|
||||
> https://api.live.bilibili.com/xlive/app-blink/v1/preLive/CreateRoom
|
||||
|
||||
*请求方式:POST*
|
||||
|
||||
认证方式:Cookie(SESSDATA)
|
||||
|
||||
鉴权方式:Cookie中`bili_jct`的值正确并与`csrf`相同
|
||||
|
||||
**正文参数( application/x-www-form-urlencoded ):**
|
||||
| 参数名 | 类型 | 内容 | 必要性 | 备注 |
|
||||
| ------- | ---- | ------------------------ | ------ | -------------------- |
|
||||
| platform | str | 客户端? | 必要 | 默认值web |
|
||||
| visit_id | str | 未知 | | 默认空 |
|
||||
| csrf | str | CSRF Token(位于cookie) | 必要 | |
|
||||
| csrf_token | str | CSRF Token(位于 cookie) | | |
|
||||
|
||||
|
||||
**json回复:**
|
||||
|
||||
根对象:
|
||||
|
||||
| 字段 | 类型 | 内容 | 备注 |
|
||||
| ------- | ------ | -------- | ------------------------------------------------------ |
|
||||
| code | num | 返回值 | 0:成功<br />1531193016:已经创建直播间~<br />-400:请求错误 |
|
||||
| ttl | str | 错误信息 | 默认为1 |
|
||||
| message | str | 错误信息 | 默认为0 |
|
||||
| data | array | 信息本体 | |
|
||||
|
||||
`data`对象:
|
||||
|
||||
| 字段 | 类型 | 内容 | 备注 |
|
||||
| --------- | ----- | ---------------- | ---------------------- |
|
||||
| roomID | str | 直播间房间号 | 创建成功返回直播间号 |
|
||||
|
||||
**示例:**
|
||||
|
||||
开通直播间
|
||||
|
||||
```shell
|
||||
curl 'https://api.live.bilibili.com/xlive/app-blink/v1/preLive/CreateRoom' \
|
||||
--data-urlencode 'platform=web' \
|
||||
--data-urlencode 'visit_id=' \
|
||||
--data-urlencode 'csrf=xxx' \
|
||||
--data-urlencode 'csrf_token=xxx' \
|
||||
-b 'SESSDATA=xxx;bili_jct=xx'
|
||||
```
|
||||
|
||||
<details>
|
||||
<summary>查看响应示例:</summary>
|
||||
|
||||
```json
|
||||
{
|
||||
"code": 0,
|
||||
"message": "0",
|
||||
"ttl": 1,
|
||||
"data": {
|
||||
"roomID": "1234"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
"code": 1531193016,
|
||||
"message": "已经创建直播间~",
|
||||
"ttl": 1,
|
||||
"data": {
|
||||
"roomID": ""
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
|
||||
|
||||
## 更新直播间标题
|
||||
|
||||
> https://api.live.bilibili.com/room/v1/Room/update
|
||||
|
Loading…
Reference in New Issue
Block a user