Manage tasks through the Task API.
Base URL: https://open.feishu.cn/open-apis/task/v2
Authentication and Token Acquisition
From the feishu_skills root directory, execute the shared script:
TOKEN="$(./scripts/get_feishu_token.sh)"
Request headers uniformly use Authorization: Bearer ${TOKEN}。
If the business API returns token invalid, expired, or 401, force a refresh and then retry the original request only once:
TOKEN="$(./scripts/get_feishu_token.sh --force-refresh)"
Environment Variables:
FEISHU_APP_IDFEISHU_APP_SECRET
Local Cache: ./.feishu_token_cache.json(reuse directly if not expired, refresh 5 minutes early by default)
Task Operations
| API | Endpoint | Description |
|---|---|---|
| Create Task | POST /tasks |
- |
| Get Task | GET /tasks/{task_guid} |
- |
| Update Task | PATCH /tasks/{task_guid} |
- |
| Complete Task | POST /tasks/{task_guid}/complete |
- |
| Delete Task | DELETE /tasks/{task_guid} |
- |
Create Task:
{
"summary": "任务标题",
"description": "任务描述",
"due": {"timestamp": "1770508800"},
"members": [{"id": "ou_xxx", "role": "assignee"}]
}
Best Practices
- due uses a second-level timestamp
- members specifies roles(assignee/follower)