- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
01-30-2018 11:27 AM
Howdy all. I'm trying to get started with some API work on my PAN instances in AWS. I walked through the Getting Started guide for 8.0 and I created a user, assigned an Admin Profile to it that had API access, and then generated a key. Seems pretty simple but no matter what I do, every request is coming back 403:
curl -k 'https://w.x.y.z//api/?type=op&cmd=<show><system><info></info></system></show>&key=LUFRPT0zTG5aOUEvbF...'
<response status = 'error' code = '403'><result><msg>Invalid credentials.</msg></result></response>
I've changed the password, I've recreated the user, i've redone the key after password changes. Nothing works. I have to be missing something simple. Can anyone provide me some guidance? I can't even figure out how to get to logfiles that would provide any debug output about why the user is getting rejected.
01-30-2018 11:39 AM
I'll try to recreate this on one of our AWS instances. The only thing that comes to mind beforehand is to make sure the API key generation was successful. Sometimes a special character is at the end of the API key and I've notice when I select the text in my browser it misses the special character.
01-30-2018 11:39 AM
I'll try to recreate this on one of our AWS instances. The only thing that comes to mind beforehand is to make sure the API key generation was successful. Sometimes a special character is at the end of the API key and I've notice when I select the text in my browser it misses the special character.
01-30-2018 11:44 AM
OMG!!! You are a f'in genius! I have stared at this thing for 2 days and never even noticed the character at the end that my copy and paste wasn't picking up.
01-30-2018 11:46 AM
Glad it was an easy one, though it's definitely something that has stumped me before. 🙂
02-01-2018 06:58 AM
Hello,
can you help me, what I am doing wrong?
curl -k 'https://firewall/api/?type=keygen&user=xmladmin&password=password'
<response status = 'success'><result><key>LUFRPT1tajdzYWdOL2wrcDR0ckNIb0hNR2N2Wnc0VTg9M053bFoyTngydmpWUFhPOGttTWd0Q21EN1lyYngreWFXVktGc2F3MjNHQT0=</key></result></response>
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
➤ curl -k 'https://firewall/api/?type=op&cmd=<show><system><info></info></system></show>&api=LUFRPT1tajdzYWdOL2wrcDR0ckNIb0hNR2N2Wnc0VTg9M053bFoyTngydmpWUFhPOGttTWd0Q21EN1lyYngreWFXVktGc2F3MjNHQT0='
<response status = 'error' code = '403'><result><msg>Invalid credentials.</msg></result></response>
Thank you in advance
02-01-2018 10:36 AM
The name of the API key parameter is key, not api. So change the part preceding your key with &key= instead of &api=
02-05-2018 04:19 AM
silly me!
I was looking for mistake in any other places,
thank you!
08-09-2023 01:15 AM
Ran into same error and I resolved it by typing the password manually.
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 LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!