---
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
            - `name` string
            - `type` 'dataset' | 'model' | 'space' | 'bucket' | 'kernel' | '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` union
      - 'admin' | 'write' | 'contributor' | 'read' | 'no_access'
      - string — Custom role name
    - `securityRestrictions` string[] — Current security restrictions for accessing data in this organization with current authentication method
    - `resourceGroups` object[]
      - `id` string, required
      - `name` string, required
      - `role` union, required
        - 'admin' | 'write' | 'contributor' | 'read' | 'no_access'
        - string — Custom role name

---

[API](https://skmtc.net/huggingface/apis/hub-api-endpoints.md) · [All operations](https://skmtc.net/huggingface/apis/hub-api-endpoints/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/huggingface/hub-api-endpoints/versions/2713a59ee753/schema)
