Create and connect your Discord bot

One Discord application can provide both the bot token and the OAuth client used by the Admin Web UI.

SwiftBot connects to your server through your own Discord application. You create the application once, hand SwiftBot the bot token, and optionally reuse the same application for Web UI sign-in.

1. Create the application

Open the Discord Developer Portal, choose New Application, and give it a name your members will recognize in Discord.

2. Add the bot and copy its token

  1. Open the Bot page:

    Select your application, then open its Bot page.

  2. Add or reset the token:

    Click Add Bot, or Reset Token if a bot already exists.

  3. Copy the token immediately:

    Discord only shows the token once. Copy it before leaving the page.

  4. Paste it into SwiftBot:

    During onboarding, paste the token. SwiftBot stores it in the macOS Keychain, not in a plain text file.

3. Enable gateway intents

On the application's Bot page, enable these privileged gateway intents:

  • Server Members Intent โ€” for join and leave events.
  • Message Content Intent โ€” for message rules and AI features.
  • Presence Intent โ€” for voice and online-status tracking.

4. Configure OAuth for the Web UI

Open OAuth2 > General in Discord, then copy the Client ID and Client Secret into SwiftBot > Settings > Web UI > Authentication.

5. Register redirect URIs

Access modeRedirect URI
Local-only dashboardhttp://localhost:8090/auth/discord/callback
Public dashboardhttps://your-bot.example.com/auth/discord/callback
Leave "Requires OAuth2 Code Grant" off

Keep it disabled unless you specifically need it. If it is on, SwiftBot can generate working invite URLs only after Discord OAuth is configured.