Welcome to the new Box Support website. Check out all the details here on what’s changed.

Suddenly started getting "Access denied - item locked"

Answered
New post

Comments

2 comments

  • mwiller

     A lock is designed to prevent other users from making changes to a file while you're working on it — similar to "checking out" the file.  As you can see in the lock/unlock API documentation, there is an option to prevent downloading the file while it's locked — this is likely what you're running into.  Note that a locked file can still be accessed by the user that locked it — in your testing scenario, if you locked the file and then tried to download it from the same user account, it would work fine.  Also, if you didn't enable the is_download_prevented option, downloads would still work regardless of which user was making the download API call — locks only prevent file edits by default.

     

    In general, if your application is read-only, you may need to handle the lock case, potentially by retrying later.

    0
    Comment actions Permalink
  • MikeBaz

    thanks a lot, this led me directly to the problem place - someone did ineed lock the file in the way you describe

    0
    Comment actions Permalink

Please sign in to leave a comment.