TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaIbosMcMessageSendtoappRequest req = new AlibabaIbosMcMessageSendtoappRequest();
AlibabaIbosMcMessageSendtoappRequest.PushAppEvent obj1 = new AlibabaIbosMcMessageSendtoappRequest.PushAppEvent();
obj1.setJsonData("{}");
obj1.setReceiver(1L);
obj1.setAction("1");
obj1.setMsgKey("1");
obj1.setEventType("push_app");
obj1.setSource("1");
obj1.setEventTimeMillis(1L);
obj1.setPushType(20000L);
req.setPushAppEvent(obj1);
AlibabaIbosMcMessageSendtoappResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlibabaIbosMcMessageSendtoappRequest req = new AlibabaIbosMcMessageSendtoappRequest();
AlibabaIbosMcMessageSendtoappRequest.PushAppEventDomain obj1 = new AlibabaIbosMcMessageSendtoappRequest.PushAppEventDomain();
obj1.JsonData = "{}";
obj1.Receiver = 1L;
obj1.Action = "1";
obj1.MsgKey = "1";
obj1.EventType = "push_app";
obj1.Source = "1";
obj1.EventTimeMillis = 1L;
obj1.PushType = 20000L;
req.PushAppEvent_ = obj1;
AlibabaIbosMcMessageSendtoappResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlibabaIbosMcMessageSendtoappRequest;
$push_app_event = new PushAppEvent;
$push_app_event->json_data="{}";
$push_app_event->receiver="1";
$push_app_event->action="1";
$push_app_event->msg_key="1";
$push_app_event->event_type="push_app";
$push_app_event->source="1";
$push_app_event->event_time_millis="1";
$push_app_event->push_type="20000";
$req->setPushAppEvent(json_encode($push_app_event));
$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=alibaba.ibos.mc.message.sendtoapp' \
-d 'partner_id=apidoc' \
-d 'sign=6134523622AE99939C08508B0A6962AF' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-08-23+21%3A58%3A17' \
-d 'v=2.0' \
-d 'push_app_event=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlibabaIbosMcMessageSendtoappRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.push_app_event=""
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,"alibaba.ibos.mc.message.sendtoapp");
add_param(pRequest,"push_app_event","数据结构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('alibaba.ibos.mc.message.sendtoapp', {
'push_app_event':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})