# Authentication Required

**URL:** <https://discussions.flightaware.com/t/authentication-required/27083>\
**Category:** AeroAPI\
**Created:** [October 18, 2017, 9:01am UTC](https://discussions.flightaware.com/t/authentication-required/27083 "2017-10-18T09:01:00Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![semgep](https://sea1.discourse-cdn.com/flex019/user_avatar/discussions.flightaware.com/semgep/32/1412_2.png) [@semgep](https://discussions.flightaware.com/u/semgep)\
**Post date:** [October 18, 2017, 9:01am UTC](https://discussions.flightaware.com/t/authentication-required/27083/1 "2017-10-18T09:01:00Z")

</div>

I got the API key (Access Permissions FlightXML Versions: v3)  
My call “[http://semgep:myAPIkey@flightxml.flightaware.com/json/FlightXML2/FlightInfoEx?ident=AAL174&howMany=25&offset=0](http://semgep:myAPIkey@flightxml.flightaware.com/json/FlightXML2/FlightInfoEx?ident=AAL174&howMany=25&offset=0)”  
Response: 401 Authentication Required!  
Where is my problem ?

---

<div class="post-metadata">

**Author:** ![Funkmeister380](https://sea1.discourse-cdn.com/flex019/user_avatar/discussions.flightaware.com/funkmeister380/32/1086_2.png) [@Funkmeister380](https://discussions.flightaware.com/u/Funkmeister380)\
**Post date:** [October 18, 2017, 1:03pm UTC](https://discussions.flightaware.com/t/authentication-required/27083/2 "2017-10-18T13:03:25Z")

</div>

FlightXML actually uses “user name / password” authentication, so you need to use this kind of code:

```auto
    username = "funkmeister380"
    apiKey = "xxx"
    fxmlUrl = "https://flightxml.flightaware.com/json/FlightXML3/"
    response = requests.get(fxmlUrl + command, params=payload, auth=(username, apiKey))
```

---

<div class="post-metadata">

**Author:** ![semgep](https://sea1.discourse-cdn.com/flex019/user_avatar/discussions.flightaware.com/semgep/32/1412_2.png) [@semgep](https://discussions.flightaware.com/u/semgep)\
**Post date:** [October 18, 2017, 1:51pm UTC](https://discussions.flightaware.com/t/authentication-required/27083/3 "2017-10-18T13:51:25Z")

</div>

Thanks!

I build an application for Аndroid.  
Now, on your recommendation, I’m using a call “[https://flightxml.flightaware.com/json/FlightXML3/FlightInfoEx?ident=AAL174&howMany=25&offset=0&auth=(semgep,myAPIkey)](https://flightxml.flightaware.com/json/FlightXML3/FlightInfoEx?ident=AAL174&howMany=25&offset=0&auth=(semgep,myAPIkey))”  
and again get “Authentication Required”!  
Perhaps I incorrectly included the username and APIkey in the URL?  
How to do it in Android (Java) ?

---

<div class="post-metadata">

**Author:** ![Funkmeister380](https://sea1.discourse-cdn.com/flex019/user_avatar/discussions.flightaware.com/funkmeister380/32/1086_2.png) [@Funkmeister380](https://discussions.flightaware.com/u/Funkmeister380)\
**Post date:** [October 18, 2017, 2:04pm UTC](https://discussions.flightaware.com/t/authentication-required/27083/4 "2017-10-18T14:04:25Z")

</div>

You may have to encode the authentication string – base64 if I remember correctly. Google is your friend 🙂

---

<div class="post-metadata">

**Author:** ![semgep](https://sea1.discourse-cdn.com/flex019/user_avatar/discussions.flightaware.com/semgep/32/1412_2.png) [@semgep](https://discussions.flightaware.com/u/semgep)\
**Post date:** [October 19, 2017, 10:37am UTC](https://discussions.flightaware.com/t/authentication-required/27083/5 "2017-10-19T10:37:11Z")

</div>

Thanks! Thanks! Thanks!  
Now All Right !!!

---

<div class="post-metadata">

**Author:** ![semgep](https://sea1.discourse-cdn.com/flex019/user_avatar/discussions.flightaware.com/semgep/32/1412_2.png) [@semgep](https://discussions.flightaware.com/u/semgep)\
**Post date:** [October 19, 2017, 10:47am UTC](https://discussions.flightaware.com/t/authentication-required/27083/6 "2017-10-19T10:47:35Z")

</div>

In version 3, there are much fewer functions than in version 2 - for example, there is no FlightInfoEx function.  
Is it planned to expand the feature set in version 3?  
What changes are there in version 3?

---

<div class="post-metadata">

**Author:** ![ottergoose](https://sea1.discourse-cdn.com/flex019/user_avatar/discussions.flightaware.com/ottergoose/32/117480_2.png) [@ottergoose](https://discussions.flightaware.com/u/ottergoose)\
**Post date:** [October 19, 2017, 2:15pm UTC](https://discussions.flightaware.com/t/authentication-required/27083/7 "2017-10-19T14:15:01Z")

</div>

V3 is an incomplete beta product and they’re not offering specifics for when the full feature-set might be available; from what I’ve seen, what is available in V3 is pretty solid, but, you’ll likely need a combination of V2 and V3 at least for the next several months.

---

<div class="post-metadata">

**Author:** ![semgep](https://sea1.discourse-cdn.com/flex019/user_avatar/discussions.flightaware.com/semgep/32/1412_2.png) [@semgep](https://discussions.flightaware.com/u/semgep)\
**Post date:** [October 22, 2017, 7:20am UTC](https://discussions.flightaware.com/t/authentication-required/27083/8 "2017-10-22T07:20:57Z")

</div>

I got the API key (Access Permissions FlightXML Versions: v3).  
When I call V2, I get a message “Authentication Required”.  
What solution to this problem?

---

<div class="post-metadata">

**Author:** ![bovineone](https://sea1.discourse-cdn.com/flex019/user_avatar/discussions.flightaware.com/bovineone/32/117631_2.png) [@bovineone](https://discussions.flightaware.com/u/bovineone)\
**Post date:** [October 23, 2017, 4:28am UTC](https://discussions.flightaware.com/t/authentication-required/27083/9 "2017-10-23T04:28:00Z")

</div>

> [@semgep](#):
>
> I got the API key (Access Permissions FlightXML Versions: v3).
> 
> When I call V2, I get a message “Authentication Required”.
> 
> What solution to this problem?

You must use a separate API key for v2 than your key for v3. You may request another v2 key from [AeroAPI Key Generation - FlightAware](https://flightaware.com/commercial/flightxml/key)

---

<div class="post-metadata">

**Author:** ![cbw](https://sea1.discourse-cdn.com/flex019/user_avatar/discussions.flightaware.com/cbw/32/117000_2.png) [@cbw](https://discussions.flightaware.com/u/cbw)\
**Post date:** [October 23, 2017, 4:30am UTC](https://discussions.flightaware.com/t/authentication-required/27083/10 "2017-10-23T04:30:09Z")

</div>

You would need a FlightXML 2 key. You can get one at the following link. [https://flightaware.com/commercial/flightxml/key](https://flightaware.com/commercial/flightxml/key). There should be a link to get the V2 key.

---

<div class="post-metadata">

**Author:** ![manojkakarla](https://sea1.discourse-cdn.com/flex019/user_avatar/discussions.flightaware.com/manojkakarla/32/6981_2.png) [@manojkakarla](https://discussions.flightaware.com/u/manojkakarla)\
**Post date:** [January 5, 2018, 5:30pm UTC](https://discussions.flightaware.com/t/authentication-required/27083/11 "2018-01-05T17:30:14Z")

</div>

No, there isn’t, All I see is button to “Add new FlightXML 3 Key”

---

<div class="post-metadata">

**Author:** ![iaina](https://sea1.discourse-cdn.com/flex019/user_avatar/discussions.flightaware.com/iaina/32/5523_2.png) [@iaina](https://discussions.flightaware.com/u/iaina)\
**Post date:** [January 6, 2018, 3:41pm UTC](https://discussions.flightaware.com/t/authentication-required/27083/12 "2018-01-06T15:41:57Z")

</div>

use v3 - you can chain calls to get the required data. this also conforms much better to a programming paradigm.

---

<div class="post-metadata">

**Author:** ![hbokh](https://sea1.discourse-cdn.com/flex019/user_avatar/discussions.flightaware.com/hbokh/32/116680_2.png) [@hbokh](https://discussions.flightaware.com/u/hbokh)\
**Post date:** [January 9, 2018, 11:24am UTC](https://discussions.flightaware.com/t/authentication-required/27083/13 "2018-01-09T11:24:09Z")

</div>

Not true: below that button is a line and link that reads “you can still **request another FlightXML2 key to be added** to your account.”

---

<div class="post-metadata">

**Author:** ![manojkakarla](https://sea1.discourse-cdn.com/flex019/user_avatar/discussions.flightaware.com/manojkakarla/32/6981_2.png) [@manojkakarla](https://discussions.flightaware.com/u/manojkakarla)\
**Post date:** [January 11, 2018, 4:40pm UTC](https://discussions.flightaware.com/t/authentication-required/27083/14 "2018-01-11T16:40:45Z")

</div>

Maybe its changed, or different just for me, Please see the attached screenshot.

 ![Screenshot at Jan 11 16-29-36](https://us1.discourse-cdn.com/flex019/uploads/flightaware/original/2X/a/a744e68400f086235920c49dd30e0b47a5bcf07d.jpg)

---

<div class="post-metadata">

**Author:** ![bovineone](https://sea1.discourse-cdn.com/flex019/user_avatar/discussions.flightaware.com/bovineone/32/117631_2.png) [@bovineone](https://discussions.flightaware.com/u/bovineone)\
**Post date:** [January 11, 2018, 8:04pm UTC](https://discussions.flightaware.com/t/authentication-required/27083/15 "2018-01-11T20:04:17Z")

</div>

As indicated at the bottom, your billing information needs updating before you’ll have the ability add another FlightXML2 key by yourself.
