文档中心 > API类目 > 瓴羊客服云

alibaba.lyservice.group.group.list (群列表查询)

群列表查询

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
open_group_query_request OpenGroupQueryRequest 必须 入参
  • └ need_tag
  • Boolean
  • 可选
  • false
  • 是否需要标签数据
  • └ owner_staff_id
  • String
  • 可选
  • "3252525"
  • 自己staffId
  • └ end_date
  • Date
  • 可选
  • 2022-08-31 21:50:51
  • 创建日期结束时间
  • └ tag_ids
  • Number []
  • 可选
  • [12,345]
  • 群标签ids集合
  • └ type
  • Number
  • 可选
  • 1
  • 群类型 1 - 内部群, 2 - 外部群
  • └ binding_channel
  • String
  • 可选
  • 124-432feg-3g3
  • 绑定的钉钉渠道
  • └ open_conversation_ids
  • String []
  • 可选
  • ["cid2141"]
  • 群openConversationId
  • └ template_codes
  • String []
  • 可选
  • ["gr3hr3hr3"]
  • 瓴羊群模板id集合
  • └ size
  • Number
  • 可选
  • 10
  • 一页的数量
  • └ admin_ids
  • String []
  • 可选
  • ["234251"]
  • 群管理员staffId集合
  • └ is_owner
  • Boolean
  • 可选
  • false
  • 自己管理的群
  • └ name
  • String
  • 可选
  • 夕时测试
  • 群名称
  • └ tenant_id
  • Number
  • 必须
  • 200110004
  • 租户ID
  • └ page
  • Number
  • 可选
  • 1
  • 页码,1开始
  • └ start_date
  • Date
  • 可选
  • 2022-08-31 21:50:51
  • 创建日期开始时间
  • └ status
  • Number
  • 可选
  • 0
  • 状态 0 - 活跃, 1 - 解散, 2 - 删除
  • └ need_template
  • Boolean
  • 必须
  • true
  • 是否需要模板数据

响应参数

名称 类型 示例值 描述
result ResultDO 结果
  • └ system_time
  • String
  • 2022-09-01 20:59:38
  • 系统时间
  • └ code
  • String
  • 200
  • 结果码
  • data
  • LyGroupDTO []
  • 数据
  • template
  • LyGroupTemplateDTO
  • 模板
  • └ template_name
  • String
  • 测试模板1661095114611
  • 模板名称
  • └ template_code
  • String
  • 92c5ed04b2e54eb8b77fc1ed33d80888
  • 模板code
  • └ robot_code
  • String
  • cco-custom-service-robot-42
  • 机器人code
  • └ gmt_modified
  • Date
  • 1661095114604
  • 更新时间
  • └ role
  • Number
  • 1
  • 当前查询者角色,其他(不在群内或普通成员) - 0,管理员 - 1, 群主 - 2
  • └ chat_id
  • String
  • chatWERGWeGQ
  • 群chatId
  • └ group_avatar
  • String
  • http://www.baidu.com/img/flexible/logo/pc/result@2.png
  • 群头像
  • └ count
  • Number
  • 499
  • 群人数
  • └ gmt_create
  • Date
  • 2022-09-01 20:59:38
  • 创建时间
  • └ type
  • Number
  • 1
  • 群类型 1 - 内部群, 2 - 外部群
  • └ open_conversation_id
  • String
  • openFWEWG=
  • 群开放ID
  • tags
  • LyGroupTagDTO []
  • 群标签
  • └ name
  • String
  • 测试用1661095114604
  • 标签名称
  • └ id
  • Number
  • 145
  • 标签ID
  • └ source_type
  • Number
  • 1
  • 群来源 1 - 创建, 2 - 升级
  • └ tenant_id
  • Number
  • 200110004
  • 租户ID
  • └ name
  • String
  • 夕时测试
  • 群名称
  • └ id
  • Number
  • 166109511604
  • 群ID
  • └ last_modified
  • Number
  • 2414141
  • 最后更新人
  • admins
  • LyGroupAdminDTO []
  • 管理员列表
  • └ is_owner
  • Boolean
  • false
  • 是否群主
  • └ admin_id
  • String
  • 2052613214733057
  • 管理员ID
  • └ name
  • String
  • 夕时1661095114611
  • 管理员名称
  • └ status
  • Number
  • 0
  • 状态 0 - 活跃, 1 - 解散, 2 - 删除
  • └ success
  • Boolean
  • true
  • 是否成功

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaLyserviceGroupGroupListRequest req = new AlibabaLyserviceGroupGroupListRequest();
AlibabaLyserviceGroupGroupListRequest.OpenGroupQueryRequest obj1 = new AlibabaLyserviceGroupGroupListRequest.OpenGroupQueryRequest();
obj1.setNeedTag(false);
obj1.setOwnerStaffId("\"3252525\"");
obj1.setEndDate(StringUtils.parseDateTime("2022-08-31 21:50:51"));
obj1.setTagIds(new Long[] { 12,345 };
);
obj1.setType(1L);
obj1.setBindingChannel("124-432feg-3g3");
obj1.setOpenConversationIds(""cid2141"");
obj1.setTemplateCodes(""gr3hr3hr3"");
obj1.setSize(10L);
obj1.setAdminIds(""234251"");
obj1.setIsOwner(false);
obj1.setName("夕时测试");
obj1.setTenantId(200110004L);
obj1.setPage(1L);
obj1.setStartDate(StringUtils.parseDateTime("2022-08-31 21:50:51"));
obj1.setStatus(0L);
obj1.setNeedTemplate(true);
req.setOpenGroupQueryRequest(obj1);
AlibabaLyserviceGroupGroupListResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_lyservice_group_group_list_response>
    <result>
        <system_time>2022-09-01 20:59:38</system_time>
        <code>200</code>
        <data>
            <ly_group_d_t_o>
                <template>
                    <template_name>测试模板1661095114611</template_name>
                    <template_code>92c5ed04b2e54eb8b77fc1ed33d80888</template_code>
                    <robot_code>cco-custom-service-robot-42</robot_code>
                </template>
                <gmt_modified>1661095114604</gmt_modified>
                <role>1</role>
                <chat_id>chatWERGWeGQ</chat_id>
                <group_avatar>http://www.baidu.com/img/flexible/logo/pc/result@2.png</group_avatar>
                <count>499</count>
                <gmt_create>2022-09-01 20:59:38</gmt_create>
                <type>1</type>
                <open_conversation_id>openFWEWG=</open_conversation_id>
                <tags>
                    <ly_group_tag_d_t_o>
                        <name>测试用1661095114604</name>
                        <id>145</id>
                    </ly_group_tag_d_t_o>
                </tags>
                <source_type>1</source_type>
                <tenant_id>200110004</tenant_id>
                <name>夕时测试</name>
                <id>166109511604</id>
                <last_modified>2414141</last_modified>
                <admins>
                    <ly_group_admin_d_t_o>
                        <is_owner>false</is_owner>
                        <admin_id>2052613214733057</admin_id>
                        <name>夕时1661095114611</name>
                    </ly_group_admin_d_t_o>
                </admins>
                <status>0</status>
            </ly_group_d_t_o>
        </data>
        <success>true</success>
    </result>
</alibaba_lyservice_group_group_list_response>

异常示例

  • XML示例
  • JSON示例
<error_response>
    <code>50</code>
    <msg>Remote service error</msg>
    <sub_code>isv.invalid-parameter</sub_code>
    <sub_msg>非法参数</sub_msg>
</error_response>

错误码解释

错误码 错误描述 解决方案

API工具

如何获得此API

FAQ

返回
顶部