Public device

Reza Mortazavi6 years ago

Is there any way to make a device publicly available for any registered user? In other words, I want any registered user can see the chosen device by default since my users are more than 700 people and assigning a (fixed) device to them by hand is difficult.

Anton Tananaev6 years ago

It's not possible. You can write a script that will do it for you.

Reza Mortazavi6 years ago

Do you mean I have to add a hook to the register function in the source code or else? Would you please describe it in more detail or provide me a link.
Thanks.

Anton Tananaev6 years ago

No, I'm suggesting you use API from any scripting language to do the linking for you. API documentation:

https://www.traccar.org/traccar-api/

Reza Mortazavi6 years ago

When (or more precisely where) do I call the API? How to know if a new user is signed on?

Anton Tananaev6 years ago

I think you are missing the point. I'm suggesting that you link device to every user via script once, not call it every time user logs in.

Reza Mortazavi6 years ago

However, my clients are not registered at once, but gradually. As I understand, I have to run the script on a regular basis to link the newly registered ones to the public device. Correct?

Anton Tananaev6 years ago

Yes, in that case you need to do it for every new user.

Reza Mortazavi6 years ago

Thanks.