feishu-perm

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Feishu Permission Tool

飞书权限管理工具

Single tool
feishu_perm
for managing file/document permissions.
单个工具
feishu_perm
用于管理文件/文档权限。

Actions

操作

List Collaborators

列出协作者

json
{ "action": "list", "token": "ABC123", "type": "docx" }
Returns: members with member_type, member_id, perm, name.
json
{ "action": "list", "token": "ABC123", "type": "docx" }
返回结果:包含member_type、member_id、perm、name的成员信息。

Add Collaborator

添加协作者

json
{ "action": "add", "token": "ABC123", "type": "docx", "member_type": "email", "member_id": "user@example.com", "perm": "edit" }
json
{ "action": "add", "token": "ABC123", "type": "docx", "member_type": "email", "member_id": "user@example.com", "perm": "edit" }

Remove Collaborator

移除协作者

json
{ "action": "remove", "token": "ABC123", "type": "docx", "member_type": "email", "member_id": "user@example.com" }
json
{ "action": "remove", "token": "ABC123", "type": "docx", "member_type": "email", "member_id": "user@example.com" }

Token Types

Token类型

TypeDescription
doc
Old format document
docx
New format document
sheet
Spreadsheet
bitable
Multi-dimensional table
folder
Folder
file
Uploaded file
wiki
Wiki node
mindnote
Mind map
类型描述
doc
旧格式文档
docx
新格式文档
sheet
电子表格
bitable
多维表格
folder
文件夹
file
上传文件
wiki
Wiki节点
mindnote
思维导图

Member Types

成员类型

TypeDescription
email
Email address
openid
User open_id
userid
User user_id
unionid
User union_id
openchat
Group chat open_id
opendepartmentid
Department open_id
类型描述
email
电子邮箱
openid
用户open_id
userid
用户user_id
unionid
用户union_id
openchat
群组open_id
opendepartmentid
部门open_id

Permission Levels

权限等级

PermDescription
view
View only
edit
Can edit
full_access
Full access (can manage permissions)
权限描述
view
仅查看
edit
可编辑
full_access
完全权限(可管理权限)

Examples

示例

Share document with email:
json
{ "action": "add", "token": "doxcnXXX", "type": "docx", "member_type": "email", "member_id": "alice@company.com", "perm": "edit" }
Share folder with group:
json
{ "action": "add", "token": "fldcnXXX", "type": "folder", "member_type": "openchat", "member_id": "oc_xxx", "perm": "view" }
通过邮箱分享文档:
json
{ "action": "add", "token": "doxcnXXX", "type": "docx", "member_type": "email", "member_id": "alice@company.com", "perm": "edit" }
通过群组分享文件夹:
json
{ "action": "add", "token": "fldcnXXX", "type": "folder", "member_type": "openchat", "member_id": "oc_xxx", "perm": "view" }

Configuration

配置

yaml
channels:
  feishu:
    tools:
      perm: true  # default: false (disabled)
Note: This tool is disabled by default because permission management is a sensitive operation. Enable explicitly if needed.
yaml
channels:
  feishu:
    tools:
      perm: true  # default: false (disabled)
注意: 由于权限管理属于敏感操作,此工具默认处于禁用状态。如需使用请手动启用。

Permissions

所需权限

Required:
drive:permission
必填:
drive:permission