Your workflow is unique 👨💻 - tell us how you use Dropbox here.
Forum Discussion
David M.232
10 years agoNew member | Level 1
API Version
We have a mobile app accessing Dopbox. We have cloned the app and customized it from another customer. I can use the old keys and can access Dropbox with new app. If I use the new keys created for...
Greg-DB
Dropbox Community Moderator
10 years agoThanks, that's helpful. Ok, so it looks like you're using the Android Core SDK. That presumably means you're using either Eclipse or Android Studio. In either case, when you use mDBApi to make an actual API call after all of the setup you have here, if something went wrong it would raise an exception with specific information about the issue.
I don't see where you make an API call using mDBApi in the provided code (presumably you do that later?), but I do see what I suspect is the issue. Specifically:
String key = mPrefs.getString("dropboxAuthKey", null);
String secret = mPrefs.getString("dropboxAuthSecret", null);
...
AccessTokenPair access = new AccessTokenPair(key, secret);
mDBApi.getSession().setAccessTokenPair(access);
It looks like you're retrieving a pre-existing access token, presumably for the old app. Since access tokens (the dropboxAuthKey and dropboxAuthSecret pair in your code) are specific to apps, you'll need to get a new access token for the new app key/secret.
If that doesn't seem to be the problem, e.g., if the code isn't going through that code path, please copy the relevant output you get when you run this. E.g., from logcat.
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!