I'm trying to get a list of folders in a users account to present as a list of choices to upload a photo to. I already have a manually built OAuth2 flow working to allow a user to link their Dropbox account and I store the access token gained from that process.
I can use that token to successfully make calls to the REST API, and my code does not use the disable_access_token call, but when I try to use that access token with the Java SDK, I get an exception stating "The given OAuth 2 access token doesn't exist or has expired."
DbxRequestConfig config = new DbxRequestConfig("Piquero/0.1", null);
DbxClient dropbox = new DbxClient(config, dla.getOAuth2AccessToken().toString());
String folder = "/";
listing = dropbox.getMetadataWithChildren(folder);
That last line there results in the exception, and it doesn't seem to matter what folder actually is. (My app requests access to all folders, but for only images & video files.)
Why is this happening?