Onvif icon indicating copy to clipboard operation
Onvif copied to clipboard

The action requested requires authorization and the sender is not authorized

Open asterissco opened this issue 3 years ago • 1 comments

Hello, I try to use inside Laravel project and always return this message. The camera is a PTZ Hikvision and works fine with PYTHON ONVIF R resource

$o = new \Rockyjvec\Onvif\Onvif("http://".$session->camera->host.":".$session->camera->port."/onvif/device_service", $session->camera->onvif_user, $session->camera->onvif_pass);            

print_r($o->media->GetProfiles());

Output

{
    "status": "error",
    "code": 500,
    "time": 1642591673,
    "data": {
        "line": 61,
        "file": "...../vendor/rockyjvec/onvif/src/Rockyjvec/Onvif/Soap/SoapClient.php",
        "message": "The action requested requires authorization and the sender is not authorized",
        "type": "Exception"
    }
}

Thanks!

asterissco avatar Jan 19 '22 11:01 asterissco

The same thing happens to me, but when I try to get the recordings from the camera, with this code:

$onvif->recording->GetRecordings()

davidcopano avatar Jul 08 '22 10:07 davidcopano