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

# Start an authorization

> Starts the authorization-code flow with PKCE: redirects the browser to the xcale connect page, or back to the client with an error.



## OpenAPI

````yaml /openapi.public.json get /oauth/authorize
openapi: 3.0.3
info:
  description: >-
    The endpoints a client outside xcale calls to connect to the xcale MCP:
    discovery, client registration, authorization, the token exchange and the
    MCP endpoint.
  title: xcale MCP
  version: 1.0.0
servers:
  - url: https://api.xcale.app
security: []
paths:
  /oauth/authorize:
    get:
      summary: Start an authorization
      description: >-
        Starts the authorization-code flow with PKCE: redirects the browser to
        the xcale connect page, or back to the client with an error.
      operationId: authorize
      parameters:
        - in: query
          name: response_type
          required: true
          schema:
            enum:
              - code
            type: string
        - description: The `client_id` from registration.
          in: query
          name: client_id
          required: true
          schema:
            type: string
        - description: One of the URIs the client registered.
          in: query
          name: redirect_uri
          required: true
          schema:
            type: string
        - description: 'The PKCE challenge: 43 to 128 base64url characters.'
          in: query
          name: code_challenge
          required: true
          schema:
            type: string
        - in: query
          name: code_challenge_method
          required: true
          schema:
            enum:
              - S256
            type: string
        - description: Echoed back to the client untouched.
          in: query
          name: state
          required: false
          schema:
            maxLength: 512
            type: string
        - description: The URL of the xcale MCP endpoint, when sent.
          in: query
          name: resource
          required: false
          schema:
            type: string
        - description: Read and ignored.
          in: query
          name: scope
          required: false
          schema:
            type: string
      responses:
        '302':
          description: >-
            Always a redirect. To the xcale connect page when the request is
            valid (and a short-lived cookie binds it to this browser); to the
            connect page with `error=invalid_client` or
            `error=invalid_redirect_uri` when the client or the redirect URI is
            not known; otherwise back to the client's `redirect_uri` with
            `error` (`unsupported_response_type`, `invalid_request`,
            `invalid_target` or `temporarily_unavailable`), `state` when one
            came and `iss`.
          headers:
            Cache-Control:
              description: 'Always `no-store`: the answer is never cached.'
              schema:
                type: string
            Location:
              description: Where the browser goes next.
              schema:
                type: string
            Set-Cookie:
              description: >-
                Only when the browser goes to the connect page: the cookie that
                binds the request to this browser, valid for 10 minutes.
              schema:
                type: string
        '503':
          content:
            application/json:
              schema:
                properties:
                  error:
                    enum:
                      - temporarily_unavailable
                    type: string
                  error_description:
                    enum:
                      - connector_disabled
                    type: string
                required:
                  - error
                type: object
          description: The xcale MCP is not enabled on this deployment. Try again later.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.