04-15-2019 01:25 PM
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?
Solved! Go to Solution.
04-16-2019 02:55 PM
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.
04-16-2019 02:55 PM
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.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide