Best Way to get real-time location via API

redofi 4 years ago

Hi Anton that was my error !

thank you a lot for your help and all your contribution to this community

Macan4 years ago

Use it like this (if you are using it in the traccar directory like it is as default):

var url = window.location.protocol + '//' + window.location.host;
var token = "YOUR TOKEN HERE";

Miguel Lara3 years ago

Hi everyone, I am currently developing a flutter mobile app for displaying the devices and I'm dealing with this.

Can you please tell me where do I get the token from? in the new session response I can only see the "notificationTokens", the "token" field returns as null, what may I be missing?

Please enlighten me, I have hardware background and still have holes of knowledge here!!!

Anton Tananaev3 years ago

You have to set the token first.

redofi 3 years ago

you can do it from traccar gui interface by generating a new user (user account )

Miguel Lara3 years ago

Thank you, that was a fast response. I see, I need to generate it using the web interface or send the token in the request when creating the user in which case I need to generate it in the mobile app.

I appreciate your help!!

Willian Ferreira2 years ago

Can anyone help connecting API websockets using Python?