# Douyin/抖音 - 获取直播间信息

所属目录：Douyin/抖音

文档地址：https://doc.getoneapi.com/349233913e0

> 此接口已废弃，请优先使用替代接口。

`POST https://api.getoneapi.com/api/douyin/fetch_live_room_data`

## 鉴权

在请求头中传递 Authorization: Bearer YOUR_API_KEY（必填）

## 请求参数

### Header 参数

| 字段 | 类型 | 必填 | 说明 |
| --- | --- | --- | --- |
| Authorization | string | 是 | 在 Header 添加参数 Authorization，其值为在 Bearer 之后拼接 apikey<br><br>默认值： Bearer YOUR_API_KEY |
| Content-Type | string | 是 | 默认值： application/json |

### Body 参数 · application/json

| 字段 | 类型 | 必填 | 说明 |
| --- | --- | --- | --- |
| share_text | string | 是 | web端链接<br>与web_rid必填一项<br><br>示例值： https://live.douyin.com/870887192950 |
| web_rid | string | 是 | web端web_rid<br>与share_text必填一项<br>例：直播间网址https://live.douyin.com/870887192950 中的870887192950 为 web_rid<br><br>默认值： 0 |

#### JSON Schema

```json
{
  "type" : "object",
  "properties" : {
    "share_text" : {
      "type" : "string",
      "title" : "web端链接",
      "description" : "与web_rid必填一项",
      "examples" : [ "https://live.douyin.com/870887192950" ]
    },
    "web_rid" : {
      "type" : "string",
      "title" : "web端web_rid",
      "description" : "与share_text必填一项\n例：直播间网址https://live.douyin.com/870887192950 中的870887192950 为 web_rid",
      "default" : "0"
    }
  },
  "required" : [ "share_text", "web_rid" ]
}
```

#### 示例

```json
{
  "web_rid" : "",
  "share_text" : ""
}
```

## 返回响应

### 响应 200 · application/json

| 字段 | 类型 | 必填 | 说明 |
| --- | --- | --- | --- |
| code | integer | 是 |  |
| message | string | 是 |  |
| data | object | 是 |  |

#### JSON Schema

```json
{
  "type" : "object",
  "properties" : {
    "code" : {
      "type" : "integer"
    },
    "message" : {
      "type" : "string"
    },
    "data" : {
      "type" : "object",
      "properties" : { }
    }
  },
  "required" : [ "code", "message", "data" ]
}
```

#### 示例

```json
{
  "code" : 200,
  "message" : "success",
  "data" : { }
}
```

## 请求示例代码

```sh
curl --globoff --request POST 'https://api.getoneapi.com/api/douyin/fetch_live_room_data' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "web_rid" : "",
  "share_text" : ""
}'
```

