import {getUserConnection} from "attio/server"
A User Connection is a connection set up by a specific user to a third party service using either OAuth or a secret. A User Connection is specific to a particular user, as opposed to a Workspace Connection, which acts on behalf of an entire Attio Workspace.

API

TypeScript
function getUserConnection(): Connection

Returns

A Connection object containing:
id
string
The unique identifier for the connection.
value
string
The access token or secret for the connection.
ownedBy
{ type: "user", id: string }
An object containing the user id that owns this connection.
createdBy
{ type: "user", id: string }
An object containing the user id that created this connection.