Message Queue for MQTT You can call the API by using HTTP, SDK, or OpenAPI Explorer.

Call API operations by using HTTP

Message Queue for MQTT The API for RPC is in RPC style. You can call Message Queue for MQTT API.

The request structure is as follows:
  • Endpoint: Message Queue for MQTT the service access address of [******] is onsmqtt.[regionId][ regionId], see Endpoint.
  • 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 to use, Message Queue for MQTT the API version of 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 request 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 SDKs for the Message Queue for MQTT API.

Call API operations by using OpenAPI Explorer

OpenAPI Explorer is a visual tool for calling APIs. OpenAPI Explorer allows you to call APIs of Alibaba Cloud services and APIs provided in Alibaba Cloud Marketplace. You can call these APIs on a webpage or command-line interface (CLI). In addition, OpenAPI Explorer allows you to view the request and response of each API call and dynamically generate SDK sample code.

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


Message Queue for MQTT The API access address for is as follows: onsmqtt.[regionId] [regionId] is the ID of the region where the Message Queue for MQTT instance is located.

Message Queue for MQTT Supported OpenAPI regions, and the corresponding regionId and domain as shown in the following table.

Region Region ID Domain
Internet mq-internet-access
China (Chengdu) cn-chengdu
China (Hangzhou) cn-hangzhou
China (Shanghai) cn-shanghai
China (Qingdao) cn-qingdao
China (Beijing) cn-beijing
China (Zhangjiakou) cn-zhangjiakou
China (Hohhot) cn-huhehaote
China (Shenzhen) cn-shenzhen
China (Hong Kong) cn-hongkong
India (Mumbai) ap-south-1
Singapore ap-southeast-1
Australia (Sydney) ap-southeast-2
Malaysia (Kuala Lumpur) ap-southeast-3
Indonesia (Jakarta) ap-southeast-5
Japan (Tokyo) ap-northeast-1
Germany (Frankfurt) eu-central-1
US (Silicon Valley) us-west-1
US (Virginia) us-east-1
East China 1 Finance cn-hangzhou-finance
South China 1 Finance cn-shenzhen-finance-1
China East 2 Finance cn-shanghai-finance-1
China North 2 Ali Gov cn-north-2-gov-1