PRiO User’s Guide
73
Adding a Webhook Event to a Button
Do you know about webhooks and would you like to use them with your device? Here’s how LAMP
Words for Life supports them.
Please note that this section requires a basic understanding of webhooks
and programming skills.
Important!
You must be connected to Wi-Fi to use webhooks.
Terms Used in This Section
Term
Meaning
webhook
A webhook is an event that triggers an action.
webhook service/
provider
A webhook service is a web application for retrieving and storing data from a
certain event.
webhook event
A webhook event is a web request via a URL that can contain additional
information needed by the webhook service/provider.
There are two parts to a webhook event: (1) the URL and (2) the payload in
JSON format. The event is the piece that Words for Life sends.
Event example:
Create a document
URL
A URL is a website address. For webhooks, a URL is the address sent to trigger
an event. Webhooks use the http protocol to communicate with the
webhook service/provider.
payload
Additional instructions can be sent with the URL to perform the event. These
additional instructions are referred to as a payload.
Note:
Not all events need a payload.
Payload examples:
Add content to your document (see “webhook event”
above); format the content
The webhook service/provider defines the payload. Here's what a small
portion of a payload looks like when it's delivered to a webhook service:
{
"event_id": "LtWXD3crgy",
"event_type": "form_response",
"form_response": {
"form_id": "lT4Z3j",
"token": "a3a12ec67a1365927098a606107fac15",
"submitted_at": "2018-01-18T18:17:02Z",
JSON
Webhooks must deliver responses (payloads) in JSON format, a language
used by programmers. Words for Life provides an interface for these
responses. The example under “payload” above is in JSON format.