---
title: "Authorize a data source"
method: GET
path: "/v1/data_sources/{data_source_id}/oauth2/authorize"
tags: ["data_sources"]
---

# Authorize a data source

`GET /v1/data_sources/{data_source_id}/oauth2/authorize`

Start OAuth2 authorization flow for a data source.

Initiates the OAuth2 authorization process by redirecting the user
to the external service's authorization page. After authorization,
the user will be redirected back to the oauth2_callback endpoint.

Args:
    data_source_id: The ID of the data source to authorize

Returns:
    Redirect to the OAuth2 provider's authorization page

Raises:
    DataSourceNotFoundError: When data source doesn't exist
    DataSourceAuthTypeNotSupportedError: When OAuth2 is not supported for this data source type

## Path parameters

- `data_source_id` string, uuid, required — The ID of the data source to authorize

## Response `200`

The authorization URL

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/mixedbread/apis/mxbai-omni.md) · [All operations](https://skmtc.dev/mixedbread/apis/mxbai-omni/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/mixedbread/mxbai-omni/revisions/79d5edfa05e3/schema)
