Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
contato_augify
2 years agoNew member | Level 2
authentication problem on java api
I'm trying to integrate the Dropbox API into the backend of my application, however, the authentication part is a difficult task to do, because, following the documentation, authentication must be done by authorizing through the browser, which is not an option, since the project will run on the server and this process will be transparent to the client
1 Reply
- Greg-DB2 years ago
Dropbox Community Moderator
It is not possible to completely automate the OAuth process where the user chooses to authorize the app and the app then receives the resulting access token and optional refresh token. The authorization step needs to be done manually by the user at least once. If your app needs to maintain long-term access without the user manually re-authorizing it repeatedly, the app should request "offline" access so that it gets a refresh token. The refresh token doesn't expire and can be stored and used repeatedly to get new short-lived access tokens whenever needed, without the user manually reauthorizing the app.
You can find more information in the OAuth Guide and authorization documentation. There's a basic outline of processing this flow in this post which may serve as a useful example.
The official Dropbox Java SDK can actually handle the process for you automatically, e.g., as shown retrieved in this example, and then used as shown in this example .
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!