Automation

Jérôme 4 years ago

Hello, I would like to know if it is possible to use this:

http://traccar:8082/api/positions

with authentication via token=

I have home automation and I would like my home automation box to be able to query my server without the session cookie but only via URL.

Thank you

Jérôme 4 years ago

When I use:

http://traccar:8082/api/positions?token=XXXXXX

I have :

XML error: HTTP 401 Unauthorized - WebApplicationException (SecurityRequestFilter:113 < ...)
Anton Tananaev 4 years ago

Not possible to use token, but does your system support basic authentication? That's possible.

Jérôme 4 years ago

Do you have an example for basic authentication?

Jérôme 4 years ago

so there is no way via URL LOGIN:PASSWORD@url ... or tocken to access his :

http://myserver:8082/api/positions
Anton Tananaev 4 years ago

Basic authentication might work like this:

http://username:password@example.com/
Jérôme 4 years ago

It doesn't work with chrome...

http://email:password@myserver.com:8082/

An idea ?
Username = Email ?

Anton Tananaev 4 years ago

Yes. Don't have any other ideas.

Jérôme 4 years ago

It doesn't work :( It systematically puts me back on the home page where I have to enter my codes.

Jérôme 4 years ago

It worked for 10 minutes and now I get this error:

XML error: Port number ended with 'X'

Jérôme 4 years ago

everything is now ok. you must replace the @ of the email in %40.