cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
We want to make our Community work for you and we need your help. Take our short survey!
Close

Discuss Dropbox Developer & API

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

Not returning a list of folders? Only returning random data?

Not returning a list of folders? Only returning random data?

Explorer | Level 4

hi there,

I am having trouble getting a list of folders from my dropbox, the following is the main piece of code i use to get a connect/data. So far just getting metadata and not the folders or anyt data that I need. This is being implemented in NodeJS.

let dropb = Dropbox.authenticate({ token: '******' });

let variable = dropb({

      resource: 'files/list_folder',

      parameters: {

                 'account_id': 'dbid:*****',

                 'path': '',

          }

});

//somewhere after console.log(data) //which displays the above code's data in console

Thanks!

1 Accepted Solution

Accepted Solutions
Highlighted

Re: Not returning a list of folders? Only returning random data?

Dropboxer
Dropboxer

No, unfortunately there isn't a way to make the API return folders only, but I'll pass this along as a feature request. 

View solution in original post

3 Replies 3
Highlighted

Re: Not returning a list of folders? Only returning random data?

Dropboxer
Dropboxer

Can you elaborate on what exactly isn't working for you? What data specifically are you looking for?

The /2/files/list_folder endpoint is expected to returned the metadata for the files and folders located under the path you specify.

Highlighted

Re: Not returning a list of folders? Only returning random data?

Explorer | Level 4

Hi There Greg,

Sorry I figured out the problem it was something to do with my end of the configuration, quick follow up question which is:

Is there a way to set the parameter so it only will return folders?

I see in the data that is returned using that call you mentioned that there is a field called '.tag', is there a way to make it so '.tag' = 'folder' and only return that data?

Thanks Greg

Highlighted

Re: Not returning a list of folders? Only returning random data?

Dropboxer
Dropboxer

No, unfortunately there isn't a way to make the API return folders only, but I'll pass this along as a feature request. 

View solution in original post

Work Smarter with Dropbox

The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.

Sound good? Let's get started.
Who's talking

Top contributors to this post

What do Dropbox user levels mean?
Need more support?