We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.
Forum Discussion
simotin13
5 months agoHelpful | Level 5
/files/download API fails
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" conten...
- 5 months ago
As Здравко mentioned, please make sure you're encoding header values as documented here: https://www.dropbox.com/developers/reference/json-encoding
Greg-DB
5 months agoDropbox Staff
As Здравко mentioned, please make sure you're encoding header values as documented here: https://www.dropbox.com/developers/reference/json-encoding
- Nico-Uretek5 months agoHelpful | Level 5
I'm correctly encoded.
I forgot to say that the API is used in an application in prod. I didnt modify the code since months.Thanks greg
- Greg-DB5 months agoDropbox Staff
Nico-Uretek If you're still seeing an issue when applying the encoding as documented, please share the specific steps, code, and parameter value(s) needed to reproduce the issue you're seeing so we can look into it. Be sure to redact any access/refresh tokens though. Thanks!
- Nico-Uretek5 months agoHelpful | Level 5
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
https://content.dropboxapi.com/2/files/upload with this code :HttpRequest req = new HttpRequest();req.setMethod('POST');String auth = 'Bearer '+tk;String content = 'application/octet-stream';String dbApiArg = '{\"path\": \"'+path+'/'+ a.name.replace('(xxx)','+') +'\",\"mode\": \"overwrite\",\"autorename\": true,\"mute\": false}';Blob blobBodyValue = a.body;req.setHeader('Authorization', auth);req.setHeader('Content-Type', content);req.setHeader('Dropbox-API-Arg', dbApiArg);req.setBodyAsBlob(blobBodyValue);Http http = new Http();HTTPResponse res = http.send(req);The fact is that my code and the package was working since year and no modifications has been dones ! Other Api like list_folder or download still working. All my organization have this issue.I've test multiples times the upload api and without accents/special characters its work fine. But the management of the files is full automatised so we can't modify the file name to remove problematic characters....
- simotin135 months agoHelpful | Level 5
I checked link page about json-encoding.
I tried "HTTP-header-safe JSON" style and It certainly worked well.
Thank you for your support so quickly!
- Greg-DB5 months agoDropbox Staff
Thanks for confirming simotin13!
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,876 PostsLatest Activity: 3 hours agoIf 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!