cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

adding credential hardcoded in android instead of asking the client

adding credential hardcoded in android instead of asking the client

fbapi
New member | Level 2

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 1

Greg-DB
Dropbox Staff
[Cross-linking for reference: https://stackoverflow.com/questions/45430985/adding-dropbox-credential-hardcoded-in-android-instead-... ]

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.
Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?