Webhooks
Webhooks provide realtime notifications when changes occur on your apps and spaces. Before continuing you should read the general introduction to Podio webhooks and review the list of webhook events.
Creating webhooks
The easiest way to create a new webhook is to do it manually in the developer section for the app. There are you can create most webhooks through a point and click interface. Not all webhooks can be created here. The rest you most create programmatically. E.g. if you only want to receive updates about a single field in an app:
Immediately after you create a webhook you must verify it. Verifying just means the URL you provided must respond to a special type of webhook event called hook.verify
. See the full example below for how to verify a webhook.
If you create your webhook ahead of the URL being available you must manually request a webhook verification:
Checking webhooks status
If you are unsure of the status of your hooks you can get a list of all hooks for a reference:
Troubleshooting webhooks
When webhooks fail to show up it’s typically for one of the following reasons:
- Not a public URL. Webhooks must be available on the public internet. You can test them locally using tools like RequestBin or Webhooks.site. For the same reason they cannot reside behind your corporate firewall.
- Not on a standard port. Webhooks must be served on port 80 for http and 443 for https.
- Incoming requests blocked by firewall/hosting provider. Your IT department or hosting provider may be blocking webhooks.
- Query string parameters will be converted to POST parameters. Because webhooks are POST requests any query string parameters will be converted to a POST parameter. If your URL is
http://example.com/hook?foo=bar
you will not be able to use$_GET['foo']
- use$_POST['foo']
instead.
Full webhooks example
This is a standalone script that will verify all webhook verification requests and log all webhooks it receives to a text file. It uses app authentication. Upload this to a URL and register webhooks pointing to that URL to get started with webhooks. It only logs item creation, deletion and updates, but there are more events you can add yourself.