Dropbox

Read and write files from a Dropbox folder

Introduction to Dropbox

Dropbox is a widely-used cloud storage service that offers file synchronization, personal cloud, and client software. It's easy to use and works well with different devices. You can also share files with others and collaborate on projects.

Signing up for Dropbox

To start using Dropbox for your storage needs, follow these steps:

  1. Visit Dropbox Website: Navigate to Dropbox.com and explore the different features and plans they offer.

  2. Create an Account: Click on the ‘Sign Up’ button and fill out the necessary details to create your Dropbox account.

🚧

Your ByteNite and Dropbox emails must match

In order for the connector to work, please make sure that your Dropbox account's email is the same of your ByteNite account. This ensures integrity and protection of the connector.

  1. Verify Your Email: Once you’ve signed up, verify your email address to activate your account.
  2. Access Your Dashboard: Log in to your account to access the Dropbox dashboard. This is where you can manage your files and folders, share documents, and collaborate with others.
  3. Set Up Folders: In your dashboard, organize your files and set up folders which will act as the origin or destination for data in your integration with ByteNite.
  4. Optional: Install Dropbox Client: To streamline the process of file synchronization, consider installing the Dropbox client on your computer.

For more detailed instructions and support, visit Dropbox's help centerD.

Connect your ByteNite and Dropbox accounts

In order to make ByteNite read and store files on your Dropbox account, you'll need to set up our Dropbox connector. Before beginning, please remember that your Dropbox account email and your ByteNite account email must match in order for the connector to work. Here are two ways that you can set up your ByteNite-Dropbox connector:

A. Set up the Dropbox connector via UI

For an easy and quick connection, you can head over to our Dropbox connector page at https://app.bytenite.com/connectors/dropbox, click on "Connect your Dropbox Account", and follow the sign-in steps to log into Dropbox. When asked for permission to read and write from your Dropbox storage, choose "Allow".

Dropbox Connector Landing Page

B. Set up the Dropbox connector via API (recommended)

While the previous method is immediate, it needs you to manually go over the connector page every few hours to refresh your authentication connection. For developer users, we recommend retrieving your Dropbox access token by implementing Dropbox OAuth. You can use this Dropbox OAuth guide to retrieve your access token.

Once you've got a valid access token associated with your Dropbox account, send a request to the Connectors endpoint specifying the following parameters:

KeyValueMandatory
connectorName"dropbox"*
accessTokenYour Dropbox access token*
expiresAtThe expiration date of your token*

Example

connectors_body = {
  "connectorName": "dropbox",
  "accessToken": "YOUR_DROPBOX_ACCESS_TOKEN",
  "expiresAt": "YYYY-MM-DDThh:mm:ss<TZDSuffix>"
}
response = requests.post(f'https://api.bytenite.com/v1/auth/connectors/token', 
                         json=connectors_body, 
                         headers={'Authorization': "YOUR_BYTENITE_ACCESS_TOKEN"})

After this step, your Dropbox account is connected to your ByteNite account for as long as the token is valid. You will need to repeat this step when the token expires if you want to continue to use the connector.


Data origin

Once you have connected your Dropbox account, you can start plugging it into your data workflow with ByteNite.

You can retrieve files from your Dropbox folders and use them as data origin for ByteNite. Ensure your access token has the necessary permissions set for these folders, especially if they are shared or part of a team account.

Configuration

API Endpoints

Create a new job   •    Set job data source

dataSource object:

KeyValueMandatory
dataSourceDescriptor"dropbox"*
params@type"type.googleapis.com/bytenite.data_source.DropboxDataSource"*
paramsidThe Dropbox ID of your file. You can find your file IDs by listing them using the Dropbox API "List" endpoint.*
paramsnameThe complete name of your input file.*
paramspathThe path to the folder where your input file is stored.*

Example

{
  "dataSource": {
    "dataSourceDescriptor": "dropbox",  
    "params": {
      "@type": "type.googleapis.com/bytenite.data_source.DropboxDataSource",
      "id": "oaCAVmEyrqYnkZX9955Y",
      "name": "big_buck_bunny.mp4", 
      "path": "/input_videos/"
    }
  }
}

Data destination

You can upload your output files from ByteNite to a Dropbox folder. Ensure your access token has the necessary permissions set for these folders, especially if they are shared or part of a team account.

Configuration

API Endpoints

Create a new job   •    Set job data source

dataDestination object:

KeyValueMandatory
dataSourceDescriptor"dropbox"*
params@type"type.googleapis.com/bytenite.data_source.DropboxDataSource"*
paramsnameThe name of your output file. Note: you shall include the file extension in the output name.*
paramspathThe path to the output folder where you want to store your file. Note: if the output path doesn't exist, it will be created*

Example

{
  "dataDestination": {
    "dataSourceDescriptor": "dropbox",  
    "params": {
      "@type": "type.googleapis.com/bytenite.data_source.DropboxDataSource",
      "name": "my_encoded_video.mp4",
      "path": "/output_videos/"
    }
  }
}