Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
I have a working application using the python sdk that has a flask server as a backend. And that works I am good with the oauth flow and the application does what it is supposed to do.
I started playing with Javascript sdk looking for a way to do oauth without a backing server (aka single page app or basically all in the client).
Is that possible? It looks like you always need a spot to redirect to with the Javascript sdk.
thanks
For reference, this JavaScript SDK auth example shows how to initiate the app authorization flow:
https://github.com/dropbox/dropbox-sdk-js/blob/master/examples/javascript/auth/index.html#L89
The parameter passed to getAuthenticationUrl should be where the user should be sent back to after authorizing your app.
In your case, where is your JavaScript single page app hosted? I.e., what's the URL in the browser when you're on the page? You may be able to use that as a redirect URI.
For reference, this JavaScript SDK auth example shows how to initiate the app authorization flow:
https://github.com/dropbox/dropbox-sdk-js/blob/master/examples/javascript/auth/index.html#L89
The parameter passed to getAuthenticationUrl should be where the user should be sent back to after authorizing your app.
In your case, where is your JavaScript single page app hosted? I.e., what's the URL in the browser when you're on the page? You may be able to use that as a redirect URI.
Hi there!
If you need more help you can view your support options (expected response time for a 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!