Integrations
Blynk Webhook Integration Guide
Blynk webhooks send IoT platform events to an HTTPS endpoint. They can react to template or device datastream updates and, depending on the Blynk plan, device connection and user lifecycle events. Blynk can send POST, GET, PUT, or DELETE requests with web-form or Custom JSON bodies.
FastHook gives Blynk a stable source URL, verifies a shared secret from a custom request header, records the original request, and routes accepted device events to HTTP services, Slack, email, Google Sheets, storage, or other destinations. Downstream failures can then be retried or replayed without changing the webhook in Blynk.Console.
Create a source, copy its HTTPS URL, then use that URL as the destination in Blynk.Console.
How the Blynk to FastHook flow works
- A Blynk datastream, device, or account event triggers a Blynk webhook.
- Blynk sends Custom JSON to the FastHook Source URL over HTTPS.
- FastHook checks the x-blynk-token header before accepting the request.
- The accepted request becomes durable request and event evidence.
- Connections filter or transform the event for each destination.
- Failed destination attempts can be retried or replayed from FastHook.
Create a protected FastHook source
Blynk supports custom HTTP headers but does not document an HMAC signature for outgoing webhooks. Use a long random value in a custom x-blynk-token header and configure FastHook API-key source authentication with the same value.
curl -X POST "https://api.fasthook.io/v1/sources" \
-H "Authorization: Bearer fhp_xxx" \
-H "x-team-id: tm_xxx" \
-H "Content-Type: application/json" \
-d '{
"name": "Blynk device events",
"description": "Blynk datastream and device lifecycle webhooks",
"type": "WEBHOOK",
"status": "enabled",
"config": {
"auth_type": "API_KEY",
"auth": {
"header_name": "x-blynk-token",
"value": "replace-with-a-long-random-token"
},
"allowed_http_methods": ["POST"],
"custom_response": {
"content_type": "json",
"body": "{\"received\":true}"
}
}
}'Configure the webhook in Blynk.Console
- Open Blynk.Console, then go to Settings, Developers, and Webhooks.
- Create a webhook and select the trigger event, template or device, and datastream.
- Paste the FastHook Source URL into the Webhook URL field.
- Choose POST as the Request Type and Custom JSON as the Content Type.
- Add x-blynk-token under HTTP Headers with the same random value configured in FastHook.
- Build the JSON body from the Dynamic Data values available for the selected trigger.
- Click Test Webhook and confirm that Blynk reports a successful response code.
- Open FastHook Requests and verify the captured headers, body, and accepted status before enabling production traffic.
Custom JSON payload
The dynamic fields offered by Blynk depend on the selected trigger. Use Blynk's Dynamic Data picker instead of typing undocumented placeholders. For a datastream update, Blynk documents {device_pinValue[0]} as an available value.
{
"provider": "blynk",
"event": "datastream_update",
"value": "{device_pinValue[0]}"
}Recommended routing
| Blynk event | FastHook route | Destination examples |
|---|---|---|
| Device datastream update | Filter by device, datastream, or the custom event field | Telemetry API, queue, R2, S3 |
| Threshold or alarm state | Route only actionable values and deduplicate repeated states | Slack, email, SMS, incident API |
| First device connection | Separate onboarding traffic from normal telemetry | Provisioning API, CRM, audit store |
| User or device lifecycle | Keep account automation isolated from high-volume sensor events | Backend API, Google Sheets, support workflow |
Retries, replay, and duplicate safety
Blynk exposes webhook attempts and execution logs with successful, waiting, and failed states. A successful response from FastHook confirms that the incoming request was captured; it does not require every downstream destination to finish before Blynk receives its acknowledgement.
- Use the Blynk Test Webhook action before enabling a production trigger.
- Configure Blynk failure receivers or failure email notifications for ingress failures.
- Inspect FastHook destination attempts when Blynk received 2xx but a downstream system did not update.
- Use an event or device identifier as a deduplication key when the destination creates side effects.
- Replay only after the receiver can process the same Blynk event safely more than once.
Security checklist
- Use one FastHook source and one secret per Blynk environment or organization.
- Accept POST only unless the Blynk webhook was intentionally configured with another method.
- Rotate x-blynk-token in both systems if it appears in logs, screenshots, or support messages.
- Do not put a Blynk device Auth Token in the FastHook source URL or in public payload examples.
- Treat user email, phone, location, and device metadata as personal data when adding Blynk dynamic fields.
- Keep the FastHook source enabled only while the matching Blynk webhook is active.
Sending FastHook events to Blynk
For the reverse direction, create a FastHook HTTP destination that calls the appropriate Blynk HTTPS API or an HTTP Data Converter endpoint. Keep Blynk credentials in destination authentication settings and use a transformation rule to produce the body expected by the selected Blynk endpoint.
Troubleshooting
| Symptom | Check |
|---|---|
| Blynk Test Webhook fails | Confirm the exact HTTPS Source URL, POST method, and x-blynk-token value. |
| FastHook shows rejected auth | Compare the header name and token without adding quotes or whitespace. |
| Request is accepted but no destination runs | Inspect connection status, filters, and event body fields. |
| Payload fields are empty | Use only Dynamic Data values Blynk offers for the selected trigger. |
| Repeated downstream action | Add a stable event/device key and make the receiver idempotent. |