Discord Integration

Create a Discord bot

To use Sentry's Discord integration in your Sentry instance, you must first create a Discord bot. Go to the Discord Developer Portal and click New Application.

Create bot

After you create the bot, you should be redirected to its settings.

Update your Sentry configuration

Sentry needs the following Discord credentials, which you can find in the bot's settings:

  • Application ID and Public key are located in General Information.
  • Client secret is located in OAuth2 > General.
  • Bot token is located in Bot.

Add these to your Sentry instance's config.yml as follows:

Copied
discord.application-id: "<application id>"
discord.public-key: "<public key>"
discord.client-secret: "<client secret>"
discord.bot-token: "<bot token>"

NOTE: If you're doing local Sentry development, you should use a tool like Ngrok and add system.url-prefix: "https://<your_subdomain>.ngrok.io" to your ~/.sentry/config.yml. Otherwise, installing the Discord bot won't work, as it will not be able to communicate with your local Sentry instance.

After you update the config.yml, restart you Sentry server to continue the setup process.

Configure your Discord interactions endpoint

Now that Sentry is running and it knows your Discord credentials, we need to set up a way for Discord to interact with Sentry.

Head back to your Discord application setttings, navigate to General Information and look for Interactions Endpoint URL.

Interactions Endpoint URL

Here you'll need to enter the Discord interactions endpoint provided by Sentry:

Copied
Interactions Endpoint URL: {YOUR_DOMAIN}/extensions/discord/interactions/

Click Save Changes.

You're now all set to use the Discord integration in Sentry! See our documentation on installing and configuring the Discord integration for some next steps.

Enable the feature flags

Until the Discord integration is fully released and the feature flags removed, you will need to enable the feature flags in sentry.conf.py in order for the integration to work:

Copied
SENTRY_FEATURES['organizations:integrations-discord'] = True
SENTRY_FEATURES['organizations:integrations-discord-notifications'] = True
You can edit this page on GitHub.