Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The action requested requires authorization and the sender is not authorized #6

Open
asterissco opened this issue Jan 19, 2022 · 1 comment

Comments

@asterissco
Copy link

asterissco commented Jan 19, 2022

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!

@davidcopano
Copy link

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

$onvif->recording->GetRecordings()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants