必须保证设备在线,绑定用户并下发私有密码,此接口只在第一次下发生效,重复下发无效。如需再次下发要先复位设备
https://open.eye4cloud.com/{{open_id}}/open/v1/device/bindUser| 字段名 | 类型 | 是否必填 | 备注 |
|---|---|---|---|
| device_id | string | 是 | 设备id |
| timestamp | int64 | 是 | 时间戳,单位:秒 |
| nonce | string | 是 | 随机字符串,8~20个字符 |
| sign | string | 是 | 具体实现方法,请参考《生成sign的示例代码》 |
| imei | string | 否 | 设备IMEI,可传空字符串 |
| data | string | 否 | 自定义data,可传空字符串 |
| password | string | 是 | 设置开放平台模式密码 |
| uid | string | 是 | 绑定用户id |
| area | int | 是 | 设备区域 0 未知 1 中国 2 东南亚(含港澳台) 3 美国 4 欧洲 |
| offset | int | 是 | UTC加多少秒等于本地时间 |
| timeZone | string | 否 | 时区,不传默认Asia/Shanghai |
{
"device_id": "xxx",
"timestamp": 1755685731,
"nonce": "dask43hfad",
"sign": "xxxxxxx",
"password": "" ,
"uid": "xxx",
"area": 1,
"offset": 28800,
"timeZone": "Asia/Shanghai"
}
curl 'https://open.eye4cloud.com/xxxxx/open/v1/device/bindUser' \
-H 'Content-Type: application/json' \
--data-raw '{
"device_id": "xxx",
"timestamp": 1757472185,
"nonce": "",
"sign": "",
"password": "",
"uid": "xxx",
"area": 1,
"offset": 28800,
"timeZone": "Asia/Shanghai"
}'
| 字段名 | 类型 | 备注 |
|---|---|---|
| error_code | int | 状态码:0正常,其他异常 |
| error_message | string | 错误信息:正常为success |
示例:
{
"error_code": 0,
"error_message": "success",
"error_tips": ""
}