You’re likely here because you need to either create or generate a Discord Bot Token.
Well, I’m here to show you how!
I’m going to walk you through the steps required for generating a brand-new discord bot token, how to view your tokens if you already have bots present in your account, and then we’ll talk about token security and how you never want to reveal your token.
What is a Discord Bot Token?
A Discord Bot Token is a short phrase (represented as a jumble of letters and numbers) that acts as a “key” to controlling a Discord Bot. Tokens are used inside bot code to send commands back and forth to the API, which in turn controls bot actions. Never share your Discord Bot Token with anyone.
Creating and/or Viewing a Discord Token isn’t hard — but if you’ve never done it before, it can take a little while to figure out where to go.
Here are the exact steps you’ll need to take.
Generating Your Token Step-by-Step
1. Go to the Discord Developer Portal
Your first step is to browse over to the Discord Developer Portal: https://discordapp.com/developers/applications/
This portal shows all of your applications and bots.
If you already have a bot created, click it in the list. If you don’t have any discord bots, click the “New Application” button.
2. Give Your Bot a Name
Here you’ll be prompted to give your application (bot) a name.
You’re likely making a Discord Bot here, or you need your token for a Discord Bot. If this is true, then think about what you want your bot to be named and enter it here.
3. Bring Your Bot to Life With an Icon and Description
Awesome! You’ve created your very first Discord Application! The only thing left is to bring your bot to life by giving it a description and an icon…
The best size for your bot’s icon is 1024×1024 pixels, but you can go lower and achieve quality results. I personally go with 512×512 most of the time (based on the icons I choose).
IconFinder has a huge collection of amazing icons.
They have a library of free icons: https://www.iconfinder.com/free_icons
And if you really like their icons and want to go premium, here’s a link for 50% Off: https://www.writebots.com/iconfinder
My bot is named “The Token Master”, so I want to find an icon somehow related to a token…
The first thing I did was go to IconFinder and type “token”:
We got a bunch of results. I personally like the “FLAT” icon style and think it looks really good, so I filtered by Flat:
Alright, here’s a good icon — I’m going to go with this and hit “Download PNG”.
Next I uploaded that icon into Discord and hit the green “Save Changes” button.
“The Token Master” is looking much better already!
4. Retrieve Your Token
Your next step is to go over the menu on the left side of the screen and click “Bot”. It’s the icon that looks like a little puzzle piece.
Now you want to click the blue “Add Bot” button
Click the “Yes, do it!” button…
You’ll see a green message, “A wild bot has appeared!”
You’ll also see a “Token” and a blue link you can click called “Click to Reveal Token”
As soon as you click this link, your token will be revealed…
And that’s it! You have your token!
A natural next step, however, is to add your bot into your Discord Server.
5. Add Your Bot to a Discord Server
In order to add your bot to your Discord Server, you’ll need to navigate back to the “General Information” tab
This is where you’ll see your CLIENT ID:
Now all you have to do is go to this link and change the “CLIENT_ID” in the link to the number listed in your Discord Bot.
In our case the URL looks like so:
Notice how client ID is replaced with “The Token Master’s” CLIENT ID in the above URL.
You’ll see a page that looks like this, where you’ll need to click the down arrow and select the server you want your bot to be added to:
Click that drop down… select your server… and you’re done!
Note that you just gave your bot permissions=0 in that URL you clicked — this doesn’t let your bot do anything (it can’t even read messages).
To get your bot to start interacting, living, and breathing in your Discord channel, you’ll have to adjust its permissions and pass in a special number that tells the bot what it can and can’t do.
We have a post coming up shortly about Bot Permissions where we’ll dig into the topic in detail.
Remember: Protect Your Token at ALL COSTS!
Your TOKEN is the Key to the Kingdom when it comes to your bot…
If someone steals your token, they can make your bot do whatever they want — essentially “hacking” your bot.
You don’t want that.
Take extra care NOT to share your token. And if you do have bot code that you put together that uses your token, make sure that when sharing the code (or uploading it publicly, such as to GitHub for example), you leave your token out!
And that’s all there is to it!
As a final note, if you want to be able to create awesome graphics and have incredible icons for your Discord Bots, I’d recommend checking out IconFinder Premium for 50% Off.
All you have to do to sign up to IconFinder Premium is click here: https://www.writebots.com/iconfinder