cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
What’s new: end-to-end encryption, Replay and Dash updates. Find out more about these updates, new features and more here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Download file

Download file

New_Horizons
Explorer | Level 4
Go to solution

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.

 

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution
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

View solution in original post

1 Reply 1

Greg-DB
Dropbox Staff
Go to solution
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
Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?