We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.
Forum Discussion
Malagann
6 years agoExplorer | Level 3
The Cursor of a user
Hello again. After some searching, I'm back with another question that mirrors this one (https://www.dropboxforum.com/t5/API-Support-Feedback/Webhook-to-get-the-latest-changes-for-each-user-in-the/t...
- 6 years ago
If the "entries" value is an empty list like you've shown here, it just means that there are no new entries to return for the cursor you supplied. (If the token or cursor were invalid, the API would respond with a specific error accordingly.)
Note that if you go through the /2/files/list_folder results and save the cursor after the webhook is received, there may not be any further results.
The basic flow typically looks like this:
- the user connects to the app for the first time
- the app starts listing the files and folders for the user using /2/files/list_folder and /2/files/list_folder/continue as necessary
- the app stores the last returned cursor
- the user leaves and some time passes
- the user makes changes elsewhere
- Dropbox sends the webhook notification for that user
- the app recieves the webhook notification for that user and looks like up the last received cursor for that user
- the app calls /2/files/list_folder/continue with that cursor to get the latest changes
Greg-DB
Dropbox Staff
There isn't a single cursor for each user. A cursor is way to keep track of "where" you are in the file listing, so it is expected to change over time (and even just for each call) for each user. You should continuously update the latest cursor you received for each user.
The first time you want to list the files and folders for a user, when you don't yet have a cursor for them, you should call /2/files/list_folder, which doesn't take a cursor as a parameter. The response will include a cursor, which you can then use with /2/files/list_folder/continue to then "pick up" where you left off with the previous call.
Malagann
6 years agoExplorer | Level 3
So I had tried that and did it again. Saved the cursor and the _id after the webhook is recieved (thanks to list_folder) and then use the cursor with the list_folder/continue.
But the "entries" returnedwas empty
"entries": []
Does that mean the cursor isn't good ? The token ?
Anyway, I'll try again, differently. Thanks
- Greg-DB6 years agoDropbox Staff
If the "entries" value is an empty list like you've shown here, it just means that there are no new entries to return for the cursor you supplied. (If the token or cursor were invalid, the API would respond with a specific error accordingly.)
Note that if you go through the /2/files/list_folder results and save the cursor after the webhook is received, there may not be any further results.
The basic flow typically looks like this:
- the user connects to the app for the first time
- the app starts listing the files and folders for the user using /2/files/list_folder and /2/files/list_folder/continue as necessary
- the app stores the last returned cursor
- the user leaves and some time passes
- the user makes changes elsewhere
- Dropbox sends the webhook notification for that user
- the app recieves the webhook notification for that user and looks like up the last received cursor for that user
- the app calls /2/files/list_folder/continue with that cursor to get the latest changes
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,875 PostsLatest Activity: 2 months agoIf 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!