We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
psehrawat
9 years agoNew member | Level 2
How to download files from a publicly shared folder?
We developed an app using an endpoint from v1 /1/metadat/link (to list all from a shared link). I couldn't find any endpoint from v2 having same functionality. My app has a simple a functionality...
RichardTSchaefe
8 years agoNew member | Level 2
I am using a WEB API for manipulating user files when I am acting on behalf of a dropbox user.
However I can have a user that does not have a dropbox account that is presented with the shareded folder link.
If I want to use the shared_link in the files/list_folder request so I can traverse this shared folder.
Can do so without an authentication token ?
As I indicated I have a use case where I do not have a dropbox account, but I have been granted the shared_link ... so the user does have access to the content.
If the shared_link had a password ... what would the JSON payload need to contain to access the folder ?
Greg-DB
Dropbox Community Moderator
8 years agoRichardTSchaefe The list_folder endpoint unfortunately doesn't support "app authentication" (i.e., so no user access token is required), only "user authentication" (where a user access token is required), so I'm afraid I don't have a good solution for this use case. I'm sending this along as a feature request.
- RTS S.8 years agoHelpful | Level 6
I can traverse the folder Shared Folder using a USER token (as opposed to a App/User token) using the files/list endpoint.
The path is relative to this shared folder.
Do I use a path of the form {id:UniqueID} ? with the files/download request ?
Or do I somehow have to use the {sharing_info: ???? } property ?
If it's the former ... can I use a path of the form {id:UniqueID} in the files/list_folder request ?
If I could vote ... I would prefer using {id:UniqueID} doe /list folder ... then to access a folder (your own, or a shared, you only need the UniqueID)... the filesystem like path is then determined by the context of the request.
- Greg-DB8 years ago
Dropbox Community Moderator
RTS S. Both /2/files/list_folder and /2/files/download support both file IDs and paths. (You can check the supported formats in the documentation for the 'path' value.)
So, for instance when calling /2/files/list_folder, you can supply the 'path' parameter containing either the 'id' of the folder you want to list, or the full path to the folder.
Likewise, when calling /2/files/download you can supply the 'path' parameter containing either the 'id' of the file you want to download, or the full path to the file.
- RTS S.8 years agoHelpful | Level 6
I use the same code to Navigate (files/list_folder) and download (files/download) for both my APP/User token and for a shared folder using a User token. I am able to download a file using an id:xxxx for the path using my APP/User token. But having problems with the shared folder: The following is for a Test File in a Test Account. URL: POST: https://api.dropboxapi.com/2/files/list_folder post args: { "path": "", "shared_link": { "url": "https://www.dropbox.com/sh/tva3ktdtul2qkth/AACU1dkvaBr31u6sIiDstKACa"}, "include_media_info": false, "include_deleted": false} Result: { "entries": [ {".tag": "file", "name": "2-11011_in__flight.jpg.sdvef", "parent_shared_folder_id": "3372935536", "id": "id:sQqvvpADHyAAAAAAAAAAIA", "client_modified": "2018-06-21T13:49:31Z", "server_modified": "2018-06-21T13:49:32Z", "rev": "12c90ae970", "size": 99110, "sharing_info": {"read_only": true, "parent_shared_folder_id": "3372935536", "modified_by": "dbid:AACm4Dw3RG5ecK3uwT2z3MVi2GWwuS6rYBg"}, "content_hash": "442d907dc20fffe801d271a6512e5c58906adb157329e5e9356b91e323a9d2bb"} ], "cursor": "AAH96nNWXINQZ4eyuP2VShr5_NM-LfHyN_XSlyR98jhdwct-3t3fIncgCM7X9Eh_-LRQk4jP-IMK52-wQSQKFXCGyseUo3xm8Izh8_9GI_9_EVbB1RYrEiGV9BLNX3znJKUhxnsB8_Q_euGZBBe_X34_0f85NXG595ciaEmzWj7HtXhfLEFQPhlCqu05XoRSQUs8NNkHU3up60VaD6-Zp6Fsn2iem9h9gLuQIWpc8C9O-meRNmAyafZW9FvTT2zAi8r6xkUg-BUJkLUYYVTNmTM_", "has_more": false } URL: GET https://content.dropboxapi.com/2/files/download Headers: Dropbox-API-Arg {"path":"id:sQqvvpADHyAAAAAAAAAAIA"} Range bytes=0-99109 Result: ERROR: Content: {"error_summary": "path/not_found/.", "error": {".tag": "path", "path": {".tag": "not_found"}}} Headers: { Content-Security-Policy: sandbox, sandbox allow-forms allow-scripts Connection: keep-alive Server: nginx X-WebKit-CSP: sandbox Transfer-Encoding: chunked Date: Tue, 26 Jun 2018 23:35:18 GMT X-Content-Security-Policy: sandbox Vary: Dropbox-API-Arg, Authorization X-Robots-Tag: noindex, nofollow, noimageindex X-Content-Type-Options: nosniff X-Dropbox-Request-Id: 8e068903125489c79e7132583f05b8d7 }Do I need to do something different for downloaing a file from a shared URL ? I provided the public link .... but it's a test account with a test folder with a single file. I provided it so you might try accessing the file ...
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!