We’re aware of an issue causing slower load times on the Dropbox Community forum. It should be resolved soon. Thanks for your patience!
Forum Discussion
fbapi
9 years agoNew member | Level 2
adding credential hardcoded in android instead of asking the client
I have this code in my android app and I want to publish files to my dropbox not to the user dropbox so the credintial should be hardcoded instead of asking the user for them, so I think this line mDBApi.getSession().startOAuth2Authentication(MyActivity.this) should be change but I couldn't know what to replace it with, any help ??
here is the code ..
appKeys = new AppKeyPair(APP_KEY, APP_SECRET);
session = new AndroidAuthSession(appKeys);
mDBApi = new DropboxAPI<AndroidAuthSession>(session);
mDBApi.getSession().startOAuth2Authentication(MyActivity.this);
1 Reply
- Greg-DB9 years ago
Dropbox Community Moderator
[Cross-linking for reference: https://stackoverflow.com/questions/45430985/adding-dropbox-credential-hardcoded-in-android-instead-of-asking-the-client ]
The API was designed with the intention that each user would link their own Dropbox account, in order to interact with their own files. It is technically possible to connect to just one account, but the SDKs don't offer explicit support for it and we don't recommend doing so, for various technical and security reasons.
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!