Xero - beautiful accounting software

Xero Developer Help Center

Xero Developer Community

Community > API Authentication >

SHA2 old .Net wrapper discussion

Started by Matthew Mortimer (Xero Staff) -   in API Authentication

Hey Everyone,

We have had quite a few users asking how they can test migrating to SHA2 using the old .NET wrapper, which has hard coded URLs. Users with the source code can easily just change the URLs in their projects, but for those using the Nuget version, it hasn't been quite as easy.

I have created a Nuget that can hopefully help you with this.

Located here is a barebones Nuget that replaces the URLs and classes that use them with SHA2 versions (i.e. "https://sha2-api.xero.com/api.xro/2.0/" for the public base URL).
All you need to do is install the Nuget into your project and then replace anywhere you reference XeroApiPrivateSession, XeroApiPublicSession, or XeroApiPartnerSession with their respective SHA2 versions: Sha2XeroApiPrivateSssion, Sha2XeroApiPublicSession, Sha2XeroApiPartnerSession.

After doing this, any calls you make will be directed to the temporary SHA2 Xero API URLs and you can check this by using a network traffic proxy like Fiddler. If your tests/system still run correctly then you should be fine for when Xero's API switches to use SHA2. If you get errors then you will still have work to do to be ready for the migration.

Cheers,
Matt - API Team