You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
SrustiThakkar
8 years agoHelpful | Level 6
ListFolderContinueAsync request throw an error
Hello,
I have use following code to listen changes but it throws an error like "Invalid Cursor", but using "dropbox-api-v2-explorer" it works perfectly.
DropboxClient dbx = new DropboxClient("MyAccessToken"); ListFolderContinueArg lfg = new ListFolderContinueArg("AAHMIjE6Xb7iOPnBsiqLXZcaI_Rws6bc9akToZqmasmjwA0QsoMX48TJ8aNKTL-5iuSYyUBo6QO4soj0NW5WvZC_9qT9qec0FZ4f0AztLdBtFH5L5PyJ-3eTFq_2BXeHM4-46MDjbEueCYf6ttLqWt93"); var list = await dbx.Files.ListFolderContinueAsync(lfg);
How to solve this problem?
Thank You
Sorry, It was my mistake. My access token was expired so that it shows Invalid Cursor. Now my problem is solved when I have update my AccesToken.
I am really very sorry to waste your time.
- Greg-DBDropbox StaffThanks for the report! Can you let me know where you got this cursor string? Is it possible you accidentally changed it when you copy/pasted it?
Also, if you can share the code from the API Explorer that works for the same cursor? Just make sure to redact your access token. Thanks!- SrustiThakkarHelpful | Level 6
I am using following Code.
public class SyncOperation { static DropboxClient dbx = new DropboxClient("MyAccessToken"); public async void applyChanges() { ListFolderContinueArg lfg = new ListFolderContinueArg("AAFm_IAxqFFyTAcg43BDIcEmCMf8fFwXGJ6GaxjXJIebJjO6hAFZw73laDO743HI8KlVWGu-INc6tmcm5qKjILbUZJOt8X8i1Ifnjc1g6G3D_W5HATTXeiVOcLAuhhSESPuZrF1QuhwYpo4_4iZ72IeL"); var list = await dbx.Files.ListFolderContinueAsync(lfg); Console.WriteLine("Change List count : " + list.Entries.Count); foreach(var i in list.Entries) { Console.WriteLine(i.Name); } } }
I have generate Cursor from this link and passed in the parameter. It works fine when I have test that on this link. But in my code it throws "Invalid Cursor" exception.
- SrustiThakkarHelpful | Level 6
Sorry, It was my mistake. My access token was expired so that it shows Invalid Cursor. Now my problem is solved when I have update my AccesToken.
I am really very sorry to waste your time.
- Greg-DBDropbox StaffI'm glad to hear you got this working.
I believe the actual cause was slightly different though. Access tokens don't expire by themselves, and will fail with a 401 if they have been revoked.
It looks like the issue was instead that the cursor you were using was for a different app (the API Explorer) than the access token you were using was for (your own app).
When making any of these calls, the cursor and access token must be for the same app. I'll see if we can get a better error message for this particular case to avoid this confusion in the future.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,880 PostsLatest Activity: 18 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!