Accepted Solution

WAPI 401 Authorization Required Message

[ Edited ]
Posts: 6
2295     0

Hello everyone, I was hoping to get a little guidance here. At work I was granted a test account to attempt to automate some IPAM tasks. However, while I am able to login to the GUI using the account  and perform tasks i.e. create networks, add hosts, etc, with no problems, I am not able to send the same commands with the same credentials using the API. Regardless of the task, it always returns the same message. I am using vbscript to send the commands which I know to have worked in past jobs with no issues. A simple example such as the one below renders the same message:


Set WAPI = CreateObject("Msxml2.ServerXMLHTTP")
WAPI.setOption 2, 13056 
userName = "ipam_api"
password = "api_password"
URL = "" "GET", URL, false, userName, password
WAPI.setRequestHeader "Accept", "application/json"
WAPI.send ""
MsgBox (WAPI.responsetext)



<title>401 Authorization Required</title>
<h1>Authorization Required</h1>
<p>This server could not verify that you
are authorized to access the document
requested. Either you supplied the wrong
credentials (e.g., bad password), or your
browser doesn't understand how to supply
the credentials required.</p>


Please advise if there is something that I may be overlooking.



Re: WAPI 401 Authorization Required Message

TTiscareno Community Manager
Community Manager
Posts: 361
2296     0

API access also needs to be enabled for the group that your user account is a member of. To verify this, an administrator who has the ability to manage groups in NIOS will want to edit the properties for the group and in the Roles tab, scroll down to the bottom. You should see an "Allowed Interfaces" section, and the API option will need to be enabled. The default options from there should work for your testing




Re: WAPI 401 Authorization Required Message

Posts: 6
2296     0

Thanks for the advise Tony. This fixed the issue. Smiley Very Happy

Showing results for 
Search instead for 
Do you mean 

Recommended for You

Businesses are investing heavily into securing company resources from cyber-attacks form cybercrimin