Hi,
I have a private instance setup and have valid API key. when i try in browser it is working well. but when i try as module i am getting name: ‘WPTAPIError’, code: 302, message: ‘Found’
Browser URL - Working : Getting Valid 200 response
https://demoprivateinstance.com/runtest.php?url=https://www.demoURL.com/&runs=1&location=demoLocation&f=xml&lighthouse=1&k=sampleAPIKEY
Module code not working : ‘WPTAPIError’, code: 302, message: ‘Found’
var WebPageTest = require(‘WebPageTest’);
var wpt = new WebPageTest(‘https://demoprivateinstance.com/’, ‘sampleAPIKEY’);
wpt.runTest(‘https://www.demoURL.com/’, {
connectivity: ‘Cable’,
location: ‘demoLocation’,
firstViewOnly: true,
runs: 1,
video: true
}, function processTestRequest(err, result) {
console.log(err || result)
});
Please advise