After successfully establishing OAuth2 connection to Xero, call to https://api.xero.com/connections is giving only the id, tenant id and type.
How to get the name (display name) of the connections?
Tried calling Organizations API. It does not work in OAuth2
var url = "https://api.xero.com/connections";
//var response = service.fetch(url, {
var response = UrlFetchApp.fetch(url, {
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer ' + service.getAccessToken(),
},
muteHttpExceptions : true
});
There is no way of getting connection names and showing it to end-user to choose. (It makes no sense to ask the user to choose from the list of cryptic ids).