ABSYZ ABSYZ

  • Home

    Home

  • About us

    Who We Are

  • Our Expertise

    What we Do

  • Our Approach

    How We Do It

  • Products

    What We Made

  • Industries

    Who We Do It For

  • Clients

    Whom We Did It For.

  • Article & Blogs

    What Experts Think

  • Careers

    Join The Team

  • Get In Touch

    Let’s Get Started

ABSYZ

Dropbox Integration with Salesforce

Home / Article & Blogs / Apex / Dropbox Integration with Salesforce
By Team ABSYZ inApex, Integration, Salesforce

Hi All,

Today I will show you how to copy files to Dropbox from Salesforce using Dropbox integration.

You don’t need to buy costly AppExchange apps or services like Zapier to do this. We will show you how to do this with a simple Apex class.

First of all, we need is a Dropbox account and a Salesforce org with which we will integrate with.

If you don’t have a Dropbox account, you can get one at https://www.dropbox.com/. We have one already, so we won’t be signing up again.

Capture1
Dropbox SignUp page

Fill up the form, and you will get your Dropbox account.

Now, go to the developer section of Dropbox. To do so type https://www.dropbox.com/developers in the URL and press Enter. Here we will be creating a Dropbox app that will act as a listener between the Salesforce org and the Dropbox account.

Capture2
Dropbox developer page

Click on Create your app tab to start creating the app.

Screen Shot 2017-06-28 at 9.55.19 PM
Create app page in Dropbox

On the next page, select Dropbox API, and access as Full Dropbox. Give a name to your app and click on Create app button.

(Refer to the image below to create the app)

Screen Shot 2017-06-28 at 9.58.05 PM
App settings

After the app is created, there are a few more settings you need to do to proceed. Keep the App key and App secret handy. You have to update the Redirect URIs in the OAuth 2 section later on.

Screen Shot 2017-06-28 at 10.03.33 PM
App advanced settings

Now, create the Visualforce page from where you will be uploading the files to Dropbox. Set the URL of the visual force page in the Redirect URIs of the Dropbox app. (image below)

Screen Shot 2017-07-01 at 9.56.40 PM
Update the Redirect URI with vf page URL

Click the Dropbox login button to log in to Dropbox and authorise it to upload files to your Dropbox account.

Screen Shot 2017-07-01 at 10.08.24 PM
Click Dropbox login

Login to your Dropbox account to give authorisation.

Screen Shot 2017-07-01 at 10.10.45 PM
Login to Dropbox

Now you can see the email id of the connected Dropbox account and a file uploaded.

Select a file and Upload to Dropbox.

Screen Shot 2017-07-01 at 10.16.54 PM
Select file and Upload

[code language=”java”]

public DropboxUploadController() {
connected = false;
success = false;
apiKey = ”; // this is your dropbox apikey
apiSecret = ”; // this is your dropbox api secret
redirectURI = ‘https://souravmoy-dev-ed–c.ap2.visual.force.com/apex/DropboxUpload’; // url of the vf page in which the dropbox login is done
Dropbox_Account_endpoint = ‘https://api.dropboxapi.com/1/account/info’;
Dropbox_files_endpoint = ‘https://content.dropboxapi.com/1/files_put/auto/’;
Dropbox_OAuth_authorize = ‘https://www.dropbox.com/1/oauth2/authorize’;
Dropbox_OAuth_token = ‘https://api.dropboxapi.com/1/oauth2/token’;

code = ApexPages.currentPage().getParameters().get(‘code’);
if(code != null) {
connected = true;
authorizationCode = code;
getRefreshToken();
retrieveUserInfo();
}
}

[/code]

In lines 4, 5 write the App Key and App Secret of your Dropbox app.

References:

The code in GitHub.

Dropbox
111
Like this post
127 Posts
Team ABSYZ

Search Posts

Archives

Categories

Recent posts

Meet OmniStudio – Revolutionize Your Creative Work

Meet OmniStudio – Revolutionize Your Creative Work

BioAsia 2023 in Hyderabad: An Annual International Event

BioAsia 2023 in Hyderabad: An Annual International Event

The Role Of Marketing in Small & Medium Enterprises

The Role Of Marketing in Small & Medium Enterprises

Salesforce For Retail: How Salesforce CRM Can Help Retailers

Salesforce For Retail: How Salesforce CRM Can Help Retailers

What is ChatGPT & How Does It Work?

What is ChatGPT & How Does It Work?

  • Previous PostLogin to Salesforce from Facebook using Graph API
  • Next PostWorkAround for PDF Rendering in SF1

Related Posts

Meet OmniStudio – Revolutionize Your Creative Work
Salesforce

Meet OmniStudio – Revolutionize Your Creative Work

Salesforce For Retail: How Salesforce CRM Can Help Retailers
Salesforce

Salesforce For Retail: How Salesforce CRM Can Help Retailers

Introduction To Copado Devops Tool
Salesforce

Introduction To Copado Devops Tool

What is Salesforce Code Builder?
Salesforce

What is Salesforce Code Builder?

1 Comment

  1. chezib
    Reply
    14 December 2017

    This is nice.
    Did you notice dropbox API v1 is not available anymore?…

    Reply

Leave a Reply (Cancel reply)

Your email address will not be published. Required fields are marked *

*
*

ABSYZ Logo

INDIA | USA | UAE

  • About us
  • Article & Blogs
  • Careers
  • Get In Touch
  • Our Expertise
  • Our Approach
  • Products
  • Industries
  • Clients
  • White Papers

Copyright ©2022 Absyz Inc. All Rights Reserved.

youngsoft
Copy
We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “ACCEPT ALL”, you consent to the use of ALL the cookies. However, you may visit "Cookie Settings" to provide a controlled consent. Privacy Policy
Cookie SettingsREJECT ALLACCEPT ALL
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled

Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.

CookieDurationDescription
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.

Functional

Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.

Performance

Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.

Analytics

Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.

Advertisement

Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.

Others

Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.

SAVE & ACCEPT