getConfigByKey(data: GetConfigByKeyParams)

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

Description

Get configuration data by key

Parameters

ParameterTypeRequiredDescription
YesRequest parameters

Return Value

Type: Promise<string>
GetConfigByKeyResult

Examples

Request example

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

getConfigByKey({ key: 'xxx' })
  .then(response => {
    console.log(response);
  })
  .catch(error => {
    console.error('Failed to get config data by key:', error);
  });

Response example

"https://example.com/xxx"