Thu Oct 11 2018
Copied to clipboard! Copy reply
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
var wsse = require('wsse');
var request = require('request');

var token = wsse({ username: 'paresabot@rosettastone.com:Rosetta Stone', password: '31879577b8e7ea485ac809503567d7df' });

console.log(token.getWSSEHeader());

var adobeURL = "https://api.omniture.com/admin/1.4/rest/?method=Company.GetReportSuites";



var request = require('request');

var options = {
    "url":adobeURL,
    "headers":{ 
        "X-WSSE": token.getWSSEHeader()
    }
}

request(options, function (error, response, body) {
    console.log(request);
  console.log('error:', error); // Print the error if one occurred
  console.log('statusCode:', response && response.statusCode); // Print the response status code if a response was received
  console.log('body:', body); // Print the HTML for the Google homepage.
});