Skip to content

A free and open source instant messaging and VoIP chat app built for friends, groups, and communities.

TypeScript fluxerfluxerapp
34.6 KB
Raw Blame
---
# SPDX-License-Identifier: AGPL-3.0-or-later
title: Users
description: User objects, profiles, the user settings object and the routes that look up other users.
---

import RouteHeader from '@/components/RouteHeader.astro';

A user is a Fluxer account, which other accounts see as a [partial user object](#partial-user-object) and its owner sees as a [user object](#user-object). You change your own account through [Current user](/http-api/users/current-user/).

The routes on this page accept a user session token or a bot token, and an OAuth2 bearer token gets 403 `ACCESS_DENIED`.

## Partial user object

The public account object inside messages, relationships, guild members and applications.

### Structure

| Field | Type | Description |
| --- | --- | --- |
| id | snowflake | The ID of the account |
| username | string | The username (1-32 ASCII letters, digits or underscores) |
| discriminator | string | The discriminator, four digits with leading zeroes |
| global_name | ?string | The display name, or null |
| avatar<sup>1</sup> | ?string | The avatar hash, or null |
| avatar_color | ?integer | The 24-bit RGB color taken from the avatar, or null |
| bot? | boolean | Whether the account is a bot, omitted when false |
| system? | boolean | Whether the account is a Fluxer system account, omitted when false |
| flags | integer | [Public user flags](#public-user-flags) |
| mention_flags? | integer | [Reply mention preference](#reply-mention-preferences), omitted when there is none |

<sup>1</sup> An animated avatar hash starts with `a_`

### Example

```json
{
  "id": "1501314428688998182",
  "username": "aria",
  "discriminator": "0042",
  "global_name": "Aria",
  "avatar": "a_2f1c9d7be4a350c8",
  "avatar_color": 5793266,
  "flags": 8
}
```

While an account's `profile_restricted` is true, other accounts get null `global_name` and `avatar` for it. A deleted account has the username `DeletedUser`, the discriminator `0000`, the global name `Deleted User`, `flags` of `0` and a null `avatar` and `avatar_color`.

On an instance whose `tag_style` [feature](/http-api/instance/#instance-features-object) is `none`, usernames are unique on their own and every account that isn't a bot has the discriminator `0000`.

## Public user flags

These are the values in the `flags` field, and `STAFF` is left out while the account hides its staff flag.

| Value | Name | Description |
| --- | --- | --- |
| 1 &lt;&lt; 0 | STAFF | Account is a staff member |
| 1 &lt;&lt; 2 | PARTNER | Account is a partner |
| 1 &lt;&lt; 3 | BUG_HUNTER | Account is a bug hunter |
| 1 &lt;&lt; 4 | FRIENDLY_BOT | Bot accepts friend requests |
| 1 &lt;&lt; 5 | FRIENDLY_BOT_MANUAL_APPROVAL | Bot approves friend requests by hand |
| 1 &lt;&lt; 6 | SPAMMER | Account is flagged as a spammer |
| 1 &lt;&lt; 7 | PROFILE_HIDDEN | Profile details are hidden from other users |

## Reply mention preferences

The `mention_flags` value says whether replies to the account's messages mention it by default. A guild member has the same values in its own `mention_flags`, where `NO_PREFERENCE` falls back to the account value.

| Value | Name | Description |
| --- | --- | --- |
| 0 | NO_PREFERENCE | The sender chooses, with no warning |
| 1 | PREFER_MENTION | Replies mention the account, and the sender is warned when they turn the mention off |
| 2 | PREFER_NO_MENTION | Replies don't mention the account, and the sender is warned when they turn the mention on |

## User object

The current account as its owner sees it, returned by [Get current user](/http-api/users/current-user/#get-current-user) and by every route that changes the account. It extends the [partial user object](#partial-user-object).

### Structure

| Field | Type | Description |
| --- | --- | --- |
| is_staff<sup>1</sup> | boolean | Whether the account has the staff flag, even when it is hidden from `flags` |
| acls<sup>1</sup> | array[string] | The [Admin API](/admin-api/users/#set-user-acls) access entries, empty for most accounts |
| traits<sup>1</sup> | array[string] | The account traits, sorted |
| email<sup>2</sup> | ?string | The email address, or null |
| email_bounced?<sup>1</sup> | boolean | Whether mail to the email address bounced |
| has_verified_phone | boolean | Deprecated. Always false |
| bio | ?string | The profile biography, or null |
| pronouns | ?string | The profile pronouns, or null |
| accent_color | ?integer | The profile accent color as 24-bit RGB, or null |
| timezone?<sup>1</sup> | ?string | The IANA timezone, or null |
| timezone_privacy_flags?<sup>1</sup> | integer | [Profile field privacy flags](#profile-field-privacy-flags) for the timezone |
| banner | ?string | The profile banner hash, or null |
| banner_color | ?integer | The 24-bit RGB color taken from the banner, or null |
| mfa_enabled<sup>1</sup> | boolean | Whether any authenticator is set up |
| authenticator_types?<sup>1</sup> | array[integer] | [Authenticator types](#authenticator-types) set up for the account |
| verified<sup>2</sup> | boolean | Whether the email address is confirmed |
| account_limited?<sup>1</sup> | boolean | Whether the account is [limited](#account-limitation) |
| premium_type<sup>1</sup> | ?integer | [Premium type](#premium-types), `0` while premium is not active |
| premium_since<sup>1</sup> | ?ISO8601 timestamp | When premium started, or null while premium is not active |
| premium_until<sup>1</sup> | ?ISO8601 timestamp | When the current premium period ends, or null |
| premium_will_cancel<sup>1</sup> | boolean | Whether the premium subscription cancels at the end of the period |
| premium_billing_cycle<sup>1</sup> | ?string | The premium billing cycle, or null |
| premium_lifetime_sequence<sup>1</sup> | ?integer | The lifetime premium sequence number, or null |
| premium_grace_ends_at<sup>1</sup> | ?ISO8601 timestamp | When premium access ends after `premium_until` passes, or null |
| premium_discriminator<sup>1</sup> <sup>4</sup> | boolean | Whether the discriminator was picked with premium |
| hidden_profile_badges<sup>1</sup> | array[string] | The [badge keys](#hiding-badges) hidden from other people, sorted |
| premium_badge_hidden<sup>1</sup> | boolean | Deprecated. Whether the premium badge the account holds is in the hidden list |
| premium_badge_masked<sup>1</sup> | boolean | Whether a lifetime badge shows as a subscription badge |
| premium_badge_timestamp_hidden<sup>1</sup> | boolean | Whether the premium start date is hidden from the profile |
| premium_badge_sequence_hidden<sup>1</sup> | boolean | Deprecated. Whether the Visionary ID is in the hidden list |
| premium_purchase_disabled<sup>1</sup> | boolean | Whether buying premium is turned off for the account |
| premium_enabled_override<sup>1</sup> | boolean | Whether an admin override grants premium |
| premium_perks_disabled<sup>1</sup> | boolean | Whether premium is suspended for the account |
| password_last_changed_at<sup>1</sup> | ?ISO8601 timestamp | When the password last changed, or null |
| last_voice_activity_sharing_change_at<sup>1</sup> | ?ISO8601 timestamp | When voice activity sharing last changed for all friends (24-hour cooldown), or null |
| required_actions<sup>1</sup> | array[string] | Deprecated. Always empty |
| nsfw_allowed<sup>1</sup> | boolean | Whether the account can see age-restricted content |
| has_dismissed_premium_onboarding<sup>1</sup> | boolean | Whether premium onboarding was dismissed, false while premium is not active |
| has_ever_purchased<sup>1</sup> | boolean | Whether the account has bought anything |
| has_unread_gift_inventory<sup>1</sup> | boolean | Whether the gift inventory has unread items |
| unread_gift_inventory_count<sup>1</sup> | integer | The number of unread gift inventory items |
| pending_bulk_message_deletion<sup>1</sup> | ?[pending bulk message deletion](#pending-bulk-message-deletion-object) object | The scheduled deletion of all the account's messages, or null |
| age_verified_adult?<sup>1</sup> | boolean | Whether adult age verification is done, omitted when false |
| terms_agreed_at<sup>1</sup> | ?ISO8601 timestamp | When the account last accepted the terms, or null |
| privacy_agreed_at<sup>1</sup> | ?ISO8601 timestamp | When the account was last shown the current privacy policy, or null |
| claimed?<sup>1</sup> | boolean | Whether the account can sign in on another device with an email, a password or a passkey |
| account_tier?<sup>1</sup> | string | The [account tier](#account-tiers), `unclaimed`, `unverified` or `verified` |
| verification_need?<sup>1</sup> | ?string | `add_email`, `confirm_email` or `password` until the account is verified, then null |
| has_password?<sup>1</sup> | boolean | Whether the account has a password |
| date_of_birth_required?<sup>1</sup> <sup>3</sup> | boolean | Whether the account has to [set its date of birth](/http-api/users/current-user/#set-date-of-birth) first |
| profile_restricted?<sup>1</sup> | boolean | Whether other accounts see only the username and discriminator |

<sup>1</sup> With an OAuth2 bearer token on [Get current user](/http-api/users/current-user/#get-current-user), arrays are empty, optional fields are left out, booleans are false, nullable fields are null and `unread_gift_inventory_count` is `0`

<sup>2</sup> With an OAuth2 bearer token that lacks the `email` [scope](/http-api/oauth2/#oauth2-scopes), `email` is null and `verified` is false

<sup>3</sup> When the [accounts configuration](/admin-api/instance/#accounts-configuration-object) enforces it, most routes return 403 `DATE_OF_BIRTH_REQUIRED` until the date is set

<sup>4</sup> After premium ends, a `random` tag-style instance gives the account a new discriminator at its next Gateway session

## Pending bulk message deletion object

A deletion you scheduled through [Request bulk message deletion](/http-api/users/content/#request-bulk-message-deletion) that hasn't run yet.

### Structure

| Field | Type | Description |
| --- | --- | --- |
| scheduled_at | ISO8601 timestamp | When the deletion runs |
| channel_count | integer | The number of channels with messages to delete, counted when it was scheduled |
| message_count | integer | The number of messages to delete, counted when it was scheduled |

## Authenticator types

These are the values in `authenticator_types`. `WEBAUTHN` appears only after [Set WebAuthn two-factor authentication](/http-api/users/mfa/#set-webauthn-two-factor-authentication) turns on passkeys as a second factor, and registering a passkey alone doesn't add it.

| Value | Name | Description |
| --- | --- | --- |
| 0 | TOTP | Time-based one-time password authenticator |
| 2 | WEBAUTHN | WebAuthn authenticator |

## Premium types

| Value | Name | Description |
| --- | --- | --- |
| 0 | NONE | No premium |
| 1 | SUBSCRIPTION | Premium subscription |
| 2 | LIFETIME | Lifetime premium |

## Account limitation

An account is limited while `account_limited` is true. It can still read, join voice, change its own settings and manage its sessions, but these routes return 403 `ACCOUNT_LIMITED`.

- [Create message](/http-api/messages/#create-message) and [Modify message](/http-api/messages/#modify-message), except in personal notes
- [Start thread from message](/http-api/threads/#start-thread-from-message) and [Start thread](/http-api/threads/#start-thread)
- [Crosspost message](/http-api/messages/#crosspost-message)
- [Add own reaction](/http-api/messages/#add-own-reaction)
- [Create webhook](/http-api/webhooks/#create-webhook)
- [Accept invite](/http-api/invites/#accept-invite) and [Join discovery guild](/http-api/discovery/#join-discovery-guild), unless the account is already a member
- [Create guild](/http-api/guilds/#create-guild)
- Creating a group DM with [Create private channel](/http-api/users/private-channels/#create-private-channel), and [Add group direct message recipient](/http-api/channels/#add-group-direct-message-recipient)
- Changing a profile field with [Modify current user](/http-api/users/current-user/#modify-current-user) or [Modify current guild member](/http-api/guild-members/#modify-current-guild-member)
- Setting a custom status with [Modify current user settings](/http-api/users/settings/#modify-current-user-settings) or a [presence update](/gateway/commands/#presence-update)
- [Initiate connection](/http-api/connections/#initiate-connection), [Verify and create connection](/http-api/connections/#verify-and-create-connection) and [Start Bluesky authorization](/http-api/connections/#start-bluesky-authorization)
- [Upload entrance sound](/http-api/entrance-sounds/#upload-entrance-sound) and [Set entrance sound selection](/http-api/entrance-sounds/#set-entrance-sound-selection)

## Account tiers

An account is unclaimed while it has no email address, unverified while its email address isn't confirmed and verified otherwise. When the `account_identity` [feature](/http-api/instance/#instance-features-object) is `username`, an account with a password or a passkey is verified and one without is unclaimed. On an instance that sends no email, or whose `verification_basis` is `local_credential`, an account with an email address follows the same rule. Bots, system accounts and single sign-on accounts are always verified.

`interaction_tier` in the [accounts configuration](/admin-api/instance/#accounts-configuration-object) sets how strict the tiers are. When it is `enforced`, an account that isn't verified can read, edit its own profile and settings, write personal notes and join communities, but can't do most things that involve other people.

A denial that has its own code returns it, such as `UNCLAIMED_ACCOUNT_CANNOT_SEND_MESSAGES` or `EMAIL_VERIFICATION_REQUIRED`. Every other denial returns 403 `ACCOUNT_VERIFICATION_REQUIRED`, and so does every denial for an account whose `verification_need` is `password`. That [error response](/http-api/#error-response) has `action`, `tier` and `need`, and `action` is one of the values below.

| Action | Operations |
| --- | --- |
| `message` | Create, modify or crosspost a message, or start a thread |
| `typing` | Trigger the typing indicator |
| `reaction` | Add a reaction |
| `direct_message` | Send a DM |
| `direct_message_open` | Open a DM |
| `group_dm` | Create or join a group DM |
| `friend_request` | Send a friend request |
| `friend_accept` | Accept a friend request |
| `invite_create` | Create an invite |
| `guild_join` | Accept an invite or join a discovery guild |
| `guild_create` | Create a guild |
| `voice` | Join a voice channel |
| `call` | Start or ring a call in a DM |
| `group_call` | Start or join a call in a group DM |
| `thread_join` | Join a thread |
| `channel_follow` | Follow an announcement channel |
| `ownership_transfer` | Receive guild ownership |
| `application_create` | Create an application |
| `gift_redeem` | Redeem a gift, for unclaimed accounts only |
| `profile_customize` | Change a profile field |
| `report` | Submit a report |
| `mfa` | Turn on two-factor authentication or regenerate backup codes |
| `guild_verification` | Talk in a guild that requires a verified email |

`guild_join` applies only to accounts assigned [guild visits](/admin-api/instance/#guild-visits-configuration-object), and never while the instance sets `guild_join_gate` to `off`. With `visits_capable`, it applies only to clients that send the `X-Fluxer-Capabilities: guild_visits` header.

## Profile field privacy flags

These are the values in `timezone_privacy_flags`, and a field with flags `0` is hidden from everyone, including the owner.

| Value | Name | Description |
| --- | --- | --- |
| 1 &lt;&lt; 0 | EVERYONE | Anyone who can see the full profile can see the field |
| 1 &lt;&lt; 1 | FRIENDS | Friends can see the field |
| 1 &lt;&lt; 2 | MUTUAL_GUILDS | Members of a mutual guild can see the field |

## User settings object

The account-wide settings, returned by [Get current user settings](/http-api/users/settings/) and [Modify current user settings](/http-api/users/settings/#modify-current-user-settings) and sent in the [Ready](/gateway/events/#ready-object) and [User Settings Update](/gateway/events/#user-settings-update) events. Every field is always present.

### Structure

| Field | Type | Description |
| --- | --- | --- |
| status | string | [Presence status](/http-api/users/settings/#presence-status-values) |
| status_resets_at | ?ISO8601 timestamp | When the status resets, or null |
| status_resets_to | ?string | The [presence status](/http-api/users/settings/#presence-status-values) to reset to, or null |
| theme | string | [Theme value](/http-api/users/settings/#theme-values) |
| locale | string | The interface [locale](/topics/locales/#supported-locales) |
| restricted_guilds | array[snowflake] | The guilds where DMs from members are restricted |
| bot_restricted_guilds | array[snowflake] | The guilds where DMs from bots are restricted |
| default_guilds_restricted | boolean | Whether newly joined guilds restrict DMs from members |
| bot_default_guilds_restricted | boolean | Whether newly joined guilds restrict DMs from bots |
| inline_attachment_media | boolean | Whether attachment media shows inline |
| inline_embed_media | boolean | Whether embed media shows inline |
| gif_auto_play | boolean | Whether GIFs play automatically |
| render_embeds | boolean | Whether embeds show |
| render_reactions | boolean | Whether reactions show |
| animate_emoji | boolean | Whether custom emoji animate |
| animate_stickers | integer | [Sticker animation setting](#sticker-animation-settings) |
| render_spoilers | integer | [Spoiler rendering setting](#spoiler-rendering-settings) |
| message_display_compact | boolean | Whether messages use compact display |
| friend_source_flags | integer | [Friend source flags](#friend-source-flags) |
| incoming_call_flags | integer | [Incoming call flags](#incoming-call-flags) |
| group_dm_add_permission_flags | integer | [Group DM add permission flags](#group-dm-add-permission-flags) |
| guild_folders | array[[guild folder](#guild-folder-object) object] | The guild sidebar layout |
| custom_status | ?[custom status](#custom-status-object) object | The custom status, or null |
| afk_timeout | integer | Idle seconds before the account shows as away |
| time_format | integer | [Time format setting](#time-format-settings) |
| developer_mode | boolean | Whether developer mode is on |
| trusted_domains | array[string] | The trusted link domains, or `*` alone to trust all |
| default_hide_muted_channels | boolean | Whether newly joined guilds hide muted channels |
| sensitive_content_friend_dm_filter | integer | [Sensitive media filter](#sensitive-media-filters) for DMs from friends |
| sensitive_content_non_friend_dm_filter | integer | [Sensitive media filter](#sensitive-media-filters) for DMs from others |
| sensitive_content_guild_filter | integer | [Guild sensitive media filter](#guild-sensitive-media-filters) |
| allow_mature_content_on_ios | boolean | Whether the iOS app allows 18+ communities, channels and the "Show" media option. Only adults can turn it on |
| suppress_unprivileged_self_mentions<sup>1</sup> | boolean | Whether direct and reply mentions from unprivileged users are suppressed |
| suppress_unprivileged_self_mentions_bypass_user_ids<sup>1</sup> | array[snowflake] | The users exempt from mention suppression |
| staff_dm_access_user_ids<sup>1</sup> | array[snowflake] | The users granted staff DM access |
| synced_preferences | string | Base64 [synced preferences](/http-api/users/settings-protobuf/) for clients (512 KiB decoded), empty if never synced |
| profile_privacy | integer | [Profile privacy level](#profile-privacy-levels) |
| default_share_voice_activity | boolean | Whether new friends start with voice activity sharing on, set through [Modify voice activity sharing](/http-api/users/settings/#modify-voice-activity-sharing) |
| privacy_setup_version | integer | The latest privacy setup version the account reviewed, or 0 |
| privacy_setup_completed_at | ?ISO8601 timestamp | When the account last finished the privacy setup, or null |

<sup>1</sup> Only staff accounts can set it. A settings update from any other account sets it to false or empty

## Custom status object

The text and emoji set as the account's status.

### Structure

| Field | Type | Description |
| --- | --- | --- |
| text | ?string | The status text (1-128 characters), or null |
| expires_at? | ISO8601 timestamp | When the status expires, omitted when it doesn't |
| emoji_id? | snowflake | The ID of the custom emoji, omitted for none |
| emoji_name | ?string | The custom emoji name, a Unicode emoji, or null |
| emoji_animated | boolean | Whether the custom emoji is animated |

### Example

```json
{
  "text": "shipping",
  "expires_at": "2026-03-04T18:00:00.000Z",
  "emoji_id": "1501314428688998182",
  "emoji_name": "party_parrot",
  "emoji_animated": true
}
```

## Guild folder object

A folder in the guild sidebar. When you join a guild, Fluxer adds it to the start of the uncategorized folder, and when you leave one, Fluxer removes it and deletes any other folder it leaves empty.

### Structure

| Field | Type | Description |
| --- | --- | --- |
| id | ?integer | The ID of the folder, `-1` for the uncategorized folder |
| name | ?string | The folder name, or null |
| color | ?integer | The folder color as 24-bit RGB, or null |
| flags | integer | [Guild folder flags](#guild-folder-flags) |
| icon | string | [Guild folder icon](#guild-folder-icons) |
| guild_ids | array[snowflake] | The guild IDs in sidebar order. A guild can appear in only one folder |

### Example

```json
{
  "id": -1,
  "name": null,
  "color": null,
  "flags": 0,
  "icon": "folder",
  "guild_ids": ["1501314428688998182", "1501314428688998183"]
}
```

## Guild folder flags

| Value | Name | Description |
| --- | --- | --- |
| 1 &lt;&lt; 0 | SHOW_ICON_WHEN_COLLAPSED | Show the icon instead of guild previews while collapsed |

## Guild folder icons

| Value | Description |
| --- | --- |
| folder | Folder icon, the default |
| star | Star icon |
| heart | Heart icon |
| bookmark | Bookmark icon |
| game_controller | Game controller icon |
| shield | Shield icon |
| music_note | Music note icon |

## Sticker animation settings

| Value | Name | Description |
| --- | --- | --- |
| 0 | ALWAYS_ANIMATE | Always animate stickers |
| 1 | ANIMATE_ON_INTERACTION | Animate stickers on interaction |
| 2 | NEVER_ANIMATE | Never animate stickers |

## Spoiler rendering settings

| Value | Name | Description |
| --- | --- | --- |
| 0 | ALWAYS | Always show spoilers |
| 1 | ON_CLICK | Show spoilers on click |
| 2 | IF_MODERATOR | Show spoilers to moderators |

## Time format settings

| Value | Name | Description |
| --- | --- | --- |
| 0 | AUTO | Use the locale's time format |
| 1 | TWELVE_HOUR | Use a 12-hour clock |
| 2 | TWENTY_FOUR_HOUR | Use a 24-hour clock |

## Sensitive media filters

| Value | Name | Description |
| --- | --- | --- |
| 0 | SHOW | Show sensitive media |
| 1 | BLUR | Blur sensitive media until revealed |
| 2 | BLOCK | Hide sensitive media |

## Guild sensitive media filters

| Value | Name | Description |
| --- | --- | --- |
| 0 | SHOW | Show sensitive media |
| 1 | BLUR | Blur sensitive media until revealed |

## Profile privacy levels

Profile privacy never applies to bots or to your own profile.

| Value | Name | Description |
| --- | --- | --- |
| 0 | ALL_GUILDS | Friends and members of any mutual guild can see the full profile |
| 1 | SMALL_GUILDS_ONLY | Friends and members of a mutual guild with at most 200 members can see the full profile |
| 2 | FRIENDS_ONLY | Only friends can see the full profile |

## Friend source flags

| Value | Name | Description |
| --- | --- | --- |
| 1 &lt;&lt; 0 | MUTUAL_FRIENDS | Accept requests from users with mutual friends |
| 1 &lt;&lt; 1 | MUTUAL_GUILDS | Accept requests from users in mutual guilds |
| 1 &lt;&lt; 2 | NO_RELATION | Accept requests from anyone |

## Incoming call flags

When both `FRIENDS_ONLY` and `NOBODY` are set, `FRIENDS_ONLY` applies.

| Value | Name | Description |
| --- | --- | --- |
| 1 &lt;&lt; 0 | FRIENDS_OF_FRIENDS | Allow calls from friends of friends |
| 1 &lt;&lt; 1 | GUILD_MEMBERS | Allow calls from guild members |
| 1 &lt;&lt; 2 | EVERYONE | Allow calls from everyone |
| 1 &lt;&lt; 3 | FRIENDS_ONLY | Allow calls only from friends |
| 1 &lt;&lt; 4 | NOBODY | Reject all incoming calls |
| 1 &lt;&lt; 5 | SILENT_EVERYONE | Receive allowed calls silently |

## Group DM add permission flags

When `FRIENDS_ONLY` is set it applies over `NOBODY`, and `NOBODY` applies over `EVERYONE`.

| Value | Name | Description |
| --- | --- | --- |
| 1 &lt;&lt; 0 | FRIENDS_OF_FRIENDS | Friends of friends can add the user |
| 1 &lt;&lt; 1 | GUILD_MEMBERS | Guild members can add the user |
| 1 &lt;&lt; 2 | EVERYONE | Everyone can add the user |
| 1 &lt;&lt; 3 | FRIENDS_ONLY | Only friends can add the user |
| 1 &lt;&lt; 4 | NOBODY | Nobody can add the user |

## User profile object

The account-wide profile inside a [full user profile object](#full-user-profile-object). Every field is null when the target's profile is hidden, or when its `profile_restricted` is true and you aren't the target.

### Structure

| Field | Type | Description |
| --- | --- | --- |
| bio | ?string | The biography, or null |
| pronouns | ?string | The pronouns, or null |
| banner | ?string | The profile banner hash, or null |
| banner_color | ?integer | The 24-bit RGB color taken from the banner, or null |
| accent_color | ?integer | The accent color as 24-bit RGB, or null |

## Guild member profile object

The target's profile in the guild from the `guild_id` query parameter.

### Structure

| Field | Type | Description |
| --- | --- | --- |
| bio | ?string | The guild biography, or null |
| pronouns | ?string | The guild pronouns, or null |
| banner | ?string | The guild banner hash, or null |
| accent_color | ?integer | The guild accent color as 24-bit RGB, or null |

## Mutual guild object

A guild that both you and the target are in.

### Structure

| Field | Type | Description |
| --- | --- | --- |
| id | snowflake | The ID of the guild |
| nick | ?string | The target's nickname in the guild, or null |

## Full user profile object

Returned by [Get user profile](#get-user-profile). When profile privacy restricts you, `profile_limited` is true and `bio` and `pronouns` are null in both profile objects.

### Structure

| Field | Type | Description |
| --- | --- | --- |
| user | [partial user](#partial-user-object) object | The target account |
| user_profile | [user profile](#user-profile-object) object | The account-wide profile |
| guild_member?<sup>1</sup> | [guild member](/http-api/guild-members/#guild-member-object) object | The target's membership in the requested guild |
| guild_member_profile?<sup>1</sup> | [guild member profile](#guild-member-profile-object) object | The target's profile in the requested guild |
| premium_type?<sup>2</sup> | integer | The target's [premium type](#premium-types) |
| premium_since?<sup>2</sup> | ISO8601 timestamp | When the target's premium started |
| premium_lifetime_sequence?<sup>2</sup> | integer | The target's lifetime premium sequence number |
| profile_badges | array[[profile badge](#profile-badge-object) object] | The badges to show, in order |
| hidden_profile_badge_count?<sup>5</sup> | integer | How many badges you hold that are [hidden](#hiding-badges) |
| mutual_friends?<sup>3</sup> | array[[partial user](#partial-user-object) object] | Your mutual friends with the target |
| mutual_guilds?<sup>3</sup> | array[[mutual guild](#mutual-guild-object) object] | The guilds you and the target share |
| connected_accounts<sup>4</sup> | array[[connection](/http-api/connections/#connection-object) object] | The target's verified connections you can see |
| timezone_offset<sup>4</sup> | ?integer | The target's timezone offset from UTC in minutes, or null |
| profile_limited? | boolean | Present and true when profile privacy restricts you |

<sup>1</sup> Only with `guild_id` when both you and the target are members of that guild

<sup>2</sup> Left out when the profile is restricted or the target hides the badge, date or sequence. Use `profile_badges` to show badges

<sup>3</sup> Only when the matching `with_` query parameter is true, and never for your own profile

<sup>4</sup> Empty or null when the profile is restricted or the target's [profile field privacy flags](#profile-field-privacy-flags) don't include you

<sup>5</sup> Only on your own profile

## Profile badge object

One badge on a [full user profile](#full-user-profile-object). The API picks the badges, their order and their text, and clients show the list as it comes.

### Structure

| Field | Type | Description |
| --- | --- | --- |
| key | string | The badge's identity, equal to `kind` for built-in badges and `custom:{id}` for a custom badge. Use it as the list key |
| kind<sup>1</sup> | string | The badge type |
| label | string | The badge description in your locale, for the tooltip and alt text. A custom badge uses its name |
| asset<sup>2</sup> | ?string | The hex hash of the badge image, or null for a text badge, a custom badge or a replaced built-in image |
| asset_url<sup>3</sup> | ?string | The image URL of a custom badge or a built-in badge with a replaced image, or null for other badges |
| aspect_ratio | ?number | Image width divided by height, or null for a square badge |
| caption | ?string | Short text the badge stands for, shown in place of the image when `asset` is null |
| href | ?string | The URL a click opens, or null |
| small_asset? | string | The image hash to use at 20 pixels and smaller |
| count? | ?integer | A number shown with the badge, or null |
| accessible_label? | ?string | The label for screen readers, used in place of `label` |
| details?<sup>4</sup> | ?[badge details](#badge-details-object) object | A richer tooltip with the badge art, `title` and `lines`. Without it, `label` is the tooltip |

<sup>1</sup> Known values are `staff`, `premium` and `custom`. Render any other kind from its other fields

<sup>2</sup> The image is at `{static_cdn}/badges/{asset}.webp`, with `static_cdn` from [instance discovery](/http-api/instance/), and square badges also have a `.png`. Hashed files never change

<sup>3</sup> A WebP image from the media proxy. Add a `size` query parameter to get it at the size you draw it

<sup>4</sup> A custom badge with a description has one, with the name as `title` and the description as its only line

### Badge details object

| Field | Type | Description |
| --- | --- | --- |
| title | string | The first line under the badge art |
| lines | array[string] | The other lines, in order |

### Visibility

Your own profile follows the same rules and shows what other people see. `label` uses your stored locale, then `Accept-Language`, then `en-US`.

| Condition | Effect |
| --- | --- |
| The target is hidden or under enforcement | The list is empty |
| The profile is restricted for you | Only `staff` and custom badges remain |
| The target [hides a badge](#hiding-badges) | That badge is dropped |
| The target hides the premium start date | The premium label has no date |

### Hiding badges

Every badge an account holds can be hidden from other people. The account's `hidden_profile_badges` lists the keys of the hidden badges, using the same values as `key`, and [Modify current user](/http-api/users/current-user/#modify-current-user) replaces it. A built-in badge's key is its `kind`, and a custom badge's key is `custom:{id}`.

| Key | Badge |
| --- | --- |
| `staff` | Staff |
| `partner` | Partner |
| `bug_hunter` | Bug Hunter |
| `operator_pass` | Operator Pass |
| `visionary` | Visionary |
| `visionary_number` | Visionary ID, which also needs `visionary` shown |
| `plutonium` | Plutonium subscription |
| `premium` | Premium on a self-hosted instance |
| `custom:{id}` | A custom badge |

A hidden badge is dropped from `profile_badges`. Hiding `staff`, `partner` or `bug_hunter` also clears that bit from the account's `flags` in every user object other people get. Hiding the key of the premium badge the account holds drops that badge even when a Visionary badge is masked as a subscription, and leaves the premium fields out of the full profile.

Staff in the [Admin API](/admin-api/users/#admin-profile-badge-object) still see every badge, with hidden ones marked.

## Get user

<RouteHeader method="GET" path="/v1/users/{user_id}" bot />

Returns a [partial user](#partial-user-object) object for any account, with no relationship needed. A deleted account comes back in its [deleted form](#partial-user-object).

### Response

| Status | Body | Condition |
| --- | --- | --- |
| 200 | [partial user](#partial-user-object) object | The user was returned |
| 404 | [error response](/http-api/#error-response) | `UNKNOWN_USER` when the ID was never used |

The rate limit is 100 requests per 10 seconds, on the `user:read::user_id` bucket.

## Get user profile

<RouteHeader method="GET" path="/v1/users/{target_id}/profile" bot />

Returns a [full user profile](#full-user-profile-object) object. To get the profile of another account that isn't a bot, you need a friendship, a pending friend request, a shared guild or a shared group DM with it. Profile privacy can still [restrict the fields](#full-user-profile-object) you get.

### Query parameters

| Field | Type | Description |
| --- | --- | --- |
| guild_id? | snowflake | The guild to include member and guild profile objects for |
| with_mutual_friends? | boolean | Whether to include mutual friends (default false) |
| with_mutual_guilds? | boolean | Whether to include mutual guilds (default false) |

### Response

| Status | Body | Condition |
| --- | --- | --- |
| 200 | [full user profile](#full-user-profile-object) object | The profile was returned |
| 403 | [error response](/http-api/#error-response) | `MISSING_ACCESS` when you share no relationship with the target |
| 404 | [error response](/http-api/#error-response) | `UNKNOWN_USER` when the target doesn't exist |

The rate limit is 100 requests per 10 seconds, on the `user:profile::target_id` bucket.

## Check user tag

<RouteHeader method="GET" path="/v1/users/check-tag" bot />

Returns whether another account already uses a username and discriminator. Usernames compare without case and discriminators compare as numbers, with `7` matching `0007`, and your own tag returns `false`. When the `tag_style` [feature](/http-api/instance/#instance-features-object) is `none`, the discriminator is ignored unless you are a bot.

### Query parameters

| Field | Type | Description |
| --- | --- | --- |
| username | string | The username (1-32 ASCII letters, digits or underscores) |
| discriminator | string | The discriminator (1-4 digits) |

### Response body

| Field | Type | Description |
| --- | --- | --- |
| taken | boolean | Whether the tag is taken |

### Response

| Status | Body | Condition |
| --- | --- | --- |
| 200 | response body | The result was returned |
| 400 | [error response](/http-api/#error-response) | `INVALID_FORM_BODY` when `username` is reserved (`USERNAME_RESERVED_VALUE` or `USERNAME_CANNOT_CONTAIN_RESERVED_TERMS`) |

The rate limit is 60 requests per 10 seconds, on the `user:check_tag` bucket.