Monday, 26 June 2023
  3 Replies
  898 Visits
Hello dear friends, I've been trying to connect to traccar using session, but after many attempts, here I am... Does anyone have any idea how to do it?
9 months ago

The session authentication property only works for sgcWebSockets server and client, if the server is not a sgcWebsockets server, it won't work.

If you are trying to connect using the following api

You can use the basic authorization which is supported by the TsgcWebsocketClient. You can read more about this in the following link :

Kind Regards,
9 months ago
the only way to connect to tracar websocket is through session, the component cannot connect even through session?

WebSocket API
In addition to the REST API, we provide an access to a WebSocket endpoint for live updates. Endpoint for the WebSocket connection:

Session cookie is the only authorization option for the WebSocket connection.

Each message in the WebSocket stream uses the same universal JSON format:

"devices": [...],
"positions: [...],
"events": [...]
Each array contains standard JSON objects:

If a message does not contain any objects of a certain type, the key would not be included in the JSON structure. In most cases a message contain a single type of objects.
9 months ago

The documentation is not clear but seems you must first login to get the session using http protocol and then connect using websocket protocol and attaching the cookie authorization.

Kind Regards
  • Page :
  • 1
There are no replies made for this post yet.
Submit Your Response
Upload files or images for this discussion by clicking on the upload button below.
Supported: gif,jpg,png,jpeg,zip,rar,pdf
· Insert · Remove
  Upload Files (Maximum 10MB)