3 things to evaluate to discover the best way for you to access web data.Register for the webinar
Start a new topic

auto extraction using Nodejs ist showing Authentication token not provided or invalid


const https = require('https');

const data = JSON.stringify([{

'url': 'http://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html',

'pageType': 'product',


const options = {

host: 'autoextract.scrapinghub.com',

path: '/v1/extract',

headers: {

'Authorization': 'Basic ' + Buffer.from('api_key_from_created_account').toString('base64'),

'Content-Type': 'application/json',

'Content-Length': data.length


method: 'POST',


const req = https.request(options, res => {

console.log(`statusCode: ${res.statusCode}`)

res.on('data', d => {




req.on('error', error => {





The same sample code is used but shows "Authentication token not provided or invalid". Using API key from Settings-> API key

Login to post a comment