I am trying to write a script for building groups of new devices. For doing this I need to get the new ID of the Group. But it is not possible to get the ID out of the redirected Page, because I first would have to login. Is there any way of getting through or around the login procedure without the existence of a browser (just inside a script that only can read the headers).
Article Comments
Hi,
thanks for the quick reply, unfortunately I am using the Authentication. The link I am trying is: http://mysvr01/api/duplicateobject.htm?id=5154&name=test&targetid=5168&username=user&passhash=123456789 but unfortunately i am being redirected to the Login Page. as the Headers I do not get any Information about the redirected page. I am using Perl and the LWP::UserAgent
Sep, 2014 - Permalink
Hi,
could you try using password instead of passhash?
Also what kind of user are you using for the call? Does the same have Admin permissions?
Sep, 2014 - Permalink
This did not help. But I found a way around to get the redirected URL. Thank you for your Help. Greetings Robin Hörner
Sep, 2014 - Permalink
Hi,
you might just add the username/password to the URL you are accessing. Please find below an example:
This will authenticate the call explicitly without the need of creating a session (like in the browser).
Best regards
Sep, 2014 - Permalink