We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
Vivek K.2
10 years agoNew member | Level 1
Unable to Upload the File into DropBox From Salesforce Using /Files_put API ?
Hi All,
I tried to upload the file into Drop Box account From Salesforce Using /files_put Dropbox Api.But am always getting following Error : [Status=Bad Request, StatusCode=400]{"error": "B...
Greg-DB
Dropbox Community Moderator
10 years agoFirst, you're using basic auth with your app key and secret, but this endpoint requires access to a specific Dropbox account, which is accomplished using an account-specific access token. You can find more information on using OAuth with the Dropbox API here:
https://www.dropbox.com/developers/reference/oauthguide
If you need to implement the OAuth 2 flow manually, this blog post may be helpful:
https://www.dropbox.com/developers/blog/45/using-oauth-20-with-the-core-api
The actual error you're getting indicates that the server didn't receive any data in the request's body. It looks like you're trying to set it using request.setBodyAsBlob, but it appears that didn't work, since the server didn't receive anything. You'll need to debug your usage of HttpRequest to determine why nothing is getting sent up.
About 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!