Server Side WebHooks
Integrating Custom Business Processes into Cinema8 Videos
A webhook (also called a web callback or HTTP push API) is a way for an app to provide other applications with real-time information. A webhook delivers data to other applications as it happens, so you receive data immediately. Cinema8 Webhooks allow you to inject your own business processes into interactive videos.
Cinema8 server-side webhooks allow you to send and receive structured data between your video content and your application backends in real time.
Creating a Webhook
Let’s go over the steps to add a webhook.
First, return to the main menu and click on the Integrations button.
Then click the Webhooks button. Click the Add Webhook button.
Let’s look at the webhook settings:
- Enter the name of the webhook.
- Enter the URL where data will be posted. You can also create custom headers to increase security.
- Specify the name of the header.
- Enter values for the header to validate requests.
- Click to add additional headers.
- Enable this to pause the video until the webhook responds.
- Enable this to include earlier interaction data in the webhook.
- Click Save to apply your settings.
Adding Webhook to Video
Now, create a test webhook by following the steps above.
The test URL uses a simple echo service that returns two example values: discountCode
and imageUrl
.
To display them in your video:
- Add two HTML elements to your video.
- In the Source Code field of the first HTML tool, add:
DiscountCode: ${discountCode}
- In the second HTML tool, add:
<img src="${imageUrl}" />
Next, add a Clickable Area element to trigger the webhook.
Set its On Click action to Execute Webhook.
Once clicked, the webhook is activated and sends data to the HTML elements in the video.
Cinema8 Webhooks support nested object models, allowing you to access deeply structured data within your responses.
Learn how to use webhooks effectively in your interaction designs.