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

# Configure connector authentication

> Learn how to configure authentication for outbound connectors using the ConnectorAuth schema.

This guide shows you how to configure authentication for connectors that call external services (MCP connectors only). You will learn about the three auth types and how to configure them at connector creation time.

## Prerequisites

* An existing agent (see [Create an agent](/agentic/guides/create-agent))
* Understanding of [connectors](/agentic/connectors) and [connector management](/agentic/guides/manage-connectors)

## Auth types

The `ConnectorAuth` schema supports three authentication mechanisms:

| Type     | Description                                                   |
| -------- | ------------------------------------------------------------- |
| `none`   | No authentication (default if `auth` is omitted)              |
| `bearer` | Bearer token authentication                                   |
| `oauth2` | OAuth2 authentication with optional `scope` and `redirectUrl` |

## Configuring auth on connector create

### Bearer auth

```bash theme={null}
# Replace these with your values
AGENT_ID="<your-agent-id>"
ENVIRONMENT="<eu-or-us>"
TENANT="<your-tenant-name>"
TOKEN="<your-access-token>"

curl -X POST "https://api.${ENVIRONMENT}.corti.app/v2/agentic/agents/${AGENT_ID}/connectors" \
  -H "Authorization: Bearer ${TOKEN}" \
  -H "Tenant-Name: ${TENANT}" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "mcp",
    "name": "policybot",
    "url": "https://mcp.example.com",
    "auth": {"type": "bearer"}
  }'
```

### OAuth2 auth

```bash theme={null}
curl -X POST "https://api.${ENVIRONMENT}.corti.app/v2/agentic/agents/${AGENT_ID}/connectors" \
  -H "Authorization: Bearer ${TOKEN}" \
  -H "Tenant-Name: ${TENANT}" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "mcp",
    "name": "ehr-connector",
    "url": "https://mcp.example.com",
    "auth": {
      "type": "oauth2",
      "scope": "read:policies",
      "redirectUrl": "https://app.corti.ai/oauth/callback"
    }
  }'
```

## v1 migration

In v1, MCP connector authentication used an `authorizationType` field. In v2, this is replaced by `ConnectorAuth.type`:

| v1 `authorizationType` | v2 `ConnectorAuth.type`                         |
| ---------------------- | ----------------------------------------------- |
| `none`                 | `none` (or omit `auth`)                         |
| `bearer`               | `bearer`                                        |
| `inherit`              | `none` (caller's token forwarded automatically) |
| `oauth2.0`             | `oauth2`                                        |

See the [migration guide](/agentic/guides/migrate-v1-to-v2) for the full v1-to-v2 mapping.

## Next steps

* Learn how to [manage connectors](/agentic/guides/manage-connectors) via the API
* Read about [connectors](/agentic/connectors) for the full type reference
* Browse [registry connectors](/agentic/guides/use-registry) for pre-built options
