Connections are links between third party accounts to Discord accounts.
The connection object that the user has attached.
Field Type Description id string ID of the connection account type string The type of the connection name string The username of the connection account verified boolean Whether the connection is verified metadata? object Service-specific metadata about the connection metadata_visibility integer Visibility of the connection's metadatarevoked boolean whether the connection is revoked integrations 1 2 array[connection integration object] The guild integrations attached to the connection friend_sync boolean Whether friend sync is enabled for this connection show_activity boolean Whether activities related to this connection will be shown in presence two_way_link boolean Whether this connection has a corresponding third party OAuth2 token visibility integer Visibility of the connectionaccess_token? 1 string The access token for the connection account
1 Not included when fetching a user's connections via OAuth2.
2 These integrations can be used to join your own sub-enabled guild or the guild of a creator you are supporting .
Field Type Description id string ID of the connection account type string The type of the connection name string The username of the connection account verified boolean Whether the connection is verified metadata? object Service-specific metadata about the connection
{
"type" : "reddit" ,
"id" : "run&hide" ,
"name" : "alien" ,
"visibility" : 1 ,
"friend_sync" : false ,
"show_activity" : true ,
"verified" : true ,
"two_way_link" : false ,
"metadata_visibility" : 1 ,
"metadata" : {
"gold" : "0" ,
"mod" : "1" ,
"total_karma" : "20223" ,
"created_at" : "2019-05-02T20:28:37"
} ,
"revoked" : false ,
"integrations" : [ ]
}
{
"type" : "reddit" ,
"id" : "run&hide" ,
"name" : "alien" ,
"verified" : true ,
"metadata" : {
"gold" : "0" ,
"mod" : "1" ,
"total_karma" : "20223" ,
"created_at" : "2019-05-02T20:28:37"
}
}
Field Type Description id 1 snowflake The ID of the integration type string The type of integration account account objectThe integration's account information guild integration guild objectThe guild that the integration is attached to
1 This field may also be the literal string "twitch-partners" to represent the Twitch Partners integration.
{
"id" : "twitch-partners" ,
"type" : "twitch" ,
"account" : {
"id" : "92473777" ,
"name" : "discordapp"
} ,
"guild" : {
"id" : "107939014299901952" ,
"name" : "Twitch Partners" ,
"icon" : "62450d21b75478191962d9c4b81831ae"
}
}
Value Name amazon-music Amazon Music battlenet Battle.net bluesky Bluesky bungie Bungie.net contacts 2 Contact Sync crunchyroll Crunchyroll domain Domain ebay eBay epicgames Epic Games facebook Facebook github GitHub instagram 1 Instagram leagueoflegends League of Legends mastodon Mastodon paypal PayPal playstation PlayStation Network playstation-stg PlayStation Network (Staging) reddit Reddit roblox Roblox riotgames Riot Games samsung 1 Samsung Galaxy soundcloud SoundCloud spotify Spotify skype 1 Skype steam Steam tiktok TikTok twitch Twitch twitter Twitter xbox Xbox youtube YouTube
1 Service can no longer be added by users.
2 Service is not returned in Get User Profile or when fetching a user's connections via OAuth2.
Value Name Description 0 NONE Invisible to everyone except the user themselves 1 EVERYONE Visible to everyone
Partial connections always have a visibility of 1.
Field Type Description id snowflake The ID of the device name string The name of the device platform string The console platform (only and are allowed)
{
"id" : "1371598138300956672" ,
"name" : "My Gifted PlayStation 5" ,
"platform" : "playstation"
}
GET/connections/{connection.type}/authorizeTest
Returns an authorization link that can be used for authorizing a new connection.
Field Type Description two_way_link_type? ?string The type of two-way link to create two_way_user_code? ?string The device code to use for the two-way link continuation? boolean Whether this is a continuation of a previous authorization
Value Description web The connection is linked via web mobile The connection is linked via mobile desktop The connection is linked via desktop
Field Type Description url string The authorization link for the user
POST/connections/{connection.type}/callbackTest
Creates a new connection for the current user. Returns a connection object on success. Fires a User Connections Update Gateway event.
Field Type Description code string The authorization code for the connection state string The state used to authorize the connection two_way_link_code? string The code to use for two-way linking insecure? boolean Whether the connection is insecure (default false) friend_sync? boolean Whether to sync friends over the connection openid_params? object Additional parameters for OpenID Connect
PUT/users/@me/connections/contacts/{connection.id}Test
Creates a new contact sync connection for the current user. Returns a connection object on success. Fires a User Connections Update Gateway event.
Field Type Description name string The username of the connection account friend_sync? boolean Whether to sync friends over the connection
PUT/users/@me/connections/contacts/{connection.id}/external-friend-list-entriesTest
Syncs the user's device contacts to the connection. May fire multiple Friend Suggestion Create Gateway events.
Field Type Description friend_list_entries array[friend list entry object] The phone numbers to sync (max 10000) background boolean Whether the request is a background sync (will not return suggestions) allowed_in_suggestions integer The contact sync suggestions setting include_mutual_friends_count boolean Whether to show the mutual friend count of contacts add_reverse_friend_suggestions? boolean Whether to add users that have contact synced the current user as friend suggestions
Field Type Description friend_id string E.164-formatted phone number of the contact
Value Name Description 1 MUTUAL_CONTACT_INFO_ONLY Users who have contact synced that have the current user as a contact 2 ANYONE_WITH_CONTACT_INFO Users who have contact synced
GET/users/@me/connections/contacts/{connection.id}/external-friend-list-entries/settingsTest
POST/users/@me/connections/domain/{connection.id}Test
Creates a new domain connection for the current user. Returns a connection object on success. Fires a User Connections Update Gateway event.
When attempting to create a domain connection, Discord will verify that the domain is owned by the user. If this verification fails, the endpoint will return an error response:
{ "message" : "Unable to validate domain." , "code" : 50187 , "proof" : "dh=dceaca792e3c40fcf356a9297949940af5cfe538" }
The provided must be added to the domain's DNS records as a TXT record with the name . Alternatively, the proof can be served at .
After adding the proof, the request should be retried.
GET/users/@me/connectionsTest
Returns a list of connection objects.
GET/users/@me/connections/{connection.type}/{connection.id}/access-tokenTest
Returns a new access token for the given connection. Only available for Twitch, YouTube, and Spotify connections. Fires a User Connections Update Gateway event.
Field Type Description access_token string The connection's access token
GET/users/@me/connections/reddit/{connection.id}/subredditsTest
Returns a list of subreddits the connected account moderates. Only available for Reddit connections.
Field Type Description id string The subreddit's ID subscribers integer The number of joined Reddit users url string The subreddit's relative URL
[
{
"id" : "t5_388p4" ,
"subscribers" : 1044184 ,
"url" : "/r/discordapp/"
}
]
POST/users/@me/connections/{connection.type}/{connection.id}/refreshTest
Refreshes a connection. Returns a 204 empty response on success. Fires a User Connections Update Gateway event.
PATCH/users/@me/connections/{connection.type}/{connection.id}Test
Modifies a connection. Returns a connection object on success. Fires a User Connections Update Gateway event.
Not all connection types support all parameters.
Field Type Description name string The connection's username show_activity boolean Whether activities related to this connection will be shown in presence friend_sync boolean Whether friend sync is enabled for this connection metadata_visibility integer Visibility of the connection's metadatavisibility integer Visibility of the connection
DELETE/users/@me/connections/{connection.type}/{connection.id}Test
Deletes a connection. Returns a 204 empty response on success. Fires a User Connections Update and optionally a Guild Delete Gateway event.
GET/users/@me/linked-connectionsTest
Returns a list of connection objects that have a two-way link with the application making the request.
POST/consoles/connect-requestTest
Returns a nonce for connecting to voice on PlayStation consoles.
Value Description CREATE_NEW_CALL Create a new call on a console device TRANSFER_EXISTING_CALL Transfer an existing call to a console device
Field Type Description nonce string The nonce
DELETE/consoles/connect-request/{nonce}Test
Cancels a console connection request. Returns a 204 empty response on success.
GET/consoles/{connection.type}/devicesTest
Returns the consoles associated with the given connection type. Only supports and connection types.
Field Type Description devices array[console device object] The user console devices
POST/consoles/{connection.type}/devices/{device.id}/commandsTest
Sends a command to connect to a voice call on a console device.
Field Type Description command string The command type channel_id snowflake The ID of the channel to connect to guild_id? snowflake The ID of the guild the channel is in nonce? string The nonce obtained from Create Console Connection endpoint
Value Description connect_voice Connect to a voice call
Field Type Description id snowflake The ID of the sent command
DELETE/consoles/{connection.type}/devices/{device.id}/commands/{command.id}Test
Cancels a console command. Returns a 204 empty response on success.