---
title: "Start Alpaca OAuth"
method: GET
path: "/v1/brokers/alpaca/authorize"
tags: ["Brokers"]
---

# Start Alpaca OAuth

`GET /v1/brokers/alpaca/authorize`

## Request

- Base URL: `https://api.marketintell.ai`
- URL: `https://api.marketintell.ai/v1/brokers/alpaca/authorize`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

Begin the Alpaca OAuth 2.0 flow. Redirects (302) to Alpaca's authorize page with a signed `state` tying the flow to the calling key. Use `broker=alpaca-live` for live (default is paper). Requires `write` scope. Returns 503 if OAuth is not configured server-side.

## Query parameters

- `broker` 'alpaca-paper' | 'alpaca-live'

## Other responses

- `302`: Redirect to Alpaca's OAuth authorize page
- `503`: Alpaca OAuth not configured (ALPACA_OAUTH_CLIENT_ID missing)

---

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