cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

API can't see new files in APP folder

API can't see new files in APP folder

SanjayGupta
New member | Level 2
Go to solution

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!

1 Accepted Solution

Accepted Solutions

sgvcp
New member | Level 2
Go to solution

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.

View solution in original post

3 Replies 3

TaylorKrusen
Dropbox Staff
Go to solution

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! 

sgvcp
New member | Level 2
Go to solution

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.

TaylorKrusen
Dropbox Staff
Go to solution

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. 

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    TaylorKrusen Dropbox Staff
  • User avatar
    sgvcp New member | Level 2
What do Dropbox user levels mean?