Credential errors API from remote Server

Reply
Highlighted
L1 Bithead

Credential errors API from remote Server

Good morning,

 

I'm starting to use the API for exporting different reports from a remote server.

 

1) I've generated the API Key

2) I've checked if it runs in my browers without credentials 

https://<myserver>/api/?type=config&action=show&key=mykey=&xpath=/config/devices/entry/vsys/entry/rulebase/security ant the result is an XML with the Security Rulebase.

3) If I try with curl or wget the xml result is the following <response status = 'error' code = '403'><result><msg>Invalid credentials.</msg></result></response> 

 

Where can i find/ solve this issue? 

 

 

kindly regards 

Tags (4)
L4 Transporter

Re: Credential errors API from remote Server

Try using the following example with curl,

https://www.paloaltonetworks.com/documentation/71/pan-os/xml-api/get-started-with-the-pan-os-xml-api...

 

Make sure it doesn't include spaces. If that still gives you an error I'd suggest trying generating a new API key with a different username. 

 

regards,

Gerardo.

L1 Bithead

Re: Credential errors API from remote Server

Many thanks Gerardo.

 

It runs but I've to change the profile for these account. I'll check and give the details

 

regards 

Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the Live Community as a whole!

The Live Community thanks you for your participation!