The Message Queue for MQTT API allows you to make API requests by using HTTP, SDKs, and OpenAPI Explorer.

Call API operations by using HTTP

Message Queue for MQTT API operations use the RPC protocol. You can call Message Queue for MQTT API operations by sending HTTP GET requests.

When you send an HTTP POST request, use the following syntax:
http://Endpoint/?Action=xx&Parameters
where:
  • Endpoint: the endpoint of the Message Queue for MQTT API is onsmqtt.[regionId].aliyuncs.com. For more information about [regionId], see Endpoints.
  • Action: the name of the operation being performed. For example, to apply for a token, you must set the Action parameter to ApplyToken.
  • Version: the version of the API. For example, the version of the Message Queue for MQTT API is 2020-04-20.
  • Parameters: the request parameters for the operation. Separate multiple parameters with ampersands (&).

    Request parameters include both common parameters and operation-specific parameters. Common parameters include the API version and authentication-related parameters. For more information, see Common parameters.

Call API operations by using SDKs

The Message Queue for MQTT API supports SDKs for multiple programming languages. The SDKs automatically sign requests for you. For more information, see Obtain the SDKs for the cloud API.

Call API operations by using OpenAPI Explorer

OpenAPI Explorer is a visual tool for calling APIs. OpenAPI Explorer allows you to use a web page or command-line interface (CLI) to call APIs provided by Alibaba Cloud services and Alibaba Cloud Marketplace. You can view the request and response parameters of each API operation call. In addition, OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

You can call API operations by accessing OpenAPI Explorer or using debugging features described in the API documentation.