> ## Documentation Index
> Fetch the complete documentation index at: https://discord-anthony-embed-unfurl-components.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Account Linking from Discord

> Adopt the new account linking APIs to allow Discord to show your players entry points for account linking within the Discord client

export const UserIcon = props => <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none"><path fill="currentColor" d="M12 10a4 4 0 1 0 0-8 4 4 0 0 0 0 8ZM11.53 11A9.53 9.53 0 0 0 2 20.53c0 .81.66 1.47 1.47 1.47h.22c.24 0 .44-.17.5-.4.29-1.12.84-2.17 1.32-2.91.14-.21.43-.1.4.15l-.26 2.61c-.02.3.2.55.5.55h11.7a.5.5 0 0 0 .5-.55l-.27-2.6c-.02-.26.27-.37.41-.16.48.74 1.03 1.8 1.32 2.9.06.24.26.41.5.41h.22c.81 0 1.47-.66 1.47-1.47A9.53 9.53 0 0 0 12.47 11h-.94Z" /></svg>;

export const ListViewIcon = props => <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none"><path fill="currentColor" d="M4 2a2 2 0 1 0 0 4 2 2 0 0 0 0-4ZM4 10a2 2 0 1 0 0 4 2 2 0 0 0 0-4ZM2 20a2 2 0 1 1 4 0 2 2 0 0 1-4 0ZM9 3a1 1 0 0 0 0 2h12a1 1 0 1 0 0-2H9ZM8 12a1 1 0 0 1 1-1h12a1 1 0 1 1 0 2H9a1 1 0 0 1-1-1ZM9 19a1 1 0 1 0 0 2h12a1 1 0 1 0 0-2H9Z" /></svg>;

export const PaintPaletteIcon = props => <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none"><path fill="currentColor" fill-rule="evenodd" d="M19 16h-5a2 2 0 0 0-2 2v2c0 1.66-1.37 3.04-2.96 2.6A11 11 0 1 1 23 12c0 2.2-2 4-4 4ZM13.5 4.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0ZM17.25 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm-9-1.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Zm-3.75 7a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z" clip-rule="evenodd" /></svg>;

## Overview

<Tip>
  New to account linking? Read the [Account Linking overview](/developers/platform/account-linking) to understand what it is, how it works, and which flow to use.
</Tip>

To give players more flexibility and options for account linking, Discord can show prompts and buttons throughout the Discord client that encourage users to link their accounts with your game. These are called entry points for account linking.

These entry points are additive: they work alongside any account linking you already support from your game on desktop, mobile, or console. Enabling them doesn't replace or change how players link from within your game — it just gives Discord a way to prompt players to link even when they aren't already in your game.

Higher account linking rates lead to better social features, improved engagement, and a stronger connection between your game and Discord users.

This guide shows you how to enable Discord to display these account linking prompts to your players.

### Prerequisites

Before enabling these entry points, you must have:

