Connect Dropbox with Salesforce using REST APIs

Salesforce helps companies build a holistic view of their customers. As a result, companies generate more Leads, make more data-driven decisions and multiply their chances of success and growth. But Salesforce customers are not spared from the challenges that come along with the advantages of the platform. These range from Limited Storage Space to exorbitant additional Storage Costs. The silver lining to these problems is External Storage Systems that can be seamlessly integrated with Salesforce.

So, We are going to integrate the most popular Cloud Storage services and World's Biggest CRM Platform. Dropbox with Salesforce integration brings many benefits to large businesses as well as small ones like businesses can offer better customer service while saving time and money – what could be better?

Also Read: API Callouts From Lightning Web Component

Prerequisites

  • An active salesforce account
  • An active dropbox account
First, we will let you know about the dropbox changes we need to do for Integration.
1. Create DropBox API app in AppConsole.
2. Click on the Create App button.
3. Now, You have to check the Scoped Access checkbox.
4. Choose the type of access you want: App Folder or Full Dropbox.
5. Give any Name to your app.

6. Then Click on the Create App button.
7. Now, You will redirect to the page below:

8. Click on the Permissions Tab.

9. You have to check on the below Scopes:

10. Then click on Submit.
11. Now, Copy App Key and App Secret from Settings

12. Now, Login to Salesforce and Create a VF Page.

13. Copy the VF Page URL (In my case, it is SalesforceBaseUrl/apex/Testdropbox)  and go back to Dropbox, and put the URL in Redirect URIs.
14. Now, Create an Apex Class to authenticate with dropbox.

15. Open the VF page and Click on Authorize with Dropbox button and check you got the response with the 200 status code.

16. Click on the refresh button to refresh the access token again to use it.


Woohoo!!! We have completed all steps to authorize dropbox and Salesforce. Now, You can use any endpoint of dropbox and try to send callouts to dropbox.


Also Read: Uploading File to Dropbox from LWC without Apex


Thanks for reading.  Still, if you have any further suggestions, thoughts, and questions, then just make sure to comment down.

Comments

Anonymous said…
Amazing Stuff with great details.