Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
jyyoon
5 years agoExplorer | Level 3
To detect file changes for team
I can detect file changes with /list_folder/longpoll and /list_folder/continue for a single user(not team)
Can I use /list_folder/longpoll for teams file? I want to use longpoll not /team_log/g...
Greg-DB
Dropbox Community Moderator
5 years agoThe /2/files/list_folder/longpoll endpoint should notify you of changes relevant to whatever cursor you give it. So, as long as you call /2/files/list_folder[/continue] with the necessary "Dropbox-API-Path-Root"/parameters it will notify of relevant changes.
For example, if you originally called /2/files/list_folder with a "Dropbox-API-Path-Root" with a "root" for the team space, it will give you back a cursor. If you pass that cursor to /2/files/list_folder/longpoll, it should report changes for changes inside that team space.
If something doesn't seem to be working as expected though, feel free to share the relevant steps and code to reproduce the issue, and whatever unexpected error or output you're getting so we can look into it.
jyyoon
5 years agoExplorer | Level 3
When I got a notification from longpoll using a cursor whicn I got from /list_folder, I tried to request /list_folder/continue with the cursur. The response was cursor reset error.
Which cursor should I use when requesting /list_folder/continue after longpoll?
And If I want to get notifications from 5 team folders, should I request 5 longpoll at the same time by thread?
- Greg-DB5 years ago
Dropbox Community Moderator
The "changes" and "reset" responses are different conditions from different endpoints, so you'll need to implement handling for both of them. The "changes: true" response from /2/files/list_folder/longpoll just tells you when something has changed for the supplied cursor, so that you can go call /2/files/list_folder[/continue] to list the entries. You would generally use the same cursor you sent to /2/files/list_folder/longpoll when then calling /2/files/list_folder/continue, but this isn't strictly necessary. You can follow whatever procedure makes sense for your app.
Regardless of whether or not you're using /2/files/list_folder/longpoll, you should implement error handling for your implementation of calling /2/files/list_folder/continue. For instance, if you get back "reset" that means you need to relist the folder starting at /2/files/list_folder.
Anyway, yes, each /2/files/list_folder/longpoll call only takes one cursor, so you'll need to use /2/files/list_folder/longpoll as many times as you have distinct cursors (that is, distinct configurations of the original call to /2/files/list_folder) that you want to monitor. For instance, monitoring 5 cursors is fine, but since each one requires its own network connection, you wouldn't want to let that scale arbitrarily; you likely wouldn't want to fire off 1000 such requests simultaneously, for instance. For example, you can try to optimize this by monitoring a single parent folder instead of individual child folders, where possible.
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!