getChannel(data: GetChannelParams)

版本要求:
@tuya-miniapp/cloud-api≥1.7.0

描述

获取 Agent 渠道编码

参数

参数类型必填说明
是请求参数

返回值

类型:Promise<string>
GetChannelResult

示例代码

请求示例

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

getChannel({ objectId: 'xxx' })
  .then(response => {
    console.log(response);
  })
  .catch(error => {
    console.error('获取 Agent 渠道编码失败:', error);
  });

返回示例

"channel_code"