Skip to content

getDeviceInformation gives error without credentials #184

@diogo24m

Description

@diogo24m

When I use the getDeviceInformation() function with credentials it works fine, but when the credentials aren't provides it gives this error:

Error: ONVIF SOAP Fault: Sender not authorizedThe action requested requires authorization and the sender is not authorized.

My code:

onvif.Discovery.on('device', function (cam, remoteInfo) {
    //cam.username = "admin";
    //cam.password = "password";

    cam.getDeviceInformation(function (err, info, xml) {
        if (err) console.log(err);
        else console.log(info);
    });
})
onvif.Discovery.probe();

Is this because of my camera or am I missing something?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions