FNMS API fails

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/">

401 - Unauthorized: Access is denied due to invalid credentials.
0 Kudos
1 Reply
Community Manager Community Manager
Community Manager

Re: FNMS API fails

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.

(Anything expressed here is my own view and not necessarily that of my employer, Flexera. If my reply answers a question you have raised, please click "ACCEPT AS SOLUTION".)
0 Kudos