Skip to content

Dropbox and GDrive

Dimitri Witkowski edited this page May 8, 2021 · 38 revisions

How to make Dropbox and Google Drive work on your server?

Dropbox

  1. Go to Dropbox Developers: https://www.dropbox.com/developers
  2. Create your app
  3. Choose Dropbox API, not business API, and the desired Dropbox access
  4. Setup URLs (the redirect uri is https://<your host>/oauth-result/dropbox.html)
  5. Add Dropbox app key to KeeWeb, either as dropboxAppKey config field, or in the UI
  6. Click Show secret and add it to KeeWeb in the same way, the config field is called dropboxSecret
  7. If it doesn't work, make sure that PKCE is enabled and custom scopes are configured on the Permissions tab
  8. To add a file from Dropbox folder using config.json, use the following snippet:
    {
        "settings": {
            "dropboxAppKey": "APP_KEY_FROM_DROPBOX",
            "dropboxSecret": "APP_SECRET_FROM_DROPBOX"
        },
        "files": [{
            "storage": "dropbox",
            "name": "Your file name",
            "path": "/your_file.kdbx"
        }]
    }
    

Google Drive

  1. Go to Google Developer Console: https://console.developers.google.com/

  2. Add a project

  3. Create OAuth Client ID

  4. Choose Web application

  5. Setup URLs (the redirect uri is https://<your host>/oauth-result/gdrive.html)

    URL here is the exact URL where you load KeeWeb: if it has index.html, add index.html there too.

  6. Set Client ID and Secret in KeeWeb, in gdriveClientId and gdriveClientSecret fields of your config

  7. You will need to either verify your domain, or add yourself to Risky Access Permissions By Unreviewed Apps Google Group (more about Google Drive in this issue).

  8. Enable Drive API for your project.

OneDrive

  1. Create an app in Azure Portal:
Azure Portal
  1. Choose the desired audience and name, and click Register:
App name
  1. Select Authentication and click Add Platform:
Platform
  1. Choose "Single-page application"

  2. Enter a redirect URI as https://your-domain/oauth-result/onedrive.html:

Domain
  1. Click Configure

  2. Add the following API permissions: Files.Read.All and Files.ReadWrite.All from Microsoft Graph section:

Permissions
  1. Make sure the permission screen looks like this:
API permissions
  1. Copy the Application (client) ID value from the Overview screen and put it in KeeWeb's config.json under onedriveClientId key

  2. If desired, your can also set up the secret in "Certificates and secrets" section and save it as onedriveClientSecret, but it doesn't seem to change anything

Clone this wiki locally