bot token
Exposed Discord Bot Token? Here's how to detect and rotate it
A leaked Discord bot token means full takeover — an attacker can nuke your servers. Scan free with Trust, then Reset Token in the Discord Developer Portal.
A Discord bot token is the single credential that authenticates your bot to Discord, and it carries every permission the bot has been granted. Anyone with the token controls your bot completely — there is no per-request check beyond the token itself. A leaked token means immediate, full bot takeover until you reset it.
What an attacker can do with a leaked Discord Bot Token
- Takes over your bot entirely and acts with all of its server permissions.
- Nukes servers — mass-deleting channels, banning or kicking every member.
- Spams every server the bot is in with scams, malware links, or raid content.
- Reads messages and server data the bot can see, exfiltrating private content.
How Discord Bot Tokens get exposed
- Committed to a public repo in a config, .env, or bot.py/index.js file.
- Hardcoded in a script or Dockerfile shared in a Discord, gist, or forum.
- Exposed in hosting logs, a screenshot, or a pasted error while asking for help.
- Detected by Discord's own scanning, which auto-resets tokens found leaked publicly.
Scan your repo and live site for exposed Discord Bot Tokens — free
Trust checks your code, git history, and shipped JavaScript. No signup, results in about a minute.
Run a free scan →How to rotate a leaked Discord Bot Token
- Go to discord.com/developers/applications and open your application.
- Click the Bot tab in the left sidebar.
- Click Reset Token, confirm, and enter your 2FA code if prompted — the old token is invalidated instantly and any running instance disconnects.
- Copy the new token once and store it in your environment or secrets manager, never in code.
- Redeploy or restart your bot with the new token to bring it back online.
- Open each server's Server Settings → Audit Log and review recent actions for bans, deletions, or role changes you did not make.
Open the Discord Bot Token dashboard →
Other secret types to check
- AWS Access KeyAKIA…
- Stripe Secret Keysk_live_…
- OpenAI API Keysk-…
- Anthropic API Keysk-ant-api03-…
- Supabase Service-Role KeyeyJ… (JWT)
- GitHub Personal Access Tokenghp_… (also github_pat_…)