Syntax - Tasty Web Development Treats

Hasty Treat - Webhooks


Listen Later

In this Hasty Treat, Scott and Wes talk about webhooks — one of those concepts that seems a lot scarier than it actually is.

Linode - Sponsor

Whether you’re working on a personal project or managing enterprise infrastructure, you deserve simple, affordable, and accessible cloud computing solutions that allow you to take your project to the next level. Simplify your cloud infrastructure with Linode’s Linux virtual machines and develop, deploy, and scale your modern applications faster and easier. Get started on Linode today with a $100 in free credit for listeners of Syntax. You can find all the details at linode.com/syntax. Linode has 11 global data centers and provides 24/7/365 human support with no tiers or hand-offs regardless of your plan size. In addition to shared and dedicated compute instances, you can use your $100 in credit on S3-compatible object storage, Managed Kubernetes, and more. Visit linode.com/syntax and click on the “Create Free Account” button to get started.

LogRocket - Sponsor

LogRocket lets you replay what users do on your site, helping you reproduce bugs and fix issues faster. It’s an exception tracker, a session re-player and a performance monitor. Get 14 days free at logrocket.com/syntax.

Show Notes

03:42 - What are webhooks?

  • User-defined HTTP callbacks
  • When something happens, ping this URL with this data
  • Examples:
    • When something sells, ping this URL
    • When someone reverses a charge, lock their account
    • Trigger a build of the website when the content changes
    • Then someone buys a shirt, generate a shipping label and save it to the DB

07:57 - Sending End

  • Can be a great way to hook two services together

09:13 - Receiving End

  • Often you will be the one that accepts the webhook ping
  • In this case, you set up an endpoint

11:00 - Payloads

  • Almost all will send a JSON body that you parse out
  • The method send is variable

11:51 - Auth

  • On the receiving end of a webhook, you often get a token which you can then ping the service with. It will tell you if that request was legit or not.
  • On the sending end, you can often set up headers with auth - same with the method
  • Can be a replacement for a serverless function

13:18 - Testing webhooks

  • Can be a pain in the ass
  • ngrok - expose locally
  • localtunnel
  • Insomnia
  • Postman
  • Stripe has a great VS code extension
  • Snipcart has an awesome dashboard
    • Will also tell you when one failed
  • webhook.site
  • https://expose.dev/
  • IFTTT
  • Zapier
  • Tweet us your tasty treats!
    • Scott’s Instagram
  • LevelUpTutorials Instagram
  • Wes’ Instagram
  • Wes’ Twitter
  • Wes’ Facebook
  • Scott’s Twitter
  • Make sure to include @SyntaxFM in your tweets
  • ...more
    View all episodesView all episodes
    Download on the App Store

    Syntax - Tasty Web Development TreatsBy Wes Bos & Scott Tolinski - Full Stack JavaScript Web Developers

    • 4.9
    • 4.9
    • 4.9
    • 4.9
    • 4.9

    4.9

    977 ratings


    More shows like Syntax - Tasty Web Development Treats

    View all
    Software Engineering Radio by se-radio@computer.org

    Software Engineering Radio

    271 Listeners

    Hanselminutes with Scott Hanselman by Scott Hanselman

    Hanselminutes with Scott Hanselman

    383 Listeners

    The Changelog: Software Development, Open Source by Changelog Media

    The Changelog: Software Development, Open Source

    289 Listeners

    Software Engineering Daily by Software Engineering Daily

    Software Engineering Daily

    622 Listeners

    Talk Python To Me by Michael Kennedy

    Talk Python To Me

    585 Listeners

    Soft Skills Engineering by Jamison Dance and Dave Smith

    Soft Skills Engineering

    289 Listeners

    Thoughtworks Technology Podcast by Thoughtworks

    Thoughtworks Technology Podcast

    43 Listeners

    Python Bytes by Michael Kennedy and Brian Okken

    Python Bytes

    215 Listeners

    The freeCodeCamp Podcast by freeCodeCamp.org

    The freeCodeCamp Podcast

    487 Listeners

    CoRecursive: Coding Stories by Adam Gordon Bell - Software Developer

    CoRecursive: Coding Stories

    190 Listeners

    Practical AI by Practical AI LLC

    Practical AI

    207 Listeners

    The Stack Overflow Podcast by The Stack Overflow Podcast

    The Stack Overflow Podcast

    63 Listeners

    The Real Python Podcast by Real Python

    The Real Python Podcast

    142 Listeners

    PodRocket by LogRocket

    PodRocket

    60 Listeners

    Oxide and Friends by Oxide Computer Company

    Oxide and Friends

    62 Listeners