api - Box.com update/delete folder using curl -


i trying update folder name in box.com using curl tool in windows command prompt. however, not able , getting "insufficient permissions" error. following exact curl command using request parameters updating folder:

curl -i https://api.box.com/2.0/folders/0 -h "authorization: bearer rn4lh6kst6bhmaleuzdjmtxxptforg1b" -d "{\"name\":\"new folder name!\"}'-x put  

and getting following error:

{"type":"error","status":403,"code":"access_denied_insufficient_permissions","help_url":"http:\/\/developers.box.com\/docs\/#errors","message":"access denied - insufficient permission","request_id":"11155318795551a7373138a"}  

i same error "delete" folder command in curl.

can please me this?

i believe issue quote escaping. also, have -d "....' (note mismatched " , '

try following commands box api: (don't forget add folder id & access token)

update folders

curl https://api.box.com/2.0/folders/folder_id -h "authorization: bearer access_token" -d '{"name":"new folder name!"}' -x put 

delete folders

curl https://api.box.com/2.0/folders/folder_id?recursive=true -h "authorization: bearer access_token" -x delete 

Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -