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

# Build OAuth authorize URL



## OpenAPI

````yaml https://api.crosmos.dev/openapi.json get /api/v1/auth/oauth/{provider}/authorize
openapi: 3.1.0
info:
  title: Crosmos API
  version: 0.1.0
servers:
  - url: /
security: []
paths:
  /api/v1/auth/oauth/{provider}/authorize:
    get:
      tags:
        - oauth-consumer
      summary: Build OAuth authorize URL
      parameters:
        - schema:
            type: string
          required: true
          name: provider
          in: path
        - schema:
            type: string
            maxLength: 2048
            format: uri
          required: true
          name: redirect_uri
          in: query
      responses:
        '200':
          description: Authorization URL + state
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OAuthAuthorizeResponse'
        '400':
          description: Unsupported provider
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OAuthErrorBody'
components:
  schemas:
    OAuthAuthorizeResponse:
      type: object
      properties:
        authorization_url:
          type: string
          format: uri
        state:
          type: string
      required:
        - authorization_url
        - state
    OAuthErrorBody:
      type: object
      properties:
        detail:
          type: string
      required:
        - detail

````