Why are you using wss
instead of ws
?
i just tried using ws , and i got the error below
Error: Unexpected server response: 503
I suspect that you don't have a user session.
Honestly i quite dont understand what you mean by "Session cookie is the only authorization option for WebSocket connection."
Because i've been able to create a user session calling /api/session.
but when i try connecting to the websocket i get the errors below
is it an authorization parameter i have to set called Session Cookie ?
I don't know what it's called in postman, but yes, you have to set session cookie in your request.
Okay i couldn't figure it out on Postman , but while using iOS swift URLSession Websocket i was able to pass cookies and it works .
Now you wrote that "In addition to Traccar REST API, we provide access to a WebSocket endpoint for live location updates and events. URL for the connection"
Does it mean that anytime a location change or device change is triggered , i will get a notification/message from the socket endpoint ?
Because i've been listening to the socket endpoint for a while , while doing some changes on the web app , but i don't get any message from the socket endpoint.
Any advise please ?
Did you receive any messages from device? You won't get updates if you just change device yourself.
Yes when i first connected to the websocket server i got message from device, but when im manually making changes i didnot receive any messages .
That's expected, as I said.
im tyring to connect to websocket using the postman websocket client , below is the url
wss://[IP]:8082/api/socket
I get an error connection refused .