If you need to see what kind of responses you’re going to get from our webhooks, or you need to tunnel directly to your developer environment, there are a selection of tools out there to help you. Here we’ll look at two different options and how to set them up.
Hook Debug (hookdebug.sendgrid.com) works by providing a unique URL that you can set as your endpoint for both the Inbound Parse and the Event Notifications Webhooks. You can then check this URL to see what responses you’re getting back from us.
Each time you visit Hook Debug a new unique URL is generated. Getting set up is as simple as visiting the site and grabbing the URL in the middle of the page.
The URL looks like this:
To have all your event notifications posted to this URL first turn on the Event Notification app in your dashboard.
Next, select which notifications you would like to have send to Hook Debug (if in doubt, tick all the checkboxes to turn them all on) and enter the unique URL generated by Hook Debug as your Post Event URL at the bottom of the page. Once you’ve saved the changes, all event notifications will be sent to Hook Debug for you to check.
Before you can receive data through the Inbound Parse Webhook, you will need to follow the instructions for making changes to your MX records in your DNS setup.
Once that has been completed you can setup your Inbound Parse. In this case, you need to add your Hook Debug URL as the URL to POST to.
After completing the setup for your chosen webhook, the results can be found by heading to your Hook Debug unique URL in a browser, or you can monitor it via CURL by running the following command in your console:
ngrok will be absorbing the LocalTunnel project and offers a selection of newer features that you might find useful when debugging your webhooks.
Start by signing up so you can use all the features available. In particular, the ability to use custom subdomains. This will remove the need to ammend your webhook settings each time you run ngrok.
To get up and running, install and enter the following in your CLI
This would open up a connection to port 3000 on your local machine, at a URL like http://3a4bfceb.ngrok.com
Rather than having to change this every time you restart ngrok, specify the subdomain flag:
This will open up port 3000 and make it accessible at http://myappname.ngrok.com
Additionally, ngrok runs a web interface at http://localhost:4000, that allows you to monitor requests in and out, as well as giving you the ability to replay previous requests at the click of a button.
For more information on what you can do with ngrok, check out their documentation.
You would use this to route Event Notification POSTs and Inbound Parse POSTs directly to your local machine for consumption in your app.
Start by installing LocalTunnel on your machine via RubyGems
The first time you run LocalTunnel, you’ll need to pass a location of a public key for security reasons, you can do that with the following command:
This will open up port 8080 to the outside world via a unique URL. The next time you run LocalTunnel you will not need to pass the public key option. Simply pass a port to LocalTunnel:
This will return a URL that looks something like this:
This is the URL that you would then enter into your Event Notification app or Inbound Parse settings. Once you have this set up, real time notifications will be passed directly through to your development environment without the need to deploy to a server to test your integrations.