Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
eyra
9 years agoNew member | Level 2
Auth redirect url
Why does the redirect url after the Authorization process look like "#access_token=IuAX.........". The # at the start prevents my server code from getting the url parameters. Using .request().query...
- 9 years agoThat's the OAuth 2 "token" flow, where the access token is returned on the redirect URI fragment. That's meant more for client-side apps. For server-side apps, you should use the "code" flow. You can find more information here:
https://www.dropbox.com/developers/documentation/http/documentation#authorization
tahsini
Dropbox Staff
4 years agoschrettinger in your startOAuth2Authentication function are you providing the correct app key taken from your App Console? The example you provided with "55556756765765756" does not seem to be a valid app key format.
schrettinger
4 years agoExplorer | Level 3
Hello,
thanks for your answer.
I'm using the correct app-key. DropBox recommends the real app-key not to public.
After
Auth.startOAuth2Authentication(this, "4534hkzhxc8hj" - is not the real app-key)
the redirect Url
db-4534erter45646://1/connect?oauth_token=oauth2:&oauth_token_secret=sl.BE4JfDiYMLV2GSkHe-f-TkpxD1-n0EcIIqBbPhQGH5ACISVsMB_AUznLC1weqvQWqsgQEAMgiWQmtXmbGZQ4Wfg2QvbBl1qVImRkJECSWV8sbxharzhk50b9jUfbOsPF_VseA9wgj45R&uid=422345066&state=oauth2%3Ae803b8143706e7ecd2603b2213e1c5a7&expires_in=14400
I tried to generate an Access Token with
private void getAccessToken() {
String accessToken = Auth.getOAuth2Token();
if (accessToken != null) {
SharedPreferences prefs = getSharedPreferences(App_User.userName, Context.MODE_PRIVATE);
prefs.edit().putString("access-token", accessToken).apply();}
}
The return is always null, because the redirect URL (s. above) to the app from DropBox is not valid.
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!