What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

Cannot do API call with Authentication tokens

Votes:

0

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

api authentication http-api

Created on Sep 15, 2016 7:04:43 AM

Last change on Sep 15, 2016 8:13:39 AM by  Stephan Linke [Paessler Support]



5 Replies

Votes:

0

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

Created on Sep 15, 2016 8:15:14 AM by  Stephan Linke [Paessler Support]

Last change on Sep 15, 2016 8:15:25 AM by  Stephan Linke [Paessler Support]



Votes:

0

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

Created on Sep 15, 2016 10:30:38 AM



Votes:

0

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

Created on Sep 15, 2016 10:36:58 AM by  Stephan Linke [Paessler Support]



Votes:

0

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

Created on Sep 15, 2016 11:03:04 AM



Votes:

0

Yeah probably :)

Created on Sep 15, 2016 11:09:58 AM by  Stephan Linke [Paessler Support]




Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.