You need to enable JavaScript to run this app.
导航

查询作者内容列表

最近更新时间2022.11.04 11:22:56

首次发布时间2022.11.04 11:22:56

概述

该接口主要用于客户侧构建作者主页,获取作者发文内容列表。当前接口有5-10分钟的延迟,即作者发文后,在5-10分钟以内可以通过这个接口拿到内容。

调前准备

  1. 接口鉴权
    详见:接口鉴权
  2. 创建非内容场景
    详见:2.3创建非内容场景

请求接口

请求方式

post

请求url

https://cms.volcengineapi.com?Action=GetArticlesByAuthorId&Version=2022-01-01

请求header

ServiceName: volc_content_api

url组成

Host: https://cms.volcengineapi.com

Action: GetArticlesByAuthorId

Version: 2022-01-01

请求参数

字段名字段类型是否必填说明
UniqUserIdstring用户唯一标识,由客户根据设备标识或用户账号脱敏得到
Categorystring非集合类投放场景唯一标识,可以在场景中获取,
AuthorIdnumber作者ID
GroupTypestring内容体裁,不传时,返回所有体裁;具体见GroupType说明
PageSizeint分页大小,默认10,最大20
Cursorstring偏移量,下一页的查询可以由当前接口返回Cursor,格式不正确时会有报错
GroupTypeslist体裁,可以传多个,不传时,返回所有体裁;具体见GroupType说明

GroupType

GroupType描述
article图文
video视频
short_video小视频
short_content短内容

响应字段

字段名
字段类型
是否必填
说明
ResponseMetadata
ResponseMetadata
BaseResp
BaseResp
Data
ArticleList

请求示例

{
    "UniqUserId": "123",
    "Category": "ee2e6666",
    "AuthorId": 1729351955000000,
    "GroupType": "article",
    "Cursor":"",
    "PageSize": 5
}

响应示例

正常响应示例

{
  "ResponseMetadata": {
    "RequestId": "2022110318344201020209302717B0F0BF",
    "Action": "GetArticlesByAuthorId",
    "Version": "2022-01-01",
    "Service": "volc_content_api",
    "Region": "cn-north-1"
  },
  "Data": {
    "ArticleList": [
      {
        "GroupId": 1748275173700000,
        "Title": "示例title",
        "Author": {
          "AuthorName": "authorName",
          "AuthorAvatarUrl": "...",
          "AuthorId": "authorId",
          "Description": "..",
          "AuthorBizId": ""
        },
        "GroupType": "article",
        "GenerateType": "test",
        "PublishTime": 1667285098,
        "Abstract": "示例abstract",
        "OpenId": "",
        "Tags": [
          "示例tag1",
          "示例tag2"
        ],
        "CoverImages": [
          {
            "Url": "url",
            "Height": 718,
            "Weight": 926,
            "Width": 926
          }
        ],
        "Extra": "",
        "Link": "",
        "DiggCount": 0,
        "CommentCount": 0,
        "CommentUrl": ""
      }
    ],
    "Cursor": "示例cursor"
  },
  "BaseResp": {
    "StatusMessage": "success",
    "StatusCode": 1000
  }
}

异常响应示例

{
  "ResponseMetadata": {
    "RequestId": "2022110318314601021121202226AD2BE0",
    "Action": "GetArticlesByAuthorId",
    "Version": "2022-01-01",
    "Service": "volc_content_api",
    "Region": "cn-north-1",
    "Error": {
      "CodeN": 1026,
      "Code": "1026",
      "Message": "场景类型使用错误:请使用非集合类场景"
    }
  },
  "Data": null,
  "BaseResp": {
    "StatusMessage": "场景类型使用错误:请使用非集合类场景",
    "StatusCode": 1026
  }
}

错误码

注意

若需排查日志,请提供 RequestId

错误代码错误标识描述
1001ParamError参数错误
1026NonCollectionReplySceneTypeError场景类型使用错误:请使用非集合类场景