---
title: Get device (deprecated)
---

[Skip to content](#_top)

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

[Zero Trust](https://developers.cloudflare.com/api/python/resources/zero_trust)

[Devices](https://developers.cloudflare.com/api/python/resources/zero_trust/subresources/devices)

Copy Markdown

Open in **Claude**Open in **ChatGPT**Open in **Cursor**

---

**Copy Markdown****View as Markdown**

# Get device (deprecated)

Deprecated

zero\_trust.devices.get(strdevice\_id, DeviceGetParams\*\*kwargs) -> [DeviceGetResponse](<https://developers.cloudflare.com/api/python/resources/zero_trust#(resource)%20zero_trust.devices%20%3E%20(model)%20device_get_response%20%3E%20(schema)>)

GET/accounts/{account\_id}/devices/{device\_id}

Fetches a single WARP device. Not supported when [multi-user mode](https://developers.cloudflare.com/cloudflare-one/connections/connect-devices/warp/deployment/mdm-deployment/windows-multiuser/) is enabled for the account.

**Deprecated**: please use one of the following endpoints instead:

- GET /accounts/{account\_id}/devices/physical-devices/{device\_id}
- GET /accounts/{account\_id}/devices/registrations/{registration\_id}

##### Security

<details>

<summary>API Token</summary>



The preferred authorization scheme for interacting with the Cloudflare API. <a href="https://developers.cloudflare.com/fundamentals/api/get-started/create-token/">Create a token</a>.

**Example:**<code>Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY</code>

</details>

<details>

<summary>API Email + API Key</summary>



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

**Example:**<code>X-Auth-Email: user@example.com</code>

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

**Example:**<code>X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194</code>

</details>

##### ParametersExpand Collapse

account\_id: str

[Link to this property](<#(resource)%20zero_trust.devices%20%3E%20(method)%20get%20%3E%20(params)%20default%20%3E%20(param)%20account_id%20%3E%20(schema)>)

device\_id: str

Registration ID. Equal to Device ID except for accounts which enabled [multi-user mode](https://developers.cloudflare.com/cloudflare-one/connections/connect-devices/warp/deployment/mdm-deployment/windows-multiuser/).

maxLength36

[Link to this property](<#(resource)%20zero_trust.devices%20%3E%20(method)%20get%20%3E%20(params)%20default%20%3E%20(param)%20device_id%20%3E%20(schema)>)

##### ReturnsExpand Collapse

<details>

<summary>

class DeviceGetResponse: …

</summary>

id: Optional\[str]

Registration ID. Equal to Device ID except for accounts which enabled <a href="https://developers.cloudflare.com/cloudflare-one/connections/connect-devices/warp/deployment/mdm-deployment/windows-multiuser/">multi-user mode</a>.

maxLength36

<a href="#(resource)%20zero_trust.devices%20%3E%20(model)%20device_get_response%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

<details>

<summary>

account: Optional\[Account]

</summary>

Deprecatedid: Optional\[str]

<a href="#(resource)%20zero_trust.devices%20%3E%20(model)%20device_get_response%20%3E%20(schema)%20%3E%20(property)%20account%20%3E%20(property)%20id">Link to this property</a>

Deprecatedaccount\_type: Optional\[str]

<a href="#(resource)%20zero_trust.devices%20%3E%20(model)%20device_get_response%20%3E%20(schema)%20%3E%20(property)%20account%20%3E%20(property)%20account_type">Link to this property</a>

name: Optional\[str]

The name of the enrolled account.

<a href="#(resource)%20zero_trust.devices%20%3E%20(model)%20device_get_response%20%3E%20(schema)%20%3E%20(property)%20account%20%3E%20(property)%20name">Link to this property</a>

</details>

<a href="#(resource)%20zero_trust.devices%20%3E%20(model)%20device_get_response%20%3E%20(schema)%20%3E%20(property)%20account">Link to this property</a>

created: Optional\[datetime]

When the device was created.

formatdate-time

<a href="#(resource)%20zero_trust.devices%20%3E%20(model)%20device_get_response%20%3E%20(schema)%20%3E%20(property)%20created">Link to this property</a>

deleted: Optional\[bool]

True if the device was deleted.

<a href="#(resource)%20zero_trust.devices%20%3E%20(model)%20device_get_response%20%3E%20(schema)%20%3E%20(property)%20deleted">Link to this property</a>

device\_type: Optional\[str]

<a href="#(resource)%20zero_trust.devices%20%3E%20(model)%20device_get_response%20%3E%20(schema)%20%3E%20(property)%20device_type">Link to this property</a>

Deprecatedgateway\_device\_id: Optional\[str]

<a href="#(resource)%20zero_trust.devices%20%3E%20(model)%20device_get_response%20%3E%20(schema)%20%3E%20(property)%20gateway_device_id">Link to this property</a>

ip: Optional\[str]

IPv4 or IPv6 address.

<a href="#(resource)%20zero_trust.devices%20%3E%20(model)%20device_get_response%20%3E%20(schema)%20%3E%20(property)%20ip">Link to this property</a>

key: Optional\[str]

The device’s public key.

<a href="#(resource)%20zero_trust.devices%20%3E%20(model)%20device_get_response%20%3E%20(schema)%20%3E%20(property)%20key">Link to this property</a>

key\_type: Optional\[str]

Type of the key.

<a href="#(resource)%20zero_trust.devices%20%3E%20(model)%20device_get_response%20%3E%20(schema)%20%3E%20(property)%20key_type">Link to this property</a>

last\_seen: Optional\[datetime]

When the device last connected to Cloudflare services.

formatdate-time

<a href="#(resource)%20zero_trust.devices%20%3E%20(model)%20device_get_response%20%3E%20(schema)%20%3E%20(property)%20last_seen">Link to this property</a>

mac\_address: Optional\[str]

The device mac address.

<a href="#(resource)%20zero_trust.devices%20%3E%20(model)%20device_get_response%20%3E%20(schema)%20%3E%20(property)%20mac_address">Link to this property</a>

model: Optional\[str]

The device model name.

<a href="#(resource)%20zero_trust.devices%20%3E%20(model)%20device_get_response%20%3E%20(schema)%20%3E%20(property)%20model">Link to this property</a>

name: Optional\[str]

The device name.

<a href="#(resource)%20zero_trust.devices%20%3E%20(model)%20device_get_response%20%3E%20(schema)%20%3E%20(property)%20name">Link to this property</a>

os\_version: Optional\[str]

The operating system version.

<a href="#(resource)%20zero_trust.devices%20%3E%20(model)%20device_get_response%20%3E%20(schema)%20%3E%20(property)%20os_version">Link to this property</a>

serial\_number: Optional\[str]

The device serial number.

<a href="#(resource)%20zero_trust.devices%20%3E%20(model)%20device_get_response%20%3E%20(schema)%20%3E%20(property)%20serial_number">Link to this property</a>

tunnel\_type: Optional\[str]

Type of the tunnel connection used.

<a href="#(resource)%20zero_trust.devices%20%3E%20(model)%20device_get_response%20%3E%20(schema)%20%3E%20(property)%20tunnel_type">Link to this property</a>

updated: Optional\[datetime]

When the device was updated.

formatdate-time

<a href="#(resource)%20zero_trust.devices%20%3E%20(model)%20device_get_response%20%3E%20(schema)%20%3E%20(property)%20updated">Link to this property</a>

<details>

<summary>

user: Optional\[User]

</summary>

id: Optional\[str]

UUID.

maxLength36

<a href="#(resource)%20zero_trust.devices%20%3E%20(model)%20device_get_response%20%3E%20(schema)%20%3E%20(property)%20user%20%3E%20(property)%20id">Link to this property</a>

email: Optional\[str]

The contact email address of the user.

maxLength90

<a href="#(resource)%20zero_trust.devices%20%3E%20(model)%20device_get_response%20%3E%20(schema)%20%3E%20(property)%20user%20%3E%20(property)%20email">Link to this property</a>

name: Optional\[str]

The enrolled device user’s name.

<a href="#(resource)%20zero_trust.devices%20%3E%20(model)%20device_get_response%20%3E%20(schema)%20%3E%20(property)%20user%20%3E%20(property)%20name">Link to this property</a>

</details>

<a href="#(resource)%20zero_trust.devices%20%3E%20(model)%20device_get_response%20%3E%20(schema)%20%3E%20(property)%20user">Link to this property</a>

version: Optional\[str]

The WARP client version.

<a href="#(resource)%20zero_trust.devices%20%3E%20(model)%20device_get_response%20%3E%20(schema)%20%3E%20(property)%20version">Link to this property</a>

</details>

[Link to this property](<#(resource)%20zero_trust.devices%20%3E%20(model)%20device_get_response%20%3E%20(schema)>)

### Get device (deprecated)

Python

HTTPTypeScriptPythonGoTerraform

```
import os
from cloudflare import Cloudflare

client = Cloudflare(
    api_token=os.environ.get("CLOUDFLARE_API_TOKEN"),  # This is the default and can be omitted
)
device = client.zero_trust.devices.get(
    device_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
    account_id="699d98642c564d2e855e9661899b7252",
)
print(device.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"
      }
    }
  ],
  "result": {
    "id": "f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
    "account": {
      "id": "id",
      "account_type": "account_type",
      "name": "Company"
    },
    "created": "2017-06-14T00:00:00Z",
    "deleted": true,
    "device_type": "windows",
    "gateway_device_id": "PD33E90AXfafe14643cbbbc-4a0ed4fc8415Q",
    "ip": "1.1.1.1",
    "key": "yek0SUYoOQ10vMGsIYAevozXUQpQtNFJFfFGqER/BGc=",
    "key_type": "curve25519",
    "last_seen": "2017-06-14T00:00:00Z",
    "mac_address": "00-00-5E-00-53-00",
    "model": "MyPhone(pro-X)",
    "name": "My mobile device",
    "os_version": "10.0.0",
    "serial_number": "EXAMPLEHMD6R",
    "tunnel_type": "masque",
    "updated": "2017-06-14T00:00:00Z",
    "user": {
      "id": "f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
      "email": "user@example.com",
      "name": "John Appleseed"
    },
    "version": "1.0.0"
  },
  "success": true
}
```

##### 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"
      }
    }
  ],
  "result": {
    "id": "f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
    "account": {
      "id": "id",
      "account_type": "account_type",
      "name": "Company"
    },
    "created": "2017-06-14T00:00:00Z",
    "deleted": true,
    "device_type": "windows",
    "gateway_device_id": "PD33E90AXfafe14643cbbbc-4a0ed4fc8415Q",
    "ip": "1.1.1.1",
    "key": "yek0SUYoOQ10vMGsIYAevozXUQpQtNFJFfFGqER/BGc=",
    "key_type": "curve25519",
    "last_seen": "2017-06-14T00:00:00Z",
    "mac_address": "00-00-5E-00-53-00",
    "model": "MyPhone(pro-X)",
    "name": "My mobile device",
    "os_version": "10.0.0",
    "serial_number": "EXAMPLEHMD6R",
    "tunnel_type": "masque",
    "updated": "2017-06-14T00:00:00Z",
    "user": {
      "id": "f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
      "email": "user@example.com",
      "name": "John Appleseed"
    },
    "version": "1.0.0"
  },
  "success": true
}
```