Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
Hey guys,
I'm getting a pdf content and want to upload it in my dropbox with the API.
When i'm sending the request with the /upload method, i'm getting no response from dropbox ...
Can you please help on that ?
Here is my code :
HttpRequest req = new HttpRequest();
req.setEndpoint('https://content.dropboxapi.com/2/files/upload');
req.setHeader('Authorization','Bearer ' + token);
req.setHeader('Dropbox-API-Arg','{\"path\": \"/Liasses/Test.txt\",\"mode\": \"add\",\"autorename\":false}');
req.setHeader('Content-Type','application/octet-stream');
req.setMethod('POST');
req.setBody(EncodingUtil.base64Encode(blobToEncode));
req.setTimeout(60000);
Http h = new http();
HttpResponse res = new HttpResponse();
string resp = res.getBody();
system.debug('response : ' + resp);
Thanks in advance !
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!