Skip to content

API Key & OAuth

Juan Pablo Kutianski edited this page Jun 10, 2015 · 4 revisions

For API Key you just need to pass it on the initialization

var meetup = require('../lib/meetup')({
	key: 'yourAPIkey'
});

For OAuth you've to request the requestToken and then the accessToken

var meetup = require('../lib/meetup')({
	oauth: JSON.parse(process.env.MEETUP_OAUTH)
});

and then

meetup.getOAuthRequestToken(function(error, Url) {
	response.writeHead(302, {
		'Location': Url
	});
	response.end();
});

after recive the OAuth access token

meetup.getOAuthAccessToken(oauth_token, function() {
	//API commands goes here
});