Embedd or Simple

yan2 years ago

Is the /simple deprecated? How can I embed in my site without login required?

Anton Tananaev2 years ago

It's not deprecated. You can still use it if you want.

With any of the version of the web app you can use token login.

yan2 years ago
<iframe src="https://rastreador.example.com/simple?token=XXX

It seems like it's not working, I'm not able to make it work. When I use it without the '/simple', it works, but it doesn't work without logging in. The token is valid, but I don't know what's happening, I've searched the documentation and haven't found anything yet.

Anton Tananaev2 years ago

There are multiple issues:

  1. To use the simple app you need to enable legacy web app first. Or host simple app somewhere separately.
  2. It's a common problem that cookies don't work in iframe, so this probably won't work. You can try embedding the code directly into your own app instead of using iframe.
yan2 years ago

Do you suggest that I bring the code from https://github.com/traccar/traccar-web/tree/master/web/simple into my web page, right?

Anton Tananaev2 years ago

Yes.

yan2 years ago

Anton, can you please delete or edit the sensitive content on iframe tag?

yan2 years ago

I'm referring to the 'src'

Anton Tananaev2 years ago

Removed.

yan2 years ago

Thank you!