Requex.me LogoRequex.me

Documentation

Browse by section

Keep all guides, tool docs, automation recipes, and comparison pages in one navigable place.

Docs Home
Docs

Foundation docs for getting started fast, understanding key terms, and tracking what has changed.

Guides

Start with fundamentals, then move into provider-specific webhook testing and production hardening.

Tool Docs

These pages explain what each tool does, when to use it, and how it fits into a webhook debugging workflow.

Automation Docs

Use these setup guides when you want forwarding rules, custom responses, security checks, or multi-destination fanout.

Compare

Use these pages to compare developer workflows, pricing tradeoffs, and feature differences between webhook tools.

How to Test GitLab Webhooks

Capture GitLab push, merge request, pipeline, and issue event payloads — inspect every field before your integration handles it.

Editorially reviewed by the Requex team10 min readAbout the product

TL;DR: GitLab sends JSON webhooks with a secret token in the X-Gitlab-Token header. Generate a Requex URL, add it in GitLab → Project → Settings → Webhooks, select events, optionally add a secret token, then trigger an event.

GitLab Webhook Event Types

GitLab webhooks can be configured at the project level, group level, or system level (self-managed only). Each delivery includes an X-Gitlab-Event header that identifies the event type, and the body contains the full context for that event.

EventTrigger
Push eventsCommits pushed to any branch
Tag push eventsGit tag created or deleted
Issues eventsIssue opened, updated, closed, or deleted
Comments (notes)Comment added to commit, issue, MR, or snippet
Merge requests eventsMR opened, merged, closed, or updated
Pipeline eventsCI/CD pipeline status changes
Job eventsIndividual CI job status changes

Step 1: Generate a Requex Endpoint

Open requex.me. A unique webhook URL is created for you immediately — no account needed. Copy the URL from the top of the dashboard. It will look like:

https://requex.me/hook/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

This URL is publicly reachable over HTTPS — GitLab can send payloads to it without any tunnel or port forwarding.

Step 2: Configure the GitLab Webhook

Navigate to your GitLab project and add the webhook:

  1. Go to Project → Settings → Webhooks.
  2. Click Add new webhook.
  3. Paste your Requex URL into the URL field.
  4. Optionally enter a Secret token — GitLab will include this in the X-Gitlab-Token header of every delivery.
  5. Select the trigger events you want to test (e.g., Push events, Merge requests events).
  6. For testing purposes, you can disable SSL verification — this is safe with Requex since it already uses a valid certificate.
  7. Click Add webhook.

Group-level webhooks follow the same flow under Group → Settings → Webhooks and fire for all projects within the group.

Step 3: Trigger a Test Event

The fastest way is to use GitLab's built-in test button. After saving the webhook, scroll down to the webhook in the list and click the Test dropdown next to it. Select any event type (e.g., "Push events") — GitLab sends a sample payload immediately.

To send a real payload, trigger the event naturally:

# Trigger a push event
git commit --allow-empty -m "chore: trigger gitlab webhook test"
git push origin main

For merge request events, open or update a merge request in the GitLab UI. For pipeline events, push a change to a branch that has a .gitlab-ci.yml file.

Step 4: Inspect the Payload

Click the captured request in Requex. The X-Gitlab-Event header tells you the event type. Here is an abbreviated push event payload:

{
  "object_kind": "push",
  "event_name": "push",
  "before": "0000000000000000000000000000000000000000",
  "after": "da1560886d4f094c3e6c9ef40349f7d38b5d27d7",
  "ref": "refs/heads/main",
  "user_name": "John Doe",
  "project": {
    "id": 15,
    "name": "my-project",
    "web_url": "https://gitlab.com/mygroup/my-project"
  },
  "commits": [
    {
      "id": "da1560886d4f094c3e6c9ef40349f7d38b5d27d7",
      "message": "chore: trigger gitlab webhook test",
      "author": { "name": "John Doe", "email": "john@example.com" }
    }
  ],
  "total_commits_count": 1
}

GitLab also sends your secret token plaintext in the X-Gitlab-Token header — you can see its exact value in the Requex request headers panel, which is useful for confirming your backend is reading the correct header name.

GitLab Token Verification

Unlike GitHub (which uses HMAC), GitLab passes your secret token as a plain string in the X-Gitlab-Token header. Your handler simply compares the header value to your stored secret using a timing-safe comparison:

const crypto = require('crypto');

app.post('/webhooks/gitlab', express.json(), (req, res) => {
  const token = req.headers['x-gitlab-token'];
  const expected = process.env.GITLAB_WEBHOOK_SECRET;

  // Use timing-safe comparison to prevent timing attacks
  if (
    !token ||
    token.length !== expected.length ||
    !crypto.timingSafeEqual(Buffer.from(token), Buffer.from(expected))
  ) {
    return res.status(401).send('Unauthorized');
  }

  const eventType = req.headers['x-gitlab-event'];
  console.log('GitLab event:', eventType);
  console.log('Object kind:', req.body.object_kind);

  res.status(200).send('OK');
});

Note that X-Gitlab-Token is only sent if you configured a secret token when creating the webhook. If you left the secret field blank in GitLab settings, the header will not be present in the delivery.

Common GitLab Webhook Issues

IssueCauseFix
Hook delivery fails with SSL errorSSL verification enabled on self-managed GitLab with a local CADisable SSL verification for the webhook in GitLab settings during testing
X-Gitlab-Token missingNo secret token was set when creating the webhookEdit the webhook in Settings → Webhooks and add a secret token
Webhook not firing on pipeline eventsPipeline events checkbox not selectedEdit the webhook and enable the Pipeline events trigger

Inspect GitLab Payloads Instantly

Free endpoint, real-time capture, no sign-up. Paste your Requex URL into GitLab and start receiving events in seconds.

Open Requex →

Related guides

Start Testing Webhooks Now

Generate your unique URL and test webhooks instantly. Free, no signup.

Open Webhook Tester →