We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
apo1397
6 years agoExplorer | Level 4
Able to poll for Shared Folders after user Adds to Dropbox but not Shared Files - Java SDK
Hi,
I'm using the Java Core SDK version 3.1.3
We have a mechanism of long polling for the changes in the User's Account.
Our Application doesn't have any of the scopes for teams .
For a regular user (Non Team) we're able to get the "events" for a shared folder if the user chooses to "Add to Dropbox"
But we're not getting the shared files using the cursor to get the changes using the following API
files().listFolderContinue(cursor); The files don't have an option to "Add to Dropbox" (atleast at the receiver's end) .
So how do we go about knowing if a file has been shared to an account ?
Continuously comparing all shared files using
sharing().listReceivedFiles()
isn't a good idea since our users have thousands of files.
Using the Business APIs is a different beast but if someone can tell me how to use the Long Poll method / webhook for shared files that would be great .
3 Replies
- Greg-DB6 years ago
Dropbox Community Moderator
Unfortunately the Dropbox API doesn't offer a way to continuously monitor "received" shared files (like webhooks or longpolling), but I'll pass this along as a feature request. I can't promise if or when that might be implemented though.
Using the listReceivedFiles/listReceivedFilesContinue methods is the right way to see what files the account has received. You can get a ListReceivedFilesBuilder as returned by listReceivedFilesBuilder to use ListReceivedFilesBuilder.withLimit to increase how many files you get back per call though, if that helps.
- apo13976 years agoExplorer | Level 4
Thanks for the reply Greg-DB . I read somewhere about the Business APIs being of some help but I didn't see any API to continuously monitor "received" shared files.
Did the documentation mean that we might get shared files in the webhook/longpoll for Dropbox Business Account or something else ? - Greg-DB6 years ago
Dropbox Community Moderator
Are you referring to the getEvents/getEventsContinue functionality? That's a way to monitor events occurring on a Dropbox Business team. That log would include shared file events, but it can only be used by Business teams, with the 'events.read' team scope.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
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, Facebook or Instagram.
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!