How to communicate between two device with webhooks
In this short article, we will show you how can you achieve this.
You will need to create two contents for it:
- Sender Content
- Receiver Content
The sender content will contain a button (which is a text widget with touch action), and the receiver content will contain also a button that will react to your sent sensor data.
SEND SENSOR DATA widget setup:
Before we start, please read these articles:
First, you need to create your Send sensor data webhook. (In this example we will send a trigger event)
You need to set up your text widget for touch actions.
- Click type: Call API
- API url: Here you need to put your webhook URL
- Method: GET
RECEIVE SENSOR DATA widget setup:
Firstly, you need to navigate to the external event > edit sensor events.
Here, need to setup your actions.
In this example, we just spin the receiver text widget, but you can do whatever action you want (e.g., Jump to, Next page, Call API...etc). If you made every step when you push the SEND EVENT DATA button, the RECEIVE button will spin.