feishu-user
Feishu document operations (User Access Token version). Use user access token for authentication. When you need to read, create, write, or append Feishu documents.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/hacksing/feishu-userFeishishu document operations using useru User
Fe access token authentication. Call Feishu Open API directly via REST API.
Install Dependencies
pip install requests
Quick Start
from feishu_client import FeishuClient
# Initialize client
client = FeishuClient(user_access_token="u-xxx")
Get User Access Token
Step 1: Get App Credentials from Feishu Open Platform
Prepare the following:
- APP_ID - App ID (from Feishu Open Platform app settings)
- APP_SECRET - App Secret (from Feishu Open Platform app settings)
- REDIRECT_URI - Authorization callback URL
Enable these permissions:
docx:document- Document operationsdrive:drive.search:readonly- Cloud drive searchsearch:docs:read- Document search
Step 2: Generate Authorization URL
https://accounts.feishu.cn/open-apis/authen/v1/authorize?client_id={YOUR_APP_ID}&response_type=code&redirect_uri={YOUR_REDIRECT_URI}&scope=docx%3Adocument%20drive%3Adrive.search%3Areadonly%20search%3Adocs%3Aread
Step 3: Exchange for Token
curl -X POST "https://open.feishu.cn/open-apis/authen/v1/access_token" \
-H "Content-Type: application/json" \
-d '{
"grant_type": "authorization_code",
"code": "{YOUR_CODE}",
"app_id": "{YOUR_APP_ID}",
"app_secret": "{YOUR_APP_SECRET}"
}'
The returned access_token is your user_access_token.
Usage Examples
from feishu_client import FeishuClient
# Initialize
client = FeishuClient(user_access_token="u-xxx")
# Read document
content = client.read_doc("doc_token")
print(content)
# Create document
new_token = client.create_doc("My New Document")
print(f"New document: {new_token}")
# Write document
client.write_doc("doc_token", "# Title\n\nContent")
# Append content
client.append_doc("doc_token", "## New Section\n\nMore content")
# List all blocks
blocks = client.list_blocks("doc_token")
for block in blocks:
print(block)
# Get specific block
block = client.get_block("doc_token", "block_id")
# Update block
client.update_block("doc_token", "block_id", "New content")
# Delete block
client.delete_block("doc_token", "block_id")
Convenience Functions
Don't want to create a client? Use functions directly:
from feishu_client import read_document, create_document, write_document, append_document
# Read
content = read_document("doc_token", user_access_token="u-xxx")
# Create
new_token = create_document("Title", user_access_token="u-xxx")
# Write
write_document("doc_token", "# Content", user_access_token="u-xxx")
# Append
append_document("doc_token", "## More", user_access_token="u-xxx")
API Reference
FeishuClient
| Method | Description |
|---|---|
read_doc(doc_token) | Read document content |
create_doc(title, folder_token) | Create new document |
| `w... |
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-hacksing-feishu-user": {
"enabled": true,
"auto_update": true
}
}
}Related Skills
safe-update
Update OpenClaw from source code. Supports custom project path and branch. Includes pulling latest branch, rebasing, building and installing, restarting service. Triggered when user asks to update OpenClaw, sync source, rebase branch, or rebuild.
social-writer
Social media copywriting and distillation skill. Transforms any news, dev logs, or external articles into high-engagement, opinionated tech posts with authentic voice.
social-reader
Social media content scraping and automation skill. Supports real-time single post reading, as well as scheduled batch patrol, LLM distillation, and review notifications.
safe-backup
Backup OpenClaw state directory and workspace. Includes excluding sensitive files, packaging for backup. Triggered when user asks to backup, export, or save state.
allstock-data
Stock market data query skill for China A-shares, Hong Kong, and US markets. Uses Tencent Finance HTTP API by default (lightweight, no install needed), with optional adata SDK for more comprehensive data. Supports real-time quotes, K-line history, order book analysis, and more.