cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
560
Views
0
Helpful
1
Replies

Cisco DevNet FMC REST API Sandbox "User authentication failed."

dogemaster
Level 1
Level 1

I am trying to use the FMC rest api using the always on sandbox, but I am unable to authenticate myself to generate a token. I have tried using postman and a custom script. Both return a 401 error (body shown below). Logging into https://fmcrestapisandbox.cisco.com/api/api-explorer/ with the same credentials work just fine.

{
    "error": {
        "category""FRAMEWORK",
        "messages": [
            {
                "description""User authentication failed."
            }
        ],
        "severity""ERROR"
    }
}

I've made sure:
1) Certificate verification is turned off
2) Basic Auth is turned on with credentials from devnet sandbox email
3) POST method to https://fmcrestapisandbox.cisco.com/api/fmc_platform/v1/auth/generatetoken

 

Any help would be much appreciated

1 Reply 1

Alex Stevenson
Cisco Employee
Cisco Employee

Hi @dogemaster,

It's strange, right? For me, in Postman, it returns a 204 message, so no token, nothing, is returned.

I found a workaround, though.

I had Postman construct a cURL request and added the -v tag to get details. In that verbose response, you will find the X-auth-access-token! It will also include the domainUUID and other values, which are needed for many requests.

Plug that into Postman and send the GET request successfully.

AlexStevenson_0-1669999847760.png

 

 

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: