Closed lawipac closed 3 years ago
It must have been some other mistakes that I made, I tried a clean install with the sample app, it works fine.
I just realized that the sample app is using xero-php-oauth2 version 2.5.4. while my code is using the latest 2.8.1.
I changed nothing with my code, and it all works fine now. I'll try to repeat this process to see if it is a real bug.
SDK you're using (please complete the following information):
Describe the bug using PayRollAPi trying to get payItems, got 403, and XERO supports replies:
Based on the log that I located using Xero-Correlation-id: 1e31f621-5939-4ecb-b4c8-436b23a06c4c, the 403 response was thrown because the Tenant ID being used in the headers is missing.
One thing worth mention is that Accounting API works fine.
To Reproduce Steps to reproduce the behavior:
using similar code from https://xeroapi.github.io/xero-php-oauth2/docs/v2/payroll_au/index.html#api-PayrollAu-getPayItems
Expected behavior a list of items being retrieved.
Screenshots 403 error occurred
Additional context The same set of Token works fine with Accounting API, We have added all possible scopes for OAUTH2, and disconnect, reconnect to XERO many times, to no avail.
public $options = [ 'scope' => ['openid email profile offline_access assets projects accounting.settings accounting.transactions accounting.contacts accounting.journals.read accounting.reports.read accounting.attachments payroll.employees payroll.payruns payroll.payslip payroll.timesheets payroll.settings files']};