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

# Authorize an OAuth connector

> Create an OAuth authorization URL for a provider. Use this to start a browser-based consent flow.



## OpenAPI

````yaml /sprites/api/openapi.json get /v1/oauth/{provider}/authorize
openapi: 3.1.0
info:
  title: Sprites API
  version: 0.1.12
  x-sprite-env-version: v0.0.1-rc48
servers:
  - url: https://api.sprites.dev
security: []
paths:
  /v1/oauth/{provider}/authorize:
    get:
      tags:
        - Connectors
      summary: Authorize an OAuth connector
      description: >-
        Create an OAuth authorization URL for a provider. Use this to start a
        browser-based consent flow.
      operationId: o_auth_connections_authorize_get
      parameters:
        - in: path
          name: provider
          required: true
          schema:
            type: string
        - description: >-
            Comma-separated scopes to request. Replaces the default scope set
            for this authorization URL.
          in: query
          name: scopes
          required: false
          schema:
            description: >-
              Comma-separated scopes to request. Replaces the default scope set
              for this authorization URL.
            example: chat:write,channels:read
            type: string
        - description: >-
            Comma-separated scopes to add to any scopes already granted for this
            provider.
          in: query
          name: add_scopes
          required: false
          schema:
            description: >-
              Comma-separated scopes to add to any scopes already granted for
              this provider.
            example: reactions:write,files:read
            type: string
        - description: >-
            OAuth callback URI. Defaults to the Sprites API callback for the
            provider.
          in: query
          name: redirect_uri
          required: false
          schema:
            description: >-
              OAuth callback URI. Defaults to the Sprites API callback for the
              provider.
            example: https://api.sprites.dev/v1/oauth/slack/callback
            type: string
        - description: >-
            Optional state value. If omitted, Sprites generates one that ties
            the callback to the organization.
          in: query
          name: state
          required: false
          schema:
            description: >-
              Optional state value. If omitted, Sprites generates one that ties
              the callback to the organization.
            example: opaque-state
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OAuthAuthorizeResponse'
          description: Success
        '400':
          description: Invalid request parameters
        '401':
          description: Missing or invalid authentication
      security:
        - bearerAuth: []
components:
  schemas:
    OAuthAuthorizeResponse:
      description: OAuth authorization response
      properties:
        authorize_url:
          description: Provider URL where the user grants access.
          example: https://slack.com/oauth/v2/authorize?client_id=...
          type: string
        state:
          description: State value that must be sent back to the callback.
          example: opaque-state
          type: string
      required:
        - authorize_url
        - state
      type: object
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````