Home / Docs Center / Device API Reference / onvifLANCameraAuthentication

onvifLANCameraAuthentication

Device API Reference · ONVIF LAN Cameras

Project: Device API Documentation (New Version) | page_id: 263

Brief Description:

  • Enter the camera ONVIF username and password to obtain the camera stream and other information.

Request URL:
- /xsw/onvif/auth

Request Method:
- POST

Parameters:

Parameter Required Type Description
ip Yes string Camera IP
user Yes string Camera username
pass Yes string Camera password

Response Example

  {
        "ip": "192.168.0.67",
        "authFailed": 0,
        "userName": "admin",
        "password": "admin",
        "streams": [{
            "uri": "rtsp://192.168.0.67:554/cam/realmonitor?channel=1\u0026subtype=0\u0026unicast=true\u0026proto=Onvif",
            "profile": "H264",
            "bitrate": 1024,
            "frameRate": 25,
            "width": 1920,
            "height": 1080,
            "videoOption": [{
                "Encoding": "H264",
                "Width": 1920,
                "Height": 1080
            }, {
                "Encoding": "H264",
                "Width": 1280,
                "Height": 960
            }, {
                "Encoding": "H264",
                "Width": 1280,
                "Height": 720
            }, {
                "Encoding": "H264",
                "Width": 704,
                "Height": 576
            }]
        }, {
            "uri": "rtsp://192.168.0.67:554/cam/realmonitor?channel=1\u0026subtype=1\u0026unicast=true\u0026proto=Onvif",
            "profile": "H264",
            "bitrate": 512,
            "frameRate": 25,
            "width": 352,
            "height": 288,
            "videoOption": [{
                "Encoding": "H264",
                "Width": 704,
                "Height": 576
            }, {
                "Encoding": "H264",
                "Width": 352,
                "Height": 288
            }]
        }]
    }

Response Parameter Description

Parameter Type Description
ip string Camera IP
userName string Camera username
password string Camera password
authFailed int 0 username and password verified successfully, 1 verification failed
streams.uri string Pull streaming address
streams.bitrate int Baud rate
streams.frameRate int Frame rate
streams.width int Video width
streams.height int Video height
streams.profile int Encoding method
streams.videoOption {} Video parameters, used to modify the encoding and resolution options

Notes

  • When authFailed == 1, the user needs to enter a new username and password and verify again.
Didn't find what you need?Contact us,Talk to our engineers directly.

Request a Quote

Fill in the form and we will get back with a quote and proposal within 1 business day.

Click "Generate inquiry email" to open your mail client with the body pre-filled. If no mail client is configured, click "Copy" and paste it into webmail — recipient: sunshiyang@xstrive.com.