Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Webhooks - The API strikes back

Webhooks - The API strikes back

These days many APIs are more than just simple REST services. Through WebHooks, APIs are talking back, giving us more information and prompting further action from our applications. But what is the best way to react to these demanding APIs?

We'll look at some services that use Webhooks, exploring reasons to use WebHooks and the emerging best practices. Then we'll look at the other side, implementing WebHook endpoints. Does consuming WebHooks make our application an API? What are the easiest ways to develop and test with WebHooks? We'll cover security, performance and standards all wrapped up with some live coded examples.

By the end we'll know how to handle anything an API can throw back at us.

8ec1383b240b5ba15ffb9743fceb3c0e?s=128

Phil Nash

July 03, 2015
Tweet

Transcript

  1. WeB HookS

  2. The api StrikeS bacK

  3. Phil Nash @philnash http://philna.sh philnash@twilio.com

  4. WeB HookS

  5. Three episodes •  Webhooks - A New Hope •  The

    API Strikes Back •  Return of the Developer
  6. WEBHOOKS A NEW HOPE

  7. WHA T A RE WEBHOOKS?

  8. A long time ago, in a galaxy far, far away...

  9. None
  10. None
  11. I COULD TELL YOU...

  12. (+ 48) 732 483 234

  13. WEBHOOKS

  14. QUESTIONS?

  15. Webhooks everywhere •  Twilio •  GitHub •  Braintree •  MailChimp

    •  HipChat •  SendGrid •  DropBox •  Slack •  ...and many more
  16. WORKING WITH WEBHOOKS

  17. None
  18. NGROK

  19. BECOMING A N A PI

  20. Becoming an A PI •  Security •  Performance •  Idempotence

  21. SECURITY

  22. USE HTTPS

  23. WEBHOOK PROVIDERS SIGN THEIR REQUESTS

  24. VERIFY THE SIGNA TURE

  25. SOME WEBHOOK PROVIDERS DON' T SIGN THEIR REQUESTS

  26. ¯ \_( ツ )_/¯

  27. SHA RE SECRETS

  28. PERFORMA NCE

  29. BE GOOD TO YOURSELF A ND THE WEBHOOK

  30. DELA Y LONG RUNNING TA SKS

  31. IDEMPOTENCE

  32. F( F( X)) = F( X)

  33. RETRIES A RE WONDERFUL BUT...

  34. SENDING HUNDREDS OF SMS IS NOT

  35. Webhooks •  Use Webhooks instead of polling •  Use ngrok,

    or similar, for development •  Secure your Webhooks! •  Respond quickly to Webhooks •  Idempotence (idempotence, idempotence...)
  36. Image credits •  Polling Station - secretlondon123

  37. Help me! On a scale of 0 to 10, how

    likely is it that you would recommend this talk to a friend or colleague? (+48) 732 483 234
  38. Thanks! @philnash http://philna.sh philnash@twilio.com On a scale of 0 to

    10, how likely is it that you would recommend this talk to a friend or colleague? (+48) 732 483 234