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

## getStorageSecretByDeviceId

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

### Description

Get the file decryption key at the device level

### Parameters

`Params`

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `params` | `GetStorageSecretByDeviceIdParams` | Yes | - | devId: device ID |

### Referenced Types

##### `type` GetStorageSecretByDeviceIdParams

Obtain the storage decryption key at the device level.

| Property | Type | Description |
| --- | --- | --- |
| `devId` | `string` | Device ID |


### Examples

#### Request example

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

getStorageSecretByDeviceId({ devId: 'vdevo176127325226099' })
  .then((secret) => console.log(secret))
  .catch(console.error);
```

#### Response example

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