Skip to content

Instantly share code, notes, and snippets.

@jeromyevans
Created June 10, 2015 06:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeromyevans/f30a6cb47e08bb2f778f to your computer and use it in GitHub Desktop.
Save jeromyevans/f30a6cb47e08bb2f778f to your computer and use it in GitHub Desktop.
Use oauth to GET a Xero endpoint
oauth.get('https://api.xero.com/api.xro/2.0/Organisation',
oauth_access_token,
oauth_access_token_secret,
function (e, data, res) {
if (e) {
console.error(e);
return;
}
var oResponse = JSON.parse(data);
console.log(require('util').inspect(oResponse, false, null));
return;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment