cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2770
Views
5
Helpful
4
Replies

Cisco DNA Center API Unauthorized

Hi,

 

I'm trying to get a token from DNA C API, I'm using the following call:

 

https://myIP/dna/system/api/v1/auth/token

in the header I have:

Authorization Basic myencodedValue (this is auto-generated by postman)

Content-Type application/json

There answer is always: 

{
"message": "Unauthorized"
}

 

but the same user/password allows me to to connect to the Web UI and the dedicated role is SUPER-ADMIN-ROLE.

 

I don't know what is wrong here, do I need an extra config in DNA C.

 

Thanks,

 

4 Replies 4

Tomas de Leon
Cisco Employee
Cisco Employee

Take a look at my reply at:

https://community.cisco.com/t5/digital-network-architecture-dna/dnacasp-version1-2-6-intend-api-dna-system-api-v1-auth-token-is/m-p/3746310/thread-id/118

 

If you are using the POSTMAN NATIVE APP for OSX or Windows &  upgraded to the latest release, API requests to the DNAC may fail with "401 Unauthorized".  The issue is under investigation but as suggested use either RESTLET or the POSTMAN CHROME browser app for REST API calls to the DNAC.  Issue listed in attached email thread.

 

Use RESTLET Client and the old & new token URLs will work:

 

Restlet-Client_01.png Generate_TOKEN--Old_API_02.png Generate_TOKEN--New_API_01 .png

Thanks for the answer this was the issue.

yawming
Cisco Employee
Cisco Employee

Wonder if you are using 1.2.5 ?

It's a bug for this in 1.2.5 but fixed in 1.2.6

Use the old path of  POST /api/system/v1/auth/token still work in 1.2.5

 

Thanks yes I used the old path and it works.