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?
Try using the following example with curl,
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.
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!