> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ofauth.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Test webhooks locally

> Use a Cloudflare Quick Tunnel to send OFAuth webhooks to your local receiver.

A Cloudflare Quick Tunnel gives your local webhook receiver a public HTTPS URL. Add that URL to OFAuth to receive events on your computer. You do not need to deploy your app.

## Prepare the receiver

Use your own receiver or clone the [webhook example](https://github.com/ofauth-source/example-node-webhooks). The example listens on port `3001` and uses `/webhooks/ofauth`.

```bash theme={null}
git clone https://github.com/ofauth-source/example-node-webhooks.git
cd example-node-webhooks
npm install
```

## Expose it over HTTPS

Install [`cloudflared`](https://developers.cloudflare.com/tunnel/downloads/) and start a Quick Tunnel:

```bash theme={null}
cloudflared tunnel --url http://127.0.0.1:3001
```

Keep the tunnel running. Add `/webhooks/ofauth` to the end of its generated HTTPS URL. For example, `https://example.trycloudflare.com` becomes `https://example.trycloudflare.com/webhooks/ofauth`.

## Start and verify the receiver

Follow [Set up webhooks](https://docs.ofauth.com/v3/guides/webhook-setup.md#add-a-destination) to add the URL in the environment you want to test. Copy the destination's signing secret into your receiver's environment, then start the receiver. For the example, run:

```bash theme={null}
cp .env.example .env
```

Replace `YOUR_DESTINATION_SIGNING_SECRET` in `.env` with the secret you copied. Run `npm start`.

Select **Verify** in the dashboard. Then trigger an event in that environment. Confirm that the receiver prints the event's ID and type.

Quick Tunnel URLs change when the tunnel restarts. Update and verify the destination when the URL changes. Stop the tunnel when you finish.

For a Test environment, lifecycle events can describe real designated accounts while still carrying `test: true`. Keep Test data separate from Live data. See [Test deliveries](https://docs.ofauth.com/v3/api-reference/webhooks.md#test-deliveries).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.