🔮 Sanity Create is here. Writing is reinvented. Try now, no developer setup

Testing a Webhook with Localhost Endpoint using ngrok

5 replies
Last updated: May 28, 2020
Does anyone know if it’s possible to test a Webhook with an endpoint running on localhost? I’m assuming that the sanity server is the one that actually calls the webhook so testing on localhost wouldn’t work?
May 28, 2020, 11:42 PM
Looks like localhost isn’t allowed as a hook url. Makes sense, but that means I have to have an endpoint already deployed before I can test
May 28, 2020, 11:46 PM
You could use ngrok to tunnel to your local endpoint
May 28, 2020, 11:47 PM
May 28, 2020, 11:47 PM
ahhhh great idea. Thanks!
May 28, 2020, 11:48 PM
For what it’s worth, I got a quick serverless function deployed to netlify and that worked as well but ngrok will be super useful for testing this giong forward
May 28, 2020, 11:58 PM

Sanity– build remarkable experiences at scale

Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?