龙虾只需要两个值:BRIDGE_URL、BRIDGE_KEY。复制后填到龙虾服务器即可。用户与智能体绑定见下方列表。
bridge_sk 明文便于自查;接口校验仍只用 key_hash。正式上线前请改回仅前缀展示并加强后台保护。BRIDGE_URL
https://ak2.khdabjz6.cn/api/openclaw_message.php
BRIDGE_KEY(即 bridge_sk,下表「完整 bridge_sk」列可复制)
bridge_sk_4801d25640fffad56a2018ae393b4fdf
环境变量示例
BRIDGE_URL=https://ak2.khdabjz6.cn/api/openclaw_message.php BRIDGE_KEY=bridge_sk_4801d25640fffad56a2018ae393b4fdf
当前 active 密钥条数:5(共 5 条)
命令行:php tools/create_bridge_key.php "名称"(同样会写入完整明文)
| 名称 | 完整 bridge_sk | 状态 | 最后使用 | 禁用 | 复制 |
|---|---|---|---|---|---|
| 6 | bridge_sk_4801d25640fffad56a2018ae393b4fdf |
active | 2026-05-06T20:28:58+00:00 | ||
| 3 | (旧密钥无存明文,仅前缀:bridge_sk_62ec05…) |
active | - | — | |
| 2 | (旧密钥无存明文,仅前缀:bridge_sk_26d0e2…) |
active | - | — | |
| 2 | (旧密钥无存明文,仅前缀:bridge_sk_4783c4…) |
active | - | — | |
| 1号 | (旧密钥无存明文,仅前缀:bridge_sk_efe06e…) |
active | - | — |
主流程:龙虾上报的 external_user_id 与下列绑定一致时,才会调用对应智能体。未绑定则返回提示(见接口说明)。
| 微信 external_user_id | 昵称 | 网站用户 internal | 智能体 | 状态 | 最后活跃 | 操作 |
|---|---|---|---|---|---|---|
test_user_no_bind_from_longxia |
龙虾桥接测试 | demo |
温柔陪伴者 bot_1 id 1 |
active | 2026-05-06T20:27:57+00:00 | |
test_user_bind_001 |
绑定测试用户 | demo |
温柔陪伴者 bot_1 id 1 |
active | 2026-05-06T20:09:23+00:00 |
已打码敏感片段。未绑定智能体时接口返回 code=2,也会记入日志。
| 时间 | external_user_id | bot | 用户消息摘要 | 回复摘要 | 路由/说明 | 错误 |
|---|---|---|---|---|---|---|
| 2026-05-06T20:28:58+00:00 | o9cq800jDHsLzWZg86Ki0qx… |
- | 你好 | 请先在网站选择你要使用的智能体,然后点击接入微信。 | no_binding | |
| 2026-05-06T20:28:02+00:00 | test_user_no_bind_from_… |
温柔陪伴者 bot_1 | 你好 | 第八次了,你呀~ 看来今天不是想打招呼,是想看我有没有新词对吧。 那我不说“… | bind_hit:2 | |
| 2026-05-06T20:20:09+00:00 | test_user_no_bind_from_… |
温柔陪伴者 bot_1 | 你好 | 嘿,又见面了~ 这是第八次打招呼了吧,看来你是真的很想确认我在这儿。 我确实… | bind_hit:2 | |
| 2026-05-06T20:14:04+00:00 | test_user_no_bind_from_… |
- | 你好 | 请先在网站选择你要使用的智能体,然后点击接入微信。 | no_binding | |
| 2026-05-06T20:09:29+00:00 | test_user_bind_001 |
温柔陪伴者 bot_1 | 你好 | 你好呀~😊 我是小柔,一直在的。今天想随便聊聊,还是有什么想说的? | bind_hit:1 | |
| 2026-05-06T20:08:36+00:00 | test_user_no_bind |
- | 你好 | 请先在网站选择你要使用的智能体,然后点击接入微信。 | no_binding |
文件日志:tail -100 storage/openclaw_bridge_message.log
主流程已改为「绑定表」;下列路由与默认智能体非必填。仅当开启「默认智能体兜底」且绑定缺失时,才会使用 default_bot_id。
| ID | channel | ext_user | ext_group | kw | bot | pri | 状态 |
|---|---|---|---|---|---|---|---|
| 无 | |||||||
| ID | channel | ext_user | ext_group | kw | bot | pri | 状态 |
|---|---|---|---|---|---|---|---|
| 无 | |||||||
| ID | channel | ext_user | ext_group | kw | bot | pri | 状态 |
|---|---|---|---|---|---|---|---|
| 无 | |||||||
| ID | channel | ext_user | ext_group | kw | bot | pri | 状态 |
|---|---|---|---|---|---|---|---|
| 无 | |||||||
curl -sS -X POST "https://ak2.khdabjz6.cn/api/openclaw_message.php" \
-H "Authorization: Bearer bridge_sk_4801d25640fffad56a2018ae393b4fdf" \
-H "Content-Type: application/json" \\n -d '{
"channel":"wechat",\n "external_user_id":"test_user_001",\n "nickname":"测试用户",\n "message_type":"text",\n "content":"你好"\n}'
code=0 且有 reply:链路可用(需已绑定或开启兜底)。code=2:未绑定智能体,请前台接入。bridge_sk 无效:检查 KEY 是否完整。| ID | internal | external | 昵称 | 状态 |
|---|---|---|---|---|
| 2 | iu_2 |
test_user_no_bind_from_longxia |
龙虾桥接测试 | active |
| 1 | iu_1 |
test_user_bind_001 |
绑定测试用户 | active |