What problem does it solve?
Feishu OAuth authentication and User Access Token management for AI Agents and CLI workflows. It covers a two-step non-interactive login, token state checks, scope configuration, automatic refreshing, and token-related troubleshooting when users request login, get tokens, or encounter permission errors.
Core Features & Use Cases
- Two-step non-interactive login recommended for AI Agents
- Token storage at ~/.feishu-cli/token.json with access, refresh tokens, expiry, and scope
- Automatic token refresh using refresh token and scope validation
- Token status checks and error guidance for common permission issues
- Supports both User Access Token and App Access Token usage with explicit inputs
Quick Start
Start by running feishu-cli auth login --print-url --scopes "offline_access search:docs:read search:message drive:drive.search:readonly wiki:wiki:readonly calendar:calendar:read calendar:calendar.event:read calendar:calendar.event:create calendar:calendar.event:update calendar:calendar.event:reply calendar:calendar.free_busy:read task:task:read task:task:write task:tasklist:read task:tasklist:write im:message:readonly im:message.group_msg:get_as_user im:chat:read contact:user.base:readonly drive:drive.metadata:readonly" and then complete the flow with feishu-cli auth callback using the provided callback URL and state.