Search code examples
rdatabasedropboxdropbox-api

Listing all files in a dropbox folder in R (so they can be read in)


Suppose I have a dropbox folder with several files in it.

For example:

https://www.dropbox.com/sh/rgiolfumqlhm9ng/AACs8AwiDmU98JR9UFm842-Ba?dl=0

How can I use R to list.files() in this folder? This is necessary to get the sub-url locations to then read them in.

I've seen how to do this in python with API but I am working in R.


Solution

  • The trick is to use the API provided in the link, but then have the original owner authenticate a token for you. Once you have this token file, you can get into the dropbox with R. The rest is straightforward from the link.