---
title: "Get user info"
method: GET
path: "/api/whoami-v2"
tags: ["auth"]
---

# Get user info

`GET /api/whoami-v2`

Get information about the user and auth method used

## Response `200`

Auth information

- object
  - `auth` object, required
    - `type` string, required
    - `accessToken` object
      - `displayName` string, required
      - `role` 'read' | 'write' | 'god' | 'fineGrained', required
      - `fineGrained` object
        - `scoped` object[], required
          - `entity` object, required
            - `_id` string, required — A hex string of 24 characters representing an ObjectId.
            - `name` string
            - `type` 'dataset' | 'model' | 'space' | 'bucket' | 'kernel' | 'container' | 'collection' | 'org' | 'user' | 'resource-group' | 'oauth-app', required
          - `permissions` string[], required
        - `global` string[]
        - `canReadGatedRepos` boolean — Allow access to all public gated repos to which the user has access
      - `createdAt` string, date-time, required
    - `expiresAt` string, date-time
    - `resource` object
      - `sub` string, required
  - `type` 'user', required
  - `id` string, required
  - `name` string, required
  - `fullname` string, required
  - `email` string, nullable
  - `canPay` boolean
  - `billingMode` 'prepaid' | 'postpaid'
  - `avatarUrl` string, required
  - `periodEnd` number, nullable
  - `emailVerified` boolean
  - `isPro` boolean, required
  - `orgs` object[], required
    - `type` 'org', required
    - `id` string, required
    - `name` string, required
    - `fullname` string, required
    - `email` string, nullable
    - `canPay` boolean
    - `billingMode` 'prepaid' | 'postpaid'
    - `avatarUrl` string, required
    - `periodEnd` number, nullable
    - `plan` 'team' | 'enterprise' | 'plus' | 'academia'
    - `roleInOrg` 'admin' | 'write' | 'contributor' | 'read' | 'no_access'
    - `securityRestrictions` string[] — Current security restrictions for accessing data in this organization with current authentication method
    - `resourceGroups` object[]
      - `id` string, required — A hex string of 24 characters representing an ObjectId.
      - `name` string, required
      - `role` 'admin' | 'write' | 'contributor' | 'read' | 'no_access', required

## Changes

- **2026-09-18** `74f2b0d17636` — 1 warning
  - added the new `container` enum value to the `anyOf[subschema #1]/auth/accessToken/fineGrained/scoped/items/entity/type` response property for the response status `200`
- **2026-09-08** `bd17546f47b8` — 15 breaking, 6 info
  - the response property `anyOf[subschema #1]/email` became nullable for the status `200`
  - the response property `anyOf[subschema #1]/orgs/items/email` became nullable for the status `200`
  - the response property `anyOf[subschema #1]/orgs/items/periodEnd` became nullable for the status `200`
  - the response property `anyOf[subschema #1]/periodEnd` became nullable for the status `200`
  - …17 more
- **2026-08-13** `99cb19038135` — 10 warning, 2 info
  - added the new `admin` enum value to the `anyOf[subschema #1]/orgs/items/resourceGroups/items/role` response property for the response status `200`
  - added the new `admin` enum value to the `anyOf[subschema #1]/orgs/items/roleInOrg` response property for the response status `200`
  - added the new `contributor` enum value to the `anyOf[subschema #1]/orgs/items/resourceGroups/items/role` response property for the response status `200`
  - added the new `contributor` enum value to the `anyOf[subschema #1]/orgs/items/roleInOrg` response property for the response status `200`
  - …8 more
- …earlier changes not shown

[Full history](https://skmtc.dev/huggingface/apis/hub-api-endpoints/changes/api/whoami-v2/get.md)

---

[API](https://skmtc.dev/huggingface/apis/hub-api-endpoints.md) · [All operations](https://skmtc.dev/huggingface/apis/hub-api-endpoints/llms.txt) · [OpenAPI document](https://skmtc.dev/huggingface/apis/hub-api-endpoints/revisions/b88d4a4da99f?raw)
