---
name: "getDeviceProperty"
mode: "kit"
versionRequirements:
  - { name: "DeviceKit", version: "1.2.6" }
platform:
  - "iOS"
  - "Android"
async: true
---

## getDeviceProperty

> [VERSION] DeviceKit >= 1.2.6

> [PLATFORM] iOS, Android

> ⚡ **Supports Promise** — Returns a Promise when success / fail / complete callbacks are omitted.

### Description

Get device properties

### Parameters

| Property | Type | Required | Default | Since | Description |
| --- | --- | --- | --- | --- | --- |
| `deviceId` | `string` | Yes | - | `4.11.0` | deviceId Device ID. Supports cross-panel access to other devices' information; on the current panel, pass the current device's ID to fetch. |
| `dps` | `Record<string, Record<string, any>>` | No | - | `4.11.0` | dps |
| `complete` | `() => void` | No | - | - | Callback executed when the API call completes (runs on both success and failure) |
| `success` | `(params: Object) => void` ↓see below | No | - | - | Callback invoked on successful API call |
| `fail` | `(params: Object) => void` ↓see below | No | - | - | Callback invoked when the API call fails |

#### success callback parameters

| Property | Type | Since | Description |
| --- | --- | --- | --- |
| `properties` | `Record<string, Record<string, any>>` | `3.3.0` | Device attribute key-value pairs |

#### fail callback parameters

| Property | Type | Description |
| --- | --- | --- |
| `errorMsg` | `string` | Error message |
| `errorCode` | `string \| number` | Error code |
| `innerError` | `Object` | Error extension |

##### fail(params).innerError properties

| Property | Type | Description |
| --- | --- | --- |
| `errorCode` | `string \| number` | Extended error code |
| `errorMsg` | `string` | Extended error information |
