openclaw - ✅(Solved) Fix [Bug]: Feishu reactions API 返回 reaction type is invalid (code: 231001) [1 pull requests, 1 comments, 2 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#66406Fetched 2026-04-15 06:26:13
View on GitHub
Comments
1
Participants
2
Timeline
7
Reactions
0
Timeline (top)
labeled ×2commented ×1cross-referenced ×1mentioned ×1

在飞书频道启用 capabilities: ["reactions"] 后,调用飞书 reactions API 时所有 emoji 都返回 400 错误: code: 231001, msg: 'reaction type is invalid.'

Root Cause

在飞书频道启用 capabilities: ["reactions"] 后,调用飞书 reactions API 时所有 emoji 都返回 400 错误: code: 231001, msg: 'reaction type is invalid.'

Fix Action

Fixed

PR fix notes

PR #66478: fix(feishu): normalize unicode emojis to Feishu emoji type strings for reactions API (#66406)

Description (problem / solution / changelog)

Summary

Feishu reactions API returns error 231001 ("reaction type is invalid") because the agent sends raw unicode emojis (e.g. thumbs-up) but the API requires uppercase type strings like THUMBSUP.

Root Cause

In channel.ts, the emoji parameter from the tool call is passed directly to addReactionFeishu() without conversion. The Feishu API only accepts its own emoji type vocabulary (e.g. THUMBSUP, HEART, FIRE), not unicode characters.

Changes

  • extensions/feishu/src/reactions.ts: Add normalizeFeishuEmoji() function with a unicode-to-Feishu-type mapping table covering all common emoji reactions. Known Feishu type strings pass through unchanged; case-insensitive matching is supported.
  • extensions/feishu/src/channel.ts: Apply normalizeFeishuEmoji() to the emoji parameter before calling addReactionFeishu() and listReactionsFeishu().
  • extensions/feishu/src/reactions.test.ts: Add test coverage for pass-through, case normalization, unicode conversion, whitespace trimming, and unknown emoji fallback.

Test

pnpm test extensions/feishu/src/reactions.test.ts
# 5 passed (5)

Closes #66406

Changed files

  • extensions/feishu/src/channel.ts (modified, +3/-1)
  • extensions/feishu/src/reactions.test.ts (added, +39/-0)
  • extensions/feishu/src/reactions.ts (modified, +63/-0)
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

在飞书频道启用 capabilities: ["reactions"] 后,调用飞书 reactions API 时所有 emoji 都返回 400 错误: code: 231001, msg: 'reaction type is invalid.'

Steps to reproduce

在 channels.feishu.accounts.<account>.capabilities 中添加 ["reactions"] 使用 message(action="react", emoji="👍", messageId="<有效消息ID>") 调用 返回 400 错误 环境信息: OpenClaw 版本:2026.4.11 飞书连接模式:websocket Node 版本:v22.22.2 操作系统:Windows_NT 日志信息: log_id: 202604141526360DDB2EA3F7D0DDAC635D code: 231001, msg: 'reaction type is invalid.'

飞书应用权限: 已确认拥有以下权限: im:message.reactions:write_only im:message.reactions:read

Expected behavior

飞书应用权限: 已确认拥有以下权限: im:message.reactions:write_only im:message.reactions:read

Actual behavior

⚠️ ✉️ Message: message om_x100b52ea908444a4c2b9d5df6e93bf6, emoji 👀 failed

OpenClaw version

2026.4.11

Operating system

Windows_NT 11

Install method

No response

Model

minimax

Provider / routing chain

none

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

extent analysis

TL;DR

The issue can be resolved by verifying the reaction type and ensuring it is valid according to the Feishu API documentation.

Guidance

  • Check the Feishu API documentation to ensure the reaction type "👍" is valid and supported.
  • Verify that the messageId used in the message(action="react", emoji="👍", messageId="<有效消息ID>") call is correct and the message exists.
  • Confirm that the permissions im:message.reactions:write_only and im:message.reactions:read are correctly configured and granted to the Feishu application.
  • Review the log information and error message to see if there are any additional details or clues about the cause of the error.

Example

No code snippet is provided as the issue does not contain sufficient information to create a relevant example.

Notes

The issue may be related to a change in the Feishu API or a misconfiguration of the reaction type. Further investigation and verification of the API documentation and application permissions are necessary to resolve the issue.

Recommendation

Apply workaround: Verify the reaction type and permissions to ensure they are correct and valid, as the issue may be related to a misconfiguration or unsupported reaction type.

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…

FAQ

Expected behavior

飞书应用权限: 已确认拥有以下权限: im:message.reactions:write_only im:message.reactions:read

Still need to ship something?

×6

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

Back to top recommendations

TRENDING