> ## Documentation Index
> Fetch the complete documentation index at: https://docs.refold.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Setup

> Connect to your Dropbox app for OAuth.

To setup your Dropbox app in Refold for OAuth, you will need the following credentials from your [Dropbox Developer Account](https://www.dropbox.com/developers/):

* Client ID
* Client Secret
* Scopes

### Pre-requisites

1. Dropbox Developer account. You can create one [here](https://www.dropbox.com/register).

### Required Settings

* **Mandatory Scopes**

1. account\_info.read
2. sharing.read

<Info>If you haven't already created an app in Dropbox, you'd need to create one.</Info>

### Creating an app in Dropbox

To create a Dropbox app and acquire the above mentioned credentials, please follow the steps mentioned below:

1. Log in to your [Dropbox Developer Account](https://www.dropbox.com/developers/).
2. Click on the `App Console` icon in the top bar and click `Create App` button.

<img height="200" src="https://mintcdn.com/cobalt-55/C3P12YsraPVmMY5N/images/Dropbox/dropbox_navigation.png?fit=max&auto=format&n=C3P12YsraPVmMY5N&q=85&s=d25c2355798688968f818b43f7d94cf6" alt="Navigation for App setup" data-path="images/Dropbox/dropbox_navigation.png" />

3. Choose `API` as **Scoped access**, `Type of Access` as **Full Dropbox**, provide an unique app `Name` and click `Create App`.
4. Go to your [`Apps catalog`](https://app.gocobalt.io/apps) in **Refold** > Search for `Dropbox` > `Settings` > `Use your credentials` > `Callback Url` > Copy it.
5. In the app, under `Settings` go to **OAuth 2** section, paste the Callback Url and click `Add`.
6. Select the **mandatory scopes** under **Permissions** tab, as provided in your Refold Dropbox settings page and click on the `Submit` button.

<img height="200" src="https://mintcdn.com/cobalt-55/C3P12YsraPVmMY5N/images/Dropbox/dropbox_config.png?fit=max&auto=format&n=C3P12YsraPVmMY5N&q=85&s=acbbec9cd0a3c79660b6108d8ec2d015" alt="Setting up Dropbox Developer app" data-path="images/Dropbox/dropbox_config.png" />

7. Click on `Details` and copy the `App key`**(Client ID)** and `App secret`**(Client Secret)** from the **Settings** section.

<img height="200" src="https://mintcdn.com/cobalt-55/C3P12YsraPVmMY5N/images/Dropbox/dropbox_credentials.png?fit=max&auto=format&n=C3P12YsraPVmMY5N&q=85&s=394ebc2a0f35bd48a35795dabd1d54b9" alt="Getting Credentials" data-path="images/Dropbox/dropbox_credentials.png" />

#### Configuring credentials in Refold

App settings page lets you configure the authentication settings for an `OAuth 2.0` based application. For your customers to provide you authorization to access their data,
they would first need to install your application. This page lets you set up your application credentials.

<img height="200" src="https://mintcdn.com/cobalt-55/C3P12YsraPVmMY5N/images/Dropbox/dropbox_cobalt.png?fit=max&auto=format&n=C3P12YsraPVmMY5N&q=85&s=0d60c453f0b7cbeb393fe30c5e8b8c14" alt="Setting up application client credentials" data-path="images/Dropbox/dropbox_cobalt.png" />

Provide the acquired Client ID and Client Secret under Settings of the app and save it.

#### Configuring Scopes

Refold lets you configure what permissions to ask from your users while they install your application. The scopes can be added or removed from the App settings page, under `Permissions & Scopes`
section.

For some applications Refold sets **mandatory scopes** which cannot be removed. Additional scopes can be selected from the drop down. Refold also has the provision to add any
custom scopes supported by the respective platform.

<img height="200" src="https://mintcdn.com/cobalt-55/C3P12YsraPVmMY5N/images/Dropbox/dropbox_scopes.png?fit=max&auto=format&n=C3P12YsraPVmMY5N&q=85&s=a0ddc1cf86b7d358e327af9f746daef8" alt="OAuth Scopes" data-path="images/Dropbox/dropbox_scopes.png" />

Once the scopes has been added to the application in Refold, go to your [Dropbox Developer Account](https://www.dropbox.com/developers/) and update the scopes as added on Refold.

Select the OAuth App created for Refold > Click on `Permissions` > Add the scopes as added in Refold > Click on `Submit`.

<Warning>
  If you are facing scopes missing or invalid scope error. Make sure you are not passing any custom scope not supported by the platform. And, the scopes selected here are
  identical to the ones selected in the platform.
</Warning>

#### Actions and triggers

Once the above setup is completed, you can create orchestrations of your use-cases using Dropbox actions and triggers. Following are the set of Dropbox actions and triggers
supported by Refold.

<Tabs>
  <Tab title="Actions">
    <AccordionGroup>
      <Accordion title="Files">
        1. **List Received Files** - List all received files in Dropbox.
        2. **Move File or Folder** - Move a file or folder in Dropbox.
        3. **Search Files** - Search for files in Dropbox.
        4. **Delete File** -Delete a file in Dropbox.
      </Accordion>

      <Accordion title="Folders">
        5. **Create Folder** - Create a folder in Dropbox.
        6. **List Shared Folders** - List shared folders in Dropbox.
      </Accordion>

      <Accordion title="Users">
        7. **List Team Members** - List all team members in Dropbox.
        8. **Create User** - Create a user in Dropbox.
        9. **Remove User** - Remove a user in Dropbox.
      </Accordion>

      <Accordion title="Others">
        10. **HTTP Request** - Make HTTP API calls to any Dropbox documented REST APIs.
      </Accordion>
    </AccordionGroup>
  </Tab>

  <Tab title="Triggers">
    1. **File changed** - Triggers when a file is changed on Dropbox.
  </Tab>
</Tabs>
