One month down in 2025: How are your resolutions coming along? Check out how to get back on track here.
Forum Discussion
Pcrombach
7 years agoExplorer | Level 3
What is best practice to supply token to webapplicatie version of mobile app
I know how to achieve oauth token from Dropbox in mobile app. I have a desktop variant of my mobile app. What is the best way to apply the oauth token to the webapp.
my suggesties would be to Save the token into the userdata on the backend. Then the frontend van retrieve the token from userdata from the backend.
Is there a better approach?
- Exactly how you structure this is up to you, but you may wish to just have each instance of your app implement the OAuth app authorization flow itself. Having more than one access token per app-user pair is allowed, so you can just have each instance get and store its own access token.
If you do want them to share an access token, that is also possible. The "best" way to share the access token really depends on what your requirements are. In any case though, make sure the access token is always stored and transported securely, as it is sensitive. I can't offer security advice, so you may want to consult with a security professional for more specific advice for your use case.
- Greg-DB
Dropbox Staff
Exactly how you structure this is up to you, but you may wish to just have each instance of your app implement the OAuth app authorization flow itself. Having more than one access token per app-user pair is allowed, so you can just have each instance get and store its own access token.
If you do want them to share an access token, that is also possible. The "best" way to share the access token really depends on what your requirements are. In any case though, make sure the access token is always stored and transported securely, as it is sensitive. I can't offer security advice, so you may want to consult with a security professional for more specific advice for your use case.- PcrombachExplorer | Level 3Just a quick question: Is there a way to get a token in a webapp on desktop. I just dont understand how the redirection works into a webapp
- Greg-DB
Dropbox Staff
Yes, you can use the OAuth app authorization flow to get an access token in a web app. I recommend reading the OAuth guide and the authorization documentation for information on how this works.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,941 PostsLatest Activity: 9 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!