1

I was trying to use Raspberrypi cam as an internet connected cam using Dropbox. But after I update the access token, the command prompt never ask type in the app key and app secret. And I try to upload the file to the Dropbox. The command prompt return with an error occurred upload. How can I check what step I am missing setup my Raspberrypi link to my dropbox account.

EDI: As per comments - The OP is using the Andrew Fabrizi Dropbox Uploader I assume from GitHub here

  • What package are you using to link to Dropbox? – Andyroo Apr 11 at 13:40
  • andreafabrizi 's dropbox_uploader script – Wei Lin Apr 11 at 14:35
  • Where is the problem with Raspberry Pi? – Ingo Apr 11 at 20:02
1

I've not used the script before (try not to rely on cloud services much now) but you have to run the config wizard first to create the hidden ~/.dropbox_uploader with the details in.

I would delete this file:

rm ~/.dropbox_uploader

Run the program again (with NO parameters) using

./dropbox_uploader.sh

This will give you a set of instructions and a URL to link your account (see code here if you are concerned) about this.

Then run the program to check its linked to your account using

./dropbox_uploader.sh info

Sorry - it took me a bit longer than a day to set up another Pi - I needed to sort one and they where a bit tied up (whoops).

The process is as follows (personal account - not corporate):

  1. Pi Zero W v1.1 board connected via USB to my Mac
  2. Mac connected to the Internet via WiFi (though irrelevant for this)
  3. Clean install of Buster Lite (2020-02-13) updated as of today (20/04/20)
  4. Software downloaded from GitHub using the Curl option as per here and chmod to executable
  5. Dropbox account signed in. I then removed all devices from my account and cleared any old session (inc one from 2016 whoops) via Account/Security
  6. Apps list checked - Only Outlook enabled as an application via Account/Connected Apps
  7. Ran ./dropbox_uploader.sh till it prompted me for the Access token
  8. In a new browser tab (still with the account tab open) I went to the given URL and selected Dropbox API, Full Dropbox and named the App 'Pi test on Outlook Account', agreed the T&Cs and pushed 'create app'
  9. On the next page I saw the App key / App secret pair - THIS IS NOT THE KEY YOU ARE LOOKING FOR
  10. Select the button under OAuth 2 / Generated access token labeled Generate

Button picture

  1. This will then change into a 64 character long key and THIS IS THE KEY FOR THE PI (note mine is much longer than this):

Start of Key

After confirming the key looks OK the script reported it had been saved. ls -a shows the hidden config file as above.

I was then able to run ./dropbox_uploader.sh info and got (I redacted some of the data)

Name:       Andrew B******
UID:        dbid:************
Email:      andrew******@outlook.com
Country:    GB

Running ./dropbox_uploader.sh list gave me

 > Listing "/"... DONE
 [D]        Application Files
 [D]        Photos
 [D]        Camera uploads
 [D]        History Files EXCLUDING Lincoln
 [F] 246779 File 03-12-2016, 03 17 23.jpeg
 [F] 190763 File 03-12-2016, 03 18 03.jpeg
 [F] 249428 File 03-12-2016, 03 18 23.jpeg

This matches the web view of the data fine. (Yes - it was really 2016 since I last used this.)

tl;dr:

  • Make sure your Dropbox account is valid and not reached maximum APPLICATIONS.
  • The Pi does not register as a device on Dropbox only an app so you can still have three computers AND a Pi or two...
  • Simple app testing (info / dir / download / upload / delete) works under Buster
  • Do not use the app secret / key
  • Generate the OAuth 2 / Generated access token
| improve this answer | |
  • 1
    Thanks. I still have problem linking it to the cloud service. I suspect Dropbox has made some changes to their service. – Wei Lin Apr 11 at 15:48
  • You can only have a maximum of 3 clients w/ the free level dropbox now, and there may be some minor shenanigans if you are using more than that (eg., one may end up disconnected and you have to manually re-authenticate it). – goldilocks Apr 11 at 18:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.