RT 6.0.0 Documentation

RT::ExternalStorage::Dropbox

Go to latest version →

NAME

RT::ExternalStorage::Dropbox - Store files in the Dropbox cloud

SYNOPSIS

    Set(%ExternalStorage,
        Type         => 'Dropbox',
        AccessKey    => '...',
        AccessSecret => '...',
        RefreshToken => '...',
    );

DESCRIPTION

This storage option places attachments in the Dropbox shared file service. The files are de-duplicated when they are saved; as such, if the same file appears in multiple transactions, only one copy will be stored in Dropbox.

Files in Dropbox must not be modified or removed; doing so may cause internal inconsistency. It is also important to ensure that the Dropbox account used has sufficient space for the attachments, and to monitor its space usage.

SETUP

In order to use this storage type, a new application must be registered with Dropbox:

  1. Log into Dropbox as the user you wish to store files as.

  2. Click Create app on https://www.dropbox.com/developers/apps

  3. Choose Scoped access as the API.

  4. Choose App folder as the type of access.

  5. Enter a descriptive name -- Request Tracker files is fine.

  6. After creation, grant the following permissions on Permissions tab:

        files.metadata.write
        files.metadata.read
        files.content.write
        files.content.read
  7. On Settings tab, get App key/App secret and then access the following URL:

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

    Where <App key> is the one you got earlier.

    After a confirmation page, you will receive a code, use it along with App key and App secret in the following command and run it:

        curl https://api.dropbox.com/oauth2/token -d code=<received code> -d grant_type=authorization_code -u <App key>:<App secret>

    The response shall contain refresh_token value.

  8. Copy the provided values into your RT_SiteConfig.pm:

        Set(%ExternalStorage,
            Type         => 'Dropbox',
            AccessKey    => '...',
            AccessSecret => '...',
            RefreshToken => '...',       # Replace the value here, between the quotes
        );
← Back to index