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

## getStorageSecret

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

### Description

Get the file decryption key at the home level

### Parameters

`Params`

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `params` | `GetStorageSecretParams` | Yes | - | gid: family ID |

### Referenced Types

##### `type` GetStorageSecretParams

Obtain the storage decryption key at the home level.

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


### Examples

#### Request example

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

getStorageSecret({ gid: '194137' })
  .then((secret) => console.log(secret))
  .catch(console.error);
```

#### Response example

```json
"base64-secret-placeholder"
```
