---
name: "getCameraList"
mode: "kit"
versionRequirements:
  - { name: "@tuya-miniapp/cloud-api", version: "1.0.5" }
---

## getCameraList

> [VERSION] @tuya-miniapp/cloud-api >= 1.0.5

### Description

Get home camera device list

### Parameters

`Params`

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `params` | `QueryCameraListDto` | Yes | - | Request body |

### Referenced Types

##### `type` QueryCameraListDto

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `homeId` | `string` | Yes | Home ID |
| `stockId` | `string` | No | Stock ID (optional) |
| `pids` | `string` | No | Product ID list (optional; used as a product filter) |
| `ownerType` | `1 \| 0` | No | Ownership dimension: 0 device-level, 1 account-level |
| `serviceCode` | `string` | No | Service code (optional) |
| `commodityCode` | `string` | No | Product code (optional) |
| `categoryCode` | `string` | Yes | Business category code (required) |

##### `type` ResBindDeviceDto

| Property | Type | Description |
| --- | --- | --- |
| `totalDevices` | `number` | Total number of devices |
| `bindDeviceNum` | `number` | Number of bound devices |
| `list` | `BindDeviceInfo[]` | Device data list |


### Valid Values

##### `QueryCameraListDto.ownerType`

| Value | Description | Since |
| --- | --- | --- |
| `1` | - | - |
| `0` | - | - |


### Examples

#### Request example

```typescript
import { getCameraList } from '@tuya-miniapp/cloud-api';

getCameraList({ homeId: '194137', categoryCode: 'ipc' })
  .then((res) => console.log(res))
  .catch(console.error);
```

#### Response example

```json
{
  "totalDevices": 1,
  "bindDeviceNum": 1,
  "list": [
    {
      "uuid": "vdevo176127325226099",
      "name": "Camera 1",
      "online": true,
      "iconUrl": "https://images.example.com/icon.png",
      "isBindCurrentService": true
    }
  ]
}
```
