---
title: "Google Callback"
method: GET
path: "/api/v3/auth/google/calendar/callback"
tags: ["Authentication"]
---

# Google Callback

`GET /api/v3/auth/google/calendar/callback`

## Request

- Base URL: `https://api.endless.health` (the document declares no server; this is the origin it was published from)
- URL: `https://api.endless.health/api/v3/auth/google/calendar/callback`
- Auth: none declared

Handle Google OAuth callback: exchange code -> tokens and persist refresh token.
In popup mode, the callback returns a tiny HTML page that postMessages
`{ type: 'google-calendar-connected', success: true|false }` to the opener's
origin (parsed from `state`) and immediately closes the popup. No redirects.

## Query parameters

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

## Response `200`

Successful Response

- unknown

## Other responses

- `404`: Not found
- `422`: Validation Error

---

[API](https://skmtc.dev/endless/apis/eh-core-v3-api-prod.md) - [All operations](https://skmtc.dev/endless/apis/eh-core-v3-api-prod/llms.txt) - [OpenAPI document](https://skmtc.dev/endless/apis/eh-core-v3-api-prod/revisions/9046a1eb2d0c?raw)
