HTTP Request Fails

I can use this url in a browser and it will make my PTZ camera change to the preset number
http://192.168.1.110/axis-cgi/com/ptz.cgi?gotoserverpresetno=1

However using a HTTP Request Node with POST, the camera does not move. In the debug window, this error is returned. I've tried adding user:password@192.168.1.110 to the beginning of the url without success.

401 Unauthorized

Unauthorized

This server could not verify that youare authorized to access the documentrequested. Either you supplied the wrongcredentials (e.g., bad password), or yourbrowser doesn't understand how to supplythe credentials required.

This is the first time I've tried the HTTP nodes so I'm not familiar with their operation.

Do you mean you just enter that in the address bar and it moves the camera? If so then that is a GET not a POST.
Do you have to logon to the camera before it works in the browser?

I changed POST to GET without success.
Tried a different browser to make sure nothing was stored in cache. And yes, the camera asked for a log in then the url made the camera move so my issue must be authentication.

Another internet posting indicates that http://user:password@192.168.1.110 is the method for one step authentication but it must not be working?

I found a setting in the Axis camera that allows anonymous PTZ control (no user name or password required) But anonymous viewer login must also be enabled.

Now my HTTP request works but I'm not happy that the camera is open to anyone even though it is behind my firewall.

Need to find the correct url for a Axis P5415 that works with http://user:password@192.168.1.110 so I can secure the camera again.

The request would be http://user:password@192.168.1.110/axis-cgi/com/ptz.cgi?gotoserverpresetno=1
where user is your usernname and password is your password. If you never set one then try the default user and password for your camera(google default user password camera model) common defaults would be
user : admin
password : 12345678
11111111
00000000

Yes I have set a password in the camera. But http://user:password@192.168.1.110/axis-cgi/com/ptz.cgi?gotoserverpresetno=2 still returns an authentication error in the debug window and the camera doesn't move.

Turning off authentication in the camera and http://192.168.1.110/axis-cgi/com/ptz.cgi?gotoserverpresetno=2 works just fine.

I just need to figure out what the camera is wanting for a single line url with user name and password embedded in the url?

You did not confirm whether it is a GET or a POST you are using. If it is a POST then it is a little more tricky.

You said you were worried about it being open to everyone, do you mean you don't want others connected to the local network to access it or is it those on the internet you want to stop? If the internet then have you opened any ports in your router?

No one can help as you have not named the camera model.
[edit] strike that i just saw model
According to the manual you have to set the default administrator user root. Is the user password the administrator one?

I am using GET. With PTZ control authentication in the camera turned off, it works fine.

This camera is not ported to the internet and I'm not too worried about someone on the lan side messing with it. But having all authentication to the camera turned off just makes me concerned.

If someone gets into your network I can assure you that they will not be interested in your camera. They will be much more interested in getting into your PCs in order to steal your bank details and your money, or turning your node-red into a spambot. Once they are into your network you are in big trouble so I wouldn't worry about the camera. Just make sure you don't have any ports open in the router and you have disabled router access via the internet port. Also make sure your wifi uses WPA not WEP.

Which type of authentication does the camera require - does it maybe need digest authentication ?

http://user:password@cameraip used to be the method. However the posts that I am finding a somewhat dated. Maybe Axis has changed the authentication method in the newer firmware.

I have sent a technical help request to Axis for the current method of http authentication.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.