Configure Connect Webhooks

Take mobile events and pass them directly to your backend systems using webhooks. The Urban Airship Connect Webhooks integration takes user-level events in real time, and passes them to the webhook URL that you provide.

This integration is similar to a Direct Connection. The difference between the two is that:

  • With webhooks, you tell us where to send the events by providing a URL, headers, and authorization info.
  • With a direct connection, you control when you pull data from the raw data stream and filter the data according to the needs of the system that consumes it.

What is a Webhook?

A webhook is a custom HTTP callback, generally triggered by an event or action initiated by a user, service, or application. When the event occurs, the originating application notifies the specified URL configured for the webhook.

Webhooks are popular with web developers because they can be configured to trigger all manner of events from system to system, enabling real-time workflows across the web and your internal systems.

What You'll Do

In this tutorial, you will:

  1. Open your project from the dashboard, then go to the Connect Integrations.
  2. Configure a Webhook connection.
  3. Save the new connection.

Steps

Connect Dashboard

  1. Open your project from the dashboard, then click Settings and select Connect Integrations.

  2. Under the Connections heading, click Webhooks.

  3. Name and configure a new Webhooks integration:
    • Enter a user-friendly name and description.
    • Enter the HTTPS endpoint URL you would like your events POSTed.
      Note

      The host has to support HTTPS to assure that data is transferred using encryption. Query parameters are supported in this field.

    • Choose one or more event type:

      • Opens
      • Closes
      • Custom Events
      • Screen Viewed
      • Location
      • Region
      • Sends
      • Control
      • Tag Changes
      • First Opens
      • Uninstalls
      • Push Bodies
      • Rich Read, Delivery, and Delete Events
      • In-App Message Expiration, Resolution, and Display Events
      • Web Notify Session
      • Web Notify Click
  4. Click the Save button.

Example Event

POST https://example.com HTTP/1.1
Content-Length: 799
Content-Type: application/json; charset=UTF-8
Custom-Header1: Value1
Custom-Header2: Value2
Authorization: Basic dXNhcj0wYXNzd29yZA==

{
   "id":"7e7f5990-d277-4636-b22c-912cb2ca2ec9",
   "offset":"1245924",
   "occurred":"2016-12-08T21:27:01.125Z",
   "processed":"2016-12-08T21:27:03.000Z",
   "device":{
      "ios_channel":"1819298f-065f-46f1-81a0-1fea91f65ce7",
      "attributes":{
         "locale_variant":"",
         "app_version":"1.2.3",
         "device_model":"x86_64",
         "connection_type":"WIFI",
         "app_package_name":"com.company.app",
         "iana_timezone":"America/Los_Angeles",
         "push_opt_in":"false",
         "locale_country_code":"US",
         "device_os":"10.1",
         "locale_timezone":"-28800",
         "locale_language_code":"en",
         "location_enabled":"true",
         "background_push_enabled":"false",
         "ua_sdk_version":"8.0.1",
         "location_permission":"ALWAYS_ALLOWED"
      }
   },
   "body":{
      "name":"finished_game",
      "session_id":"e025bde1-f974-42fa-a925-aca7054218dc",
      "properties":{
         "game_name":"snaps",
         "game_score":1000
      }
   },
   "type":"CUSTOM"
}
Tutorials