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
MBUST
3 years agoExplorer | Level 3
When trying to list folder contents, error happens
Hello,
New to Dropbox API.
I can create folders and files, but when I try to list the contents of a folder, I get an error message. I'm particularly interested in getting the contents of...
- 3 years ago
I see you're supplying a folder path and not a shared link and are using app authentication on this /2/files/list_folder call, which can cause this 'path/unsupported_content_type' error.
When using app authentication, that is, with the app key and secret instead of an access token, you do not have access to an account directly. Using app authentication with /2/files/list_folder is instead meant for accessing the contents of a shared link.
So, you would need to either supply ashared_link
on the /2/files/list_folder call, or switch to using user authentication, that is, with an access token for an account.
Greg-DB
Dropbox Staff
I see you're supplying a folder path and not a shared link and are using app authentication on this /2/files/list_folder call, which can cause this 'path/unsupported_content_type' error.
When using app authentication, that is, with the app key and secret instead of an access token, you do not have access to an account directly. Using app authentication with /2/files/list_folder is instead meant for accessing the contents of a shared link.
So, you would need to either supply a shared_link
on the /2/files/list_folder call, or switch to using user authentication, that is, with an access token for an account.
rohitkmk
2 years agoExplorer | Level 4
Hi Dropbox Team,
When I try to use API: /2/files/list_folder using App Authentication using my personal account it works successfully, but when I try same using my Company/Business account it gives following error:
{
"error_summary": "path/unsupported_content_type/..",
"error": {
".tag": "path",
"path": {
".tag": "unsupported_content_type"
}
}
}
Could you please let us know why this difference is there?
Also Dropbox documentation mentions we can use App Authentication as well, so why it is been restricted ?
- Здравко2 years agoLegendary | Level 20
Hi rohitkmk,
As Greg already mentioned, app authentication can be used for information that doesn't need access to particular account (either personal or business) - listing public accessible shared links or at most password protected (the one you can provide thorough the call parameter). App Authentication identifies the application itself, but not the user that uses it! That's why you cannot use App Authentication to access data closely related to any particular account (i.e. to user, again both neither personal nor business) in any way (here we assume no any shared link points to the content; a link that can be "workaround"). To list (or do something else to) any part of account content, you need to represent somehow user having access to that content. That's what different tokens (access token and refresh token) are used for - user authentication.
According to your description you are already using user authentication (most probably; and by mistake label it as app authentication). If so, just keep in mind that for individual accounts providing token identifies in unique way particular user (the only user), but in case of business account (team account) it identifies in unique way the team (not user) if you have selected one team scope at least. You can solve it by removing all team specific scopes from permissions of your application (if you don't need them) or explicitly point the user using 'Dropbox-API-Select-User' header - whatever better match your case.
Hope this helps.
PS: Just a recall - when you change permissions, you need to reauthenticate the user; such changes are NOT retroactive!
In any case post exact way you got to the error (like represented in OP).
- Greg-DB2 years agoDropbox Staff
rohitkmk I see Здравко already helpfully offered some guidance here, but if you're still having trouble with this, please feel free to share the relevant code/request that's failing with this error. Please be sure to redact any secret values, such as an app secret or access token though.
- rohitkmk2 years agoExplorer | Level 4
Hi @Greg,
Please find the details of issue I am facing with /2/files/list_folder API.
When I try to fetch the list of folders using this API, I only the list of folders I have created for my Apps (Apps created from Developer console). For e.g.:But other folders to which I have access in Dropbox (created by other team members or myself), they never appear in the List folder API response.
Should I ask my Team admin to create App in Developer console, use the client id and client secret(for Bearer token generation) of this App to call APIsso that I can get list of all folders and files created by the Team or do I need to have Administrator role for myself to fetch all these details?
Could you please guide?
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!