I want to use the FlightXML API to get some data. I’m a beginner when it comes to this kind of python usage so please forgive me if I ask noob questions. So I copied the code which uses the module suds from the python example available in the docs as shown below and I entered my username and API key.
import sys from suds import null, WebFault from suds.client import Client import logging username = 'devanjithf' apiKey = 'blahblah' url = 'http://flightxml.flightaware.com/soap/FlightXML2/wsdl' logging.basicConfig(level=logging.INFO) api = Client(url, username=username, password=apiKey)
However I get a 401 Authorization required error:
File "C:\ProgramData\Anaconda3\lib\site-packages\suds\client.py", line 677, in process_reply raise Exception((status, description)) Exception: (401, 'Authorization Required')
I thought I can access data even tho I’m a basic user if I’m not mistaken?
For my username, I used the username which appears in this post. For the API key I did use the API key under my name which is active (green light).
Thanks in advance!