问题
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.
回答1:
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.
来源:https://stackoverflow.com/questions/40975637/android-dropbox-api-v2-auto-access-using-access-token