cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Are you an educator? Well we want to hear from you, so check out some tools we think might help you out 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: 

file list from shared folder dropbox rest api python

file list from shared folder dropbox rest api python

venkate
Explorer | Level 3

I need to create a data frame out of attributes and share URL of all the files in a directory and its sub-directories

the code am using is 

for entry in dbx.files_list_folder('/2.info_copy',recursive=True).entries:
  if(str(type(dbx.files_get_metadata(entry.path_lower))) == "<class 'dropbox.files.FileMetadata'>"😞
      shared_link_metadata = dbx.sharing_create_shared_link(entry.path_lower)
      d.append(
        {
            'Name': entry.name,
            'Folder Path': entry.path_lower,
            'Link': shared_link_metadata.url,
            'client_modified' : str(entry.client_modified),
            'server_modified' : str(entry.server_modified),
            'size' : entry.size,
            'content_hash' : entry.content_hash

        })


df = pd.DataFrame(d)
 
I am new to the dropbox API and not sure if can get the list of files from the shared folder.

 

1 Accepted Solution

Accepted Solutions

Re: file list from shared folder dropbox rest api python

Greg-DB
Dropboxer

You can use the API to list the files in any folder in the connected account, whether or not the folder is shared. I recommend reading the File Access Guide and Team Files Guide for reference.

 

Looking at your code, there are a few things to note:

 

View solution in original post

1 Reply 1

Re: file list from shared folder dropbox rest api python

Greg-DB
Dropboxer

You can use the API to list the files in any folder in the connected account, whether or not the folder is shared. I recommend reading the File Access Guide and Team Files Guide for reference.

 

Looking at your code, there are a few things to note:

 

View solution in original post

Poll
We love to learn from the educators who use Dropbox. Whether you teach kids, teens, adults or a combination of all three, we want to know what apps and integrations you use with Dropbox to help with teaching. Which of the ones below is your favorite, or most used tool?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropboxer
What do Dropbox user levels mean?
Need more support?