cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
What’s new: end-to-end encryption, Replay and Dash updates. Find out more about these updates, new features and more here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ListFolderContinueAsync request throw an error

ListFolderContinueAsync request throw an error

SrustiThakkar
Helpful | Level 6
Go to solution

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

1 Accepted Solution

Accepted Solutions

SrustiThakkar
Helpful | Level 6
Go to solution

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.

View solution in original post

4 Replies 4

Greg-DB
Dropbox Staff
Go to solution
Thanks 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!

SrustiThakkar
Helpful | Level 6
Go to solution

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.

SrustiThakkar
Helpful | Level 6
Go to solution

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-DB
Dropbox Staff
Go to solution
I'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.
Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    SrustiThakkar Helpful | Level 6
What do Dropbox user levels mean?