cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Back again with another edition of 'How we use Dropbox', so find out how Emma uses to-do lists to get it all done 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

Re: Dropbox notification to my app that a file has been changed

Rich
Super User II
Moved to the API forum.

Re: Dropbox notification to my app that a file has been changed

Greg-DB
Dropboxer

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.

Re: Dropbox notification to my app that a file has been changed

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

Re: Dropbox notification to my app that a file has been changed

Greg-DB
Dropboxer
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).
Poll
We love to learn from the educators who use Dropbox. Whether you teach kids, teens, adults or a combination of all three, we want to know what apps and integrations you use with Dropbox to help with teaching. Which of the ones below is your favorite, or most used tool?
Who's talking

Top contributors to this post

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