What is webhook?
December 29, 2022
Written by Kamal Hossain and Andalib Kibria

What are webhooks and how do they operate? Essentially, webhooks accept a request from another server, which then validates that request in order to accomplish a certain task. That said task can vary but one component that differs webhooks from polling is the automation factor.
Webhooks connect two applications together. Our Ark-am website uses an automated deployment process where we do not deploy our site directly to the server, but rather, we push our application to a code hosting platform, such as GitLab or in our case, Github. So, whenever a new change in the code is pushed to Github, the platform then sends a request to our server to let it know about those changes and thus, a new version should be deployed for our website (see diagram below).

Polling on the other hand is less automated, where the communication between the two applications need constant confirmation for each step.
A great analogy when explaining this concept is like a neighbor asking for sugar. The neighbor knocks on your door (request), asks if you have any sugar (information), and then sends over the sugar (delivery).
Webhooks automate by sending the sugar straight to your house whenever you run low on supply, and this request only needs to be set up once between the two neighbors. Therefore, since only one request is made, users don’t have to send multiple requests in order to acquire the information, thus saving time, steps and data.
One important note to mention is to properly secure webhooks. Due to its automation nature, if any webhooks does not validate the incoming request to perform the task, then this can cause a security breach. We delve more into this topic on a future blog, but for now, we thank you for reading and hope that this has helped in some shape or form.
Share this at