cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
450
Views
0
Helpful
1
Replies
Highlighted
Cisco Employee

Can't access APIC App REST endpoints - URL Challenge Token empty

I’m trying to access the app api, as declared in app.json but the validation seems to be failing.

 

I’m doing a GET call at https://<apic_address>/appcenter/Cisco/StateChangeChecker/proxy.json

and I get the following response :

 

{"totalCount":"1","imdata":[{"error":{"attributes":{"code":"403","text":"Token was invalid (Error: WebToken validation passed but URL Challenge Token was empty)"}}}]}

 

 

For clarity, this is what I’m doing :

 

client_url = apic_url + "/appcenter/Cisco/StateChangeChecker/proxy.json"
headers = {    'DevCookie': cookie,
    'APIC-challenge': challenge}
response = session.get(client_url, headers=headers, verify=False)
print(response.text)

I get the cookie and challenge from doing a aaaLogin.

aaaLogin is working fine because I can make a call to "https://<apic_address>/api/class/topSystem.json" and I get the expected response.

 

Am I missing something here?

1 ACCEPTED SOLUTION

Accepted Solutions
Cisco Employee

Re: Can't access APIC App REST endpoints - URL Challenge Token empty

Still not sure what's wrong with my code making the requests but for anyone else, the problem was that the DevCookie wasn't being set right.

1 REPLY 1
Cisco Employee

Re: Can't access APIC App REST endpoints - URL Challenge Token empty

Still not sure what's wrong with my code making the requests but for anyone else, the problem was that the DevCookie wasn't being set right.

Content for Community-Ad
August's Community Spotlight Awards