Authenticate WooCommerce REST API in node.js


Staff member
Okay so I'm VERRY VERRY VERRY new to the subject so please go easy on me. What I have done is to create a wordpress woocommerce website. What I want to do now is to get product-data from the wordpress site in node.js. If I have understood everything correctly i first have to Authenticate myself.

First i installed the WooCommerce package with:

npm install --save woocommerce-api

Then i tried to Authenticante like this:

    var WooCommerce = require('woocommerce');

var wooCommerce = new WooCommerce({
  consumerKey: 'ck_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
  consumerSecret: 'cs_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
  url: 'http://localhost/wordpress',


I realise It's an verry open question and i might be far of from on the right track. But I would appriciate some tips or guiding.