Upload a File From Raspberry Pi to Your Dropbox

Updated version of this article: here.



There are a couple of scripts floating around the Internets you can use to interact with Dropbox from your Raspberry PI.

I find that the easiest way is to use python (the Dropbox client itself is python).

You will need a Dropbox API key which you can get here:

The following code assumes you have the Dropbox Python SDK available/installed:

The secret sauce to this python is that the auth token is saved in a .txt file.

If you don’t have GUI access on your Raspberry PI(like me) you will have to run the script in a desktop environment first and copy over the resulting token.txt which contains your OAuth token.

The token doesn’t really ever expire so no worries, there’s no sugar.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.