Noob playing with the API, getting 401 Authorization Required

I’m not a great programmer, and most of my experience using APIs is through webhooks in Zapier. I’m working on a little project to look up data about my past flights, and wanted to explore if I could use the V3 FlightXML API for my needs.

I figured I’d try to see if I could get it working just using to begin with, but I’m having issues with the Auth.

I’m using my site username and the V3 API key for the Basic Auth, and is sending it Base64 encoded, still I’m getting this response:

Accept-Ranges: bytes

Access-Control-Allow-Credentials: true

Access-Control-Allow-Methods: POST, GET

Access-Control-Allow-Origin: *

Access-Control-Max-Age: 1728000

Age: 0

Cache-Control: max-age=5, must-revalidate

Connection: keep-alive

Content-Encoding: gzip

Content-Length: 182

Content-Type: text/html;charset=utf-8

Date: Wed, 25 Apr 2018 10:08:35 GMT

Server: FlightAware/3.1

Strict-Transport-Security: max-age=31536000

Vary: Accept-Encoding

Via: 1.1 varnish

Www-Authenticate: Basic realm="FlightXML2"

X-Fa-Cache: MISS

X-Varnish: 520326335


    <title>Authentication Required</title>
    <h1>Authentication Required</h1>

Any idea why it’s not working?

EDIT: Here’s the request being sent:

On the surface, it appears you are making a FlightXML2 call with a FlightXML3 Beta key. You should use the FlightXML3 Beta methods.

Thanks @cbw, I’ll give that a shot.

I just copied the example from the v3 documentation:

Is the v3 documentation not up to date?

Those URLs should say /json/FlightXML3/METHODNAME instead. An update will be made to that page tomorrow.