EMQX Webhook Action Not Sending Data
DodaTech
Updated 2026-06-26
1 min read
In this tutorial, you'll learn about EMQX Webhook Action Not Sending Data. We cover key concepts, practical examples, and best practices.
The Problem
Rule engine webhook action fails to POST data to an HTTP endpoint.
Quick Fix
Wrong
POST http://localhost:8080/webhook # Endpoint not reachable
Webhook request fails — connection refused or timeout.
Right
# 1. Create webhook action
curl -u admin:public -X POST http://localhost:18083/api/v5/actions \
-H 'Content-Type: application/json' \
-d '{
'name': 'webhook_action',
'type': 'webhook',
'parameters': {
'url': 'http://my-server:8080/webhook',
'headers': {'X-API-Key': 'secret'},
'method': 'POST'
}
}'
# 2. Attach to rule
curl -u admin:public -X POST http://localhost:18083/api/v5/rules/my_rule/actions \
-d '{'id': 'webhook_action'}'
# 3. Test
mqttx pub -t test -m '{'msg':'hello'}'
# Check server logs for POST receipt
HTTP 200 from webhook endpoint. Rule metrics show success.
Prevention
Ensure the webhook endpoint is reachable from the EMQX broker. Set reasonable timeout (default 5s). Use HTTPS for sensitive data. Webhook body contains the full message (topic, payload, metadata). Handle 2xx as success. Headers can include auth tokens.
DodaTech engineers apply these same patterns across Doda Browser, DodaZIP, and Durga Antivirus Pro for production IoT reliability.
FAQ
← Previous
EMQX TLS/SSL Connection Fails — Complete Guide
Next →
EMQX Will Message Not Published on Disconnect
Built by the developers of DodaTech
Doda Browser, DodaZIP & Durga Antivirus Pro