---
title: "Google Login"
method: POST
path: "/api/auth/google"
---

# Google Login

`POST /api/auth/google`

Exchange a Google authorization code for a session JWT + user/org info.

Signup is open: any Google account can sign in. A first-time user with an
org invite token joins that org; otherwise they land with no org and the
console prompts them to create their first org via `POST /api/orgs/self-serve`.

## Request body

- GoogleAuthRequest
  - `code` string, required
  - `redirect_uri` string, required
  - `org_invite_token` string, nullable

## Response `200`

Successful Response

- GoogleAuthResponse
  - `access_token` string, required
  - `user` UserOut, required
    - `id` integer, required
    - `email` string, required
    - `name` string, nullable
    - `avatar_url` string, nullable
  - `orgs` OrgOut[], required
    - `id` string, required
    - `slug` string, required
    - `name` string, required
    - `role` string, nullable
  - `is_global_admin` boolean, required
  - `accepted_invite` boolean

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/codag/apis/infra-logs-templater.md) · [All operations](https://skmtc.net/codag/apis/infra-logs-templater/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/codag/infra-logs-templater/versions/a2c84c9154da/schema)
