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

# OAuth 2.0 authorization

> Initiate the OAuth 2.0 authorization code flow with PKCE.



## OpenAPI

````yaml https://developer.api.receiptor.ai/openapi.json get /authorize
openapi: 3.0.0
info:
  title: Receiptor AI API
  description: >-
    API for Receiptor AI — automates financial document extraction,
    categorization, and integration with accounting systems. All capabilities
    are available via `POST /v1/capabilities/{slug}` with a JSON request body.
  version: 1.0.0
  contact:
    name: Receiptor AI
    url: https://receiptor.ai
    email: info@receiptor.ai
servers:
  - url: https://developer.api.receiptor.ai/v1
    description: Production
security: []
tags:
  - name: Capabilities
    description: Execute product capabilities
  - name: Discovery
    description: Discover available capabilities
  - name: OAuth2
    description: OAuth 2.0 authorization flow
paths:
  /authorize:
    get:
      tags:
        - OAuth2
      summary: OAuth 2.0 authorization
      description: Initiate the OAuth 2.0 authorization code flow with PKCE.
      operationId: oauthAuthorize
      parameters:
        - name: client_id
          in: query
          required: true
          schema:
            type: string
        - name: client_secret
          in: query
          required: true
          schema:
            type: string
        - name: state
          in: query
          required: true
          schema:
            type: string
        - name: scope
          in: query
          required: true
          schema:
            type: string
            description: Space-delimited OAuth scopes
            enum:
              - all
              - read_time_capsules
              - write_time_capsules
              - read_documents
              - write_documents
              - read_currency
              - read_integrations
              - write_integrations
              - read_rules
              - write_rules
              - read_workspaces
        - name: redirect_uri
          in: query
          required: true
          schema:
            type: string
        - name: response_type
          in: query
          required: true
          schema:
            type: string
            default: code
            enum:
              - code
        - name: code_challenge
          in: query
          required: true
          schema:
            type: string
        - name: code_challenge_method
          in: query
          required: true
          schema:
            type: string
            default: S256
            enum:
              - S256
      responses:
        '200':
          description: Authorization code issued
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    description: Temporary authorization code
                  redirect_uri:
                    type: string
      security: []
      servers:
        - url: https://api.receiptor.ai/oauth2

````