sintaxi / dbox

NodeJS SDK for Dropbox API (THIS LIBRARY IS OBSOLETE!!)
513 stars 91 forks source link

Use known access token and secret to initialize Client? #45

Closed ghost closed 12 years ago

ghost commented 12 years ago

Is it possible to use already known access token and secret to initialize a new Client?

sintaxi commented 12 years ago

Absolutely, you do not need to use dbox to do the oauth handshake. You may use any valid dropbox access token so long as your app key/secret match. So that means you must initialize the Client based on the app object with the same app creds that the access token was generated with.

create app using dropbox application credentials...

var app   = dbox.app({ "app_key": "umdez34678ck01fx", "app_secret": "tjm89017sci88o6" })

create client using token received from everyauth (or any other client)....

var client = app.client({ "oauth_token_secret":"aik5k6l45jl353","oauth_token":"wpqniizn61j5j70" })

cheers, Brock