openclaw - 💡(How to fix) Fix [Feature]: 飞书文档权限问题:docx:document:write_only 不兼容 [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#49484Fetched 2026-04-08 00:54:49
View on GitHub
Comments
0
Participants
1
Timeline
2
Reactions
0
Author
Participants
Timeline (top)
cross-referenced ×1labeled ×1

飞书文档权限问题:docx:document:write_only 不兼容

Root Cause

飞书文档权限问题:docx:document:write_only 不兼容

RAW_BUFFERClick to expand / collapse

Summary

飞书文档权限问题:docx:document:write_only 不兼容

Problem to solve

Issue 内容:

问题描述

飞书开放平台现已将文档编辑权限从 docx:document:write 变更为 docx:document:write_only。 当前 OpenClaw 飞书文档插件(feishu-doc)只支持 docx:document:write 权限,导致用户即使添加了 docx:document:write_only 权限,也无法通过插件写入/编辑飞书文档。

复现步骤

  1. 在飞书开放平台为应用添加 docx:document:write_only 权限
  2. 使用 OpenClaw feishu_doc 工具尝试创建并写入文档
  3. 创建成功,但写入时报错:Request failed with status code 400

期望行为

支持飞书新权限 docx:document:write_only,允许用户编辑云文档。

环境信息

  • OpenClaw 版本:最新
  • 飞书权限:docx:document:write_only (tenant)

代码位置

飞书文档插件:/opt/openclaw/extensions/feishu/src/docx.ts

Proposed solution

支持飞书新权限 docx:document:write_only,允许用户编辑云文档。

Alternatives considered

No response

Impact

na

Evidence/examples

No response

Additional information

No response

extent analysis

Fix Plan

To support the new docx:document:write_only permission, we need to update the OpenClaw feishu-doc plugin. Here are the steps:

  • Update the docx.ts file to handle the new permission:
// /opt/openclaw/extensions/feishu/src/docx.ts
import { Permission } from '@openclaw/common';

// ...

const supportedPermissions = [
  'docx:document:write',
  'docx:document:write_only', // Add the new permission
];

// ...

if (supportedPermissions.includes(permission)) {
  // Allow writing to the document
  return true;
} else {
  // Handle insufficient permissions
  return false;
}
  • Update the plugin to use the new permission when creating and writing to documents:
// /opt/openclaw/extensions/feishu/src/docx.ts
import { createDocument, writeDocument } from '@feishu/openapi';

// ...

const createDoc = async () => {
  const permission = 'docx:document:write_only';
  const doc = await createDocument(permission);
  // ...
};

const writeDoc = async () => {
  const permission = 'docx:document:write_only';
  const result = await writeDocument(permission, docId, content);
  // ...
};

Verification

To verify that the fix worked, follow these steps:

  • Add the docx:document:write_only permission to the OpenClaw application in the Feishu open platform.
  • Use the OpenClaw feishu-doc tool to create and write to a document.
  • Verify that the document is created and written successfully without any errors.

Extra Tips

  • Make sure to update the plugin to handle any potential errors that may occur when using the new permission.
  • Test the plugin thoroughly to ensure that it works as expected with the new permission.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Feature]: 飞书文档权限问题:docx:document:write_only 不兼容 [1 participants]