---
title: "Google `OAuth` callback"
method: GET
path: "/api/auth/google/callback"
tags: ["Auth"]
---

# Google `OAuth` callback

`GET /api/auth/google/callback`

# Errors
Returns an error if `OAuth` state verification fails, token exchange fails, or database operations fail.

## Query parameters

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

## Other responses

- `302` — Redirect to frontend application
- `400` — Invalid authorization code or state
- `500` — OAuth service error or database connection failed

## Changes

- **2025-09-01** `1d20aeaaa6cf` — 2 breaking, 2 info
  - removed the media type `text/plain` for the response with the status `400`
  - removed the media type `text/plain` for the response with the status `500`
  - added the media type `application/json` for the response with the status `400`
  - added the media type `application/json` for the response with the status `500`
- **2025-09-01** `a2488be8a6e4` — 2 breaking, 2 info
  - removed the media type `application/json` for the response with the status `400`
  - removed the media type `application/json` for the response with the status `500`
  - added the media type `text/plain` for the response with the status `400`
  - added the media type `text/plain` for the response with the status `500`

[Change history](https://skmtc.dev/patroninc/apis/patron-api/changes/api/auth/google/callback/get.md)

---

[API](https://skmtc.dev/patroninc/apis/patron-api.md) · [All operations](https://skmtc.dev/patroninc/apis/patron-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/patroninc/patron-api/revisions/08a2378b4e66/schema)
