AccountDevice for MQTT Subscription

Hi,

previously we could create AccountDevices / TeamDevices, that we could use to subscribe to all topics of all our devices. However I don't seem to find the relevant endpoints in the API documention anymore. What is the suggested way to generate or retrieve valid client credentials to use in an backend service?

Kind regards

Johannes

  • Hi Johannes,

    The functionality you're referring to is now called MQTT team devices (previously known as AccountDevices/TeamDevices). These still exist and allow a backend service to subscribe to all device topics within your team.

    MQTT Team Devices

    An MQTT team device has MQTT permissions to subscribe to the message traffic of all devices associated with your team, and can also publish messages to any device on your team. [Device types]

    Creating an MQTT Team Device

    You can create MQTT team devices using the CreateTeamDevice endpoint. For a given MQTT team device, you can also:

    • Get or rotate its certificate
    • Delete the device

    See the full list of endpoints under MQTT Team Devices. [Device types]

    Subscribing to All Device Topics

    Once you have the credentials, you can use wildcard subscriptions. For example:

    Purpose Topic
    All messages from all devices {mqttTopicPrefix}/#
    All messages from a specific device {mqttTopicPrefix}/m/d/nrf-12345/#
    D2C messages from all devices {mqttTopicPrefix}/m/d/+/d2c
    All shadow messages from all devices {mqttTopicPrefix}/+/shadow/#
    All FOTA job messages from all devices {mqttTopicPrefix}/+/jobs/#

    [Device types]

    Authentication

    All MQTT connections require Mutual TLS on port 8883 using an X.509 device certificate. To get your mqttTopicPrefix, call the FetchAccountInfo REST endpoint (requires an API key). [MQTT Overview]

    Thanks,

Related