cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox 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: 

Re: Webhook Cursor

Webhook Cursor

Lechucico
Helpful | Level 6

Hello,


I don't get what is a cursor.

 

What does Cursor on webhook?

 

There is any example in java with a Cursor?

 

I'm making an app that just need to know the files that the users has in the application folder. I need webhook because i need to notify my application if there's a new file or deleted file, but I don't get what is a cursor and how does it work.

 

1 Reply 1

Greg-DB
Dropbox Staff

A cursor is a string that keeps track of where you are in the history of the changes in the account. To list the contents of the folder, you call /2/files/list_folder. You should store the latest cursor you get from the response, and continue calling back to /2/files/list_folder/continue if/when necessary. The documentation has more information on how to use that.

 

Dropbox webhooks just tell you when something changed, so that you know when to call back /2/files/list_folder/continue to find out what changed. You supply the cursor to /2/files/list_folder/continue so that the Dropbox API knows when you last called, so that it only needs to tell you about new changes since then.

 

In the Java SDK, these methods correspond to listFolder and listFolderContinue. There's a sample of using them in the tutorial example.

Need more support?