Basic authorization in the callback is not supported.
Here are some details on Name/Value Support:
https://developer.cirium.com/apis/flightstats-apis/flight-alerts#section/Alert-name/value-support
Alert Name/Value Support
The 'Create flight rule...' Alert APIs allow callers to pass in name/value pairs that will be included as part of the response of any alerts that are generated.
To use this ability, additional query params that begin with an underscore will be treated as a name/value pair 'name', with the assigned value treated as the name/value pair 'value'.
For example, if the name/value pair foo/bar was desired, the query param &_foo=bar should be added to the request URI string.
Here is an example with &_mysecretcode=abcdefg12345
https://api.flightstats.com/flex/alerts/rest/v1/json/create/UA/300/from/SFO/departing/2014/9/30?appId=*****&appKey=*****&type=JSON&deliverTo=smtp://johndoe@yahoo.com&_mysecretcode=abcdefg12345
"request": {
"airport": {
"requestedCode": "SFO",
"fsCode": "SFO"
},
"url": "https://api.flightstats.com/flex/alerts/rest/v1/json/create/UA/300/from/SFO/departing/2014/9/30",
"airlineCode": {
"requestedCode": "UA",
"fsCode": "UA"
},
"flightNumber": {
"requested": "300",
"interpreted": "300"
},
"date": {
"year": "2014",
"month": "9",
"day": "30",
"interpreted": "2014-09-30"
},
"name": {
"interpreted": "Default"
},
"description": { },
"type": {
"requested": "JSON",
"interpreted": "JSON"
},
"deliverTo": {
"requested": "smtp://johndoe@yahoo.com",
"interpreted": "smtp://johndoe@yahoo.com"
},
"events": [
{
"interpreted": "all"
}
],
"nameValues": [
{
"requested": "mysecretcode",
"interpreted": "abcdefg12345"
}
],
"codeType": { },
"extendedOptions": { }
},
"rule": {
"id": "217063838",
"name": "Default",
"carrierFsCode": "UA",
"flightNumber": "300",
"departureAirportFsCode": "SFO",
"arrivalAirportFsCode": "HNL",
"departure": "2014-09-30T11:25:00.000",
"arrival": "2014-09-30T13:45:00.000",
"ruleEvents": [
{
"type": "ALL_CHANGES"
}
],
"nameValues": [
{
"name": "mysecretcode",
"value": "abcdefg12345"
}
],
"delivery": {
"format": "json",
"destination": "smtp://johndoe@yahoo.com"
}
},
"appendix": {
"airlines": [
{
"fs": "UA",
"iata": "UA",
"icao": "UAL",
"name": "United Airlines",
"phoneNumber": "1-800-864-8331",
"active": true
}
Comments
0 comments
Article is closed for comments.