We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
Humza A.
11 years agoNew member | Level 1
Open Dropbox API Authorization request in a new Tab
I have a web application running on my local host and I am using Dropbox Core API in the web app to upload files. However, the Dropbox authentication page opens in the same tab in the browser as my w...
Steve M.
Dropbox Staff
11 years agoWell yes, you're adding target="_blank" to an anchor tag but then intercepting the click. :-)
It looks like you're using dropbox.js to open the auth page. Take a look at https://github.com/dropbox/dropbox-js/blob/stable/guides/builtin_drivers.md, which Greg linked to in his first response. There you'll find the various options that the dropbox.js library has implemented. I think the popup driver is probably your best bet. JavaScript can't force a page to open in a new tab versus a new window. (This is controlled by the browser and varies from browser to browser.)
You could use an actual anchor tag with target="_blank", but this sort of thing isn't implemented in dropbox.js, so you'd be on your own to construct the right URL.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
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!