![]() A webhook lets you say, “call me when he’s warmed up.” Example Webhooks Programmers would call this polling and it’s process-intensive for both sides. In a few minutes he’ll have to call again. He’s making a call to the bullpen to check on the new pitcher. If you watch baseball on television, you’ll often see the manager pick up a phone in the dugout. To do this requires the new pitcher to first warm up in the bullpen, which is usually over 300 feet from the team’s dugout. As the game progresses, they often want to change pitchers. “Call Me When He’s Warmed Up”īaseball managers could really use webhooks. Whenever there’s something new, the webhook will send it to your URL. In some cases, you can tell the provider the situations when you’d like to receive data. That URL is a place within your application that will accept the data and do something with it. To use a webhook, you register a URL with the company providing the service. No request is required for a webhook, it just sends the data when it’s available. With most APIs there’s a request followed by a response. Sometimes people call webhooks reverse APIs, but perhaps more accurately a webhook lets you skip a step. If all goes well, you will receive a response declaring success. For example, using our Web API to send an email, you’d pass the email contents with the request. Programmers who make a request to an API will then receive a response. Then you might combine that with a mapping API, using it as an interface for displaying your data. For example, you might use a places API to look up restaurants by location or name, pulling out a lot of data about each place. What is an API?ĪPI stands for Application Programming Interface, but what does that really mean? Rather than what it is, I find it easier to talk about what APIs enable. Here’s how we break down the differences between webhooks and APIs. Increasingly, you may also see someone mention a “webhook.”Īt SendGrid, we’ve consciously made a distinction between the two in our documentation and any time we write or speak about our seven services for simplifying email. As you become familiar with SendGrid’s services, or even those of many Internet companies, you’ll see the term “API” used a lot.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |