# Toutiao/今日头条 - 获取用户主页发布

所属目录：Toutiao/今日头条

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

`POST https://api.getoneapi.com/api/toutiao/fetch_user_post`

## 鉴权

在请求头中传递 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

| 字段 | 类型 | 必填 | 说明 |
| --- | --- | --- | --- |
| sec_user_id | string | 是 | 用户sec_user_id<br>示例值： MS4wLjABAAAAZ-7_bvIhGk-tKa7Z4B3GUSA0d-6Rc3qMsEsMEPPUQig |
| category | enum&lt;string&gt; | 是 | 枚举值： profile_all 全部<br>pc_profile_article 文章<br>pc_profile_video 视频<br>pc_profile_ugc 微头条<br>profile_wenda 问答<br>pc_profile_short_video 小视频 |
| max_behot_time | string | 是 | 翻页参数<br>响应内容的max_behot_time参数值 |

#### JSON Schema

```json
{
  "type" : "object",
  "properties" : {
    "sec_user_id" : {
      "type" : "string",
      "title" : "用户sec_user_id",
      "examples" : [ "MS4wLjABAAAAZ-7_bvIhGk-tKa7Z4B3GUSA0d-6Rc3qMsEsMEPPUQig" ]
    },
    "category" : {
      "type" : "string",
      "enum" : [ "profile_all", "pc_profile_article", "pc_profile_video", "pc_profile_ugc", "profile_wenda", "pc_profile_short_video" ],
      "enumNames" : {
        "profile_all" : "全部",
        "pc_profile_article" : "文章",
        "pc_profile_video" : "视频",
        "pc_profile_ugc" : "微头条",
        "profile_wenda" : "问答",
        "pc_profile_short_video" : "小视频"
      }
    },
    "max_behot_time" : {
      "type" : "string",
      "description" : "响应内容的max_behot_time参数值",
      "title" : "翻页参数"
    }
  },
  "required" : [ "sec_user_id", "category", "max_behot_time" ]
}
```

#### 示例

```json
{
  "sec_user_id" : "MS4wLjABAAAAZ-7_bvIhGk-tKa7Z4B3GUSA0d-6Rc3qMsEsMEPPUQig",
  "category" : "profile_all",
  "max_behot_time" : ""
}
```

## 返回响应

### 响应 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/toutiao/fetch_user_post' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "sec_user_id" : "MS4wLjABAAAAZ-7_bvIhGk-tKa7Z4B3GUSA0d-6Rc3qMsEsMEPPUQig",
  "category" : "profile_all",
  "max_behot_time" : ""
}'
```

