文档

创建互动消息群组

更新时间:

调用CreateLiveMessageGroup创建互动消息群组。

使用说明

  • 调用本接口前,您必须已经调用CreateLiveMessageApp创建互动消息应用。
  • 单个互动消息应用下最多可创建5000个互动消息群组。

QPS限制

本接口的单用户QPS限制为50次/秒。超过限制,API调用会被限流,这可能会影响您的业务,请合理调用。更多信息,请参见QPS限制

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求参数

名称

类型

是否必选

示例值

描述

Action String CreateLiveMessageGroup

系统规定参数。取值:CreateLiveMessageGroup

AppId String demo

应用ID。

GroupId String grouptest

要创建的群组ID,业务应保证群组ID唯一,由大小写字母、数字组成,长度不超过64字节。

GroupName String mytestgroup

群组名,长度不超过128字节。

GroupInfo String testgroupinfo

群组扩展信息,长度不超过32KB。

Administrators Array of String ["uid1","uid2"]

管理员用户ID,由大小写字母、数字组成,长度不超过64字节。多个用半角逗号(,)隔开,最多不超过3个。

CreatorId String uid1

群组创建者ID,由大小写字母、数字组成,长度不超过64字节。

DataCenter String cn-shanghai

数据中心,需要与CreateLiveMessageApp中的数据中心一致, 当前支持上海(取值为cn-shanghai)、新加坡(取值为ap-southeast-1)。

返回数据

名称

类型

示例值

描述

RequestId String A8C7B033-B339-1A58-B0E0-7B9197BA****

请求ID。

GroupId String grouptest

创建的群组ID。

AlreadyExists Boolean true

是否已经存在。

AlreadyDelete Boolean true

是否已删除。如果已存在,且被删除了,那么群组ID是处于不可用状态,建议重新创建。

示例

请求示例

http(s)://live.aliyuncs.com?Action=CreateLiveMessageGroup
&AppId=demo
&GroupId=grouptest
&GroupName=mytestgroup
&GroupInfo=testgroupinfo
&Administrators=["[\"uid1\",\"uid2\"]"]
&CreatorId=uid1
&DataCenter=cn-shanghai
&公共请求参数

正常返回示例

XML格式

HTTP/1.1 200 OK
Content-Type:application/xml

<CreateLiveMessageGroupResponse>
    <RequestId>A8C7B033-B339-1A58-B0E0-7B9197BA****</RequestId>
    <GroupId>grouptest</GroupId>
    <AlreadyExists>true</AlreadyExists>
    <AlreadyDelete>true</AlreadyDelete>
</CreateLiveMessageGroupResponse>

JSON格式

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "A8C7B033-B339-1A58-B0E0-7B9197BA****",
  "GroupId" : "grouptest",
  "AlreadyExists" : true,
  "AlreadyDelete" : true
}

错误码

HttpCode

错误码

错误信息

描述

400 InputInvalid %s. 输入参数不合法
400 ErrorTooManyGroups %s. 每个AppId,最多同时允许创建5000个群组
403 NoAuth %s. 没有权限
404 ResourceNotExist %s. 请求资源不存在,请检查后重新尝试
500 ServerError %s. 未知错误,请稍后重试或提交工单咨询。

访问错误中心查看更多错误码。

  • 本页导读 (1)
文档反馈