Welcome, Guest
Username: Password: Remember me

TOPIC: authentication error requesting /api/states/own

authentication error requesting /api/states/own 11 months 3 weeks ago #960

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!
The administrator has disabled public write access.

authentication error requesting /api/states/own 11 months 2 weeks ago #961

  • strohmeier
  • strohmeier's Avatar
  • Online
  • Administrator
  • Posts: 162
  • Thank you received: 39
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
The administrator has disabled public write access.

authentication error requesting /api/states/own 11 months 2 weeks ago #964

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.
The administrator has disabled public write access.
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!