Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
I just created an app, to be used to listen for changes or new files in there.
This one automatically created a new folder called `test-implementation`, (name of my app as well), I am adding files in there, I see the webhook getting in, but I am not in a position to save cursors, so I am using `filesListFolderGetLatestCursor` (nodejs sdk), and it requires a path.
I have tried several, including `/test-implementation` or `home/apps/test-implementation` and none works, they throw path not found error, the only working is '' but it does not detect changes in there with the latest cursor from that path.
So not sure what is the right path to use, need urgent help 😞
@raiam wrote:..., I am adding files in there, I see the webhook getting in, but I am not in a position to save cursors, so I am using `filesListFolderGetLatestCursor` (nodejs sdk), and it requires a path.
...😞
Hi @raiam,
You have to be in position to save cursors!!! Otherwise you can't track any change! If you just take the latest cursor for particular account, it's latest already so when you try to continue, it will end up since there is nothing more. In such a situation you will have jumped over your changes (those you want to catch). 😉 Pay attention. Start listing or getting latest cursor should be at the system initialization, not on hook handling. After that only continue listing should be used and previous saved cursor to be used as input. The resulted cursor should be saved for the next handling. No any paths have to be used as input to changes detection (paths are result of detection)!
Hope this gives direction.
@raiam As Здравко said, you'd need to be able to save cursors in order to keep track of changes over time. If you're calling filesListFolderGetLatestCursor after the webhook notification, that cursor will be for the point in time after the changes occurred, so you can't use that cursor to see those changes.
To start listing items, you should start with filesListFolder and iterate through with filesListFolderContinue as needed. Refer to the linked documentation for more information on how to use those. Ideally, you would store the last cursor you get each time, but you can start the entire listing, starting with filesListFolder, whenever needed.
As for the path, you can use the empty string "" to list the root for your app, and then check the results for the other path values you can use for other items.
Hi there!
If you need more help you can view your support options (expected response time for a 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!