I am attempting to disable a user account using the BOX 2.0 API. However, I am receiving a 400 status code error. In an effort to troubleshoot, I attempted to update a user attribute but once again received the 400 status code error. I even received the error when using the example in the documentation for updating user information (with my own parameters of course).
I am utilizing Powershell 3.0. I thought maybe I had something wrong in the syntax but received the exact same error using Postman in Chrome. Any guidance would be appreciated!
My Code:
Invoke-RestMethod -Uri https://api.box.com/2.0/users/USER_ID \
-method PUT \
-Headers @{"Authorization"="Bearer ACCESS_TOKEN"} \
-Body @{"status"="inactive"}
Error:
{"type":"error","status":400,"code":"bad_request","help_url":"http://developers.box.com/docs/#errors","message":"Bad Request","request_id":"1028858396513419e934e95"}