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

Choose one of the topics below for Cisco DNA Center Resources to help you on your journey with Cisco DNA Center

This community is for technical, feature, configuration and deployment questions.
For production deployment issues, please contact the TAC!
We will not comment or assist with your TAC case in these forums.

343
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
Cisco Employee

Re: Cisco DNA Center API Unauthorized

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

Re: Cisco DNA Center API Unauthorized

Thanks for the answer this was the issue.
Highlighted
Cisco Employee

Re: Cisco DNA Center API Unauthorized

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

 

Re: Cisco DNA Center API Unauthorized

Thanks yes I used the old path and it works.
CreatePlease to create content
Content for Community-Ad
July's Community Spotlight Awards