> ## 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.

# Connections

> Authentication to third party services

A Connection is a way of authenticating into a third party service, either via
OAuth 2.0 or a secret.

While an app can *technically* have one of each kind of connection, it will
be very rare.

There are two types of Connections:

## User Connections

A User Connection is a connection set up by a specific user to a third party
that is specific to a particular user.

e.g. Connecting one user's calendar to Attio.

On the server side, the secret or auth token for a User Connection is achieved by
calling [`getUserConnection()`](./get-user-connection).

## Workspace Connections

A Workspace Connection is a connection that is valid for an entire workspace.

e.g. Connecting an entire workspace to a third party SaaS product.

On the server side, the secret or auth token for a Workspace Connection is achieved by
calling [`getWorkspaceConnection()`](./get-workspace-connection).

## OAuth 2.0 redirect URL

When you configure an OAuth 2.0 connection, you must register Attio's redirect URL with your
external OAuth 2.0 provider (for example, in the provider's OAuth app settings). After a user
authorizes access, the provider redirects back to this URL so that Attio can exchange the
authorization code, complete the connection, and securely store the resulting tokens.

Your app's redirect URL has the following format:

```
https://app.attio.com/apps/<your-app-slug>/oauth2/response
```

Replace `<your-app-slug>` with your app's slug.

<Note>
  The exact redirect URL for your app is shown, ready to copy, in the **Connections** tab of your
  app's settings in the [developer dashboard](https://build.attio.com).
</Note>
