# [废弃]获取指定机器人的客户列表

【提示】建议使用GetRobotAccountListV2

请求方式:POST

请求地址:https://$basehost/gateway/qopen/GetRobotAccountByIds

body参数

account_id_list, external_user_id_list 不能都会空; 两个参数的传入值都会进行查询

{
  robot_id: "机器人id",
  account_id_list: ["accFNDxF42fxCwwWVhBOD", "acc7U5VYOmTUu0Dy2wEi"],
  external_user_id_list: ["wmg2gXCwVAg", "wmg2gXCwAAUvfwsrig"],
  need_tag_info: false,
}
字段 类型 必填 说明
robot_id string 机器人id
account_id_list array 客户id列表,最大长度为100
external_user_id_list array 企微external_user_id列表,最大长度为100
need_tag_info bool 是否需要客户标签信息

返回值:

{
  data: {
    account_list: [
      {
        account_id: "客户id",
        account_type: 2,
        deleted_by_contact: false,
        deleted_by_staff: false,
        profile: {
          name: "姓名",
          gender: 0,
          avatar: "头像url",
          alias: "备注",
          phone: 1399998888,
          add_way: 2,
          add_at: 1624873867,
          union_id: "企微union_id",
          external_user_id: "企微external_user_id",
          state_code: "企微添加来源state",
          channel_name: "企微添加渠道",
          desc: "客户描述",
        },
        user_attr_sys_field_list: [
          {
            field_name: "备注",
            field_value: "",
          },
          {
            field_name: "生日1",
            field_value: "2022-05-12",
          },
        ],
        user_attr_field_list: [
          {
            field_name: "user_attr_field1",
            field_value: "user_attr_value1",
          },
          {
            field_name: "user_attr_field2",
            field_value: "user_attr_value2",
          },
        ],
        tag_info_list: [
          {
            parent_tag_name: "标签组名称",
            tag_name: "标签名称",
          },
        ],
      },
    ],
  },
  errcode: 0,
  errmsg: "",
  hint: "",
}

返回说明

字段 类型 说明
data json json返回值
   account_list array 获取到的客户列表
errcode int 状态码,0为正常,非0代表错误
errmsg string 错误信息
hint string 请求日志ID

account_list说明

字段 类型 说明
account_id string 客户id
account_type int 客户类型:0:客户类型未知,1=员工,2=微信外部联系人,3=企业微信外部联系人
deleted_by_contact bool 是否被客户删除
deleted_by_staff bool 是否主动删除客户
profile object 详细信息
user_attr_sys_field_list array 用户系统属性字段列表
user_attr_field_list array 用户自定义属性字段列表
tag_info_list array 获取到的客户标签列表

profile说明

字段 类型 说明
name string 姓名
gender int 性别 0为未知,1为男,2为女
avatar string 头像url
alias string 别名
phone string 电话号码
add_at int 添加时间
add_way string 添加方式
union_id string 企微union_id
external_user_id string 企微external_user_id
state_code string 企微添加来源state
channel_name string 企微添加渠道
desc string 客户描述

tag_info_list说明

字段 类型 说明
parent_tag_name string 标签组名称
tag_name string 标签名称

add_way枚举说明

说明
0 未知来源
1 扫描二维码
2 搜索手机号
3 名片分享
4 群聊
5 手机通讯录
6 微信联系人
7 来自微信的添加好友申请
8 安装第三方应用时自动添加的客服人员
9 搜索邮箱
10 视频号添加
11 通过日程参与人添加
12 通过会议参与人添加
13 添加微信好友对应的企业微信
14 通过智慧硬件专属客服添加
15 通过上门服务客服添加
16 通过获客链接添加
17 通过定制开发添加
18 通过需求回复添加
21 通过第三方售前客服添加
22 通过可能的商务伙伴添加
24 通过接受微信账号收到的好友申请添加
201 内部成员共享
202 管理员/负责人分配

完整请求示例:

curl -X POST \
  https://$basehost/gateway/qopen/GetRobotAccountList \
  -H 'Content-Type: application/json; charset=UTF-8' \
  -H 'Token: c2NdxDHKXIJ5j1zrhJeq2eJEHjh9xxx' \
  -d '{
    "robot_id": "机器人id",
    "account_id_list": ["accFNDxF42fxCwwWVWUhBOD", "acc7UirX5VYOmTUu0Dy2wEi"],
    "need_tag_info": false
}'
最后更新时间: 2026/3/31 11:11:10