You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.

Forum Discussion

sarfaraz_k's avatar
sarfaraz_k
New member | Level 2
2 years ago

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...
  • Здравко's avatar
    2 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.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,890 PostsLatest Activity: 3 hours ago
327 Following

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 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!