I got an api key,but i’m struck in accessing the api via python. can you please guide me to to get output .
I want below information from API as output like json/xml data.
Arrival date time:
Estimated Arrival date time:
Estimated departure date time:
Actual arrival time:
Below one is my code
username = "i gave my username here"
apiKey = " i gave here my api key"
fxmlUrl = “https://flightxml.flightaware.com/json/FlightXML3/”
response = requests.get(fxmlUrl,params=payload,auth=(username, apiKey))
if response.status_code == 200:
print “Error executing request”
Output is exception
raise ValueError(“No JSON object could be decoded”)
ValueError: No JSON object could be decoded