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

## getAlbumSetting

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

### Description

Time Album settings get API

### Parameters

`Params`

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

### Referenced Types

##### `type` GetAlbumSettingReq

| Property | Type | Description |
| --- | --- | --- |
| `stockId` | `string` | Inventory ID |
| `gid` | `string` | Home ID |

##### `interface` VisionBoxEvent

| Property | Type | Description |
| --- | --- | --- |
| `eventCode` | `string` | Event code |
| `eventValue` | `string` | Event value |
| `eventType` | `"VisionEventType.PRESET" \\| "VisionEventType.CUSTOM"` | Event type (preset / custom) |

##### `enum` VisionEventType

| Enum Value | Actual Value | Description |
| --- | --- | --- |
| `VisionEventType.PRESET` | `0` | Preset event |
| `VisionEventType.CUSTOM` | `1` | Custom event |


### Examples

#### Request example

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

getAlbumSetting({ stockId: '1', gid: '194137' })
  .then((cfg) => console.log(cfg))
  .catch(console.error);
```

#### Response example

```json
{
  "id": "album-1",
  "albumName": "Nursery",
  "enableStatus": 1,
  "timedCaptureConfig": ["12:00"],
  "smartCaptureConfig": [
    { "eventCode": "person", "eventValue": "1", "eventType": 0 }
  ]
}
```
