Xero - beautiful accounting software

Xero Developer Help Center

Xero Developer Community

Community > API Authentication >

OAuth 2.0 Scope

Started by James Kirker -   in API Authentication

Hi,

I'm trying to use the API call https://api.xero.com/api.xro/2.0/Reports/TrialBalance
I have full permissions over Xero & it's coming up with "insufficient_scope" under WWW-Authenticate.
I currently have the scopes...
offline_access accounting.reports.read accounting.settings.read accounting.transactions.read accounting.journals.read accounting.settings.read accounting.contacts.read accounting.attachments.read payroll.payslip files.read assets.read workflowmax.read

Is there something I'm missing?

Thanks
Hi James,

Your app is allowed to request 'accounting.reports.read' during the authorisation process, but the token that is being supplied for the request only contains the 'accounting.settings.read' and 'offline_access' scope. You'll need to send the user through the authorisation process again with a request for the 'accounting.reports.read' scope to be able to access that endpoint.

Hope that helps!
 

Russell Dear (Xero Staff)  

Hi Russell,
Thanks for the response. I'm now getting Error 403 (Forbidden)
Currently i only have 'accounting.reports.read' as the scope
 

James Kirker  

Hi James - is it possible you're not providing the Xero-Tenant-Id header with your request? That would result in a 403 Forbidden.
 

Russell Dear (Xero Staff)  

Just tried that and it's working,
Thank you very much for your help!
 

James Kirker  

Welcome, glad it helped!
 

Russell Dear (Xero Staff)