---
title: "Google Callback"
method: GET
path: "/api/auth/google/callback"
---

# Google Callback

`GET /api/auth/google/callback`

## Request

- Base URL: `https://api.openpaper.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.openpaper.ai/api/auth/google/callback`
- Auth: none declared

Handle Google OAuth callback.

Every parameter is optional because we do not control who calls this. Google
sends `error` instead of `code` when the user declines at the consent
screen, and link scanners re-fetch the URL with a code that has already been
spent. Requiring `code` turned both into a raw 422.

## Query parameters

- `code` string, nullable
- `state` string, nullable
- `error` string, nullable

## Other responses

- `307`: Successful Response
- `422`: Validation Error

---

[API](https://skmtc.dev/openpaper/apis/open-paper.md) - [All operations](https://skmtc.dev/openpaper/apis/open-paper/llms.txt) - [OpenAPI document](https://skmtc.dev/openpaper/apis/open-paper/revisions/c2ad03216101?raw)
