Start here: the invite link format
A Discord bot invite link is an OAuth2 authorize URL: https://discord.com/oauth2/authorize?client_id=YOUR_APP_ID&scope=bot+applications.commands&permissions=PERMISSION_INTEGER. Generate it in the Developer Portal under OAuth2 > URL Generator, or set a default Install Link on the Installation page. The person who opens it must have the Manage Server permission in the server they pick.
To build the link without writing it by hand, tick the permissions in the Discord permissions calculator and invite link generator; it outputs the finished URL. The rest of this guide explains what each part of that URL does.
Last verified: November 2026 against Discord's OAuth2, Application and Permissions documentation and the developer change log.
https://discord.com/oauth2/authorize?client_id=123456789012345678&scope=bot+applications.commands&permissions=84992
That link adds the bot user with View Channels, Send Messages, Embed Links and Read Message History (84992), and lets the app register slash commands. Paste any invite link into the Discord permissions calculator to see exactly which permissions a given integer grants, or to build one from checkboxes.
| Goal | What to use |
|---|---|
| One link you can paste anywhere | Installation page > Install Link > Discord Provided Link, configured with Default Install Settings |
| A link with specific permissions or a preselected server | OAuth2 > URL Generator, or a hand-built URL |
| Commands available to a user everywhere, without adding to a server | User Install context (integration_type=1) |
| Only you can add the bot | Turn off Public Bot on the Bot page |
URL anatomy, parameter by parameter
Discord's OAuth2 documentation calls this the bot authorization flow - a "server-less and callback-less" OAuth2 flow. Unlike a normal OAuth2 login, it needs no redirect_uri and no response_type, because your app does not receive a user access token.
https://discord.com/oauth2/authorize
?client_id=123456789012345678 # Application ID from General Information
&scope=bot+applications.commands # space-separated, URL-encoded as + or %20
&permissions=84992 # bitfield of bot permissions, as a decimal string
&guild_id=987654321098765432 # optional: preselect a server
&disable_guild_select=true # optional: lock that selection
&integration_type=0 # optional: 0 = server install, 1 = user install
(The comments are for reading only; a real URL is one line.)
| Parameter | Required | What it does |
|---|---|---|
client_id | Yes | Your Application ID. Not the bot token, not the client secret |
scope | For the bot flow | Must include bot to add a bot user. applications.commands lets the app create commands; Discord's scope table notes it is included by default with bot, and listing both is harmless |
permissions | No | Decimal bitfield of the bot's server-wide permissions. Omit or use 0 for none |
guild_id | No | Preselects that server in the dropdown if the user can add bots there |
disable_guild_select | No | true stops the user changing the preselected server |
integration_type | No | 0 = GUILD_INSTALL, 1 = USER_INSTALL. Only relevant when scope includes applications.commands, and the app must support that context |
One behavior worth knowing: if you pass only client_id (optionally with permissions, guild_id or disable_guild_select), Discord uses the Default Install Settings from the portal. Adding scope, integration_type or redirect_uri overrides them. That is why a link that "used to ask for permissions" can change after someone edits the Installation page.
If you request any scope beyond bot and applications.commands (for example identify), the flow becomes a full authorization code grant: response_type=code is mandatory and Discord redirects to your registered redirect URI.
Generating it in the portal: URL Generator vs Install Link
Option 1: OAuth2 URL Generator
- Open your app in the Developer Portal and go to OAuth2 > URL Generator.
- Tick
botandapplications.commandsunder scopes. A Bot Permissions panel appears oncebotis ticked. - Tick the permissions the bot needs. The integer updates as you go.
- Copy the generated URL at the bottom.
Good for one-off links and for links with a specific permission set per audience.
Option 2: Install Link (Installation page)
Discord's getting started guide now leads with this. On the Installation page:
- Under Installation Contexts, choose Guild Install, User Install, or both. Discord's Application docs note that newly created apps support only guild installation by default.
- Under Install Link, select Discord Provided Link (the alternatives are Custom URL and None).
- In Default Install Settings, add
applications.commandsfor User Install, andapplications.commandsplusbotwith your chosen permissions for Guild Install. - Copy the link. It is just
https://discord.com/oauth2/authorize?client_id=...; the scopes and permissions come from the settings.
With an install link configured, an Add App button appears on your app's profile and App Directory page. Selecting None removes that button and makes the app ineligible for the App Directory. Discord Provided Links are limited to the bot and applications.commands scopes; use a Custom URL if you need something else.
Building and sharing invite links in code
Hand-assembling the query string is where typos creep in: a space instead of + in the scope, a permissions value copied with a thousands separator, a client secret pasted as the client ID. Build it with a URL library instead:
from urllib.parse import urlencode
params = {
"client_id": "123456789012345678",
"scope": "bot applications.commands", # urlencode turns the space into +
"permissions": str(1024 | 2048 | 16384 | 65536), # 84992
}
print("https://discord.com/oauth2/authorize?" + urlencode(params))
A few habits that keep invite links maintainable once other people depend on them:
- Put your own redirect in front of it. Publish
yourdomain.com/inviteand redirect it to the Discord URL. When you change permissions or switch to a different app, every old link in READMEs, listing sites and support macros keeps working. - Use separate links per audience. A "minimal" link for cautious server owners and a "full features" link with moderation permissions, both pointing at the same app, lets admins choose what they grant.
- Preselect the server in support flows. When you already know the guild (for example, a customer is setting up from your dashboard), pass
guild_idplusdisable_guild_select=trueso they cannot add the bot to the wrong server. - Document the integer. Next to the link, list the permissions it requests and why. Server admins read that before they click, and it doubles as the answer when your bot later fails with 50013 and someone asks what it was granted.
- Granting more later is an admin task. If the bot needs a new permission after it is installed, the cleanest path is for a server admin to edit the bot's role in Server Settings, rather than expecting everyone to reinstall.
Guild install vs user install
| Guild install (server context) | User install (user context) | |
|---|---|---|
| Who can authorize | A server member with MANAGE_GUILD (Manage Server) | Any user, for their own account |
| Who sees the app | Everyone in the server, subject to command permissions | Only the authorizing user, across their servers, DMs and group DMs |
| Bot user and permissions | Yes - bot joins with the requested permissions | No server permissions; commands only |
| Typical use | Moderation, community, support bots | Personal utilities: lookups, translation, quick replies |
User-installed apps still respect the user's permissions where they are used. Discord's example: if a user runs a command from a channel where they cannot send messages, the app cannot respond with a non-ephemeral message there. If you add a new installation context to an existing app, update your commands' contexts too, or they will not appear in the new context.
When both contexts are enabled, the Discord Provided Link asks the user to choose "Add to server" or "Add to my apps".
Knowing which server installed you: redirects, the code grant and install events
The plain invite link is "server-less and callback-less": Discord adds the bot and tells you nothing. That is fine for a community bot. It is not enough for a product that must connect an install to a customer account, like a dashboard that shows "your server is connected". Discord offers three ways to find out.
1. The Gateway: GUILD_CREATE
A connected bot receives GUILD_CREATE when it joins a new server - one of the three situations Discord's Gateway events docs list for that event - with the guild's channels, roles and joined_at. This needs only the GUILDS intent. It tells you a server was added, but not who added it or which of your customers they are.
2. Advanced bot authorization with a redirect
Request a scope beyond bot and applications.commands (typically identify) and the install becomes a full OAuth2 authorization code grant. response_type=code is then mandatory, and Discord redirects to your registered redirect URI with code, plus guild_id and permissions query parameters.
https://discord.com/oauth2/authorize?client_id=123456789012345678
&scope=bot+applications.commands+identify
&permissions=84992
&response_type=code
&redirect_uri=https%3A%2F%2Fyourapp.example%2Fdiscord%2Fcallback
&state=RANDOM_PER_REQUEST_VALUEDiscord's OAuth2 docs are clear that the guild_id on the redirect "should only be used as a hint". To be certain, turn on Requires OAuth2 Code Grant on the Bot page. Every install then has to complete the code exchange, and the token response includes a full guild object for the server the bot joined. Check state on the callback to stop forged requests, and treat the access token like any other OAuth2 secret. Mistakes here show up as 50025 Invalid OAuth2 access token or 50026 Missing required OAuth2 scope.
3. Webhook events: APPLICATION_AUTHORIZED
For apps that do not run a Gateway connection - including user-installable apps - Discord can POST an APPLICATION_AUTHORIZED event to an endpoint you set on the Webhooks page of the portal. Per the webhook events documentation, the payload includes integration_type (0 for a server, 1 for a user account), the user who authorized the app, the scopes they granted and, for server installs, the guild. There is a matching APPLICATION_DEAUTHORIZED event.
| Rule | Detail |
|---|---|
| Verify signatures | Same X-Signature-Ed25519 / X-Signature-Timestamp headers as interactions; reject failures with 401. Discord sends deliberately invalid signatures as a routine check and removes your URL if you accept them |
| Acknowledge PING | Discord sends type: 0 when you save the URL; reply 204 with an empty body |
| Answer fast | Reply 204 within 3 seconds. Discord retries with exponential backoff for up to 10 minutes, and stops sending events if you fail too often |
| Be idempotent | Retries mean the same install can arrive twice; key on the guild or user ID |
This is the same signed-webhook pattern used for HTTP interactions, so one verification helper covers both. If your endpoint never seems to fire, our webhook debugging guide applies here unchanged.
Choosing the permissions integer
The permissions value is a bitfield from Discord's permissions reference, sent as a decimal number. The flags most bots need:
| Permission | Bit | Decimal value |
|---|---|---|
View Channels (VIEW_CHANNEL) | 1 << 10 | 1024 |
Send Messages (SEND_MESSAGES) | 1 << 11 | 2048 |
Embed Links (EMBED_LINKS) | 1 << 14 | 16384 |
Attach Files (ATTACH_FILES) | 1 << 15 | 32768 |
Read Message History (READ_MESSAGE_HISTORY) | 1 << 16 | 65536 |
Manage Webhooks (MANAGE_WEBHOOKS) | 1 << 29 | 536870912 |
Send Messages in Threads (SEND_MESSAGES_IN_THREADS) | 1 << 38 | 274877906944 |
Administrator (ADMINISTRATOR) | 1 << 3 | 8 |
Add the values you need: 1024 + 2048 + 16384 + 65536 = 84992. Note that Send Messages does not cover threads; add Send Messages in Threads if the bot replies inside threads.
Avoid Administrator. It bypasses every channel overwrite, which makes debugging "why can it post here" impossible and turns a leaked token into full server control. Discord also marks several moderation-level permissions (Administrator, Manage Server, Manage Webhooks and others) as requiring the owner account to use two-factor authentication when the server has server-wide 2FA enabled.
The integer only sets the permissions of the role Discord creates for the bot at install time. Server admins can change that role later, and channel overwrites can still deny things the role allows - which is where most post-invite errors come from.
Permission integers for common bot types
Most bots fit one of a handful of shapes. These integers are calculated from the bit values in Discord's permissions reference. Paste any of them into the permissions calculator to see the ticked boxes, and remove anything your bot does not use.
| Bot type | Permissions | Integer |
|---|---|---|
| Chat / FAQ bot | View Channels, Send Messages, Embed Links, Read Message History | 84992 |
| Chat bot that also works in threads | + Attach Files, Add Reactions, Send Messages in Threads | 274878024768 |
| Support / ticket bot using threads | Chat set + Attach Files, Create Public and Private Threads, Send Messages in Threads, Manage Threads | 395137108992 |
| Moderation bot | Chat set + Manage Messages, Kick, Ban, Moderate Members (timeouts), View Audit Log | 1099511721094 |
| Role / onboarding bot | View Channels, Send Messages, Manage Roles | 268438528 |
| Bot that pins messages | View Channels, Send Messages, Read Message History, Pin Messages | 2251799813753856 |
| Voice bot | View Channels, Send Messages, Connect, Speak | 3148800 |
Two 2025-2026 changes that break old invite links
- Pinning has its own permission. Discord split
PIN_MESSAGES(1 << 51) out of Manage Messages, and its change log says that starting February 23, 2026, "MANAGE_MESSAGES alone will no longer be sufficient" to pin. A bot whose invite was built before the split, and that pins messages, now needs Pin Messages added to its role. - Bypass Slowmode was split out too (
1 << 52), but Discord notes this mainly affects users, "as bots are not affected by slowmode restrictions." You do not need to add it to a bot invite.
The JavaScript trap: 1 << 38 is 64
JavaScript's << and | operators work on 32-bit integers, and several Discord permissions sit above bit 31. In Node, 1 << 38 evaluates to 64 - Add Reactions - not Send Messages in Threads. Permission math done with plain numbers quietly produces the wrong integer, and the bot ends up with a different permission from the one you meant. Use BigInt:
const VIEW_CHANNEL = 1n << 10n;
const SEND_MESSAGES = 1n << 11n;
const SEND_MESSAGES_IN_THREADS = 1n << 38n;
const permissions = VIEW_CHANNEL | SEND_MESSAGES | SEND_MESSAGES_IN_THREADS;
console.log(permissions.toString()); // "274877910016"discord.js already does this for you with PermissionFlagsBits, which are BigInts. Python integers are arbitrary precision, so the urlencode example above is safe as written. Discord sends permissions the same way in the other direction: since API v8, every permissions field, including overwrite allow and deny, arrives as a string. Parse it as a big integer, not as a float.
Invited, but Missing Access (50001) or Missing Permissions (50013)
Getting the bot into the server is half the job. The two errors that show up next:
| Error | Literal message | What it means after an invite |
|---|---|---|
| 50001 | Missing access | The bot cannot see the resource at all: no View Channels on that channel (often a private channel or category overwrite), or it is acting on a server it is not in |
| 50013 | You lack permissions to perform that action | The bot can see the channel but lacks the specific permission (Send Messages, Embed Links, Manage Roles...), or role hierarchy blocks the action |
Role hierarchy is the one the permissions integer cannot fix. Per Discord's docs, a bot can only assign roles, kick, ban or edit nicknames for members whose highest role is below the bot's highest role. A freshly invited bot's role sits near the bottom of the list, so "Manage Roles" in the invite does nothing until an admin drags the bot's role above the roles it should manage.
Diagnose instead of guessing:
- Check the channel's permission overwrites for the bot's role and for
@everyone. - Since October 30, 2026, Discord exposes computed permissions directly:
GET /channels/{channel.id}/permissions/member/{user.id}with your bot's user ID returns its effective permissions in that channel (the call itself requires View Channels). Discord's change log lists matching guild and role variants. - Compare the result with the action you are attempting.
What changed recently: Discord is rolling out channel obfuscation for bots, mandatory from November 16, 2026. Channels a bot cannot view arrive over the Gateway with redacted fields (the name becomes ___hidden___ and a CHANNEL_OBFUSCATED flag is set), and GET /guilds/{guild.id}/channels omits them entirely. If your bot suddenly "loses" channels after an invite, it lacks View Channels there - the same root cause as 50001.
Other invite problems and their causes
| Symptom | Cause | Fix |
|---|---|---|
| Your server is missing from the dropdown | You lack Manage Server there | Ask an admin to open the link, or get the permission |
| Only you can invite the bot; others cannot | Public Bot is off | Turn on Public Bot on the Bot page if you want others to add it |
| Invite asks for a redirect or errors about a code grant | Requires OAuth2 Code Grant is on, or you added scopes beyond bot/applications.commands | Turn the setting off, or implement the full code grant with a redirect URI |
| Bot joined, slash commands missing | Commands not registered, or registered globally and still propagating | Register to a test guild first; check applications.commands was authorized |
| Invite fails once the bot is in many servers | Discord requires verification for apps in 100+ servers | Apply for verification; see 30001 |
| Bot appears offline after joining | Invite worked; the bot process is not connected | Check the token and intents |
Two reality checks help when a user reports "the link is broken". First, confirm the client_id in the link is the Application ID of the app you think it is - dev and production apps get swapped constantly. Second, when someone you do not know asks for an invite link with Administrator to "test" something, be suspicious; the Discord account age checker decodes any user or app ID's creation date, which is a quick sanity check on brand-new accounts.
If the bot is in and online but not answering, our Discord bot not responding guide picks up from here, and the full code reference lives in the Discord error directory. For a business support bot you would rather configure than host, Conferbot's Discord integration walks you through the same install link from its dashboard.
For server admins: what to check before you click Authorize
Bot invites are a common route for compromising servers, because the person clicking is by definition someone who can manage the server. Before you authorize an unfamiliar bot:
- Read the permission list on the authorization screen. It is generated from the
permissionsinteger in the link. A "music" or "verification" bot that asks for Administrator, Manage Webhooks or Manage Roles is asking for far more than it needs. - Check who you are adding. The
client_idis the application's ID. Decode it with the account age checker - an app created yesterday that claims to be a long-running service is a red flag. - Prefer links from the bot's own site or App Directory listing over links pasted in DMs. Phishing invites often arrive as urgent "verify your server" messages.
- Know where to undo it. Server Settings > Integrations lists installed apps. From there you can manage an app's command permissions or remove it entirely. Users can remove user-installed apps from their own settings.
After install, Discord lets admins limit who can use each app's commands, and where, from Server Settings > Integrations > Manage, as described in the application commands documentation. A bot command that "disappeared" for some members is often a permission someone set here, not a bug - and a command ID that no longer exists returns 10063 Unknown application command. Servers with server-wide 2FA add another catch: moderation-level permissions need the bot's owner account to have two-factor authentication, or the action fails with 60003 Two factor is required. The broader risks of handing a bot access are in our chatbot security guide.
Running Discord as a support or sales channel, not just a community server
For a community bot, the invite link is something you set up once and paste into a README. For a business, it is part of onboarding. Every customer or community manager who adds your bot goes through that authorization screen, and every unnecessary permission there is a reason to hesitate. Keep the integer minimal, explain each permission next to the link, and make sure the bot does something useful the moment it joins.
The industries where Discord works as a customer channel tend to be education (course cohorts and study groups), media and creators (fan communities), tech and developer tools, and nonprofits running volunteer hubs. For the community-building side, see Discord bot community management.
What changes when you stop hand-rolling the bot
With Conferbot's Discord integration you still create your own application, so the invite link is the one described in this guide and server admins see your bot's name on the authorization screen. After that, you build the conversation in a visual flow editor instead of a codebase; the guide to making a Discord bot without coding covers every step. Conferbot keeps the Gateway connection running and answers in DMs, replies or threads with messages and buttons, with live chat handover to your team. Discord is on every plan, including Free; connecting flows to tools through the integrations hub needs Pro. Conferbot does not register slash commands and is not a moderation bot, so a chat-bot permission set like 84992 is usually all it needs.
When to stop maintaining the plumbing
Everything above is installation plumbing: OAuth2 parameters, permission bitfields that overflow in JavaScript, role hierarchy, channel overwrites, redirect handling and signed install events. None of it is your product. It is the cost of distributing a bot on Discord yourself, and every platform has its own version - Slack's is OAuth scopes and reinstalls, covered in our guide to Slack bot token types.
That is a fair trade for a bot you enjoy building. It is a worse one when Discord is one of several customer channels, each with its own install flow. Conferbot runs the same conversation on Telegram, WhatsApp, Slack and a website widget, and you can start on the free plan to see whether it fits.
Start free with Conferbot - the free plan includes 600 conversations a month and needs no credit card, so you can have the same flow running on a second channel this afternoon.
If you are inviting a bot today: build the link, invite it, then check the Message Content intent if it needs to read messages, and keep the bot token out of Git. If the bot only needs to post into one channel, a webhook needs no invite at all. Platform quotas, such as the 100-server cap before verification, are on the Discord limits page.
Was this article helpful?
Build and deploy in 10 minutes. No coding needed.
Discord Bot Invite Link FAQ
Everything you need to know about chatbots for discord bot invite link.
About the Author
The Conferbot team writes about building, deploying, and improving AI chatbots.
View all articlesRelated Articles
From the reference shelf
Fact-checked reference pages and free tools for the platform this article covers.