Authentication

Please see the guide on authentication to make sure you have your initial token.
This token will then later be used to generate a special short-lived token that you will use for the websocket

Authorization

The same authorization rules will apply for the websocket as they do for the JSON:API and you will only have access to the same resources

Initial connection

To connect to the Websocket API you need to provide the authentication token in the same way as with the JSON:API
Only difference is that you need to request a websocket token from a seperate endpoint that will be used authenticate with the sockets
This endpoint requires you to provide a valid token in your Authorization header as with our other endpoints
The websocket will use the new token and its expire date.
You must expect the websocket to close when the token expires and you should then fetch a new token and reconnect.

URL

  • Default: wss://api.maskon.no/websocket