---
title: "Auth Google"
method: POST
path: "/api/v1/auth/google"
tags: ["auth-google"]
---

# Auth Google

`POST /api/v1/auth/google`

## Request

- Base URL: `https://api.gnosari.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.gnosari.com/api/v1/auth/google`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-AUTH-TOKEN`

Authenticate via Google OAuth.

Exchanges a Google authorization code for an ID token, verifies it,
resolves the email to a local Gnosari user, and returns a session JWT.

## Request body

- GoogleAuthRequest: Request body for Google OAuth authentication.
  - `code` string, required
  - `redirect_uri` string, required
  - `locale` string, nullable

## Response `200`

Successful Response

- GoogleAuthResponse: Successful Google auth response with JWT and user info.
  - `token` string, required
  - `user` GoogleAuthUserResponse, required: User portion of the Google auth response.
    - `id` string, required
    - `email` string, required
    - `name` string, nullable

## Other responses

- `422`: Validation Error

---

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