Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
sarfaraz_k
3 years agoNew member | Level 2
Salesforce - Dropbox API Connection
Please help me regarding integration between dropbox and salesforce , I want to get user details from dropbox and display it in salesforce. Another requirement is, upload files from salesforce a...
- 3 years ago
sarfaraz_k wrote:...
But in system.debug of Account Information, I m getting following error- Account Information ::
{"error": "OAuth 2 \"Authorization\" header is not well-formed."}
...
... string token = 'https://api.dropbox.com/1/account/info'; HttpRequest r = new HttpRequest(); r.setEndpoint(token); r.setHeader('Authorization','Bearer' +accesstoken); r.setMethod('GET');
......
Hi sarfaraz_k,
Take in mind that 'Authorization' header' value should contain its type and the value. These are 2 different things that have to stay different (i.e. with separator between). As far as can be seen you have stick them together. That's why the format doesn't go well. 😉 To avoid such mistakes use some of the official SDKs or prototype your calls using API explorer.
By the way you're using unsupported call; better use 2/users/get_current_account, for instance.
Good luck.
Здравко
3 years agoLegendary | Level 20
sarfaraz_k wrote:...
But in system.debug of Account Information, I m getting following error- Account Information ::
{"error": "OAuth 2 \"Authorization\" header is not well-formed."}
...
... string token = 'https://api.dropbox.com/1/account/info'; HttpRequest r = new HttpRequest(); r.setEndpoint(token); r.setHeader('Authorization','Bearer' +accesstoken); r.setMethod('GET');
......
Hi sarfaraz_k,
Take in mind that 'Authorization' header' value should contain its type and the value. These are 2 different things that have to stay different (i.e. with separator between). As far as can be seen you have stick them together. That's why the format doesn't go well. 😉 To avoid such mistakes use some of the official SDKs or prototype your calls using API explorer.
By the way you're using unsupported call; better use 2/users/get_current_account, for instance.
Good luck.
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!