getChannel(data: GetChannelParams)

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

Description

Get Agent channel code

Parameters

ParameterTypeRequiredDescription
YesRequest parameters

Return Value

Type: Promise<string>
GetChannelResult

Examples

Request example

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

getChannel({ objectId: 'xxx' })
  .then(response => {
    console.log(response);
  })
  .catch(error => {
    console.error('Failed to get Agent channel code:', error);
  });

Response example

"channel_code"