Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
malbry
6 years agoExplorer | Level 3
Migrating App Permissions & Access Tokens
Hi there,
I have an Android app which uses a dedicated Dropbox folder. I just want to check that when I use the App Console to migrate to the new SLT model, the current access tokens that my us...
Greg-DB
Dropbox Community Moderator
6 years agoLong-lived access tokens are now considered deprecated, but we don't currently have a plan to disable existing long-lived access tokens. (If that changes, we will of course announce that ahead of time.) That being the case, your users can continue using their existing long-lived access token(s).
And yes, you can test your code with short-lived access tokens while the actual users of your app still use the existing long-lived access token flow. To do so, keep your "Access token expiration" setting on "No expiration", but set 'token_access_type=online' on /oauth2/authorize in your development code to explicitly request a short-lived access token. If using the official Dropbox Java SDK on Android in particular, refer to this example code to see how to switch between these options.
You can refer to the 'token_access_type' field documentation for /oauth2/authorize and Android Auth documentation for the Dropbox Java SDK in particular, as well as this post for more information.
Also, you don't have to change your "Access token expiration" setting before September of next year unless you want to, so you can update your app and wait for most of your users to update to the new version. And for any users on the old version when the change occurs, they'll still receive an access token when processing the app authorization flow, but it will just be short-lived instead of long-lived.
- malbry6 years agoExplorer | Level 3
Thanks for the reply Greg. I had already incorporated the new authentication code in my app in test using the Android template you linked to. The new code works perfectly when the USE_SLT flag is set to FALSE - as you'd expect, because it's just replicating the current workflow. But when I set the USE_SLT flag to TRUE, it takes me to the Dropbox authentication page and that repeatedly fails with a 'no internet connection' message (yes, there is internet). I assume this is because I haven't migrated my app yet on the App Console - is that right?
- Greg-DB6 years ago
Dropbox Community Moderator
That particular error message doesn't sound expected. Can you share a screenshot? Also, if that's occurring in the browser, please share the URL of the page that's failing. Or, if that's occurring in the official Dropbox Android app, please share the version of the the official Dropbox Android app you have installed. Thanks!
- malbry6 years agoExplorer | Level 3
Hi Greg,
This is happening when I execute the following line in my Android app:
Auth.startOAuth2PKCE(context, app_key, DbxRequestConfigFactory.getRequestConfig(), scope);
I attach 2 screenshots below, the first when my app asks to authenticate (using the above code) and the second when I tap 'Allow' which is when the error happens. I think these screenshots are from Android webview rather than via the Android Dropbox app (which is version 214.2.6). I can't get the URL from Android webview as it is not shown to the user. This is running on a Samsung S10e with Android 10.
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!