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

# Google Auth

`POST /api/auth/google`

## Request

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

Sign in (or sign up) with a Google ID token from the frontend GIS button.

No email-verification code needed — Google already verifies email.

## Request body

- GoogleAuthRequest
  - `credential` string, required

## Response `200`

Successful Response

- SessionResponse
  - `user` UserResponse, required
    - `id` string, required
    - `email` string, required
    - `full_name` string, nullable
    - `avatar_url` string, nullable
    - `auth_provider` string, required
    - `email_verified` boolean, required
  - `access_token` string, required

## Other responses

- `422`: Validation Error

---

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