Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
VanessaGillier
2 years agoExplorer | Level 3
Path for API: path of the empty string
Hi,
I am trying to get a list of all my file and folder names. I keep getting an error message saying:
The path is copied from my dropbox. So, I dont understand how it could not be fo...
- 2 years ago
That's an error message from pandas, not Dropbox, so I can't offer help with that. You may want to refer to the documentation or support resources for pandas.
Greg-DB
Dropbox Community Moderator
2 years agoI see you're including your user name in the "folder_path" value, but note that the root for API calls defaults to your member folder automatically, so you shouldn't include the name of the member folder. Try taking out that path component.
Also, when calling 'files_list_folder', you can supply a 'path' of the empty string '' to list the root for the call. That's generally a helpful first step for debugging issues like this.
VanessaGillier
2 years agoExplorer | Level 3
This is my new code after removing my username. but the problem remains.
The second part of you answer also confuses me a bit, although I believe I did it.
I am very new to all of this, so dumming it down might be useful.
- Greg-DB2 years ago
Dropbox Community Moderator
I see you've removed the first component with your name, but it looks like you've also changed the rest of it now.
Specifically, the path from your original post but without the user name component would be:
folder_path = '/Rioblanco Capital LLC'but now you have:
folder_path = '/Rioblanco Dropbox'Make sure you're using the right path values based on the current contents of your account.
Also, my other comment means that you can try the following to see the contents of whatever the root folder for the call is:
folder_path = ''If you look at the 'result' from that, it will contain metadata about the items there that you can use to build other path values as needed.
- VanessaGillier2 years agoExplorer | Level 3
The new error message i get is the following;
C:\Users\Vanessa RioBlanco\Dropbox (Personal)\PC\Desktop\LEX 2024\Path Shortening\Python> python import_dropbox2.py
An unexpected error occurred: BadInputError('beaa26a4df804ca984f4c5c31a9382e0', 'Error in call to API function "files/list_folder": This API function operates on a single Dropbox account, but the OAuth 2 access token you provided is for an entire Dropbox Business team. Since your API app key has team member file access permissions, you can operate on a team member\'s Dropbox by providing the "Dropbox-API-Select-User" HTTP header or "select_user" URL parameter to specify the exact user <https://www.dropbox.com/developers/documentation/http/teams>.')
Failed to retrieve files and folders.Could this be related to the fact I added all permission options? I did this because I kept finding on the internet it could be related to permissions.
Which ones would I need.
The dropbox is indeed a shared dropbox.
- Greg-DB2 years ago
Dropbox Community Moderator
Based on that error message, you're now using an access token with "team scopes" enabled. For the sake of simplicity and security, and so you can use the code as you've written it, I recommend getting a new access token without the team scopes enabled again. You can change the scopes and then generate a new token using the app's page on the App Console.
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!