One month down in 2025: How are your resolutions coming along? Check out how to get back on track here.
Forum Discussion
ntnvrma
5 years agoExplorer | Level 4
Login into dropbox without redirect-uri
I am using "/oauth2/authorize?response_type=code&client_id=<clientid>&state=<randomstring>" url and converted it into QR code and display to user.
User then scan the QR Code from smart phone and login through smartphone. After entering credentials , I am getting follwing message on smartphone
Enter this code into <app_name> to finish the process.
<*******************************>
Is there a way to generate the access token using this authorization code apart from manually pasting it tp "/token" url ?
Any help would be appreciated.
- Greg-DB
Dropbox Staff
When using the OAuth 2 code flow like this, using the /oauth2/token endpoint to exchange the authorization code for an access token is the correct and only way to get an access token.
Exactly how you get that authorization code value to the client where you need to make the /oauth2/token call can vary though. As you currently have it, you can have the user manually copy/paste or type the authorization code to the client. Alternatively, the only other way to automate this would be to use a redirect URI in the 'redirect_uri' parameter passed to /oauth2/authorize. If you can't use a redirect URI for some reason, you will need to have the user do this manually.
- ntnvrmaExplorer | Level 4
I understand your point, but in my current scenario: my authorization code is displayed on my smartphone and my desktop application needs access token.
manually entering the code ...works fine.
Just wanted to know , if there's any other way to automate the OAuth without having the redirect_uri.
Appreciate your response :)
- Greg-DB
Dropbox Staff
Thanks for the information. Unfortunately the redirect URI functionality is the only way Dropbox offers to automate this.
About Discuss Dropbox Developer & API
Make connections with other developers807 PostsLatest Activity: 6 hours ago
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 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!