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

# Get GitHub connection

> <Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>

Returns the app's GitHub repository connection, or `connected: false` when it has none.

Reading this refreshes the connection's health as a side effect: an active connection is re-checked against GitHub, and one in `error` or `revoked` is retried, so `status` can change between two calls with nobody touching the app.

`connected` is `false` for an app that never connected and for one whose repository was disconnected, and the rest of the fields are then `null`, so the two cases are indistinguishable here. A connection GitHub revoked, or one that hit an error, is still `connected: true`; `status` is what tells you it needs repair.

Read `webhook_active` here. While it is `false` on a connected app, GitHub isn't telling Base44 about pushes, so nothing pulls automatically and you have to call [Pull changes from GitHub](/api-reference/pull-changes-from-github) yourself.

<Note>This endpoint accepts a personal API key. Workspace API keys are not authorized for it and are rejected with a 403.</Note>



## OpenAPI

````yaml /developers/references/app-management/app-management-openapi.json get /api/apps/{app_id}/github/connection
openapi: 3.1.0
info:
  title: Base44 App Management API
  version: 1.0.0
servers:
  - url: https://app.base44.com
security:
  - ApiKeyAuth: []
paths:
  /api/apps/{app_id}/github/connection:
    get:
      summary: Get GitHub connection
      description: >-
        <Info>This API is in beta. Endpoints, fields, and behavior may still
        change, so avoid depending on it in production.</Info>


        Returns the app's GitHub repository connection, or `connected: false`
        when it has none.


        Reading this refreshes the connection's health as a side effect: an
        active connection is re-checked against GitHub, and one in `error` or
        `revoked` is retried, so `status` can change between two calls with
        nobody touching the app.


        `connected` is `false` for an app that never connected and for one whose
        repository was disconnected, and the rest of the fields are then `null`,
        so the two cases are indistinguishable here. A connection GitHub
        revoked, or one that hit an error, is still `connected: true`; `status`
        is what tells you it needs repair.


        Read `webhook_active` here. While it is `false` on a connected app,
        GitHub isn't telling Base44 about pushes, so nothing pulls automatically
        and you have to call [Pull changes from
        GitHub](/api-reference/pull-changes-from-github) yourself.


        <Note>This endpoint accepts a personal API key. Workspace API keys are
        not authorized for it and are rejected with a 403.</Note>
      operationId: get_connection_status_api_apps__app_id__github_connection_get
      parameters:
        - name: app_id
          in: path
          required: true
          schema:
            type: string
            description: ID of the app whose GitHub connection to use.
            title: App Id
          description: ID of the app whose GitHub connection to use.
          example: 6820f3a4e7b91d003c45a1f2
      responses:
        '200':
          description: The app's GitHub connection.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectionStatus'
        '401':
          description: Missing or invalid credentials.
        '403':
          description: >-
            You don't have access to this app, or you used a workspace API key.
            These endpoints take a personal API key.
        '404':
          description: App not found.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ConnectionStatus:
      properties:
        connected:
          type: boolean
          title: Connected
          description: >-
            `true` when the app still has its repository connection, including
            one whose `status` is `error` or `revoked`. `false` only when the
            app never connected and when its repository was disconnected.
          example: true
        repo_full_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Repo Full Name
          description: >-
            Full repository name, as `owner/repo`. `null` when `connected` is
            `false`.
          example: base44/lead-tracker
        repo_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Repo Url
          description: URL of the repository on GitHub. `null` when `connected` is `false`.
          example: https://github.com/base44/lead-tracker
        clone_urls:
          anyOf:
            - $ref: '#/components/schemas/CloneUrls'
            - type: 'null'
          description: >-
            URLs and CLI command for cloning the repository. `null` when
            `connected` is `false`.
        org_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Org Name
          description: >-
            GitHub username or organization that owns the repository. `null`
            when `connected` is `false`.
          example: base44
        status:
          anyOf:
            - $ref: '#/components/schemas/GitHubConnectionStatus'
            - type: 'null'
          description: >-
            Health of the connection. `active` works normally, `error` hit a
            technical failure, and `revoked` means the GitHub App access was
            withdrawn. The last two still report `connected: true`, so this is
            the field that tells you the connection needs repair. `null` when
            `connected` is `false`.
          example: active
        installation_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Installation Id
          description: >-
            ID of the Base44 GitHub App installation backing this connection.
            `null` when `connected` is `false`, and on a connection stored
            without one.
          example: '58231904'
        webhook_active:
          type: boolean
          title: Webhook Active
          description: >-
            `true` when the repository has the Base44 webhook that triggers
            automatic pulls. While this is `false` on a connected app, GitHub
            isn't telling Base44 about pushes, so nothing arrives until you
            pull.
          default: false
          example: true
        connected_by_user_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Connected By User Id
          description: >-
            ID of the Base44 user who connected the repository. `null` when
            `connected` is `false`.
          example: 6820f3a4e7b91d003c45a1f0
      type: object
      required:
        - connected
      title: ConnectionStatus
      description: Current connection status for an app.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    CloneUrls:
      properties:
        https:
          type: string
          title: Https
          description: URL to clone the repository over HTTPS.
          example: https://github.com/base44/lead-tracker.git
        ssh:
          type: string
          title: Ssh
          description: URL to clone the repository over SSH.
          example: git@github.com:base44/lead-tracker.git
        gh_cli:
          type: string
          title: Gh Cli
          description: Ready-to-run GitHub CLI clone command.
          example: gh repo clone base44/lead-tracker
      type: object
      required:
        - https
        - ssh
        - gh_cli
      title: CloneUrls
      description: Repository clone URLs in different formats.
    GitHubConnectionStatus:
      type: string
      enum:
        - active
        - disconnected
        - error
        - revoked
      title: GitHubConnectionStatus
      description: |-
        Status of GitHub repository connection.

        - ACTIVE: Connection is working normally
        - DISCONNECTED: User manually disconnected
        - ERROR: Technical error occurred
        - REVOKED: User revoked OAuth permissions
    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:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: api_key
      description: Personal API key.

````