Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
Hi,
I'm having an issue using java/groovy API 3.0.8 and 3.1.1 (latest).
I have a local APP, with a few 'old' folders created before 06/27/2019 and 'new' files and folders added after that day.
I was able to see files in APP's root folder before that day, using code like this:
com.dropbox.core.v2.DbxClientV2 client = ...
ListFolderResult lfResult = client.files().listFolder('/apps/my test app')
lfResult.getEntries().each{ Metadata metadata -> println(metadata.getPathLower()) }
now it lists only 'old' folders, skipping 'new' folders and files.
Those exist - I can see them on the website and even blinedly download over same API, if I give the direct path!
Surprizingly, API can also list content of 'new' folders, that API doesn't see in the APP root.
More interesting effect - if I rename 'old' forder in root from website UI, API stopps seeing it, even if I rename it back to original name that was previously seen by the API.
basically any change to app's root contentent make it invisible (but accessable!) to the API since that day.
Any help or comments appriciated!
Thanks for reply, I solved it!
Yes, I am using 'App folder', but it was a different issue - I didn't paginate results using ListFolderResult.getCursor(), as described in this example, because I had just a few items in app root. Seems like my simplistic approach stopped working when subfolders became big enough. So adding check for result.getHasMore() helped.
Hello,
I have an idea for what may be causing this confusing behavior. When you're creating an app in the Dropbox developer console, there are two API access types to choose from: 'App folder' and 'Full Dropbox'. You can read about some of the differences here.
It sounds like you may be using an 'App folder' token to make calls that require a 'Full Dropbox' token.
Making a files/list_folder call from an 'App folder' token vs a 'Full Dropbox token' will yield different results and require a different path. A good way to tinker with them and gain a better understanding is the files/list_folder endpoint on the API explorer.
I'd recommend creating another Dropbox app, this time with 'Full Dropbox' access. Please give that a shot and come give me an update!
Thanks for reply, I solved it!
Yes, I am using 'App folder', but it was a different issue - I didn't paginate results using ListFolderResult.getCursor(), as described in this example, because I had just a few items in app root. Seems like my simplistic approach stopped working when subfolders became big enough. So adding check for result.getHasMore() helped.
Awesome! I'm glad you got it working.
Thanks so much for sharing the solution! It may help others that run into similar issues down the road.
Hi there!
If you need more help you can view your support options (expected response time for a ticket is 24 hours), or contact us on Twitter or Facebook.
For more info on available support options, see this article.
If you found the answer to your question, please 'like' the post to say thanks to the user!