getStorageSecretByDeviceId(params: GetStorageSecretByDeviceIdParams)

Requires:
@tuya-miniapp/cloud-api≥1.0.5

Description

Get the file decryption key at the device level

Parameters

ParameterTypeRequiredDescription
YesdevId: device ID

Return Value

Type: Promise<string>
Key information (string)

Examples

Request example

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

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

Response example

"base64-secret-placeholder"