> For the complete documentation index, see [llms.txt](https://docs.guildabot.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.guildabot.com/guilda-bot-knowledge-base/customer-guides/installation-guide/bot-token-and-intents/oauth2-and-invite.md).

# OAuth2 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.

<figure><img src="/files/FM5RZaczBhB8JRIOURZK" alt=""><figcaption></figcaption></figure>

2. In the URL Generator, under **Scopes**, select:

* `bot`
* `applications.commands`

<figure><img src="/files/2B403DiGQdVZnln9PEOL" alt=""><figcaption></figcaption></figure>

3. 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.)

<figure><img src="/files/yuvxFsYTgVNnTptf5Qdh" alt=""><figcaption></figcaption></figure>

4. Copy the **generated invite URL** to your clipboard.

<figure><img src="/files/IxocScof5OcdNgMbDHiD" alt=""><figcaption></figcaption></figure>

Final step:

5. Paste the invite URL into your browser.
6. Choose the Discord server (guild) where you want to add the bot.
7. Click **Continue** and follow the prompts to authorize the bot.

<figure><img src="/files/M4oAH2ZewhIIEQYbQZMA" alt="" width="359"><figcaption></figcaption></figure>

<figure><img src="/files/GHzsfeqpvwOJnNrE2lJu" alt="" width="333"><figcaption></figcaption></figure>

***

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

To start the&#x20;
