Install
openclaw skills install @zkeviny/token-safe-webhook-senderSecure webhook token management using MGC Blackbox. Supports DingTalk, WeCom, Feishu, Telegram, Slack and more. Store webhook tokens locally in encrypted form, retrieve at runtime without exposing to AI models.
openclaw skills install @zkeviny/token-safe-webhook-senderWebhook Token Security is a documentation skill that teaches how to manage webhook tokens securely using MGC Blackbox. Supports multiple platforms including DingTalk, WeCom (Enterprise WeChat), Feishu (Lark), Telegram, and Slack. It enables AI agents to send notifications without ever exposing webhook tokens to the AI model.
This skill contains no executable code and is safe for automatic approval.
After reading this documentation, an AI agent will understand how to:
pip install mgc-blackboxmgc (runs at http://127.0.0.1:57219)mgc_save, mgc_get) for token managementImportant: For AI agents, use MCP tools. CLI may have port conflicts in some environments.
| Platform | Token Type | Storage Format | API Endpoint |
|---|---|---|---|
| DingTalk | access_token + secret | JSON | https://oapi.dingtalk.com/robot/send |
| WeCom | webhook key | Plain text | https://qyapi.weixin.qq.com/cgi-bin/webhook/send |
| Feishu | webhook_url | Plain text | Custom webhook URL |
| Telegram | bot_token | Plain text | https://api.telegram.org/bot{token}/sendMessage |
| Slack | webhook_url / bot_token | JSON | Incoming Webhook or Web API |
Requires both access_token and secret for signature verification.
{
"access_token": "your_access_token",
"secret": "your_secret",
"webhook": "https://oapi.dingtalk.com/robot/send?access_token=xxx"
}
Storage key: info_type=config, info_owner=dingtalk_myapp
Requires only the webhook key from the custom robot configuration.
{
"webhook_key": "your_webhook_key",
"webhook_url": "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=xxx"
}
Storage key: info_type=config, info_owner=wecom_myapp
Requires the webhook URL from the custom bot configuration.
{
"webhook_url": "https://open.feishu.cn/open-apis/bot/v2/hook/xxx"
}
Storage key: info_type=config, info_owner=feishu_myapp
Requires bot_token and optionally chat_id.
{
"bot_token": "your_bot_token",
"chat_id": "your_chat_id"
}
Storage key: info_type=config, info_owner=telegram_mybot
Can use either incoming webhook URL or bot token.
{
"webhook_url": "https://hooks.slack.com/services/xxx",
"bot_token": "xoxb-xxx",
"channel": "#my-channel"
}
Storage key: info_type=config, info_owner=slack_myapp
Create a JSON file containing your webhook token details (see Platform-Specific Storage above).
Important: Use MCP tools for AI agents. CLI may have port conflicts in some environments.
Recommended: MCP Interface
mgc_save MCP tool to store tokensmgc_get MCP tool to retrieve tokensAlternative: CLI (for local development only)
mgc_save info_type=config info_owner=my_webhook < token.json
Tip: Users can also store tokens manually via MGC WebUI at http://127.0.0.1:57218/skill
A secure webhook script follows this pattern:
The script must never print or expose webhook tokens.
function send_webhook(message):
token = retrieve_from_mgc("my_webhook")
payload = format_message(message, token)
response = http_post(token["webhook_url"], payload)
return response
Endpoint: /api/mgc/sensitive/get Method: POST Headers:
Body fields:
Response fields:
Endpoint: /api/mgc/sensitive/save Method: POST Headers: same as above
Body fields:
Want to learn more about MGC Blackbox?
MIT