WebSocket binding

The Things Protocol message can be sent as is as WebSocket message. The Things Protocol JSON must be sent as UTF-8 encoded String payload.

Things WebSocket endpoint

The WebSocket endpoint pattern depends on which API version you use

wss://<host>/ws/2

wss://<host>/ws/1 - deprecated

tip Find the list of all endpoints at our FAQ section How to find the endpoints for my subscription?

Authenticate

User

A user who connects to the WebSocket endpoint can be authenticated by using:

  • HTTP BASIC Authentication by providing a username (with tenant information) and the password of a user managed within the Bosch IoT Permissions service.
    or
  • The Identity Context of a currently logged in user managed within the Bosch IoT Permissions service.
    or
  • A JSON Web Token (JWT) issued by the Bosch IoT Permissions service, Bosch ID or by Google.

See Authenticate as a user for more details.

Technical client

A technical client who connects to WebSocket endpoint can be authenticated using:

  • A JSON Web Token (JWT) issued by the Bosch IoT Permissions service, Bosch ID or by Google.
  • Cryptographic signature - deprecated - by using a cryptographic signature. The solution must provide the signature of defined HTTP headers which are concatenated and signed with the private key of the solution client. This signature must be sent with each request in the HTTP header: Authorization: CRS clientId;algorithm;signature.

    Within the Authorization HTTP header, the clientId must also be sent, and it identifies the solution that is executing the request.

See Authenticate as a client for more details.

WebSocket documentation at Ditto

tip As the Bosch IoT Things service is built upon the Eclipse Ditto project, the specification documented there applies accordingly.
https://www.eclipse.org/ditto/httpapi-protocol-bindings-websocket.html

Imprint Legal info Privacy statement