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

Get Snapshot 401 Unauthorized #81

Open
Wade-BuildOtto opened this issue Apr 22, 2021 · 2 comments
Open

Get Snapshot 401 Unauthorized #81

Wade-BuildOtto opened this issue Apr 22, 2021 · 2 comments

Comments

@Wade-BuildOtto
Copy link

Wade-BuildOtto commented Apr 22, 2021

having the same issue with all onvif node packages, none are accepting username:password no matter how I pass it to them including this package as well.

the sample server - has the same issue.

agsh/onvif - same issue

// Initialize the OnvifDevice object device.init().then(() => { // Get the data of the snapshot console.log('fetching the data of the snapshot...'); return device.fetchSnapshot(); }).then((res) => { // Save the data to a file fs.writeFileSync('snapshot.jpg', res.body, {encoding: 'binary'}); console.log('Done!'); }).catch((error) => { console.error(error); });

return Error: 401 Unauthorized

@MohammedBENHADINE
Copy link

@Wade-BuildOtto : any solution to this ?

@Wade-BuildOtto
Copy link
Author

I gave up on onvif most camera are running cgi scripts and I just access them directly with authorization digest user:pass but it depends on the unit. amcrest has been working out for me.

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