Launching a SaaS?·Collect waitlist signups before you build — before.run
SandboxPatternsDetectDocsChangelog
Security
#discord
#bot
#token
#security

Discord Bot Token

Validates Discord bot API tokens consisting of user ID base64, timestamp, and HMAC hash.

✓ Secret detection in source code✓ Discord bot setup form validation✓ Security scanner
/
/
Safe
Test String
2 matches
[…]Character class […]— Matches any single character listed in this set
MM— 'M' — literal character
NN— 'N' — literal character
OO— 'O' — literal character
TT— 'T' — literal character
[…]{23,25}Character class […]— Matches any single character listed in this set — repeated between 23 and 25 times · {23,25} — between 23 and 25 times
A-ZA-Z— A-Z — range from 'A' to 'Z'
a-za-z— a-z — range from 'a' to 'z'
0-90-9— 0-9 — range from '0' to '9'
__— '_' — literal character
--— '-' — literal character
\.\.— \. — escaped character '.'
[…]{6}Character class […]— Matches any single character listed in this set — repeated exactly 6 times · {6} — exactly 6 times
A-ZA-Z— A-Z — range from 'A' to 'Z'
a-za-z— a-z — range from 'a' to 'z'
0-90-9— 0-9 — range from '0' to '9'
__— '_' — literal character
--— '-' — literal character
\.\.— \. — escaped character '.'
[…]{27,38}Character class […]— Matches any single character listed in this set — repeated between 27 and 38 times · {27,38} — between 27 and 38 times
A-ZA-Z— A-Z — range from 'A' to 'Z'
a-za-z— a-z — range from 'a' to 'z'
0-90-9— 0-9 — range from '0' to '9'
__— '_' — literal character
--— '-' — literal character
Pattern: 66 charsInput: 137 chars
100% client-side · private

✓ Valid Examples

  • M123456789012345678901234.X12345.EXAMPLE_DISCORD_BOT_TOKEN_38_DUMMY_
  • N123456789012345678901234.Y12345.EXAMPLE_DISCORD_BOT_TOKEN_38_DUMMY_

✗ Invalid Examples

  • invalid.token
  • bot_token_without_dots
  • https://discord.com/api/webhooks/123/abc

Usage & Integration

Validate Discord Bot Token natively in your backend or frontend without copying regex strings.

Node / Edge

import { validate } from '@regexto/validators';

validate('discord-bot-token', '...');

Python

from regexto_validators import validate

validate("discord-bot-token", "...")

Go

import "github.com/regex-to/validators-go"

valid, err := validators.Validate("discord-bot-token", "...")

PHP

use RegexTo\Validators\Validator;

Validator::validate('discord-bot-token', '...');

Rust

use regexto_validators::validate;

let is_valid = validate("discord-bot-token", "...").unwrap();