---
title: "Handle the OAuth 2.1 redirect callback from an authorization server."
method: GET
path: "/falcon-ai/mcp-connectors/{connector_id}/oauth/callback/"
tags: ["falcon-ai"]
---

# Handle the OAuth 2.1 redirect callback from an authorization server.

`GET /falcon-ai/mcp-connectors/{connector_id}/oauth/callback/`

## Request

- Base URL: `http://localhost:8000`
- URL: `http://localhost:8000/falcon-ai/mcp-connectors/{connector_id}/oauth/callback/`
- Auth: one of:
  - API key in header `X-Api-Key`
  - API key in header `X-Secret-Key`

This is a GET endpoint that the browser is redirected to after the user
approves the OAuth consent. It exchanges the authorization code for
tokens, then returns an HTML page that posts a message to the opener
window and closes itself.

Uses AllowAny because this is a browser redirect with state validation.

## Query parameters

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

## Response `200`

HTML page that posts OAuth result to opener.

- string

## Other responses

- `400`: HTML page that posts OAuth failure to opener.
- `502`: HTML page that posts OAuth token exchange failure to opener.
- `default`: Default error response

---

[API](https://skmtc.dev/futureagi/apis/future-agi-management-api.md) · [All operations](https://skmtc.dev/futureagi/apis/future-agi-management-api/llms.txt) · [OpenAPI document](https://skmtc.dev/futureagi/apis/future-agi-management-api/revisions/c8684118e142?raw)
