getAppPopupSwitchConfig(data: GetAppPopupSwitchConfigParams)

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

Description

Get popup switch configuration (V2)

Parameters

ParameterTypeRequiredDescription
YesRequest parameters

Return Value

Type: Promise<GetAppPopupSwitchConfigResult>
GetAppPopupSwitchConfigResult

Referenced Types

typeGetAppPopupSwitchConfigResultPopup switch configuration
Record<string, unknown>

Examples

Request example

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

getAppPopupSwitchConfig({ miniapp: 'xxx', ownerId: 'home_xxx' })
  .then(response => {
    console.log(response);
  })
  .catch(error => {
    console.error('Failed to get popup switch configuration (V2):', error);
  });

Response example

{ "switch": true }