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

获取直播间自定义观看限制的配置信息

最近更新时间2023.11.08 09:30:21

首次发布时间2023.03.17 13:30:36

获取直播间自定义观看账号或评论限制的配置信息。

注意事项

请求频率:单用户请求频率限制为 120 次/分钟

请求说明

  • 请求方式:GET
  • 请求地址:https://livesaas.volcengineapi.com/?Action=GetCustomViewingRestrictionInfoAPI&Version=2020-06-01

请求参数

以下请求参数列表仅列出了该接口的部分公共参数,完整公共参数列表见公共请求参数

Query

参数类型是否必选示例值描述
ActionStringGetCustomViewingRestrictionInfoAPI接口名称。当前 API 的名称为 GetCustomViewingRestrictionInfoAPI
VersionString2020-06-01接口版本。当前 API 的版本为 2020-06-01
ActivityIdLong175980616直播间 ID。您可以通过 ListActivityAPI 接口查询 ID。

ViewingRestriction

Integer

0

指定需要查询的自定义观看限制。支持以下取值,默认取值为 0

  • 0:主次观看限制
  • 1:主要观看限制
  • 2:次要观看限制

返回参数

参数类型示例值描述
ActivityIdLong175980616直播间 ID
CustomViewingRestrictionArray of CustomViewingRestriction-自定义观看限制的配置信息
MainViewingRestrictionButtonTitleString自定义观看1主登录方式的按钮文案
SubViewingRestrictionButtonTitleString自定义观看2次登录方式的按钮文案

CustomViewingRestriction

参数类型示例值描述

ViewingRestrictionType

Integer

2

自定义观看限制类型。支持以下取值。

  • 1:主要观看限制
  • 2:次要观看限制
CustomAppStringexample2登录账号 App。您的自有账号系统名称。
CustomUrlStringhttps://www.example2.com登录链接。您的自有账号系统登录页面的链接。
SecretKeyStringxxxxx2自定义登录的密钥。根据 CustomAppCustomUrl 自动生成,用于计算校验签名( Sign 值),计算方法详见回调参数
ErrorRedirectUrlStringhttps://www.error.com自定义鉴权校验失败后,进入的鉴权校验失败页面的地址。该地址包含协议头。默认跳转至企业直播的自定义鉴权校验失败页面。

示例

请求示例

GET https://livesaas.volcengineapi.com/?Action=GetCustomViewingRestrictionInfoAPI&Version=2020-06-01&ActivityId=175980616&ViewingRestriction=0

返回示例

{
  "ResponseMetadata": {
    "Action": "GetCustomViewingRestrictionInfoAPI",
    "Region": "cn-north-1",
    "RequestId": "202303101311119BAEE6215ADC71105DF5",
    "Service": "livesaas",
    "Version": "2020-06-01",
    "SystemTime": 1685969459
  },
  "Result": {
    "ActivityId": 175980616,
    "CustomViewingRestriction": [
      {
        "CustomApp": "example1",
        "CustomUrl": "https://www.example1.com",
        "SecretKey": "xxxxx1",
        "ViewingRestrictionType": 1,
        "ErrorRedirectUrl": "https://www.error.com"
      },
      {
        "CustomApp": "example2",
        "CustomUrl": "https://www.example2.com",
        "SecretKey": "xxxxx2",
        "ViewingRestrictionType": 2,
        "ErrorRedirectUrl": "https://www.error.com"
      }
    ],
    "MainViewingRestrictionButtonTitle": "自定义观看1",
    "SubViewingRestrictionButtonTitle": "自定义观看2"
  }
}

错误码

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