Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
327 changes: 38 additions & 289 deletions docs/discord-social-sdk/core-concepts.mdx

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
---
sidebar_label: Communication Features
---

[Home](/docs/intro) > [Discord Social SDK](/docs/discord-social-sdk/overview) > [Core Concepts](/docs/discord-social-sdk/core-concepts) > {sidebar_label}

# Communication Features

The Discord Social SDK provides powerful communication features to enhance player interaction in your game.
These features include messaging, voice chat, and in-game lobbies, allowing players to connect seamlessly.

## Limited Access

The following communication features are available to be used, but are only fully unlocked when joining the closed beta.

:::preview
To apply for full access to closed beta features or to reach out to Discord directly to discuss your game, please fill out [this form](https://discord.com/developers/social-sdk-closed-beta-access-request-form).
:::

Without full access, these features are available for development and testing, but they are not suitable for a
production environments as their usage is capped with a rate limit. Please read our
[documentation on rate limits](/docs/topics/rate-limits) to learn more.

## Messaging & Communication

Users can communicate via direct messages (DMs) and voice calls:

- DMs: One-on-one private chat ([`MessageHandle`]).
- Calls: Real-time voice communication inside a game lobby ([`Call`]).

| Development Guides |
|------------------------------------------------------------------------------------------------|
| [Sending Direct Messages](/docs/discord-social-sdk/development-guides/sending-direct-messages) |
| [Managing Voice Chat](/docs/discord-social-sdk/development-guides/managing-voice-chat) |

| Design Guidelines |
|-------------------------------------------------------------------------------|
| [Direct Messages](/docs/discord-social-sdk/design-guidelines/direct-messages) |

## Lobbies & In-Game Chat

A lobby is a virtual space where players can interact through voice and text chat.

- Your game controls lobbies, which can have different membership rules.
- Integrated voice chat allows real-time communication among players in a session.

| Development Guides |
|---------------------------------------------------------------------------------|
| [Manging Lobbies](/docs/discord-social-sdk/development-guides/managing-lobbies) |

## Linked Channels

Games can link in-game chat with Discord's server-based text channels in their UI, allowing players to chat in a Discord server without leaving the game.

| Development Guides |
|--------------------------------------------------------------------------------|
| [Linked channels](/docs/discord-social-sdk/development-guides/linked-channels) |

| Design Guidelines |
|-------------------------------------------------------------------------------|
| [Linked channels](/docs/discord-social-sdk/design-guidelines/linked-channels) |

---

## Next Steps

Learn about integration steps, check platform support, and explore implementation guides:

<Container>
<Card title="Integration Overview"
link="/docs/discord-social-sdk/core-concepts/integration-overview" icon="HammerIcon">
Learn about the integration overview and implementation steps.
</Card>
<Card title="Platform Compatibility" link="/docs/discord-social-sdk/core-concepts/platform-compatibility"
icon="UserPlatformIcon">
See supported platforms and download information.
</Card>
<Card title="Development Guides" link="/docs/discord-social-sdk/development-guides" icon="BookCheckIcon">
Learn how to implement messaging, voice chat, and linked channels.
</Card>
</Container>

---

## Change Log

| Date | Changes |
|---------------|-----------------|
| July 21, 2025 | initial release |


{/* Autogenerated Reference Links */}
[`Call`]: https://discord.com/developers/docs/social-sdk/classdiscordpp_1_1Call.html#a1cc8a7f73c15a960bc409d734b5edbd1
[`MessageHandle`]: https://discord.com/developers/docs/social-sdk/classdiscordpp_1_1MessageHandle.html#ae25595b43bc74b0c4c92c5165d16382f
96 changes: 96 additions & 0 deletions docs/discord-social-sdk/core-concepts/core-features.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
---
sidebar_label: Core Features
---

[Home](/docs/intro) > [Discord Social SDK](/docs/discord-social-sdk/overview) > [Core Concepts](/docs/discord-social-sdk/core-concepts) > {sidebar_label}

# Core Features

The Discord Social SDK offers a range of features to enhance social interactions within games. Developers can leverage these features to create a more engaging and connected experience for players in their game.

## Account Linking

Account linking allows a game to authenticate users with their Discord credentials, gaining access to social features like friends, chat, and presence. This process uses OAuth2 authentication.

| Development Guides |
|----------------------------------------------------------------------------------------------------------|
| [Account Linking with Discord](/docs/discord-social-sdk/development-guides/account-linking-with-discord) |
| [Account Linking on Consoles](/docs/discord-social-sdk/development-guides/account-linking-on-consoles) |

| Design Guidelines |
|----------------------------------------------------------------------------------|
| [Signing in with Discord](/docs/discord-social-sdk/design-guidelines/signing-in) |
| [Consoles](/docs/discord-social-sdk/design-guidelines/consoles) |

## Provisional Accounts

Provisional accounts let players use social features in your game without linking a Discord account so all players can have a consistent gameplay experience.

| Development Guides |
|------------------------------------------------------------------------------------------------------|
| [Using Provisional Accounts](/docs/discord-social-sdk/development-guides/using-provisional-accounts) |

| Design Guidelines |
|-----------------------------------------------------------------------------------------|
| [Provisional Accounts](/docs/discord-social-sdk/design-guidelines/provisional-accounts) |

## Friend System & Relationships

The SDK models friendships and relationships in two ways:

- Discord Friends: Persistent across all games.
- Game-Specific Friends: Limited to the current game.

| Development Guides |
|----------------------------------------------------------------------------------------------------------------|
| [Creating a Unified Friends List](/docs/discord-social-sdk/development-guides/creating-a-unified-friends-list) |

| Design Guidelines |
|-----------------------------------------------------------------------------------------|
| [Unified Friends List](/docs/discord-social-sdk/design-guidelines/provisional-accounts) |
| [Game Friends](/docs/discord-social-sdk/design-guidelines/game-friends) |

## Presence & Rich Presence

Presence refers to a user's online status, while Rich Presence provides game-specific activity data:

- Displays if a user is online, idle, or offline.
- Shows detailed game stats (e.g., what level they're playing and time played).
- Allows users to send game invites through Discord and in-game.

| Development Guides |
|--------------------------------------------------------------------------------------------|
| [Setting Rich Presence](/docs/discord-social-sdk/development-guides/setting-rich-presence) |

| Design Guidelines |
|-------------------------------------------------------------------------------------------|
| [Status & Rich Presence](/docs/discord-social-sdk/design-guidelines/status-rich-presence) |


---

## Next Steps

Learn the implementation steps, configure authentication, and explore development guides:

<Container>
<Card title="Communication Features" link="/docs/discord-social-sdk/core-concepts/communication-features"
icon="PhoneCallIcon">
Learn about messaging, voice chat, and in-game lobbies.
</Card>
<Card title="Integration Overview"
link="/docs/discord-social-sdk/core-concepts/integration-overview" icon="HammerIcon">
Learn about the integration overview and implementation steps.
</Card>
<Card title="Development Guides" link="/docs/discord-social-sdk/development-guides" icon="BookCheckIcon">
Step-by-step guides for implementing each social feature.
</Card>
</Container>

---

## Change Log

| Date | Changes |
|---------------|-----------------|
| July 21, 2025 | initial release |
60 changes: 60 additions & 0 deletions docs/discord-social-sdk/core-concepts/integration-overview.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
---
sidebar_label: Integration Overview
---

[Home](/docs/intro) > [Discord Social SDK](/docs/discord-social-sdk/overview) > [Core Concepts](/docs/discord-social-sdk/core-concepts) > {sidebar_label}

# Integration Overview

To implement the Discord Social SDK, developers for all platforms will generally follow these steps:

1. Import the SDK
2. Initialize the SDK:
- Create a [`Client`] instance.
- Set up event listeners to monitor SDK events and callbacks
3. Authenticate users with flexible account options
- Link an existing Discord account via OAuth ([`Client::Authorize`]).
- Create and manage provisional accounts for users who don't have or want a Discord account ([`Client::GetProvisionalToken`]).
4. Implement social features
- Implement [unified friends list](/docs/discord-social-sdk/development-guides/creating-a-unified-friends-list) and [relationships](/docs/discord-social-sdk/development-guides/managing-relationships).
- Use [rich presence](/docs/discord-social-sdk/development-guides/setting-rich-presence) for game activity updates.
- Set up [lobbies](/docs/discord-social-sdk/development-guides/managing-lobbies) for multiplayer interaction and [game invites](/docs/discord-social-sdk/development-guides/managing-game-invites).
- Manage [direct message](/docs/discord-social-sdk/development-guides/sending-direct-messages), [linked channels](/docs/discord-social-sdk/development-guides/creating-a-unified-friends-list), and [voice communication](/docs/discord-social-sdk/development-guides/managing-voice-chat).
5. Handle events & API calls:
- Listen for changes in friend lists, presence updates, and chat messages.
- Use Discord's APIs to update statuses, send messages, and manage connections.

This guide is a conceptual overview. If you're ready to start building, [follow our step-by-step guide](/docs/discord-social-sdk/getting-started) to set up the SDK in your game engine.

---

## Next Steps

Check platform compatibility, explore communication features, and start your integration:

<Container>
<Card title="Platform Compatibility" link="/docs/discord-social-sdk/core-concepts/platform-compatibility"
icon="UserPlatformIcon">
See supported platforms and download information.
</Card>
<Card title="Communication Features" link="/docs/discord-social-sdk/core-concepts/communication-features"
icon="PhoneCallIcon">
Learn about messaging, voice chat, and in-game lobbies.
</Card>
<Card title="Getting Started" link="/docs/discord-social-sdk/getting-started" icon="PlayIcon">
Choose your platform and follow step-by-step setup instructions.
</Card>
</Container>

---

## Change Log

| Date | Changes |
|---------------|-----------------|
| July 21, 2025 | initial release |

{/* Autogenerated Reference Links */}
[`Client`]: https://discord.com/developers/docs/social-sdk/classdiscordpp_1_1Client.html#a91716140c699d8ef0bdf6bfd7ee0ae13
[`Client::Authorize`]: https://discord.com/developers/docs/social-sdk/classdiscordpp_1_1Client.html#ace94a58e27545a933d79db32b387a468
[`Client::GetProvisionalToken`]: https://discord.com/developers/docs/social-sdk/classdiscordpp_1_1Client.html#a8003130b6c46e54ac68442483bf0480c
107 changes: 107 additions & 0 deletions docs/discord-social-sdk/core-concepts/oauth2-scopes.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
---
sidebar_label: OAuth2 Scopes
---

[Home](/docs/intro) > [Discord Social SDK](/docs/discord-social-sdk/overview) > [Core Concepts](/docs/discord-social-sdk/core-concepts) > {sidebar_label}

# OAuth2 Scopes

OAuth2 scopes define the level of access your app has to a user's Discord account

What OAuth scopes are available to your integration are set via
[`AuthorizationArgs::SetScopes`] on [`AuthorizationArgs`] which is passed to [`Client::Authorize`] on Social SDK
authentication.

## Default Presence Scopes

At a minimum, the Social SDK uses the following scopes to use features like rich presence and friends list:

- `openid`
- `sdk.social_layer_presence`

The default presence features include:

* [Account Linking](/docs/discord-social-sdk/core-concepts/core-features#account-linking)
* [Provisional Accounts](/docs/discord-social-sdk/core-concepts/core-features#provisional-accounts)
* [Friend System & Relationships](/docs/discord-social-sdk/core-concepts/core-features#friend-system-relationships)
* [Presence & Rich Presence](/docs/discord-social-sdk/core-concepts/core-features#presence-rich-presence)

The Social SDK provides the helper method [`Client::GetDefaultPresenceScopes`], which returns `openid sdk.social_layer_presence`,
that you can use when setting up your OAuth2 flow, for integrations that only need the above functionality.

:::warn
With only the default presence scopes, your game will not be able to use any of the limited access
communications features.
:::

## Default Communication Scopes

The communications features are currently available but have limited access. Those features **require** the scope
of `sdk.social_layer`, which includes the `sdk.social_layer_presence` scope but also allows your app to use those limited features on behalf of the user.

- `openid`
- `sdk.social_layer`

These communication features include:
* [Messaging & Communication](/docs/discord-social-sdk/core-concepts/communication-features#messaging-communication)
* [Lobbies & In-Game Chat](/docs/discord-social-sdk/core-concepts/communication-features#lobbies-ingame-chat)
* [Linked Channels](/docs/discord-social-sdk/core-concepts/communication-features#linked-channels)

The Social SDK provides the helper method [`Client::GetDefaultCommunicationScopes`], which returns `openid sdk.social_layer`,
that you can use when setting up your OAuth2 flow, for integrations that integrates both the default and limited communications features.

:::preview
For more information about these features, please see [Core Concepts: Communication Features](/docs/discord-social-sdk/core-concepts/communication-features).
:::

If your game requires additional scopes, you can add them to the default scopes to authorize additional access from your users.

You should only add scopes that are necessary for your game to function. Requesting unnecessary scopes can lead to user distrust and may result in users not linking their Discord account.

See [available OAuth2 scopes](/docs/topics/oauth2#shared-resources-oauth2-scopes) available with the Discord API.

## OAuth2 Client Types

OAuth2 has two client types: **Public** and **Confidential**. Most games will not want to ship with **Public Client** enabled.

Some Social SDK methods require your Discord application to be a **Public Client**. These methods also have server-side alternatives that you can use with a **Confidential Client**.

- Public clients cannot securely store client secrets.
- Using confidential clients with proper secret management for production applications is generally recommended.
- Your security team should review this setting and authentication flows before releasing your game.

[Learn more about OAuth2 client types](https://oauth.net/2/client-types)

---

## Next Steps

Start your integration, implement user authentication, and learn about UI design:

<Container>
<Card title="Getting Started" link="/docs/discord-social-sdk/getting-started" icon="PlayIcon">
Choose your platform and follow step-by-step setup instructions.
</Card>
<Card title="Account Linking" link="/docs/discord-social-sdk/development-guides/account-linking-with-discord"
icon="LinkIcon">
Implement user authentication with Discord OAuth2.
</Card>
<Card title="Design Guidelines" link="/docs/discord-social-sdk/design-guidelines" icon="PaintPaletteIcon">
Learn how to design your game's UI to integrate social features.
</Card>
</Container>

---

## Change Log

| Date | Changes |
|---------------|-----------------|
| July 21, 2025 | initial release |

{/* Autogenerated Reference Links */}
[`AuthorizationArgs`]: https://discord.com/developers/docs/social-sdk/classdiscordpp_1_1AuthorizationArgs.html#adb47ac55258db29d4cb8a2c506093eed
[`AuthorizationArgs::SetScopes`]: https://discord.com/developers/docs/social-sdk/classdiscordpp_1_1AuthorizationArgs.html#aa3714d11a196e0d71c8c1cf38c506d92
[`Client::Authorize`]: https://discord.com/developers/docs/social-sdk/classdiscordpp_1_1Client.html#ace94a58e27545a933d79db32b387a468
[`Client::GetDefaultCommunicationScopes`]: https://discord.com/developers/docs/social-sdk/classdiscordpp_1_1Client.html#a71499da752fbdc2d4326ae0fd36c0dd1
[`Client::GetDefaultPresenceScopes`]: https://discord.com/developers/docs/social-sdk/classdiscordpp_1_1Client.html#a7648bd1d2f7d9a86ebd0edb8bef12b5c
Loading