---
title: "OAuth authorize"
method: POST
path: "/provider/{providerID}/oauth/authorize"
---

# OAuth authorize

`POST /provider/{providerID}/oauth/authorize`

Initiate OAuth authorization for a specific AI provider to get an authorization URL.

## Path parameters

- `providerID` string, required

## Query parameters

- `directory` string
- `workspace` string

## Request body

- object
  - `method` number, required — Auth method index
  - `inputs` object — Prompt inputs

## Response `200`

Authorization URL and method

- ProviderAuthAuthorization
  - `url` string, required
  - `method` 'auto' | 'code', required
  - `instructions` string, required

## Other responses

- `400` — Bad request

---

[API](https://skmtc.net/kaaass/apis/opencode.md) · [All operations](https://skmtc.net/kaaass/apis/opencode/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/kaaass/opencode/versions/8bb9a15bd144/schema)
