Help Center > > FAQs> Secondary Development> FAQs About Application Development> Subscription and Push> How Do I Obtain the Callback URL When Calling the Subscription API

How Do I Obtain the Callback URL When Calling the Subscription API

Updated at: Jul 31, 2019 GMT+08:00

The following assumes that an NA subscribes to device data changes. The process of subscription and push is as follows:

  1. The NA calls the subscription API of the IoT platform to subscribe to device data changes (the request carries the callback URL and notification type). The IoT platform stores the callback URL and the notification type in the subscription list.
  2. The device reports data to the IoT platform.
  3. Based on the callback URL stored during the subscription, the IoT platform automatically pushes the device data to the NA.

What Is a Callback URL?

The callback URL is the RESTful API address defined by the NA for external access. When the IoT platform pushes message to the NA, it calls the RESTful API of the NA to send data to the NA.


The request method of the callback URL must be POST.

How Do I Obtain a Callback URL?

The callback URL consists of the communication mode, access address of the NA, and URL of the RESTful API. An example value is https://server:port/url.

HTTPS is recommended to secure the communication between the NA and IoT platform. When HTTPS is used for communication, the IoT platform must load a certificate and export the HTTPS push certificate. For details, see How Do I Export the HTTPS Push Certificate.

The access address of the NA varies according to the network where the NA is located.

  • If the NA is deployed on the public network, the access address of the NA is the public IP address of the NA:port (or domain name:port).
  • If the NA is deployed on the LAN, you must configure network penetration on the NA to generate the public network access address of the NA. For details, obtain the configuration procedure of the network penetration tool from the Internet.

The callback URL can be the same or different for subscription of different notification types. It can be self-defined according to service requirements.

Did you find this page helpful?

Submit successfully!

Thank you for your feedback. Your feedback helps make our documentation better.

Failed to submit the feedback. Please try again later.

Which of the following issues have you encountered?

Please complete at least one feedback item.

Content most length 200 character

Content is empty.

OK Cancel