Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
dprothero
3 years agoExplorer | Level 4
/list_folder/longpoll not working with CORS
I see this was an issue 5 years ago, but that issue was reported as fixed. However, I am seeing the issue once again. I can call /list_folder no problem, as well as /list_folder/continue as you can see in my network trace below.
However, I cannot call /list_folder/longpoll. The error in the console is the usual CORS error message:
"Access to fetch at 'https://api.dropboxapi.com/2/files/list_folder/longpoll' from origin 'http://localhost:4200' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled."
Unlike /2/files/list_folder and /2/files/list_folder/continue, the /2/files/list_folder/longpoll endpoint should be accessed on the 'notify.dropboxapi.com' host (not 'api.dropboxapi.com').
Please update your code to use 'https://notify.dropboxapi.com/2/files/list_folder/longpoll' and let me know if you're still running in to any issues.
2 Replies
- Greg-DB3 years ago
Dropbox Community Moderator
Unlike /2/files/list_folder and /2/files/list_folder/continue, the /2/files/list_folder/longpoll endpoint should be accessed on the 'notify.dropboxapi.com' host (not 'api.dropboxapi.com').
Please update your code to use 'https://notify.dropboxapi.com/2/files/list_folder/longpoll' and let me know if you're still running in to any issues.
- dprothero3 years agoExplorer | Level 4
I completely missed that in the docs. It's working beautifully now, thanks!
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!