Skip to content

How to Create a Discord Bot and Get Its Token

Before any bot hosting matters, Discord needs to know your bot exists. This part happens entirely on Discord's own site, and it's the step most people get stuck on before they've even reached us.

How to do it

Create your bot and get its token

  1. 1

    Create an application

    Go to discord.com/developers/applications and click Create App. Give it a name (this is just an internal label - you can rename it later) and confirm.

  2. 2

    Get your token from the Bot page

    Open the Bot section in the sidebar, find Token, and click Reset Token to reveal it. Discord only shows you this once - copy it somewhere safe (a password manager, not a text file) before you navigate away.

  3. 3

    Enable the intents your bot actually uses

    Still on the Bot page, under Privileged Gateway Intents, turn on whichever of Server Members, Presence, or Message Content your bot's code needs. Only enable what you use - each one is a real permission, not a default to leave on.

  4. 4

    Build your invite link

    Open the Installation page, and under Default Install Settings add the bot scope. A Permissions list appears once you do - tick only what your bot needs to function. Copy the link from the Install Link section.

Confirm your token actually saved

The token field in your panel is masked, and a paste can look like it went in fine when it didn't take. A customer lost a full day to exactly this: the bot process ran, showed as online in the panel, and never once authenticated with Discord, because the token hadn't actually saved. After you enter your token, reveal the field to check it's the value you expect, then start (or restart) your server and check the Console page for a real connection message before assuming it worked.

"Online" in the panel and "responding" in Discord are different things

Your panel shows whether the process is running - it can't see whether Discord actually accepted the connection. A bot with a bad token, missing intents, or a crash right after startup can still look "online" in the panel while being completely silent in Discord. If your bot isn't responding, the Console page's output is the real source of truth, not the panel's status indicator.

Missing a permission at invite time doesn't stop the bot joining

A bot invited without the right permissions will still join your server and still show as connected - it just silently can't do whatever needs that permission. If your bot joins fine but a specific command fails, that's the first thing to check, not a sign the bot itself is broken.

Got your token? You're ready for the panel.

Once you have your token copied, the Bot Setup Wizard in your panel walks you through picking a runtime and a starter template, and gives you a place to paste it in. This page covers everything that happens before that point, on Discord's own side.

Have your token ready?

Start a free Discord bot trial and get it running in minutes, no credit card required.

Start your free Discord bot →

Frequently asked questions

For a fuller troubleshooting walkthrough on a bot that won't respond, see our bot offline troubleshooting guide.

Why can't I see my bot token again after I closed the page?

Discord only shows you the full token once, at creation or right after you reset it. If you didn't copy it, you can't recover the old one - go back to the Bot page in the Discord Developer Portal and click Reset Token to generate a new one. Resetting immediately invalidates the old token, so update it everywhere you'd saved it (including our panel) at the same time, or your bot will stop authenticating.

My bot shows online in the panel but does nothing in Discord. What's wrong?

Almost always one of four things, in order of likelihood: the token saved incorrectly (see the trap above - check it actually took, don't assume it did), the bot needs a Privileged Gateway Intent it doesn't have enabled (Server Members, Presence, or Message Content, depending on what your bot's code actually uses), it crashed immediately after starting and the process is technically "running" as an empty shell, or its slash commands were registered to a specific server and you're testing in a different one. Check the Console page's first 30 seconds of output before anything else - it usually says which of these it is directly.

Do I need every permission checkbox when I invite my bot?

No - only what your bot's code actually uses. Over-permissioning isn't dangerous to your own server, but under-permissioning is the more common mistake: a bot that tries to send messages without the Send Messages permission, or manage roles without Manage Roles, will silently fail that specific action while staying online for everything else. If a specific command doesn't work but the bot is clearly connected, check the permission it needs first.

I already invited my bot. Can I add permissions later without re-inviting?

Yes, for a server you own or have Manage Server rights on: open Discord's own Server Settings, find your bot's role under Roles, and adjust its permissions directly. You only need to generate a fresh invite link and re-invite if you need a permission that requires re-authorization, or if you're inviting the bot to a different server for the first time.