Webhook

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Coffee (talk | contribs) at 05:08, 13 December 2019 (Reverted edits by 76.68.93.174 (talk) to last version by Ohnoitsjamie). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

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]

The format is usually JSON. The request is done as a HTTP POST request. The receiving endpoint can choose to whitelist certain IP addresses from known sources. The webhook can include information about what type of event it is, and a secret or signature to verify the webhook. GitHub and Stripe[2] sign their requests using an HMAC signature included as an HTTP header. Facebook signs their requests using SHA-1.[3] The client can also establish the connection using a TLS client certificate which the endpoint can verify.

Function

Webhooks are "user-defined HTTP callbacks".[4] They are usually triggered by some event, such as pushing code to a repository[5] or a comment being posted to a blog.[6] When that event occurs, the source site makes an HTTP request to the URL configured for the webhook. Users can configure them to cause events on one site to invoke behavior on another.

Common uses are to trigger builds with continuous integration systems[7] or to notify bug tracking systems.[8] Because webhooks use HTTP, they can be integrated into web services without adding new infrastructure.[9]

See also

References

  1. ^ Web hook to revolutionize the web, archived from the original on 2018-06-30
  2. ^ "Checking Webhook Signatures". Stripe. Stripe, Inc. Retrieved 12 May 2019.
  3. ^ "Getting Started - Graph API - Documentation - Facebook for Developers". Facebook. Facebook, Inc. Retrieved 12 May 2019.
  4. ^ "Webhooks". Atlassian. Retrieved 2019-09-24.]
  5. ^ About Webhooks - GiHhub Help
  6. ^ WordPress Webhooks
  7. ^ Jenkins GitHub Commit Hooks HOWTO, archived from the original on 2015-09-25
  8. ^ Google Project Hosting - Post-Commit Web Hooks
  9. ^ What are WebHooks and How Do They Enable a Real-time Web?

External links