Forum Discussion

nisimy5's avatar
nisimy5
Explorer | Level 3
6 years ago

download file

Hello,

I am trying to download a file and I always get "HTTP/1.1 400 Bad Request"

I am using in embedded app with wifi.

I did send the follows in buffer

"POST /2/files/download HTTP/1.1\r\n"
"Host: content.dropboxapi.com\r\n"
"Authorization: Bearer <my auth>\r\n"
"Dropbox-API-Arg: {\"path\": \"/FW_Upgrate.bin\"}\r\n"
"Content-Type: application/json\r\n"
"Content-Length: 0\r\n\r\n"

 

thanks,

Nisim

4 Replies

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    6 years ago

    Please print out the response body. It should contain a more useful error message indicating what the issue it.

  • nisimy5's avatar
    nisimy5
    Explorer | Level 3
    6 years ago

    I get the following response:

    HTTP/1.1 400 Bad Request
    Server: nginx
    Date: Wed, 26 Feb 2020 08:05:55 GMT
    Content-Type: text/plain; charset=utf-8
    Transfer-Encoding: chunked
    Connection: keep-alive
    Content-Security-Policy: sandbox allow-forms allow-scripts
    X-Dropbox-Request-I

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    6 years ago

    That's just some of the response headers, but not the response body. Can you print out the response body too?

  • nisimy5's avatar
    nisimy5
    Explorer | Level 3
    6 years ago
    Thanks for your answer.
    I did use in http instead of https.

About Dropbox API Support & Feedback

Node avatar for 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!