cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
We love to hear how every person gets the most from Dropbox, and it seems everyone has a slightly different use for it - tell us yours here!

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Andriod App to Only use short tokens

Andriod App to Only use short tokens

raymondc
New member | Level 2

Hello,

 

All this is quite new to me but I've read many post regarding new workflow. Thus, sorry if what I am saying makes no sense.

 

I've read that using startOAuth2PKCE uses the new flow. However, this uses refresh tokens as well. What happens if I just want to use short lived tokens and ask the user to re-authenticate when the short lived tokens expires. Is there another function to use for that purpose?

1 Accepted Solution

Accepted Solutions

Re: Andriod App to Only use short tokens

Greg-DB
Dropboxer

No, the authorization functionality for Android in the Java SDK automatically requests "offline" access (i.e., to retrieve a refresh token), and doesn't offer the ability to configure that. I'll pass this along as a feature request, but I can't promise if or when that might be implemented.

 

(For reference, the DbxWebAuth functionality does offer the ability to specify the token type, but that's not meant or built for use on Android.)

View solution in original post

4 Replies 4

Re: Andriod App to Only use short tokens

Greg-DB
Dropboxer

No, the authorization functionality for Android in the Java SDK automatically requests "offline" access (i.e., to retrieve a refresh token), and doesn't offer the ability to configure that. I'll pass this along as a feature request, but I can't promise if or when that might be implemented.

 

(For reference, the DbxWebAuth functionality does offer the ability to specify the token type, but that's not meant or built for use on Android.)

View solution in original post

Re: Andriod App to Only use short tokens

raymondc
New member | Level 2

Thank you for the quick reply.

 

One more question.

 

If I use this version of startOAuth2PKCE with scope set to null

public static void startOAuth2PKCE(Context context, String appKey,
DbxRequestConfig requestConfig) {

Would this gives all permissions to do anything in dropbox(upload, download,...)?

 

 

Re: Andriod App to Only use short tokens

Greg-DB
Dropboxer

If you don't specify "scope", it will default to requesting the set of scopes enabled for your app (on the App Console) at the time of authorization.

Re: Andriod App to Only use short tokens

raymondc
New member | Level 2

Thanks for the clarifications.

Who's talking

Top contributors to this post

  • User avatar
    raymondc New member | Level 2
  • User avatar
    Greg-DB Dropboxer
What do Dropbox user levels mean?
Need more support?