---
title: "OAuth callback handler"
method: GET
path: "/accounts/oauth/callback"
tags: ["Authentication"]
---

# OAuth callback handler

`GET /accounts/oauth/callback`

## Request

- Base URL: `https://api.quiva.ai`
- URL: `https://api.quiva.ai/accounts/oauth/callback`
- Auth: none required
- TypeScript: <https://skmtc.dev/quivaworks/apis/quiva-ai-gateway/docs/accounts/oauth/callback/get.ts> (a function with typed inputs; its response is checked against the schema)

Handles OAuth callback from external authentication provider

## Query parameters

- `code` string, required
- `state` string, required

## Response `200`

Authentication successful - typically redirects user

- object
  - `data` object, required: Success response (implementation may vary based on authOrMFA function)

## Other responses

- `400`: Bad request - invalid parameters or authentication failed
- `500`: Internal server error

## Changes

- **2025-06-12** `4979dfd00eda`: 2 info
  - api operation id `handleOAuthCallback` was added
  - added the required property `data` to the response with the `200` status
- **2025-06-10** `964e2801b73d`: 2 breaking, 2 info
  - the response's body type changed from no type to `object` for status `400`
  - the response's body type changed from no type to `object` for status `500`
  - added the required property `error` to the response with the `400` status
  - added the required property `error` to the response with the `500` status
- **2025-06-06** `b675c0d97cbd`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/quivaworks/apis/quiva-ai-gateway/changes/accounts/oauth/callback/get.md)

---

[API](https://skmtc.dev/quivaworks/apis/quiva-ai-gateway.md) - [All operations](https://skmtc.dev/quivaworks/apis/quiva-ai-gateway/llms.txt) - [OpenAPI document](https://skmtc.dev/quivaworks/apis/quiva-ai-gateway/revisions/700eb1ace61a?raw)
