I am building an OAuth2 based app talking to Xero API based on the following official starter repo:
https://github.com/XeroAPI/xero-netstandard-oauth2-starter-dotnet-core
When I connect it to my organisation's playground app, it works fine for most API calls.
However, when I hit the Finance API > Profit and Loss, it generates:
ApiException: Xero API error calling GetFinancialStatementProfitAndLoss:
{"Type":null,"Title":"Unauthorized","Status":401,"Detail":"AuthorizationUnsuccessful",
"Instance":"179ac5b4-ed64-4f25-bc25-35392867c4dc","Extensions":{}}
When I add "finance.statements.scope" to the list of scopes, I get:
Error code: 500
Error: unauthorized_client : Invalid scope for client
How can I call financial statements like P&L from the Xero API from my app?