Skip to main content
This guide walks you through obtaining all required credentials for the Discord plugin.

Authentication Method

The Discord plugin uses API key authentication for the REST API. Internally, Corsair treats your bot token as the api_key value and sends it as Authorization: Bot <token>.
  • api_key (default) — Bot token for Discord’s API
Discord does not use OAuth in this plugin’s authType surface; you operate as a bot using the bot token.

Bot Token (API Key)

Step 1: Create a Discord Application

  1. Open the Discord Developer Portal.
  2. Click New Application, name it, and create it.

Step 2: Add a Bot and Copy the Token

  1. Open your application → Bot.
  2. Click Add Bot if you have not already.
  3. Under Token, click Reset Token or Copy to copy the bot token.
  4. Store it securely — anyone with the token can control the bot.
Storing credentials:
pnpm corsair setup --plugin=discord api_key=your-bot-token
Verify:
pnpm corsair auth --plugin=discord --credentials

Step 3: Invite the Bot (Guilds)

In the Developer Portal, use OAuth2URL Generator (or Installation) to generate an invite URL with the bot scope and the permissions your integration needs. Open the URL in a browser and add the bot to the servers you manage.

Interaction Public Key (Webhooks)

Discord Interaction payloads (slash commands, buttons, modals) are signed with Ed25519. Corsair verifies them using your application’s Public Key. In the key store, this value is stored as the webhook signing material (webhook_signature).
  1. In the Developer Portal, open your application → General Information.
  2. Find Public Key and copy it.
Storing credentials:
pnpm corsair setup --plugin=discord webhook_signature=your-application-public-key

Required Credentials Summary

CredentialRequired forWhere to find
Bot tokenapi_key / REST APIApplication → Bot → Token
Application public keyInteraction webhook verificationApplication → General Information → Public Key
For general information about how Corsair handles authentication, see Authentication.