---
title: "Google Oauth Exchange"
method: POST
path: "/api/auth/oauth/google/exchange"
tags: ["oauth"]
---

# Google Oauth Exchange

`POST /api/auth/oauth/google/exchange`

Exchange a Google authorization code for JWT tokens (JSON API).

Legacy endpoint for clients that handle the OAuth redirect themselves.

## Request body

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

## Response `200`

Successful Response

- AuthResponse
  - `access_token` string, required
  - `refresh_token` string, required
  - `token_type` string
  - `user_id` string, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/mozilla-ai/apis/clawbolt.md) · [All operations](https://skmtc.net/mozilla-ai/apis/clawbolt/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mozilla-ai/clawbolt/revisions/0e52fe5f8d33/schema)
