We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.
Forum Discussion
Victor L.19
7 years agoExplorer | Level 4
Issues with 2/files/list_folder/continue & cursor
I have a web app that does the following in order:
1. Login user via "login via dropbox" link
2. Get and save latest cursor
3. Call 2/files/list_folder/continue as needed using latest curso...
Greg-DB
7 years agoDropbox Staff
We'll be happy to help with this, but need some more information. Please reply with:
- the name and version of the platform and SDK/library you are using, if any
- the steps to reproduce the problem, including the relevant code snippet(s)
- the full text of any unexpected output/errors
Thanks in advance! If you'd prefer to share privately, please feel free to open a ticket here: https://www.dropbox.com/developers/contact
- the name and version of the platform and SDK/library you are using, if any
- the steps to reproduce the problem, including the relevant code snippet(s)
- the full text of any unexpected output/errors
Thanks in advance! If you'd prefer to share privately, please feel free to open a ticket here: https://www.dropbox.com/developers/contact
- Victor L.197 years agoExplorer | Level 4
Hi Greg,
Sorry for the lack of information.I'm using PHP with no library (just CURL)
Snipper
$data = '{"cursor": "' . $cursor . '"}'; $ch = curl_init('https://api.dropboxapi.com/2/files/list_folder/continue'); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST'); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization: Bearer ' . $token, 'Content-Type: application/json')); $json = curl_exec($ch); $result = json_decode($json, true); $new_cursor = $result['cursor'];
There are no errors. However, the next time i call list_folder/continue with the new cursor, i get a history fo all changes previously. Not just recent changes.
Thoughts?- Greg-DB7 years agoDropbox StaffThanks! I just tried this, and I can't seem to reproduce this issue with this code though.
Are you sure the first call is succeeding? I don't see any error handling in this snippet.
Also, how are you copying $new_cursor to $cursor? I don't see that in this sample either. Are you sure that's working properly?- Victor L.197 years agoExplorer | Level 4Hi Greg,
That's just a snippet in a class file. So essentially what im doing is this
1. Log user in, get latest cursor and save to database locally
2. Once a user makes changes, a webhook is sent and the locally stored cursor is used for the list_folder/continue call
3. Update cursor for user
Now when another change is initiated, making a call with the new cursor still shows ALL changes, not just latest.
I think i'm just using the wrong cursor, but need to confirm.
Should I..
Make API call then save cursor given by list_folder/continue
Or
Make list_folder/continue API call, then do another to get_latest_cursor and save that cursor.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,877 PostsLatest Activity: 3 hours 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!