I am trying to connect to the projects API using this library.
I am running into this issue:
{"Type":null,"Title":"Forbidden","Status":403,"Detail":"AuthenticationUnsuccessful","Instance":"<my_instance_id>","Extensions":{}}
I am explicitly providing my tenant id, but the API calls still fail. This is only an issue for projects and files.
The same code below will work for invoices, users etc etc.
What I've Tried
from xero import Xero
from xero.auth import OAuth2Credentials
creds = {
'client_id': ...,
'client_secret': ...,
'callback_uri': ...,
'auth_state': ...,
'token': {
....
},
'scope': ['projects', ....]
}
oauth_creds = OAuth2Credentials(**creds)
tenant_id = oauth_creds.tenant_id
oauth_creds.set_default_tenant()
xero = Xero(oauth_creds)
xero.projectsAPI.projects.all()
Result
{"Type":null,"Title":"Forbidden","Status":403,"Detail":"AuthenticationUnsuccessful","Instance":"<my_instance_id>","Extensions":{}}
Note
The following WILL work
I am trying to connect to the projects API using this library.
I am running into this issue:
{"Type":null,"Title":"Forbidden","Status":403,"Detail":"AuthenticationUnsuccessful","Instance":"<my_instance_id>","Extensions":{}}I am explicitly providing my tenant id, but the API calls still fail. This is only an issue for projects and files.
The same code below will work for invoices, users etc etc.
What I've Tried
Result
{"Type":null,"Title":"Forbidden","Status":403,"Detail":"AuthenticationUnsuccessful","Instance":"<my_instance_id>","Extensions":{}}Note
The following WILL work