Request API HTTP

Jérôme 3 years ago

Hello, I would like to know if it is possible to obtain the /api/positions page via http://login:password@IP:8082/api/positions because via my windows it works but my home automation box I have the following return: XML error: Port number ended with 'X' or XML error: HTTP 401 Unauthorized - WebApplicationException (SecurityRequestFilter:125 < ...)

Thank you for your feedback.

Jérôme 3 years ago

I would add that via Chrome it works well with Windows... but not via my Eedomus home automation box when it sends the same request...

Anton Tananaev 3 years ago

It doesn't support an authorization header?

Jérôme 3 years ago

I don't know at all... The error message I got:

XML error: HTTP 401 Unauthorized - WebApplicationException (SecurityRequestFilter:125 < ...)

Do you have an idea to overcome this?

Anton Tananaev 3 years ago

You should probably figure out the answer first.

Jérôme 3 years ago

Impossible to have access to api/position without authorization or via tocken?

Anton Tananaev 3 years ago

Obviously it's impossible without an authorization. Token is one authorization option, but you need to pass it in a header. That's why I asked my question.

Jérôme 3 years ago

Possible to have an example header with token for api/position for me to test please?

Anton Tananaev 3 years ago

It can be passed using the standard authorization header:

Authorization: Bearer <token>
Jérôme 3 years ago
http://login:password@IP:8082/api/positions/session?token=

It is not possible ?

Jérôme 3 years ago

If I try in https :

XML error: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
Jérôme 3 years ago

I add that it worked with version 5.6 and more since 5.7 :(

Anton Tananaev 3 years ago

Please provide the proof that it worked with 5.6 and doesn't work now.

Jérôme 3 years ago

Hello, for follow-up, I got help via the forum of my home automation box, he created a script for me to solve my problem.

https://forum.eedomus.com/viewtopic.php?f=14&t=11337

Thx.

Anton Tananaev 3 years ago

So how did it work on the previous version of Traccar?