Your workflow is unique 👨💻 - tell us how you use Dropbox here.
Forum Discussion
silent10
8 years agoExplorer | Level 4
Access Token is invalid in android
I am creating a OAuth2AccessToken and storing it in shared preferences. The session is successful till the app is closed. It is invalid after I open the app again. This is the code I am using to crea...
- 8 years ago
The authenticationSuccessful is only meant for use during the actual app authorization flow, when the user chooses whether or not to authorize the app. That being the case, it will only return true during that first session.
If you just want to know if you have an access token, you should use isLinked.
By the way, I redacted it, but you publicly posted a valid access token, so for the sake of security, you should disable it. You can do so by revoking access to the app entirely, if the access token is for your account, on your account security page.
Or, you can disable just this access token using the API:
v1: https://www.dropbox.com/developers/core/docs#disable-token
v2: https://www.dropbox.com/developers/documentation/http/documentation#auth-token-revokeFinally, I should note that the Android Core SDK you're using uses API v1, which is deprecated. You should migrate to API v2. You can use the API v2 Java SDK for that.
silent10
8 years agoExplorer | Level 4
Thanks, it solved my problem. There is no Android SDK for API v2?
Greg-DB
Dropbox Community Moderator
8 years agoYou should use the API v2 Java SDK for Android. There's an Android example app that uses that for reference.
About Dropbox API Support and Feedback
Get help with the Dropbox API from fellow developers and experts.
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!