Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
Hi,
I'm using Dropbox API and found /files/download API fails since few days before.
The API return following response body,
<!DOCTYPE html>
<html>
<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Dropbox - 400</title>
<link href="https://cfl.dropboxstatic.com/static/metaserver/static/css/error.css" rel="stylesheet" type="text/css"/>
<link rel="shortcut icon" href="https://cfl.dropboxstatic.com/static/images/favicon.ico"/>
</head>
<body>
<div class="figure">
<img src="https://assets.dropbox.com/www/en-us/illustrations/spot/target-miss.svg" alt="Error: 400"/>
</div>
<div id="errorbox">
<h1>Error (400)</h1>Something went wrong. Don't worry, your files are still safe and the Dropbox team has been notified. Check out our <a href="https://status.dropbox.com">Status Page</a> to see if there is a known incident, our <a href="https://www.dropbox.com/help">Help Center</a> and <a href="https://forums.dropbox.com">forums</a> for help, or head back to <a href="https://www.dropbox.com/home">home</a>.
</div>
some APIs are still works successfully ex.(/get_metadata, /list_folder, /get_thumbnail), but '/files/download' fail.
Is there any information about this issue?
Thanks in advance simotin13
@Nico-Uretek wrote:..., Dropbox block now every special character and ... (not in accordance with the documentation haha). ...
@Nico-Uretek, It depends on what you mean here. It's according Dropbox documentation, but NOT according standards. For instance, Dropbox (note the usage of Dropbox, not Dropbox API nor SDK) doesn't support all UNICODE symbols, but only those in Basic Multilingual Plane. 🤷 This is Dropbox core bug! Of course, the same results in impossible usage of surrogate pairs during JSON encoding - they are invalid according Dropbox API.
Do you use such symbols as file/folder names?
@Greg-DB Yes I still got the problems.
I'm using Dropbox on Salesforce and using two way to upload files (both didn't works since yesterday)
- by using the official dropbox package "Dropbox for Salesforce" (apiName "Dropbox_for_SF") version 1.704
- by using a custom code in apex (like java) that create an http request on the
@Nico-Uretek wrote:... Yes i'm using (french) accents and just the - characters in my name files and it would take a lot of time and devs to remove all of them...
No, no, this is not and cannot be an issue - it's not a surrogate pair! There is something else though:
@Nico-Uretek wrote:...
String dbApiArg = '{\"path\": \"'+path+'/'+ a.name.replace('(xxx)','+') +'\",\"mode\": \"overwrite\",\"autorename\": true,\"mute\": false}';...req.setHeader('Dropbox-API-Arg', dbApiArg);...
Where is your string encoding above? 🤔 I cannot see it! That's what makes your issues. 😉
Hope this helps.
PS: Missing of any try for encoding (including for such symbols that have to be encoded not only according Dropbox, but mandatory according applicable standards) makes your code instable or even vulnerable - the JSON object may become restructured by just "appropriate" path/file!!!
@Nico-Uretek I don't actually see any encoding being done on your header values in your code. Please make sure you have the encoding implemented as covered here.
Hi there!
If you need more help you can view your support options (expected response time for a 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!