---
title: "Google OAuth callback: exchanges code for user profile, finds or creates user in the configured auth model, returns auth token."
method: POST
path: "/api/google-auth/callback"
tags: ["google-auth"]
---

# Google OAuth callback: exchanges code for user profile, finds or creates user in the configured auth model, returns auth token.

`POST /api/google-auth/callback`

## Request

- Base URL: `https://api.spala.ai/api`
- URL: `https://api.spala.ai/api/api/google-auth/callback`
- Auth: none declared

## Request body

- object
  - `code` string
  - `redirect_uri` string

## Response `200`

Successful response

- object
  - `token` string
  - `user` object
    - `id` string
    - `allow_access` boolean
    - `created_date` string
    - `email` string
    - `first_name` string
    - `is_confirmed` boolean
    - `last_name` string
  - `isNewUser` boolean

---

[API](https://skmtc.dev/spala/apis/admin.md) · [All operations](https://skmtc.dev/spala/apis/admin/llms.txt) · [OpenAPI document](https://skmtc.dev/spala/apis/admin/revisions/723cc50571ee?raw)
