Authenticating with MQTT

Authenticating devices with MQTT

Overview

Before a device can create an MQTT connection, it must first use the Register Device API to register itself with the server.

A successful registration call, returns a number of parameters that must be saved by the devices and used to open up an MQTT connection to the server.

  • id- Unique ID of the device
  • access_token - Authentication token
  • mqtt_hub_url - The MQTT broker assigned to the device.

Connecting

When creating an MQTT connection the following fields must be passed:

  • username - The id returned when registering
  • password - The access_key returned when registering
  • clientId - The id returned when registering