Usernames and nicknames
Discord enforces the following restrictions for usernames 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.
- Nicknames must be between 1 and 32 characters long.
- Names are sanitized and trimmed of leading, trailing, and excessive internal whitespace.
- Usernames cannot contain the following substrings:
@,#,:,`,discord - Usernames cannot be:
everyone,here
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.
User object
User structure
The user’s id. Requires the
identify OAuth2 scope.The user’s username, not unique across the platform. Requires the
identify OAuth2 scope.The user’s Discord-tag. Requires the
identify OAuth2 scope.The user’s display name, if it is set. Requires the
identify OAuth2 scope.The user’s avatar hash. Requires the
identify OAuth2 scope.Whether the user belongs to an OAuth2 application. Requires the
identify OAuth2 scope.Whether the user is an Official Discord System user (part of the urgent message system). Requires the
identify OAuth2 scope.Whether the user has two factor enabled on their account. Requires the
identify OAuth2 scope.The user’s banner hash. Requires the
identify OAuth2 scope.The user’s banner color encoded as an integer representation of hexadecimal color code. Requires the
identify OAuth2 scope.The user’s chosen language option. Requires the
identify OAuth2 scope.Whether the email on this account has been verified. Requires the
email OAuth2 scope.The user’s email. Requires the
email OAuth2 scope.The type of Nitro subscription on a user’s account. Requires the
identify OAuth2 scope.Data for the user’s avatar decoration. Requires the
identify OAuth2 scope.Data for the user’s collectibles. Requires the
identify OAuth2 scope.The user’s primary guild. Requires the
identify OAuth2 scope.Example user
User flags
| Value | Name | Description |
|---|---|---|
1 << 0 | STAFF | Discord Employee |
1 << 1 | PARTNER | Partnered Server Owner |
1 << 2 | HYPESQUAD | HypeSquad Events Member |
1 << 3 | BUG_HUNTER_LEVEL_1 | Bug Hunter Level 1 |
1 << 6 | HYPESQUAD_ONLINE_HOUSE_1 | House Bravery Member |
1 << 7 | HYPESQUAD_ONLINE_HOUSE_2 | House Brilliance Member |
1 << 8 | HYPESQUAD_ONLINE_HOUSE_3 | House Balance Member |
1 << 9 | PREMIUM_EARLY_SUPPORTER | Early Nitro Supporter |
1 << 10 | TEAM_PSEUDO_USER | User is a team |
1 << 14 | BUG_HUNTER_LEVEL_2 | Bug Hunter Level 2 |
1 << 16 | VERIFIED_BOT | Verified Bot |
1 << 17 | VERIFIED_DEVELOPER | Early Verified Bot Developer |
1 << 18 | CERTIFIED_MODERATOR | Moderator Programs Alumni |
1 << 19 | BOT_HTTP_INTERACTIONS | Bot uses only HTTP interactions and is shown in the online member list |
Premium types
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 |
|---|---|
0 | None |
1 | Nitro Classic |
2 | Nitro |
3 | Nitro Basic |
User primary guild
The id of the user’s primary guild.
Whether the user is displaying the primary guild’s server tag. This can be
null if the system clears the identity (for example, the server no longer supports tags). This will be false if the user manually removes their tag.The text of the user’s server tag. Limited to 4 characters.
Avatar decoration data object
The data for the user’s avatar decoration.Id of the avatar decoration’s SKU.
Collectibles
The collectibles the user has, excluding Avatar Decorations and Profile Effects.Object mapping of nameplate data.
Nameplate
The nameplate the user has.Id of the nameplate SKU.
Path to the nameplate asset.
The label of this nameplate. Currently unused.
Background color of the nameplate. One of:
crimson, berry, sky, teal, forest, bubble_gum, violet, cobalt, clover, lemon, white.Connection object
The connection object that the user has attached.Id of the connection account.
The username of the connection account.
Whether the connection is revoked.
An array of partial server integrations.
Whether the connection is verified.
Whether friend sync is enabled for this connection.
Whether activities related to this connection will be shown in presence updates.
Whether this connection has a corresponding third party OAuth2 token.
Visibility of this connection.
Connection services
| Value | Name |
|---|---|
amazon-music | Amazon Music |
battlenet | Battle.net |
bungie | Bungie.net |
bluesky | Bluesky |
crunchyroll | Crunchyroll |
domain | Domain |
ebay | eBay |
epicgames | Epic Games |
facebook | |
github | GitHub |
instagram * | |
leagueoflegends | League of Legends |
mastodon | Mastodon |
paypal | PayPal |
playstation | PlayStation Network |
reddit | |
riotgames | Riot Games |
roblox | Roblox |
spotify | Spotify |
skype * | Skype |
steam | Steam |
tiktok | TikTok |
twitch | Twitch |
twitter | X (Twitter) |
xbox | Xbox |
youtube | YouTube |
Connection visibility types
| Value | Name | Description |
|---|---|---|
0 | None | Invisible to everyone except the user themselves |
1 | Everyone | Visible to everyone |
Application role connection object
The role connection object that an application has attached to a user.The vanity name of the platform a bot has connected (max 50 characters).
The username on the platform a bot has connected (max 100 characters).
Object mapping [application role connection metadata](/developers/resources/application
Get current user
GET
/users/@meidentify scope, which will return the object without an email, and optionally the email scope, which returns the object with an email if the user has one.
Get user
GET
/users/{user.id}Modify current user
PATCH
/users/@meAll parameters to this endpoint are optional.
JSON params
User’s username. If changed, may cause the user’s discriminator to be randomized.
If passed, modifies the user’s avatar. See image data.
If passed, modifies the user’s banner. See image data.
Get current user guilds
GET
/users/@me/guildsguilds scope.
This endpoint returns 200 guilds by default, which is the maximum number of guilds a non-bot user can join. Therefore, pagination is not needed for integrations that need to get a list of the users’ guilds.
Example partial guild
Query string params
Get guilds before this guild ID.
Get guilds after this guild ID.
Max number of guilds to return (1–200).
Include approximate member and presence counts in the response.
Get current user guild member
GET
/users/@me/guilds/{guild.id}/memberguilds.members.read OAuth2 scope.
Leave guild
DELETE
/users/@me/guilds/{guild.id}204 No Content response on success. Fires a Guild Delete Gateway event and a Guild Member Remove Gateway event.
Create DM
POST
/users/@me/channelsJSON params
The recipient to open a DM channel with.
Create group DM
POST
/users/@me/channelsJSON params
Access tokens of users that have granted your app the
gdm.join scope.A dictionary of user ids to their respective nicknames.
Get current user connections
GET
/users/@me/connectionsconnections OAuth2 scope.
Get current user application role connection
GET
/users/@me/applications/{application.id}/role-connectionrole_connections.write scope for the application specified in the path.
Update current user application role connection
PUT
/users/@me/applications/{application.id}/role-connectionrole_connections.write scope for the application specified in the path.
JSON params
The vanity name of the platform a bot has connected (max 50 characters).
The username on the platform a bot has connected (max 100 characters).
Object mapping [application role connection metadata](/developers/resources/application