http://www.perlmonks.org?node_id=915287

morgon has asked for the wisdom of the Perl Monks concerning the following question:

Hi,

just a quick question before I go to bed (hoping for an answer in the morning :-):

I would like to automate uploads to my dropbox-account and just started looking into Net::Dropbox::API.

The trouble is that dropbox uses OAuth, and so it seems to be a little tedious to write a script that would be able to upload a file to dropbox without any human intervention because when you do a "login" via Net::Dropbox::API you get back a url where you then have to supply your credentials until finally dropbox sends a redirect etc etc before you can have your access-token (or a process similar to that - I've just played with it for some minutes).

My questions is now:

Has anyone already made a script to fully automate dropbox-uploades without any manual intervention that I could simply steal?

Many thanks!

Replies are listed 'Best First'.
Re: Using dropbox from perl
by pemungkah (Priest) on Jul 19, 2011 at 02:49 UTC
    Try dropbox-api on Github. Looks like it will do the trick. Apparently stores your generated secret to allow more than one transaction - haven't tried it as I don't need it myself. Could be a good starting point if nothing else.
Re: Using dropbox from perl
by cjb (Friar) on Jul 19, 2011 at 10:15 UTC
    You could look at the dropbox api docs as they have a method of returning a token which you can use for auth after supplying the username/password once.
Re: Using dropbox from perl
by BerntB (Deacon) on Jul 19, 2011 at 13:18 UTC
    You can't just mount the Dropbox directory and copy files there? :-)
      I could but only by running the dropbox-daemon which I want to avoid if I can (for various reasons).

      I would not have bothered to post a question here if it was that simple :-)