Interface User

Represents a Modrinth user.

interface User {
    auth_providers: null | string[];
    avatar_url: string;
    badges: number;
    bio: string;
    created: string;
    email: null | string;
    email_verified: null | boolean;
    github_id: null | number;
    has_password: null | boolean;
    has_totp: null | boolean;
    id: string;
    name: null | string;
    payout_data: null | PayoutData;
    role: string;
    username: string;
}

Properties

auth_providers: null | string[]

A list of authentication providers you have signed up for (only displayed if requesting your own account)

avatar_url: string

The user’s avatar url

badges: number

Any badges applicable to this user. These are currently unused and undisplayed, and as such are subject to change In order from first to seventh bit, the current bits are:

  • (unused)
  • EARLY_MODPACK_ADOPTER
  • EARLY_RESPACK_ADOPTER
  • EARLY_PLUGIN_ADOPTER
  • ALPHA_TESTER
  • CONTRIBUTOR
  • TRANSLATOR
bio: string

A description of the user

created: string

The time at which the user was created

email: null | string

The user’s email (only displayed if requesting your own account). Requires USER_READ_EMAIL PAT scope.

email_verified: null | boolean

Whether your email is verified (only displayed if requesting your own account)

github_id: null | number

This is no longer public for security reasons and is always null

has_password: null | boolean

Whether you have a password associated with your account (only displayed if requesting your own account)

has_totp: null | boolean

Whether you have TOTP two-factor authentication connected to your account (only displayed if requesting your own account)

id: string

The user’s ID

name: null | string

The user’s display name

payout_data: null | PayoutData

Various data relating to the user’s payouts status (you can only see your own)

role: string

The user’s role

username: string

The user’s username