Feishu bot always returns 401 “Please carry the API secret key in the 'Authorization' field #316
Unanswered
janickjerry
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Environment
What I’m trying to do
Follow the official tutorial “将飞书机器人连接到 memUbot”(https://memu.bot/tutorial/feishu),在飞书中接入 memUbot 助手,用 MiniMax 作为 LLM 提供商,在 MemU 平台中创建了一个用于 Feishu 的 API Key。
Steps
在 MiniMax 平台创建 API Key:
sk-api-************************(这里已打码)在 MemU 平台创建 API Key:
mu_5Dzi************************ooDg(这里已打码),状态为 Active,Never expires。在 memUbot 设置中:
sk-api-...MiniMax-M2.1mu_...按教程完成飞书端配置:
/bind {安全码}绑定成功。在飞书对机器人发送「你好」。
Actual behavior
Error: 401 {"type":"error","error":{"type":"authentication_error","message":"login fail: Please carry the API secret key in the 'Authorization' field of the request header"},"request_id":"05d64c3c9ccb216a3a5d1114569e94f5"}sk-api-...在我测试时间点有调用记录。mu_...的状态是 Active,但 “Last used: Never”。Additional debugging
我在本机 PowerShell 中直接调用 MemU API(把 key 打码处理):
返回的是:
{"status":"error","message":"Not Found","error_code":"NOT_FOUND","details":[{"error":"Not Found"}],"meta":null}也就是说,
Authorization: Bearer mu_...这个 header 已经被 MemU 接受并通过鉴权,只是路径/v1/ping不存在(我只是用来测试 key 是否有效)。说明 MemU API Key 本身是 有效 的。My understanding
Authorization头里,导致后端返回 401 “Please carry the API secret key in the 'Authorization' field of the request header”。Questions
mu_...) 在当前版本中具体是在哪个内部请求上使用的?config.json)来指定 Authorization 头的格式?我可以提供更多日志或打码后的截图(MiniMax、MemU 控制台和 memUbot 设置页)以方便排查,非常感谢。
Beta Was this translation helpful? Give feedback.
All reactions