> ## Documentation Index
> Fetch the complete documentation index at: https://docs.attio.com/llms.txt
> Use this file to discover all available pages before exploring further.

# getUserConnection()

> Using a user connection.

```js theme={"system"}
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](./get-workspace-connection), which acts on
behalf of an entire Attio Workspace.

## API

```ts TypeScript theme={"system"}
function getUserConnection(): Connection
```

## Returns

A `Connection` object containing:

<ResponseField name="id" type="string">
  The unique identifier for the connection.
</ResponseField>

<ResponseField name="value" type="string">
  The access token or secret for the connection.
</ResponseField>

<ResponseField name="ownedBy" type="{ type: 'user', id: string }">
  An object containing the user id that owns this connection.
</ResponseField>

<ResponseField name="createdBy" type="{ type: 'user', id: string }">
  An object containing the user id that created this connection.
</ResponseField>
