---
title: "OAuth authorize endpoint"
method: GET
path: "/auth/oauth/authorize/{provider_id}"
tags: ["Oauth"]
---

# OAuth authorize endpoint

`GET /auth/oauth/authorize/{provider_id}`

This endpoint is used to initiate the OAuth authorization flow. there are two purposes for this endpoint: 1. Authenticate a user with an OAuth provider. 2. Link an existing user with an OAuth provider.

## Path parameters

- `provider_id` string, required

## Query parameters

- `type` 'authenticate' | 'link'
- `token` string
- `provider_scope` string
- `error_redirect_uri` string
- `after_callback_redirect_url` string
- `stack_response_mode` 'json' | 'redirect' — Response mode for the OAuth authorize endpoint. Defaults to 'redirect' if not provided.
- `hexclave_response_mode` 'json' | 'redirect' — Response mode for the OAuth authorize endpoint. Defaults to 'redirect' if not provided.
- `bot_challenge_token` string
- `bot_challenge_phase` 'invisible' | 'visible'
- `bot_challenge_unavailable` 'true'
- `client_id` string, required
- `client_secret` string, required
- `redirect_uri` string, required
- `scope` string, required
- `state` string, required
- `grant_type` 'authorization_code', required
- `code_challenge` string, required
- `code_challenge_method` 'S256', required
- `response_type` string, required

## Response `200`

Successful response

- object
  - `location` string, required

## Other responses

- `307` — Successful response

## Changes

- **2026-06-11** `198347feb65d` — 1 breaking, 1 info
  - the `query` request parameter `code_challenge_method` was restricted to a list of enum values
  - added the new enum value `S256` to the `query` request parameter `code_challenge_method`
- **2026-05-24** `de6e4ea31e6a` — 1 breaking, 1 info
  - for the `query` request parameter `stack_response_mode`, default value `redirect` was removed
  - added the new optional `query` request parameter `hexclave_response_mode`
- **2026-05-15** `180fda38d099` — 5 breaking, 8 info
  - the `query` request parameter `bot_challenge_phase` was restricted to a list of enum values
  - the `query` request parameter `bot_challenge_unavailable` was restricted to a list of enum values
  - the `query` request parameter `grant_type` was restricted to a list of enum values
  - the `query` request parameter `stack_response_mode` was restricted to a list of enum values
  - …9 more
- **2026-05-06** `9025167b1683` — 7 info
  - added the new optional `query` request parameter `bot_challenge_phase`
  - added the new optional `query` request parameter `bot_challenge_token`
  - added the new optional `query` request parameter `bot_challenge_unavailable`
  - added the new optional `query` request parameter `stack_response_mode`
  - …3 more

[Change history](https://skmtc.dev/hexclave/apis/hexclave-rest-api-2/changes/auth/oauth/authorize/:provider_id/get.md)

---

[API](https://skmtc.dev/hexclave/apis/hexclave-rest-api-2.md) · [All operations](https://skmtc.dev/hexclave/apis/hexclave-rest-api-2/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/hexclave/hexclave-rest-api-2/revisions/897c83038ab2/schema)
