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: 

Dropbox notification to my app that a file has been changed

Dropbox notification to my app that a file has been changed

mayas95
Explorer | Level 4

Hi!

 

I am developing a web app with php and javascript which uses dropbox for getting files. The problem is, everytime I load the file and then I change it on Dropbox, the file in my app stays unchanged.

Is there a chance that Dropbox will notify my app so I will know when to reload the file?

 

Thank you for your responses

4 Replies 4

Rich
Super User II
Moved to the API forum.

Greg-DB
Dropbox Staff

You can use /2/files/list_folder and /2/files/list_folder/continue to get the file listing and check for further changes over time.

 

If the integration is built client-side, you can also use /2/files/list_folder/longpoll for low-latency detection of changes while your app is open. 

 

(If you're using an SDK or library, there will be corresponding methods for those endpoints.)

 

For server-side integrations, you can use webhooks to be notified of changes.

mayas95
Explorer | Level 4

Hi Greg,

 

I have decided for webhooks and I want to build the solution on the server-side. The problem is, Dropbox is integrated in both client-side and server-side (as long as I understand correctly). The client side is a button which is a Dropbox Chooser. The server-side is a tree view of the Dropbox files which uses server-side function from the DB API get_metadata(). This metadata is then sent to a JavaScript function which recursively shows all of the files and enables option to download them from that view.

 

My question is, can I implement the same solution for both of these components, and can I use the webhook also for the Dropbox Chooser? This solution is not implemented by me, but by developers before me, and for example when I log out of the component for Dropbox Chooser, the tree view account still stays because it is connected via a dropbox confirmation code in some other place in the web app. Is there a way to make this more consistent and implement webhook effectively?

 

Thank you for your response, I appreciate it very much

Greg-DB
Dropbox Staff
The Dropbox Chooser is a separate kind of integration than the Dropbox API (e.g., the get_metadata method).

The Dropbox Chooser is a simple pre-built component that just allows the end-user to select a file from their account and give it to the app.

You can use the Dropbox Chooser and the Dropbox API in the same app, but they don't work the same way. Further, the Chooser itself doesn't trigger webhook notifications, since there isn't any change in the user's account (unless they happen to upload new files).
Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    mayas95 Explorer | Level 4
  • User avatar
    Rich Super User II
What do Dropbox user levels mean?