> ## Documentation Index
> Fetch the complete documentation index at: https://docs.reelevant.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Process the OAuth login form

> Validates credentials and either:
- (authorization code / PKCE) shows consent, then redirects with ?code=
- (legacy) redirects with access_token and refresh_token in query parameters



## OpenAPI

````yaml https://openapi.production.reelevant.io/v1/render/entity-manager post /oauth/authorize
openapi: 3.0.0
info:
  title: entity-manager
  version: unknown
  description: |-
    # Errors
    | Error code | Message | HTTP status code | Payload |
    | :--- | :--- | :--- | :--- |
    | number | string | 400 |  |
servers:
  - url: https://api.reelevant.com/v2/
    description: production
security: []
paths:
  /oauth/authorize:
    post:
      tags:
        - OAuth
      summary: Process the OAuth login form
      description: >-
        Validates credentials and either:

        - (authorization code / PKCE) shows consent, then redirects with ?code=

        - (legacy) redirects with access_token and refresh_token in query
        parameters
      operationId: oauth-post-authorize
      parameters: []
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                client_id:
                  type: string
                redirect_uri:
                  type: string
                state:
                  type: string
                username:
                  type: string
                password:
                  type: string
                x-otp-code:
                  type: string
                lang:
                  type: string
                response_type:
                  type: string
                code_challenge:
                  type: string
                code_challenge_method:
                  type: string
              required:
                - client_id
                - redirect_uri
                - username
                - password
              additionalProperties: false
      responses:
        '204':
          description: No Content
      security:
        - password_auth: []
components:
  securitySchemes:
    password_auth:
      type: oauth2
      flows:
        password:
          tokenUrl: https://api.reelevant.com/v1/auth/token
          refreshUrl: https://api.reelevant.com/v1/auth/token
          scopes: {}

````