泛微 e-office v11 协同办公系统 OpenAPI

v1.0.1

泛微 e-office 协同办公系统 OpenAPI - 用户管理、部门管理、审批流程、考勤等企业级 API

1· 153·0 current·0 all-time

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for quanruxiaohong/eoffice-api.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "泛微 e-office v11 协同办公系统 OpenAPI" (quanruxiaohong/eoffice-api) from ClawHub.
Skill page: https://clawhub.ai/quanruxiaohong/eoffice-api
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install eoffice-api

ClawHub CLI

Package manager switcher

npx clawhub@latest install eoffice-api
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description, declared env vars (EOFFICE_BASE_URL, EOFFICE_AGENT_ID, EOFFICE_SECRET, EOFFICE_USER), example curl commands and the included get-token.py script all align with a client for e-office OpenAPI. No unrelated cloud credentials, binaries, or config paths are requested.
Instruction Scope
SKILL.md instructs the agent to call scripts/get-token.py to obtain a token and then call the documented OA endpoints. The README and script only perform HTTP requests to the provided EOFFICE_BASE_URL. Two items to note: (1) SKILL.md states the agent "will automatically cache token / refresh when expired" — the repository contains a refresh helper but no persistent cache implementation, so caching is an agent/platform responsibility (possible minor mismatch between claim and provided code); (2) the get-token.py prints the token to stdout, which may expose tokens in logs or agent transcripts if not handled carefully.
Install Mechanism
No install spec is provided (instruction-only skill with a small helper script). The only runtime dependency is Python + requests (not unusual). There are no downloads from arbitrary URLs or archive extraction steps. Risk from install mechanism is low.
Credentials
Required env vars (base URL, agent id, secret, user) are appropriate for the described OpenAPI. The get-token.py script also optionally reads EOFFICE_TOKEN and EOFFICE_REFRESH_TOKEN for refresh flow; those are not listed as required in SKILL.md but are optional and reasonable. All requested variables are OA-specific and proportionate — no unrelated secrets are requested.
Persistence & Privilege
Skill does not request always:true and does not ask to modify other skills or system settings. It claims token caching and automatic refresh, which is normal for API client behavior; persistent storage of tokens would be handled by the agent/runtime, not the skill files themselves.
Assessment
This skill appears to do what it says: it needs your e-office Base URL, Agent ID, Secret, and a user identifier to obtain tokens and call OA APIs. Before installing: (1) verify the skill's source/maintainer — the repository homepage is a placeholder (https://github.com/yourname) and the package owner is unknown; prefer an official or audited source; (2) ensure EOFFICE_BASE_URL points to your trusted OA instance (do not point it at a third-party server you don't control); (3) treat EOFFICE_SECRET as sensitive — use least-privilege application credentials and consider creating an app scoped only to required operations; (4) be aware get-token.py prints tokens to stdout (which could be captured in logs/transcripts) — confirm your agent/platform handles secrets and logs securely; (5) confirm whether your OpenClaw agent runtime provides secure token caching/refresh — SKILL.md claims automatic caching but the repo provides only a helper script, not persistent storage. If any of the above concerns are unacceptable, review or host the code yourself and test the script locally before enabling the skill in production.

Like a lobster shell, security has layers — review code before you run it.

latestvk97d0jst0fbedxagmeyweks4mx83e2et
153downloads
1stars
2versions
Updated 1mo ago
v1.0.1
MIT-0

e-office10 OpenAPI Skill

当用户提到以下场景时使用此 skill:

  • 查询/搜索企业内部用户信息
  • 新建/编辑/删除用户账号
  • 查询部门组织架构
  • 发起或审批工作流程
  • 查询考勤记录
  • 发送内部通知消息
  • 管理客户或合同信息
  • 任何需要操作 OA 系统的任务

认证方式

本 skill 使用自定义 token 流程,与 OAuth2 类似但更简单:

