How to configure DropBox Storage

How to configure DropBox Storage


1. Create a DropBox Account

If you don't already have one, visit the DropBox website (https://www.dropbox.com) to create a DropBox account.

2.  Create a DropBox App


  • Select “Scoped access” in Choose an API





  • Choose “App folder” in type of App and set a name for your App




Your Dropbox app for getting data from ScrapeHero has been successfully created. You can access your created apps from the app console: https://www.dropbox.com/developers/apps/

3.  Set App permissions

  • Open you app from App console and go to permissions

  • Enable all 4 permissions in the Files and folders section and click submit


4.  Generate an Authorization code

  • Goto ‘settings’ and find the App key


  • Authorization code can be generated by opening the below URL.


https://www.dropbox.com/oauth2/authorize?client_id=<APP_KEY>&token_access_type=offline&response_type=code


Replace <APP_KEY> with your Dropbox app key



  • Click on ‘Continue’


  • Click on ‘Allow’



  • Authorisation code will get generated as below

 

5.  Generate a Refresh Token

Please copy the authorization code and use it to send the provided cURL POST request below in order to generate a refresh token for the Dropbox app.


curl https://api.dropbox.com/oauth2/token \
-d code=AUTHORIZATIONCODEHERE \
-d grant_type=authorization_code \
-u APPKEYHERE:APPSECRETHERE​



For AUTHORIZATIONCODEHERE, use the code obtained in step 3

APPKEY and APPSECRET can be obtained from settings section of app



You will get a response like below,


{

    "access_token": "sl.ByhMVNG3XkXEMapmCN4lU5KSfxUNTb62QuTREtnWXHyRNM1dzLSGwmil5EFJQEBhnLdOv",

    "token_type": "bearer",

    "expires_in": 14400,

    "refresh_token": "JdBkMuDBOywAAAAAAAAAAW082__gXOZjhjN_LImS97gkbZe",

    "scope": "account_info.read files.content.read files.content.write files.metadata.read files.metadata.write",

    "uid": "117779",

    "account_id": "dbid:AADl0eRklSeWO2UNqvM"

}



Please share the refresh_token”, “App key, and App secret with us to upload data to your DropBox account.


Note: If you encounter any other invalid responses such as an expired code, please proceed to generate a new authorization code (step 3) and then retry step 4 with the newly generated authorization code.



    • Related Articles

    • How to configure Microsoft Azure Storage

      1. Create an Azure Account If you don't already have one, visit the Azure portal (https://portal.azure.com) to create an Azure account. 2. Create a Storage Account Within the Azure portal, navigate to the "Storage accounts" service. Click "Create" to ...
    • How to configure Google Cloud Storage

      1. Sign Up or Log In to Google Cloud Platform If you don't already have a Google Cloud account, you'll need to sign up at Google Cloud Platform. If you have an account, simply log in. 2. Creating a Project Create a new project in the Google Cloud ...
    • How to configure FTP

      Please note: These instructions below are generic and may vary depending on your specific FTP server software and configuration. It's recommended to consult your server documentation for detailed instructions tailored to your FTP environment. 1. ...
    • How to configure SFTP

      To ensure the secure transfer of your files, use Secure File Transfer Protocol (SFTP). Here's a guide to help you set up SFTP access on your server: Please note: These instructions below are generic and may vary depending on your specific FTP server ...
    • How to configure an Amazon S3 bucket to allow ScrapeHero to write data and images

      We will assume that you have already created your Amazon S3 account. If not, then go here to do that https://aws.amazon.com/ At the end of this exercise, we will need 2 things from you through an email or in response to the ticket. These two items ...