TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
MiniappExtDeliveryAppChannelSyncRequest req = new MiniappExtDeliveryAppChannelSyncRequest();
MiniappExtDeliveryAppChannelSyncRequest.AppChannelConfigDTO obj1 = new MiniappExtDeliveryAppChannelSyncRequest.AppChannelConfigDTO();
obj1.setMiniappId(3000023432423L);
obj1.setConfigUrl("http://www.taobao.com");
obj1.setExtProperties("{}");
obj1.setChannel("1");
obj1.setDescription("私域卡片描述");
obj1.setIsvSimpleName("ISV名称");
obj1.setTitle("私域卡片标题");
obj1.setStatus(1L);
req.setAppChannelConfigDto(obj1);
MiniappExtDeliveryAppChannelSyncResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
MiniappExtDeliveryAppChannelSyncRequest req = new MiniappExtDeliveryAppChannelSyncRequest();
MiniappExtDeliveryAppChannelSyncRequest.AppChannelConfigDTODomain obj1 = new MiniappExtDeliveryAppChannelSyncRequest.AppChannelConfigDTODomain();
obj1.MiniappId = 3000023432423L;
obj1.ConfigUrl = "http://www.taobao.com";
obj1.ExtProperties = "{}";
obj1.Channel = "1";
obj1.Description = "私域卡片描述";
obj1.IsvSimpleName = "ISV名称";
obj1.Title = "私域卡片标题";
obj1.Status = 1L;
req.AppChannelConfigDto_ = obj1;
MiniappExtDeliveryAppChannelSyncResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new MiniappExtDeliveryAppChannelSyncRequest;
$app_channel_config_dto = new AppChannelConfigDTO;
$app_channel_config_dto->miniapp_id="3000023432423";
$app_channel_config_dto->config_url="http://www.taobao.com";
$app_channel_config_dto->ext_properties="{}";
$app_channel_config_dto->channel="1";
$app_channel_config_dto->description="私域卡片描述";
$app_channel_config_dto->isv_simple_name="ISV名称";
$app_channel_config_dto->title="私域卡片标题";
$app_channel_config_dto->status="1";
$req->setAppChannelConfigDto(json_encode($app_channel_config_dto));
$resp = $c->execute($req);
curl -X POST 'http://gw.api.taobao.com/router/rest' \
-H 'Content-Type:application/x-www-form-urlencoded;charset=utf-8' \
-d 'app_key=12129701' \
-d 'format=json' \
-d 'method=taobao.miniapp.ext.delivery.app.channel.sync' \
-d 'partner_id=apidoc' \
-d 'sign=649EF38962B15A1E857CE4CAAAC7305F' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-05-21+16%3A09%3A14' \
-d 'v=2.0' \
-d 'app_channel_config_dto=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.MiniappExtDeliveryAppChannelSyncRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.app_channel_config_dto="数据结构示例JSON格式"
try:
resp= req.getResponse()
print(resp)
except Exception,e:
print(e)
pTopRequest pRequest = alloc_top_request();
pTopResponse pResponse = NULL;
pTaobaoClient pClient = alloc_taobao_client(url, appkey, appsecret);
set_api_name(pRequest,"taobao.miniapp.ext.delivery.app.channel.sync");
add_param(pRequest,"app_channel_config_dto","数据结构JSON示例");
pResponse = top_execute(pClient,pRequest,NULL);
printf("ret code:%d\n",pResponse->code);
if(pResponse->code == 0){
pTopResponseIterator ite = init_response_iterator(pResponse);
pResultItem pResultItem = alloc_result_item();
while(parseNext(ite, pResultItem) == 0){
printf("%s:%s\n",pResultItem->key,pResultItem->value);
}
destroy_response_iterator(ite);
destroy_result_item(pResultItem);
}
destroy_top_request(pRequest);
destroy_top_response(pResponse);
destroy_taobao_client(pClient);
TopClient = require('./topClient').TopClient;
var client = new TopClient({
'appkey': 'appkey',
'appsecret': 'secret',
'REST_URL': 'http://gw.api.taobao.com/router/rest'
});
client.execute('taobao.miniapp.ext.delivery.app.channel.sync', {
'app_channel_config_dto':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})