cancel
Showing results for 
Search instead for 
Did you mean: 
cancel

Who Me Too'd this topic

Not able to access APIC REST APIs with web token

abhishek.abhi
Level 1
Level 1

Hi,

I have written a Simple Java REST client using Spring boot framework and tried to access APIs exposed by APIC.

1. I am able to get proper response from POST request :

POST : https://[apic ip]/api/aaaLogin.json?gui-token-request=yes

payload

{

"aaaUser" : {

"attributes" : {

"name" : "username",

"pwd" : "password"

}

}

}

2. To make subsequent REST request I have used url token provide by above REST response as header with name 'APIC-challenge'

GET : https://[apic-ip]/api/class/topSystem.json

I got following response : Response code : 403

"text":"Need a valid webtoken cookie (named APIC-Cookie) or a signed request with signature in the cookie APIC-Request-Signature for all REST API requests"

Kindly suggest.

Who Me Too'd this topic