How to call Freshbooks Classic directly in Node.js using axios

I was using the freshbooks npm module, but started having issues with its dependencies as it was last updated 3 years ago.

It turns out even though the payloads are in XML, it’s not too bad calling their classic API directly once you know how. Of course, then you need to process an XML response. But instead of having to use an XML library, since I know what specific fragment of data I want, I can use regular expressions to extract it.

So here is a code sample on how to call their API directly

Published by


Andrew Golightly is the lead web developer here at Golightly+. He is a passionate fullstack JavaScript developer. He also runs an Empath Community.

Leave a Reply

Your email address will not be published.