One month down in 2025: How are your resolutions coming along? Check out how to get back on track here.
Forum Discussion
YousefElsayed
3 years agoExplorer | Level 3
Get ACCESS TOKEN for android app java
I am trying to upload file from the android app to my DropBox account , I don't want the file to be uploaded on the user account ... I just need to upload files to single pre-defined account from the android app without Showing or requesting Auth.
- Greg-DB
Dropbox Staff
If you only want your app to connect to your own account, and for more than a few hours without manual intervention, you should use the OAuth app authorization flow and process it once yourself to get a "refresh token" for your own account. That particular refresh token will always be only for your own account and will not expire automatically (though you can revoke it if/when needed).
If you're using the official Dropbox Java SDK, you can find an example Android app here.
Note though that the API was designed with the intention that each user would link their own Dropbox account, in order to interact with their own files. While it is technically possible to always connect to just one account for all users, we do not officially support this, for various technical and security reasons. For instance, as a matter of security, you should not distribute your own access token or refresh token to other users, e.g., inside of a client-side app like an Android app.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,941 PostsLatest Activity: 21 hours ago
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 or Facebook.
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!