How to use the dropbox.createClient function in dropbox

To help you get started, we’ve selected a few dropbox examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github aaronksaunders / ti-dropboxjs / Resources / app.js View on Github external
// Added : Kosso : log out of dropbox
// REQUIRES https://github.com/kosso/TiCookiejar v0.1
var cookiejar = require('com.kosso.cookiejar');
var logout = function() {
	cookiejar.clearWebViewCookies('.dropbox.com');
	Ti.App.Properties.setString('DROPBOX_TOKENS', null);
}


var dropbox = require('dropbox');


var client = dropbox.createClient({
	app_key : 'xxxxxxxxxxxxxxxxxxxx', // <--- you'll want to replace this
	app_secret : 'xxxxxxxxxxxxxxxxx', // <--- and this with your own keys!
	root : "dropbox"                  // optional (defaults to sandbox)
});

// see : https://www.dropbox.com/developers/apps

var getAccount = function() {

	var options = {
	};
	client.account(options, function(status, reply) {
		Ti.API.info(status);
		Ti.API.info(reply);
	});
};

dropbox

The Dropbox JavaScript SDK is a lightweight, promise based interface to the Dropbox v2 API that works in both nodejs and browser environments.

MIT
Latest version published 2 years ago

Package Health Score

62 / 100
Full package analysis