Yeah I know its a very old question but I faced the same problem today.
and resolved the issue as follow.
if you use form option it will automatically set content type
appticationx-ww-orm-urtencoded
var request = require('request');
request.post('https://accounts.google.com/o/oauth2/token',
{
form: {
code: authorization code, // which you get from google
client_secret: 'client secret',// its your app secret
client_id: 'client id', //app client id
grant_type: 'authorization_code',
redirect_uri: 'https://developers.google.com/oauthplayground' //this should match the redirect uri which you give while creating the client id
}
},function(err,res,body){
console.log(body);
if(err) console.log(err);
//console.log(res);
});