Cuentas conectadas

Connections are links between third party accounts to Discord accounts.

The connection object that the user has attached.

Connection Structure

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 metadata

revoked

boolean

whether the connection is revoked

integrations 1 2

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 connection

access_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.

Partial Connection Structure

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

Example 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": []}

Example Partial Connection

{  "type": "reddit",  "id": "run&hide",  "name": "alien",  "verified": true,  "metadata": {    "gold": "0",    "mod": "1",    "total_karma": "20223",    "created_at": "2019-05-02T20:28:37"  }}

Connection Integration Structure

Field
Type
Description

id 1

snowflake

The ID of the integration

type

string

account

account object

The integration's account information

guild

The guild that the integration is attached to

1 This field may also be the literal string "twitch-partners" to represent the Twitch Partners integration.

Example Connection Integration

{  "id": "twitch-partners",  "type": "twitch",  "account": {    "id": "92473777",    "name": "discordapp"  },  "guild": {    "id": "107939014299901952",    "name": "Twitch Partners",    "icon": "62450d21b75478191962d9c4b81831ae"  }}

Connection Type

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.

Visibility Type

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.

Console Device Structure

Field
Type
Description

id

snowflake

The ID of the device

name

string

The name of the device

platform

string

The console platform (only playstation and playstation-stg are allowed)

Example Console Device

{  "id": "1371598138300956672",  "name": "My Gifted PlayStation 5",  "platform": "playstation"}

GET/connections/{connection.type}/authorize

Returns an authorization link that can be used for authorizing a new connection.

Query String Params

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

Two Way Link Type

Value
Description

web

The connection is linked via web

mobile

The connection is linked via mobile

desktop

The connection is linked via desktop

Response Body

Field
Type
Description

url

string

The authorization link for the user

POST/connections/{connection.type}/callback

Creates a new connection for the current user. Returns a connection object on success. Fires a User Connections Update Gateway event.

JSON Params

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

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}

Creates a new contact sync connection for the current user. Returns a connection object on success. Fires a User Connections Update Gateway event.

JSON Params

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-entries

Syncs the user's device contacts to the connection. May fire multiple Friend Suggestion Create Gateway events.

JSON Params

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

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

Friend List Entry Structure

Field
Type
Description

friend_id

string

E.164-formatted phone number of the contact

Contact Sync Suggestions Setting

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

Response Body

Field
Type
Description

bulk_add_token

?string

Token to be used for bulk adding relationships

friend_suggestions

array[friend suggestion object]

Suggested users

GET/users/@me/connections/contacts/{connection.id}/external-friend-list-entries/settings

Response Body

Field
Type
Description

allowed_in_suggestions

integer

POST/users/@me/connections/domain/{connection.id}

Creates a new domain connection for the current user. Returns a connection object on success. Fires a User Connections Update Gateway event.

GET/users/@me/connections

Returns a list of connection objects.

GET/users/@me/connections/{connection.type}/{connection.id}/access-token

Returns a new access token for the given connection. Only available for Twitch, YouTube, and Spotify connections. Fires a User Connections Update Gateway event.

Response Body

Field
Type
Description

access_token

string

The connection's access token

GET/users/@me/connections/reddit/{connection.id}/subreddits

Returns a list of subreddits the connected account moderates. Only available for Reddit connections.

Subreddit Structure

Field
Type
Description

id

string

The subreddit's ID

subscribers

integer

The number of joined Reddit users

url

string

The subreddit's relative URL

Example Response

[  {    "id": "t5_388p4",    "subscribers": 1044184,    "url": "/r/discordapp/"  }]

POST/users/@me/connections/{connection.type}/{connection.id}/refresh

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}

Modifies a connection. Returns a connection object on success. Fires a User Connections Update Gateway event.

Not all connection types support all parameters.

JSON Params

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 metadata

visibility

integer

Visibility of the connection

DELETE/users/@me/connections/{connection.type}/{connection.id}

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-connections

Returns a list of connection objects that have a two-way link with the application making the request.

POST/consoles/connect-request

Returns a nonce for connecting to voice on PlayStation consoles.

JSON Params

Field
Type
Description

analytics_properties?

The properties used for analytics

Connect Request Properties Structure

Field
Type
Description

handoff_type

string

Console Handoff Type

Value
Description

CREATE_NEW_CALL

Create a new call on a console device

TRANSFER_EXISTING_CALL

Transfer an existing call to a console device

Response Body

Field
Type
Description

nonce

string

The nonce

Example Response

{ "nonce": "fgnmC0tT" }

DELETE/consoles/connect-request/{nonce}

Cancels a console connection request. Returns a 204 empty response on success.

GET/consoles/{connection.type}/devices

Returns the consoles associated with the given connection type. Only supports and connection types.

Response Body

Field
Type
Description

devices

array[console device object]

The user console devices

POST/consoles/{connection.type}/devices/{device.id}/commands

Sends a command to connect to a voice call on a console device.

JSON Params

Field
Type
Description

command

string

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

Console Command Type

Value
Description

connect_voice

Connect to a voice call

Response Body

Field
Type
Description

id

snowflake

The ID of the sent command

DELETE/consoles/{connection.type}/devices/{device.id}/commands/{command.id}

Cancels a console command. Returns a 204 empty response on success.