node.js - ebay api using nodeJs gives error "Unable to create xml stream reader for JSON: payload format incorrect or payload is empty" -
i trying list product keyword using ebay api maintained here
using following code
var params = {}; params.keywords = ["canon"]; params.outputselector = [ 'aspecthistogram' ]; params['paginationinput.entriesperpage'] = 10; var filters = {}; filters.itemfilter = [ new ebay.itemfilter("freeshippingonly", true) ]; filters.domainfilter = [ new ebay.itemfilter("domainname", "digital_cameras") ]; ebay.ebayapigetrequest({ servicename: 'findingservice', optype: 'finditemsbykeywords', appid: '*********************', // fill in own app key, 1 here: https://publisher.ebaypartnernetwork.com/publishertoolsapi params: params, filters: filters, parser: ebay.parseitemsfromresponse // (default) }, // gets items in merged array function itemscallback(error, items) { if (error) throw error; console.log('found', items.length, 'items'); (var = 0; < items.length; i++) { console.log('- ' + items[i].title); } } );
which throws following error when called
error: bad response status code 500 { "errormessage":[{ "error":[{"errorid":["5006"], "domain":["coreruntime"], "severity":["error"], "category":["system"], "message":["unable create xml stream reader json: payload format incorrect or payload empty"], "subdomain":["comm_recv"], "parameter":[{"@name":"param1","__value__":"json"}]}] }] }
show code of api import. may problem there... try
var ebay = require('ebay-api');
Comments
Post a Comment