Created
September 8, 2016 17:20
-
-
Save sankalpk/1c61789c12061d46ac3751078cb0a486 to your computer and use it in GitHub Desktop.
OAuth make simple request
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var request = require('request'); | |
var accessToken = 'ACCESS_TOKEN_HERE'; | |
request({ | |
url: 'https://api.someapi.com/blah/something', | |
auth: { | |
'bearer': accessToken | |
} | |
}, function(err, res) { | |
console.log(res.body); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment