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

  1. Open Signals › Webhooks in the Console and add a subscriber.
  2. Enter your public URL from the last page, ending in /signals/webhook.
  3. Choose the event alert.*.
  4. Choose reach all, so it hears about every patient, including ones you add later. Reach lists the choices.
  5. Copy the signing secret. The Console shows it once.
  1. 1Open Signals, then Webhooks.
  2. 2Add an alert subscriber for every patient.
  3. 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.

  1. If it printed nothing, open Signals › Events and debug the delivery.
  2. If it answered 400, check that SIGNALS_SIGNING_SECRET holds the new secret and the server restarted.

Next

Debug deliveries.

Last updated on

On this page