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

# Initiate Google Oauth

> Initiate Google OAuth2 authorization flow.

Args:
    connection_type: Type of connection
    redirect_url (Optional[str]): Redirect URL after authorization. Usually redirects to the frontend.
    user (User): The current user

Returns:
    Dict containing the authorization URL for user to authenticate



## OpenAPI

````yaml https://dev-api.cattix.com/openapi.json get /api/v1/google-auth/initiate
openapi: 3.1.0
info:
  title: CATTIX API
  description: CATTIX Backend API
  version: 0.107.0
servers:
  - url: http://localhost:8000
    description: Local
  - url: https://dev-api.cattix.com
    description: Development
  - url: https://staging-api.cattix.com
    description: Staging
  - url: https://api.cattix.com
    description: Production
security: []
paths:
  /api/v1/google-auth/initiate:
    get:
      tags:
        - Google Auth
      summary: Initiate Google Oauth
      description: |-
        Initiate Google OAuth2 authorization flow.

        Args:
            connection_type: Type of connection
            redirect_url (Optional[str]): Redirect URL after authorization. Usually redirects to the frontend.
            user (User): The current user

        Returns:
            Dict containing the authorization URL for user to authenticate
      operationId: initiate_google_oauth_api_v1_google_auth_initiate_get
      parameters:
        - name: connection_type
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/ConnectionType'
              - type: 'null'
            title: Connection Type
        - name: redirect_url
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Redirect Url
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                title: Response Initiate Google Oauth Api V1 Google Auth Initiate Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
components:
  schemas:
    ConnectionType:
      type: string
      enum:
        - google_ads
        - google_business_profile
      title: ConnectionType
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: api/v1/users/authorization/token

````