Skip to content
Due to increased demand, text TeamShift to hold the next available slot.(415) 718-2003Call instead
TeamShift

Free tool · runs in your browser

Slack request signature verifier: check X-Slack-Signature

This page verifies a Slack request in your browser: paste the signing secret, the X-Slack-Signature and X-Slack-Request-Timestamp headers and the raw body, and it tells you whether Slack sent it and why a check fails.

Verify a Slack signature

The verifier opens on a sample Slack request signed with a demo secret. Replace the secret, headers and body with your own. Everything is computed in your browser; nothing you paste is sent.

The interactive tool needs JavaScript. The same core runs locally: npx @teamshift/webhook-inspect

How Slack signs a webhook

HeadersX-Slack-Signature, in the form v0=<hex>, and X-Slack-Request-Timestamp (unix seconds)
Signed contentThe base string v0:<timestamp>:<body>, with the raw body
Algorithm and encodingHMAC-SHA256, lowercase hex
SecretThe app's signing secret, from the app's Basic Information page. It is not the bot token and not the old verification token.
Replay protectionReject requests whose timestamp is more than five minutes from the current time.

A minimal check in Node.js

import crypto from 'node:crypto';

const sameBytes = (a, b) => a.length === b.length && crypto.timingSafeEqual(a, b);

export function verifySlack(rawBody, signature, timestamp, signingSecret, toleranceSec = 300) {
  if (typeof signature !== 'string' || !/^\d+$/.test(String(timestamp))) return false;
  if (Math.abs(Date.now() / 1000 - Number(timestamp)) > toleranceSec) return false;
  const expected = 'v0=' + crypto.createHmac('sha256', signingSecret).update(`v0:${timestamp}:${rawBody}`).digest('hex');
  return sameBytes(Buffer.from(signature), Buffer.from(expected));
}

Pass the body exactly as it arrived, before any parsing. The tool on this page runs the same check and, when it fails, tries the common fixes to tell you which one applies.

Why Slack verification fails

  • The body was parsed first. Slash commands and interactive payloads arrive form-encoded (payload=…); sign the raw string, not the decoded fields.
  • A token was used as the secret. xoxb-… bot tokens and the deprecated verification token do not sign requests.
  • The timestamp was left out. The signature covers the timestamp header, so hashing the body alone never matches.
  • The server clock is off. A drifting clock fails the five-minute check on genuine requests.

Test your own endpoint

Enter your endpoint URL under "Send a signed test request to your endpoint" and the tool writes a curl command signed the way Slack signs. Run it in a POSIX shell (macOS, Linux, WSL or Git Bash) to confirm your handler accepts a good signature, then change one character of the body and confirm it is rejected.

Other providers

The main verifier also handles any generic HMAC header.

FAQ

How do I verify a request from Slack?

Build the string v0:timestamp:body from the X-Slack-Request-Timestamp header and the raw body, compute HMAC-SHA256 with your signing secret, hex-encode it, prefix it with v0=, and compare it to X-Slack-Signature in constant time. Reject timestamps more than five minutes old.

Does this work for slash commands and interactive messages?

Yes. They are signed the same way as Events API requests. Paste the form-encoded body exactly as it arrived.

Is it safe to paste my secret here?

The page sends nothing: the signature is computed in your browser with WebCrypto, and no field is stored or uploaded. Even so, prefer a test secret, and rotate any live secret you have pasted into a tool you do not control.