Webhooks Explained: Simplifying Real Time Communication

Webhooks Explained: Simplifying Real Time Communication

The ever-evolving landscape of modern applications & the need for organizations to have real time visibility of their infrastructure has resulted in the birth of a special technology called “Webhooks”. Unlike traditional APIs where one system actively polls another for information, Webhooks allow systems to push data to each other whenever an event occurs thereby enabling real-time communication. It’s because of this special feature that Webhooks are sometimes referred to as “Reverse APIs”. In simple terms, a Webhook is an HTTP POST request which is triggered as a result of a certain event in the system.

In this multi-part series, we will start off by explaining what Webhooks are, how they work and finally end it with a practical real world use case. The table of contents is listed below. You can jump to the relevant section by clicking on the corresponding link,

  1. Webhook Operational Stages
  2. An Example
  3. Webhooks vs Traditional APIs
  4. Hypothetical Scenario
  5. Sample Zoom Webhook Response

Webhook Operational Stages

The implementation of a Webhook typically involves following stages

Stage 1 – Subscription

  • An application subscribes to an event on another system
  • The subscribing application provides a URL where it wants to receive notifications from the destination system.

Stage 2 – Event Trigger

  • When a specific event occurs on the system, it triggers the Webhook

Stage 3 – HTTP POST Request

  • The system sends an HTTP POST request to the URL specified by the subscribing application
  • This request contains relevant data about the event in the payload.

Stage 4 – Processing the Payload

  • The subscribing application processes the payload and takes appropriate actions on it.

An Example

Let’s say we have a proprietary application that’s hosted on the cloud or we are using any public SaaS solution like Zoom. Our objective is that we want our local application to be notified every time a certain specific event occurs on our Zoom instance. For example, when a certain Zoom meeting is being recorded, we want our application to get notified when the recording is done & available for download. This is a good real world example which can help us keep track of how many meetings have been recorded and downloaded for reporting purposes.

  • As shown in the above diagram, our application first has to subscribe to a specific event on the opposite system which is Zoom in this example. This is a one time activity. As a part of this “Subscription” request, our application has to have a URL on which it is supposed to receive the Webhook response from Zoom.

  • If the subscription process is successful, then every time that event to which we have subscribed occurs, the system will send its notification to the URL that we provided in the previous step via HTTP POST method. For our example, this would mean that Zoom will send an HTTP POST message with an appropriate payload. It is then up to the local application to decide how to process that incoming payload.

To explore the rest of the article in detail, please head over to the following link


要查看或添加评论,请登录

Simranjit Singh的更多文章

社区洞察