We’re aware of an issue causing slower load times on the Dropbox Community forum. It should be resolved soon. Thanks for your patience!
Forum Discussion
alexiscastillodj
4 years agoExplorer | Level 4
Dropbox Team in python??
I am trying to create a python file that will download some files automatically, but my account is a business team account and I cannot connect it, I have informed myself what I have been able to and all the forums tell me:
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)
dbx.files_list_folder()
I have tried this system and it does not work. I have tried to look for more options and I do not find anything, please can you help me.
The error is the following:
AttributeError: 'DropboxTeam' object has no attribute 'files_list_folder'
2 Replies
- Здравко4 years agoLegendary | Level 20
Hi alexiscastillodj,
Instead of suspicious advises from unofficial places you can read the official documentation. 🙂 Isn't it?
About teams: Have you identified particular team member before try to make files access using either as_user() or as_admin() methods? 😉
Hope this gives direction.
- Greg-DB4 years ago
Dropbox Community Moderator
alexiscastillodj Yes, as Здравко said, you can find information about these types and methods in the documentation for the Python SDK.
Specifically, the files_list_folder method is only available on the Dropbox type, so you'll need a Dropbox instance to call that. Attempting to call that on DropboxTeam won't work.
Note that you can use the dropbox.Dropbox constructor for both Business and non-Business accounts as long as you have a user-linked access token (e.g., an access token without any "team" scopes). That works the same way for both account types.
If you do have a team-linked access token (e.g., an access token with any "team" scopes), you will need to use the DropboxTeam constructor first, and then use as_admin or as_user to get a Dropbox instance, which you can then use to call files_list_folder.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!