Traccar 3.8 How to use api key

Malkit Singh8 years ago

Hi,
I am trying to build my own API's above traccar.
@Anton, how can I use api key to access user info, let's say I want to create nwe device for some user, how canI do that using API & api key?
I am trying to do with Standard HTTP authorization headers but it always returns me 401 unauthorize access.

And one more question, how does linking of device happen with user if created using API?

Anton Tananaev8 years ago

For now you can only use API token to create a session. Standard authorization header should work for all service calls. If it doesn't, probably header is incorrect.

If you are logged in as the user, all you need to do is create device and it will be automatically link to that user. If you want to create it as an admin for another user, you can create device first and then link it to another user.