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

# Initiate OAuth flow

> Generate an OAuth authorization URL for an integration provider. Admin only.



## OpenAPI

````yaml /api-reference/openapi.json get /api/integrations/oauth/authorize
openapi: 3.1.0
info:
  title: Tedro API
  version: 1.0.0
  description: REST API for the Tedro communication operations platform.
servers:
  - url: https://api.tedro.io
    description: Production
security:
  - sessionCookie: []
    workspaceId: []
paths:
  /api/integrations/oauth/authorize:
    get:
      tags:
        - Integrations
      summary: Initiate OAuth flow
      description: >-
        Generate an OAuth authorization URL for an integration provider. Admin
        only.
      parameters:
        - schema:
            type: string
            description: Integration provider name (e.g., google-sheets, hubspot)
          required: true
          description: Integration provider name (e.g., google-sheets, hubspot)
          name: provider
          in: query
        - schema:
            type: string
            description: Display name for the connection
          required: false
          description: Display name for the connection
          name: connectionName
          in: query
      responses:
        '200':
          description: Authorization URL
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OAuthAuthorizeResponse'
        '400':
          description: Bad Request - invalid or missing parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '401':
          description: Unauthorized - missing or invalid session cookie
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden - insufficient role (admin required)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - sessionCookie: []
          workspaceId: []
components:
  schemas:
    OAuthAuthorizeResponse:
      type: object
      properties:
        url:
          type: string
      required:
        - url
    ValidationErrorResponse:
      type: object
      properties:
        error:
          type: string
        details:
          type: array
          items:
            type: object
            properties:
              path:
                type: string
              message:
                type: string
            required:
              - path
              - message
      required:
        - error
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
      required:
        - error
  securitySchemes:
    sessionCookie:
      type: apiKey
      in: cookie
      name: better-auth.session_token
      description: Session cookie set by Better Auth on sign-in.
    workspaceId:
      type: apiKey
      in: header
      name: x-workspace-id
      description: Workspace UUID. Required on all /api/* endpoints.

````