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

Call API operations by using HTTP

Message Queue for MQTTThe API for RPC is in RPC style. You can call Message Queue for MQTTAPI.

The request structure is as follows:
http://Endpoint/?Action=xx&Parameters
Where
  • Endpoint: Message Queue for MQTTthe service access address of [******] is onsmqtt.[regionId].aliyuncs.com.[ 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 MQTTthe 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 an OpenAPI SDK.

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.

Endpoint

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

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

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