Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
saurabhmittal19
9 years agoExplorer | Level 3
IllegalStateException while finishFromRedirect in API v3
I am using dropbox-core-sdk version 3.0.5, and I am getting "Already Connected" while trying to authorise account (and get access token) to be associated with our application.
I am using the th...
- 9 years agoThanks! Based on that stack trace, it looks like this is actually occurring in getCurrentAccount. Can you confirm you're running on Google App Engine, and can you share your code for constructing your DbxRequestConfig and calling getCurrentAccount?
saurabhmittal19
9 years agoExplorer | Level 3
Thanks for mentioning the method where the issue is coming. And yes it is a Google Cloud project running on AppEngine. I have actually resolved the issue after debugging this getCurrentAccount() method.
And this was the code snippet which we were using for calling getCurrentAccount
String clientIdentifier = "abc/1.0"; String userLocale = Locale.getDefault().toString(); DbxRequestConfig config = new DbxRequestConfig(clientIdentifier, userLocale, AppEngineHttpRequestor.Instance); DbxClientV2 client = new DbxClientV2(config, accessToken); client.users().getCurrentAccount().getEmail();
Now I changed this to:
String clientIdentifier = "abc/1.0"; DbxRequestConfig config = new DbxRequestConfig(clientIdentifier); DbxClientV2 client = new DbxClientV2(config, accessToken); client.users().getCurrentAccount().getEmail();
And the code started working. Thanks for all the support. One last question, de we need to have this clientIdentifier as "abc/1.0" hardcoded?
Greg-DB
Dropbox Community Moderator
9 years agoThanks for following up. I'm glad to hear you got this working.
Your "clientIdentifier" should identify your app and the current version number of your app. This is used in the User-Agent header when making API calls, which can be useful to identify and when debugging your app. You can find more information on that here:
Exactly how you build that string is up to you though. It can be entirely static, or you can dynamically build it with the version number automatically added based on the version of the app, for example.
Also, to clarify, there isn't a Dropbox API v3. The current version of the Dropbox API is API v2. The v3 number you're likely referring to is for the Dropbox Java SDK itself, which is currently at v3.0.5. That SDK uses Dropbox API v2.
You can find some more information on the new features API v2 added in the original launch blog post here:
https://blogs.dropbox.com/developers/2015/11/dropbox-api-v2-launches-today/
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If 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, Facebook or Instagram.
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!