Subscribes to one or more topics for a device.

Usage notes

  • The device that needs to subscribe to topics must be connected to IoT Platform and online.
  • You can call this operation to subscribe to the topics of a specified device. You can specify a maximum of 10 topics in a single call.

QPS limits

Each Alibaba Cloud account can run up to 10 queries per second (QPS).

Note The RAM users of an Alibaba Cloud account share the quota of the Alibaba Cloud account.


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 SubscribeTopic

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

DeviceName String Yes device1

The DeviceName of the device to which the topic belongs.

ProductKey String Yes a1Q5XoY***

The ProductKey of the product to which the device belongs.

Topic.N RepeatList Yes /a1Q5XoY***/device1/user/get

The topics to which you want to subscribe. You can specify a maximum of 10 topics.

The topics must have the Subscribe or Publish and Subscribe permissions.

IotInstanceId String No iot-06***

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

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

For more information, see Overview.

In addition to the preceding operation-specific request parameters, you must configure 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 request fails.

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

    "RequestId": "32B9828A-25DD-48E2-8E26-D1664B341940",
    "Success": true