Jump to content
Sign in to follow this  

500 error when using resource 'passwordlists' (webapi)

Recommended Posts



I am unable to create password lists using passwordlists resource via webapi.  I am using Powershell:

$jsonData = '
	"PasswordList":"TEST LIST",

    $PasswordstateUrl = 'https://*passwordstate url*/winapi/passwordlists'
    $result = Invoke-Restmethod -Method Post -Uri $PasswordstateUrl -ContentType "application/json" -Body $jsonData -UseDefaultCredentials
    $PasswordListID = $result.PasswordListID

Obviously I am replacing *passwordstate url* with the correct URL for my environment. Here is the exception I am getting:

Invoke-Restmethod : [{"errors":[{"message":"Invalid API Call"},{"phrase":"Error = Object reference not set to an instance of an object."}]}]
At line:2 char:15
+ ...   $result = Invoke-Restmethod -Method Post -Uri $PasswordstateUrl -Co ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand

Outputting $error[0].Exception yields:

The remote server returned an error: (500) Internal Server Error.


My Passwordstate Build is 8501.

Share this post

Link to post
Share on other sites



Could you please refer to our API Documentation under the help menu - there are more parameters required when creating Password Lists. e.g. where to place it in the Navigation Tree, what permissions to apply, what settings for the Password List, etc.


Click Studios

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Create New...