0

I've been experimenting with using Duck CLI to upload files to Dropbox in Windows 10 64-bit. If I submit a request like:

call duck --assumeyes --username abcd --password 1234 --upload "dropbox:/Test Folder" "Test.txt"

then it prompts me for the OAuth2 token and a browser tab appears with the authorization code. I supply this and the upload starts. All good. I want to bypass this and use a code that I have generated without the prompt. I tried:

call duck --assumeyes --password <generated key> --upload "dropbox:/Test Folder" "Test.txt"

but I still get the prompt and browser tab. I want the whole upload to proceed with no prompts. What am I missing?

As a matter of interest, this works as required (with no prompt being issued):

curl -X POST https://content.dropboxapi.com/2/files/upload ^
  --header "Authorization: Bearer <generated key>" ^
  --header "Dropbox-API-Arg: {\"path\": \"<DestinationFolder>\",\"mode\": \"add\",\"autorename\": true,\"mute\": false}" ^
  --header "Content-Type: application/octet-stream" ^
  --data-binary "@<filename>"

but the upload speed is only around 1.4Mb/s. Using Duck it is 11 Mb/s, so eight times faster!

rossmcm
  • 5,493
  • 10
  • 55
  • 118

1 Answers1

1

Please try to use your email address registered with Google as the username parameter. This way the OAuth tokens are found in the login keychain (macOS) or credential manager (Windows).

David Kocher
  • 632
  • 4
  • 8
  • Thanks for replying. I'll try that, but does it explain why I was able to get it to work with curl? – rossmcm Nov 11 '19 at 09:56