Help Center>
IoT Device Access>
User Guide>
Message Communications>
Data Reporting>
Device Reporting Messages>
Message Reporting Usage
Updated on 2023-10-18 GMT+08:00
Message Reporting Usage
Description
Figure 1 Process of device message reporting
![Click to enlarge](https://support.huaweicloud.com/intl/en-us/usermanual-iothub/figure/en-us_image_0000001602485721.png)
- Product and device creation: For details, see Creating a Product and Registering an Individual Device.
- Device authentication: The platform checks whether the device has the access permission.
- Device message reporting: Devices report messages through protocols such as MQTT and HTTP.
Use different APIs for different protocols.
MQTT: Use the message reporting APIs for MQTT devices. The following is an example of MQTT device message reporting.Topic: $oc/devices/{device_id}/sys/messages/up Data format example: { "content": {"hello":"123"} }
HTTPS: Use the message reporting APIs for HTTP devices. To obtain access_token for HTTP devices, see Authenticating a Device. The following is an example of HTTPS device message reporting.POST https://{endpoint}/v5/devices/{device_id}/sys/messages/up Content-Type: application/json access_token: d144a524-1997-4b99-94bf-f27128da8a34 { "name": "name", "id": "id", "content": "messageUp" }
- For details about devices using different protocols, see MQTT Device Reporting a Message and HTTP Device Reporting a Message.
- Data forwarding: With the data forwarding function, data can be forwarded to applications or other Huawei Cloud services for storage and processing.
Parent topic: Device Reporting Messages
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot