You need to enable JavaScript to run this app.
导航
获取主播账号列表
最近更新时间:2024.06.19 11:38:32首次发布时间:2024.06.19 11:38:32

您可通过此接口获取当前账号下主播账号的名称、头像地址等信息。

注意事项

请求频率:单用户请求频率限制为 10 次/秒

请求说明

  • 请求方式:GET
  • 请求地址:https://livesaas.volcengineapi.com/?Action=ListHostAccounts&Version=2023-08-01

请求参数

下表仅列出该接口特有的请求参数和部分公共参数。更多信息详见公共参数

Query

参数类型是否必选示例值描述
ActionStringListHostAccounts接口名称。当前 API 的名称为 ListHostAccounts
VersionString2023-08-01接口版本。当前 API 的版本为 2023-08-01
PageNoInteger1分页查询页码。默认值为 1
PageItemCountInteger10分页查询数量。取值范围为 [1,200],默认值为 10
HostAccountIdInteger2333主播账号 ID。
HostAccountNameString字节直播主播主播账号名称。支持模糊查询。最多支持输入 20 个字符。

返回参数

参数类型示例值描述
PageNoInteger1分页查询页码。
PageItemCountInteger10分页查询数量。
TotalItemCountInteger1查询到的主播总数。
HostAccountsArray of HostAccounts-主播账号信息列表。
GetFollowDataUrlStringhttps://example.com查询接口 URL,用于查询用户是否关注主播。详见关注主播接口
UpdateFollowDataUrlStringhttps://example.com更新接口 URL,用于更新用户关注主播状态。详见关注主播接口

HostAccounts

参数类型示例值描述
IdLong2333主播账号 ID。
NameString字节直播主播主播账号名称。
AvatarUrlStringhttps://p.example.org/6ed59yyum2-z75.png主播账号的头像地址。
HomeUrlStringhttps://example.com主播账号的主页链接。
CreateTimeInteger1657525387主播账号的创建时间,Unix 时间戳,单位为秒。

IsFollowEnable

Integer

0

是否开启观众关注主播功能。支持以下取值:

  • 0:关闭
  • 1:开启

请求示例

GET https://livesaas.volcengineapi.com/?Action=ListHostAccounts&Version=2023-08-01&PageNo=1&PageItemCount=10&HostAccountId=2333&HostAccountName=%E5%AD%97%E8%8A%82%E7%9B%B4%E6%92%AD%E4%B8%BB%E6%92%AD

返回示例

{
    "ResponseMetadata": {
        "RequestId": "20230604110420****100232280022D31",
        "Action": "ListHostAccounts",
        "Version": "2023-08-01",
        "Service": "livesaas",
        "Region": "cn-north-1",
        "SystemTime": 1656067132
    },
    "Result": {
        "PageNo": 1,
        "PageItemCount": 10,
        "TotalItemCount": 1,
        "GetFollowDataUrl": "https://example.com",
        "UpdateFollowDataUrl": "https://example.com",
        "HostAccounts": [
            {
                "Id": 2333,
                "Name": "字节直播主播",
                "AvatarUrl": "https://p.example.org/6ed59yyum2-z75.png",
                "HomeUrl": "https://example.com",
                "CreateTime": 1657525387,
                "IsFollowEnable": 0
            }
        ]
    }
}

错误码

访问公共错误码错误码获取详细信息。