How to send and receive XenForo Webhooks
Table of Contents
- Create Webhooks in XenForo
- Receive Webhooks in WordPress
As of XenForo 2.3+ and XFtoWP 1.6+, your WordPress websites can now receive Webhooks from your XenForo community.
Think of Webhooks as messages sent from your XF site to your WP site when something happens, like when a new message is posted. This enables your websites to stay more closely connected and run more powerful sync actions.
Webhooks already power some features in XFtoWP, and will be used to create new kinds of wonderful integrations, so you may need to use this magical messaging system at some point.
Create Webhooks in XenForo
Out of the box, XenForo offers loads of Webhooks you can start broadcasting from your forum in XenForo admin > Setup > Webhooks > Add webhook:

Once you are on this admin screen, you can design your own Webhook message to send from a number of Content Types around your forum. But first, you have to create a few details about where to send the Webhooks to on your WP site.
First, make up a Target URL that points to your WP site. This page doesn’t have to actually exist, and shouldn’t be easy to guess or easily accessed by users.
https://wpdomain.com/89hueqwfn-ew089N
Next, add a Secret key to this URL, which should act like a password and will be checked for extra authentication by your WP site.
Now that these two details are out of the way, you can select the data you wish this Webhook to be responsible for broadcasting.
You may wish to create a new Webhook for each Content Type, or combine lesser used Content Types into a single request; the choice is yours.
Once you are designing designing your Webhook, save the options. In the next step you will need to copy your Target URL and Secret key into your WordPress plugin settings.
Receive Webhooks in WordPress
Now that your your XenForo site is sending Webhook messages, your WordPress website must be granted permission to accept them.
The magic behind Webhooks is actually quite simple—they are just HTTP requests sent from one site to another. On such terms, it is responsible to only accept messages you trust and XFtoWP helps ensure the data your site receives and processes only comes from your forum.
Go to WP admin > XFtoWP > Site Setup > Webhooks and enter the Target URLs and Secret keys of the Webhooks you just created in XenForo:

While theoretically your website can receive Webhooks from any domain, only the URLs with the matching secret key will be accepted and processed through XFtoWP’s logging and actions system.
Save your settings and your WordPress website will now receive Webhooks messages from your XenForo community!
You can now go to the Webhooks tab in your WP admin to see a log of the most recently received Webhooks as they happen from your XenForo community.
