cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

FNMS API fails

cwilhelm
By Level 7 Flexeran
Level 7 Flexeran

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>'

Response
401 - Unauthorized: Access is denied due to invalid credentials.
(1) Reply
ChrisG
By Community Manager Community Manager
Community Manager

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.

(Did my reply solve the question? Click "ACCEPT AS SOLUTION" to help others find answers faster. Liked something? Click "KUDO". Anything expressed here is my own view and not necessarily that of my employer, Flexera.)