> Markdown version of https://tuna.am/en/docs/troubleshooting/webhook-not-delivered/. Documentation index: [llms.txt](https://tuna.am/en/llms.txt), full text in one file: [llms-full.txt](https://tuna.am/en/llms-full.txt). Any page is available as Markdown: append `.md` to its URL without the trailing slash.

# Webhook doesn't reach the app

The provider (GitHub, Telegram, YooKassa and others) says the webhook was sent or failed, but the app never received it. Go through the steps in order: each one rules out part of the causes.

To set up a webhook from scratch, see the examples for [Telegram](https://tuna.am/en/docs/tunnels/examples/telegram.md), [GitHub](https://tuna.am/en/docs/tunnels/examples/github.md), [Stripe](https://tuna.am/en/docs/tunnels/examples/stripe.md) and [YooKassa](https://tuna.am/en/docs/tunnels/examples/yookassa.md).

## 1. The tunnel is running

Check that `tuna http` is running and the console shows no connection errors. Active tunnels are listed in the [dashboard](https://my.tuna.am/tunnels?lang=en).

If the tunnel is down, the provider gets ["Tunnel is offline"](https://tuna.am/en/docs/troubleshooting/errors/tunnel-offline.md) with a 502 code or ["Tunnel not found"](https://tuna.am/en/docs/troubleshooting/errors/tunnel-not-found.md) with a 404 code. Many providers show the response code in their delivery log, so check it there.

## 2. The provider has the tunnel's address

Compare the address in the webhook settings with the address in the tuna console, including the path, for example `/webhooks/github`.

A common cause is a [dynamic address](https://tuna.am/en/docs/tunnels/http.md#dynamic): it changes on every restart, while the provider keeps the old one. For webhooks, use your [free permanent subdomain](https://tuna.am/en/docs/tunnels/http.md#free-subdomain). See [Tunnel address changes after a restart](https://tuna.am/en/docs/troubleshooting/address-changes.md) for details.

## 3. The request shows up in the inspector

Open the [inspector](https://tuna.am/en/docs/tunnels/inspect.md) at `http://127.0.0.1:4040` and send a test webhook: most providers have a button for this in the webhook settings.

If the request isn't in the inspector, it never reached tuna. Check the address from step 2 again, and the provider's delivery log: it shows whether the provider got a response and which one.

If the request is in the inspector, go to step 4.

## 4. tuna didn't reject the request

If the request has a Policy label in the inspector, it didn't reach the app. The details show which rule matched:

* [`--verify-webhook`](https://tuna.am/en/docs/tunnels/http.md#verify-webhook): the signature didn't match, response `401`. Check that the secret in `--verify-webhook-secret` matches the one set at the provider, and that the provider name is right;
* [`--cidr-allow`](https://tuna.am/en/docs/tunnels/http.md#cidr): the provider's IP address isn't in the allowed ranges;
* [`--basic-auth`](https://tuna.am/en/docs/tunnels/http.md#basic-auth) or [`--key-auth`](https://tuna.am/en/docs/tunnels/http.md#key-auth): the provider doesn't send the username and password or the key;
* a [traffic policy](https://tuna.am/en/docs/traffic-policy.md): a `deny` rule or another action matched.

The free plan's warning page doesn't affect webhooks: only browsers see it, and webhook senders go straight through.

## 5. The app responded successfully

Look at the app's response in the inspector:

* `404`: the app doesn't know this path. Compare the path at the provider with the route in the app;
* `5xx`: an error in the handler. Look for it in the app logs;
* ["Resource is not responding"](https://tuna.am/en/docs/troubleshooting/errors/resource-not-responding.md): tuna can't reach the app, because it isn't running or listens on another port;
* a dev server response like `Invalid Host header`: see [The app responds with "Invalid Host header" or "Blocked request"](https://tuna.am/en/docs/troubleshooting/host-not-allowed.md);
* the response came back, but the provider still marks the delivery as failed: check how long the app took to respond. Providers wait for a limited time, so move long processing to the background and respond `200` to the provider right away.

## Debugging without resending

Once the request is in the inspector, you don't have to trigger the webhook at the provider every time. Fix the code and click [Replay](https://tuna.am/en/docs/tunnels/inspect.md#replay): the request goes out again byte for byte, so the signature still matches.

To see what the provider sends at all, without your app, create a link in [Webhooks](https://tuna.am/en/docs/webhooks.md): it accepts the request and shows its headers and body.