* **Discord application setup**
  * Created a Discord application in the [Developer Portal](https://discord.com/developers/applications)
  * Configured [OAuth2 settings](https://discord.com/developers/applications/select/oauth2) with appropriate redirect URLs
* **Implemented account linking in your game**
  * Discord Social SDK downloaded and integrated into your game
  * SDK initialization working (can connect to Discord)
  * [Basic account linking flow](/developers/discord-social-sdk/development-guides/account-linking-with-discord) already implemented in your game
* **Development environment ready**
  * Game can successfully authenticate users with Discord OAuth2

If you haven't completed these prerequisites, we recommend first following the [Getting Started](/developers/discord-social-sdk/getting-started) guide.

<Note>
  These prerequisites are for the connected game flow below, which uses the Discord Social SDK. If you only want to support the web flow, you don't need the SDK at all — see [Account Linking on Web](/developers/discord-social-sdk/development-guides/account-linking-on-web) for its own prerequisites.
</Note>

<Tip>
  Whichever flow you implement, we provide tools to aid in testing and debugging it using the [built-in developer tools](/developers/discord-social-sdk/how-to/debug-log#client-tools) in the Discord client.
</Tip>

***

## Entry Points & Account Linking Flows

### What are Entry Points?

Entry points are buttons, prompts, and UI elements that Discord shows throughout the Discord client to encourage account linking. Think of them as "Link your account" buttons that appear in various places where users might see your game.

### Example of an Entry Point

Discord automatically chooses which entry points to show based on what features you've implemented and whether your game is currently running.

<img src="https://mintcdn.com/discord-anthony-embed-unfurl-components/hV9nhlvslqiu3Suv/images/account-linking/account-link-discord.webp?fit=max&auto=format&n=hV9nhlvslqiu3Suv&q=85&s=a15b5aaf0acbbc7aae32fca8ddd9e954" alt="Account Linking from Discord Entry Points" style={{width: "100%", height: "auto"}} noZoom width="1920" height="1080" data-path="images/account-linking/account-link-discord.webp" />

Some of the current Discord entry points include:

**Game Detection**

Discord detects the player is playing your game and provides an entry point to link if they haven't already.

<img src="https://mintcdn.com/discord-anthony-embed-unfurl-components/hV9nhlvslqiu3Suv/images/account-linking/account-link-rtc.png?fit=max&auto=format&n=hV9nhlvslqiu3Suv&q=85&s=33193481d2a8cfb2b7c62629399b4126" alt="Discord entry points for account linking" noZoom width="439" height="512" data-path="images/account-linking/account-link-rtc.png" />

**Game Invites**

Players are optionally able to link when receiving an invite for your game, which helps them get set up and playing with their friends faster.

<img src="https://mintcdn.com/discord-anthony-embed-unfurl-components/hV9nhlvslqiu3Suv/images/account-linking/account-link-invite.png?fit=max&auto=format&n=hV9nhlvslqiu3Suv&q=85&s=e8b797e8b59b998ba99dd076776d8176" alt="Game Invite entry points for account linking" noZoom width="512" height="251" data-path="images/account-linking/account-link-invite.png" />

**Claiming Game Shop Items**

Players need to account link when redeeming items from your Game Shop to be able to receive their in-game rewards.

<img src="https://mintcdn.com/discord-anthony-embed-unfurl-components/hV9nhlvslqiu3Suv/images/account-linking/account-link-redeem-item.png?fit=max&auto=format&n=hV9nhlvslqiu3Suv&q=85&s=7b483fa1e7bd3141c497d1172d9846fb" alt="Game Shop entry points for account linking" noZoom width="464" height="512" data-path="images/account-linking/account-link-redeem-item.png" />

### Account Linking Flows

At this time, Discord provides two different flows for account linking from the client: the [connected game flow](#connected-game-flow) and the [web flow](#web-flow). These are additive, not exclusive — you can implement one or both, and neither requires the other. Offering both gives players the most reliable way to link no matter how they reach the entry point.

When a player clicks one of the entry points within their Discord client, Discord automatically picks which flow to send them through, in this priority order:

1. **Connected game flow** — used if your game is detected as currently running and has registered [`Client::RegisterAuthorizeRequestCallback`]
2. **Web flow** — used as a fallback whenever the connected game flow isn't available (for example, your game isn't running, or you haven't implemented it), as long as your **Connection Entrypoint URL** is configured in the Developer Portal

If neither flow is available for a given player, Discord won't show them an entry point. Follow the implementation guides below for whichever flow (or both) works best for your game.

***

## Connected Game Flow

This is our preferred account linking flow as we think it provides the best user experience when it's available. The connected game flow will send the user into your game client to begin the account linking flow. When it isn't available — your game isn't running, or you haven't implemented it — Discord falls back to the [web flow](#web-flow) if you've configured one.

### Prerequisites

* Upgrade to SDK version 1.6 or higher
* Implement [account linking](/developers/discord-social-sdk/development-guides/account-linking-with-discord) in your game

### Implementing the Connected Game Flow

Once you have adopted SDK version 1.6 or higher, there will be two new methods on the Client object, [`Client::RegisterAuthorizeRequestCallback`] and [`Client::RemoveAuthorizeRequestCallback`]. These two new methods will allow you to enable and disable this flow while your game is running.

<Warning>
  Before calling [`Client::RegisterAuthorizeRequestCallback`], ensure
  [`Client::SetApplicationId`] has been called. This ensures that your game is
  properly identifying itself to the Discord client and that all requests are
  associated with the correct application.
</Warning>

Calling [`Client::RegisterAuthorizeRequestCallback`] with a callback function will signal to the Discord client that your game is running and able to start the account linking process. You should run this as soon as your game is able to handle an account link, for instance just after your user has logged in or reached the main menu.

When a user clicks one of the account linking entry points in their Discord client, the SDK will run your callback. Treat this as if the user had just clicked one of your in-game account linking buttons and begin the authorization flow right away.

<Info>
  When your game receives this callback, the user is most likely focused on the
  Discord client, not the game client. Make sure to pull focus or otherwise
  alert the user that something is happening in the game. The Discord client
  will notify them to check the game as well. For a more seamless
  experience, you should pull them back into the game.
</Info>

Calling [`Client::RemoveAuthorizeRequestCallback`] will signal to the Discord client that your game is no longer able to start the account linking process. Call this whenever your game client is entering a state where starting the account linking process wouldn't work, for instance if the player enters a match, logs out, or is in some other full screen flow like a cutscene.

This is all you need to enable the connected game flow, you can test and debug this flow using our new [built-in developer tools](/developers/discord-social-sdk/how-to/debug-log#client-tools) in the Discord client.

```cpp theme={"system"}
// If you haven't already
client.SetApplicationId("123456789");

client.RegisterAuthorizeRequestCallback([client, myGameAuthorizationHandler]() {
	// Pull focus into your game using native APIs
	// ...

	// Run your normal authorization flow
	myGameAuthorizationHandler.StartDiscordAccountLink();
});
```

### Connected Game Best Practices

When a user clicks the account link button in their Discord client, this is a high intent action. We recommend skipping any extra upsells you have until after the user has linked their account, as any extra steps added to this linking flow increases the areas where users may drop off. Show them any upsells after they've linked to reaffirm all the new features and any rewards they may have unlocked by linking their account.

Ensure you're enabling and disabling the callback at the appropriate times. If a user clicks an entry point in their Discord client and it launches the account linking flow in the middle of a match, this can interrupt gameplay and pull them out of your intended experience.

Don't worry about checking if the user is already linked, the Discord client will handle hiding the entry point for users that have already linked their accounts. This will keep your implementation simpler and reduce surface for issues.

## Web Flow

The web flow is Discord's fallback for entry points: whenever the connected game flow isn't available for a player — the game isn't running, or you haven't implemented [`Client::RegisterAuthorizeRequestCallback`] — Discord sends them to a webpage to begin the account linking process instead. It's additive to the connected game flow, not a replacement for it, and it doesn't require the Discord Social SDK at all.

To enable it, implement the standard OAuth2 flow on your website, then configure your **Connection Entrypoint URL** in the Developer Portal so Discord knows where to send players from client entry points.

For the full implementation guide — configuring your redirect URI, handling the OAuth2 callback, exchanging tokens, and setting your Connection Entrypoint URL — see [Account Linking on Web](/developers/discord-social-sdk/development-guides/account-linking-on-web).

### Requirements for Entry Points

Because this webpage can be reached from a Discord entry point while your game is installed (and possibly running), it needs to handle a few cases that a standalone web account linking flow doesn't:

* If the user isn't signed in to their game account, prompt them to sign in and then take them immediately back to the authorization flow.
* Request the same scopes you request in your game, so linking behaves identically regardless of which flow the player used.
* After authorization completes, save the token to the user's account the same way you would during in-game authorization, so it's ready the next time they launch your game.
* If the user is currently in game, send an update to their client with the token and call [`Client::UpdateToken`] to sign them in right away without needing to restart their game.

***

## Next Steps

Now that you've successfully implemented account linking with Discord, you can integrate more social features into your game.

<CardGroup cols={3}>
  <Card title="Design: Signing In" href="/developers/discord-social-sdk/design-guidelines/signing-in" icon={<PaintPaletteIcon/>}>
    Design guidelines for account linking and user authentication
  </Card>

  <Card title="Creating a Unified Friends List" href="/developers/discord-social-sdk/development-guides/creating-a-unified-friends-list" icon={<ListViewIcon/>}>
    Combine Discord and game friends into a single list for easy management.
  </Card>

  <Card title="Setting Rich Presence" href="/developers/discord-social-sdk/development-guides/setting-rich-presence" icon={<UserIcon/>}>
    Display game status and information to Discord friends.
  </Card>
</CardGroup>

Need help? Join the [Discord Developers Server](https://discord.gg/discord-developers) and share questions in the `#social-sdk-dev-help` channel for support from the community.

If you encounter a bug while working with the Social SDK, please report it here:  [https://dis.gd/social-sdk-bug-report](https://dis.gd/social-sdk-bug-report)

***

## Change Log

| Date              | Changes                                                   |
| ----------------- | --------------------------------------------------------- |
| September 8, 2026 | Link to Account Linking developer tools from the Overview |
| December 16, 2025 | initial release                                           |

[`Client::RegisterAuthorizeRequestCallback`]: https://discord.com/developers/docs/social-sdk/classdiscordpp_1_1Client.html#a5f34b873e127a446c9ab549e4588ccd7

[`Client::RemoveAuthorizeRequestCallback`]: https://discord.com/developers/docs/social-sdk/classdiscordpp_1_1Client.html#ab7e48864b0cedf3e8572a228ca401f2a

[`Client::SetApplicationId`]: https://discord.com/developers/docs/social-sdk/classdiscordpp_1_1Client.html#ad452335c06b28be0406dab824acccc49

[`Client::UpdateToken`]: https://discord.com/developers/docs/social-sdk/classdiscordpp_1_1Client.html#a606b32cef7796f7fb91c2497bc31afc4
