Overview
Enabling MQTT for a Device takes three steps:
- Create an MQTT-enabled Device Model in the Partner Portal.
- Register the Device via the HTTPS-based Register Device API.
- Connect via MQTT using the credentials returned by registration.
Create an MQTT Device Model
In the Partner Portal, open the Add Model dialog and choose MQTT under Communication Protocol.
The communication protocol is fixed at Device Model creation and cannot be changed afterwards.

Register the Device
Call the HTTPS-based Register Device API. A successful registration returns:
{
"id": "11111111-2222...",
"access_key": "Secret key for this device...",
"hub_url": "hub-url.com",
"hub_url_static_cert": "hub-url-static.com",
"mqtt_hub_url": "mqtt://mqtt-url.com:port"
}For MQTT, three of these fields matter:
id— the unique Device ID.access_key— the credential used to authenticate with the MQTT service.mqtt_hub_url— the MQTT Hub Server assigned to this Device.
Registration credentials are shared between MQTT and HTTPS — the sameidandaccess_keywork for both transports.
Connect via MQTT
Connecting to Xyte over MQTT requires an MQTT v5–capable client library for your target language:
A comprehensive list of MQTT client implementations can be found at the official MQTT website.
Example: connecting with MQTT.js
Pass the following options to the client (using values from the Register Device API response):
protocolVersion—5, to enable MQTT v5.username— the Device'sid.password— the Device'saccess_key.clientId— the Device'sid.
Always set the protocol version explicitly. Without it, most clients negotiate down to MQTT v3.1.1 and you lose the v5 features Xyte relies on.
import mqtt from 'mqtt';
const client = mqtt.connect(URL, {
protocolVersion: 5,
username: DEVICE_ID,
password: ACCESS_KEY,
clientId: DEVICE_ID,
});Once the client is connected, you can subscribe to any of the available topics.
