WebPagetest Forums

Full Version: WPTAPIError', code: 403, message: 'Forbidden'
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I am getting below error. please help
"WPTAPIError', code: 403, message: 'Forbidden'"

my test.js file:
var WebPageTest = require('./node_modules/webpagetest/lib/webpagetest');
var wpt = new WebPageTest('http://www.webpagetest.org/', 'myApiKey');
// var fs=require('fs');
var testSettings = {
proxy: 'my.proxy',
// location: 'Local:IE11',
runs: 1,
firstViewOnly: false,
"pollResults": 5,
"timeout": 60,
"reporter": "xunit",
video: false,
location: 'Dulles:Chrome',
};

const script = wpt.scriptToString([
{ logData: 0 },
{ navigate: "https://google.com" },
{ logData: 1 },
// {clickAndWait: 'id=globalTMLUSearch'},
'waitForComplete'
]);
wpt.runTest(script, testSettings, (err, data) => {
console.log(err || data);
});
Reference URL's