---
title: "Ga Callback"
method: GET
path: "/ga/callback"
tags: ["google-analytics"]
---

# Ga Callback

`GET /ga/callback`

## Request

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

Handle the Google OAuth callback for GA4.

Exchanges the authorization code for tokens, creates (or updates)
a ``GaConnection`` record, and redirects the user back to the
frontend.

## Query parameters

- `code` string, required: OAuth authorization code
- `state` string, required: Encoded state from auth-url

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/xeorank/apis/seo-intelligence-engine.md) · [All operations](https://skmtc.dev/xeorank/apis/seo-intelligence-engine/llms.txt) · [OpenAPI document](https://skmtc.dev/xeorank/apis/seo-intelligence-engine/revisions/449a3fd73454?raw)
