跳转到主要内容

联系人管理

企微联系人相关命令

联系人管理命令用于同步、查询、更新企业微信联系人信息。

SKILL 名称说明
juhecli-contact企微联系人管理 - 增量同步、批量查询、搜索、更新、删除、黑名单、同意申请

同步联系人

语法

bash
juhe-cli contact sync '{"guid": "xxx", "seq": "", "limit": 10}'

参数

参数类型必填说明
guidstring设备唯一标识
seqstring同步序列号,首次传空字符串
limitnumber每次同步数量,默认 10

示例

bash
juhe-cli contact sync '{"guid": "your-guid", "seq": "", "limit": 10}'

批量获取联系人信息

语法

bash
juhe-cli contact batch_get_info '{"guid": "xxx", "user_list": ["id1"]}'

参数

参数类型必填说明
guidstring设备唯一标识
user_liststring[]用户ID列表

示例

bash
juhe-cli contact batch_get_info '{"guid": "your-guid", "user_list": ["user1", "user2"]}'

批量获取企业联系人

语法

bash
juhe-cli contact batch_get_corp '{"guid": "xxx", "corp_list": ["corp1"]}'

参数

参数类型必填说明
guidstring设备唯一标识
corp_liststring[]企业ID列表

示例

bash
juhe-cli contact batch_get_corp '{"guid": "your-guid", "corp_list": ["corp1"]}'

搜索联系人

语法

bash
juhe-cli contact search '{"guid": "xxx", "keyword": "13800138000", "type": 1}'

参数

参数类型必填说明
guidstring设备唯一标识
keywordstring搜索关键词(手机号、微信号等)
typenumber搜索类型

示例

bash
juhe-cli contact search '{"guid": "your-guid", "keyword": "13800138000", "type": 1}'

更新备注

语法

bash
juhe-cli contact update '{"guid": "xxx", "user_id": "xxx", "remark": "备注名"}'

参数

参数类型必填说明
guidstring设备唯一标识
user_idstring用户ID
remarkstring备注名称

示例

bash
juhe-cli contact update '{"guid": "your-guid", "user_id": "user123", "remark": "张三"}'

同意好友申请

语法

bash
juhe-cli contact agree '{"guid": "xxx", "user_id": "xxx", "corp_id": "0"}'

参数

参数类型必填说明
guidstring设备唯一标识
user_idstring用户ID
corp_idstring企业ID,默认 "0"

示例

bash
juhe-cli contact agree '{"guid": "your-guid", "user_id": "user123", "corp_id": "0"}'

删除联系人

语法

bash
juhe-cli contact delete '{"guid": "xxx", "user_id": "xxx", "corp_id": "0"}'

参数

参数类型必填说明
guidstring设备唯一标识
user_idstring用户ID
corp_idstring企业ID,默认 "0"

示例

bash
juhe-cli contact delete '{"guid": "your-guid", "user_id": "user123", "corp_id": "0"}'

同步申请列表

语法

bash
juhe-cli contact sync_apply '{"guid": "xxx"}'

参数

参数类型必填说明
guidstring设备唯一标识

示例

bash
juhe-cli contact sync_apply '{"guid": "your-guid"}'