Start 2025 on time and up to date! Seamlessly integrate your calendars into Dropbox with these simple steps! 📆
Forum Discussion
BogdanCojocariu
7 years agoExplorer | Level 3
Mix Chooser and SDK
Hello,
I am currently working on app (full permission) where I would like to choose a folder and then display the content on a webpage. It is important that it should be constantly looking for changes in that folder, so I am using longPoll endpoint.
My current flow is: Press a button 'Authorize' to get the access_token and then open a Dropbox.Chooser to select a folder. I would like to open the Dropbox Chooser popup after I get the access_token from the API, but Chrome automatically blocks the popups that don't come from a trusted event (as in a click) - same for Dropbox Chooser. From the UX, I don't want to use 2 buttons and I don't want to ask users to allow popups from my domain.
Long story short: My settings should contain access_token and folderId by launching the flow with one click.
I am stuck between documentation and differenet stack overflow responses but I was not able to implement something similar.
Thank you,
Bogdan
- I see, thanks for elaborating. No, unfortunately I don't have a better solution to offer. The API and the Chooser aren't designed to be used closely together like this, but I'll pass this along as a feature request.
That being the case, you'll need to implement them both separately, or make your own file browser, as you mentioned.
- Greg-DBDropbox StaffHi Bogdan, can you elaborate on what you have so far, and what you're stuck on exactly? The full Dropbox API and the Dropbox Chooser for the most part weren't meant to be used together, but you can do technically so (apart from logistical issues like pop-up restrictions which are out of our control unfortunately). If you're asking a way to both process the OAuth app authorization flow and do the Chooser flow from one click, I'm not sure that will be possible, for the reason you mentioned. You should be able to implement them both separately though.
- BogdanCojocariuExplorer | Level 3
Hey Greg, thanks for your answer.
I was hoping there is a Dropbox Chooser from the SDK that also includes the Authorization part. (as Google Picker works - select something after you authorize the app)[1].
The complete story of my project consist in two apps. The user story is being able to display the photos you have from a dropbox folder, but this app does not have any user interaction. So in order to read the files from a folder, I need the access_token and the folderId.There is a different app for that where user logs with getAuthenticationUrl and selects a folder with Dropbox Chooser and then, I pass this config object to the other app.
I was hoping I could launch both flows (authorization and file picking) together, not separately.
I started my own pseudo-file picker by 'navigating' dynamically with filesListFolder but maybe I am missing something and there is a better solution.
Have a wonderful day,
Bogdan
- Greg-DBDropbox StaffI see, thanks for elaborating. No, unfortunately I don't have a better solution to offer. The API and the Chooser aren't designed to be used closely together like this, but I'll pass this along as a feature request.
That being the case, you'll need to implement them both separately, or make your own file browser, as you mentioned.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,936 PostsLatest Activity: 10 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!
Related Content
- 4 years agoanonymous