binoy binoy - 1 year ago 117
PHP Question

Download file from dropbox to the server

I want to download the files from dropbox and need to keep it in my server on behalf of dropbox user. I tried with curl and file_get_contents. But could not succeed. Should I need to use any api method of dropbox ? I could able to download the file from browser but I need to keep it in server. My application is a kind of file sharing.

Answer Source

The Dropbox browser client is developed to be used by the Registered Users only, where user needs to sign-in and then he can access files there.

But as you said you want to access Dropbox files, on behalf of the users, you need to make use of the Dropbox Core APIs, you can use PHP Dropbox SDK to build your own application. I don't think there is any other way.

As you have mentioned, you want to access files from Dropbox on behalf of user, I guess you might be thinking of it without user interaction, but there is a catch in it, Dropbox makes use of OAuth 1.0 or 2.0, and in both the methods, you need to have user interaction. (For More Read Here)

Also you said, your application is a kind of File Sharing, So do take a look at Dropbox App Review Process, which prohibits publically searchable File Share applications.

Don't build file sharing apps

Dropbox doesn't support building publicly searchable file sharing networks on top of Dropbox.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download