1.1: Check the response from the query API. If the WebPwd field is empty, change the device plaintext password; if WebPwd has a value, proceed directly to step 2.1.
1.2: CGI used to change the device plaintext password:
CGI field description for changing the password:
| Field Name | Type | Description |
|---|---|---|
| OwnerUser | string | Owner Username |
| OwnerPwd | string | Owner Password |
| ExUser | string | User |
| ExPwd | string | Plaintext Password |
| ExUserSwitch | string | Plaintext password: 0=off, 1=on |
After the password is configured, must be called again get_params.cgi?, then confirm that the returnedWebPwdfield has been assigned successfully before continuing with subsequent operations.
Build the RTSP stream URL using the IP returned by the API and the WebPwd device plaintext password:
rtsp://admin:{{WebPwd}}@{{IP}}:10554/tcp/av0_0
Field Assembly Description
| Placeholder | Type | Description |
|---|---|---|
| admin | string | Fixed value |
| 10554 | string | Default device RTSP port |
| /tcp/av0_0 | string | Main stream channel path |
| {{WebPwd}} | string | Device plaintext password (used for RTSP authentication) |
| {{IP}} | string | Device IP address |
Get the Device RTSP Stream URL
Production: https://open.eye4cloud.com/{{open_id}}/open/v1/device/getRtspStreamAddress| Field Name | Required | Type | Description |
|---|---|---|---|
| device_id | Yes | string | Device ID |
| 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 |
| password | Yes | string | Device password; it cannot be the default device password. When restoring factory settings, pass the new device password. |
| data | No | string | Device DATA; an empty string can be passed |
| imei | No | string | Device IMEI; an empty string can be passed |
curl 'https://open.eye4cloud.com/{{open_id}}/open/v1/device/getRtspStreamAddress' \
-H 'Content-Type: application/json' \
--data-raw '{
"device_id": "xxxx",
"timestamp": 1758867195,
"nonce": "",
"sign": "",
"password": ""
}'
| 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 | {} |
| data.rtsp_url | string | RTSP stream URL |
Example:
{
"error_code": 0,
"error_message": "success",
"error_tips": "",
"data": {
"rtsp_url":"rtsp://admin:{{WebPwd}}@{{IP}}:10554/tcp/av0_0"
}
}