0
votes

I am looking for dropbox apis which will serve me to sync all/specific files into third party app. I have explored core API and Sync API but couldn't figure out right strategy to implement this scenario.

Use case details :

  • user grants dropbox permission/connects to my app.

  • User share set of existing files to app.

  • If there is any changes happened to the set of files shared with app, i should able to identify them without downloading the files again.

I have come across some applications(ex: zohodocs) which continuously sync files from dropbox to their application. Are they continuously check all files in the dropbox user account to find the changes. What is the effective way to doing this.

Also please suggest appropriate API's without violating user security by granting more than required permissions.

2

2 Answers

2
votes

The answers depends on what kind of app you're building and where it runs.

For client-side apps (JavaScript in the browser, mobile apps, desktop apps), you should be using a combination of /longpoll_delta and /delta to find out when files change and then what the specific changes were.

For server-side apps where you're monitoring a lot of user accounts at the same time, you should be using webhooks to get a notification when files change in a user's Dropbox, and then /delta to get the specific changes.

In terms of permissions, the options are here: https://www.dropbox.com/developers/reference/devguide#app-permissions. Without knowing the specifics of the app, it's hard to tell you which permissions you'll need to use.

EDIT

I should add that, in the case of a client app, the Sync API automates the /longpoll_delta-/delta loop. You instead just add listeners/observers to get notified when files change.

0
votes

We have the same use-case and poll dropbox every 15 minutes by calling the /delta service

https://www.dropbox.com/developers/core/docs#delta

This is very efficient. We are using our own library for this, https://github.com/rmuller/dropbox-java-client.