Tag Archives: node.js

Issues connecting to OAuth2 API from Node.js/Javascript?

Questions: I am trying to connect to the Freshbooks API using OAuth2 and I’m not sure why it is not working. https://www.freshbooks.com/api/authentication I started using the simple-oauth2 library: https://github.com/lelylan/simple-oauth2 so I created the following in my app.js: const oauth2 = simpleOauthModule.create({ client: { id: process.env.CLIENT_ID, secret: process.env.CLIENT_SECRET, }, auth: { tokenHost: ‘https://api.freshbooks.com’, tokenPath: ‘/auth/oauth/token’, authorizePath:… Read More »