# Request Authorization Required

**URL:** <https://discussions.flightaware.com/t/request-authorization-required/35501>\
**Category:** AeroAPI\
**Created:** [May 22, 2018, 7:38am UTC](https://discussions.flightaware.com/t/request-authorization-required/35501 "2018-05-22T07:38:21Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![hoangtt](https://sea1.discourse-cdn.com/flex019/user_avatar/discussions.flightaware.com/hoangtt/32/4579_2.png) [@hoangtt](https://discussions.flightaware.com/u/hoangtt)\
**Post date:** [May 22, 2018, 7:38am UTC](https://discussions.flightaware.com/t/request-authorization-required/35501/1 "2018-05-22T07:38:21Z")

</div>

Hi,

I am getting below Error while accessing Flight Aware API

"The request failed with HTTP status 401: Authorization Required”’.

We’re using C# to invoke the service, and we did not have changed anythings in our code.

My account : “rossc” .Please help,

Code:  
var flightAware = new FlightXML2();

flightAware.Credentials = new NetworkCredential(“Username”, “Password”);  
flightAware.PreAuthenticate = true;  
flightAware.SetMaximumResultSize(100);//Exception here

Thanks,

---

<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:** [May 22, 2018, 1:21pm UTC](https://discussions.flightaware.com/t/request-authorization-required/35501/2 "2018-05-22T13:21:55Z")

</div>

For the credentials, are you using the account password or the key?

---

<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:** [May 22, 2018, 5:10pm UTC](https://discussions.flightaware.com/t/request-authorization-required/35501/3 "2018-05-22T17:10:43Z")

</div>

Your FlightXML 2 API key appears to be disabled. Did you manually click the “X” to disable your key on May 15 via the [https://flightaware.com/commercial/flightxml/key](https://flightaware.com/commercial/flightxml/key) page?

---

<div class="post-metadata">

**Author:** ![hoangtt](https://sea1.discourse-cdn.com/flex019/user_avatar/discussions.flightaware.com/hoangtt/32/4579_2.png) [@hoangtt](https://discussions.flightaware.com/u/hoangtt)\
**Post date:** [May 23, 2018, 1:56am UTC](https://discussions.flightaware.com/t/request-authorization-required/35501/4 "2018-05-23T01:56:16Z")

</div>

It likes that: ‘47f7b1fxxxxxxxxxxxxxxxxxx’.

---

<div class="post-metadata">

**Author:** ![hoangtt](https://sea1.discourse-cdn.com/flex019/user_avatar/discussions.flightaware.com/hoangtt/32/4579_2.png) [@hoangtt](https://discussions.flightaware.com/u/hoangtt)\
**Post date:** [May 23, 2018, 1:57am UTC](https://discussions.flightaware.com/t/request-authorization-required/35501/5 "2018-05-23T01:57:41Z")

</div>

No, we did not click “X” as above-mentioned.

---

<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:** [May 23, 2018, 9:29pm UTC](https://discussions.flightaware.com/t/request-authorization-required/35501/6 "2018-05-23T21:29:32Z")

</div>

Please request a new API key via the link near the bottom of [https://flightaware.com/commercial/flightxml/key](https://flightaware.com/commercial/flightxml/key) page and use that in your application. Do not publish your API key on these forums or any other public manner.
