When you develop device SDKs, IoT Platform SDKs, or AMQP SDKs, you must configure the access domain name as the endpoint of the target instance. This topic describes how to obtain endpoint information for each instance type.
Prerequisites
-
For SDK development guides, see Device-side SDKs, IoT Platform SDK, and Connect an AMQP client.
-
For a comparison of instance types, see Instance overview.
Instance
Region
Description
How to view
Legacy public instance
China (Shanghai), Japan (Tokyo), Singapore, Germany (Frankfurt), US (Silicon Valley), and US (Virginia)
On the Overview page in the IoT Platform console, no value is displayed for the instance ID.
The Development Configurations panel is not available in the IoT Platform console. For endpoint details, see View endpoints for legacy public instances.
Public instance
-
On the Overview page in the IoT Platform console, a value is displayed for the instance ID, and an Instance Details page is available.
-
A public instance is created by default when you activate IoT Platform.
The Development Configurations panel is available in the console. View endpoints for public and Enterprise Edition instances.
Enterprise Edition instance
China (Shanghai), China (Beijing), China (Shenzhen), Japan (Tokyo), Singapore, Germany (Frankfurt), US (Silicon Valley), and US (Virginia)
-
Background
-
Endpoint types
-
Endpoints are categorized into public endpoints and VPC endpoints. VPC endpoints reduce network latency and public bandwidth costs while improving connection security and stability.
-
Devices can connect to IoT Platform over MQTT, CoAP, or HTTP. Premium Enterprise Edition instances also support VPC connections, allowing devices to use the MQTT VPC endpoint.
-
To access IoT Platform from an ECS instance within a VPC, configure VPC endpoints for AMQP server-side subscriptions and IoT Platform API calls.
-
-
Instance types
-
Standard and Premium Enterprise Edition instances in China (Shanghai), China (Beijing), and China (Shenzhen) support binding a fixed IP to the MQTT endpoint.
-
Premium Enterprise Edition instances require manual creation of a dedicated MQTT endpoint. You can also customize the port number and certificate.
-
View endpoints for legacy public instances
|
Communication protocol |
Endpoint format |
Port |
|
MQTT |
|
1883 or 443. Use port 443 for MQTT over WebSocket. |
|
CoAP |
|
|
|
HTTP |
Unique-certificate-per-device: |
443. |
|
Pre-registration for unique-certificate-per-product: Important
Pre-registration for unique-certificate-per-product over HTTPS is supported only in the China (Shanghai) region. |
||
|
AMQP |
|
|
|
IoT Platform API |
The request structure is |
Not applicable. |
|
ID² |
Supported only in the and Japan (Tokyo) regions. |
1883. |
Replace the following parameters in the endpoint URLs.
|
Parameter |
Description |
|
|
The ProductKey of the product that contains your device. Log in to the IoT Platform console and find the ProductKey on the device details page. |
|
|
The ID of the region where your device resides. For region IDs, see Supported regions. |
|
|
Your Alibaba Cloud account ID. Log in to the IoT Platform console and hover over your profile picture to view the account ID. |
View endpoints for public and Enterprise Edition instances
-
Log on to the IoT Platform console. In the upper-left corner of the page, select the region where your instance is located.
-
On the Overview page, click the instance alias or ID.
-
In the upper-right corner of the Instance Details page, click View Development Configurations.
-
In the Development Configurations panel, click the MQTT, CoAP, AMQP, or other protocol tabs to view the endpoint information. Click Copy next to the domain name to copy the endpoint address. Click the help icon
to view the port. For port details, see View endpoints for legacy public instances.Important-
For Premium Enterprise Edition instances, you must create the MQTT endpoint manually. Create a dedicated MQTT endpoint for a Premium Enterprise Edition instance.
-
For device connections over HTTPS, only the unique-certificate-per-device and pre-registration-based unique-certificate-per-product methods are supported. These methods use different endpoints:
-
If you use the unique-certificate-per-device method, the endpoint is displayed on the HTTP tab.
-
The pre-registration-based unique-certificate-per-product method is supported only in the China (Shanghai) region. The endpoint is
iot-auth.cn-shanghai.aliyuncs.com.
-
-
If you have enabled ID² authentication for your Enterprise Edition instance, the ID² Authentication Address on the Manage ID² tab of the Development Configurations panel is not displayed. For the address format, see View endpoints for legacy public instances.
The Development Configurations panel has two sections: Public Endpoint and VPC Network Endpoint. Each section contains tabs for supported protocols (MQTT, CoAP, HTTP, AMQP). On these tabs, you can find endpoint addresses, connection ports, and related settings. For example, the MQTT tab shows the endpoint address, connection port, and the Fixed IP binding status.
-
Bind a fixed IP to an endpoint
This feature is available only for Standard and Premium Enterprise Edition instances in the China (Shanghai), China (Beijing), and China (Shenzhen) regions.
A fixed IP ensures that DNS resolution remains stable when IoT Platform scales its IP addresses. If you use IoT SIM cards with data plans restricted to specific IP addresses and your carrier does not support domain name configuration, add the fixed IP to the carrier's IP allowlist.
In some cases, such as a carrier data center relocation, the IP address may change. If your device connects using a fixed IP instead of an endpoint, you must push the new IP to the device through cloud-to-device commands or an OTA update. Otherwise, the device cannot connect to IoT Platform.
We recommend using an endpoint for device connections. IoT Platform notifies you in advance of any IP address changes.
To bind a fixed IP to the public MQTT endpoint of an instance:
-
For public instances, you can assign two fixed IPs for MQTT connections.
-
In the upper-right corner of the Instance Details page of the public instance, click View Development Configurations.
-
In the Development Configurations panel, on the MQTT tab, click Set next to Fixed IP.
-
In the dialog box that appears, click OK to obtain two fixed IPs.
If the fixed IPs are no longer needed for MQTT connections, click Unbind.
-
-
For Premium Enterprise Edition instances, a fixed IP is automatically assigned when you manually create a public MQTT endpoint. Unbinding is not supported.
Create a dedicated MQTT endpoint for Premium Enterprise Edition instances
To create an MQTT endpoint for a Premium Enterprise Edition instance:
-
In the upper-right corner of the Instance Details page of the Premium Enterprise Edition instance, click View Development Configurations.
-
In the Development Configurations panel, on the MQTT tab, click Create.
-
In the Create Endpoint dialog box, configure the endpoint information.
Parameter
Description
Custom port
The port number for MQTT connections. The default port is 1883.
Enable VPC
-
Yes: Enables VPC connections. Configure the VPC, vSwitch Zone, vSwitch, and security group.
This creates both public and VPC MQTT endpoints.
ImportantTo enable an MQTT endpoint over a VPC, activate the PrivateLink service. If PrivateLink is not activated, click Enable to go to the VPC console and activate it.
-
No (Default): Disables VPC connections.
This creates only a public MQTT endpoint.
ImportantIf you select No, you cannot enable VPC connections for this endpoint later.
Authorization
If you enable VPC connections, grant authorization.
Click Authorize. The system creates a role and authorization policy to allow devices to connect to IoT Platform over the VPC. Service-linked roles.
VPC
After you enable VPC connections and grant authorization, configure these parameters.
Select an existing VPC and vSwitch.
You can click Create VPC or Create vSwitch to create new ones. Create a VPC and Create a vSwitch.
vSwitch zone
vSwitch
Security group
After you enable VPC connections and grant authorization, configure this parameter.
Select an existing security group.
You can click Create Security Group to create one. Create a security group.
-
-
Click OK.
After the endpoint is created, the new endpoint appears under MQTT Device Connection.
Customize the MQTT certificate for Premium Enterprise Edition instances
To customize the certificate and domain name for MQTT connections to a Premium Enterprise Edition instance:
The same custom certificate is used for both public and VPC endpoints.
-
In the upper-right corner of the Instance Details page of the Premium Enterprise Edition instance, click View Development Configurations.
-
In the Development Configurations panel, on the MQTT tab, click Configure under Custom Certificate.
-
In the Custom Certificate dialog box, for Custom Configuration, click On.
NoteIf Custom Configuration is already enabled, skip this step.
-
Enter the PEM-formatted certificate content and private key obtained from your certificate authority (CA), then click OK.
WarningUpdating the certificate content or private key after initial configuration may cause certificate verification to fail, which disconnects devices from IoT Platform and interrupts services. Proceed with caution.
The page displays the custom domain name parsed from your certificate. Use this domain name for MQTT device connections.
ImportantConfigure a CNAME record with your domain provider to resolve the custom domain name to the instance's default MQTT endpoint.