0

I am trying to connect using a private app but I keep getting the error

"oauth_problem=consumer_key_rejected&oauth_problem_advice=Private%20applications%20cannot%20request%20a%20Request%20Token"

I cant find the answer, I've been googling for days. does anyone have any ideas why this is happening? I am using asp .net mvc

user11401
  • 89
  • 9

1 Answers1

1

Xero private apps don't need to use the Request Token flow - they use the one-legged flavour of OAuth1.0a, which just involves creating a signed request using the private key of the public key certificate you uploaded when creating the app.

The one-legged flow is described here: http://oauthbible.com/#oauth-10a-one-legged

The Xero-Net repo in GitHub has a good working example of a private app authenticator that you can download and follow through here: https://github.com/XeroAPI/Xero-Net/blob/master/Xero.Api.Example.Applications/Private/PrivateAuthenticator.cs

rustyskates
  • 856
  • 4
  • 10
  • Do you have any sources where I can study the codes? Using Xero API Private Application in a ASP .NET MVC Web app. It'll really mean a lot. – user11401 Oct 22 '19 at 02:25