Connect to the MQTT Broker

BioT’s device integration is optimized for a broad range of devices types, by supporting both the HTTP and MQTTMQTT - MQTT is an OASIS standard messaging protocol for the Internet of Things (IoT). (standard for IoT messaging) protocols. Each protocol excels at serving different use cases, and together they cover a very wide spectrum.

Lightweight measurement data as well as occasional bidirectional command and status communication is best served by MQTT. First, you need to establish a connection to our MQTT broker, which is Amazon Internet of Things (AWS IoT). For this, first retrieve temporary credentials from BioT. These credentials are later used in the Connection Method described in the AWS IoT device SDK documentation.

Get Temporary Credentials (Step 2)

Temporary Credentials API

  • Request: GET
  • URL: https://<your api endpoint>/device/v2/credentials/<deviceId>/mqtt-credentials
  • Replace <deviceId> with the unique device ID

For a successful call, the response holds the device access credentials to the BioT MQTT broker and its endpoint URL (Note that this is the IoT endpoint, and not the BioT API endpoint).

  • Endpoint is : response.endpoint
  • AccessKey is: response.accessKeyId
  • SecretKey is: response.secretAccessKey
  • Expiration time for the credentials: response.expiration

To refresh the temporary credentials before expiration, re-call the same API.

Did this page help you?