How nullcipher recognises it
xoxb- (bot), xoxp- (user), xoxa- or xoxr- followed by the dash-separated number and secret groups.
This is the rule text of the “Slack token” detector in the masking engine, copied from the engine when this page was built. Detectors run in a fixed order and, where two overlap, the earlier one wins.
The same page covers 5 more rules, each with its own placeholder:
- Slack user token — [SLACK_USER_TOKEN_1]
- Checked only when the text contains “xoxp-” or “xoxe-” (any case). Pattern (gitleaks rule slack-user-token, v8.30.1, translated to JavaScript): /xox[ep](?:-[0-9]{10,13}){3}-[\-0-9A-Za-z]{28,34}/ — the whole match is masked; any surrounding key name stays readable. The masked part must have a Shannon entropy above 2 bits per character, so repetitive placeholders like xxxx are left alone. (gitleaks rule)
- Slack legacy workspace token — [SLACK_LEGACY_WORKSPACE_TOKEN_1]
- Checked only when the text contains “xoxa” or “xoxr” (any case). Pattern (gitleaks rule slack-legacy-workspace-token, v8.30.1, translated to JavaScript): /xox[ar]-(?:\d-)?[0-9A-Za-z]{8,48}/ — the whole match is masked; any surrounding key name stays readable. The masked part must have a Shannon entropy above 2 bits per character, so repetitive placeholders like xxxx are left alone. (gitleaks rule)
- Slack legacy token — [SLACK_LEGACY_TOKEN_1]
- Checked only when the text contains “xoxo” or “xoxs” (any case). Pattern (gitleaks rule slack-legacy-token, v8.30.1, translated to JavaScript): /xox[os]-\d+-\d+-\d+-[\dA-Fa-f]+/ — the whole match is masked; any surrounding key name stays readable. The masked part must have a Shannon entropy above 2 bits per character, so repetitive placeholders like xxxx are left alone. (gitleaks rule)
- Slack config refresh token — [SLACK_CONFIG_REFRESH_TOKEN_1]
- Checked only when the text contains “xoxe-” (any case). Pattern (gitleaks rule slack-config-refresh-token, v8.30.1, translated to JavaScript): /[Xx][Oo][Xx][Ee]-\d-[0-9A-Za-z]{146}/ — the whole match is masked; any surrounding key name stays readable. The masked part must have a Shannon entropy above 2 bits per character, so repetitive placeholders like xxxx are left alone. (gitleaks rule)
- Slack app token — [SLACK_APP_TOKEN_1]
- Checked only when the text contains “xapp” (any case). Pattern (gitleaks rule slack-app-token, v8.30.1, translated to JavaScript): /[Xx][Aa][Pp][Pp]-\d-[0-9A-Za-z]+-\d+-[0-9A-Za-z]+/ — the whole match is masked; any surrounding key name stays readable. The masked part must have a Shannon entropy above 2 bits per character, so repetitive placeholders like xxxx are left alone. (gitleaks rule)
Example (fake)
xoxb-0000000000-0000000000000-EXAMPLEexampleEXAMPLE
nullcipher replaces it with [SLACK_TOKEN_1]. The number groups are zeros and the secret part spells EXAMPLE. Slack never issued it.
Why it matters in an AI chat
Slack's documentation says bot token strings begin with xoxb- and user token strings with xoxp-. Whoever holds one can call the Slack API as that bot or that user, with the scopes the token was granted.
Depending on those scopes that can mean reading channel history, posting messages that look like they come from your bot or from you, and listing the people in the workspace.
Tokens reach AI chats inside pasted bot code, webhook handlers and error logs that print request headers.
If it already leaked
- Revoke the token with Slack's auth.revoke API method, called with the leaked token itself as the token argument. Slack's docs say the token should be passed as an HTTP Authorization header or as a POST parameter. [1]
- Do not set test=1 when you call it: Slack documents that as a testing mode in which the token is not actually revoked. [1]
- Get a replacement token by installing the app again through Slack's OAuth flow; the same guide notes that API access tokens are revoked via auth.revoke. [2]
Sources
- auth.revoke method — Slack Developer Docs — checked 2026-09-23.
- Installing via OAuth authorization code flow — Slack Developer Docs — checked 2026-09-23.
- Tokens — Slack Developer Docs — checked 2026-09-23.
Open the full masking tool to mask a whole log, .env file or e-mail — every type at once — and restore the values in the AI's answer. Or see all 242 detectors, with a page for 59 secret types, and how to delete a chat you already sent.