Xero - beautiful accounting software

Xero Developer Help Center

Xero Developer Community

Community > API Authentication >

VB.NET example for authenticating without the SDK?

Started by Alan Moseley -   in API Authentication

Hopefully someone can help point me in the right direction. I am happily using the .NET SDK to authenticate my private application and to send and retrieve data. But I've come to a point where I need to retrieve some Project data, and the SDK does not yet cover this. I've not used OAUTH before and so I have come to a standstill. I cannot seem to find any sample code which might help me push through. I've looked at the POSTMAN example, and I realise that it doesn't support private applications because it doesn't support RSA-SHA1, but other than that is the POSTMAN example nearly correct? What in the headers needs to change? Does anyone have any working code which might help me? Thanks in advance.
Hi there,

The .NET SDK is up on Github - you can follow through the code to see how the authentication process works for a private app here: https://github.com/XeroAPI/Xero-Net/tree/master/Xero.Api.Example.Applications/Private

Hope that helps!

Russell
 

Russell Dear (Xero Staff)  

In a nutshell, rather than reinvent the wheel I copied the Xero.Api.Infrastructure.Http.HttpClient and Xero.Api.Infrastructure.Http.Response codes into new objects that I was able to manipulate more freely and used my version of the Xero.Api.Infrastructure.Http.HttpClient.Get and Put methods to communicate with the projects.xro/2.0/Projects endpoint. I had already downloaded the code as it happens but, not being a C# developer, thought it looked too much like hard to follow it through. However, with your nudge, the whole process has given me a better understanding of how it all works. Many thanks.
 

Alan Moseley