Curious about A, B, C, and D drives? Learn what they mean and how to use them effectively with Dropbox in this handy guide! - check it out now!

Forum Discussion

HADES's avatar
HADES
Helpful | Level 5
2 years ago
Solved

Django integrate with Dropbox

Hello everyone I met an issue with the Dropbox access token when I generated it on the Dropbox console app and used it in setting.py like this. MEDIA_URL = '/media/' MEDIA_ROOT = BASE_DIR / 'Me...
  • Здравко's avatar
    2 years ago

    Hi HADES,

    Just keep in mind that no any real Dropbox API call can be seen in the code you shared. Another thing is that all access tokens are short lived, so wherever you perform actual API calls it's likely to fail after some time (typically 4 hours). For long term access you need refresh token. If a supported SDK is in use just proper initialization is enough (for the rest SDK takes care), otherwise tracing access token validity and refresh whenever needed should be performed.

    Hope this gives direction.