$30 off During Our Annual Pro Sale. View Details »

The trouble with webhooks - at APIdays Singapore

Phil Nash
August 19, 2020

The trouble with webhooks - at APIdays Singapore

Webhooks are a core part of the way developers interact with the Twilio API but can be the hardest to work with when learning the platform. Discover the many ways the Twilio team has tried to improve the experience, from documentation, tooling and serverless functions, all the way to building and releasing a video game.

--

Links:

TwilioQuest: https://www.twilio.com/quest
Twilio CLI and open source projects: https://github.com/twilio-labs

Phil Nash

August 19, 2020
Tweet

More Decks by Phil Nash

Other Decks in Programming

Transcript

  1. THE TROUBLE WITH
    WEBHOOKS
    @philnash

    View Slide

  2. Phil Nash
    @philnash
    https://philna.sh
    [email protected]

    View Slide

  3. WHAT IS A
    WEBHOOK?
    @philnash

    View Slide

  4. What is a webhook?
    “User defined HTTP callbacks”
    POST /webhook HTTP/1.1
    Host: www.yourwebsite.com
    @philnash

    View Slide

  5. Who uses webhooks?
    Twilio, SendGrid, Stripe,
    GitHub, DropBox, Auth0,
    Slack...
    @philnash

    View Slide

  6. WHAT'S THE
    TROUBLE?
    @philnash

    View Slide

  7. HOW DO I TEST THIS?
    @philnash

    View Slide

  8. How do I test this?
    Online: RequestBin, PostBin
    Tunnels: ngrok, localtunnel
    Deploy and test in production

    @philnash

    View Slide

  9. WHAT CAN WE DO
    ABOUT IT?
    @philnash

    View Slide

  10. DOCUMENTATION
    @philnash

    View Slide

  11. TWIMLETS
    @philnash

    View Slide

  12. @philnash

    View Slide

  13. TWIMLBINS
    @philnash

    View Slide

  14. @philnash

    View Slide

  15. SERVERLESS
    @philnash

    View Slide

  16. @philnash

    View Slide

  17. STUDIO
    @philnash

    View Slide

  18. @philnash

    View Slide

  19. TWILIOQUEST
    @philnash

    View Slide

  20. @philnash

    View Slide

  21. @philnash

    View Slide

  22. @philnash

    View Slide

  23. SERVERLESS
    TOOLKIT
    @philnash

    View Slide

  24. Serverless Toolkit
    twilio-run
    create-twilio-function
    function-templates
    @philnash

    View Slide

  25. TWILIO CLI
    @philnash

    View Slide

  26. Twilio CLI
    $ npm install -g twilio-cli # brew install twilio-cli
    $ twilio api:core:messages:list
    $ twilio debugger:logs:list
    @philnash

    View Slide

  27. TWILIO CLI
    PLUGINS!
    @philnash

    View Slide

  28. Twilio CLI
    $ twilio serverless:init new-project
    $ twilio serverless:start --ngrok=""
    $ twilio serverless:deploy
    @philnash

    View Slide

  29. THE TROUBLE WITH
    WEBHOOKS
    @philnash

    View Slide

  30. Attack on multiple fronts
    Simple applications: Twimlets & TwiMLBins
    Education: TwilioQuest
    Non developers: Studio
    Dev environment: Serverless Toolkit & Twilio CLI
    @philnash

    View Slide

  31. Interested?
    Play TwilioQuest: twilio.com/quest
    Open source projects: github.com/twilio-labs
    @philnash

    View Slide

  32. Thanks!
    @philnash
    https://philna.sh
    [email protected]

    View Slide