---
title: "Get user info"
method: POST
path: "/oauth/userinfo"
tags: ["oauth"]
---

# Get user info

`POST /oauth/userinfo`

Get information about the user. Only available through oauth access tokens. Information varies depending on the scope of the oauth app and what permissions the user granted to the oauth app.

## Response `200`

User info

- object
  - `sub` string, required — ID of the user
  - `name` string — Full name of the user
  - `preferred_username` string — Username of the user
  - `profile` string, uri — Profile URL of the user
  - `picture` string, uri — Avatar URL of the user
  - `website` string, uri — Website of the user
  - `email` string — Email of the user
  - `email_verified` boolean — Whether the email is verified
  - `hardwareItems` object[] — The user's hardware items, if the `profile` scope is granted and the user did not set them as private
    - `sku` unknown[], required — Hardware SKU as [type, vendor, model]
      - unknown
    - `mem` number, required — Memory in GB
    - `num` number, required — Number of units
    - `isPrimary` unknown
  - `isPro` boolean, required — Whether the user is a Pro user
  - `canPay` boolean — Whether the user has access to billing. You should check `canPay` first.
  - `billingMode` 'prepaid' | 'postpaid' — Whether the user is on prepaid or postpaid billing
  - `orgs` object[], required
    - `sub` string, required — ID of the organization
    - `name` string, required — Name of the organization
    - `picture` string, uri, required — Avatar URL of the organization
    - `preferred_username` string, required — Username of the organization
    - `plan` 'team' | 'enterprise' | 'plus' | 'academia'
    - `canPay` boolean
    - `billingMode` 'prepaid' | 'postpaid'
    - `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[]
      - `sub` 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/6ab9f7d9cfb5/schema)
