---
title: "Get Auth Url"
method: GET
path: "/email/auth/url"
tags: ["email"]
---

# Get Auth Url

`GET /email/auth/url`

Generate Google OAuth URL for Gmail connection.

Home location is a prerequisite: trip assembly needs it to bracket
imported bookings into trips, so users can't start the connect flow
without it (docs/HOME_LOCATION_ONBOARDING.md §7). This endpoint is the
single OAuth-URL mint point for web and mobile, which makes it the one
backend choke point for the gate.

## Query parameters

- `return_to` string, nullable
- `platform` string, nullable — Client platform: 'mobile' for app deep-link redirect, omit for web

## Response `200`

Successful Response

- AuthUrlResponse
  - `auth_url` string, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/stardrift/apis/fastapi.md) · [All operations](https://skmtc.dev/stardrift/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/stardrift/fastapi/revisions/00746572572a/schema)
