Loading...
Loading...
飞书云文档权限管理。支持添加/删除/查看协作者、公开权限管理、分享密码、批量添加、 权限检查、转移所有权。当用户请求"添加权限"、"权限管理"、"共享文档"、"授权"、 "协作者"、"full_access"、"转移所有权"时使用。
npx skill4agent add riba2534/feishu-cli feishu-cli-permfeishu-cli perm add <TOKEN> \
--doc-type <DOC_TYPE> \
--member-type <MEMBER_TYPE> \
--member-id <MEMBER_ID> \
--perm <PERM> \
[--notification]feishu-cli perm update <TOKEN> \
--doc-type <DOC_TYPE> \
--member-type <MEMBER_TYPE> \
--member-id <MEMBER_ID> \
--perm <PERM>feishu-cli perm list <TOKEN> --doc-type <DOC_TYPE>feishu-cli perm delete <TOKEN> \
--doc-type <DOC_TYPE> \
--member-type <MEMBER_TYPE> \
--member-id <MEMBER_ID>feishu-cli perm public-get <TOKEN>feishu-cli perm public-update <TOKEN> \
[--external-access] \
[--link-share-entity <anyone_readable|anyone_editable|...>]# 创建分享密码
feishu-cli perm password create <TOKEN>
# 删除分享密码
feishu-cli perm password delete <TOKEN>
# 更新分享密码
feishu-cli perm password update <TOKEN>feishu-cli perm batch-add <TOKEN> \
--members-file <members.json> \
[--notification]feishu-cli perm auth <TOKEN> --action <view|edit|...>feishu-cli perm transfer-owner <TOKEN> \
--member-type <MEMBER_TYPE> \
--member-id <MEMBER_ID>| 值 | 说明 |
|---|---|
| docx | 新版文档 |
| doc | 旧版文档 |
| sheet | 电子表格 |
| bitable | 多维表格 |
| wiki | 知识库 |
| file | 文件 |
| folder | 文件夹 |
| mindnote | 思维笔记 |
| minutes | 妙记 |
| slides | 幻灯片 |
| 值 | 说明 | 示例 |
|---|---|---|
| 邮箱 | user@example.com | |
| openid | Open ID | ou_xxx |
| unionid | Union ID | on_xxx |
| userid | User ID | 123456 |
| openchat | 群聊 ID | oc_xxx |
| opendepartmentid | 部门 ID | od_xxx |
| groupid | 群组 ID | gc_xxx |
| wikispaceid | 知识空间 ID | ws_xxx |
| 值 | 说明 |
|---|---|
| view | 查看权限 |
| edit | 编辑权限 |
| full_access | 完全访问权限(可管理) |
--notificationfeishu-cli perm add docx_xxxxxx \
--doc-type docx \
--member-type email \
--member-id user@example.com \
--perm edit \
--notificationfeishu-cli perm add docx_xxxxxx \
--doc-type docx \
--member-type openid \
--member-id ou_xxxxxx \
--perm viewfeishu-cli perm add sht_xxxxxx \
--doc-type sheet \
--member-type openchat \
--member-id oc_xxxxxx \
--perm editfeishu-cli perm add sht_xxxxxx \
--doc-type sheet \
--member-type opendepartmentid \
--member-id od_xxxxxx \
--perm viewfeishu-cli perm update docx_xxxxxx \
--doc-type docx \
--member-type email \
--member-id user@example.com \
--perm full_accessfeishu-cli perm list docx_xxxxxx --doc-type docxfeishu-cli perm delete docx_xxxxxx \
--doc-type docx \
--member-type email \
--member-id user@example.comfeishu-cli perm public-get docx_xxxxxxfeishu-cli perm public-update docx_xxxxxx \
--external-access \
--link-share-entity anyone_readablefeishu-cli perm password create docx_xxxxxxfeishu-cli perm password delete docx_xxxxxxfeishu-cli perm batch-add docx_xxxxxx \
--members-file members.json \
--notification[
{"member_type": "email", "member_id": "user1@example.com", "perm": "edit"},
{"member_type": "email", "member_id": "user2@example.com", "perm": "view"}
]feishu-cli perm auth docx_xxxxxx --action viewfeishu-cli perm transfer-owner docx_xxxxxx \
--member-type email \
--member-id user@example.com--notification| 前缀 | doc-type |
|---|---|
| docx_ | docx |
| doccn | doc |
| sht_ | sheet |
| bascn | bitable |
| wikicn | wiki |
| fldcn | folder |
# 创建文档后,给指定用户添加完全访问权限
feishu-cli perm add <doc_token> \
--doc-type docx \
--member-type email \
--member-id user@example.com \
--perm full_access \
--notification