## Discord integration Integrating Discord with Frontegg allows your application to access user profiles, manage guild (server) memberships, read and send messages, and manage webhooks — all through Frontegg's integration layer using Discord OAuth 2.0. Prerequisites - A Discord account - Access to the [Discord Developer Portal](https://discord.com/developers/applications) ### Create a Discord application #### Step 1: Open the Discord developer portal Go to the [Discord Developer Portal](https://discord.com/developers/applications) and sign in with your Discord account. On the **Applications** page, click **New Application**. ![Discord developer portal with New Application button highlighted](/assets/discord-1.14c5bb7cfb347696da61448f5c4ed9ae4b0f461f71efe7d808b06426d2aee037.1ce25488.png) #### Step 2: Name your application In the **Create a new app** dialog, enter a name for your application (for example, `Frontegg Integration`). Check the box to agree to the Developer Terms of Service and Developer Policy, then click **Create**. ![Create a new app dialog with name and terms accepted](/assets/discord-2.beedf2aa7102b084daf2a7989901ca27a2bd1bef4d0b63777cc1207435bc9396.1ce25488.png) #### Step 3: View application details After creating the application, you are redirected to the **General Information** page. Here you can see your **Application ID** and configure other settings. ![General Information page showing Application ID](/assets/discord-3.eb3aee66b1ca80c74bad00901e898845ece2c76bba6a1f0c1574d3ad75511a59.1ce25488.png) ### Configure OAuth2 #### Step 4: Copy your credentials In the left sidebar, click **OAuth2**. On this page, you can find your **Client ID** and **Client Secret**. - Copy the **Client ID** — it is displayed directly on the page. - To get the **Client Secret**, click **Reset Secret** and copy the generated value. Save your Client Secret Store the Client Secret securely. If you lose it, you will need to reset it, which invalidates the previous secret. ![OAuth2 page showing Client ID and Client Secret](/assets/discord-4.4a397985eb0e7ecdc1339859213ebe3aaab87e9f9504dd6c5cff4daf7f53893c.1ce25488.png) #### Step 5: Configure redirect URIs Scroll down to the **Redirects** section. Click **Add Another** and enter the following redirect URIs: - `https://YOUR_MCP_GATEWAY_URL/integration-callback` Click **Save Changes**. ![Redirects section with Frontegg callback URIs configured](/assets/discord-5.b56a5afd239c2e2ba90e4c6ea9a69bade825e1f77ec68899d63e89c053329770.1ce25488.png) #### Step 6: Review available scopes Scroll down to the **OAuth2 URL Generator** section to see the list of available scopes. Discord does not require pre-selecting scopes in the developer portal — scopes are requested at authorization time and configured in the Frontegg portal. The following scopes are available for the Discord integration: | Scope | Description | | --- | --- | | `identify` | Access user profile information | | `email` | Access user email address | | `guilds` | List user guilds (servers) | | `guilds.members.read` | Read guild member information | | `messages.read` | Read messages in channels | | `connections` | Access user connections | | `bot` | Create and manage bot actions | | `webhook.incoming` | Create and manage webhooks | Minimum required scopes For basic functionality, you need: `identify`, `email`, `guilds`. ![OAuth2 URL Generator showing available scopes](/assets/discord-6.fe51d571e9e2c0d8180366212373ef90930a24f5b921863ccd98f02b2799e886.1ce25488.png) ### Configure the Frontegg portal Once you have obtained your **Client ID** and **Client Secret** from the steps above, enter them in the integration configuration page of the Frontegg portal: 1. Open the **Frontegg portal** and navigate to **Environment** → **Integrations** → **Discord**. 2. Enter the **Client ID** and **Client Secret** in the corresponding fields. 3. Select the required **scopes**. 4. Click **Save**. Keep your credentials secure Never share or commit your Client Secret to version control. ### Additional resources - [Discord OAuth2 documentation](https://discord.com/developers/docs/topics/oauth2) - [Discord Developer Portal](https://discord.com/developers/applications) - [How to get your Redirect URL](/agen-for-work/connectors/redirect-url)