You need to enable JavaScript to run this app.
导航
更新直播间观看账号配置信息
最近更新时间:2025.07.02 20:04:24首次发布时间:2023.06.15 10:37:14
我的收藏
有用
有用
无用
无用

更新直播间主要和次要观看账号的配置信息。

说明

该接口已经不再维护,建议调用 UpdateViewingRestriction 接口更新观看限制配置信息。

注意事项

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

请求说明

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

调试

请求参数

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

Query

参数类型是否必选示例值描述
ActionStringUpdateActivityViewPermissionAPI接口名称。当前 API 的名称为 UpdateActivityViewPermissionAPI
VersionString2020-06-01接口版本。当前 API 的版本为 2020-06-01

Body

参数类型是否必选示例值描述
ActivityIdInteger17678654498813直播间 ID。您可以通过调用 ListActivityAPI 接口查询 ID。
ViewingRestrictionObject of ViewingRestrictions-主要观看账号的配置信息。

IsSubViewRestrictionEnable

Boolean

false

是否开启次要观看账号。默认取值为 false

  • true:开启
  • false:关闭
SubViewRestrictionObject of SubViewRestriction-次要观看账号的配置信息。当 IsSubViewRestrictionEnable 取值为 true 时,该参数必填。

ViewingRestrictions

参数类型是否必选示例值描述

ViewingAccountType

Integer

4

观看账号的类型。

  • 4:自定义登录
ViewingRestrictionButtonTitleString自定义观看观看按钮文案。长度为 1 到 12 个字符。默认为自定义观看
CustomViewingRestrictionObject of CustomViewingRestriction-自定义观看限制配置信息。当 ViewingAccountType 取值为 4 时,该参数必填。

SubViewRestriction

参数类型是否必选示例值描述

ViewingAccountType

Integer

4

观看账号的类型。

  • 4:自定义登录
ViewingRestrictionButtonTitleString自定义观看观看按钮文案。长度为 1 到 12 个字符。默认为自定义观看
CustomViewingRestrictionObject of CustomViewingRestriction-自定义观看限制配置信息。当 ViewingAccountType 取值为 4 时,该参数必填。

CustomViewingRestriction

参数类型是否必选示例值描述
CustomAppStringtest登录账号 App。您的自有账号系统名称。当 ViewingAccountType 取值为 4 时,该参数必填。
CustomUrlStringhttps://www.example.com登录链接。您的自有账号系统登录页面的链接。当 ViewingAccountType 取值为 4 时,该参数必填。
ErrorRedirectUrlStringhttps://www.error.com自定义鉴权校验失败后,进入的鉴权校验失败页面的地址。该地址需要包含协议头。

返回参数

参数类型示例值描述
ActivityIdInteger17678654498813直播间 ID。
ViewRestrictionInfoObject of ViewRestrictionInfo-主要观看账号的配置信息。
SubViewRestrictionInfoObject of SubViewRestrictionInfo-次要观看账号的配置信息。

ViewRestrictionInfo

参数类型示例值描述

ViewingAccountType

Integer

4

观看账号的类型。

  • 4:自定义登录
ViewingRestrictionButtonTitleString自定义观看观看按钮文案。
CustomViewingRestrictionInfoObject of CustomViewingRestrictionInfo-自定义观看限制配置信息。

SubViewRestrictionInfo

参数类型示例值描述

ViewingAccountType

Integer

4

观看账号的类型。

  • 4:自定义登录
ViewingRestrictionButtonTitleString自定义观看观看按钮文案。
CustomViewingRestrictionInfoObject of CustomViewingRestrictionInfo-自定义观看限制配置信息。

CustomViewingRestrictionInfo

参数类型示例值描述
CustomAppStringtest登录账号 App。您的自有账号系统名称。
CustomUrlStringhttps://www.example.com登录链接。您的自有账号系统登录页面的链接。
SecretKeyString4446556644自定义登录的密钥。根据 CustomApp 和 CustomUrl 自动生成,用于计算校验签名( Sign 值),计算方法详见回调参数
ErrorRedirectUrlStringhttps://www.error.com自定义鉴权校验失败后,进入的鉴权校验失败页面的地址。该地址包含协议头。

请求示例

POST https://livesaas.volcengineapi.com/?Action=UpdateActivityViewPermissionAPI&Version=2020-06-01
{
    "ActivityId": 17678654498813,
    "ViewingRestriction": {
        "ViewingAccountType": 4,
        "ViewingRestrictionButtonTitle": "自定义观看",
        "CustomViewingRestriction": {
            "CustomApp": "test",
            "CustomUrl": "https://www.example.com",
            "ErrorRedirectUrl": "https://www.error.com"
        }
    },
    "IsSubViewRestrictionEnable": false,
    "SubViewRestriction": {
        "ViewingAccountType": 4,
        "ViewingRestrictionButtonTitle": "自定义观看",
        "CustomViewingRestriction": {
            "CustomApp": "test",
            "CustomUrl": "https://www.example.com",
            "ErrorRedirectUrl": "https://www.error.com"
        }
    }
}

返回示例

{
    "ResponseMetadata": {
        "RequestId": "20230604110420****100232280022D31",
        "Action": "UpdateActivityViewPermissionAPI",
        "Version": "2020-06-01",
        "Service": "livesaas",
        "Region": "cn-north-1",
        "SystemTime": 1697446406
    },
    "Result": {
        "ActivityId": 17678654498813,
        "ViewRestrictionInfo": {
            "ViewingAccountType": 4,
            "CustomViewingRestrictionInfo": {
                "CustomApp": "test",
                "ErrorRedirectUrl": "https://www.error.com",
                "SecretKey": "4446556644",
                "CustomUrl": "https://www.example.com"
            },
            "ViewingRestrictionButtonTitle": "自定义观看"
        },
        "SubViewRestrictionInfo": {
            "ViewingAccountType": 4,
            "CustomViewingRestrictionInfo": {
                "CustomApp": "test",
                "ErrorRedirectUrl": "https://www.error.com",
                "SecretKey": "4446556644",
                "CustomUrl": "https://www.example.com"
            },
            "ViewingRestrictionButtonTitle": "自定义观看"
        }
    }
}

错误码

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