Help > Forum > Website Integration > Using Webhooks

Using Webhooks

Use webhooks to be notified about events that happen in your forum.

When the event occurs - for example, when a new user creates an account on your forum - Website Toolbox creates an Event object. This object contains all the relevant information about what just happened, including the type of event and the data associated with that event. We then send the Event object as JSON to your webhook URL via an HTTP POST request.

Webhooks work great when combined with the forum API. For example, the webhook can notify your application when a new user signs up for your forum and then you can use the API to make modifications to that user's forum account.

The forum Growth or Pro plan is required to use this feature.


Configuring your webhook settings

  1. Log in to your Website Toolbox account.
  2. Click the Integrate link.
  3. Click the Webhook link.
  4. Enter your webhook URL in the text box next to the Webhook option.

Responding to a webhook

View our sample code for receiving a webhook event.

To acknowledge receipt of a webhook, your endpoint should return a 2xx HTTP status code. Any other information returned in the request headers or request body is ignored. All response codes outside this range, including 3xx codes, will indicate that you did not receive the webhook. This does mean that a URL redirection or a "Not Modified" response will be treated as a failure.

If a webhook is not successfully received for any reason, we will continue trying to send the webhook once an hour for up to 3 days.


An example event

{
  "api_version": "1",
  "data": {
    "object": {
      "signature": "Thanks, John.",
      "name": "John Doe",
      "allowEmails": false,
      "lastPostTimestamp": 0,
      "userGroups": [7440, 2452, 52423],
      "userTitle": "Power User",
      "reputation": 423,
      "username": "john",
      "postCount": 32,
      "userId": 181855,
      "lastVisitTimestamp": 1322811119,
      "instantMessagingType": "",
      "instantMessagingId": "",
      "object": "User",
      "invisible": false,
      "email": "johnDoe@gmail.com",
      "avatarUrl": "https://test.com/images/avatar.png",
      "joinDateTimestamp": 1322811119,
      "enableMessages": true
    }
  },
  "object": "event",
  "id": 1534,
  "type": "user.created",
  "mode": "live"
}


Viewing webhook events and responses

You can view the events that were sent to your webhook and the response that was received from your webhook by following the instructions below:

  1. Log in to your Website Toolbox account.
  2. Click the Integrate link.
  3. Click the Webhook link.


If you still need help, please contact us.