Creating a Bot Account (2024)


In order to work with the library and the Discord API in general, we must first create a Discord Bot account.

Creating a Bot account is a pretty straightforward process.

  1. Make sure you’re logged on to the Discord website.

  2. Navigate to the application page

  3. Click on the “New Application” button.

    Creating a Bot Account (1)

  4. Give the application a name and click “Create”.

    Creating a Bot Account (2)

  5. Navigate to the “Bot” tab to configure it.

  6. Make sure that Public Bot is ticked if you want others to invite your bot.

    • You should also make sure that Require OAuth2 Code Grant is unchecked unless youare developing a service that needs it. If you’re unsure, then leave it unchecked.

    Creating a Bot Account (3)

  7. Copy the token using the “Copy” button.

    • This is not the Client Secret at the General Information page.


    It should be worth noting that this token is essentially your bot’spassword. You should never share this with someone else. In doing so,someone can log in to your bot and do malicious things, such as leavingservers, ban all members inside a server, or pinging everyone maliciously.

    The possibilities are endless, so do not share this token.

    If you accidentally leaked your token, click the “Regenerate” button as soonas possible. This revokes your old token and re-generates a new one.Now you need to use the new token to login.

And that’s it. You now have a bot account and you can login with that token.

Inviting Your Bot

So you’ve made a Bot User but it’s not actually in any server.

If you want to invite your bot you must create an invite URL for it.

  1. Make sure you’re logged on to the Discord website.

  2. Navigate to the application page

  3. Click on your bot’s page.

  4. Go to the “OAuth2 > URL Generator” tab.

    Creating a Bot Account (4)

  5. Tick the “bot” checkbox under “scopes”.

    Creating a Bot Account (5)

  6. Tick the permissions required for your bot to function under “Bot Permissions”.

    • Please be aware of the consequences of requiring your bot to have the “Administrator” permission.

    • Bot owners must have 2FA enabled for certain actions and permissions when added in servers that have Server-Wide 2FA enabled. Check the 2FA support page for more information.

    Creating a Bot Account (6)

  7. Now the resulting URL can be used to add your bot to a server. Copy and paste the URL into your browser, choose a server to invite the bot to, and click “Authorize”.


The person adding the bot needs “Manage Server” permissions to do so.

If you want to generate this URL dynamically at run-time inside your bot and using thediscord.Permissions interface, you can use discord.utils.oauth_url().

Creating a Bot Account (2024)
Top Articles
Latest Posts
Article information

Author: The Hon. Margery Christiansen

Last Updated:

Views: 6539

Rating: 5 / 5 (70 voted)

Reviews: 85% of readers found this page helpful

Author information

Name: The Hon. Margery Christiansen

Birthday: 2000-07-07

Address: 5050 Breitenberg Knoll, New Robert, MI 45409

Phone: +2556892639372

Job: Investor Mining Engineer

Hobby: Sketching, Cosplaying, Glassblowing, Genealogy, Crocheting, Archery, Skateboarding

Introduction: My name is The Hon. Margery Christiansen, I am a bright, adorable, precious, inexpensive, gorgeous, comfortable, happy person who loves writing and wants to share my knowledge and understanding with you.