调用 GetInPageAdvertisement 接口,获取指定直播间中页中广告的图片、跳转链接等配置信息。
下表仅列出该接口特有的请求参数和部分公共参数。更多信息详见公共参数。
| 参数 | 类型 | 是否必选 | 示例值 | 描述 |
|---|---|---|---|---|
| Action | String | 是 | GetInPageAdvertisement | 接口名称。当前 API 的名称为 GetInPageAdvertisement。 |
| Version | String | 是 | 2023-08-01 | 接口版本。当前 API 的版本为 2023-08-01。 |
ActivityId | Long | 是 |
| 直播间 ID。您可通过调用 ListActivityAPI 接口获取 ID。 说明 使用子账号调用接口时,确保该直播间对子账号可见。有关如何配置子账号的可见范围,详见子账号管理。 |
| 参数 | 类型 | 示例值 | 描述 |
|---|---|---|---|
IsEnable | Integer |
| 是否开启页中广告。开启后,观看页展示页中广告。取值如下:
|
EnableFloating | Boolean |
| 是否开启浮层展示。取值如下:
|
| Advertisements | Array of Advertisements | - | 页中广告信息。 |
| 参数 | 类型 | 示例值 | 描述 |
|---|---|---|---|
| Id | Long | 1 | 页中广告 ID。 |
| ImageUrl | String | https://p.example.org/example.png | 页中广告的图片地址,包含协议头。 |
| HomeUrl | String | https://example.com | 页中广告的跳转链接,包含协议头。 |
GET https://livesaas.volcengineapi.com/?Action=GetInPageAdvertisement&Version=2023-08-01&ActivityId=177985****487296
{ "ResponseMetadata": { "RequestId": "20230604110420****100232280022D31", "Action": "GetInPageAdvertisement", "Version": "2023-08-01", "Service": "livesaas", "Region": "cn-north-1", "SystemTime": 1697446406 }, "Result": { "Advertisements": [ { "Id": 1, "ImageUrl": "https://p.example.org/example.png", "HomeUrl": "https://example.com" } ], "IsEnable": 1, "EnableFloating": true } }