Before using any of rDrop's functions, you must first
create an application on the Dropobox developer site
application is specific to you. Follow through with the
steps to create your application and copy the generated
consumer key/secret combo. Ideally you should save those
keys (on separate lines) in your options as:
options(DropboxKey = 'Your_App_key')
options(DropboxSecret = 'Your_App_secret') If you
are unable to do so (example: Using
rDrop from a
public machine), then you can just specifiy both keys
inline. Once you have authenticated, there is no reason
to repeat this step for subsequent sessions. Simply save
the OAuth object to disk and load it in a script as
necessary. Future versions of ROAuth will make it easier
for you to just update the token (if necessary) without
having to reauthoize via the web. Do not store
these keys in your .rprofile if you are on a public
machine. Anyone with access to this ROAuth object will
have full control of your Dropbox account.
1 2 3
A valid Dropbox application key
A valid Dropbox application secret
If using in a loop, call getCurlHandle() first and pass the returned value in here (avoids unnecessary footprint)
optional additional curl options (debugging tools mostly).
Once you have created an app, retrieve your access keys
Message with success or error.
Oauth object of class
1 2 3 4 5 6 7 8 9 10 11
## Not run: dropbox_auth() # if you have keys in .rprofile stored as # options(DropboxKey='YOUR_APP_KEY') # options(DropboxSecret='YOUR_SECRET_KEY') # else use: dropbox_auth('YOUR_APP_KEY', 'YOUR_APP_SECRET') dropbox_tokens <- dropbox_auth() dropbox_token <- dropbox_auth('consumey_key', 'consumer_secret') save(dropbox_token, file = 'dropbox_auth.rdata') ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.