phprestful-authenticationxero-api

Why am I unable to retrieve a Xero item by identifier with a valid access token from Postman?


xero developer api not authorizing

i generated the access_token from the endpoint postman screen shot for access token when i try to get xero item i am getting screen shot for item end point this endpoint should give the item with identifier 96d14376-4b75-4b4a-8fd3-b1caab075ab3 in the response also when i try this one in xero api explorer after login its working fine


Solution

  • Looking at the logs relating to the instance id in the error screen shot, the access token does not include the accounting.settings scope.

    Please can you go through the OAuth 2.0 process from the very beginning, making sure the scope is in the authorisation call.

    When you add a new scope to a call you need to go through the whole authorisation process from scratch to update the access token.

    When you get a new access token you can decode it to check the scopes before you use it to make sure that you have the scopes you need. You can use jwt.io to check this if you wish