I'm using postman to test my integration before putting it in my code to get list of payroll employees NZ and perform actions.
I have all the necessary scopes:
openid profile email offline_access assets.read files.read payroll.employees.read payroll.payruns.read payroll.payslip.read payroll.timesheets.read
I get the bearer token and am using that in the API https://api.xero.com/api.xro/2.0/employees
However, after first few tries when I got 200 but actually didn't return any employees (my Demo company has employees, I can see it in the UI), after 5 tries, I started getting 401
"Type": null,
"Title": "Unauthorized",
"Status": 401,
"Detail": "AuthorizationUnsuccessful",
"Instance": "9e7b7d3e-5663-4c1e-8c7e-604674b3eb7f",
"Extensions": {}
}
I have looked at jwt.io and I can clearly see the scope existing
Can you guys help me? I can clearly see I'm using the correct xero-tenant-id and bearer token, yet unable to move ahead.