openclaw_secrets_set
Store API keys and tokens in the gateway's config tree for skill consumption. Writes to config scope, no restart needed.
Instructions
Store an arbitrary secret (API key, third-party token, etc.) in the gateway's config tree where skills can consume it. Internally calls config.patch with a mergePath so the value lands at config.<scope>.<name>. Default scope is secrets (creates config.secrets.<name>); override with scope for skill-scoped secrets like tools.linkedin-outreach.proxycurlApiKey. Note: this writes to the CONFIG tree, not the gateway's secrets.resolve command-scoped store (which has no public write API). After this call, restart-free — the next agent run sees the updated config.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Secret name (e.g. 'PROXYCURL_API_KEY', 'OPENAI_API_KEY'). | |
| scope | No | Dotted config path to nest under. Default 'secrets' creates config.secrets.<name>. Use e.g. 'tools.linkedin-outreach' for skill-scoped secrets. | |
| value | Yes | Secret value. | |
| instance | No | Optional OpenClaw instance to route this call to (e.g. 'default', 'work'). Falls back to the active default instance, or the OPENCLAW_GATEWAY_URL/TOKEN env vars when set. List configured instances with openclaw_setup_list. |