hermes - 💡(How to fix) Fix [Feature Request] Add Feishu User OAuth support for enhanced message access [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
NousResearch/hermes-agent#11540Fetched 2026-04-18 06:00:23
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Author
Participants
RAW_BUFFERClick to expand / collapse

🚀 Feature Description

Problem

Hermes-Feishu integration currently uses only Bot Token authentication (tenant_access_token), which is limited to reading messages sent directly to the Hermes bot itself. This prevents users from:

  • Viewing and learning from other bot sessions in shared chats
  • Searching across their full Feishu message history
  • Accessing messages from other agents for capability analysis

Proposed Solution

Implement RFC 8628 Device Authorization Grant flow to obtain and maintain a User Access Token (UAT), enabling:

  • im.v1.message.list by user open_id for all personal messages
  • search:message scope for full-text message search across all conversations
  • Ability to read messages from other bots in shared chats (learning from other agents)
  • Persistent token refresh (UAT + Refresh Token)

Reference Implementation

OpenClaw's Lark extension already implements this pattern. The key components are:

  • device-flow.js — OAuth 2.0 Device Authorization Grant (RFC 8628)
  • uat-client.js — Token refresh logic
  • token-store.js — Cross-platform secure token storage

Scope Comparison

Bot Token (current)User OAuth (proposed)
Token typetenant_access_tokenuser_access_token (UAT)
PermissionsMessages sent to this bot onlyUser's full message history
Cross-bot sessions❌ Not accessible✅ Searchable
Message historyLimitedFull historical access
OAuth flowNot requiredRFC 8628 device grant

Implementation Notes

  • OAuth is user-initiated — users explicitly authorize Hermes to access their Feishu data
  • Tokens should be stored securely (similar to how OpenClaw stores UAT in platform-specific secure storage: Keychain on macOS, encrypted file on Linux)
  • The existing lark_oapi SDK in the codebase can be leveraged for the OAuth flow
  • No privacy concerns — this is an opt-in feature, bot-token mode remains the default

Priority

This would unblock the "learn from other agents" workflow that users expect from Feishu's bot platform, and enable features like cross-bot session analysis and comprehensive message search.

extent analysis

TL;DR

Implement the RFC 8628 Device Authorization Grant flow to obtain a User Access Token (UAT) for enhanced Feishu message access.

Guidance

  • Leverage the lark_oapi SDK for the OAuth flow, as it is already present in the codebase.
  • Implement secure token storage, similar to OpenClaw's approach, to store the obtained UAT and Refresh Token.
  • Use the device-flow.js and uat-client.js from OpenClaw's Lark extension as a reference for the Device Authorization Grant flow and token refresh logic.
  • Ensure user-initiated OAuth flow, where users explicitly authorize Hermes to access their Feishu data.

Example

No code snippet is provided, as the issue does not contain specific code that can be modified or extended.

Notes

The implementation should consider the user's privacy and provide an opt-in feature, with the bot-token mode remaining the default.

Recommendation

Apply the proposed solution by implementing the RFC 8628 Device Authorization Grant flow to obtain a User Access Token (UAT), as it will unblock the "learn from other agents" workflow and enable features like cross-bot session analysis and comprehensive message search.

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

hermes - 💡(How to fix) Fix [Feature Request] Add Feishu User OAuth support for enhanced message access [1 participants]