What is Webhook?

We must understand the concept of webhook as most of the websites provide webhooks to subscribe their events.

When I heard this concept for the first time, I was amazed and really wondering how to actually use it. Then  I researched on it and found the concept interesting and would like to share the same with you.

Let us look at a scenario in real life. you have to pick up someone who has gone for a live concert and not sure when the concert would be over. You are calling that person around the estimated time and asking after every 10 mins if the concert is over and he/she should be picked up. Here instead of you calling that person again and again, you both mutually decide that  the person will call you once the concert is over and then you will come and pick up.  This is like call me up once done :). This is exactly what webhook does.

The Wikipedia definition of webhook is

“A webhook in web development is a method of augmenting or altering the behavior of a web page, or web application, with custom callbacks. These callbacks may be maintained, modified, and managed by third-party users and developers who may not necessarily be affiliated with the originating website or application. The term “webhook” was coined by Jeff Lindsay in 2007 from the computer programming term hook.[1]

Most of us are familiar with the word API which stands for Application Programming Interface. Whenever we need data or  any functionality, we call the APIs and get  required data such as find the good restaurants in this area. We use APIs to send the survey. However when we need real-time response when anyone responds to the survey, our program cannot keep calling the API frequently and check if there is any response. Instead of doing this tiresome job, we register the webhook and it informs us whenever there is any response.

Webhook is HTTP call back and it shares the data whenever it is available.

Similar concept is used in Kaizala or many other websites to provide us the response. We need to register web URL with their service and whenever event happens it would post the data to your url. Now it is up to you what you want to with this data.Most of webhooks I have come across, post the data in the form of  JSON format.

You can just create an event handler, host it on Azure and register its url to the webhook.

Please go through the below link for webhook reference.

https://www.chargebee.com/blog/what-are-webhooks-explained/

In my next blog let us see how to use the webhook in Kaizala and get the survey response on real time.

Thank you for reading for my blog. Please comment and share if you like if you find the write up useful.

3 thoughts on “What is Webhook?

  1. This is really nice blog and explains concept very well. One question as webhook call is http and not secured call is there a provision of secured call in case of secured applications?

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s