---
title: "Connect Provider"
method: POST
path: "/workspaces/{workspace_id}/integrations/{provider_id}/connect"
tags: ["integrations"]
---

# Connect Provider

`POST /workspaces/{workspace_id}/integrations/{provider_id}/connect`

## Request

- Base URL: `https://platform.tracecat.com/api`
- URL: `https://platform.tracecat.com/api/workspaces/{workspace_id}/integrations/{provider_id}/connect`
- Auth: one of:
  - API key in cookie `fastapiusersauth`
  - HTTP bearer

Initiate OAuth integration for the specified provider.

Creates a secure state parameter stored in the database to prevent CSRF attacks.
The state is validated on the callback to ensure it was issued by our server.

## Path parameters

- `workspace_id` string, uuid, required
- `provider_id` string, required

## Response `200`

Successful Response

- IntegrationOAuthConnect: Request model for connecting an integration.
  - `auth_url` string, required: The URL to redirect to for OAuth authentication
  - `provider_id` string, required: The provider that the user connected to

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/tracecat/apis/tracecat-api.md) - [All operations](https://skmtc.dev/tracecat/apis/tracecat-api/llms.txt) - [OpenAPI document](https://skmtc.dev/tracecat/apis/tracecat-api/revisions/2efdda25045f?raw)
