A webhook notifies your application backend with an HTTP call when a certain event happens; for example, when a kid’s permissions change, or when a parent registers to use the Parent Portal.
In KWS, you can set up two types of webhook:
- Application-specific webhooks are specific to one application; for example, when a user is activated in that application.
- Global webhooks are specific to user accounts. They affect all the applications in the cluster; for example, when a user account is deleted.
For details of the webhook HTTP specification, see the KWS API specification.
Create an application-specific webhook
- Log into your KWS Control Panel.
- In the main menu, click My Apps and then select the required app.
- In the main submenu, click Webhooks. The Webhooks view is displayed:
- Click Add Webhook. The Create view is displayed:
- Enter the required details:
- a name for the webhook
- the triggering event; for example, ‘user permission changed’
- the webhook URL
- a secret key (or ‘secret code’) to verify the source of the HTTP call
- Click Save.
Create a global webhook
You create global webhooks in the KWS Modules tab. This tab is currently unavailable in the latest version of the KWS Control Panel, so you need to open the previous version. To do this, edit your Control Panel URL as shown in this example:
- In the main menu, click the KWS Modules option.
- Under Global webhooks, click the Configure module button. The Webhooks view is displayed:
- Click the Create Webhook button. The Create Webhook view is displayed:
- Enter the required details and click Create Webhook.