The files_list_folder
method operates on a specific Dropbox user's account, not on an entire Dropbox team, so it only exists on dropbox.Dropbox
, not dropbox.DropboxTeam
. The same applies to files_list_folder_continue
, files_download
, etc.
If you just need to connect to individual Dropbox accounts to access the files in that account (whether or not the account is part of a Dropbox Business team), you can register a "Dropbox API" app and directly create a dropbox.Dropbox
object using the access token for any user that connects to your app.
If you do need to be able to connect to any member of an entire Dropbox Business team, you should instead register a "Dropbox Business API" app and use the resulting access token to create a dropbox.DropboxTeam
object. That object applies to the whole team, but you can then use the "team member file access" feature to access a specific member's account, via the DropboxTeam.as_user
or DropboxTeam.as_admin
method.
So in summary:
- if you're using a "Dropbox API" app, your code should look like:
dbx = dropbox.Dropbox(_dropbox_token)
dbx.files_list_folder()
- if you're using a "Dropbox Business API" app, your code should look like:
dbx = dropbox.DropboxTeam(_dropbox_token).as_user(member_id)
dbx.files_list_folder()
Also, for information on how to access different parts of a Dropbox account, such as a team folder, check out the Namespace Guide and Content Access Guide. To set the Dropbox-API-Path-Root
Header mentioned in the Namespace Guide, use the Dropbox.with_path_root
method.