1

I'm trying to integrate Xero API into my node app, using the official xero-node library.

Following the docs, I registered a public app, supplied consumerKey and consumerSecret to config, tried both the sample app and built my own, but getting the same error:

{ oauth_problem: 'token_rejected',
     oauth_problem_advice: 'Token has not been provided' }

Any idea?

Stanley Luo
  • 3,689
  • 5
  • 34
  • 64

1 Answers1

2

It might help a bit more if you post your code that you're trying to execute.

Public applications require you to go through a 3 legged OAuth process (e.g. get Request Token, Get Access Token and make the request).

It's possible that you're trying to do a 2 legged OAuth process and this is what is causing the issue.

There's a blog post that might assist. It takes a user through the process of setting up a Public app using the xero-node library:

https://devblog.xero.com/build-super-sweet-accounting-apps-with-xero-and-node-js-2ac6e673bee

Jordan Walsh
  • 144
  • 7