Skip to content

Instantly share code, notes, and snippets.

@damienklinnert
Created August 12, 2012 21:34
Show Gist options
  • Save damienklinnert/3334605 to your computer and use it in GitHub Desktop.
Save damienklinnert/3334605 to your computer and use it in GitHub Desktop.
var code = req.query.code, body = 'client_id=&client_secret=&grant_type=authorization_code&redirect_uri=https://localhost:3000/callback&code=' + code
options = {
method: 'POST',
uri: 'https://alpha.app.net/oauth/access_token',
form: body
};
request.post(options, function (err, res, body) {
console.log(body);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment