Xero-Net | skinny wrapper of the Xero API | REST library
kandi X-RAY | Xero-Net Summary
kandi X-RAY | Xero-Net Summary
A skinny wrapper of the Xero API. Supports Payroll, Accounting & Files
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of Xero-Net
Xero-Net Key Features
Xero-Net Examples and Code Snippets
Community Discussions
Trending Discussions on Xero-Net
QUESTION
I'm trying to setup my old ASP.NET MVC app with Xero's latest OAuth 2.0 protocol. As per the documentation, I'm using the official Xero-NetStandard library.
I can successfully redirect the user to Xero's consent page, and also get redirected back to localhost with a valid-looking code as expected. However, problems arise when I try to retrieve the Access Token.
...ANSWER
Answered 2020-Aug-13 at 16:20It looks like that function requires being called in an async fashion:
QUESTION
I started working with adding migration from OAuth1a to OAuth2 inside my application and i face some problems.
This is what I've done :
- I updated my partner app just like it is described here https://developer.xero.com/documentation/oauth2/migrate (added Auth2.0 redirect , got client id and secret etc ...)
- I implemented token migration exactly as it is done here https://github.com/XeroAPI/xero-net-oauth2-sampletokenmigration and it works fine when OAuth1 token is valid :)
But when it is invalid and I'm doing refresh (using app updated in step 1) and call ~/oauth/migrate endpoint (using access token that i just recived after refresh step) to get OAuth2 token. I'm reciving this error "You can only migrate an OAuth1.0a connection to an OAuth2.0 connection for the currently authorised app". Also same thing happen when i create new connection (using partner applications created in in step 1) and than try to migrate this access token to Auth2.0.
Can anybody point me what I'm doing wrong ?
...ANSWER
Answered 2020-Jul-17 at 17:00That is the error returned when you try to migrate to a newly created app. Are you sure you are using the tokens from the same Partner app tile in your /myapps dashboard.
It should look something like this, once you've added the correct OAuth2 redirect uri and generated your secret.
QUESTION
So I've been trying to learn to connect my asp.net application with the Xero API and then downloaded their XeroOAuth2Sample: https://github.com/XeroAPI/xero-netstandard-oauth2-samples/tree/master/XeroOAuth2Sample/XeroOAuth2Sample
After inserting my unique client ID and Secret key, the project successfully loads up and I am displayed with the following screen:
Once I click on the Sign in / sign up button(s), I am greeted with this Error 500:
I can not seem to understand why or how this error is being triggered. I have tried to clear my caches and cookies as recommended and ensured that the URL linked to my Xero account is valid.
Can anyone think of why this error is happening? Thank you in advanced!
...ANSWER
Answered 2020-Feb-26 at 11:16Looking at logs on our side shows that your redirect uris don't match up. Your app only has one redirect uri setup for http://localhost:5000/, but the sample app needs to have two redirect uris set up to work in its entirety; one for http://localhost:5000/signin-oidc and one for http://localhost:5000/signup-oidc
QUESTION
Good day Experts,
We have a need to build an integration with the XERO Api via their newest OAuth2 standards with (above mentioned) latest .NET CORE 3.1 in VS.
I've poured over the existing sample base in GitHub for the last 2 days without even reaching any authentication points. This is where I'm currently stuck at: Just getting my app to authenticate.
I've resorted to downloading the above sample directly from GitHub and entering (atleast from what I can see) the only 2 variables one needs to make this work: ClientID and ClientSecret (into appsettings.json). The app is also registered under MyApps in Xero with the correct ClientID and ClientSecret.
My environment is pretty straightforward, as they assume in the sample app: Running this from localhost:5000, and register the same under your MyApps in Xero. Except, they say, register your OAuth2 redirect URLS as
.NET CORE doesn't seem to like that, so I have them as
So when I run this, I am presented with the standard 2 Xero buttons (SignUp & SignIn) that was already declared in the View.
...Click SignIn Xero button, which should fire:
ANSWER
Answered 2020-Feb-20 at 21:44In the sample, there's two different auth schemes using two different callback urls in the sample; one ending in signin-oidc, and one ending in sign up-oidc.
You need to make sure you register both callback urls for the sample to work in its entirety, and as you've discovered, the need be exactly the same in the developer portal as well as in your code, taking extra care to make sure the ports are the same between the running sample and the callback urls that you register.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install Xero-Net
Download the source code from github and compile yourself: https://github.com/XeroAPI/Xero-Net
Download directly into Visual Studio using the NuGet powershell command PM> Install-Package Xero.API.SDK.Minimal to get a minimal installation.
Download directly into Visual Studio using the NuGet powershell command: PM> Install-Package Xero.API.SDK to get a larger installation with sample token store using [SQLite](http://system.data.sqlite.org/).
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page