getPanelAgentConfigAvatarList(params: GetPanelAgentConfigAvatarListParams)

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

Description

Get the list of supported avatars.

Parameters

ParameterTypeRequiredDescription
YesRequest body

Return Value

Type: Promise<GetPanelAgentConfigAvatarListResult>
GetPanelAgentConfigAvatarListResult (see type definitions and minituya response parameters for field meanings)

Referenced Types

typeGetPanelAgentConfigAvatarListResult
Array<{
  /** 头像ID */
  avatarId: string;
  /** 头像链接 */
  url: string;
}>

Examples

Request example

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

const params = {
  devId: 'your_device_id',
  bizCode: 'optional_biz_code',
};

getPanelAgentConfigAvatarList(params)
  .then(result => {
    console.log('Avatar list:', result);
  })
  .catch(error => {
    console.error('Failed to get avatar list:', error);
  });

Response example

[
  {
    "avatarId": "avatar_001",
    "url": "https://example.com/avatar1.png"
  },
  {
    "avatarId": "avatar_002",
    "url": "https://example.com/avatar2.png"
  }
]