cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Back again with another edition of 'How we use Dropbox', so find out how Emma uses to-do lists to get it all done 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: 

Dropbox API List Folders

Dropbox API List Folders

Madhavi T.
Explorer | Level 4

Hi there,

 

As a part of my POC, I need to check in a user's account if a particular folder is present or not. If not, then I need to create that folder in the user's account. I am having admin account in Business Dropbox and I am able to list folders for my account, using the below user endpoint, passing my access token having Full Dropbox access,where I can maniuplate the output.

 

https://api.dropboxapi.com/2/files/list_folder

 

My question is, how can I check the list of folders in another account and then create the folder if it doesnot exist. Would it require Business endpoints/token of app with 'Team Information' access. Also, would 'create folder' API (https://api.dropboxapi.com/2/files/create_folder) work for that account or only for my account. 

 

Thanks in advance.

 

-Madhavi

2 Replies 2

Re: Dropbox API List Folders

Mark
Super User II
*moves to API section*

 


:penguin::penguin: - :penguin: - :penguin: - :penguin:


Heart Did this post help you? If so please mark it for some Kudos below. 


:white_check_mark: Did this post fix your issue/answer your question? If so please press the 'Accept as Solution' button to help others find it.


:arrows_counterclockwise: Did this post not resolve your issue? If so please give us some more information so we can try and help - please remember we cannot see over your shoulder so be as descriptive as possible! 


 

Re: Dropbox API List Folders

Greg-DB
Dropboxer

You can do this using either type of app.

 

For a normal (not Business) Dropbox API app, the app gets connected to individual user accounts. When you connect a user account, the app gets an access token for that particular account. Using that token, both /2/files/list_folder and /2/files/create_folder will operate on that particular account. To operate on a different account, that other user will need to connect the app to their account, giving the app a different access token.

 

For a Dropbox Business API app, the app gets connected to teams entirely. If the app has the "team member file access" permission, it can use the "member file access" feature to access the account of any member of the team, e.g., to use /2/files/list_folder and /2/files/create_folder for that member.

 

Also, note that in either case, you can use use /2/files/get_metadata instead of /2/files/list_folder if you just want to know if a specific path already exists.

Who's talking

Top contributors to this post

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