本页定义 SecretRef 的规范凭证范围:仅限用户提供的凭证,不包括运行时生成或轮换的凭证。
支持的凭证(openclaw.json)
主要类别:
models.providers.*.apiKey及相关 headers/TLS 配置skills.entries.*.apiKeyagents.defaults.memorySearch.remote.apiKeytalk.providers.*.apiKeygateway.auth.password/gateway.auth.tokenchannels.telegram.botToken/webhookSecretchannels.slack.botToken/appToken/signingSecretchannels.discord.tokenchannels.feishu.appSecret/encryptKeyplugins.entries.brave/exa/google/xai/perplexity/tavily.config.webSearch.apiKeyplugins.entries.voice-call.config.*.providers.*.apiKey
支持的凭证(auth-profiles.json)
profiles.*.keyRef(type: "api_key")profiles.*.tokenRef(type: "token")
不支持的凭证(超出范围)
以下凭证由运行时生成/轮换,不适用 SecretRef:
commands.ownerDisplaySecrethooks.tokenauth-profiles.oauth.*channels.whatsapp.creds.jsonchannels.discord.threadBindings.webhookToken
重要规则
openclaw.json中的 SecretRef 必须使用结构化对象:{"source":"env","provider":"default","id":"DISCORD_BOT_TOKEN"}- 旧式
secretref-env:<ENV_VAR>字符串已废弃,运行openclaw doctor --fix迁移 - OAuth 模式(
auth.profiles.<id>.mode = "oauth")不能与 SecretRef 输入混用