This is the request:
var header = {'Authorization': 'Basic 123456', // master api key
'content-type': 'application/json; charset=utf-8',
'Accept': 'application/vnd.urbanairship+json; version=3'
};
var data = {
"audience": {
"OR": [
{"android_channel": 'e774efea-1c2e-4a55-9abf-e1e8bbab644d'},
{"ios_channel": 'e774efea-1c2e-4a55-9abf-e1e8bbab644d'}
]
},
"notification": {
"alert": "Hello!"
},
"device_types": "all"
};
Meteor.http.post('https://go.urbanairship.com/api/push HTTP/1.1', {headers: header, data: data}, function(err, results){
if(err)console.log('err' + err);
console.log(results)
});
and this is the response I get:
Comments
7 comments