---
title: User Details
---

[Skip to content](#%5Ftop) 

[API Reference](https://developers.cloudflare.com/api/typescript)

[User](https://developers.cloudflare.com/api/typescript/resources/user)

Copy Markdown

Open in **Claude**

Open in **ChatGPT**

Open in **Cursor**

---

**Copy Markdown**

**View as Markdown**

# User Details

client.user.get(RequestOptionsoptions?): [UserGetResponse](https://developers.cloudflare.com/api/typescript/resources/user#%28resource%29%20user%20%3E%20%28model%29%20user%5Fget%5Fresponse%20%3E%20%28schema%29) { id, email, betas, 12 more } 

GET/user

Retrieves detailed information about the currently authenticated user, including email, name, and account memberships.

##### Security

API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

**Example:**`X-Auth-Email: user@example.com`

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

**Example:**`X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194`

##### Accepted Permissions (at least one required)

`User Details Write` `User Details Read`

##### ReturnsExpand Collapse 

UserGetResponse { id, email, betas, 12 more } 

id: string

Identifier of the user.

email: string

Current email address of the user.

formatemail

betas?: Array<string\>

Lists the betas that the user is participating in.

country?: string | null

The country in which the user lives.

maxLength30

first\_name?: string | null

User’s first name

maxLength60

has\_business\_zones?: boolean

Indicates whether user has any business zones

has\_enterprise\_zones?: boolean

Indicates whether user has any enterprise zones

has\_pro\_zones?: boolean

Indicates whether user has any pro zones

last\_name?: string | null

User’s last name

maxLength60

organizations?: Array<[Organization](https://developers.cloudflare.com/api/typescript/resources/user#%28resource%29%20user.organizations%20%3E%20%28model%29%20organization%20%3E%20%28schema%29) { id, name, permissions, 2 more } \>

id?: string

Identifier

maxLength32

minLength32

name?: string

Organization name.

maxLength100

permissions?: Array<[Permission](https://developers.cloudflare.com/api/typescript/resources/$shared#%28resource%29%20%24shared%20%3E%20%28model%29%20permission%20%3E%20%28schema%29)\>

Access permissions for this User.

roles?: Array<string\>

List of roles that a user has within an organization.

status?: [Status](https://developers.cloudflare.com/api/typescript/resources/accounts#%28resource%29%20accounts.members%20%3E%20%28model%29%20status%20%3E%20%28schema%29)

Whether the user is a member of the organization or has an invitation pending.

One of the following:

"member"

"invited"

suspended?: boolean

Indicates whether user has been suspended

telephone?: string | null

User’s telephone number

maxLength20

two\_factor\_authentication\_enabled?: boolean

Indicates whether two-factor authentication is enabled for the user account. Does not apply to API authentication.

two\_factor\_authentication\_locked?: boolean

Indicates whether two-factor authentication is required by one of the accounts that the user is a member of.

zipcode?: string | null

The zipcode or postal code where the user lives.

maxLength20

### User Details

TypeScript

HTTPHTTP

TypeScriptTypeScript

PythonPython

GoGo

TerraformTerraform

```
import Cloudflare from 'cloudflare';

const client = new Cloudflare({
  apiEmail: process.env['CLOUDFLARE_EMAIL'], // This is the default and can be omitted
  apiKey: process.env['CLOUDFLARE_API_KEY'], // This is the default and can be omitted
});

const user = await client.user.get();

console.log(user.id);
```

200 example

```
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": {
    "id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1",
    "email": "alice@example.com",
    "betas": [
      "zone_level_access_beta"
    ],
    "country": "US",
    "first_name": "John",
    "has_business_zones": true,
    "has_enterprise_zones": true,
    "has_pro_zones": true,
    "last_name": "Appleseed",
    "organizations": [
      {
        "id": "023e105f4ecef8ad9ca31a8372d0c353",
        "name": "Cloudflare, Inc.",
        "permissions": [
          "#zones:read"
        ],
        "roles": [
          "All Privileges - Super Administrator"
        ],
        "status": "member"
      }
    ],
    "suspended": true,
    "telephone": "+1 123-123-1234",
    "two_factor_authentication_enabled": true,
    "two_factor_authentication_locked": true,
    "zipcode": "12345"
  }
}
```

##### Returns Examples

200 example

```
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": {
    "id": "6d7f2f5f5b1d4a0e9081fdc98d432fd1",
    "email": "alice@example.com",
    "betas": [
      "zone_level_access_beta"
    ],
    "country": "US",
    "first_name": "John",
    "has_business_zones": true,
    "has_enterprise_zones": true,
    "has_pro_zones": true,
    "last_name": "Appleseed",
    "organizations": [
      {
        "id": "023e105f4ecef8ad9ca31a8372d0c353",
        "name": "Cloudflare, Inc.",
        "permissions": [
          "#zones:read"
        ],
        "roles": [
          "All Privileges - Super Administrator"
        ],
        "status": "member"
      }
    ],
    "suspended": true,
    "telephone": "+1 123-123-1234",
    "two_factor_authentication_enabled": true,
    "two_factor_authentication_locked": true,
    "zipcode": "12345"
  }
}
```