One month down in 2025: How are your resolutions coming along? Check out how to get back on track here.
Forum Discussion
Adi4
2 years agoExplorer | Level 3
Error
hello!
When I used this API to perform operation
https://api.dropboxapi.com/2/files/get_file_lock_batch
It show this error
Cannot convert to JSON, detail: Invalid tag: required Tag.SINGLE_USER, but was Tag.UNLOCKED (through reference chain: com.dropbox.core.v2.files.LockFileBatchResult["entries"]->java.util.ArrayList[0]->com.dropbox.core.v2.files.LockFileResultEntry["successValue"]->com.dropbox.core.v2.files.LockFileResult["lock"]->com.dropbox.core.v2.files.FileLock["content"]->com.dropbox.core.v2.files.FileLockContent["singleUserValue"])
how can I resolve this problem
please help me to resolve this problem
- DB-Des
Dropbox Engineer
Hi there!
Looks like you're experiencing similar behavior as described in this post, only with a different method/type.
The recommendation here would be similar: call FileLockContent.isSingleUser first, to confirm whether that lock is held by a single user. Only if that resolves to true, then calling FileLockContent.getSingleUserValue will get you that lock's information.Based on the specific error you provided though, it seems like the lock's information you are attempting to access is unlocked. In which case, you'd want to add logic to your implementation to also check FileLockContent.isUnlocked and/or FileLockContent.isOther and process the information accordingly.
Hope this helps!
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,950 PostsLatest Activity: 26 minutes ago
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!