We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
u. katuhisa
11 years agoNew member | Level 2
Copy the authorization code.Where it is sufficient to copy?
Greg-DB
Dropbox Community Moderator
11 years agoWhen using the OAuth 2 app authorization flow without a redirect URI, as is being done in the sample and screenshot you posted, the authorization code is that string in the text box on the Dropbox site, and needs to be copied into the app to finish the flow.
This line reads the authorization code from the console (where the user needs to paste it):
String code = new BufferedReader(new InputStreamReader(System.in)).readLine().trim();
And then this line passes it to the finish method to finish the app authorization flow:
DbxAuthFinish authFinish = webAuth.finish(code);
The documentation for that method can be found here:
There's also an OAuth guide here that may serve as a useful reference:
https://www.dropbox.com/developers/reference/oauth-guide
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!