Your workflow is unique 👨💻 - tell us how you use Dropbox here.
Forum Discussion
makrand kulkarni
3 years agoExplorer | Level 4
How to get refresh token without User interaction
Hello Team,
As Drop Box Access Token is invalid after 4 hr. I want to implement refresh token mechanism at Backend Java code without User Interaction i.e fully automated. so I have a requirement to...
Здравко
3 years agoLegendary | Level 20
Hi makrand kulkarni,
As result of your request, on confirmation, new request will be directed according to then redirect URI with only parameter 'code' inside. It would look like:
<Your redirect URI>?code=<code to be used in /oauth2/token>You can use any code able to handle your URI (either provided by Dropbox or no). Some sort of service need to be provided that serve as a callback (no direct response is possible). Typically it's a some sort of web server (local HTTP handler) or something else, depending on the URI type (is it URL or something else). You can take a look here for some web example.
Hope this gives direction.
Greg-DB
Dropbox Community Moderator
3 years agomakrand kulkarni Здравко is correct. Please refer to the documentation they linked to for information on how this is passed on the redirect, and the example they linked to for a sample of how to handle this with the Java SDK.
- makrand kulkarni3 years agoExplorer | Level 4
Can you share more example in Spring boot for implementation of refresh token. Previous example shared by Здравко was partially help full .
I am trying to figure out more that "is 1 drop box application be used across org ? "
- Greg-DB3 years ago
Dropbox Community Moderator
makrand kulkarni Dropbox doesn't offer a Spring Boot sample in particular, but I'll pass this along as a feature request. I can't promise if or when that might be implemented though.
- makrand kulkarni3 years agoExplorer | Level 4
I am following Drop box documentation
https://www.dropbox.com/developers/documentation/http/documentation#oauth2-authorize
I am not able to get the "Code" embedded in Redirect URI. Sample request is
GET Method
In response getting Html Code /Website in Postman
As Per Documentation it should provide me Query response with Code
Any help will be appreciated.
Thanks
- Здравко3 years agoLegendary | Level 20
Hi makrand kulkarni,
As can be seen on documentation (and on your screenshot) "Because /oauth2/authorize is a web site, there is no direct return value". What is a web site? 🧐 Ooo... it's HTML. 😉 Read more carefully.
- Greg-DB3 years ago
Dropbox Community Moderator
makrand kulkarni As Здравко indicated, /oauth2/authorize is a web page, not an API call, so you should not be accessing it programmatically. You should send the user there in their own system web browser to interactively click the button to authorize your app to access their account. If you specify a redirect URI, the user will be redirected to it upon authorizing the app and the app can parse that resulting redirected URI to retrieve the authorization code.
About Discuss Dropbox Developer and API
Explore Dropbox Developer & API discussions with developers like you.
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!