We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.

Forum Discussion

AdityaTiw's avatar
AdityaTiw
Explorer | Level 3
7 years ago

Error (4xx) We can't find the page you're looking for

Hello !

I am facing an issue while using DropBoxAPIs. 

I am trying to download a file from my drop box using AT commands through GSM module.However, it is showing error 404 page not found.

Below Call is successfully executed through Postan Utility then to use with AT commands it is converted to HTTP

 

curl -X POST https://content.dropboxapi.com/2/files/download \
    --header "Authorization: Bearer <Access Token>" \
    --header "Dropbox-API-Arg: {\"path\": \"/Homework/math/Prime_Numbers.txt\"}"

HTTP code sent on GSM

POST https://content.dropboxapi.com/2/files/download
Host: content.dropboxapi.com
Authorization: Bearer <Access Token>
Dropbox-API-Arg: {"path": "/File_Name.txt"}
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW 

when above data is sent below is received response which shows error 404:

<!DOCTYPE html><LF>
<html><LF>
<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><LF>
<title>Dropbox - 4xx</title><LF>
<link href="https://cfl.dropboxstatic.com/static/css/error.css" rel="stylesheet" type="text/css"/><LF>
<link rel="shortcut icon" href="https://cfl.dropboxstatic.com/static/images/favicon.ico"/><LF>
<LF>
</head><LF>
<body><LF>
<div class="figure"><LF>
<img src="https://cfl.dropboxstatic.com/static/images/illustration_catalog/404_error-illo.png" srcset="https://cfl.dropboxstatic.com/static/images/illustration_catalog/404_error-illo@2x.png 2x" alt="Error: 4xx"/><LF>
</div><LF>
<div id="errorbox"><LF>
<div class="not-found"> <h1>Error (4xx)</h1> We can't find the page you're looking for. <div class="not-found--links"> Here are a few links that may be helpful: <ul> <li><a href="https://www.dropbox.com/home?_tk=fof">Home</a></li> <li><a href="https://www.dropbox.com/help?_tk=fof">Help center</a></li> <li><a href="https://www.dropbox.com/login?_tk=fof">Sign in</a></li> <li><a href="https://www.dropbox.co<CR><LF>

 

 

Please help me to sort out the issue.

  • API calls can fail with a generic HTML page like this if the server doesn't recognize the HTTP request as an API call. Is the sample HTTP request you shared exactly what's actually being sent? If so, it's not valid because it's missing the HTTP version (i.e., "HTTP/1.1") at the end of the first line.

    Also, in the sample HTTP request you shared, you're sending an invalid "Content-Type" for this kind of API call. Since /2/files/download doesn't expect anything in the request body, the "Content-Type" header should be omitted anyway. Please try removing that header and try again. (Or, if you can't remove it entirely, please set the value to be an empty string.)
  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff
    API calls can fail with a generic HTML page like this if the server doesn't recognize the HTTP request as an API call. Is the sample HTTP request you shared exactly what's actually being sent? If so, it's not valid because it's missing the HTTP version (i.e., "HTTP/1.1") at the end of the first line.

    Also, in the sample HTTP request you shared, you're sending an invalid "Content-Type" for this kind of API call. Since /2/files/download doesn't expect anything in the request body, the "Content-Type" header should be omitted anyway. Please try removing that header and try again. (Or, if you can't remove it entirely, please set the value to be an empty string.)

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,877 PostsLatest Activity: 12 months ago
325 Following

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 or Facebook.

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!