Skip to content

fix: Feishu send to user open_id fails with [230001] invalid receive_id - #10502

Closed
nightq wants to merge 1 commit into
NousResearch:mainfrom
nightq:fix/issue-9980-feishu-receive-id-v2
Closed

fix: Feishu send to user open_id fails with [230001] invalid receive_id#10502
nightq wants to merge 1 commit into
NousResearch:mainfrom
nightq:fix/issue-9980-feishu-receive-id-v2

Conversation

@nightq

@nightq nightq commented Apr 15, 2026

Copy link
Copy Markdown

Summary

When sending messages to Feishu users using open_id format, the API returns [230001] invalid receive_id.

Root Cause

_send_raw_message always used receive_id_type='chat_id', but Feishu API requires different types based on ID format.

Fix

Add _detect_receive_id_type() helper that checks ID prefix and use it dynamically.

Test Plan

  • Messages to user open_ids (ou_*) now use receive_id_type='open_id'
  • Messages to group chat_ids (oc_*) continue to use 'chat_id'

Closes #9980

Fixes NousResearch#9980

Root cause: _send_raw_message always used receive_id_type='chat_id'
when creating messages, but Feishu API requires different types:
- oc_* -> chat_id (group chat)
- ou_* -> open_id (user)
- on_* -> union_id (user with union_id)

Fix: Add _detect_receive_id_type() helper that checks ID prefix and
use it dynamically in _send_raw_message().

## Test Plan
- [x] Messages to user open_ids (ou_*) now use receive_id_type='open_id'
- [x] Messages to group chat_ids (oc_*) continue to use 'chat_id'

Closes NousResearch#9980
@nightq

nightq commented Apr 17, 2026

Copy link
Copy Markdown
Author

Closing stale PR from previous run. Will recreate if the fix is still needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feishu: send to user open_id fails with [230001] invalid receive_id

1 participant