Forward a Feishu thread (话题) to a user, group, or another topic using the Feishu Open API.
message tool cannot do thread-level forwardingPOST https://open.feishu.cn/open-apis/im/v1/threads/{thread_id}/forward?receive_id_type={type}
| Param | Location | Required | Description |
|---|---|---|---|
| ------- | ---------- | ---------- | ------------- |
thread_id | path | yes | Thread ID to forward (format: omt_xxxxx) |
receive_id_type | query | yes | Target ID type: open_id, chat_id, user_id, union_id, email, thread_id |
receive_id | body | yes | Target ID matching the receive_id_type |
uuid | query | no | Idempotency key (max 50 chars, dedup within 1 hour) |
Authorization: Bearer {tenant_access_token}
Content-Type: application/json
thread_idA message in a topic group has a thread_id field. Retrieve it via:
GET https://open.feishu.cn/open-apis/im/v1/messages/{message_id}
The response data.items[0].thread_id contains the thread ID (e.g., omt_1accc5a75c0f9b93).
Use scripts/forward_thread.py for the complete implementation.
python3 skills/feishu-thread-forward/scripts/forward_thread.py \
--thread-id omt_xxxxx \
--receive-id oc_xxxxx \
--receive-id-type chat_id
thread_id — from the message's metadata, or by calling GET message APIPOST /im/v1/threads/{thread_id}/forwardmerge_forward type message appears in the target chat as a clickable topic card| Method | API | Result |
|---|---|---|
| -------- | ----- | -------- |
| Thread forward (this skill) | POST /threads/{thread_id}/forward | Topic card (clickable, shows thread context) ✅ |
| Merge forward | POST /messages/merge_forward | "群聊会话记录" bundle (expandable message list) |
| Message forward | POST /messages/{message_id}/forward | Single message copied to target (loses thread context) |
Thread forward is what users see when they click "转发话题" in Feishu client.
im:message or im:message:send_as_bot permissionRead from /root/.openclaw/openclaw.json → channels.feishu.appId / channels.feishu.appSecret to obtain tenant_access_token.
| Code | Meaning |
|---|---|
| ------ | --------- |
| 230002 | Bot not in target group |
| 230013 | Target user not in bot's availability scope |
| 230064 | Invalid thread_id |
| 230066 | Thread is in a secret group (no forwarding) |
| 230070 | Thread's group has anti-leak mode enabled |
| 230073 | Thread invisible to bot (joined after thread creation + history hidden) |
共 1 个版本