Skip to main content
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 “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 and nicknames:
  1. Names can contain most valid unicode characters. We limit some zero-width and non-rendering characters.
  2. Usernames must be between 2 and 32 characters long.
  3. Nicknames must be between 1 and 32 characters long.
  4. Names are sanitized and trimmed of leading, trailing, and excessive internal whitespace.
The following restrictions are additionally enforced for usernames:
  1. Usernames cannot contain the following substrings: @, #, :, ```, discord
  2. 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
Example User
User Flags
Premium Types
Premium types denote the level of premium a user has. Visit the Nitro page to learn more about the premium plans we currently offer.
User Primary Guild

Avatar Decoration Data Object

The data for the user’s avatar decoration.
Avatar Decoration Data Structure

Collectibles

The collectibles the user has, excluding Avatar Decorations and Profile Effects.
Collectible Structure

Nameplate

The nameplate the user has.
Nameplate Structure

Connection Object

The connection object that the user has attached.
Connection Structure
Services
* Service can no longer be added by users
Visibility Types

Application Role Connection Object

The role connection object that an application has attached to a user.
Application Role Connection Structure

Get Current User

Returns the user object of the requester’s account. For OAuth2, this requires the identify 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

Returns a user object for a given user ID.

Modify Current User

Modify the requester’s user account settings. Returns a user object on success. Fires a User Update Gateway event.
All parameters to this endpoint are optional.
JSON Params

Get Current User Guilds

Returns a list of partial guild objects the current user is a member of. For OAuth2, requires the guilds scope.
Example Partial Guild
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.
Query String Params

Get Current User Guild Member

Returns a guild member object for the current user. Requires the guilds.members.read OAuth2 scope.

Leave Guild

Leave a guild. Returns a 204 empty response on success. Fires a Guild Delete Gateway event and a Guild Member Remove Gateway event.

Create DM

Create a new DM channel with a user. Returns a DM channel object (if one already exists, it will be returned instead).
You should not use this endpoint to DM everyone in a server about something. DMs should generally be initiated by a user action. If you open a significant amount of DMs too quickly, your bot may be rate limited or blocked from opening new ones.
JSON Params

Create Group DM

Create a new group DM channel with multiple users. Returns a DM channel object. This endpoint was intended to be used with the now-deprecated GameBridge SDK. Fires a Channel Create Gateway event.
This endpoint is limited to 10 active group DMs.
JSON Params

Get Current User Connections

Returns a list of connection objects. Requires the connections OAuth2 scope.

Get Current User Application Role Connection

Returns the application role connection for the user. Requires an OAuth2 access token with role_connections.write scope for the application specified in the path.

Update Current User Application Role Connection

Updates and returns the application role connection for the user. Requires an OAuth2 access token with role_connections.write scope for the application specified in the path.
JSON Params

Delete Current User Application Role Connection

Deletes the application role connection for the user. Requires an OAuth2 access token with role_connections.write scope for the application specified in the path.