SurfSense Docs
Connectors

Discord

Connect your Discord servers to SurfSense

Discord OAuth Integration Setup Guide

This guide walks you through setting up a Discord OAuth integration for SurfSense.

Step 1: Create a New Discord Application

  1. Navigate to discord.com/developers/applications
  2. Click "New Application"
  3. Enter the application name: SurfSense
  4. Click "Create"

Step 2: Configure General Information

On the General Information page, fill in the details:

FieldValue
App IconUpload an icon (1024x1024px, PNG/GIF/JPG/WEBP, max 10MB)
NameSurfSense
DescriptionConnect any LLM to your internal knowledge sources and chat with it in real time alongside your team.
TagsAdd up to 5 tags (optional)

You'll also see your Application ID and Public Key on this page.

General Information

Step 3: Configure OAuth2 Settings

  1. In the left sidebar, click "OAuth2"
  2. Copy your Client ID and Client Secret (click to reveal)
  3. Under Redirects, click "Add Another" and enter:
    http://localhost:8000/api/v1/auth/discord/connector/callback

Keep Public Client disabled (off) since SurfSense uses a server to make requests.

OAuth2 Configuration

Step 4: Configure Bot Settings

  1. In the left sidebar, click "Bot"

  2. Configure the Authorization Flow:

    • Public Bot - Enable to allow anyone to add the bot to servers
  3. Enable Privileged Gateway Intents:

    • Server Members Intent - Required to receive GUILD_MEMBERS events
    • Message Content Intent - Required to receive message content

Once your bot reaches 100+ servers, these intents will require verification and approval.

Bot Settings


Running SurfSense with Discord Connector

Add the Discord credentials to your .env file (created during Docker installation):

DISCORD_CLIENT_ID=your_discord_client_id
DISCORD_CLIENT_SECRET=your_discord_client_secret
DISCORD_REDIRECT_URI=http://localhost:8000/api/v1/auth/discord/connector/callback
DISCORD_BOT_TOKEN=your_discord_bot_token

Then restart the services:

docker compose up -d

On this page