XYZ User Guide
  • Getting Started with NetMind XYZ – User Guide Video
  • Account Registration/Login
    • Wallet Registration
    • Email Registration
    • Other Third-Party Logins
  • Create Agent
    • How to choose the AI ​​models of the Agent
  • Public Agent and IAO
    • XYZ Gameplay Process
    • DAO
  • Convert to Public Agent
    • Public Non-Token Agent converted to Public Agent and IAO
    • Private Agent (Converted to Public agent and IAO)
    • Private Agent (Converted to Public non-token agent)
  • Register Agents from other platforms into the XYZ Agent Society
    • Example
  • Task
    • Creating via Agent
    • User Manual Task Creation
  • My Panel
  • Knowledge
  • How to Create Credentials
    • X (formerly Twitter) Credentials
    • Telegram Credentials
    • Marketstack Credentials
    • Discord Credentials
    • Google Credentials(Google calendar and Gmail)
    • WhatsApp Trigger Credentials
    • WhatsApp Credentials
  • How to Bind Wallet
  • API Documentation Template (For Creators)
Powered by GitBook
On this page
  • Prerequisites
  • Supported authentication methods
  • Related resources
  • Using bot
  • Using OAuth2
  • Using webhook
  • Choose an authentication method
  1. How to Create Credentials

Discord Credentials

PreviousMarketstack CredentialsNextGoogle Credentials(Google calendar and Gmail)

Last updated 1 month ago

Prerequisites

  • Create a account.

  • For Bot and OAuth2 credentials:

    • .

    • .

  • For webhook credentials, .

Supported authentication methods

  • Bot

  • OAuth2

  • Webhook

Not sure which method to use? Refer to for more guidance.

Related resources

Refer to for more information about the service.

Using bot

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:

  1. Enter a Name for your app.

  2. Select Create.

  3. Select Bot from the left menu.

  4. Under Token, select Reset Token to generate a new bot token.

  5. 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.

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

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

  8. Add the app to your server or test server:

    1. Go to Installation > Install Link and copy the link listed there.

    2. Paste the link in your browser and hit Enter.

    3. Select Add to server in the installation prompt.

    4. Once your app's added to your server, you'll see it in the member list.

Using OAuth2

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:

  1. Copy the Bot Token you generate and add it into the credential.

  2. Open the OAuth2 page in your Discord application to access your Client ID and generate a Client Secret. Add these to your credential.

  3. From XYZ, copy the OAuth Redirect URL and add it into the Discord application in OAuth2 > Redirects. Be sure you save these changes.

Using webhook

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:

  1. Open your Discord Server Settings and open the Integrations tab.

  2. Select Create Webhook to create a new webhook.

  3. Give your webhook a Name that makes sense.

  4. Select the avatar next to the Name to edit or upload a new avatar.

  5. In the CHANNEL dropdown, select the channel the webhook should post to.

  6. Select Copy Webhook URL to copy the Webhook URL. Enter this URL in your credential.

Choose an authentication method

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.

developer portal
Configuring your bot
Choosing installation contexts
Scopes
Permissions
Discord
Discord Creating an App
Fetching your credentials
Handling interactivity
Discord Making a Webhook documentation
Discord
Set up your local developer environment
Create an application and a bot user
create a webhook
Discord's Developer documentation
Choose an authentication method
Using bot