Hi
I have a little problem with the alert system. When a new alert is pushed, I receive correctly an iOS Push Notification, but the Endpoint URL isn’t called.
To register my endpoint I use this JS code via Node JS of course :
fa is an instance of https://www.npmjs.com/package/flightaware.js
fa.RegisterAlertEndpoint({
address: "http://XXXX.ap-southeast-1.amazonaws.com/dev",
format_type: "json/post"
}, (err, res) => {
console.log(err, res)
})
Execution of this code return 1 so it’s should be good.
I have tested my endpoint via **PostMan**
with the following parameters :
-
Method : POST
-
Header : Content-Type: application/json
-
Body : ‘{“test”: “test”}’
I saved correctly the json input into a dated file…
I have also tried to define HTTPS endpoint but it’s same problem.
In first time i define my alerts via the FlightAware interface, but no options about the callback are displayed
Then i have tried to create my alert directly via the Api, with this JS Code :
fa.SetAlert({
alert_id: 0,
ident: 'XXXXX',
enabled: true,
channels: '{16 e_filed e_departure e_arrival e_diverted e_cancelled}'
}, (err, res) => {
console.log(err, res)
})
Execution of this code return the id for my new alert.
Does this procedure seem correct to you ?
Why is the channel ID = 16 when I create the alert, but when i retrieve via **getAlerts**
the channel ID is changed to 15 ?
Thanks