Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dropbox docs missing required settings #480

Open
bukowa opened this issue Apr 19, 2023 · 1 comment
Open

dropbox docs missing required settings #480

bukowa opened this issue Apr 19, 2023 · 1 comment

Comments

@bukowa
Copy link

bukowa commented Apr 19, 2023

Describe the bug

Dropbox docs are missleading.

To Reproduce

  1. Go to: https://django-dbbackup.readthedocs.io/en/master/storage.html#dropbox
  2. Read docs.
  3. Install pip install dropbox django-storages.
  4. Set oauth2_access_token:
DBBACKUP_STORAGE = 'storages.backends.dropbox.DropBoxStorage'
DBBACKUP_STORAGE_OPTIONS = {
    'oauth2_access_token': DROPBOX_ACCESS_TOKEN,
}
  1. Receive
dropbox.dropbox_client.BadInputException: OAuth2 access token or refresh token or app key/secret must be set
  1. Read source code https://github.com/jschneier/django-storages/blob/7914409c90f04a749e517bb39635b218d908265f/storages/backends/dropbox.py#L86

  2. Set:

DBBACKUP_STORAGE = 'storages.backends.dropbox.DropBoxStorage'
DBBACKUP_STORAGE_OPTIONS = {
    'oauth2_access_token': DROPBOX_ACCESS_TOKEN,
    'app_key': '...',
    'app_secret': '...',
}
  1. Everything works.
@OmarLajam
Copy link

"Dropbox has recently introduced short-lived access tokens only, and does not seem to allow new apps to generate access tokens that do not expire."
[https://django-storages.readthedocs.io/en/latest/backends/dropbox.html]

django-dbbackup does not use correct settings for Dropbox.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants