Webhooks are HTTP notifications which notify third-party web based applications whenever a specific event occurs. For example, sending a Webhook to another system whenever someone interacts with one of your thyngs, so that it can record it for.
Sending a Webhook will not make anything happen in another system, you need to write code in your the other system to listen for, and reacting to the Webhook. For testing purposes, a site like http://requestb.in may be useful to forward your Webhooks to, this will allow you to view the data which is sent by our Webhooks without the need for you to implement a full listener service.
The first step is to configure a new Integration.
Go to MyThyngs > Developer > Integrations
Each integration allows you to setup authorisation and a base URL to send Webhooks to. If you wish to send your Webhooks to multiple domains, you will need to create multiple integrations. You can also set the format of this integrations webhooks (e.g. XML or JSON).
Webhooks use basic tokenised authorisation. The application that receives the Webhook will need to check the Authorisation header to ensure it contains the correct authorisation key. You can reset your authorisation key at any time at MyThyngs > Developer > Integrations
Next, create your first Webhook Trigger.
Go to MyThyngs > Developer > Webhooks
Webhooks can be sent when different events occur on Thyngs platform. You can also define the URL where the Webhook should be sent to.
You can view a list of sent Webhooks at MyThyngs > Developer > Queue. In some cases, Webhooks will fail to send. This could be because of invalid autherisation or an incorrect URL being configured. If this happens you can resend a failed Webhook on the Queue page.
WebHooks are sent as HTTP POST requests. The URL which the Webhook is sent to will need to handle the HTTP headers in the request.
The content of the message is formatted as specified in the Content-Type header, dependant on the type you defined or the integration in MyThyngs e.g. JSON/XML.