Eye4Cloud Open Platform Device Management Documentationv1.1.15

2.1.11 Bind Device P2P (supported only by the new Open Platform firmware)

POSTProduction: https://open.eye4cloud.com/{{open_id}}/open/v1/device/bindP2p
Request Data
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
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
region int No Region: 0 China (default), 1 Southeast Asia, 2 Middle East/Türkiye, 3 Middle East/Iran, 4 North America, 5 Europe
Request Example
JSON
{
    "device_id": "xxx",
    "timestamp": 1755685731,
    "nonce": "dask43hfad",
    "sign": "xxxxxxx",
    "password": "",
    "region": 0
}
CURL Request Example
CURL
curl 'https://open.eye4cloud.com/xxxxx/open/v1/device/bindP2p' \
  -H 'Content-Type: application/json' \
  --data-raw '{
    "device_id": "xxx",
    "timestamp": 1757472185,
    "nonce": "",
    "sign": "",
    "password": "",
    "region": 0
}'
Response Data
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.p2pid string Device P2P ID
data.initstring string P2P Encrypted String
data.type int Type (0=self-developed)

Example:

JSON
{
    "error_code": 0,
    "error_message": "success",
    "error_tips": "",
    "data": {
      "p2pid": "xxxx",
      "initstring": "skadjh123",
      "type": 0
    }
}