var Client = require('node-rest-client').Client,
    clientOptions = {
      connection: {
        rejectUnauthorized: true,
        requestCert: true,
      }
    },
    client = new Client(clientOptions),

    token = process.argv[2],

    params = {
      headers: {
        'Content-Type' : 'application/json',
        'Authorization' : 'bearer ' + token
      }
    };

client.get('https://api.fronter.com/planning/users/12345', params, function (data, response) {
  console.log(data);
}).on('error', function (err) {
  console.log('err: ', err);
});

client.on('error', function (err) {
 console.error(' client error : ', err);
});

var Client = require('node-rest-client').Client,
    clientOptions = {
      connection: {
        rejectUnauthorized: false,
        requestCert: true,
      }
    },
    client = new Client(clientOptions),
    tokenArgs = {
      'data': {
        'grant_type':'client_credentials',
        'client_id':'foo',
        'client_secret':'bar',
        'scope':'*'
      },
      headers: {
        'Content-Type':'application/json'
      }
    };

client.post('https://api.fronter.com/oauth/token', tokenArgs, function (data, response) {
    console.log(data);

    var clientArgs = {
      headers: {
        'Content-Type': 'application/json',
        'Authorization': data['token_type'] + ' ' + data['access_token']
      }
    };

    client.get('https://api.fronter.com/planning/users/12345', clientArgs, function (data, response) {
      console.log(data);
    }).on('error', function (err) {
      console.log('err: ', err);
    });

}).on('error', function (err) {
  console.log('err: ', err);
});

--- 
+++ 
@@ -1,27 +1,39 @@
 var Client = require('node-rest-client').Client,
     clientOptions = {
       connection: {
-        rejectUnauthorized: true,
+        rejectUnauthorized: false,
         requestCert: true,
       }
     },
     client = new Client(clientOptions),
-
-    token = process.argv[2],
-
-    params = {
+    tokenArgs = {
+      'data': {
+        'grant_type':'client_credentials',
+        'client_id':'foo',
+        'client_secret':'bar',
+        'scope':'*'
+      },
       headers: {
-        'Content-Type' : 'application/json',
-        'Authorization' : 'bearer ' + token
+        'Content-Type':'application/json'
       }
     };
 
-client.get('https://api.fronter.com/planning/users/12345', params, function (data, response) {
-  console.log(data);
+client.post('https://api.fronter.com/oauth/token', tokenArgs, function (data, response) {
+    console.log(data);
+
+    var clientArgs = {
+      headers: {
+        'Content-Type': 'application/json',
+        'Authorization': data['token_type'] + ' ' + data['access_token']
+      }
+    };
+
+    client.get('https://api.fronter.com/planning/users/12345', clientArgs, function (data, response) {
+      console.log(data);
+    }).on('error', function (err) {
+      console.log('err: ', err);
+    });
+
 }).on('error', function (err) {
   console.log('err: ', err);
 });
-
-client.on('error', function (err) {
- console.error(' client error : ', err);
-});
Use cli parameter for token.
