---
title: "Get GitHub connection"
method: GET
path: "/api/apps/{app_id}/github/connection"
---

# Get GitHub connection

`GET /api/apps/{app_id}/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, if it has one.

Calling this re-checks the connection against GitHub and tries to repair a broken one, so what it reports can change between two calls even when nobody has touched the app.

An app that never connected and one whose repository was disconnected both report `connected: false`. The second also carries `previous_repository`, the repository the app can be reconnected to (set only after a user-initiated disconnect).

## Path parameters

- `app_id` string, required — ID of the app whose GitHub connection to use.

## Response `200`

The app's GitHub connection.

- ConnectionStatus — Current connection status for an app.
  - `connection_mode` 'shared' | 'per_user'
  - `user_github_connected` boolean, nullable — Whether the current user has a linked GitHub account; computed only in per_user mode.
  - `can_push` boolean — Whether the connection permits a push attempt under the workspace mode. Failed user permission lookups allow an attempt; GitHub enforces access.
  - `connected` boolean, required — Whether the app still has its repository connection, including one whose `status` is `error` or `revoked`. The value is `false` only when the app never connected and when its repository was disconnected.
  - `repo_full_name` string, nullable — Full repository name, as `owner/repo`, or `null` when `connected` is `false`.
  - `repo_url` string, nullable — URL of the repository on GitHub, or `null` when `connected` is `false`.
  - `clone_urls` CloneUrls — Repository clone URLs in different formats.
    - `https` string, required — URL to clone the repository over HTTPS.
    - `ssh` string, required — URL to clone the repository over SSH.
    - `gh_cli` string, required — Ready-to-run GitHub CLI clone command.
  - `org_name` string, nullable — GitHub username or organization that owns the repository, or `null` when `connected` is `false`.
  - `status` 'active' | 'disconnected' | 'error' | 'revoked' — Health of an app's GitHub repository connection. - `active` works normally. - `disconnected` was disconnected by a user. - `error` hit a technical failure. - `revoked` means the GitHub App access was withdrawn.
  - `installation_id` string, nullable — ID of the Base44 GitHub App installation backing this connection, or `null` when `connected` is `false` and on a connection stored without one.
  - `webhook_active` boolean — Whether 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.
  - `connected_by_user_id` string, nullable — ID of the Base44 user who connected the repository, or `null` when `connected` is `false`.
  - `previous_repository` PreviousRepository — The repository an app was connected to before a user disconnected it.
    - `repo_full_name` string, required — Full repository name, as `owner/repo`.
    - `repo_url` string, required — URL of the repository on GitHub.
    - `org_name` string, required — GitHub username or organization that owns the repository.

## Other responses

- `401` — Missing or invalid credentials.
- `403` — You don't have access to this app, or you used a workspace API key. These endpoints take a personal API key.
- `404` — App not found.

## Changes

- **2026-09-16** `c1bfd4e71a66` — 1 info
  - added the optional property `previous_repository` to the response with the `200` status
- **2026-09-15** `ca10c5ce328c` — 3 info
  - added the optional property `can_push` to the response with the `200` status
  - added the optional property `connection_mode` to the response with the `200` status
  - added the optional property `user_github_connected` to the response with the `200` status

[Change history](https://skmtc.dev/base44/apis/base44-app-management-api/changes/api/apps/:app_id/github/connection/get.md)

---

[API](https://skmtc.dev/base44/apis/base44-app-management-api.md) · [All operations](https://skmtc.dev/base44/apis/base44-app-management-api/llms.txt) · [OpenAPI document](https://skmtc.dev/base44/apis/base44-app-management-api/revisions/cf164639a9bf?raw)
