Skip to content

Instantly share code, notes, and snippets.

@cecyc
Last active May 15, 2017 15:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cecyc/8484e8f089cea87040a2c173a59d6ca5 to your computer and use it in GitHub Desktop.
Save cecyc/8484e8f089cea87040a2c173a59d6ca5 to your computer and use it in GitHub Desktop.
Demystifying webhooks: A lot of devs don't know what webhooks are. Let's fix that.

What are they?

http://www.webhooks.org/

Great talk on how webhooks work on a general level: https://vimeo.com/album/4045988/video/172433862

Setting up a webhook: how do?

Set-up a webhook consumer like you would set-up any route in your app: http://cookieshq.co.uk/posts/how-to-receive-webhooks-in-your-ruby-on-rails-application/

Great article from Stripe on how to handle and get started with webhooks: https://stripe.com/docs/webhooks

Development

Most APIs will require a publicly available endpoint to POST callbacks to. How do you do this on your development environment, though?

You can expose a port in your local environemt to the internets with a service like ngrok: https://www.lullabot.com/articles/exposing-callback-and-webhook-urls-on-localhost

Ultrahook is another tool similar to ngrok you can use: http://www.ultrahook.com/

Other languages / frameworks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment