script.integrationConnections
Lists the integration connections set up on this instance. Use it to find a connection's name for script.getOAuth, or to check a connection exists before using it.
js
script.integrationConnections(slug)Parameters
| Parameter | Type | Description |
|---|---|---|
slug | string | Optional. The integration's slug, such as "xero", from script.integrationCatalog. Leave it out to list every connection. |
Returns
arrayThe connections, each with:
name: the connection's name, as passed to script.getOAuth.type: the integration the connection belongs to.setup: the connection's setup state, as a number.last_renewal: when the connection's tokens were last renewed.
Returns an empty array when there are no connections or the list can't be fetched.
Examples
js
const connections = script.integrationConnections("xero");json
[
{
"name": "Xero Production",
"type": "xero",
"setup": 1,
"last_renewal": "2026-10-20 09:15:00"
}
]Related
- script.integrationCatalog: lists the integrations and their slugs.
- script.getOAuth: returns the tokens for a connection.