Get started with the Discord Social SDK
Tutorial
·
intermediate
·
+10XP
·
10 mins
·
Unity Technologies
In this tutorial, you will learn about the Discord Social SDK and how to begin setting it up in your Unity project.
1. What is the Discord Social SDK?
The Discord Social SDK is a set of tools that allows you to integrate Discord-powered social features directly into your game. Build engaging, social experiences where players can connect, communicate, and play together, all while staying immersed in your game. This includes features such as friend lists, messaging, voice chat, and Rich Presence. The Discord Social SDK provides access to raw data, allowing developers to create a fully customized experience that aligns with their game's aesthetic.
Key features of the Discord Social SDK include the following:
• Unified friends list: The Social SDK has a concept of in-game friends separate from your Discord friends. Players can access their Discord friends list in-game and their in-game friends list both in game and in Discord.
• Deeplink game invites: Send invites that drop players directly into your game.
• Rich Presence: Display game-specific activity data on Discord for other players to see and configure it to enable one-click game joins from player profiles.
• Provisional accounts: Let players use social features in your game without linking a Discord account.
• Cross platform messaging: Players can communicate via direct messages (DMs) and voice calls.
• Linked channels: Players can link their in-game chat to specific Discord channels in their servers, providing a space for guilds, groups, and squads of all sizes to connect with persistent messaging across both the game and Discord.
• Game lobbies: Virtual spaces where players can interact through voice and text chat.
• Voice chat: Players can enjoy some of the highest quality audio chat available today, powered by the same technology behind Discord’s powerful voice tools.
• Account linking: Connect player's Discord accounts to your game.
2. How does the Discord Social SDK integrate into your game?
The Discord Social SDK is a package that you’ll add to your Unity project that allows you to add Discord powered social features to your game. The integration requires you to create a Discord Application in the Discord Developer Portal, which we’ll guide you through in the next section.
For more information about the Discord Social SDK, check out Discord’s Core Concepts, Development Guides, and general reference documentation.
3. Setting up your Discord Application
Before you access the SDK and integrate it into Unity, you’ll need to create a Discord Application. A Discord Application is a project that represents your game in the Discord Developer Portal. It allows you to interact with Discord’s APIs, which you can use to integrate the Discord Social SDK into your game. Creating a Discord Application is a required step to get access to the Discord Social SDK features using an Application ID.
To set up your Discord Application, follow these instructions:
1. Visit the Discord Developer Portal.
2. Select New Application in the upper-right corner, name your application, accept the Terms of Service, and select Create.

3. In the leftmost menu, in the Discord Social SDK section, select Getting Started.
4. Fill out the form and select Submit.
The Social SDK will be enabled for your application.
5. In the leftmost menu, in the Settings section, select OAuth2.
6. In the Client information section, enable Public Client.
This tutorial requires you to enable Public Client to allow you to get started with the SDK quickly. A Public Client allows the player to authenticate with Discord directly from their device. A Private Client requires a server to handle the authentication on behalf of the player. If your game will have a server, it’s recommended to eventually switch to a Private Client for better security. To learn more about OAuth2 client types, check out Discord’s OAuth2 Scopes documentation.
7. In the Redirects section, select Add Redirect and add the following redirect URL: http://127.0.0.1/callback.
This redirect tells Discord where to send the authentication response. For local development the http://127.0.0.1/callback will be handled automatically by the Discord Social SDK.
8. Select Save Changes.

4. Get the Social SDK
To download the Social SDK, follow these instructions:
1. In the Discord Social SDK section, select Downloads.
2. Download the latest SDK for Unity (DiscordSocialSdk-UnityPlugin-X.X.X.zip).
With a Discord Application set up and the Discord Social SDK downloaded you’re ready to implement the Social SDK into a Unity project!