Level up your Box knowledge with brand new learning paths on Box University. Visit training.box.com to get started

API to delete AND Transfer files

Answered
New post

Comments

1 comment

  • bibek_k

    Hi,

     

    You have to use this API: https://developer.box.com/v2.0/reference#move-folder-into-another-users-folder

     

    curl https://api.box.com/2.0/users/USER_ID/folders/FOLDER_ID \
    -H "Authorization: Bearer ACCESS_TOKEN" \
    -d '{"owned_by": {"id": "USER_ID"}}' \
    -X PUT

    Basically FOLDER_ID must be 0. Only supports rootfolder. This will move contents to another user ID, you can have user notified as well  if you want. 

    And after that you can use delete API with "force" option.

    force  boolean

    Whether the user should be deleted even if this user still own files

     

    Hope this helps.

     

    thanks, 

    Bibek

    0
    Comment actions Permalink

Please sign in to leave a comment.