We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.
Forum Discussion
overjeer
8 years agoHelpful | Level 6
API always returns invalid_access_token, 500 error when i go to "my apps"
Hi, I understand that there was some service disruption about 10 hours ago. However, I believe this has been resolved now. When I generate an access token using the dropbox java sdk on my And...
- 8 years ago
You mentioned this is for an Android app, but the DbxWebAuth you're using isn't meant for Android. The API v2 Java SDK does have specific support for Android though. There's an example Android app using it here.
- To set that up, your AndroidManifest.xml should be set up as shown here.
- You start the flow by calling startOAuth2Authentication as shown here.
- You complete the flow by calling getOAuth2Token as shown here.
- Your app can store and re-use the resulting access token for that user, as the example does here.
- Once you have an access token, you can make a client as shown here.
For the code you are currently using though, it looks like you're getting that 'invalid_access_token' error because you're supplying an authorization code, instead of an access token.
When using DbxWebAuth, you get back an "authorization code", which is not an access token. You need to exchange that authorization code for an access token, as shown here.
- 8 years agothanks mate. I will give this a go and come back to you. Thanks so much for coming back so swiftly!
Greg-DB
Dropbox Staff
You mentioned this is for an Android app, but the DbxWebAuth you're using isn't meant for Android. The API v2 Java SDK does have specific support for Android though. There's an example Android app using it here.
- To set that up, your AndroidManifest.xml should be set up as shown here.
- You start the flow by calling startOAuth2Authentication as shown here.
- You complete the flow by calling getOAuth2Token as shown here.
- Your app can store and re-use the resulting access token for that user, as the example does here.
- Once you have an access token, you can make a client as shown here.
For the code you are currently using though, it looks like you're getting that 'invalid_access_token' error because you're supplying an authorization code, instead of an access token.
When using DbxWebAuth, you get back an "authorization code", which is not an access token. You need to exchange that authorization code for an access token, as shown here.
overjeer
8 years agoHelpful | Level 6
thanks mate. I will give this a go and come back to you. Thanks so much for coming back so swiftly!
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,877 PostsLatest Activity: 12 months agoIf 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 or Facebook.
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!