调用 AddRobotComments
接口,在指定直播间内添加机器人评论。机器人会按照发送规则,随机自动发送添加的评论内容。
下表仅列出该接口特有的请求参数和部分公共参数。更多信息详见公共参数。
参数 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | AddRobotComments | 接口名称。当前 API 的名称为 AddRobotComments 。 |
Version | String | 是 | 2023-08-01 | 接口版本。当前 API 的版本为 2023-08-01 。 |
参数 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
ActivityId | Long | 是 |
| 直播间 ID。您可通过调用 ListActivityAPI 接口获取 ID。 说明 使用子账号调用接口时,确保该直播间对子账号可见。有关如何配置子账号的可见范围,详见子账号管理。 |
RobotCommentRepositoryId | Long | 否 |
| 机器人评论库 ID。您可通过调用 AddActivityRobotCommentRepository 接口获取 ID。 |
RobotCommentContents | Array of String | 是 |
| 待添加的机器人评论。长度为 1 到 200 个字符。 说明 一个机器人评论库内,最多可添加 2000 条机器人评论。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
Status | Boolean | true | 是否成功添加所有指定的机器人评论 。成功返回 true 。 |
POST https://livesaas.volcengineapi.com/?Action=AddRobotComments&Version=2023-08-01 { "ActivityId": 1770****81234, "RobotCommentContents": [ "大家好", "你好" ], "RobotCommentRepositoryId": 1770****81233 }
{ "ResponseMetadata": { "RequestId": "20230604110420****100232280022D31", "Action": "AddRobotComments", "Version": "2023-08-01", "Service": "livesaas", "Region": "cn-north-1", "SystemTime": 1697446406 }, "Result": { "Status": true } }
下表提供了该接口特有的错误码,公共错误码请参见公共错误码和错误码文档。
状态码 | 错误码 | 错误信息 | 说明 |
---|---|---|---|
400 | InvalidParameter.RobotCommentContentsHitSensitiveWords | The RobotCommentContents hits sensitive words. | RobotCommentContents 的参数值包含敏感词。请修改后重试。 |
400 | InvalidParameter.RobotCommentContentsOverLimit | The number of RobotCommentContents exceeds the limit. | 一个机器人评论库内添加的机器人评论超过 2000 条。请删除部分机器人评论后重试。 |