-
Notifications
You must be signed in to change notification settings - Fork 17
Description
I am working on a package that uses the Dropbox API to create an "application folder". This folder is stored as Apps/name_of_my_app
When trying to read a file from here or write a file from here, I get some errors using the rDrop interface. I am not sure if I am passing the wrong commands to the dropbox_save and dropbox_get functions, or if there is a setting I am forgetting about that tells these functions I do not have root access. Here are the commands I pass, and they all give basically the same output (verbose output included).
Again, I am running a Win 7 R 2.15.1 instance, and I installed rDrop and ROAuth from the GitHub repos fresh before attempting to connect.
Input:
Any of the following:
dropbox_dir(dropbox_credentials,verbose=TRUE)
df<-data.frame(a=rnorm(50),b=runif(50))
dropbox_save(dropbox_credentials,df,file="/Apps/maintainr/df.rda")
file<-dropbox_get(dropbox_credentials,"Apps/maintainr/midwest_district_probability.csv")
exists.in.dropbox(dropbox_credentials,"Apps/maintainr",is_dir='dir')
maintainr is the name of my app, and it is indeed a folder in the Apps subdirectory of my Dropbox root. The full path should be /Apps/maintainr/somefile
Passing /Apps or Apps/ to the filename does not seem to make much of a difference. And asking Dropbox to list directories does not list either the directories in root (this is good for security) or the directories in the Apps/maintainr folder.
Instead I get this:
Output:
* About to connect() to api.dropbox.com port 443 (#0)
* Trying 199.47.218.158... * connected
* Connected to api.dropbox.com (199.47.218.158) port 443 (#0)
* successfully set certificate verify locations:
* CAfile: C:/Program Files/RStudio/R/library/RCurl/CurlSSL/cacert.pem
CApath: none
* SSL connection using DHE-RSA-AES256-SHA
* Server certificate:
* subject: C=US; ST=California; L=San Francisco; O=Dropbox, Inc.; CN=*.dropbox.com
* start date: 2011-12-01 00:00:00 GMT
* expire date: 2014-01-29 23:59:59 GMT
* common name: *.dropbox.com (matched)
* issuer: C=US; O=Thawte, Inc.; CN=Thawte SSL CA
* SSL certificate verify ok.
> GET /1/search/dropbox/?query=midwest%5Fdistrict%5Fprobability%2Ecsv&include_deleted=FALSE&oauth_consumer_key=MYKEY&oauth_nonce=ftKWxT2WaStg%5F6mzPuCduZjEp&oauth_signature_method=HMAC%2DSHA1&oauth_timestamp=1349997239&oauth_token=MYTOKEN&oauth_version=1%2E0&oauth_signature=2u1jg%2FkNShB86AqhshzJFVapdSA%3D HTTP/1.1
Host: api.dropbox.com
Accept: */*
Authorization: OAuth oauth_consumer_key="tegmcuvroimg4as", oauth_nonce="ftKWxT2WaStg_6mzPuCduZjEp", oauth_signature="2u1jg/MYSIGNATURE=", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1349997239", oauth_token="MYTOKEN", oauth_version="1.0"
< HTTP/1.1 400 Bad Request
< Server: nginx/1.2.3
< Date: Thu, 11 Oct 2012 23:14:00 GMT
< Content-Type: application/json
< Transfer-Encoding: chunked
< Connection: keep-alive
< Access-Control-Allow-Origin: *
Error in fromJSON(OAuthRequest(cred, "https://api.dropbox.com/1/search/dropbox/", :
error in evaluating the argument 'content' in selecting a method for function 'fromJSON': Error: Bad Request
<
* Connection #0 to host api.dropbox.com left intact
Any thoughts? What might I be doing wrong?