Webhooks & OAuth callbacks
Payment providers, Git hosts, chat platforms and sign-in providers need a URL on the internet that reaches your
code. With dcp that URL points at your laptop, and it stays the same: register it once, and it works every day you run
dcp.
https://bigfoot.tail1234.ts.net/api/webhooks/stripe
- https://bigfoot.tail1234.ts.net
- Your machine. Same name tomorrow, after a reboot, on another network.
- /api/
- The project folder of the dev server that should receive it.
- webhooks/stripe
- Your app's own route, unchanged.
dcpThe workflow
- Start the app that receives the call, as usual.
- Sharing is on by default (public: the provider is outside your Tailscale network).
dcp lsprints each link, anddcp url api --tailscalejust one. - Paste
https://<machine>.<tailnet>.ts.net/<project>/<your route>into the provider's settings. Once. - Trigger the event. The request reaches your app with its body and headers untouched, so signature checks pass.
A Cloudflare link, https://<app>-<machine>.<zone>, is a stable public URL too, under your own
domain and with no path prefix, and works with any of these services: dcp url api --cloudflare prints it.
The link stays up while the machine is on, after reboots too: the local HTTPS proxy keeps sharing. When the app is stopped, the provider gets an error and retries later, as it would with a deployed site that is down.
Examples
Dashboard: Developers, Webhooks, Add endpoint.
Endpoint URL https://bigfoot.tail1234.ts.net/api/webhooks/stripeYour handler verifies Stripe-Signature with the endpoint's signing secret, as in production. With the Stripe CLI
you'd run stripe listen in every session and get a new secret each time; this endpoint and its secret stay.
Repository or app settings, Webhooks.
Payload URL https://bigfoot.tail1234.ts.net/api/webhooks/github
Content type application/json"Recent deliveries" in the same settings page shows each attempt and lets you redeliver one while you fix the handler.
App settings: Event Subscriptions (Request URL) and Interactivity.
Request URL https://bigfoot.tail1234.ts.net/api/slack/eventsSlack sends a challenge when you save the URL, so dcp and the app must be running at that moment.
Register the callback as an authorized redirect URI, next to production's.
Google https://bigfoot.tail1234.ts.net/web/auth/callback/google
GitHub https://bigfoot.tail1234.ts.net/web/auth/callback/githubRun dcp --forward-host so the app sees the public host (X-Forwarded-Host, X-Forwarded-Proto: https) and builds
the same redirect URI it registered; without it the app sees localhost and the provider rejects the mismatch.
When the provider can't reach it
| What you see | Why | Fix |
|---|---|---|
| Timeout, connection refused | sharing is off, tailnet-only (Serve), or not online | dcp status names the fix; dcp tailscale on --public (Stripe or GitHub is never on your tailnet), or a Cloudflare link (When a link does not open) |
| 404 from dcp | no dev server for that project is running | start it; dcp ls shows the project names |
| 502 | the app is starting, or crashed | check the app's own logs |
| OAuth: redirect URI mismatch | the app built a localhost redirect | dcp --forward-host |
| The URL changed | the machine was renamed in Tailscale (both links carry its name) | rename it back in the admin console, or update the provider |
| Not sure it answers from outside | a new link, or a changed setting | dcp check: DNS, certificate and status of every link |
More in Troubleshooting.