5.2 Webhook与事件驱动
5.2.1 Webhook 是什么
5.2.2 OpenClaw 的 hooks 基础配置
{
hooks: {
enabled: true,
token: "OPENCLAW_HOOKS_TOKEN",
path: "/hooks",
defaultSessionKey: "hook:ingress",
allowRequestSessionKey: false,
allowedSessionKeyPrefixes: ["hook:"],
allowedAgentIds: ["main", "ops", "hooks"]
}
}5.2.3 两个常用 endpoint
POST /hooks/wake
POST /hooks/wakePOST /hooks/agent
POST /hooks/agent5.2.4 最小可跑示例
5.2.5 mappings:把复杂逻辑留在本地配置
5.2.6 Gmail Pub/Sub 邮件钩子
5.2.7 事件驱动模式(实战常用)
5.2.8 安全建议
本节小结
Last updated