Parameters

  1. connectionQuery: string | { slug: string } | { id: string }
    The query to identify the connection, an object with either a slug property (the URL Slug of the connector as configured in your Xkit dashboard, e.g. slack) or an id property (the unique ID of the connection).

It is deprecated to use just a string parameter, which is interpreted as the URL slug of the connector.

Returns

Promise<Connection>
A Promise that resolves to a Connection object.

const slackConnection = await xkit.getConnection({ slug: "slack" })
const slackConnection = await xkit.getConnection({ id: "unique-id" })