Xero - beautiful accounting software

Xero Developer Help Center

Xero Developer Community

Community > API Endpoints >

AuthenticationUnsuccessful Error

Started by Yadvinder Arora -   in API Endpoints

Hello

I am getting the below error after 30 minutes. I was able to generate the Access Token and refresh token. But when a call is made to get contacts, the below error is thrown :

{"Type":null,"Title":"Forbidden","Status":403,"Detail":"AuthenticationUnsuccessful","Instance":"c0b38d22-6bed-4c8a-8acd-674fa5fd7b88","Extensions":{}}

scope:openid profile email accounting.contacts accounting.settings accounting.transactions

I have gone through the https://developer.xero.com/documentation/guides/oauth2/troubleshooting/ .
I have not revoked the access or deleted the organization
Hi Yadvinder,

Make sure your using your new token you get after refresh instead of your initial token. I made the same mistake some time ago.
 

Henzard Kruger  

Yes, I was using the updated token. When I make a call to get a new refresh token it works.
But when a call is made to Get/Create Accounts or Contacts , I get above error.
 

Yadvinder Arora  

I am using the demo company to do the testing. Is the token valid only for 30 min in demo environment?
 

Yadvinder Arora