Traccar API: Crate two sessions ate the same time

Victor Butler2 years ago

Then for simplicity you can assume all Admin and User actions are done on an external service via API.

In as few words as possible, I want Admin to only add devices and I want Users to register their own accounts and assign any of the Admin devices to themselves.

Using regular logic in Traccar Users can only add new devices but cannot assign Admin devices to themselves because they lack permission. Permissions are only granted if Admin creates the User and assigns a device to that User.

Anton Tananaev2 years ago

If you're doing all requests via your external service, what is the issue with creating multiple sessions? I'm confused even more now.

Victor Butler2 years ago

That's the thing, I am not sure whether that's possible. If it is then, no problem I will just create a second session and perform the action from there.

If I use an Admin token can I perform all actions - add, delete, modify? In the instructions under User Management the token is mentioned only along a Read Only user.

Anton Tananaev2 years ago

From a browser you can't create multiple sessions. From your external service you can obviously do anything.

As an admin you can use all actions. I don't know why you need a token though.