...
The token can be set in the corresponding field of the user modelpreferences located at https://iot.powunity.com/settings/preferences:
...
The access token can only be used to create a session. It can not be used for the basic authorization option.
To create a token session, use the "token" query parameter in a session GET request:
Code Block |
---|
https://traccariot.powunity.com/api/session?token=YOUR_ACCESS_TOKEN |
In the response headers, you will find the session cookie in header set-cookie and this can be used to authenticate further requests, until the expiration date of your cookie.
WebSocket API
In addition to the REST API, we provide access to a WebSocket endpoint for live location updates and events. The URL for the connection:
Code Block |
---|
wss://traccariot.powunity.com/api/socket |
Session cookie is the only authorization option for the WebSocket connection.
...