---
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
- `source` string, nullable — Which surface started the connect, e.g. 'bookings-page'; reported in the Slack connect alert

## Response `200`

Successful Response

- AuthUrlResponse
  - `auth_url` string, required

## Other responses

- `422` — Validation Error

## Changes

- **2026-09-16** `6d2ccd9ff8ca` — 1 info
  - added the new optional `query` request parameter `source`

[Change history](https://skmtc.dev/stardrift/apis/fastapi/changes/email/auth/url/get.md)

---

[API](https://skmtc.dev/stardrift/apis/fastapi.md) · [All operations](https://skmtc.dev/stardrift/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc.dev/stardrift/apis/fastapi/revisions/6d2ccd9ff8ca?raw)
