---
title: "Begin an OAuth flow"
method: GET
path: "/v1/auth/{provider}/start"
tags: ["Auth"]
---

# Begin an OAuth flow

`GET /v1/auth/{provider}/start`

## Request

- Base URL: `https://api.stackdata.io`
- URL: `https://api.stackdata.io/v1/auth/{provider}/start`
- Auth: one of:
  - none
  - API key in header `X-API-Key`

Sets a CSRF state cookie and 302-redirects to the provider. Open this in a top-level browser navigation, not a fetch.

## Path parameters

- `provider` 'google' | 'github', required

## Other responses

- `302`: Redirect to the provider (or back to the app with an error if unconfigured).

---

[API](https://skmtc.dev/stackdata/apis/stackdata-api.md) · [All operations](https://skmtc.dev/stackdata/apis/stackdata-api/llms.txt) · [OpenAPI document](https://skmtc.dev/stackdata/apis/stackdata-api/revisions/91358ae3f6e8?raw)
