Qeasy Cloud
Get Started
GEThttps://open.feishu.cn/open-apis/contact/v3/userstenant_access_token(Bearer)

List Department Users (contact/v3/users)

按部门分页获取飞书用户基础信息(user_id、姓名、邮箱、部门),用于组织与人员主数据同步,支撑审批-ERP 人员映射。

## Overview contact/v3/users lists users of a department page by page — the standard Feishu endpoint for organization master-data integration. A common pattern treats the Feishu org structure as authoritative and syncs people data into ERP salesperson files, BI permission tables and approval-to-document ownership mappings, keeping identities consistent across systems. ### Request essentials 1. GET with Authorization: Bearer {tenant_access_token}. 2. Query parameters: department_id (required; root is 0), department_id_type (open_department_id or department_id), user_id_type (open_id/union_id/user_id), page_size (up to 50) and page_token. 3. data.items carries open_id, union_id, name, en_name, email, mobile, department_ids and status; has_more/page_token drive pagination. 4. The app needs scopes such as contact:user.base:readonly published in a version; mobile/email require higher-level scopes and silently return empty without them. ### Master-data advice - Prefer union_id as the cross-app join key; open_id is only stable within one app. - status.is_frozen marks resigned/frozen users — deactivate rather than delete on the master-data side to preserve historical document ownership. - Map to ERP employee codes via employee_no rather than names to avoid collisions. ### Practical notes Department ids come from the departments API — open_department_id values are stable across apps while department_id is the legacy form; pass the matching department_id_type or the call fails. Large departments page at fifty users per call, so schedule full syncs off-peak and prefer contact-change event subscriptions for day-to-day incremental updates where the tenant allows them.

Code examples

curl
curl "https://open.feishu.cn/open-apis/contact/v3/users?department_id=0&page_size=50&user_id_type=union_id" \
  -H "Authorization: Bearer t-xxxx"

Error codes

CodeMessageMeaning
99991663token invalidtoken 过期,刷新后重试
99991401forbidden缺少通讯录 scope 或部门不在应用可见范围
99991672reach rate limit触发频控,降速重试