Register the webhook
Add a Signals webhook subscriber that posts alerts to your server's public URL, and keep its signing secret.
- Complexity
- 1/5
- Clients
- Console, HTTP
- Time
- 5 minutes
A subscriber is a Signals client with a webhook URL and a list of events. Signals webhooks describes them in full.
Add the subscriberConsole
- Open Signals › Webhooks in the Console and add a subscriber.
- Enter your public URL from the last page, ending in
/signals/webhook. - Choose the event
alert.*. - Choose reach all, so it hears about every patient, including ones you add later. Reach lists the choices.
- Copy the signing secret. The Console shows it once.
- 1Open Signals, then Webhooks.
- 2Add an alert subscriber for every patient.
- 3Copy the signing secret now. It is shown once.
Put the secret in .env as SIGNALS_SIGNING_SECRET and restart your server. To get a new one later, rotate it.
Add the subscriber with the APITerminal
Create a user with the role SUBSCRIBER does the same:
curl --request POST 'https://api.sandbox.ovok.com/v1/signals/api/user' \
--user "${OVOK_MANAGER_ID}:${OVOK_MANAGER_SECRET}" \
--header 'Content-Type: application/json' \
--data '{"role":"SUBSCRIBER","name":"Tutorial alerts","webhookUrl":"https://<your-tunnel>/signals/webhook","events":["alert.*"],"reach":"all"}'The answer carries signingSecret once.
Verify your integration
Send a test event with POST .../webhook/test. Your server should print a webhook.test line.
- If it printed nothing, open Signals › Events and debug the delivery.
- If it answered
400, check thatSIGNALS_SIGNING_SECRETholds the new secret and the server restarted.
Next
Last updated on