Install a Discord Bot with the Right OAuth2 Scopes
Choose the right Discord installation context, distinguish OAuth2 scopes from bot permissions, and avoid requesting unnecessary access.
If you want to use a Discord bot in a server, Guild Install is the right installation context. It requires the bot scope and only the server permissions the existing bot actually needs. Slash commands also require the applications.commands scope; Discord adds it automatically when you request bot. An app that works without a bot account can use applications.commands on its own.
Guild Install or User Install?
The installation type determines where an app is installed. GUILD_INSTALL installs it in a server. Choose this option if the bot account should work in a server, for example with roles, moderation, or server events. The bot scope adds the bot account to the selected server.
USER_INSTALL installs the app for a person. It is visible only to the authorizing person, but—depending on the enabled installation and command contexts—it can be available in their servers, DMs, and group DMs. A User Install does not add a bot account to a server or give the app server-specific bot permissions. The app must respect the person's permissions on each surface. Access to additional account data requires separate OAuth2 scopes. Discord refers to the contexts in authorization as integration_type=0 for GUILD_INSTALL and integration_type=1 for USER_INSTALL. The application must support the selected context in the Developer Portal. Discord describes the OAuth2 contexts and scopes and lists the installation contexts and their reach separately.
For global commands, the installation context and command surface are also two different settings: integration_types determines which installation type makes a command available. contexts determines where the person can run it in the Discord client. These fields apply to global commands; a Guild command is tied to the server where it was registered. A User Install therefore does not automatically make a command visible in every context. The Application Commands documentation explains both fields.
Keep scopes and server permissions separate
OAuth2 scopes describe which access the app requests. The main cases for an existing bot are:
botadds a bot account to a server. Discord includesapplications.commandsby default.applications.commandslets the app offer commands. The scope can be used independently ofbot; according to Discord, no token exchange is required for this command scope alone.identify,guilds, and similar scopes concern additional data or actions for a Discord account. Include them only if an existing feature actually needs that data.applications.commands.updateis intended for updating commands with a Bearer token from the client credentials flow.applications.commands.permissions.updateallows individual command permissions in a server to be changed if the authorizing person has the required permissions there. Neither scope is an additional requirement for an ordinary bot invitation.
The permissions parameter is not an OAuth2 scope. It requests server permissions for the bot account. Derive them from the bot's existing features: a bot that only responds to commands does not automatically need moderation, role, or administrator permissions. Administrator bypasses channel restrictions and should not be a blanket fix for a missing individual permission. Discord separates scopes and bot authorization from the server and channel permission model.
Check the installation safely
- Open the existing application in the Discord Developer Portal. Check whether it supports the required context,
GUILD_INSTALLorUSER_INSTALL, and which default scopes and permissions are configured for it. A Guild Install must be authorized by a person withMANAGE_GUILD; a User Install does not need server-specific bot permissions. - Check an existing authorization link: without an explicit
scopeorintegration_type, the configured defaults apply. Those parameters in the link can override the values, so compare the link with the Portal settings. - Use the installation path for exactly that context. To install a server bot, the installation must add a bot account; for an installation that uses Application Commands only,
applications.commandsmay be enough. - Read the requested server permissions in Discord's confirmation dialog. If it asks for the Administrator permission or any permission the bot does not need, stop and correct the installation configuration.
- After installation, check the expected destination: with Guild Install, the bot account should appear in the selected server. With a User Install, the command must match the enabled installation and interaction contexts.
If the app is already in the right server but the slash command is missing, next check registration and visibility using the guide to missing Discord slash commands. If a secret was exposed by mistake, follow the guide to managing a bot token securely. The article on reliably starting a Discord bot covers the existing project's runtime, start command, and dependencies.
This guide assumes an existing Discord application and an existing bot or app feature. It does not create an OAuth2 URL or sign in. Do not share a bot token or OAuth secret in a support request; an application ID is not a substitute for a token.
Did this guide help? We are happy to help personally.