Notifications & Webhooks

From Airangel Wiki
Jump to: navigation, search

Notifications (Alerts) can be setup to trigger emails or webhooks when certain criteria, defined by the system user, are met by networks users/guests. Notifications can be setup to trigger based on the following criteria:

  • Marketing Hits
  • Revenue
  • Account Whereabout (location)
  • Location Density
  • Unique Devices
  • Guest Data
  • Login Attempt
  • Guest Data Post
  • Custom Guest Data Post


Webhooks are essentially a push notification that can push data out of the Airangel platform in real time. They are useful if there is a third party system (e.g. a CRM system) that needs data from the Guest WiFi network pushed into it.

JSON Webhook

You can configure a webhook notification with JSON content by using the "Custom Guest Data Post" option and "Webhook" checkbox. This will send an HTTP POST with the content you want.


Set the Content-Type to application/json and then fill in your own JSON content. Use the normal replacement tags like {username}, {Mail}, {MAC} etc and create the JSON structure you want. Make sure you put the quotes around your tags if the value will be a string. Example would be:

{"email": "{Mail}", "mac": "{MAC}"}

Example Webhook

Social Login Data with Facebook


Broken down this is:

  • '''https://webhook.service/newlogin?''' => the configured server where the webhook is sent
  • site=SITEID => configured site id (initially this is statically added to the webhook URL)
  • user=1394576374171799%40facebook => the username (facebook unique id) + @facebook (this would change as per social provider e.g. 1234@twitter for twitther auth)
  • mac=00-11-22-33-44-55-66 => MAC address of the client
  • locale=en_GB => The locale returned by facebook
  • gender=male => Gender returned by facebook
  • => email address returned by facebook
  • firstname=john => firstname returned by facebook
  • lastname=van%20damme => last name returned by facebook
  • => URL to the facebook profile

The request is sent as a GET request with urlencoded values according to RFC 1738 (raw url encode)

Example Device-Info Webhook

This example text used with a "Login attempt" type of webhook would send a webhook useful for Chromecast/Apple TV association:


This will post to the remote service with the room and MAC and the login status.

Parameter Usage
site Site code, configured statically per site for your reference.
mac MAC address of the device logging in.
room Room number associated with the PMS login.
login Login status - 0 = fail, 1 = success. Discard 0 values at the remove service.