2.1.1 Get the Camera WebRTC Stream URL on the Server

Get the camera WebRTC playback URL by Device ID. A single-lens device returns one URL; a multi-lens device returns one URL per lens. Use the URL list returned by the API as the source of truth.

POSTProduction: https://open.eye4cloud.com/{{open_id}}/open/v1/device/getWebrtcAddress
Request Data
Field Name Required Type Description
device_id Yes string Unique camera ID
password Yes string Device password; if omitted, the password registered on the Open Platform is used for verification. If the device is not registered, register it on the Open Platform first
timestamp Yes int64 Timestamp in seconds
nonce Yes string Random string, 8-20 characters
sign Yes string See "Sign Generation Examples" for the implementation details
When generating sign, the data field may be omitted
data No string Device DATA; an empty string can be passed
imei No string Device IMEI; an empty string can be passed
media No int Specify the streaming media server,
when omitted or 0 is passed, use the China Telecom server;
3 means the China Mobile server
Request Example
JSON
{
    "device_id": "xxx",
    "timestamp": 1755685731,
    "nonce": "dask43hfad",
    "sign": "xxxxxxx",
}
CURL Request Example
CURL
curl 'https://open.eye4cloud.com/xxxxx/open/v1/device/getWebrtcAddress' \
  -H 'Content-Type: application/json' \
  --data-raw '{
    "device_id": "xxx",
    "timestamp": 1757472185,
    "nonce": "",
    "sign": "",
}'
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 object Stream URL list (one URL for single-lens devices and multiple URLs for multi-lens devices)
data.list array WebRTC playback URL list (multiple URLs are returned for multi-lens devices)
data.backup_list array Backup Playback URL

Example:

JSON
{
    "error_code": 0,
    "error_message": "success",
    "error_tips": "",
    "data": {
        "list": [
            "https://example.com/DEMO_RESOURCE&nonce=&sign=&stream=DEMO_STREAM_001×tamp=&type=play&vp_openid=",
            "https://example.com/DEMO_RESOURCE&nonce=&sign=&stream=DEMO_STREAM_001×tamp=&type=play&vp_openid="
        ],
        "backup_list": [
            "https://example.com/DEMO_RESOURCE&nonce=&sign=&stream=DEMO_STREAM_001×tamp=&type=play&vp_openid=",
            "https://example.com/DEMO_RESOURCE&nonce=&sign=&stream=DEMO_STREAM_001×tamp=&type=play&vp_openid="
        ]
    }
}