> ## Documentation Index
> Fetch the complete documentation index at: https://nango.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Discord

> Integrate your application with the Discord API

## 🚀 Quickstart

Connect to Discord with Nango and see data flow in 2 minutes.

**1. Create the integration**

In Nango ([free signup](https://app.nango.dev)), go to [Integrations](https://app.nango.dev/dev/integrations) -> *Configure New Integration* -> *Discord*.

> [!NOTE]
>
> Nango has a [Nango-managed OAuth app](https://nango.dev/docs/guides/auth/auth-guide.md#nango-managed-oauth-apps) you can use in development and production. Select it when you create the integration.

**2. Authorize Discord**

Go to [Connections](https://app.nango.dev/dev/connections) -> *Add Test Connection* -> *Authorize*, then log in to Discord. Later, you'll let your users do the same directly from your app.

**3. Call the Discord API**

Let's make your first request to the Discord API. Replace the placeholders below with your [Environment API key](https://nango.dev/docs/reference/backend/http-api/api-keys.md), [integration ID](https://app.nango.dev/dev/integrations), and [connection ID](https://app.nango.dev/dev/connections):

> [tab] cURL
>
> ```bash theme={null}
> curl "https://api.nango.dev/proxy/users/@me" \
>   -H "Authorization: Bearer <NANGO-API-KEY>" \
>   -H "Provider-Config-Key: <INTEGRATION-ID>" \
>   -H "Connection-Id: <CONNECTION-ID>"
> ```

> [tab] Node
>
> Install Nango's backend SDK with `npm i @nangohq/node`. Then run:
>
> ```typescript theme={null}
> import { Nango } from '@nangohq/node';
>
> const nango = new Nango({ apiKey: '<NANGO-API-KEY>' });
>
> const res = await nango.get({
>     endpoint: '/users/@me',
>     providerConfigKey: '<INTEGRATION-ID>',
>     connectionId: '<CONNECTION-ID>'
> });
>
> console.log(res.data);
> ```

Or fetch credentials with the [Node SDK](https://nango.dev/docs/reference/backend/backend-sdk/node.md#get-a-connection-with-credentials) or [API](https://nango.dev/docs/reference/backend/http-api/connections/get.md).

✅ You're connected! Check the [Logs](https://app.nango.dev/dev/logs) tab in Nango to inspect requests.

**4. Implement Nango in your app**

Follow our [Auth implementation guide](https://nango.dev/docs/guides/primitives/auth.md) to integrate Nango in your app.

To use your own OAuth app instead of the Nango-managed one, follow the setup guide linked below.

## 📚 Discord Integration Guides

Nango maintained guides for common use cases.

* [How to register your own Discord OAuth app](https://nango.dev/docs/api-integrations/discord/how-to-register-your-own-discord-api-oauth-app)\
  Register an OAuth app with Discord and obtain credentials to connect it to Nango

Official docs: [Discord API docs](https://discord.com/developers/docs/reference)

## 🧩 Pre-built syncs & tools for Discord

Explore Nango-provided tools in your dashboard. Extend and customize them to fit your needs.

### Others

| Function name | Description | Type |
| - | - | - |
| `add-guild-member-role` | Assign a role to a guild member. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `create-channel` | Create a channel in Discord | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `create-message` | Create a message in Discord. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `create-reaction` | Add a reaction to a Discord message. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `create-role` | Create a role in Discord | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `create-thread-from-message` | Start a Discord thread from an existing message | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `create-webhook` | Create a webhook in a Discord channel | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `delete-channel` | Delete or archive a channel in Discord | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `delete-guild` | Leave a guild in Discord. Note: Discord does not allow bots to delete guilds via the API; use this action to have the bot leave a guild instead. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `delete-guild-member` | Delete or archive a guild member in Discord | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `delete-message` | Delete or archive a message in Discord | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `delete-reaction` | Remove a reaction from a Discord message. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `delete-role` | Delete a role in a Discord guild | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `delete-webhook` | Delete a webhook in Discord permanently | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `get-channel` | Retrieve a single channel from Discord | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `get-guild-member` | Retrieve a single guild member from Discord | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `get-guild` | Retrieve a single guild from Discord. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `get-message` | Retrieve a single message from Discord. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `get-role` | Retrieve a single role from Discord | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `get-webhook` | Retrieve a single webhook from Discord. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `list-channels` | List channels from a Discord guild (server) | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `list-guild-members` | List guild members from Discord. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `list-guilds` | List guilds from Discord. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `list-messages` | List messages from a Discord channel with optional pagination filters | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `list-roles` | List roles from Discord. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `list-webhooks` | List webhooks from a Discord channel | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `remove-guild-member-role` | Remove a role from a guild member | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `update-channel` | Update a Discord channel. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `update-guild-member` | Update a guild member in Discord | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `update-guild` | Update a guild in Discord | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `update-message` | Update a message in Discord. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `update-role` | Update a role in Discord | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `update-webhook` | Update a webhook in Discord. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `channels` | Sync channels from Discord | [Sync](https://nango.dev/docs/guides/functions/syncs/sync-functions.md) |
| `guild-members` | Sync guild members from Discord | [Sync](https://nango.dev/docs/guides/functions/syncs/sync-functions.md) |
| `guilds` | Sync guilds from Discord. | [Sync](https://nango.dev/docs/guides/functions/syncs/sync-functions.md) |
| `messages` | Sync messages from Discord. | [Sync](https://nango.dev/docs/guides/functions/syncs/sync-functions.md) |
| `roles` | Sync roles from Discord | [Sync](https://nango.dev/docs/guides/functions/syncs/sync-functions.md) |
| `webhooks` | Sync webhooks from Discord. | [Sync](https://nango.dev/docs/guides/functions/syncs/sync-functions.md) |

***


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.