How its Work
- Attach the small code snippet to a web application/site to ‘listen’
- Trigger event occurs
- Webhook sees the event and catches the specified data
- Forwards the information back to your app
- Data is aggregated and consumed
Push is the simplest of reasons to use WebHooks. As was just stated above, no more polling every couple of minutes to find out if there is new information.
Just register a WebHook and receive the data at your doorstep as soon as it exists. It's less work, less hassle, and you'll probably even receive it sooner than if you were asking for it every couple of minutes.
Pipes: Receiving Data and Passing it on
A Pipe happens when your Webhook not only receives real-time data, but goes on to do something new and meaningful with it, triggering actions unrelated to the original event.
For example, you create a script, register its URL at a photo site, and have it email you when your mother posts a new photo. Or make a script that creates a Twitter message, and have it triggered by a WebHook whenever you add a new product on your commerce website.
Plugins: processing data and giving something in return
The entire web becomes a programming platform. You can use this form of WebHooks to allow others to extend your application. Facebook's Application Platform uses WebHooks in this way, and so does Google Wave's robot integration. The general idea is that a web application sending out data via WebHooks will also use the response to modify its own data.
Authorizing a webhook request Odoo Webhooks authorization relies on OAuth 2.0 protocol. Need following information for authorization:
- Requested by which user?
- A request put in 15 minutes window will be considered valid
- To prevent hacking - Unique token (Nonce) generated has not to be repeated in 15 minutes window.
- Any application requires request-headers or query string with enough information to authorize webhook requests in Odoo.



Comments
Post a Comment