0

does anybody know what's the reason of getting 'Unauthorized Error' in Xero API. I'm using Xero OAuth 2.0 Code Flow, Xero.NetStandard.OAuth2, Xero.NetStandard.OAuth2Client libs for Xero integration. I'm successfully connect my app to Xero using code flow. I researched the forums, the common answer is that scopes are missing for contacts, but they are present. And here is my scopes used for test: "openid profile email accounting.transactions accounting.transactions.read accounting.contacts accounting.contacts.read offline_access" The error I'm getting is next: Xero API error calling GetPayments: {"Type":null,"Title":"Unauthorized","Status":401,"Detail":"AuthenticationUnsuccessful","Instance":"0e31b9d9-13ae-4016-b691-5b8ab55a9357","Extensions":{}} Another moment that endpoint worked sometimes, e.g. today I was able to get accounts, but yesterday did not.

  • It'd be so much easier if you'd post the scopes and error message as text in your post, instead of making me go off to another site and look at pictures of them. – droopsnoot Jul 21 '20 at 08:43
  • Only different scope I have is offline_access and accounting.settings, and I can't remember what the latter does. – droopsnoot Jul 21 '20 at 08:45
  • thanks, one point that I didn't used account.settings scope, another I saved an access token to db but the length of the column was smaller than the actual size, so after that when I got my token from db it was not valid :) Thanks all – Александр Мага Aug 17 '20 at 08:29

0 Answers0