Skip to content

Test a webhook

This guide shows you how to receive webhook payloads from Authway before you have built and deployed a receiver.

Prerequisites

  • A webhook registered in a webhook system. You need the id of the system (systemId below).
  • Access to the API that manages your webhook systems.

Receive webhooks in an online service

It is not necessary for you to immediately create or deploy a service that can receive webhook payloads. Instead we recommend you to start with an online service that accepts HTTP POST requests, for example webhook.site. That service lets you get something running quickly and shows the webhook payload directly in your browser.

  1. Set the URL of your webhook to the URL that the online service gives you.
  2. Start (activate) the webhook system by sending POST api/systems/{systemId}/start.
  3. Trigger some events in the source system. You should soon see POST requests arriving in the browser.

Stop and restart the webhook system

You can stop the pushing of new events by sending POST api/systems/{systemId}/stop. To simulate that the system has been stopped because of a failure, you can use the same API. Use the source system to create some more events and then start the system again, and you should see all events posted until it catches up to the last existing event.

You can also get information about the last date/time and event id that have been successfully posted to your webhook by sending GET api/systems/{systemId}.

Receive webhooks on your local machine

Since all webhooks are pushed over the internet, you will have to expose your local machine somehow, if you want to receive webhooks during development. We recommend that you use for example Ultrahook or ngrok to do that.

After configuring a service you will have to update the webhook URL in your webhook system to receive payloads on your new URL.

Next steps