---
title: "The provider’s return leg (public)"
method: GET
path: "/v1/source-connections/oauth/callback"
tags: ["Source Plane"]
---

# The provider’s return leg (public)

`GET /v1/source-connections/oauth/callback`

## Request

- Base URL: `https://brain.inite.ai`
- URL: `https://brain.inite.ai/v1/source-connections/oauth/callback`
- Auth: none required

Where a provider sends the browser after consent — the app’s registered redirect URI. Public by construction: the HMAC-signed `state` authenticates the request. Exchanges the code, keeps the grant, and answers a small HTML page that hands the result to the admin window that opened it and closes. No token, code or state appears in the page. Connected accounts (docs/source-plane.md § Connected accounts): the brain as an outbound OAuth 2.1 client for the cloud connectors (gdrive, onedrive, dropbox). Answers a bare 404 until `SOURCE_PLANE_ENABLED=1` and `SOURCE_OAUTH_CLIENT=1`; needs `SOURCE_CREDENTIAL_ENCRYPTION_KEY` — tokens are never stored in the clear.

## Query parameters

- `state` string
- `code` string
- `error` string
- `error_description` string

## Response `200`

The result page.

## Other responses

- `404`: No such resource in this tenant.

---

[API](https://skmtc.dev/inite/apis/inite-brain-platform-api.md) · [All operations](https://skmtc.dev/inite/apis/inite-brain-platform-api/llms.txt) · [OpenAPI document](https://skmtc.dev/inite/apis/inite-brain-platform-api/revisions/c7c3eb5e304b?raw)
