100% Free · Open Source GPLv2 · Zero setup requiredGet the Plugin

Opens in a new tab
ITX UserOps
Experimental

Setting up outbound webhooks

Machine-to-machine event delivery — the payload, the signature to verify, and what fire-and-forget does and does not promise.

Experimental. The delivery path is implemented and tested, but verify what your receiver actually gets before building anything load-bearing on it. And read the delivery-semantics section — it is the part that decides what webhooks are for.

What a webhook is here — and is not

Every event on the plugin's bus — sign-ins, role changes, disables, containments — can be POSTed as JSON to URLs you configure. That is machine-to-machine plumbing: a receiver you wrote, an automation platform, an internal service.

If what you actually want is "tell the team in Slack when something happens", stop here — that is Alerts, which has native Slack, Discord, Telegram and ntfy channels with human-readable messages. Webhooks deliver raw JSON; pointed directly at a Slack incoming-webhook URL they will not render anything useful.

1. Add an endpoint

ITX UserOps → Integrations → Webhooks. Each endpoint has:

  • URL — HTTPS, yours.
  • Secret — used to sign every delivery; generate a long random one and store it on the receiving side too.
  • Events — which event keys this endpoint receives. * means everything; a list means only those. The event keys are the same names you see in the Activity Log's event filter — login_failed, role_changed, user_disabled, and so on.
  • Active — endpoints can be kept configured but switched off.

2. Know the payload

Every delivery is one event, as JSON:

{
  "event": "role_changed",
  "severity": 2,
  "user_id": 2119,
  "actor_id": 1,
  "ip": "203.0.113.9",
  "meta": { "old_roles": ["subscriber"], "new_role": "editor" },
  "site": "https://your-site.example",
  "timestamp": "2026-08-12T14:03:22+00:00"
}

meta varies by event — it carries the same structured detail the Activity Log shows. site is there so one receiver can serve several sites.

3. Verify the signature

Every request carries an HMAC-SHA256 of the raw body, keyed with the endpoint's secret:

X-Itxuo-Signature: sha256=<hex digest>

Verify it before trusting anything — the signature is what distinguishes your site from anyone who learned the URL. In PHP:

$raw = file_get_contents( 'php://input' );
$expected = 'sha256=' . hash_hmac( 'sha256', $raw, $secret );
$given = $_SERVER['HTTP_X_ITXUO_SIGNATURE'] ?? '';

if ( ! hash_equals( $expected, $given ) ) {
    http_response_code( 401 );
    exit;
}

In Node:

const crypto = require('node:crypto');
const expected = 'sha256=' + crypto.createHmac('sha256', secret).update(rawBody).digest('hex');
const ok = crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(req.headers['x-itxuo-signature'] ?? ''));

Two rules hiding in those snippets: compute over the raw request body, not a re-serialisation of the parsed JSON — and compare with a constant-time function, not ==.

4. Understand the delivery semantics

Deliveries are non-blocking fire-and-forget with a short timeout. That is a deliberate trade: a webhook that waited for your endpoint would put your endpoint's availability inside every login on the site.

The consequences, stated plainly:

  • No retries. An endpoint that was down missed those events.
  • No delivery log on the sending side. The receiver's log is the record.
  • No ordering guarantee under load.

So webhooks are right for *nudges* — trigger a workflow, poke an automation, refresh a cache — and wrong as the only copy of anything. If you need guaranteed, inspectable delivery of the audit trail, that is the SIEM feed, which spools, retries and reports its health. The events themselves are always in the Activity Log regardless of what any webhook did.

Testing

Point a temporary endpoint at a request inspector (webhook.site or an ngrok-tunnelled local server), subscribe it to one chatty event like login, sign in, and look at what arrives — headers included. Verify your signature check against a real delivery before subscribing the endpoint to anything rare.

Also worth reading

Log in

Vote on ideas, submit your own and join the discussion.