We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
craggleb
7 years agoExplorer | Level 4
Pythong SDK - team_team_folder_list
Hi I'm having trouble attempting to use the python SDK
I'm trying to access a list of team folders using 'team_team_folder_list'
For example:
dbx = dropbox.Dropbox(access_token) result = dbx.team_team_folder_list(path="")
Gives the error:
Traceback (most recent call last):
File "dropbox-test.py", line 116, in <module>
result = dbx.team_team_folder_list(path="")
AttributeError: 'Dropbox' object has no attribute 'team_team_folder_list'I've tried a few variants of the above - and can see the function defined in the SDK - am I supposed to be calling it in a different way?
The team_team_folder_list method is defined on the DropboxTeam class, so you'll need to instantiate a DropboxTeam and call it on that (instead of just Dropbox). That is, that first line should look like this instead:
dbx = dropbox.DropboxTeam(access_token)
Also, note that the team_team_folder_list does not take a 'path' parameter. You can find more information on using it in the documentation.
I also recommend reading the Namespace Guide and Content Access Guide for information on how to access various parts of a Dropbox Business team's content.
2 Replies
- Greg-DB7 years ago
Dropbox Community Moderator
The team_team_folder_list method is defined on the DropboxTeam class, so you'll need to instantiate a DropboxTeam and call it on that (instead of just Dropbox). That is, that first line should look like this instead:
dbx = dropbox.DropboxTeam(access_token)
Also, note that the team_team_folder_list does not take a 'path' parameter. You can find more information on using it in the documentation.
I also recommend reading the Namespace Guide and Content Access Guide for information on how to access various parts of a Dropbox Business team's content.
- craggleb7 years agoExplorer | Level 4
Thanks Greg that works perfectly!
I would never have gotten to invoking it with an access token from the documentation
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!