×

Notice

The forum is in read only mode.

authentication error requesting /api/states/own

5 years 1 week ago #960 by chris.dorsey
I have a 'regular' account (i.e. not a Data Access acct) and a receiver sending ads-b messages to OpenSkyNetwork. When I try to access the own REST endpoint at /api/states/own, passing my login credentials using Basic auth, I get a 401/Unauthorized response with the message "Bad credentials". Do I need a "Data Access" account to access the own endpoint?

Thanks!
5 years 1 week ago #961 by strohmeier
Your receiver looks like it is indoor and has only very occasional, patchy reception. If you're logged in to the website, does this link work? opensky-network.org/api/states/own
5 years 1 week ago #964 by chris.dorsey
Replied by chris.dorsey on topic authentication error requesting /api/states/own
Thanks for the reply. If I'm logged into the website, and follow that link thru the browser, the request is successful, and I do see states from my receiver. However that request isn't using Basic authentication, it looks like the initial login request sets a cookie, which is then passed on subsequent requests in the browser. If I try passing that same cookie with my API request (I'm testing with Postman and also testing using .NET HttpClient), then it does work, so that seems to indicate that my account is OK, but Basic Auth isn't working? I'm essentially doing what the Java API does, but no luck with Basic Auth.

Thanks.

PS. I'm also planning on getting a better outdoor antenna, should have better reception then.
Powered by Kunena Forum
This website uses cookies to offer you the best experience of our services. By using this website you agree to our privacy policy!