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

更新直播间观看账号配置信息

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

首次发布时间2023.06.15 10:37:14

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

注意事项

请求频率:单用户请求频率限制为 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-主要观看账号的配置信息。

IsSubViewingRestrictionEnable

Boolean

false

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

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

ViewingRestrictions

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

ViewingAccountType

Integer

4

观看账号的类型。

  • 4:自定义登录
ViewingRestrictionButtonTitleString自定义登录登录方式的按钮文案。
CustomViewingRestrictionObject of CustomViewingRestriction-自定义登录的配置信息。当 ViewingAccountType 取值为 4 时,该参数必填。

CustomViewingRestriction

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

返回参数

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

ViewingRestrictionInfo

参数类型示例值描述

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"
        }
    },
    "IsSubViewingRestrictionEnable":true,
    "SubViewingRestriction":{
        "ViewingAccountType": 4,
        "ViewingRestrictionButtonTitle": "自定义登录2",
        "CustomViewingRestriction": {
            "CustomApp":"test2",
            "CustomUrl":"https://www.example2.com",
            "ErrorRedirectUrl":"https://www.error2.com"
        }
    }
}

返回示例

{
    "ResponseMetadata": {
        "RequestId": "20230605205058E9BE7972A2C2C02C334F",
        "Action": "UpdateActivityViewPermissionAPI",
        "Version": "2020-06-01",
        "Service": "livesaas",
        "Region": "cn-north-1",
        "SystemTime": 1685969459
    },
    "Result": {
        "ActivityId": 17678654498813,
        "ViewRestrictionInfo": {
            "ViewingAccountType": 4,
            "ViewRestrictionButtonTitle": "自定义登录",
            "CustomViewingRestrictionInfo": {
                "CustomApp": "test",
                "CustomUrl": "https://www.example.com",
                "SecretKey": "4446556644",
                "ErrorRedirectUrl": "https://www.error.com"
            }
        },
        "SubViewRestrictionInfo": {
            "ViewingAccountType": 4,
            "ViewRestrictionButtonTitle": "自定义登录2",
            "CustomViewingRestrictionInfo": {
                "CustomApp": "test2",
                "CustomUrl": "https://www.example2.com",
                "SecretKey": "rereereerr",
                "ErrorRedirectUrl": "https://www.error2.com"
            }
        }
    }
}

错误码

下表提供了该接口特有的错误码,公共错误码请参见公共错误码文档。

状态码错误码错误信息说明
400InvalidParameter.ActivityIDInvalidThe specified parameter ActivityID is invalid.直播间 ID 不符合规范,请修改后重试。
400InvalidParameter.ViewingAccountTypeInvalidThe specified parameter ViewingAccountType is invalid.主要观看账号的配置信息不符合规范,请修改后重试。
400InvalidParameter.SubViewingRestrictionInvalidThe specified parameter SubViewingRestrictionInvalid is invalid.次要观看账号的配置信息不符合规范,请修改后重试。