简体   繁体   中英

Android Dropbox API v2 auto access using access token

In android API v1 I am able to pass access token through which I didn't need to login to Dropbox. In api v2 can you please let me know how to do that?

In API v2 auto access can be done without the following code -

Auth.startOAuth2Authentication(MainActivity.this, Constants.APP_KEY);

Please provide me any solution.

Yes, using the Dropbox API v2 Java SDK, you can still directly supply an access token without starting the authorization flow.

To do so, you can use a DbxClientV2 constructor that takes an OAuth 2 access token directly.

Note that it is still highly discouraged to distribute access tokens for a particular account in a client-side app, as discussed in this post .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM