Used to create a device on the Open Platform and associate its type, model, and device information.
Production: https://open.eye4cloud.com/{{open_id}}/open/v1/device/create| Field Name | Type | Required | Description |
|---|---|---|---|
| device_id | string | Yes | Unique device ID (IMEI can also be used) |
| 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 The data field when generating sign |
| imei | string | No | Device IMEI; an empty string can be passed |
| data | string | No | Custom data; an empty string can be passed |
| password | string | No | Device password used for streaming, recording, and other functions |
| device_type_id | int | Yes | See the mapping table above (type ID) |
| model_number | int | Yes | See the mapping table above (model ID) |
| device_name | string | No | If omitted, the default trial device type name is used |
| state | int | No | If omitted, the device is active by default: 1 means active and 2 means deactivated. |
{
"device_id": "xxx",
"timestamp": 1755685731,
"nonce": "dask43hfad",
"sign": "xxxxxxx",
}
curl 'https://open.eye4cloud.com/xxxxx/open/v1/device/create' \
-H 'Content-Type: application/json' \
--data-raw '{
"device_id": "xxx",
"timestamp": 1757472185,
"nonce": "",
"sign": "",
}'
| 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 |
| data | object |
Example:
{
"error_code": 0,
"error_message": "success",
"error_tips": "",
"data": {}
}