Xero - beautiful accounting software

Xero Developer Help Center

Xero Developer Community

Community > API Authentication >

Private App connecting issues

Started by angela jetti -   in API Authentication

What I have done so far...

Generated a public/private key-pair, created a private App and uploaded the public certificate.

I have downloaded C# example of Xero-Net from github. I have changed the consumer key & secret, certificate path etc. In XeroApiHelper.cs, I changed the authentication to PrivateAuthenticator but it is not working for me. Can someone direct me how to go from here to connect to Xero.

Thank you in advance.

Angela
Hi Angela,

I am looking for the same, Have you got anything ?
 

bhavik valand  

@bhavik, not really. I am trying to develop Partner App instead.
 

angela jetti  

Is it working as expected? the partner app? Does it take much time to be developed?
 

bhavik valand  

Hi Angela,

I got into cert hell as well not long ago.

So, Xero requires an x509 with validate org option.

I found LetEncrypt certs, which are free, worked great and I used this during development.
Because it was on my own servers I can control all the aspects of install. Was easy to automate with LetEncrypt using certbot to admin. Downside is only 3 mth issue then need to renew. Basically just ran the certbot command for the site, got the certs and installed into the site and the APP def in Xero. Pretty much pain free.

Decided to move to a Comodo InstantSSL (OV) cert for production. (Multiyear)
Loaded up, site ran no probs but got into a strange situation in that I my APP could standup to Xero but got nothing from Xero when doing the webhooks validation. Long story short, turned out I needed to install the full ca bundle from comodo on my server to get it working. (which hindsight kinda made sense. RTFM :-) )

Also found that using https://www.sslshopper.com/ssl-checker.html to check the cert install pointed me to the right places to "fix". Xero will not attempt to connect if there is something wrong with the cert & path. The page allowed me to check the cert was running ok. Even tho the little lock was on my site, the cert chain was not correct.

Hope this helps.

Steve.
 

Steven Schmidt  

Hi Bhavik,

The example I have downloaded is working with PartnerMvcAuthenticator. I need to make it work using PartnerAuthenticator now.
 

angela jetti  

Hi Steve,

Thanks for the info. I will give it a try.

Angela.
 

angela jetti  

Hi Angela,

I somehow have managed to work with private application. just by using XeroCoreApi and Xero.Api dll provided in Xero-Net from github.

Thanks.
 

bhavik valand