Hi,
I am trying to automate password rotation using the SDDC manager. This is probably more my ineptness at curl and postman, but I can't seem to get a token from the SDDC manager in postman. I can curl it from a linux command line, get the token and then use it in postman - but ultimately I want to take the postman code into a python script that I can run as part of the automation that will get the token, then use the token to get all the passwords after a password rotation and store them in CyberArk.
So I curl
curl -X POST -H "Content-Type: application/json" -d '{"username": "administrator@vsphere.local","password": "VMware123!"}' --insecure https://10.0.0.4/v1/tokens
and this returns me a token - I can then use that in postman. But when I try to put the above command into postman or translate it into a request in python, I just get
"errorCode": "VCF_RUNTIME_ERROR",
"arguments": [],
"message": "Something went wrong. Please retry or contact the service provider and provide the reference token.",
"referenceToken": "773RKU"
}
I am using basic auth and this is what the curl command from postman looks like when I look at the curl code.
--header 'Accept: application/json' \
--header 'Authorization: Basic xxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
i have x'd out the user/password hash here.... but as far as I can tell this is basically the same as the first curl command above... I have also tried putting the user and pass into the data - but no matter what I try I get the same error message. Hoping someone could help with this here, but maybe I need to post something on a postman forum somewhere. I have also imported the swagger file from the SDDC manager, but I can't get the tokens api to work from that either, same error message.
Thanks for any ideas at all, I am stuck.
Bill