The device must be online. Initialization is complete only after all configuration data has been delivered to the device and the full process has finished. The password is required. If a private password must be delivered, use the same password when possible to avoid compatibility issues with some later CGI operations.
Production: https://open.eye4cloud.com/{{open_id}}/open/v1/device/initDevice| Field Name | Type | Required | Description |
|---|---|---|---|
| device_id | string | Yes | Device ID |
| timestamp | int64 | Yes | Timestamp in seconds |
| nonce | string | Yes | Random string, 8-20 characters |
| sign | string | Yes | See "Sign Generation Examples" for the implementation details |
| imei | string | No | Device IMEI; an empty string can be passed |
| data | string | No | Custom data; an empty string can be passed |
| password | string | Yes | Set the Open Platform Mode Password |
{
"device_id": "xxx",
"timestamp": 1755685731,
"nonce": "dask43hfad",
"sign": "xxxxxxx",
"password": ""
}
curl 'https://open.eye4cloud.com/xxxxx/open/v1/device/initDevice' \
-H 'Content-Type: application/json' \
--data-raw '{
"device_id": "xxx",
"timestamp": 1757472185,
"nonce": "",
"sign": "",
"password": ""
}'
| Field Name | Type | Description |
|---|---|---|
| error_code | int | Status code: 0 indicates success; other values indicate an error |
| error_message | string | Error message; success indicates a normal response |
Example:
{
"error_code": 0,
"error_message": "success",
"error_tips": ""
}