I tried running the very first example in the README and it failed.
index.js:
var etsyjs = require('etsy-js');
var client = etsyjs.client('IPUTMYAPIKEYHERE');
// direct API calls (GET / PUT / POST / DELETE)
client.get('/users/sparkleprincess', {}, function (err, status, body, headers) {
console.log(body); //json object
});
Running it:
$ node index.js
'==> Client get request with params [object Object]'
'==> Perform unauthenticated GET request'
'API URL is https://openapi.etsy.com/v2/users/sparkleprincess '
'Error parsing response: API request missing api_key or valid OAuth parameters'
undefined
$
I verified that if I take the same URL and add ?api_key=....... to it in a browser, it works fine. So seems that client is not including the api_key header?
I tried running the very first example in the README and it failed.
index.js:
Running it:
I verified that if I take the same URL and add
?api_key=.......
to it in a browser, it works fine. So seems thatclient
is not including theapi_key
header?