Pular para o conteúdo principal

Send notifications to Discord

This guide explains how to send the notifications of Casdoor to a Discord channel through a bot.


Learning outcomes​

  • Get a bot token and a channel ID from Discord.
  • Add Discord as a notification provider in Casdoor.

What you need​

  • A Discord server on which you may add a bot
  • Administrator access to the Casdoor admin console

Prepare Discord​

  1. In the Discord Developer Portal, create an application, open the Bot tab, and copy the token of the bot.

    Bot token in the Discord Developer Portal

  2. Invite the bot to your server.

  3. In Discord, right-click the channel for the messages and select Copy Channel ID.

    Copy Channel ID in Discord

Add the provider in Casdoor​

  1. In the Casdoor admin console, go to Identity > Providers and add a provider.

  2. Set Category to Notification and Type to Discord.

  3. Fill in the fields:

    CasdoorDiscord
    Chave secretaBot token
    Chat IDID do Canal
    Conteúdo(opcional)

    Discord notification provider in Casdoor

  4. Click Send Testing Notification, and save the provider.

See also​