We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.
Forum Discussion
env
2 years agoExplorer | Level 3
retrieve access code automatically - javascript
Hey! I'm trying to connect to Dropbox using Oauth and I cant figure out a way to retrieve the access code automatically. I want that after I press connect in my site and the user press continue and...
Greg-DB
Dropbox Staff
env I see you posted the same question in two threads, so I've combined them here in one.
Dropbox is switching to only issuing short-lived access tokens (and optional refresh tokens) instead of long-lived access tokens. You can find more information on this migration here.
Apps can still get long-term access by requesting "offline" access though, in which case the app receives a "refresh token" that can be used to retrieve new short-lived access tokens as needed, without further manual user intervention. You can find more information in the OAuth Guide and authorization documentation.
For examples of implementing this with the Dropbox JavaScript SDK, please refer to the examples included in the "examples" folder in the SDK. As long as you set the app key (a.k.a. client ID) and refresh token, like shown in this example for the JavaScript SDK, the SDK will actually handle refresh process for you automatically. The SDK will automatically catch expired access token errors and call the API to get a new short-lived access token when needed.
env
2 years agoExplorer | Level 3
First of all Thank you very much for your respond!
I cloned the javascript example from the link you brought.
I get this error, which means it does not work on a Dropbox Business team - the app I have.
should it work on Dropbox Business team app or just on a single Dropbox account? if so, can you provide an example for Dropbox Business team app?
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,877 PostsLatest Activity: 5 hours agoIf 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!