I want to allow deleting specific tenant from my api but every time I make DELETE request to https://api.xero.com/connections/{connectionId} with my access token I get "AuthenticationUnsuccessful". Furthemore, when I change DELETE to GET I recieve all active connections properly :/ How can I resolve this problem?
can I assume you can make other successful API calls? Are you using and SDK or how are you forming your request headers and body?
Assuming you can make the following request, and wanted to delete a connection:
[
{
"id": "f683ae71-f147-44fa-afbf-bb78eeed4c15",
"authEventId": "3531f1f9-08cf-420a-a109-e3f639267b02",
"tenantId": "1d04172c-9be1-4209-8d23-b078053d172a",
"tenantType": "ORGANISATION",
"tenantName": "Demo Company (NZ)",
"createdDateUtc": "2020-11-02T23:38:27.5156140",
"updatedDateUtc": "2020-11-17T20:09:05.9875150"
}
]
DELETE https://api.xero.com/connections/f683ae71-f147-44fa-afbf-bb78eeed4c15
Authorization: "Bearer " + access_token // this is a header in your request
Thank you! I missed that we have to use id instead of authEventId... I think it should be written in documentation for people like me :D Thank you again!