Xero - beautiful accounting software

Xero Developer Help Center

Xero Developer Community

Community > API Authentication >

GET items authorization unsuccessful

Started by Samuel Messina -   in API Authentication

I have set up a basic program for downloading invoices, and I want to add functionality to download items as well.

My code works perfectly fine with GET invoices, however when I attempt to GET items i get a 401 Unauthorized response.

I am using the exact same authorization code, just changing the get request from Invoices to Items

In the xero previewer it successfully GETs items, I am quite stumped on what might be causing the issue.


Hey Samuel,

This sounds like a scope issue to me. Have you included either of the accounting.settings or accounting.settings.read scopes in your authorisation request?

You can use this page in our docs to determine which scopes need to be included in your authorisation requests in order to access each of our APIs/endpoints.


Matthew Mortimer (Xero Staff)  

Thanks Matt,

You are right, I did not have those scopes in my authorisation request. This has fixed the issue.

Thanks again,


Samuel Messina