Jump to content

API / Error when moving Password to Recycle bin


findusHai

Recommended Posts

Hi, 

 

i do not work on our API program myself, we have an external worker for that. 

He came to me with the Following issue. 

 

He tried to delete a password on our test Passwordstate system and move it to the recycle bin and he receives the following error. 

Note that other requests like adding a password to the list is working fine.  

 

I don´t know much about API´s and their usage so there might be a obvious solution to someone who is more experienced

1358630641_apr-error2.thumb.PNG.68fd6f9ac14144a254a74949bf1992ba.PNG917540528_API-error.thumb.PNG.e2e303773e00843208570ec0d2aff406.PNG

 

 

Greetings and thanks for your help 

Findushai

 

Link to comment
Share on other sites

Hi Findus,

 

From what I can tell in your script you are using the correct Verb, (Delete), so I can't be sure why you get this issue.  Your syntax looks pretty spot on for me as well according to your screenshot.  I've just tried testing the following Delete script in Powershell, can you ask your API user to test the following, and let me know what they get?

 

$PasswordstateUrl = 'https://sandbox.halox.net/api/passwords/71338?MoveToRecycleBin=True'
Invoke-Restmethod -Method Delete -Uri $PasswordstateUrl -Header @{ "APIKey" = "4ca37695823bdfe9285afe3bc3467d87" }

 

Obviously you'll need to change out the API key, PasswordID and base URL.  If it works from Powershell, but not in the program that you sent through in the screenshot, we wouldn't be sure what the issue might be.

 

Can you let me know how you go with this?

 

Regards,

Support.

Link to comment
Share on other sites

Or maybe there is something non-standard about your IIS configuration that is causing this, and it's not really related to Passwordstate. Can you check out these articles:

 

http://evolutionarydeveloper.blogspot.com/2012/07/method-not-allowed-405-on-iis7-website.html

https://stackoverflow.com/questions/10906411/asp-net-web-api-put-delete-verbs-not-allowed-iis-8

 

There are many related articles for this sort of thing when you google "iis error 405 delete verb not allowed"

 

Regards

Click Studios

Link to comment
Share on other sites

  • 4 weeks later...

Hi, sorry for the Late follow up. 

 

I looked into your links but we noticed that the Problem only occurs in our test environment and everything works fine on our production server so we stopped looking for the Issue. 

 

Thanks for your help anyway.

 

Greetings 

Florian 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...