Hi Team,
I'm experimenting with the CSR and postman. I'm able to get a authentication token when running the following call on postman and when doing a curl command:
curl -v -X POST https://10.20.10.128:55443/api/v1/auth/token-services -H "Accept:application/json" -u "cisco:cisco" -d "" --insecure
Now, I'm trying to use that token to make basic GET calls, but for some reason POSTMAN keeps adding the basic token from the first POST API call and using the token that I received from the first API call. I'm getting the following error on POSTMAN and when trying to CURL the GET call. Here is the GET command I'm trying to CURL:
curl -v -H "Accept:application/json" -H "X-Auth-Token:JMbdKRG+gv6kQt6FAwPbhJya8a7Fi6+eEhRrBUvt/to=" -H "content-type: application/json" -X GET https://10.20.10.128:55443/api/v1/license/udi --insecure
and error:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>401 Unauthorized</title>
<h1>Unauthorized</h1>
<p>The server could not verify that you are authorized to access the URL requested. You either supplied the wrong credentials (e.g. a bad password), or your browser doesn't understand how to supply the credentials required.</p>
<p>In case you are allowed to request the document, please check your user-id and password and try again.</p>
I'm definitely doing something wrong here and it's because the X-Auth token isn't in the header. Any help would be greatly appreciated.
FYI I'm using the basic authentication with my first API call, the second call is where things are hairy.
Thanks