Users
Users in Discord are generally considered the base entity. Users can spawn across the entire platform, be members of guilds, participate in text and voice chat, and much more. Users are separated by a distinction of "bot" vs "normal". Although they are similar, bot users are automated users that are attached to an application, "owned" by another user. Unlike normal users, bot users do not have a limitation on the number of guilds they can be a part of.
Usernames and Nicknames
Discord enforces the following restrictions for usernames, display names, and nicknames:
- Names can contain most valid unicode characters. We limit some zero-width and non-rendering characters.
- Usernames must be between 2 and 32 characters long.
- Display names and nicknames must be between 1 and 32 characters long.
- Webhook names must be between 1 and 80 characters long.
- Names are sanitized and trimmed of leading, trailing, and excessive internal whitespace.
The following restrictions are additionally enforced for usernames and display names:
- Usernames cannot contain the following substrings: '@', '#', ':', '```'.
- Usernames and display names cannot be: 'everyone', 'here', 'system message', or contain 'discord'.
The following restrictions are additionally enforced for webhook names:
- Webhook names cannot contain the following substrings: 'clyde'.
Migrated usernames are subject to a new set of restrictions in addition to the above:
- Migrated usernames can only contain lowercase alphanumeric characters, underscores (
_), and periods (.). Uppercase characters, spaces, dashes (-), and other special characters are not allowed. - Migrated usernames cannot have two or more consecutive periods (
..). - Migrated usernames are unique to each user, and no two users can share the same username.
There are other rules and restrictions not shared here for the sake of spam and abuse mitigation, but the majority of users won't encounter them. It's important to properly handle all error messages returned by Discord when editing or updating names.
Unique Usernames
Discord's username system is changing. Discriminators are being removed and new, unique usernames (@name) and display names are being introduced. Internally, this migration is referred to as "pomelo". You can read more details about how the changes to the username system affect user accounts in the general Help Center article. To learn how it impacts bots specifically, you can read the Developer Help Center article.
A user's legacy username#discriminator tag will still be usable to send friend requests, and will be available as a profile badge for migrated users.
Identifying Migrated Users
The value of a single zero (0) in the discriminator field on the user object indicates that the user has been pommeled migrated to the new username system. Note that the discriminator for migrated users will not be 4-digits like a standard discriminator (it is 0, not 0000). The value of the username field will become the migrated user's unique username.
Migrating
Users can only migrate their account to pomelo if they are in the rollout. A user is in the rollout if they have
Migration is now complete and all non-migrated users have been automatically assigned a unique username.pomelo in the disclose field on the Ready Supplemental event and are in the 2023-03_pomelo user experiment.
To migrate, users should first check if the username they want is available, and then migrate their account to that username. If the username they want is not available, they can get a list of suggested usernames to choose from.
Display Names
As part of pomelo, user accounts can define a non-unique display name. This value is a new nullable global_name field with a max length of 32 characters.
For bots, the display name will be the same as their application's name.
Default Avatars
For users with migrated accounts, default avatar URLs will be based on the user ID instead of the discriminator. The URL can be calculated using (user_id >> 22) % 6. For non-migrated accounts, the URL can be calculated using discriminator % 5.
User Object
User Structure
| Field | Type | Description |
|---|---|---|
| id | snowflake | The ID of the user |
| username 5 | string | The user's username, may be unique across the platform (2-32 characters) |
| discriminator 5 | string | The user's stringified 4-digit Discord tag |
| global_name 5 | ?string | The user's display name (1-32 characters); for bots, this is the application name |
| avatar | ?string | The user's avatar hash |
| avatar_decoration_data | ?avatar decoration data object | The user's avatar decoration |
| collectibles | ?collectibles object | The user's equipped collectibles |
| primary_guild? | ?primary guild object | The primary clan guild the user is in |
| linked_users 1 3 | array[linked user object] | The linked users connected to the account via Family Center |
| bot? | boolean | Whether the user is a bot account |
| system? | boolean | Whether the user is an official Discord System user (part of the urgent message system) |
| mfa_enabled | boolean | Whether the user has multi-factor authentication enabled on their account |
| nsfw_allowed? 1 | ?boolean | Whether the user is allowed to see NSFW content, null if not yet known |
| age_verification_status 1 | integer | The age verification status of the user |
| pronouns? 1 4 | string | The user's pronouns (max 40 characters) |
| bio 1 | string | The user's bio (max 190 characters) |
| banner | ?string | The user's banner hash |
| accent_color | ?integer | The user's banner color encoded as an integer representation of hexadecimal color code |
| locale? 3 | string | The language option chosen by the user |
| verified 2 | boolean | Whether the email on this account has been verified |
| email 2 | ?string | The user's email address |
| phone? 1 | ?string | The user's E.164-formatted phone number |
| premium (deprecated) 4 | boolean | Whether the user is subscribed to Nitro |
| premium_type | integer | The type of premium (Nitro) subscription on a user's account |
| personal_connection_id? | snowflake | The ID of the user's personal, non-employee user account |
| flags 1 | integer | The flags on a user's account |
| public_flags | integer | The public flags on a user's account |
| purchased_flags? 1 | integer | The purchased flags on a user's account |
| premium_usage_flags? 1 | integer | The premium usage flags on a user's account |
| desktop? 1 4 | boolean | Whether the user has used the desktop client before |
| mobile? 1 4 | boolean | Whether the user has used the mobile client before |
| has_bounced_email? 1 | boolean | Whether the user's email has failed to deliver and is no longer valid |
| authenticator_types? 3 | array[integer] | The types of multi-factor authenticators the user has enabled |
1 Not included when fetching a user via OAuth2.
2 Not included when fetching a user via OAuth2 without the email scope.
3 Not included in the user object returned in the Ready event.
4 Only included in the user object returned in the Ready event.
5 See the section on Discord's new username system for more information.
Partial User Structure
| Field | Type | Description |
|---|---|---|
| id | snowflake | The ID of the user |
| username 1 | string | The user's username, may be unique across the platform (2-32 characters) |
| discriminator 1 | string | The user's stringified 4-digit Discord tag |
| global_name? 1 | ?string | The user's display name (1-32 characters); for bots, this is the application name |
| avatar | ?string | The user's avatar hash |
| avatar_decoration_data? | ?avatar decoration data object | The user's avatar decoration |
| collectibles | ?collectibles object | The user's equipped collectibles |
| primary_guild? | ?primary guild object | The primary clan guild the user is in |
| bot? | boolean | Whether the user is a bot account |
| system? | boolean | Whether the user is an official Discord System user (part of the urgent message system) |
| banner? 2 | ?string | The user's banner hash |
| accent_color? 2 | ?integer | The user's banner color encoded as an integer representation of hexadecimal color code |
| public_flags? | integer | The public flags on a user's account |
1 See the section on Discord's new username system for more information.
2 Only guaranteed to be included when fetched through the Get User and Get User Profile endpoints. May be included in data received through other API endpoints.
3 Only guaranteed to be included when fetched through the Get User endpoint or the author field on the message object. May be included in data received through other API endpoints.
Primary Guild Structure
| Field | Type | Description |
|---|---|---|
| identity_enabled 1 | ?boolean | Whether the user is displaying their clan tag |
| identity_guild_id 2 | ?snowflake | The ID of the guild |
| tag 1 | ?string | The user's clan tag (max 4 characters) |
| badge 1 | ?string | The clan's badge hash |
1 This field is null when a user has not reaffirmed their identity after a tag change.
2 Only populated for users with identity_enabled not set to false.
User Flags
| Value | Name | Description | Public |
|---|---|---|---|
| 1 << 0 | STAFF | Discord Staff | Yes |
| 1 << 1 | PARTNER | Partnered Server Owner | Yes |
| 1 << 2 | HYPESQUAD | HypeSquad Events | Yes |
| 1 << 3 | BUG_HUNTER_LEVEL_1 | Level 1 Discord Bug Hunter | Yes |
| 1 << 4 | MFA_SMS | SMS enabled as a multi-factor authentication backup | No |
| 1 << 5 | PREMIUM_PROMO_DISMISSED | User has dismissed the current premium (Nitro) promotion | No |
| 1 << 6 | HYPESQUAD_ONLINE_HOUSE_1 | HypeSquad Bravery | Yes |
| 1 << 7 | HYPESQUAD_ONLINE_HOUSE_2 | HypeSquad Brilliance | Yes |
| 1 << 8 | HYPESQUAD_ONLINE_HOUSE_3 | HypeSquad Balance | Yes |
| 1 << 9 | PREMIUM_EARLY_SUPPORTER | Early Premium (Nitro) Supporter | Yes |
| 1 << 10 | TEAM_PSEUDO_USER | User is a Team | Yes |
| 1 << 11 | IS_HUBSPOT_CONTACT | User is registered on Discord's HubSpot customer platform, used for official Discord programs (e.g. partner) | No 1 |
| 1 << 13 | HAS_UNREAD_URGENT_MESSAGES | User has unread urgent system messages; an urgent message is one sent from Trust and Safety | No |
| 1 << 14 | BUG_HUNTER_LEVEL_2 | Level 2 Discord Bug Hunter | Yes |
| 1 << 15 | UNDERAGE_DELETED | User is scheduled for deletion for being under the minimum required age | No 1 |
| 1 << 16 | VERIFIED_BOT | Verified Bot | Yes |
| 1 << 17 | VERIFIED_DEVELOPER | Early Verified Bot Developer | Yes |
| 1 << 18 | CERTIFIED_MODERATOR | Moderator Programs Alumni | Yes |
| 1 << 19 | BOT_HTTP_INTERACTIONS | Bot uses only HTTP interactions and is shown in the online member list | Yes |
| 1 << 20 | SPAMMER | User is marked as a spammer and has their messages collapsed in the UI | Yes |
| 1 << 22 | ACTIVE_DEVELOPER | Active Developer | Yes |
| 1 << 23 | PROVISIONAL_ACCOUNT | User is a provisional account used with the social layer integration | Yes |
| 1 << 33 | HIGH_GLOBAL_RATE_LIMIT | User has their global ratelimit raised to 1,200 requests per second | No 1 |
| 1 << 34 | DELETED | User's account is deleted | No 1 |
| 1 << 35 | DISABLED_SUSPICIOUS_ACTIVITY | User's account is disabled for suspicious activity and must reset their password to regain access | No 1 |
| 1 << 36 | SELF_DELETED | User deleted their own account | No 1 |
| 1 << 37 | PREMIUM_DISCRIMINATOR | User has a premium (Nitro) custom discriminator | No 1 |
| 1 << 38 | USED_DESKTOP_CLIENT | User has used the desktop client | No 1 |
| 1 << 39 | USED_WEB_CLIENT | User has used the web client | No 1 |
| 1 << 40 | USED_MOBILE_CLIENT | User has used the mobile client | No 1 |
| 1 << 41 | DISABLED | User's account is disabled | No 1 |
| 1 << 43 | HAS_SESSION_STARTED | User has started at least one Gateway session and is now eligible to send messages | No 1 |
| 1 << 44 | QUARANTINED | User is quarantined and cannot create DMs or accept invites | No |
| 1 << 47 | PREMIUM_ELIGIBLE_FOR_UNIQUE_USERNAME | User is eligible for early access to pomelo migration | No 1 |
| 1 << 50 | COLLABORATOR | User is a collaborator and is considered staff | No |
| 1 << 51 | RESTRICTED_COLLABORATOR | User is a restricted collaborator and is considered staff | No |
1 Not exposed to the API, can only be found in user data harvests.
Purchased Flags
Purchased flags denote what premium items a user has ever purchased. Visit the Nitro page to learn more about the premium plans currently offered.
| Value | Name | Description |
|---|---|---|
| 1 << 0 | NITRO_CLASSIC | User has purchased Nitro classic |
| 1 << 1 | NITRO | User has purchased regular Nitro |
| 1 << 2 | GUILD_BOOST | User has purchased a guild boost |
| 1 << 3 | NITRO_BASIC | User has purchased Nitro basic |
Premium Usage Flags
Premium usage flags denote what premium (Nitro) features a user has utilized.
| Value | Name | Description |
|---|---|---|
| 1 << 0 | PREMIUM_DISCRIMINATOR | User has utilized premium discriminators |
| 1 << 1 | ANIMATED_AVATAR | User has utilized animated avatars |
| 1 << 2 | PROFILE_BANNER | User has utilized profile banners |
Premium Type
Premium types denote the level of premium a user has. Visit the Nitro page to learn more about the premium plans currently offered.
| Value | Name | Description |
|---|---|---|
| 0 | NONE (deprecated) | No Nitro |
| 1 | TIER_1 | Nitro Classic |
| 2 | TIER_2 | Nitro |
| 3 | TIER_3 | Nitro Basic |
Age Verification Status
| Value | Name | Description |
|---|---|---|
| 1 | UNVERIFIED | User has not verified their age |
| 2 | VERIFIED_TEEN | User is a verified teenager |
| 3 | VERIFIED_ADULT | User is a verified adult |
Required Action Type
Required action types denote an action Discord requires the user to take before they can continue using the platform.
| Value | Description |
|---|---|
| UPDATE_AGREEMENTS | The user must re-indicate their agreement of Discord's terms of service and privacy policy; this does not limit the user from using Discord |
| VERIFY_EMAIL | The user must add and verify an email address to their account |
| REVERIFY_EMAIL | The user must reverify their existing email address |
| VERIFY_PHONE | The user must add a phone number to their account |
| REVERIFY_PHONE | The user must reverify their existing phone number |
| VERIFY_EMAIL_OR_VERIFY_PHONE | The user must add and verify an email address to their account or add a phone number to their account |
| REVERIFY_EMAIL_OR_VERIFY_PHONE | The user must reverify their existing email address or add a phone number to their account |
| VERIFY_EMAIL_OR_REVERIFY_PHONE | The user must add and verify an email address to their account or reverify their existing phone number |
| REVERIFY_EMAIL_OR_REVERIFY_PHONE | The user must reverify their existing email address or reverify their existing phone number |
1 This is now represented by first receiving a VERIFY_PHONE action, and then receiving a VERIFY_EMAIL action after the phone number has been verified.
Example User
{"id": "80351110224678912","username": "nelly","global_name": "Nelly","avatar": "8342729096ea3675442027381ff50dfe","discriminator": "0","public_flags": 64,"flags": 96,"purchased_flags": 10,"premium_usage_flags": 4,"banner": "06c16474723fe537c283b8efa61a30c8","accent_color": null,"bio": "I'm a bot!","locale": "en-US","nsfw_allowed": true,"mfa_enabled": true,"premium_type": 2,"avatar_decoration_data": {"sku_id": "1144058844004233369","asset": "a_fed43ab12698df65902ba06727e20c0e","expires_at": null},"email": "nelly@discord.com","verified": true,"phone": "+18885940085","authenticator_types": [1, 2, 3],"primary_guild": {"identity_guild_id": "80351110224678913","identity_enabled": true,"tag": "MEOW","badge": "7d1734ae5a615e82bc7a4033b98fade8"}}
Example Partial User
{"id": "80351110224678912","username": "nelly","avatar": "8342729096ea3675442027381ff50dfe","discriminator": "0","public_flags": 64,"banner": "06c16474723fe537c283b8efa61a30c8","accent_color": 16711680,"global_name": "Nelly","avatar_decoration_data": {"sku_id": "1144058844004233369","asset": "a_fed43ab12698df65902ba06727e20c0e","expires_at": null},"primary_guild": {"identity_guild_id": "80351110224678913","identity_enabled": true,"tag": "MEOW","badge": "7d1734ae5a615e82bc7a4033b98fade8"}}
Avatar Decoration Data Object
A user's active avatar decoration.
Avatar Decoration Data Structure
| Field | Type | Description |
|---|---|---|
| asset | string | The avatar decoration hash |
| sku_id | snowflake | The ID of the avatar decoration's SKU |
| expires_at | ?integer | Unix timestamp of when the current avatar decoration expires |
Example Avatar Decoration Data
{"sku_id": "1144058844004233369","asset": "a_fed43ab12698df65902ba06727e20c0e","expires_at": 1740124800}
Collectibles Object
A user's equipped collectibles.
Collectibles Structure
| Field | Type | Description |
|---|---|---|
| nameplate | nameplate data object | The user's nameplate |
Nameplate Data Structure
| Field | Type | Description |
|---|---|---|
| asset | string | The nameplate asset path |
| sku_id | snowflake | The ID of the nameplate's SKU |
| label | string | The nameplate's accessibility description |
| palette | string | The nameplate's color palette |
| expires_at | ?integer | Unix timestamp of when the current nameplate expires |
Nameplate Color Palette
| Value | Name |
|---|---|
| none | None |
| crimson | Crimson |
| berry | Berry |
| sky | Sky |
| teal | Teal |
| forest | Forest |
| bubble_gum | BubbleGum |
| violet | Violet |
| cobalt | Cobalt |
| clover | Clover |
Example Collectibles Object
{"nameplate": {"asset": "nameplates/nameplatetest/angel/","palette": "bubble_gum","label": "COLLECTIBLES_NAMEPLATETEST_ANGEL_A11Y","sku_id": "1344802364934062152","expires_at": null}}
Profile Metadata Object
A user's profile metadata.
Profile Metadata Structure
| Field | Type | Description |
|---|---|---|
| guild_id? | snowflake | The guild ID this profile applies to, if it is a guild profile |
| pronouns | string | The user's pronouns (max 40 characters) |
| bio? | string | The user's bio (max 190 characters) |
| banner? | ?string | The user's banner hash |
| accent_color? 1 | ?integer | The user's banner color encoded as an integer representation of hexadecimal color code |
| theme_colors? | ?array[integer, integer] | The user's two theme colors encoded as an array of integers representing hexadecimal color codes |
| popout_animation_particle_type? | ?snowflake | The user's profile popout animation particle type |
| emoji? | ?emoji object | The user's profile emoji |
| profile_effect? | ?profile effect object | The user's profile effect |
1 Not respected on guild profiles.
Profile Effect Structure
| Field | Type | Description |
|---|---|---|
| id | snowflake | The ID of the profile effect |
| expires_at | ?integer | Unix timestamp of when the current profile effect expires |
Example Profile Metadata
{"guild_id": "80351110224678913","pronouns": "gnarp/gnap","bio": "👽 Professional alien","banner": null,"accent_color": null,"theme_colors": [1, 1],"popout_animation_particle_type": null,"emoji": {"name": "meowlien","roles": [],"id": "1090395834966880336","require_colons": true,"managed": false,"animated": false,"available": true},"profile_effect": {"id": "1139323097930027068","expires_at": 1740124800}}
Authenticator Object
Authenticator Structure
| Field | Type | Description |
|---|---|---|
| id | string | The ID of the authenticator |
| type | string | The type of authenticator |
| name | string | The name of the authenticator |
Authenticator Type
Authenticator types represent enabled multi-factor authentication methods. See the MFA verification documentation for more information.
| Value | Name | Description |
|---|---|---|
| 1 | WEBAUTHN | WebAuthn credentials |
| 2 | TOTP | Time-based One-Time Password code |
| 3 | SMS | SMS code |
Example Authenticator
{"id": "1219430671865610261","type": 1,"name": "AlienKey"}
Backup Code Object
A multi-factor authentication backup code.
Backup Code Structure
| Field | Type | Description |
|---|---|---|
| user_id | snowflake | The ID of the user |
| code | string | The backup code |
| consumed | boolean | Whether the backup code has been used |
Example Backup Code
{"user_id": "852892297661906993","code": "zqs8oqxk","consumed": false}
Harvest Object
A user's data harvest.
Harvest Structure
| Field | Type | Description |
|---|---|---|
| harvest_id | snowflake | The ID of the harvest |
| user_id | snowflake | The ID of the user being harvested |
| string | The email the harvest will be sent to | |
| state | string | The state of the harvest |
| status | integer | The status of the harvest |
| created_at | ISO8601 timestamp | When the harvest was created |
| completed_at | ?ISO8601 timestamp | When the harvest was completed |
| polled_at | ?ISO8601 timestamp | When the harvest was last polled |
| backends | map[string, string] | The state of each backend being harvested |
| updated_at | ISO8601 timestamp | When the harvest was last updated |
| shadow_run | boolean | Whether the harvest is a shadow run |
| harvest_metadata | harvest metadata object | Additional metadata about the harvest |
Example Harvest
{"harvest_id": "1319498748052639754","user_id": "852892297661906993","email": "alien@dolfi.es","state": "DELIVERED","status": 3,"created_at": "2024-12-20T02:56:56.639579+00:00","completed_at": "2024-12-21T11:05:41.462828+00:00","polled_at": "2024-12-21T11:05:41.462828+00:00","backends": {"users": "EXTRACTED","guilds": "EXTRACTED","hubspot": "EXTRACTED","messages": "EXTRACTED","analytics": "EXTRACTED","activities_e": "EXTRACTED","activities_w": "EXTRACTED"},"updated_at": "2024-12-21T11:05:41.462828+00:00","shadow_run": false,"harvest_metadata": {"user_is_staff": false,"sla_email_sent": false,"bypass_cooldown": false}}
Harvest Metadata Structure
| Field | Type | Description |
|---|---|---|
| user_is_staff | boolean | Whether the user being harvested is a Discord employee |
| sla_email_sent | boolean | Whether an email has been sent informing the user that the archive is taking longer than expected |
| bypass_cooldown | boolean | Whether the harvest bypasses the cooldown period for requesting harvests |
Harvest State
| Value | Description |
|---|---|
| INCOMPLETE | The harvest is not yet complete |
| DELIVERED | The harvest has been delivered to the user |
| CANCELLED | The harvest has been cancelled |
Harvest Status
| Value | Name | Description |
|---|---|---|
| 0 | QUEUED | The harvest is queued and has not been started |
| 1 | RUNNING | The harvest is currently running |
| 2 | FAILED | The harvest has failed |
| 3 | COMPLETED | The harvest has completed successfully |
| 4 | CANCELLED | The harvest has been cancelled |
Harvest Backend Internal Type
| Value | Description |
|---|---|
| users | All account information |
| analytics | Actions the user has taken in Discord |
| activities_e | First-party embedded activity information |
| activities_w | First-party embedded activity information |
| messages | All user messages |
| hubspot | Discord's HubSpot contact data, used for official Discord programs (e.g. partner) |
| guilds | All guilds the user is currently a member of |
Harvest Backend State
| Value | Description |
|---|---|
| INITIAL | The backend has not been processed |
| RUNNING | The backend is currently processing |
| EXTRACTED | The backend has been processed |
User Survey Object
A user survey.
User Survey Structure
| Field | Type | Description |
|---|---|---|
| id | snowflake | The ID of the survey |
| key | snowflake | The ID of the survey |
| prompt | string | The title of the survey |
| cta | string | The call-to-action text |
| url | string | The URL to the survey |
| guild_requirements | array[string] | User requirements for the survey to be shown |
| guild_size | array[?integer, ?integer] | The guild member count requirements (min, max) |
| guild_permissions | array[string] | The guild permissions bitwise value requirements |
Survey Requirement Type
| Value | Description | Field |
|---|---|---|
| IS_OWNER | The user must be the owner of a guild | - |
| IS_ADMIN | The user must have the ADMINISTRATOR permission in any guild | - |
| IS_COMMUNITY | The user must be in a guild with the COMMUNITY feature | - |
| GUILD_SIZE | The user must be in a guild with a member count in a given range | guild_size |
| GUILD_SIZE_ALL | All guilds the user is in must have a member count in a given range | guild_size |
| IS_HUB | The user must be in a guild with the HUB feature | - |
| IS_VIEWING | The user must be currently viewing a guild | - |
| GUILD_PERMISSIONS | The user must have the given permissions in any guild | guild_permissions |
Example User Survey
{"id": "1301267751645483122","key": "1301267751645483122","prompt": "Share your experience with Discord","cta": "Take the survey!","url": "https://discord.sjc1.qualtrics.com/jfe/form/SV_123456","guild_requirements": [],"guild_size": [null, null],"guild_permissions": []}
Connection Object
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 | 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 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 | The type of integration |
| account | account object | The integration's account information |
| guild | integration guild object | 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 |
| github | GitHub |
| instagram 1 | |
| leagueoflegends | League of Legends |
| mastodon | Mastodon |
| paypal | PayPal |
| playstation | PlayStation Network |
| playstation-stg | PlayStation Network (Staging) |
| roblox | Roblox |
| riotgames | Riot Games |
| samsung 1 | Samsung Galaxy |
| soundcloud | SoundCloud |
| spotify | Spotify |
| skype 1 | Skype |
| steam | Steam |
| tiktok | TikTok |
| twitch | Twitch |
| 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.
Endpoints
Get Current User
GET/users/@meReturns the user object of the requester's account.
Modify Current User
PATCH/users/@meModifies the requester's user account settings. Returns a user object with an extra token field representing the user's new authorization token on success. Fires a User Update Gateway event.
JSON Params
| Field | Type | Description |
|---|---|---|
| username? 5 | string | The user's username (2-32 characters) |
| discriminator? 5 | string | The user's stringified 4-digit Discord tag; can only be changed for users with an applicable premium (Nitro) plan, which triggers a reroll after the subscription expires |
| global_name? 5 | ?string | The user's display name (1-32 characters) |
| avatar? | ?image data | The user's avatar; can be animated when the user has an applicable premium (Nitro) plan |
| avatar_description? | ?string | The description of the new user avatar, usually in the format "{filename}, added {date}" (max 1024 characters) |
| avatar_id? | string | The ID of the recent avatar to use |
| avatar_decoration_id? | ?snowflake | The ID of the user's avatar decoration |
| avatar_decoration_sku_id? | ?snowflake | The SKU ID of the user's avatar decoration |
| email? | string | The user's email address; if changing from a verified email, email_token must be provided |
| email_token? 4 | string | The user's email token from their previous email |
| pronouns? | ?string | The user's pronouns (max 40 characters) |
| bio? | ?string | The user's bio (max 190 characters) |
| banner? | ?image data | The user's banner; can only be changed for premium (Nitro) users |
| accent_color? | ?integer | The user's accent color as a hex integer |
| flags? | integer | The user's flags (only PREMIUM_PROMO_DISMISSED and HAS_UNREAD_URGENT_MESSAGES can be set) |
| date_of_birth? 2 | ISO8601 timestamp | The user's date of birth; can only be set once |
| password? 1 | string | The user's current password; if the account does not have a password, this sets it |
| new_password? 3 | string | The user's new password (8-72 characters) |
1 Required for changing username, discriminator, email, date_of_birth, or new_password.
2 Setting this defines the nsfw_allowed field of the user based on whether they are over 18.
3 Changing the account password invalidates all active tokens. Don't fret though, as the token key in the response will be valid.
4 This value can be obtained by requesting a verification code with the Get User Email Change Code endpoint and verifying it using the Verify User Email Change endpoint.
5 If using pomelo, the username field must be unique across Discord, and discriminator cannot be changed. Else, the username and discriminator fields must be unique across Discord, and changing the username changed may cause the discriminator to be randomized. See the section on Discord's new username system for more information. See the Usernames and Nicknames section for more information on username restrictions.
Modify Current User Account
PATCH/users/@me/accountModifies the requester's user account settings. Returns a partial user object on success. Fires a User Update Gateway event.
JSON Params
| Field | Type | Description |
|---|---|---|
| global_name? | ?string | The user's display name (1-32 characters) |
Get Recent Avatars
GET/users/@me/avatarsReturns the user's recent avatars. For premium users, the six most recent avatars will be returned. Otherwise, only two will be returned.
Response Body
| Field | Type | Description |
|---|---|---|
| avatars | array[avatar object] | The recent avatars for the user |
Avatar Structure
| Field | Type | Description |
|---|---|---|
| id | string | The avatar ID |
| storage_hash | string | The avatar hash |
| description | ?string | The description specified when the avatar was uploaded |
Example Response
{"avatars": [{"id": "1357011390585507910","storage_hash": "212aed0ac14cf7804051218f99624a9f","description": "alien, added April 2, 2025 at 5:09 PM"}]}
Delete Recent Avatar
DELETE/users/@me/avatars/{avatar.id}Deletes a recent avatar for the user. Returns a 204 empty response on success.
Get User
GET/users/{user.id}Returns a partial user object for a given user ID.
Get User Profile
GET/users/{user.id}/profileReturns a user profile object for a given user ID.
Query String Params
| Field | Type | Description |
|---|---|---|
| friend_token? | string | The friend token to use for the request |
| with_mutual_guilds? | boolean | Whether to include the mutual guilds of the user with the current user (default true) |
| with_mutual_friends? | boolean | Whether to include mutual friends the user has with the current user (default false) |
| with_mutual_friends_count? | boolean | Whether to include the number of mutual friends the user has with the current user (default false) |
| guild_id? | snowflake | The guild ID to get the user's member profile in |
| connections_role_id? | snowflake | The role ID to get the user's application role connection metadata in |
| join_request_id? | snowflake | The join request ID to use for the request |
Response Body
| Field | Type | Description |
|---|---|---|
| application? | profile application object | The bot's application profile |
| user | partial user object | The user object, with an extra bio key denoting the user's bio |
| user_profile 1 | profile metadata object | The user's profile metadata |
| badges 1 | array[profile badge object] | The user's profile badges |
| guild_member? 1 | guild member object | The guild member in the guild specified, with an extra bio denoting the guild member's bio |
| guild_member_profile? 1 | profile metadata object | The guild member's profile in the guild specified |
| guild_badges 1 | array[profile badge objcet] | The guild member's guild-specific profile badges |
| legacy_username? 1 2 | ?string | The user's pre-migration username#discriminator, if applicable and shown |
| mutual_guilds? 1 | array[mutual guild object] | The mutual guilds of the user with the current user |
| mutual_friends? 1 3 | array[partial user object] | The mutual friends the user has with the current user |
| mutual_friends_count? 1 3 | integer | The number of mutual friends the user has with the current user |
| connected_accounts | array[partial connection object] | The user's public connected accounts |
| application_role_connections? | array[application role connection object] | The user's application role connections for the role specified |
| premium_type 1 | ?integer | The type of premium (Nitro) subscription on a user's account |
| premium_since 1 | ?ISO8601 timestamp | The date the user's premium (Nitro) subscription started |
| premium_guild_since 1 | ?ISO8601 timestamp | The date the user's premium guild (boosting) subscription started |
1 These fields are unexpectedly missing or null if the user has blocked the current user.
2 See the section on Discord's new username system for more information.
3 This will always be an empty list / zero value for bots, even if the user has mutual friends with it.
Profile Application Structure
| Field | Type | Description |
|---|---|---|
| id | snowflake | The ID of the application |
| flags | integer | The application's flags |
| verified | boolean | Whether the application is verified |
| storefront_available | boolean | Whether the application has monetization enabled (i.e. subscriptions or products available for purchase) |
| primary_sku_id? | snowflake | The ID of the application's primary SKU (game, application subscription, etc.) |
| install_params? | application install params object | The default in-app authorization link for the integration |
| integration_types_config? | map[integer, ?application integration type configuration object] | The configuration for each integration type supported by the application |
| popular_application_command_ids? | array[snowflake] | The IDs of the application's most popular application commands (max 5) |
| custom_install_url? | string | The default custom authorization link for the integration |
Profile Badge Structure
For a list of known profile badges, refer to this Gist.
| Field | Type | Description |
|---|---|---|
| id | string | The reference ID of the badge |
| description | string | A description of the badge |
| icon | string | The badge's icon hash |
| link? | string | A link representing the badge |
Mutual Guild Structure
| Field | Type | Description |
|---|---|---|
| id | snowflake | The guild ID |
| nick | ?string | The user's nickname in the guild |
Example Response
{"user": {"id": "852892297661906993","username": "alien","global_name": "Alien","avatar": "9d52298a3ad006da31ac66a86230d9f2","avatar_decoration_data": null,"discriminator": "0","public_flags": 64,"flags": 64,"banner": "a_17a0757cf6121ccc07546de9bff3edb2","accent_color": null,"bio": "👽 Professional smoothbrain","avatar_decoration_data": null,"primary_guild": null},"connected_accounts": [{"type": "twitter","id": "123456","name": "discord","verified": true,"metadata": {"verified": "1","followers_count": "100000","statuses_count": "100000","created_at": "2016-01-01T00:00:00"}}],"premium_since": "2016-01-01T00:00:00.00+00:00","premium_type": 2,"premium_guild_since": "2016-01-01T00:00:00.00+00:00","mutual_friends_count": 100,"mutual_guilds": [{"id": "80351110224678913","nick": "Liena"}],"guild_member": {"avatar": null,"communication_disabled_until": null,"unusual_dm_activity_until": null,"flags": 0,"joined_at": "2016-01-01T00:00:00.00+00:00","nick": null,"pending": false,"premium_since": "2016-01-01T00:00:00.00+00:00","roles": [],"user": {"id": "852892297661906993","username": "alien","global_name": "Alien","avatar": "9d52298a3ad006da31ac66a86230d9f2","discriminator": "0","public_flags": 4194368,"avatar_decoration_data": null,"primary_guild": null},"bio": "👽 Professional alien","banner": null,"mute": false,"deaf": false},"application_role_connections": [{"platform_name": "Aliens United","platform_username": "Alien","metadata": {"real": "1","certified": "1"},"application": {"id": "891436233903964161","name": "Lightbulb","icon": "4d47160ec8c45f22e2bdbe75ac3e1bbd","description": "<:support_icon:853084466016288828> Imagine a bot.","summary": "","type": null,"bot": {"id": "891436233903964161","username": "lightbulb","global_name": "Lightbulb","avatar": "59fb354bf144ed784aa8bdef88d135bb","avatar_decoration_data": null,"discriminator": "0","public_flags": 0,"bot": true}},"application_metadata": {"real": {"type": 7,"key": "real","name": "Real","description": "Are you real alier?"},"certified": {"type": 7,"key": "certified","name": "Certified","description": "Are you certified alier?"}}}],"user_profile": {"bio": "👽 Professional smoothbrain","accent_color": null,"pronouns": "gnarp/gnap","banner": "a_17a0757cf6121ccc07546de9bff3edb2","theme_colors": [1, 1],"popout_animation_particle_type": 100000,"emoji": null,"profile_effect": {"id": "1139323097930027068","expires_at": null}},"guild_member_profile": {"guild_id": "80351110224678913","pronouns": "","bio": "👽 Professional alien","banner": null,"accent_color": null,"theme_colors": [1, 1],"popout_animation_particle_type": null,"emoji": null,"profile_effect": {"id": "1139323097930027068","expires_at": null}}}
Modify User Profile
PATCH/users/@me/profileModifies the current user's profile. Returns the updated profile metadata object on success. Fires a User Update Gateway event.
JSON Params
| Field | Type | Description |
|---|---|---|
| pronouns? | ?string | The user's pronouns (max 40 characters) |
| bio? | ?string | The user's bio (max 190 characters) |
| banner? | ?image data | The user's banner; can only be changed for premium (Nitro) users |
| accent_color? | ?integer | The user's accent color as a hex integer |
| theme_colors? | ?array[integer, integer] | The user's two theme colors encoded as an array of integers representing hexadecimal color codes |
| popout_animation_particle_type? | ?snowflake | The user's profile popout animation particle type |
| emoji_id? | ?snowflake | The user's profile emoji ID |
| profile_effect_id? | ?snowflake | The user's profile effect ID |
Get Mutual Relationships
GET/users/{user.id}/relationshipsReturns a list of partial user objects that are friends with the user and current user.
Enable TOTP MFA
POST/users/@me/mfa/totp/enableEnables TOTP multi-factor authentication for the current user. Fires a User Update Gateway event.
JSON Params
| Field | Type | Description |
|---|---|---|
| password | string | The user's password |
| secret? | string | The generated TOTP secret (32 characters) |
| code? | string | The TOTP code to verify the secret (6 characters) |
Response Body
| Field | Type | Description |
|---|---|---|
| token | string | The new authorization token for the session |
| backup_codes | array[backup code object] | MFA backup codes |
Disable TOTP MFA
POST/users/@me/mfa/totp/disableDisables TOTP multi-factor authentication for the current user. Fires a User Update Gateway event.
Response Body
| Field | Type | Description |
|---|---|---|
| token | string | The new authorization token for the session |
Enable SMS MFA
POST/users/@me/mfa/sms/enableEnables SMS multi-factor authentication for the current user. Requires that TOTP-based MFA is already enabled and the user has a verified phone number. Returns a 204 empty response on success. Fires a User Update Gateway event.
JSON Params
| Field | Type | Description |
|---|---|---|
| password | string | The user's password |
Disable SMS MFA
POST/users/@me/mfa/sms/disableDisables SMS multi-factor authentication for the current user. Returns a 204 empty response on success. Fires a User Update Gateway event.
JSON Params
| Field | Type | Description |
|---|---|---|
| password | string | The user's password |
Get WebAuthn Authenticators
GET/users/@me/mfa/webauthn/credentialsReturns a list of WebAuthn authenticator objects for the current user.
Create WebAuthn Authenticator
POST/users/@me/mfa/webauthn/credentialsCreates a WebAuthn authenticator for the current user. Fires User Update and Authenticator Create Gateway events once the authenticator is created.
JSON Params
| Field | Type | Description |
|---|---|---|
| name? | string | The name of the authenticator (1-32 characters) |
| ticket? | string | The MFA ticket returned from the same endpoint |
| credential? | string | A stringified JSON object of the public key credential response |
Response Body
| Field | Type | Description |
|---|---|---|
| ticket 1 | string | The MFA ticket |
| challenge 1 | string | The stringified JSON public key credential request options challenge |
| id 2 | string | The ID of the authenticator |
| type 2 | string | The type of authenticator (always WEBAUTHN) |
| name 2 | string | The name of the authenticator |
| backup_codes 2 | array[backup code object] | MFA backup codes |
1 Only returned when no parameters are provided.
2 Only returned when parameters are provided.
Example Response (Ticket)
{"ticket": "ODUyODkyMjk3NjYxOTA2OTkz.H2Rpq0.WrhGhYEhM3lHUPN61xF6JcQKwVutk8fBvcoHjo","challenge": "{\"publicKey\":{\"challenge\":\"a8a1cHP7_zYheggFG68zKUkl8DwnEqfKvPE-GOMvhss\",\"timeout\":60000,\"rpId\":\"discord.com\",\"allowCredentials\":[{\"type\":\"public-key\",\"id\":\"izrvF80ogrfg9dC3RmWWwW1VxBVBG0TzJVXKOJl__6FvMa555dH4Trt2Ub8AdHxNLkQsc0unAGcn4-hrJHDKSO\"}],\"userVerification\":\"preferred\"}}"}
Example Response (Authenticator)
{"id": "1219430671865610261","type": 1,"name": "AlienKey","backup_codes": [{"user_id": "852892297661906993","code": "zqs8oqxk","consumed": false}]}
Modify WebAuthn Authenticator
PATCH/users/@me/mfa/webauthn/credentials/{authenticator.id}Modifies the given WebAuthn authenticator. Returns the updated authenticator object on success. Fires an Authenticator Update Gateway event.
JSON Params
| Field | Type | Description |
|---|---|---|
| name? | string | The name of the authenticator (1-32 characters) |
Delete WebAuthn Authenticator
DELETE/users/@me/mfa/webauthn/credentials/{authenticator.id}Deletes the given WebAuthn authenticator. Returns a 204 empty response on success. Fires User Update and Authenticator Delete Gateway events.
Send Backup Codes Challenge
POST/auth/verify/view-backup-codes-challengeSends an email to the current user with a verification code that allows them to view their backup codes. Returns a 204 empty response on success.
JSON Params
| Field | Type | Description |
|---|---|---|
| password | string | The user's password |
Response Body
| Field | Type | Description |
|---|---|---|
| nonce | string | The one-time verification nonce used to view the backup codes |
| regenerate_nonce | string | The one-time verification nonce used to regenerate the backup codes |
Get Backup Codes
POST/users/@me/mfa/codes-verificationReturns the user's MFA backup codes.
JSON Params
| Field | Type | Description |
|---|---|---|
| key 1 | string | The backup code verification key received in the email |
| nonce 1 2 | string | The one-time verification nonce used to view/regenerate the backup codes |
| regenerate 2 | boolean | Whether to regenerate the backup codes |
1 This value can be obtained by requesting a verification code with the Send Backup Codes Challenge endpoint.
2 The nonce used must correspond to the action being performed. Each action can only be performed once.
Response Body
| Field | Type | Description |
|---|---|---|
| backup_codes | array[backup code object] | MFA backup codes |
Example Response
{"backup_codes": [{"user_id": "852892297661906993","code": "zqs8oqxk","consumed": false}]}
Disable User
POST/users/@me/disableDisables the current user's account. Invalidates all active tokens. Returns a 204 empty response on success.
JSON Params
| Field | Type | Description |
|---|---|---|
| password | string | The user's password |
Delete User
POST/users/@me/deleteMarks the current user's account for deletion. Invalidates all active tokens. Returns a 204 empty response on success.
JSON Params
| Field | Type | Description |
|---|---|---|
| password | ?string | The user's password, if any |
Verify User Captcha
POST/users/@me/captcha/verifyVerifies a reCAPTCHA solution when needed by the COMPLETE_CAPTCHA required action. Returns a 204 empty response on success. Fires a User Required Action Update Gateway event.
reCAPTCHA Site Key
JSON Params
| Field | Type | Description |
|---|---|---|
| captcha_key | string | The reCAPTCHA solution |
Modify User Agreements
patch/users/@me/agreementsReaffirms the user's agreements to Discord's Terms of Service and Privacy Policy when needed by the UPDATE_AGREEMENTS required action, which is assigned when a policy change occurs.
Returns a 204 empty response on success. Fires a User Required Action Update Gateway event.
JSON Params
| Field | Type | Description |
|---|---|---|
| terms? | boolean | Whether the user agrees to the Terms of Service |
| privacy? | boolean | Whether the user agrees to the Privacy Policy |
Get User Email Change Code
PUT/users/@me/emailSends a verification code to the current user's email address to initiate the email change process. Returns a 204 empty response on success.
Verify User Email Change
POST/users/@me/email/verify-codeVerifies a verification code sent to the current user's email address to initiate an email change.
JSON Params
| Field | Type | Description |
|---|---|---|
| code | string | The verification code |
Response Body
| Field | Type | Description |
|---|---|---|
| token | string | The email token; can be used with Modify Current User to change the user's email |
Get Pomelo Suggestions
GET/users/@me/pomelo-suggestionsReturns a suggested unique username string based on the current user's username.
Response Body
| Field | Type | Description |
|---|---|---|
| username | string | The suggested username |
Example Response
{ "username": "gnarp.gnap" }
Get Pomelo Eligibility
POST/users/@me/pomelo-attemptChecks whether a unique username is available for the user to claim.
JSON Params
| Field | Type | Description |
|---|---|---|
| username | string | The username to check |
Response Body
| Field | Type | Description |
|---|---|---|
| taken | boolean | Whether the username is taken |
Example Response
{ "taken": true }
Create Pomelo Migration
POST/users/@me/pomeloClaims a unique username for the user. Returns the updated user object on success. Fires a User Update Gateway event.
JSON Params
| Field | Type | Description |
|---|---|---|
| username | string | The username to claim |
Get Recent Mentions
GET/users/@me/mentionsReturns a list of message objects that the current user has been mentioned in during the past 7 days.
Query String Params
| Field | Type | Description |
|---|---|---|
| before? | snowflake | Get messages before this message ID |
| limit? | integer | Max number of messages to return (1-100, default 25) |
| guild_id? | snowflake | The guild to limit returned messages by |
| roles? | boolean | Whether to include role mentions (default true) |
| everyone? | boolean | Whether to include @everyone and @here mentions (default true) |
Delete Recent Mention
DELETE/users/@me/mentions/{message.id}Acknowledges a message the current user has been mentioned in. Returns a 204 empty response on success. Fires a Recent Mention Delete Gateway event.
Get User Harvest
GET/users/@me/harvestIf it exists, returns a harvest object representing the current user's most recent user data harvest request. Otherwise, returns a 204 empty response.
Create User Harvest
POST/users/@me/harvestCreates a user data harvest request for the current user. Returns a harvest object on success.
JSON Params
| Field | Type | Description |
|---|---|---|
| backends? | ?array[string] | The types of user data being requested 1 |
1 Invalid options are ignored. If the array contains no valid values, all data types are requested.
Harvest Backend Type
See the official support page for more information.
| Value | Description |
|---|---|
| Accounts | All account information |
| Analytics | Actions the user has taken in Discord |
| Activities | First-party embedded activity information |
| Messages | All user messages |
| Programs | Official Discord programs (e.g. partner) |
| Servers | All guilds the user is currently a member of |
Get User Survey
GET/users/@me/surveyReturns the current user's active survey.
Query String Params
| Field | Type | Description |
|---|---|---|
| disable_auto_seen? | boolean | Whether to prevent automatically marking the survey as seen (default false) |
| survey_override? 1 | snowflake | The ID of the survey to return |
1 Only usable by Discord employees.
Response Body
| Field | Type | Description |
|---|---|---|
| survey | ?user survey object | The user's active survey, if any |
Acknowledge User Survey
POST/users/@me/survey/{survey.id}/seenMarks a user survey as seen. Returns a 204 empty response on success.
Get User Notes
GET/users/@me/notesReturns a mapping of user IDs to notes for the current user.
Example Response
{"852892297661906993": "This is a note","787017887877169173": "This is another note"}
Get User Note
GET/users/@me/notes/{user.id}Returns the note for the given user.
Response Body
| Field | Type | Description |
|---|---|---|
| note | string | The note (max 256 characters) |
| note_user_id | snowflake | The ID of the user the note is on |
| user_id | snowflake | The ID of the user who created the note (always the current user) |
Example Response
{"note": "This is a note","note_user_id": "787017887877169173","user_id": "852892297661906993"}
Modify User Note
PUT/users/@me/notes/{user.id}Sets the note for the given user. Returns a 204 empty response on success. Fires a User Note Update Gateway event.
JSON Params
| Field | Type | Description |
|---|---|---|
| note | ?string | The note (max 256 characters) |
Authorize User Connection
GET/connections/{connection.type}/authorizeReturns 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 |
Create User Connection Callback
POST/connections/{connection.type}/callbackCreates 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 |
Create Contact Sync Connection
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 |
Create Domain Connection
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 User Connections
GET/users/@me/connectionsReturns a list of connection objects.
Get User Connection Access Token
GET/users/@me/connections/{connection.type}/{connection.id}/access-tokenReturns 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 User Connection Subreddits
GET/users/@me/connections/reddit/{connection.id}/subredditsReturns 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/"}]
Refresh User Connection
POST/users/@me/connections/{connection.type}/{connection.id}/refreshRefreshes a connection. Returns a 204 empty response on success. Fires a User Connections Update Gateway event.
Modify User Connection
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 User 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 Friend Token
GET/users/@me/friend-tokenReturns the current user's friend token. These can be used to fetch the user's profile without a mutual and add the user as a friend regardless of their friend request settings.
Response Body
| Field | Type | Description |
|---|---|---|
| friend_token | string | The current user's friend token |
Example Response
{ "friend_token": "ODUyODkyMjk3NjYxOTA2OTkz.Z3cftw.IClap6I53w2tYxs6xD8zaGX_7KA" }
Get User Affinities
GET/users/@me/affinities/usersReturns the current user's affinity scores for other users. Affinity scores are a measure of how likely a user is to be friends with another user.
Response Body
| Field | Type | Description |
|---|---|---|
| user_affinities | array[user affinity object] | The user's affinity scores for other users |
User Affinity Structure
| Field | Type | Description |
|---|---|---|
| user_id | snowflake | The user's ID |
| affinity | float | The affinity score |
Get User Affinities v2
GET/users/@me/affinities/v2/usersReturns more detailed user affinity scores for the current user.
Response Body
| Field | Type | Description |
|---|---|---|
| user_affinities | array[user affinity v2 object] | The user's affinity scores for other users |
User Affinity v2 Structure
| Field | Type | Description |
|---|---|---|
| other_user_id | snowflake | The user's ID |
| user_segment | string | The usage segment of the current user |
| other_user_segment | string | The usage segment of the user |
| is_friend | boolean | Whether the user is a friend |
| dm_probability | float | The affinity score for direct messaging |
| dm_rank | integer | The rank of the direct message affinity |
| vc_probability | float | The affinity score for voice calling |
| vc_rank | integer | The rank of the voice call affinity |
| server_message_probability | float | The affinity score for guild messaging |
| server_message_rank | integer | The rank of the guild message affinity |
| communication_probability | float | The overall communication affinity score |
| communication_rank | integer | The rank of the overall communication affinity |
User Segment Type
| Value | Description |
|---|---|
| HFU_MAU | High Frequency User, Monthly Active User |
| NON_HFU_MAU | Non-High Frequency User, Monthly Active User |
| NON_MAU | Non-Monthly Active User |
Example User Affinities v2
{"other_user_id": "1001086404203389018","user_segment": "HFU_MAU","other_user_segment": "HFU_MAU","is_friend": true,"dm_probability": 0.869776725769043,"dm_rank": 1,"vc_probability": 0.004896213300526142,"vc_rank": 4,"server_message_probability": 0.846949577331543,"server_message_rank": 6,"communication_probability": 0.573874172133704,"communication_rank": 1}
Get Guild Affinities
GET/users/@me/affinities/guildsReturns the current user's affinity scores for their joined guilds. Affinity scores are a measure of how likely a user is to interact with a guild.
Response Body
| Field | Type | Description |
|---|---|---|
| guild_affinities | array[guild affinity object] | The user's affinity scores for their guilds |
Guild Affinity Structure
| Field | Type | Description |
|---|---|---|
| guild_id | snowflake | The guild's ID |
| affinity | float | The affinity score |
Get Channel Affinities
GET/users/@me/affinities/channelsReturns the current user's affinity scores for their participated channels. Affinity scores are a measure of how likely a user is to interact with a channel.
Response Body
| Field | Type | Description |
|---|---|---|
| channel_affinities | array[channel affinity object] | The user's affinity scores for their channels |
Channel Affinity Structure
| Field | Type | Description |
|---|---|---|
| channel_id | snowflake | The channel's ID |
| affinity | float | The affinity score |
Confirm Tutorial Indicator
PUT/tutorial/indicators/{indicator}Confirms the given tutorial indicator. Returns a 204 empty response on success.
Suppress Tutorial
POST/tutorial/indicators/suppressSuppresses all tutorial indicators. Returns a 204 empty response on success.
Join HypeSquad Online
POST/hypesquad/onlineJoins a HypeSquad house and applies the relevant user flag to the current user. Returns a 204 empty response on success. Fires a User Update Gateway event.
JSON Params
| Field | Type | Description |
|---|---|---|
| house_id | integer | The HypeSquad house to join |
HypeSquad House
| Value | Description |
|---|---|
| 1 | HypeSquad Bravery |
| 2 | HypeSquad Brilliance |
| 3 | HypeSquad Balance |
Leave HypeSquad Online
DELETE/hypesquad/onlineLeaves the current user's HypeSquad house and removes the relevant user flag. Returns a 204 empty response on success. Fires a User Update Gateway event.
Join Active Developer Program
POST/developers/active-programJoins the active developer program and applies the ACTIVE_DEVELOPER user flag to the current user. Requires the MANAGE_WEBHOOKS permission in the target channel. Returns a 204 empty response on success. Fires a User Update and Webhooks Update Gateway event.
JSON Params
| Field | Type | Description |
|---|---|---|
| application_id 1 | snowflake | The ID of the application to join the program with |
| channel_id 2 | The ID of the channel to create a follower webhook in |
1 User must be the owner of the application or member of the current team. The application must have the ACTIVE application flag.
2 This webhook will point to the official Discord Developers #developer-news channel and will be used to send updates about developing on Discord.
Response Body
| Field | Type | Description |
|---|---|---|
| follower | followed channel object | The followed channel |
Leave Active Developer Program
DELETE/developers/active-programLeaves the active developer program and removes the ACTIVE_DEVELOPER user flag from the current user. Returns a 204 empty response on success. Fires a User Update Gateway event.
Submit Developer Portal CSAT Survey
POST/dev-portal-csat-survey-responseSubmits a customer satisfaction survey response for the development experience on Discord. Returns a 204 empty response on success.
JSON Params
| Field | Type | Description |
|---|---|---|
| user_id | snowflake | The ID of the client user |
| csat_response | integer | The rating given by the user (1-5) |
Get User Premium Usage
GET/users/@me/premium-usageReturns the current user's premium usage for various perks. Only available for users with Nitro.
Response Body
| Field | Type | Description |
|---|---|---|
| nitro_sticker_sends | premium usage object | The number of Nitro sticker the user has sent |
| total_animated_emojis | premium usage object | The number of animated emojis the user has sent |
| total_global_emojis | premium usage object | The number of global emojis the user has sent |
| total_large_uploads | premium usage object | The number of large uploads the user has made |
| total_hd_streams | premium usage object | The number of streams the user has made in HD |
| hd_hours_streamed | premium usage object | The number of hours the user has streamed in HD |
Premium Usage Structure
| Field | Type | Description |
|---|---|---|
| value | integer | The total number of uses for this perk |
Example Response
{"total_large_uploads": {"value": 50},"total_global_emojis": {"value": 967},"total_animated_emojis": {"value": 217},"nitro_sticker_sends": {"value": 303},"hd_hours_streamed": {"value": 100},"total_hd_streams": {"value": 50}}
Get User Profile Effects
GET/user-profile-effectsReturns the list of profile effects available to use.
Response Body
| Field | Type | Description |
|---|---|---|
| profile_effect_configs | array[profile effect config object] | The list of profile effects available to use |
Profile Effect Config Structure
| Field | Type | Description |
|---|---|---|
| id | string | The ID of the profile effect |
| type | integer | The type of profile effect |
| sku_id | string | The ID of the profile effect SKU |
| title | string | The title of the profile effect |
| description | string | The description of the profile effect |
| accessibilityLabel | string | An accessible description of the profile effect |
| animationType | integer | The type of animation used by the profile effect |
| thumbnailPreviewSrc | string | The URL of the profile effect's thumbnail preview image (in APNG format) |
| reducedMotionSrc | string | A URL of the profile effect with reduced motion (in APNG format) |
| effects | array[profile effect animation object] | The animation frames for the profile effect |
Profile Effect Animation Structure
| Field | Type | Description |
|---|---|---|
| src | string | The URL of the animation image (in APNG format) |
| loop | boolean | Whether the animation frame should loop |
| height | integer | The height of the animation image |
| width | integer | The width of the animation image |
| duration | integer | The duration of the animation frame (in milliseconds) |
| start | integer | The start time of the animation frame (in milliseconds) |
| loopDelay | integer | The delay between loops of the animation frame (in milliseconds) |
| position | profile effect position object | The position of the animation frame |
| zIndex | integer | The z-index of the animation frame |
Profile Effect Position Structure
| Field | Type | Description |
|---|---|---|
| x | integer | The x-coordinate of the animation frame |
| y | integer | The y-coordinate of the animation frame |
Profile Effect Animation Type
| Value | Name | Description |
|---|---|---|
| 0 | UNSPECIFIED | The animation type is unspecified |
| 1 | PERSISTENT | The animation type is persistent |
| 2 | INTERMITTENT | The animation type is intermittent |
Example Response
{"profile_effect_configs": [{"type": 1,"id": "1139323075519852625","sku_id": "1139323092645183591","title": "Hydro Blast","description": "Time to make a splash.","accessibilityLabel": "A powerful stream of water swirls and twirls in the air. Wait, where's it headed off to?!","animationType": 2,"thumbnailPreviewSrc": "https://cdn.discordapp.com/assets/profile_effects/effects/b17d139f2e9/splash/thumbnail.png","reducedMotionSrc": "https://cdn.discordapp.com/assets/profile_effects/effects/b17d139f2e9/splash/reducedMotion.png","effects": [{"src": "https://cdn.discordapp.com/assets/profile_effects/effects/b17d139f2e9/splash/intro.png","loop": false,"height": 880,"width": 450,"duration": 2880,"start": 0,"loopDelay": 0,"position": {"x": 0,"y": 0},"zIndex": 100},{"src": "https://cdn.discordapp.com/assets/profile_effects/effects/b17d139f2e9/splash/loop.png","loop": true,"height": 880,"width": 450,"duration": 2880,"start": 5760,"loopDelay": 5760,"position": {"x": 0,"y": 0},"zIndex": 100}]}]}
Get Confetti Potions
GET/users/@me/consumable/confettiReturns the number of confetti potions left to use.
Response Body
| Field | Type | Description |
|---|---|---|
| entitlement | ?entitlement object | The entitlement to which the potions belong to |
| num_potions | integer | The Number of unused potions left |
Apply Confetti Potion
POST/users/@me/consumable/confettiApplies a confetti potion to a message. To use custom emoji, you must encode it in the format name:id with the emoji name and emoji ID. Returns a 204 empty response on success.
JSON Params
| Field | Type | Description |
|---|---|---|
| channel_id | snowflake | The ID of the channel the message is in |
| message_id | snowflake | The ID of the message to apply the confetti potion to |
| emoji_name | string | Unicode emoji or custom emoji name and ID |
Get Saved Messages
GET/users/@me/saved-messagesReturns message bookmarks and reminders for the current user.
Response Body
| Field | Type | Description |
|---|---|---|
| results | array[saved message object] | The list of saved messages |
Saved Message Structure
| Field | Type | Description |
|---|---|---|
| message | ?message object | The saved message |
| save_data | save data object | The save data for the message |
Save Data Structure
| Field | Type | Description |
|---|---|---|
| channel_id | snowflake | The ID of the channel |
| message_id | snowflake | The ID of the message |
| guild_id? | snowflake | The ID of the guild |
| saved_at | ISO8601 timestamp | The timestamp when the message was saved |
| author_summary | string | Unknown |
| channel_summary | string | Unknown |
| message_summary | string | Unknown |
| notes | string | Unknown |
| due_at | ?ISO8601 timestamp | When the reminder is due |
Save Message
PUT/users/@me/saved-messages/{channel.id}/{message.id}Saves a message for the current user. Returns a saved message object on success. Fires a Saved Message Create Gateway event.
JSON Params
| Field | Type | Description |
|---|---|---|
| due_at? | ?ISO8601 timestamp | When the reminder is due |
Unsave Message
DELETE/users/@me/saved-messages/{channel.id}/{message.id}Unsaves a message for the current user. Returns a 204 empty response on success. Fires a Saved Message Delete Gateway event.