For months we have been using this api endpoint and it stopped working with the following message. We have reset our password and are able to access flexnetmanager.com UI. We are now getting a 401 error.
This is the request we are making.
curl -X POST \
http://www.flexnetmanager.com/ManageSoftServices/ComplianceAPIService/ComplianceAPIService.asmx \
-H 'Authorization: Basic xxxx' \
-H 'Cache-Control: no-cache' \
-H 'Connection: keep-alive' \
-H 'Content-Type: text/xml;charset=utf-8' \
-d '<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:tem="http://tempuri.org/">
<soap:Body>
<tem:GetCustomView>
<tem:customViewID>10052</tem:customViewID>
<tem:rowLimit>1000</tem:rowLimit>
</tem:GetCustomView>
</soap:Body>
</soap:Envelope>'
‎Jan 06, 2020 12:48 PM - edited ‎Jan 06, 2020 01:01 PM
I can't quite see how this curl command could have ever worked. To authorize for this endpoint, you should remove the -H 'Authorization: Basic xxx' header as shown, and replace it with bearer token authorization:
-H "Authorization: Bearer xxx"
A bearer token can be obtained by going to Accounts > All Accounts > Create an account > Service account in the web UI. Add a new account, and the token will be displayed once when the account is created. Be sure to remember the token, as once you navigate away from the page it is impossible to retrieve the token. If you forget the token you need to create a new service account to get another token.
‎Jan 06, 2020 08:05 PM