Updated on 2026-09-30 GMT+08:00

Usage

Process

Figure 1 Broadcast communication sequence diagram

Procedure

  1. A device initiates connection authentication. For details about how to set authentication parameters, see MQTT Device Connection Authentication.
  2. After the device is authenticated, it initiates a broadcast topic subscription. The broadcast topic must be prefixed with $oc/broadcast/. Example:

    $oc/broadcast/test  

  3. The application server delivers a broadcast message (see Broadcasting a Message) and specifies the topic name and message content.

    POST https://{Endpoint}/v5/iot/{project_id}/broadcast-messages
    Content-Type: application/json
    X-Auth-Token: ********
    
    {
      "topic_full_name" : "$oc/broadcast/test",
      "message" : "eyJhIjoxfQ=="
    }

    The topic must be prefixed with $oc/broadcast/, and the message content must be encoded using Base64.

  4. The device receives the broadcast message. Example message:

    Topic: $oc/broadcast/test  
    Data content
    {"a":1}