gido / postcardcreator

A node.js API for the Swiss Post Postcard Creator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error 401

BinaryBrain opened this issue · comments

I'm not sure why, but I had to add a .access_token to the Client.authToken on Client.js line 181 in order to get the token string and avoid a 401 error.
Maybe their API changed, but anyway it seems to work with:

options.headers['Authorization'] = 'Bearer ' + this.authToken.access_token;

Oh!
I think the error is in the documentation or in my example.
Thanks for the report!

Happy postcarding 📮 !

Yes, this solved my problem as well. @BinaryBrain: will you make a pull request?