cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Get summer ready with Dropbox basic - travel documents, plans, progress reminders and more, right over 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: 

Fail to get a file via curl

Fail to get a file via curl

RandomDoorUser1872
New member | Level 2

Soooo.... this has been driving me nuts for the past day or two. I am sure I am missing something obvious, but I have no other paths forward. So here goes. I have created an app with access to an APP FOLDER. I uploaded a few test files to the folder via GUI. I can list the folder contents via curl using the token I created. When I try to get a file, using the file id from the list_folder endpoint, I get a not found error. Code bellow. Please help!!!

 

curl -X POST https://api.dropboxapi.com/2/files/list_folder \
    --header "Authorization: Bearer <TOKEN>" \
    --header "Content-Type: application/json" \
    --data "{\"path\": \"\"}"

 

...Returns JSON with /App/FOLDER content... 

 

curl -X POST https://api.dropboxapi.com/2/file_requests/get  \
    --header "Authorization: Bearer <TOKEN>" \
    --header "Content-Type: application/json" \
    --data "{\"id\":\"<ID>\"}"

 

Returns: 

{"error_summary": "not_found/...", "error": {".tag": "not_found"}}

???? 

 

 

Thank you! 

1 Accepted Solution

Accepted Solutions

Re: Fail to get a file via curl

Greg-DB
Dropboxer

The /2/file_requests/get endpoint is for retrieving the information about a 'file request', not a file itself. (A "file request" is a way to receive files from other people.)

 

To get the data for a particular file, you should instead call /2/files/download.

View solution in original post

2 Replies 2

Re: Fail to get a file via curl

Greg-DB
Dropboxer

The /2/file_requests/get endpoint is for retrieving the information about a 'file request', not a file itself. (A "file request" is a way to receive files from other people.)

 

To get the data for a particular file, you should instead call /2/files/download.

Re: Fail to get a file via curl

RandomDoorUser1872
New member | Level 2

I hate life. Thank you! 

Poll
Which Dropbox Plan do you have?
Who's talking

Top contributors to this post

  • User avatar
    RandomDoorUser1872 New member | Level 2
  • User avatar
    Greg-DB Dropboxer
What do Dropbox user levels mean?
Need more support?