We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
Adi4
3 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
1 Reply
- DB-Des3 years ago
Dropbox Community Moderator
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.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
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, Facebook or Instagram.
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!