Caricamento in corso...
Caricamento in corso...
Last synced: Today, 22:00
Technical reference for the OpenClaw framework. Real-time synchronization with the official documentation engine.
Use this file to discover all available pages before exploring further.
OpenClaw’s Gateway exposes a simple HTTP endpoint for invoking a single tool directly. It is always enabled and uses Gateway auth plus tool policy. Like the OpenAI-compatible
/v1/*POST /tools/invokehttp://<gateway-host>:<port>/tools/invokeDefault max payload size is 2 MB.
Uses the Gateway auth configuration.
Common HTTP auth paths:
gateway.auth.mode="token""password"Authorization: Bearer <token-or-password>gateway.auth.mode="trusted-proxy"gateway.auth.mode="none"Notes:
gateway.auth.mode="token"gateway.auth.tokenOPENCLAW_GATEWAY_TOKENgateway.auth.mode="password"gateway.auth.passwordOPENCLAW_GATEWAY_PASSWORDgateway.auth.mode="trusted-proxy"gateway.auth.trustedProxy.allowLoopback = truegateway.auth.rateLimit429Retry-AfterTreat this endpoint as a full operator-access surface for the gateway instance.
tokenpasswordx-openclaw-scopesgateway.auth.mode="none"x-openclaw-scopesAuth matrix:
gateway.auth.mode="token""password"Authorization: Bearer ...x-openclaw-scopesoperator.adminoperator.approvalsoperator.pairingoperator.readoperator.talk.secretsoperator.writegateway.auth.mode="none"x-openclaw-scopesoperator.adminjson{ "tool": "sessions_list", "action": "json", "args": {}, "sessionKey": "main", "dryRun": false }
Fields:
toolactionactionargssessionKey"main"session.mainKeyglobaldryRunTool availability is filtered through the same policy chain used by Gateway agents:
tools.profiletools.byProvider.profiletools.allowtools.byProvider.allowagents.<id>.tools.allowagents.<id>.tools.byProvider.allowIf a tool is not allowed by policy, the endpoint returns 404.
Important boundary notes:
/tools/invokeGateway HTTP also applies a hard deny list by default (even if session policy allows the tool):
execspawnshellfs_writefs_deletefs_moveapply_patchsessions_spawnsessions_sendcrongatewaynodeswhatsapp_loginYou can customize this deny list via
gateway.toolsjson5{ gateway: { tools: { // Additional tools to block over HTTP /tools/invoke deny: ["browser"], // Remove tools from the default deny list allow: ["gateway"], }, }, }
To help group policies resolve context, you can optionally set:
x-openclaw-message-channel: <channel>slacktelegramx-openclaw-account-id: <accountId>200{ ok: true, result }400{ ok: false, error: { type, message } }401429Retry-After404405500{ ok: false, error: { type, message } }bashcurl -sS http://127.0.0.1:18789/tools/invoke \ -H 'Authorization: Bearer secret' \ -H 'Content-Type: application/json' \ -d '{ "tool": "sessions_list", "action": "json", "args": {} }'
© 2024 TaskFlow Mirror
Powered by TaskFlow Sync Engine