feishu-cli-auth

Manage Feishu OAuth 2.0 user access tokens with automatic refresh.

Updated Mar 17, 2026
One-click install
npx skills add https://github.com/Blake-John/agent-config --skill feishu-cli-auth
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: feishu-cli-auth
Source: https://github.com/Blake-John/agent-config/tree/main/.agents/skills/feishu-cli-auth
Command: npx skills add https://github.com/Blake-John/agent-config --skill feishu-cli-auth

SYSTEM DOCUMENTATION & REQUIREMENTS

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.

Frequently Asked Questions about feishu-cli-auth

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I get a Feishu User Access Token for an AI Agent workflow?

To get a Feishu User Access Token, use the two-step non-interactive login flow recommended for AI Agents. Run the CLI login command with desired scopes, then complete the process using the provided callback URL and state.

Where are Feishu OAuth tokens stored and how are they refreshed?

Feishu OAuth tokens are stored locally at ~/.feishu-cli/token.json. The system automatically refreshes the access token using the stored refresh token, validating scopes and handling permission errors during the process.

What Feishu API scopes can I request during CLI OAuth login?

During CLI OAuth login, you can request various Feishu API scopes including offline_access, search:docs:read, drive:drive.search:readonly, calendar:calendar:read, task:task:write, and im:message:readonly to enable specific user identity permissions.

Can I use an App Access Token instead of a User Access Token with this CLI?

Yes, the CLI supports both User Access Token and App Access Token usage. You can specify explicit inputs to choose the token type required for your specific API authentication needs.

Why does my Feishu CLI authentication fail with permission errors?

Feishu CLI authentication permission errors occur when requested scopes are invalid or insufficient. The system provides robust error handling with guidance for common login and permission issues to help you troubleshoot scope configuration.

Does Feishu OAuth CLI support non-interactive login for automated scripts?

Yes, Feishu OAuth CLI supports a two-step non-interactive login flow specifically designed for AI Agents and automated CLI workflows. This allows you to obtain and maintain user access tokens without manual intervention.