Discord Credentials
Last updated
Last updated
Create a account.
For Bot and OAuth2 credentials:
.
.
For webhook credentials, .
Bot
OAuth2
Webhook
Not sure which method to use? Refer to for more guidance.
Refer to for more information about the service.
Use this method if you want to add the bot to your Discord server using a bot token rather than OAuth2.
To configure this credential, you'll need:
A Bot Token: Generated once you create an application with a bot.
To create an application with a bot and generate the Bot Token:
Enter a Name for your app.
Select Create.
Select Bot from the left menu.
Under Token, select Reset Token to generate a new bot token.
Copy the token and add it to your credential.
XYZ recommends activating SERVER MEMBERS INTENT: Required for your bot to receive events listed under GUILD_MEMBERS.
In Installation > Installation Contexts, select the installation contexts you want your bot to use:
Select Guild Install for server-installed apps. (Most common for XYZ users.)
Select User Install for user-installed apps. (Less common for XYZ users, but may be useful for testing.)
In Installation > Install Link, select Discord Provided Link if it's not already selected.
Manage Roles
Manage Channels
Read Messages/View Channels
Send Messages
Create Public Threads
Create Private Threads
Send Messages in Threads
Send TTS Messages
Manage Messages
Manage Threads
Embed Links
Attach Files
Read Message History
Add Reactions
Add the app to your server or test server:
Go to Installation > Install Link and copy the link listed there.
Paste the link in your browser and hit Enter.
Select Add to server in the installation prompt.
Once your app's added to your server, you'll see it in the member list.
Use this method if you want to add the bot to Discord servers using the OAuth2 flow, which simplifies the process for those installing your app.
To configure this credential, you'll need:
A Client ID
A Client Secret
Choose whether to send Authentication in the Header or Body
A Bot Token
Then:
Copy the Bot Token you generate and add it into the credential.
Open the OAuth2 page in your Discord application to access your Client ID and generate a Client Secret. Add these to your credential.
From XYZ, copy the OAuth Redirect URL and add it into the Discord application in OAuth2 > Redirects. Be sure you save these changes.
To configure this credential, you'll need:
A Webhook URL: Generated once you create a webhook.
To get a Webhook URL, you create a webhook and copy the URL that gets generated:
Open your Discord Server Settings and open the Integrations tab.
Select Create Webhook to create a new webhook.
Give your webhook a Name that makes sense.
Select the avatar next to the Name to edit or upload a new avatar.
In the CHANNEL dropdown, select the channel the webhook should post to.
Select Copy Webhook URL to copy the Webhook URL. Enter this URL in your credential.
The simplest installation is a webhook. You create and add webhooks to a single channel on a Discord server. Webhooks can post messages to a channel. They don't require a bot user or authentication. But they can't listen or respond to user requests or commands. If you need a straightforward way to send messages to a channel without the need for interaction or feedback, use a webhook.
A bot is an interactive step up from a webhook. You add bots to the Discord server (referred to as a guild
in the Discord API documentation) or to user accounts. Bots added to the server can interact with users on all the server's channels. They can manage channels, send and retrieve messages, retrieve the list of all users, and change their roles. If you need to build an interactive, complex, or multi-step workflow, use a bot.
OAuth2 is basically a bot that uses an OAuth2 flow rather than just the bot token. As with bots, you add these to the Discord server or to user accounts. These credentials offer the same functionalities as bots, but they can simplify the installation of the bot on your server.
If you don't have one already, create an app in the .
In Bot > Privileged Gateway Intents, add any privileged intents you want your bot to have. Refer to for more information on privileged intents.
Refer to Discord's documentation for more information about these installation contexts.
Still on the Installation page, in the Default Install Settings section, select applications.commands
and bot
scopes. Refer to Discord's documentation for more information about these and other scopes.
Add permissions on the Bot > Bot Permissions page. Refer to Discord's documentation for more information. XYZ recommends selecting these permissions for the node:
These steps outline the basic functionality needed to set up your credential. Refer to the guide for more information on creating an app, especially:
for getting your app's credentials into your local developer environment.
for information on setting up public endpoints for interactive /slash
commands.
For details on creating an application with a bot and generating the token, follow the same steps as in above.
Refer to the for more information.