How to retrieve PayPal REST Api access-token using node
How to get the PayPal access-token needed to leverage the REST Api by using node? Once you have a PayPal client Id and a Client Secret you can use the following: var request = require('request'); request.post({ uri: "https://api.sandbox.paypal.com/v1/oauth2/token", headers: { "Accept": "application/json", "Accept-Language": "en_US", "content-type": "application/x-www-form-urlencoded" }, auth: { 'user': '---your cliend ID---', 'pass': '---your client secret---', // 'sendImmediately': false }, form: { "grant_type": "client_credentials" } }, function(error, response, body) { console.log(body); })