Webhooks are great! They are a perfect way for API services like Twilio to notify your application of events such as incoming calls or text messages. The one difficulty is that when you are developing an application that consumes webhooks you need a publicly accessible URL to configure the webhook service with. Typically you would develop on localhost and the rest of the world would have no access to your application, so how do you test your webhooks?

Well, that’s where ngrok comes in. ngrok is a free tool that allows us to tunnel from a public URL to our application running locally. Here’s my 6 favourite things about ngrok:

1. It’s really easy to install and use

ngrok is built in Go so it is packaged as binaries for each major platform. To install ngrok do the following:

Download the package for your system Unzip the package There is no step 3!

Well, there is no step 3 if you have a Mac or Linux, if you’re on Windows you might have a bit more work to do. Thankfully Devin’s got you covered with his post on how to configure ngrok on Windows.

Once you have ngrok installed, using it to tunnel to an application running on, say, port 3000 is as easy as: