Xero - beautiful accounting software

Xero Developer Help Center

Xero Developer Community

Community > API Endpoints >

Viewing all Tenants Connected to an App

Started by Andrew Holman -   in API Endpoints

The Developer Portal shows the number of connections you have to your app, but from what I can tell there is no way to see this full list either via Developer Central or the API.

The 'connections' endpoint requires an Access Token in the header, which suggests strongly that the endpoint only facilitates retrieving the list of tenants that were authorised by a given user.

Is there a way to use the endpoint with an access token for my 'Developer' credentials so I can see all tenants for all users connected to my app?
It is not currently possible for you to see a list of all your the tenants. You would need to use each of the tokens you hold, one by one, to get a list of connections for each one.

You can add your vote in our Uservoice forum for this here Uservoice
 

Sally C (Community Manager)  

Hi Sally,

Thanks for your reply.

I guess the problem I'm trying to get ahead of is if we no longer hold the tokens on our side (data loss/corruption). Unless I'm missing something obvious (which I wouldn't rule out), we cannot delete a connection without an access token, and we can't revoke a token without a refresh token. If we have neither of those, are we essentially relying on the tenant to remove the app on their side to sever that connection?
 

Andrew Holman  

Refresh tokens that have been lost will presumably not be used and so after 60 days they will expire and the connection will be automatically deleted.

If you have paying customers you can publicise to your customers that they need to disconnect from your app to cancel the subscription.
 

Sally C (Community Manager)  

Thank Sally. The 60 day expiry is the missing piece to my question. The connection will be automatically deleted if not used for a period of time.
 

Andrew Holman