We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.

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.