I am trying to do an API CALL... if I am already logged in and copy and paste the URL it works... however I want to pull the xml data and parse it into a webpage and create a ligthweight ajax page that will show sensors with advanced Filtering options however I get the following error when I try FOpen() the API URL

failed to open stream: HTTP request failed! HTTP/1.1 401 Unauthorized

If I copy and paste the URL with auth tokens then it displays an Unauthorized Message...

This is my URL: /api/table.xmlcontent=sensors&output=xml&columns=objid,type,device,sensor,status&id=3401&username=myuser&password=mypasswordencoded


Article Comments

What does mypasswordencoded stand for? Please take a look at phPRTG, as it may be what you're trying to develop :)


Sep, 2016 - Permalink

well I dont wanna give you my username and passwords :D so passwordencoded is a place holder for an Encoded Password as my password contains special Characters... and myuser is a place holder for my username :D

I looked at the link you sent and this is great! But I am not the Admin user of my PRTG installation so I cant find out my password hash :( so I gotta use my password and not the hash


Sep, 2016 - Permalink

:D Hm, I'm not sure if the password needs to be encoded - have you tried using the plain password?


Sep, 2016 - Permalink

Yes I have :) but I busy getting a Sys admin at my work to get me a passhash solves all my issues >.<


Sep, 2016 - Permalink

Yeah probably :)


Sep, 2016 - Permalink