Your workflow is unique 👨💻 - tell us how you use Dropbox here.
Forum Discussion
New_Horizons
7 years agoExplorer | Level 4
Download file
Hello!
I shared the folder:
Got the file id using the method:
/files/list_folder
I'm trying to download a file by id:
curl -X POST https://content.dropboxapi.com/2/files/download \
--header 'Authorization: Bearer <<api_token>>' \
--header 'Dropbox-API-Arg: {"path":"id:xRv0UGd0k-AAAAAAAAACgA"}'
The file is downloaded without problems.
I have a link to another folder
Got the file id using the method:
/files/list_folder
I'm trying to download a file by id:
curl -X POST https://content.dropboxapi.com/2/files/download \
--header 'Authorization: Bearer <<api_token>>' \
--header 'Dropbox-API-Arg: {"path":"id:07Db0pnr9jAAAAAAAAAD8g"}'
Download file does not work:
{"error_summary": "path/not_found/..", "error": {".tag": "path", "path": {".tag": "not_found"}}}
What could be the reason?
I need: Download the file "Прайс DAYSTAR NEW от 30.07 .xlsx" from the link
How is this best done?
Thank you.
P.S. I used google translate) Sorry.
- To download a file using /2/files/download by specifying a file ID, the access token you're using needs to be for an account that has that file.
If you want to download a file from a different account using the shared link, you should use /2/sharing/get_shared_link_file to do so:
https://www.dropbox.com/developers/documentation/http/documentation#sharing-get_shared_link_file
1 Reply
- Greg-DB7 years ago
Dropbox Community Moderator
To download a file using /2/files/download by specifying a file ID, the access token you're using needs to be for an account that has that file.
If you want to download a file from a different account using the shared link, you should use /2/sharing/get_shared_link_file to do so:
https://www.dropbox.com/developers/documentation/http/documentation#sharing-get_shared_link_file
About Dropbox API Support and Feedback
Get help with the Dropbox API from fellow developers and experts.
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!