---
title: "GET /v1/auth/oauth/{provider} — initiate OAuth flow."
method: GET
path: "/v1/auth/oauth/{provider}"
tags: ["oauth"]
---

# GET /v1/auth/oauth/{provider} — initiate OAuth flow.

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

Generates an authorization URL with PKCE, stores state in DB, and returns
the URL for the client to redirect the user to.

## Path parameters

- `provider` string, required

## Response `200`

Authorization URL

- OAuthInitiateResponse — Response for GET /v1/auth/oauth/{provider} — authorization URL to redirect the user to.
  - `authorize_url` string, required

## Other responses

- `400` — Unsupported provider

---

[API](https://skmtc.dev/microsandbox/apis/microsandbox-api.md) · [All operations](https://skmtc.dev/microsandbox/apis/microsandbox-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/microsandbox/microsandbox-api/revisions/23f2a45cb09b/schema)
