0

I want to make web api which contacts to XERO.

Can anyone please help how to create rest api for this.

I have tried following but it is not working https://github.com/XeroAPI/Xero-Net but it doesnot work without taking user to browser.

I have also tried to create Following

var private_app_api = new XeroCoreApi("https://api.xero.com", new 
                  PrivateAuthenticator(@"C:\Dev\your_public_privatekey.pfx"),
                  new Consumer("your-consumer-key", "your-consumer-secret"), 
                  null,
                  new DefaultMapper(), new DefaultMapper());

but from Xero.Api.Core i am getting

"Error CS1729 'XeroCoreApi' does not contain a constructor that takes 6 arguments AHFXEROService"

Can anybody please help??

Jolly
  • 314
  • 3
  • 15
  • Intellisense should show how many exact arguments required for the constructor and what are the types if them. – Chetan Jun 26 '19 at 11:17
  • https://github.com/XeroAPI/Xero-Net/blob/c7da77cdf22d0bc525eb6a8454196d726fe79a7d/Xero.Api/Core/XeroCoreApi.cs – Chetan Jun 26 '19 at 11:21
  • from some reference i got to know that i need exact this parameters for creating xero api but in "Xero.api.core" library there's no method which has exactly these parameters. so i think there has to be some another library – Jolly Jun 26 '19 at 11:23
  • Now i am struggling with oauth2. as i have windows app from which i need to make user login. i can redirect them to login but they need call back uri i dont know how to make xero redirect to my windows app. Any idea ? – Jolly Feb 26 '21 at 05:47

0 Answers0