I'm attempting to set up dropbox on a virtual machine (digital ocean droplet) using the rdrop2 package to a newly-created dropbox scoped app. This will be a persistent data repo for a shiny app.
Please note that this is a duplicate cross post to an issue filed at the project's github page. Thank you in advance for any troubleshooting advice.
For this app, I have a key, secret, and token, all taken from the Dropbox developer console page.
If I simply copy/ paste the token to my remote machine and run something like:
token <- "my_token_string"
saveRDS(token, "drop_token.RDS)
rdrop2:: drop_auth(rdstoken = "drop_token.RDS")
...this does nothing.
The helpfile for the rdstoken argument to the drop_auth function says:
"In server environments where interactive OAuth is not possible, a token can be created on a desktop client and used in production."
The ReadMe says:
If you expect to access a Dropbox account via Shiny or on a remote cluster, EC2, Digital Ocean etc, you can leave the cached oauth file in the same directory, or pass the token explicitly to drop_auth. You can also save the output of drop_auth into an R object, sink that to disk, and pass that as a token.
So I have a token in hand, but I don't know how to pass it.
Something else I tried
From a local machine (ie with a browser), I attempted
drop_auth(new_user = F, key = MY_APP_KEY, secret = MY_APP_SECRET)
This results in the following error in a browser window (400 error):
_**"More details for developers
Invalid redirect_uri. It must exactly match one of the redirect URIs you've pre-configured for your app (including the path)."**_
Note that I've added both https://localhost and http://localhost as redirect URIs on the DB console.
Account Type
Dropbox Plus.
Session Info for the VM
> devtools::session_info()
─ Session info ───────────────────────────────────────────────────────────────
setting value
version R version 4.0.0 (2020-04-24)
os Ubuntu 18.04.4 LTS
system x86_64, linux-gnu
ui X11
language (EN)
collate C.UTF-8
ctype C.UTF-8
tz Etc/UTC
date 2020-09-14
─ Packages ───────────────────────────────────────────────────────────────────
package * version date lib source
assertthat 0.2.1 2019-03-21 [1] CRAN (R 4.0.0)
backports 1.1.6 2020-04-05 [1] CRAN (R 4.0.0)
callr 3.4.3 2020-03-28 [1] CRAN (R 4.0.0)
cli 2.0.2 2020-02-28 [1] CRAN (R 4.0.0)
crayon 1.3.4 2017-09-16 [1] CRAN (R 4.0.0)
desc 1.2.0 2018-05-01 [1] CRAN (R 4.0.0)
devtools 2.3.0 2020-04-10 [1] CRAN (R 4.0.0)
digest 0.6.25 2020-02-23 [1] CRAN (R 4.0.0)
ellipsis 0.3.1 2020-05-15 [1] CRAN (R 4.0.0)
fansi 0.4.1 2020-01-08 [1] CRAN (R 4.0.0)
fs 1.4.1 2020-04-04 [1] CRAN (R 4.0.0)
glue 1.4.2 2020-08-27 [1] CRAN (R 4.0.0)
httr 1.4.2 2020-07-20 [1] CRAN (R 4.0.0)
magrittr 1.5 2014-11-22 [1] CRAN (R 4.0.0)
memoise 1.1.0 2017-04-21 [1] CRAN (R 4.0.0)
pkgbuild 1.0.7 2020-04-25 [1] CRAN (R 4.0.0)
pkgload 1.0.2 2018-10-29 [1] CRAN (R 4.0.0)
prettyunits 1.1.1 2020-01-24 [1] CRAN (R 4.0.0)
processx 3.4.2 2020-02-09 [1] CRAN (R 4.0.0)
ps 1.3.2 2020-02-13 [1] CRAN (R 4.0.0)
R6 2.4.1 2019-11-12 [1] CRAN (R 4.0.0)
rdrop2 0.8.2.1 2020-09-12 [1] Github (karthik/rdrop2@6176b86)
remotes 2.1.1 2020-02-15 [1] CRAN (R 4.0.0)
rlang 0.4.7 2020-07-09 [1] CRAN (R 4.0.0)
rprojroot 1.3-2 2018-01-03 [1] CRAN (R 4.0.0)
sessioninfo 1.1.1 2018-11-05 [1] CRAN (R 4.0.0)
testthat 2.3.2 2020-03-02 [1] CRAN (R 4.0.0)
usethis 1.6.1 2020-04-29 [1] CRAN (R 4.0.0)
withr 2.2.0 2020-04-20 [1] CRAN (R 4.0.0)