Broadcasts a message to all devices of a specified product or all devices that subscribe to a specified topic.


  • Each Alibaba Cloud account can run only 1 query per second (QPS) to broadcast a message to devices that subscribe to a topic.
  • Each Alibaba Cloud account can run only 1 query per minute (QPM) to broadcast a message to all online devices of a product.
    Note RAM users of an Alibaba Cloud account share the quota of the account.


Alibaba Cloud provides OpenAPI Explorer to simplify API usage. OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes PubBroadcast

The operation that you want to perform. Set the value to PubBroadcast.

MessageContent String Yes aGVsbG93b3JsZA

The body of the message to be sent. The maximum size of a message is 64 KB.

To generate a message body, you must convert the raw message into binary data and perform Base64 encoding.

ProductKey String Yes aldeji3*****

The ProductKey of the devices to which the message is broadcasted.

IotInstanceId String No iot_instc_pu****_c*-v64********

The ID of the instance. You can view the instance ID on the Overview page in the IoT Platform console.

  • If your instance has an ID, you must configure this parameter. If you do not set this parameter, the call fails.
  • If your instance has no Overview page or ID, you do not need to set this parameter.

For more information, see Overview.

TopicFullName String No /broadcast/UPqSxj2vXXX/xxx

The name of the topic. This parameter is optional.

  • If you do not specify this parameter, the message is pushed to all online devices that have the specified ProductKey. Devices receive the message from the following broadcast topic: /sys/${productKey}/${deviceName}/broadcast/request/${MessageId}. The MessageId variable is generated by IoT Platform.
  • If you specify this parameter, the message is pushed to the devices that have the specified ProductKey and subscribe to the specified topic. You must specify a topic by using the following syntax: /broadcast/${productKey}/A custom field. Replace ${productKey} with the ProductKey of the devices that receive the message. For the custom field, you can specify a value based on your needs.
  • When you develop devices, use code to define a broadcast topic. You do not need to create a topic in the IoT Platform console.
  • A maximum of 1,000 devices can subscribe to a topic. If the number of devices exceeds the limit, you can divide the devices into groups. For example, you can divide 5,000 devices into five groups each containing 1,000 devices. In this case, you must call this operation five times and set the value of the custom field to group1, group2, group3, group4, and group5, respectively. Then, configure the devices so that each group of devices subscribes to the corresponding topic.

In addition to the preceding operation-specific request parameters, you must specify common request parameters when you call this operation. For more information, see Common request parameters.

Response parameters

Parameter Type Example Description
Code String iot.system.SystemException

The error code returned if the call fails. For more information, see Error codes.

ErrorMessage String A system exception occurred.

The error message returned if the call fails.

MessageId Long 1234291569964771840

The message ID generated by IoT Platform when the message is sent.

RequestId String BB71E443-4447-4024-A000-EDE09922891E

The ID of the request.

Success Boolean true

Indicates whether the call was successful.

  • true: The call was successful.
  • false: The call failed.


Sample requests:
&<Common request parameters>

Sample success responses

XML format


JSON format


Error codes

For a list of error codes, visit the API Error Center.