El contenido no se encuentra disponible en el idioma seleccionado. Estamos trabajando continuamente para agregar más idiomas. Gracias por su apoyo.
- What's New
- Product Bulletin
- Service Overview
- Billing
-
Getting Started
-
Quick Device Access - Property Reporting and Command Receiving
- Subscribing to IoTDA
- Connecting a Smart Smoke Detector to the Platform (Quick Usage)
- Registering a Simulated Smart Street Light Device
- Using MQTT.fx to Simulate Communication Between the Smart Street Light and the Platform
- Using a Virtual Smart Street Light to Communicate with the Platform (Java SDK)
- Using a Virtual Smart Street Light to Communicate with the Platform (C SDK)
- Quick Device Access - Message Sending and Receiving
- Quick Application Access
-
Quick Device Access - Property Reporting and Command Receiving
-
User Guide
- Overview
- IoTDA Instances
- Resource Spaces
- Device Access
- Message Communications
- Device Management
-
Rules
- Overview
- Data Forwarding Process
- SQL Statements
- Connectivity Tests
- Data Forwarding to Huawei Cloud Services
- Data Forwarding to Third-Party Applications
- Data Forwarding Channel Details
- Data Forwarding Stack Policies
- Data Forwarding Flow Control Policies
- Abnormal Data Target
- Device Linkage
- Monitoring and O&M
- Granting Permissions Using IAM
-
Best Practices
- Introduction
-
Device Access
- Developing an MQTT-based Simulated Smart Street Light Online
- Developing a Smart Street Light Using NB-IoT BearPi
- Developing a Smart Smoke Detector Using NB-IoT BearPi
- Connecting and Debugging an NB-IoT Smart Street Light Using a Simulator
- Developing a Protocol Conversion Gateway for Access of Generic-Protocol Devices
- Connecting a Device That Uses the X.509 Certificate Based on MQTT.fx
- Connecting to IoTDA Based on the BearPi-HM_Nano Development Board and OpenHarmony 3.0
- Testing MQTT Performance Using JMeter
- Device Management
- Data Forwarding
- Device Linkage
-
Developer Guide
- Before You Start
- Obtaining Resources
- Product Development
- Development on the Device Side
- Development on the Application Side
-
API Reference
-
API Reference on the Application Side
- Before You Start
- Calling APIs
- API Overview
-
API
- Product Management
- Device Management
- Device Message
- Device Command APIs
- Device Property
- AMQP Queue Management
- Access Credential Management
- Data Forwarding Rule Management
-
Transition Data
- Push a Device Status Change Notification
- Push a Device Property Reporting Notification
- Push a Device Message Status Change Notification
- Push a Batch Task Status Change Notification
- Push a Device Message Reporting Notification
- Push a Device Addition Notification
- Push a Device Update Notification
- Push a Device Deletion Notification
- Push a Product Addition Notification
- Push a Product Update Notification
- Push a Product Deletion Notification
- Push an Asynchronous Device Command Status Change Notification
- Rule Management
- Device Shadow
- Group Management
- Tag Management
- Instance Management
- Resource Space Management
- Batch Task
- Device CA Certificate Management
- OTA Upgrade Package Management
- Message Broadcasting
- Device Tunnel Management
- Stack policy management
- Flow control policy management
- Device Proxy
- Device Policy Management
- Bridge Management
- Pre-provisioning Template Management
- Custom Authentication
- Codec Function Management
- Permissions and Supported Actions
- Examples
- Appendix
-
MQTT or MQTTS API Reference on the Device Side
- Before You Start
- Communication Modes
- Topics
- Device Connection Authentication
- Device Commands
- Device Messages
- Device Properties
-
Gateway and Child Device Management
- Platform Notifying a Gateway of New Child Device Connection
- Platform Notifying a Gateway of Child Device Deletion
- Gateway Synchronizing Child Device Information
- Gateway Updating Child Device Status
- Responding to a Request for Updating Child Device Statuses
- Gateway Requesting for Adding Child Devices
- Platform Responding to a Request for Adding Child Devices
- Gateway Requesting for Deleting Child Devices
- Platform Responding to a Request for Deleting Child Devices
- Software and Firmware Upgrade
- File Upload and Download
- Device Time Synchronization
- Device Reporting Information
- Device Log Collection
- Remote Configuration
- Device Tunnel Management
- HTTPS API Reference on the Device Side
- LwM2M API Reference on the Device Side
- Security Tunnel WebSocket API Reference
- Module AT Command Reference
- Change History
-
API Reference on the Application Side
- SDK Reference
-
FAQs
- Top FAQs
-
Solution Consulting
- In What Scenarios Can the IoT Platform Be Applied?
- What Are the Changes Brought by the Integration of IoT Device Management and IoTDA?
- Can I Enable IoTDA for IAM Users or Sub-Projects?
- Which Regions of Huawei Cloud Are Supported by the IoT Platform?
- Does Huawei Provide Modules, Hardware Devices, and Application Software?
- What Should I Do If I Want to Call an API But Have No Permissions to Do So as an IAM User? (Is It Edition-specific?)
- Why Was I Prompted to Grant Security Administrator Permissions When I Create a Rule or Set Resource File Storage?
- Which Resource Space Will Be Set As Default on the IoT Platform?
- How Does IoTDA Obtain Device Data?
- Is There Any Limitation on the Number of Resource Spaces and Devices I Can Add on the IoT Platform?
- Does the IoTDA Support Device Registration in Batches?
- Are There Any Limitations on the Use of the IoT Platform?
- What DTLS Encryption Algorithms Are Supported by the IoT Platform?
- Does the IoT Platform Support Conversion Between Big-Endian and Little-Endian for Binary Data?
- What Is NB-IoT?
- What Are the Components of the IoT Platform and What Hardware Architectures Does It Support?
- How Do I Obtain the Platform Access Address?
- Device Integration
- IoT Device SDKs
- LwM2M/CoAP Device Access
- MQTT-based Device Access
- Products Models
- Message Communications
- Subscription and Push
- Codecs
- OTA Upgrades
- Application Integration
- General Reference
- How Do an Application Call a Platform API for Authentication?
- What Can I Do If the SDK on the Application Side Reports the Missing request header'X-Auth-Token' for method parameter of type String?
- How Do I Obtain the Access Addresses and Certificates of the Old and New Domain Names?
- What Are the Differences in Access Authentication If I Use the New or Old Domain Names?
- How Does an Application Obtain Data Reported by Devices to the IoT Platform?
- How Do I Obtain the ID and Secret of an Application?
- Why Did an Application Fail to Call an API?
- How Does an Application Obtain Device IMEIs?
- How Does an Application Deliver a Cached Command?
- Do I Have to Use Java to Call the APIs of the IoT Platform?
- Why Were Devices Registered on the IoT Platform Deleted After a Period of Time?
- Can I Create the Same Product in Different Instances? Can the Product Name and Product ID Be the Same in Different Resource Spaces or the Same Resource Space?
- Can I Create the Same Device in Different Instances?
Show all
Copied.
Application Integration
How Do an Application Call a Platform API for Authentication?
A customer application can call the IAM API to obtain the X-Auth-Token or integrate the SDK to use the AK/SK authentication. The password of a Huawei Cloud account may need to be updated periodically. It is recommended that the production system integrate the SDKs for the Application Side of IoTDA and use AK/SK authentication.
What Can I Do If the SDK on the Application Side Reports the Missing request header'X-Auth-Token' for method parameter of type String?
Description:
An application is integrated with the IoTDA SDK and uses the AK/SK for authentication. However, the status code 400 is returned, and the error message is Missing request header 'X-Auth-Token' for method parameter of type String.
Possible Causes:
The AK/SK signature algorithm does not match the signature algorithm supported by the cluster.
Solutions:
- Use the common AK/SK Signature Algorithm to access the access address of ab IoTDA basic edition instance in the CN North-Beijing4 region.
- When accessing the access address of an IoTDA standard or enterprise edition instance, you need to specify the derived AK/SK signature algorithm. For details, see SDKs for the Application Side.
How Do I Obtain the Access Addresses and Certificates of the Old and New Domain Names?
No CA certificate is provided for the new domain name. For details about the access addresses of the new and old domain names and the certificate for the old domain name, see Obtaining Resources.
What Are the Differences in Access Authentication If I Use the New or Old Domain Names?
When you use the new domain name, the IAM API for authentication is called, and the Huawei Cloud account and password need to be carried in the request. When you use the old domain name, the authentication API of the IoT platform is called, and the application ID and secret need to be carried.
How Does an Application Obtain Data Reported by Devices to the IoT Platform?
Data forwarding rules are configured based on the rule engine.
- Data forwarding rules are configured based on the rule engine. The IoT platform calls the configured rules to forward device data to other Huawei Cloud services (such as Kafka, DIS, and OBS), third-party applications
- The IoT platform calls the configured rules to forward device data to third-party cloud services (such as Kafka, DIS, and OBS), from which you can obtain the data to implement your service.
How Do I Obtain the ID and Secret of an Application?
If you have enabled IoTDA before 00:00 on March 20, 2020 (GMT+08:00), you can perform the preceding operations to obtain the ID and secret. Otherwise, submit a service ticket to contact technical support.
- Check the access address and certificate of the API of the earlier version and click the button to access IoTDA.
- Select an application in the application list. The application ID is shown on the displayed page. Click Reset to obtain the secret.
Figure 1 Application details page
Why Did an Application Fail to Call an API?
- Check whether the network connection of the application is normal.
- Check whether the application access address and port number of the IoT platform in the request are correct.
- Run ping {application access address of the platform} to check whether the application can access the application access address of the platform.
- Run telnet {application access address of the platform } {port number} to check whether the application access port of the platform can be enabled.
- Check whether the application is integrated with the platform certificate. The certificate can be downloaded from Obtaining Resources.
- Check whether the parameters are correctly set based on the API Reference.
- When V3 APIs are used, the validity period of accessToken returned by calling the authentication API is 1 hour. After the validity period expires, other APIs cannot be called. In this case, call the authentication API to obtain the new accessToken and then call other APIs again.
- When V5 APIs are used, the validity period of X-Auth-Token returned by calling the authentication API is 24 hours. After the validity period expires, other APIs cannot be called. In this case, call the authentication API to obtain the new X-Auth-Token and then call other APIs again.
- If the previous steps do not resolve the issue, troubleshoot based on the error code returned when the API was called. For details about the error codes, see Error Codes. If an application has encapsulated error codes, you can use Postman to call the same API to obtain the original error code and description returned by IoTDA, and then rectify the fault based on the recommendations provided.
For example, if a message is displayed indicating that the node ID already exists when the API Creating a Device is called, check whether a device with the same node ID exists under your account. If no device with the same node ID is found under your account, submit a service ticket and contact technical support to check whether the node ID is used for device access.
How Does an Application Obtain Device IMEIs?
After the bindDevice notification is subscribed to, the IoT platform pushes the IMEI and deviceId to the application when a device is connected to the platform. For details, see the description of the API for subscribing to service data.
How Does an Application Deliver a Cached Command?
Set expireTime to a value greater than 0 when calling the API for creating a command.
expireTime indicates the validity period of a command, which is measured in seconds. The command will not be delivered after the specified time elapses. If this parameter is not specified, the default validity period is 48 hours (172,800 seconds).
Do I Have to Use Java to Call the APIs of the IoT Platform?
No. The APIs of the platform are standard RESTful APIs that support multiple languages such as Java, Python, and Go. For details, see SDKs for the Application Side.
Why Were Devices Registered on the IoT Platform Deleted After a Period of Time?
When a device is registered by calling an API, the timeout parameter must be configured. After the registration is complete, if the device is not bound to the platform within the time specified by timeout, the platform will delete the device.
The value range of timeout is 0 to 2147483647 (68 years), which is measured in units of seconds. When this parameter is set to 0, the timer never expires and the device is never deleted as a result of a timeout.
Can I Create the Same Product in Different Instances? Can the Product Name and Product ID Be the Same in Different Resource Spaces or the Same Resource Space?
The same product can be created in different instances. The same product can be created in different resource spaces of the same instance.
Can I Create the Same Device in Different Instances?
The same device can be created in different instances. The same device cannot be created under the same instance.
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.
For any further questions, feel free to contact us through the chatbot.
Chatbot