---
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

---

[API](https://skmtc.net/hexclave/apis/hexclave-rest-api-3.md) · [All operations](https://skmtc.net/hexclave/apis/hexclave-rest-api-3/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/hexclave/hexclave-rest-api-3/versions/690014f63028/schema)
