https://open.eye4cloud.com/{{open_id}}/open/v1/device/getP2pInfo| 字段名 | 类型 | 是否必填 | 备注 |
|---|---|---|---|
| device_id | string | 是 | 设备唯一id(可以使用 IMEI) |
| timestamp | int64 | 是 | 时间戳,单位:秒 |
| nonce | string | 是 | 随机字符串,8~20个字符 |
| sign | string | 是 | 具体实现方法,请参考《生成sign的示例代码》 生成sign时data字段 |
| imei | string | 否 | 设备IMEI,可传空字符串 |
| data | string | 否 | 自定义data,可传空字符串 |
| password | string | 是 | 设备密码 |
{
"device_id": "xxx",
"timestamp": 1755685731,
"nonce": "dask43hfad",
"sign": "xxxxxxx",
"password": ""
}
curl 'https://open.eye4cloud.com/xxxxx/open/v1/device/getP2pInfo' \
-H 'Content-Type: application/json' \
--data-raw '{
"device_id": "xxx",
"timestamp": 1757472185,
"nonce": "",
"sign": "",
"password": ""
}'
| 字段名 | 类型 | 备注 |
|---|---|---|
| error_code | int | 状态码:0正常,其他异常 |
| error_message | string | 错误信息:正常为success |
| data.p2pid | string | 设备p2pid |
| data.initstring | string | p2p加密字符串 |
| data.type | int | 类型(0自研,1尚云) |
| data.vpType | int | app连接使用 |
示例:
{
"error_code": 0,
"error_message": "success",
"error_tips": "",
"data": {
"p2pid": "xxxx",
"initstring": "skadjh123",
"type": 0
"vpType":0
}
}