Testing webhooks without a public endpoint
Is there a way to send a test event to a local development URL, perhaps through a tunnel, without fully registering it?
Is there a way to send a test event to a local development URL, perhaps through a tunnel, without fully registering it?
Yes, spin up a tunnel with something like ngrok or cloudflared pointed at your local dev server, then register the tunnel URL as the webhook endpoint temporarily. Just remember to swap it back before it expires.
Yes, spin up a tunnel with something like ngrok or cloudflared pointed at your local dev server, then register the tunnel URL as the webhook endpoint temporarily. Just remember to swap it back before it expires.
ngrok worked great for us for exactly this, the free tier was plenty for testing.
cloudflared worked well for us too, similar setup to the ngrok mention above.
Just a reminder to swap the webhook URL back to your real endpoint once testing is done, a stale tunnel URL will start silently failing once the tunnel closes.
cloudflared has been solid for us too, easy to set up.
Appreciate the reminder about swapping the URL back, almost forgot on my first try.
For anyone testing frequently, a dedicated persistent tunnel subdomain is worth setting up once rather than spinning up a new one each time.
This thread saved me a lot of guessing, thanks all.
Sign in to reply to this question.