nickponline
nickponline

Reputation: 25914

How do I check the sync status of a Dropbox account using the API?

I'd like to check the status, e.g. How many files left to upload. of a Dropbox account using the API in python. Is this possible?

Upvotes: 1

Views: 1041

Answers (2)

Jason Hertzog
Jason Hertzog

Reputation: 21

You can't do it directly, but you can do it indirectly (sort of). What I do is place a dummy file in my Dropbox and have it sync to the server. At the very beginning of my script I delete the file locally and then wait for it to reappear. Once it has reappeared I have a good idea that Dropbox is connected and synced. It's not perfect because more files might be waiting to be synced, but that's the best I could come up with.

Upvotes: 2

abarnert
abarnert

Reputation: 365945

The Dropbox API is a way to add Dropbox integration to your application (that is, to allow your application to sync its files via Dropbox, or to explicitly upload/download files outside of the sync process), not a way to control or monitor the Dropbox desktop application (or the way other applications sync, or anything else).

So no, it's not possible.

The only way to do this is to write code for each platform to control the Dropbox app, e.g., via UI scripting on the Mac or intercepting WM messages on Windows. (Or, alternatively, it might be possible to write your own replacement sync tool and use that instead of the standard desktop app, in which case you can obviously monitor what you're doing.)

Upvotes: 1

Related Questions