首次使用步骤

  1. 获取 Token(调用 scripts/get-token.py

    python scripts/get-token.py
    

    这会向 OA 系统发送请求,用环境变量中的 EOFFICE_AGENT_IDEOFFICE_SECRETEOFFICE_USER 换取访问 token。

  2. Token 自动管理

    • Agent 会自动缓存 token
    • Token 过期时自动重新获取
    • 无需手动管理

环境配置

安装 skill 后,用户需要提供以下环境变量(在 OpenClaw 配置中设置):

环境变量必填说明示例
EOFFICE_BASE_URLOA 系统部署地址https://oa.example.com/server
EOFFICE_AGENT_ID应用 Agent ID100001
EOFFICE_SECRET应用密钥abc123def456...
EOFFICE_USER用户标识(工号/账号/手机号)admin18612345678

如何获取凭证:

  1. 登录 OA 系统管理后台
  2. 进入「集成中心」→「OpenAPI」
  3. 创建应用,获取 Agent IDSecret
  4. 配置用户识别字段(工号/账号/手机号)
  5. 将用户账号填入 EOFFICE_USER

使用方法

用户管理

查询用户列表

curl -X GET "$EOFFICE_BASE_URL/api/hrm/lists" \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{"page": 1, "limit": 10}'

查询单个用户详情

curl -X GET "$EOFFICE_BASE_URL/api/hrm/detail/{user_id}" \
  -H "Authorization: Bearer {token}"

新建用户

curl -X POST "$EOFFICE_BASE_URL/api/hrm/add" \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{
    "user_accounts": "zhangsan",
    "user_name": "张三",
    "dept_id": 1,
    "role_id": [1, 2],
    "user_status": 1,
    "allow_login": 1,
    "wap_allow": 1,
    "sex": 1
  }'

编辑用户

curl -X POST "$EOFFICE_BASE_URL/api/hrm/edit" \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{
    "user_id": "WV00000001",
    "user_accounts": "zhangsan",
    "user_name": "张三(已修改)",
    "dept_id": 2,
    "role_id": [1],
    "user_status": 1,
    "allow_login": 1,
    "wap_allow": 1,
    "sex": 1
  }'

删除用户

curl -X POST "$EOFFICE_BASE_URL/api/hrm/delete/{user_id}" \
  -H "Authorization: Bearer {token}"

部门管理

获取部门列表(树形)

curl -X GET "$EOFFICE_BASE_URL/api/department/allTree" \
  -H "Authorization: Bearer {token}"

获取部门详情

curl -X GET "$EOFFICE_BASE_URL/api/department/detail/{dept_id}" \
  -H "Authorization: Bearer {token}"

常用查询示例

搜索用户(按姓名模糊搜索)

GET /api/hrm/lists
Body: {"search": {"user_name": ["张", "like"]}}

获取用户在某个部门的用户列表

GET /api/department/users/{dept_id}

获取用户的上级领导

GET /api/hrm/superior/{user_id}

获取用户的下级下属

GET /api/hrm/subordinate/{user_id}

响应格式

所有 API 返回格式统一:

成功:

{
  "status": 1,
  "data": { ... }
}

失败:

{
  "status": 0,
  "errors": [
    {"code": "0x000003", "message": "未知错误"}
  ]
}

错误码

错误码说明
0x000003未知错误
0x500001参数缺失
0x500002应用不存在
0x500003Token 无效或已过期
0x500004语言环境无效
0x500005用户不存在
0x500006用户不在白名单内
0x500007无账号人员不支持生成 Token

注意事项

  1. 敏感操作:删除用户等敏感操作需要管理员权限
  2. 用户状态user_status 字段标识用户是否在职,离职用户通常 user_status 为特定值
  3. 部门 ID:新建用户需要指定 dept_id,可先调用部门列表 API 查询
  4. 角色 IDrole_id 是数组,指定用户的权限角色
  5. Token 有效期:默认 Token 有效期由 OA 系统配置,通常为数小时

完整 API 文档

详见 references/api.md

Comments

Loading comments...