---
title: "Authorize"
method: POST
path: "/api/internal/oauth/authorize"
tags: ["Internal OAuth", "Internal OAuth"]
---

# Authorize

`POST /api/internal/oauth/authorize`

## Request

- Base URL: `https://api.thebetterhire.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.thebetterhire.ai/api/internal/oauth/authorize`
- Auth: none declared

Authenticate a user with email/password and mint an OAuth authorization
code (the /oauth/authorize consent page's submit).

Replaces the direct-DB Next.js route (API proxy sweep): password
verification reuses core.auth.verify_password — the same helper and check
chain as /api/auth/login — and the code INSERT is the store-code logic with
redirect_uri_provided_explicitly=true. Protected by the internal key like
store-code; the user-facing credential check is the body itself.

## Request body

- AuthorizeRequest
  - `email` string, required
  - `password` string, required
  - `client_id` string, required
  - `redirect_uri` string, required
  - `code_challenge` string, required
  - `scope` string
  - `state` string, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

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