Xero - beautiful accounting software

Xero Developer Help Center

Xero Developer Community

Community > Find a Developer >

How to integrate Xero.Api.Core with OAuth 2.0

Started by Compass App -   in Find a Developer

Hello everyone.
Right now I have a complete .net development that creates and reads xero invoices using the following

private_app_api = new XeroCoreApi ("https://api.xero.com", new PrivateAuthenticator (privateKeyPath, privateKeyPassw),
new Consumer (consumerKey, consumerSecret), user, new DefaultMapper (), new DefaultMapper ());

but now I need to make the switch to OAouth 2.0 but still use the API itself (Xero.Api.Core).

Is this possible or I need to change everything to xero.NetStandard.oAuth2?

Thank you.
Hi Compass app. I made a 10 minute youtube video showing how to emulate a private app type in the OA2 environment: https://www.youtube.com/watch?v=Zcf_64yreVI

We also have a CLI tool that helps you to generate the initial tokens to emulate the private app infrastructure: https://github.com/XeroAPI/xoauth

----

Lastly, we do have functionality of OA1 private apps coming to OAuth2 soon. This will be similar in that it will support 1-1 API app to org connections.

In order for our team to offer and maintain this custom app type, it will be a paid option.
https://developer.xero.com/announcements/custom-integrations-are-coming/
---

That being said you can use the (free & default) OA2 API and just handle the refresh of access_tokens while re-creating your OA1.a (private) app infrastructure. I've outlined the code required to do that in a recent blog.

https://devblog.xero.com/xeroapi-oauth-migration-strategy-8af06389ba32
 

Christopher Knight (Xero Staff)