Totally stuck getting started. Constant 403 responses

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Totally stuck getting started. Constant 403 responses

L0 Member

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.

 

Screen Shot 2018-01-30 at 11.26.03 AM.pngScreen Shot 2018-01-30 at 11.26.22 AM.png

1 accepted solution

Accepted Solutions

L4 Transporter

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.

View solution in original post

7 REPLIES 7

L4 Transporter

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.

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.

 

homer.jpg

Glad it was an easy one, though it's definitely something that has stumped me before. 🙂

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

The name of the API key parameter is key, not api. So change the part preceding your key with &key= instead of &api=

silly me!

I was looking for mistake in any other places, 

thank you!

Ran into same error and I resolved it by typing the password manually. 

  • 1 accepted solution
  • 11745 Views
  • 7 replies
  • 0 Likes
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 LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!