vibehowto

Home / Passwords & API keys / API keys, one company at a time / Discord bot token

Discord bot token

Updated Sep 18, 2026

Developer portal → application → Bot → Reset token. DISCORD_BOT_TOKEN in .env. Not the application ID.

You will leave with DISCORD_BOT_TOKEN in .env and Vercel. The application ID and public key are not the bot token. Only the bot token can log the bot in. Treat it like a password.

Step 1: Create an application

discord.com/developers/applications → New Application → name it after the repo.

Step 2: Bot token

Left nav → Bot → Reset Token / Reset. Copy it once. Discord will not show it again.

Invite the bot to a server only if this project needs a guild. OAuth2 → URL Generator → scopes bot → the permissions the project actually needs (start with none, then Message Content / Send Messages if you must). Open the URL, pick a server you own.

Step 3: Names

.env.example:

Terminal
DISCORD_BOT_TOKEN=
DISCORD_APPLICATION_ID=

.env gets real values. Application ID is not secret; the token is. Still keep both in .env so the agent is not guessing IDs. Do not put the token on NEXT_PUBLIC_.

Vercel → same names → Production → redeploy.

A bot that stays up when the laptop lid closes is Workers, then Always-on.

Checklist

Saved in this browser. No account. Clearing site data wipes it.

Next: Workers

Get new guides and videos by email

One email when something new is up. No spam. Unsubscribe anytime.