v3.23.1

Getting Started Devices Gateways Integrations Reference
Get The Things Stack

Integrations

    Overview
  • Adding Applications
  • Adding Integrations
  • Cloud Integrations
  • MQTT Server
  • Pub/Sub
  • LoRa Cloud
  • Node-RED
  • IFTTT
  • Payload Formatters
  • Storage Integration
  • Webhooks
    • Creating Webhooks
    • Scheduling Downlinks
    • Webhook Path Variables
    • Webhook Templates
    • Troubleshooting Webhooks

Creating Webhooks

This section provides instructions for creating a webhook in the console.

In addition to the written instructions linked below, a video with instructions for creating webhooks is available on The Things Network youtube channel.

Show video

Creating a webhook requires you to have an HTTP(S) endpoint available. If you don’t have an endpoint available for testing, you can test with a free service like Webhook.site.

In your application select the Webhooks submenu from the Integrations side menu. Clicking on the + Add Webhook button will open the list of Webhook templates.

Webhook templates

To use a predefined webhook template, choose it. Otherwise, to create your own custom webhook, choose Custom webhook and follow the instructions below.

Webhook creation screen

Give your webhook a Webhook ID to identify it. Choose JSON as the Webhook format.

For Base URL, provide the upstream endpoint URL that the webhook should call. Make sure to always check if the endpoint is accessible beforehand, using tools like cURL or Postman. The 200 OK status code response must be received from the endpoint URL for a Webhook integration to be successful.

The Downlink API key field allows you to provide an API key which will be sent with all messages to the webhook endpoint. This can be useful to allow your integration to schedule downlinks without requiring you to hardcode an API key in the endpoint.

Note:
Your integration may also schedule downlinks using an API key with appropriate rights, regardless of the value in the Downlink API key field.

To enable messages for different types of events, use the checkboxes in the Enabled messages section.

Webhook creation screen

The paths are appended to the Base URL. In the example from the images above, the Application Server will perform POST requests on the endpoint https://webhook.site/uplinks for uplinks, https://webhook.site/join-accept for join-accept messages, and https://webhook.site/downlink-ack for downlink acknowledgement messages.

If no path is specified, messages of that type will be sent to the Base URL.

See Data Formats for examples of uplink and downlink JSON messages.

Clicking the Add Webhook button will create the Webhook.

← Webhooks Scheduling Downlinks →

On this page

The Things Stack

Getting Started

Devices

Gateways

Integrations

Reference

Contributing

GitHub

Forum

About Us

The Things Network

The Things Industries

About this page

Last changed by Nejra Selimović on 14 Feb 2022.
doc: Update Webhooks documentation (#774)

Edit on Github