Files
optimclaw/channels-src/whatsapp/whatsapp.capabilities.json
T
13697976db feat(extensions): improve auth UX and add load-time validation (#536)
* feat(extensions): add load-time validation for auth capabilities

Catch common misconfigurations (missing auth section, missing setup_url,
short prompts) at startup via tracing::warn instead of silently failing
at auth time.

* feat(extensions): improve auth prompts, setup_url, and showAuthCard

Add setup_url and descriptive prompts to channel and tool capabilities
files. Fix showAuthCard in web gateway and improve extension manager
auth flow messaging.

* refactor(extensions): extract MIN_PROMPT_LENGTH constant in validate()

Address review feedback: replace magic number 30 with a named constant
for readability and maintainability.

[skip-regression-check]

Co-Authored-By: Claude Opus 4.6 <[email protected]>

---------

Co-authored-by: Claude Opus 4.6 <[email protected]>
2026-03-04 13:57:10 -08:00

58 lines
1.6 KiB
JSON

{
"type": "channel",
"name": "whatsapp",
"description": "WhatsApp Cloud API channel for receiving and responding to WhatsApp messages",
"setup": {
"required_secrets": [
{
"name": "whatsapp_access_token",
"prompt": "Enter your WhatsApp Cloud API permanent access token (from the Meta Developer Portal under your app's WhatsApp > API Setup).",
"validation": "^[A-Za-z0-9_-]+$"
},
{
"name": "whatsapp_verify_token",
"prompt": "Webhook verify token (leave empty to auto-generate)",
"optional": true,
"auto_generate": { "length": 32 }
}
],
"validation_endpoint": "https://graph.facebook.com/v18.0/me?access_token={whatsapp_access_token}",
"setup_url": "https://developers.facebook.com/apps"
},
"capabilities": {
"http": {
"allowlist": [
{ "host": "graph.facebook.com", "path_prefix": "/" }
],
"rate_limit": {
"requests_per_minute": 80,
"requests_per_hour": 1000
}
},
"secrets": {
"allowed_names": ["whatsapp_*"]
},
"channel": {
"allowed_paths": ["/webhook/whatsapp"],
"allow_polling": false,
"workspace_prefix": "channels/whatsapp/",
"emit_rate_limit": {
"messages_per_minute": 100,
"messages_per_hour": 5000
},
"webhook": {
"secret_header": "X-Hub-Signature-256",
"secret_name": "whatsapp_verify_token",
"verify_token_param": "hub.verify_token"
}
}
},
"config": {
"api_version": "v18.0",
"reply_to_message": true,
"owner_id": null,
"dm_policy": "pairing",
"allow_from": []
}
}