You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
PPT320
4 years agoNew member | Level 2
Missing scope from request
Hi, I'm looking for some help setting up an Android app with the api. I am looking to list all files in a dropbox folder, select one to download and then read it into my app to process the data....
- 4 years ago
You can actually do either.
If you want it to default to whatever is set for the app on the App Console at that point in time, you should pass in null.
If you want to be specifically defined by the code, even if additional scopes are added to the App Console, you should pass the specific desired scope list. (Note that you can't request scopes that aren't enabled for the app though.)
PPT320
New member | Level 2
Thanks for your reply Greg,
So do you mean remove the arrays completely to force use of defaults, like
DropboxActivity.startOAuth2Authentication(UserActivity.this, getString(R.string.app_key), null);
or actually add the files.content.read like
DropboxActivity.startOAuth2Authentication(UserActivity.this, getString(R.string.app_key), Arrays.asList("account_info.read", "files.content.read", "files.content.write"));
I would prefer if it called all be controlled from the app on dropbox/developer
Greg-DB
4 years agoDropbox Staff
You can actually do either.
If you want it to default to whatever is set for the app on the App Console at that point in time, you should pass in null.
If you want to be specifically defined by the code, even if additional scopes are added to the App Console, you should pass the specific desired scope list. (Note that you can't request scopes that aren't enabled for the app though.)
- PPT3204 years agoNew member | Level 2
Thanks Greg,
I changed it to null and after initially failing because the example app then tried to open the file but its format won't allow it. I commented out the link to view the file and its now appears to be working. Thanks for your help.
new DownloadFileTask(FilesActivity.this, DropboxClientFactory.getClient(), new DownloadFileTask.Callback() {
@Override
public void onDownloadComplete(File result) {
dialog.dismiss();
//if (result != null) {
// viewFileInExternalApp(result);
//}
}
About Discuss Dropbox Developer & API
Make connections with other developers
795 PostsLatest Activity: 7 days 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!