Skip to main content
Skip to main content

Webhooks

Webhooks let IronWiFi push real-time event notifications to your application. Instead of polling the API for changes, your server receives an HTTP POST request whenever a relevant event occurs -- such as a user authenticating, a session starting, or account data changing.

Overview

Common use cases:

  • Trigger a welcome email when a guest authenticates via captive portal
  • Update your ticketing system when authentication fails repeatedly
  • Sync session data to your analytics platform in real time
  • Disable building access when a WiFi session ends
  • Log events to a SIEM for security monitoring

Configuring Webhooks

Creating a webhook endpoint

  1. Log in to the IronWiFi Console
  2. Navigate to Account > Webhooks
  3. Click Add Webhook
  4. Configure:
SettingDescription
URLYour HTTPS endpoint that will receive the webhook payloads
EventsSelect which event types to subscribe to
SecretA shared secret for verifying webhook signatures
StatusEnable or disable the webhook
  1. Click Save
warning

Your webhook endpoint must use HTTPS. IronWiFi does not send webhooks to plain HTTP URLs to protect payload data in transit.

Endpoint requirements

Your webhook receiver must:

  • Accept HTTP POST requests
  • Return a
    200
    status code within 10 seconds to acknowledge receipt
  • Handle JSON payloads with
    Content-Type: application/json
  • Be publicly accessible from IronWiFi's servers

Event Types

Authentication events

EventTriggerUse Case
auth.accept
User successfully authenticatesLog successful access, trigger welcome flow
auth.reject
Authentication attempt rejectedAlert on repeated failures, security monitoring
auth.challenge
RADIUS challenge issuedTrack multi-step authentication flows

Session events

EventTriggerUse Case
session.start
New user session beginsTrack occupancy, start billing
session.update
Interim accounting update receivedMonitor bandwidth usage in real time
session.end
User session terminatesStop billing, update access control

User events

EventTriggerUse Case
user.created
New user account createdSync to external systems, send welcome email
user.updated
User account modifiedPropagate changes to integrated systems
user.deleted
User account removedRevoke access in connected systems

Voucher events

EventTriggerUse Case
voucher.redeemed
Voucher code used for authenticationTrack voucher usage, update inventory
voucher.expired
Voucher reaches expirationClean up expired access records

Payload Format

All webhook payloads follow a consistent JSON structure:

Authentication event payload

Session event payload

User event payload

Signature Verification

Every webhook request includes a signature header that lets you verify the payload came from IronWiFi and was not tampered with.

How it works

  1. IronWiFi computes an HMAC-SHA256 hash of the raw request body using your webhook secret
  2. The hash is included in the
    X-IronWiFi-Signature
    header
  3. Your server computes the same hash and compares it

Verification examples

Python

Node.js

PHP

warning

Always verify the webhook signature before processing the payload. Without verification, an attacker could send forged requests to your endpoint.

Retry Logic

IronWiFi retries failed webhook deliveries with exponential backoff:

AttemptDelay After Failure
1st retry1 minute
2nd retry5 minutes
3rd retry30 minutes
4th retry2 hours
5th retry12 hours

A delivery is considered failed if:

  • Your endpoint does not respond within 10 seconds
  • Your endpoint returns a non-2xx HTTP status code
  • The connection cannot be established (DNS failure, network error)

After 5 failed retries, the webhook event is marked as failed and no further attempts are made.

Handling retries in your application

Your webhook handler should be idempotent -- processing the same event twice should not cause problems. Use the

id
field in the payload to detect and skip duplicate deliveries:

Testing Webhooks

Using a test endpoint

During development, use a service like webhook.site or ngrok to inspect incoming webhook payloads:

  1. Get a temporary URL from webhook.site
  2. Configure it as your webhook endpoint in the IronWiFi Console
  3. Trigger an event (e.g., authenticate a test user)
  4. Inspect the received payload on webhook.site

Testing with cURL

Simulate a webhook delivery to test your handler locally:

Best Practices

  1. Respond quickly -- Return
    200
    immediately and process the event asynchronously. Do not perform slow operations in the webhook handler itself.
  2. Verify signatures -- Always validate the
    X-IronWiFi-Signature
    header before processing.
  3. Handle duplicates -- Use the event
    id
    to implement idempotent processing.
  4. Log everything -- Log received payloads and processing results for debugging.
  5. Monitor delivery -- Check the webhook delivery status in the IronWiFi Console for failed deliveries.
  6. Use a queue -- For high-volume deployments, push incoming webhooks to a message queue (RabbitMQ, SQS, Redis) and process them asynchronously.
  7. Keep secrets secure -- Store your webhook secret in environment variables, not in source code.

Troubleshooting

Webhooks not received

  • Verify the endpoint URL is correct and publicly accessible
  • Check that the webhook is enabled in the IronWiFi Console
  • Confirm your firewall allows inbound HTTPS connections
  • Check if the event type you expect is selected in the webhook configuration

Signature verification failing

  • Ensure you are comparing against the raw request body (not a parsed/re-serialized version)
  • Verify the webhook secret matches exactly between IronWiFi and your code
  • Check that you are reading the
    X-IronWiFi-Signature
    header correctly

Events arriving late

  • Check the retry history in the IronWiFi Console -- previous delivery attempts may have failed
  • Verify your endpoint responds within 10 seconds
  • If your server was temporarily down, events will arrive after the retry delay

Was this page helpful?