Take Your Search Game to the Next Level with Dropbox Dash 🚀✨ Curious how it works? Ask us here!
Forum Discussion
dolphin_cloudsf
7 years agoExplorer | Level 4
web hook handling
hi ,
when a chnage happend i recived a notification.
at first as i know i need to return 200 to verify the notification recived.
then when i make a nother change i am calling
var res22 = client.AsMember(null).Files.ListFolderAsync("");
and get the cursor and then calling to
var res = client.AsMember(null).Files.ListFolderContinueAsync(res2.Result.Cursor);
i also tried to call
var res2 = client.AsMember(null).Files.ListFolderGetLatestCursorAsync("");
and then to
var res4 = client.AsMember(null).Files.ListFolderContinueAsync(res22.Result.Cursor);
and no error recived but also no chnage recived .
how to i get the actual changed data file/folder ?
thanks
4 Replies
Sort By
- Greg-DB
Dropbox Staff
Using ListFolderAsync and ListFolderContinueAsync is the right way to list the contents of a folder. Are you saying that both of those calls aren't returning any entries? Make sure you list out the entries of both calls; if there aren't many items in the folder, the entire list may only be returned to the first call to ListFolderAsync.
In either case though, you can store the latest cursor for the user. When you then get a webhook notification, you can use that cursor with ListFolderContinueAsync to get information on only what changed since then. Note that you don't need to call ListFolderAsync again in this scenario.
- dolphin_cloudsfExplorer | Level 4
Hi Greg ,
for your questions:
- nothing returnning any entries :(i want to verify i am doing all thinks right.
1. when i get a notification i need to return an answer with status of 200 in 10 sec.
then i am doing another change in dropbox and i am calling :
var res2 = client.AsMember(null).Files.ListFolderGetLatestCursorAsync("");and then to
var res4 = client.AsMember(null).Files.ListFolderContinueAsync(res22.Result.Cursor);
no result of changes .file or folder.
questions:
- what is the maxsimum time that i have to call the listFolderContinue to get the changes.
- how do i know i am using the right Cursor?
if i am calling (.ListFolderGetLatestCursorAsync) - is that OK?
do you have some sample code in C# that maybe i can test it .
i really need to get it to work .
thanks from advance
- dolphin_cloudsfExplorer | Level 4
Thnak you greg for your help -
ok greg i manage to get the changes from dropbox.
but now i have another question if i can :).
1. when i renmae a file i get 2 notifications
- deleted metadata
- file Metadata
questions:
1. how do i know the relations between the two?
2. if i am getting two file renamed - so actually i get 2 notification for deleted metadata and 2 notifications for file metadata .
i do i know who belong to who?
3. in the object there are to objects (as deleted , as file ) that are both recursice and looping . so if i want to serelize the object it is not possible . i am using nuget version 4.7.0 - is this issue fix later on ?
hope you can help me as soon as possible
is there any chnage we can continue this by email ?
waiting for your input
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.6,001 PostsLatest Activity: 22 hours ago
If 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!