square-downOAuth2 and Invite

Now it's time to set up OAuth2 scopes and permissions so your bot can be invited to your Discord server.

  1. In the Developer Portal, click the "OAuth2" tab in the sidebar.

  1. In the URL Generator, under Scopes, select:

  • bot

  • applications.commands

  1. Under Bot Permissions, select:

  • Administrator (This gives the bot full control over your server, only assign it if you trust the bot and its code.)

  1. Copy the generated invite URL to your clipboard.

Final step:

  1. Paste the invite URL into your browser.

  2. Choose the Discord server (guild) where you want to add the bot.

  3. Click Continue and follow the prompts to authorize the bot.


That’s it! You’ve successfully created and invited your bot.

To start the

Last updated