Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CreateInvoicesAsync throws 403 error for Token / Tenant with accounting.transactions that works for other calls #515

Closed
DevelopmentDan opened this issue May 24, 2024 · 3 comments

Comments

@DevelopmentDan
Copy link

SDK you're using (please complete the following information):

  • Version [5.0.0]

Describe the bug
CreateInvoicesAsync throws a 403 error for Token / Tenant with accounting.transactions scope that works for other calls.

To Reproduce
Steps to reproduce the behavior:

  1. Reset Demo Company (UK)
  2. Get a token for Demo Company (UK) - with the scopes: offline_access openid profile email accounting.transactions.read accounting.transactions accounting.settings.read accounting.contacts
  3. Refresh the token
  4. Get the TenantId for Demo Company (UK)
  5. Make some calls, such as GetAccountsAsync, GetTaxRatesAsync, GetContactsAsync, CreateContactsAsync, UpdateContactAsync - they all work fine with the Token and TenantId (all are logged in the developer console)
  6. Now try calling CreateInvoicesAsync with the same Token and TenantId - it crashes with a 403, and makes no entry in the developer console history log.

Expected behavior
To create the invoice just as it did before updating the NuGet package to the latest version.

There is insufficient information to understand what's going wrong here. Rolling back to the previous NeGet versions is not resolving the issue.

Copy link

PETOSS-426

Copy link

Thanks for raising an issue, a ticket has been created to track your request

@DevelopmentDan
Copy link
Author

DevelopmentDan commented May 24, 2024

This problem is caused by the plethora of NuGet packages used by the Xero API - if any are not quite the right version (i.e. upgraded to the latest version), the API randomly starts playing up. I think I'm going to have to move anything to do with Xero to its own isolated solution / project so that I can keep all the NuGet packages for our other projects up-to-date without worrying about the Xero API falling over. It is worth noting that CreateInvoiceAsync is still throwing a 403 error in some circumstances, without giving any detail on what is wrong with the invoice causing that error to be thrown.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant