You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
VanessaGillier
8 months 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...
- 8 months 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 Staff
I 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
8 months 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-DB8 months agoDropbox Staff
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.
- VanessaGillier8 months 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-DB8 months agoDropbox Staff
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.
5,910 PostsLatest Activity: 4 days agoIf 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 or Facebook.
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!