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 yourself.

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

get/api/apps/{app_id}/github/connection

Path parameters

app_idstring required

ID of the app whose GitHub connection to use.

ID of the app whose GitHub connection to use.

Response

The app's GitHub connection.

connectedboolean required

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.

repo_full_namestring nullable

Full repository name, as owner/repo. null when connected is false.

repo_urlstring nullable

URL of the repository on GitHub. null when connected is false.

org_namestring nullable

GitHub username or organization that owns the repository. null when connected is false.

status'active' | 'disconnected' | 'error' | 'revoked'

Status of GitHub repository connection.

  • ACTIVE: Connection is working normally
  • DISCONNECTED: User manually disconnected
  • ERROR: Technical error occurred
  • REVOKED: User revoked OAuth permissions
installation_idstring nullable

ID of the Base44 GitHub App installation backing this connection. null when connected is false, and on a connection stored without one.

webhook_activeboolean

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.

connected_by_user_idstring nullable

ID of the Base44 user who connected the repository. null when connected is false.

Example response

{
  "connected": true,
  "repo_full_name": "base44/lead-tracker",
  "repo_url": "https://github.com/base44/lead-tracker",
  "clone_urls": {
    "https": "https://github.com/base44/lead-tracker.git",
    "ssh": "git@github.com:base44/lead-tracker.git",
    "gh_cli": "gh repo clone base44/lead-tracker"
  },
  "org_name": "base44",
  "installation_id": "58231904",
  "webhook_active": true,
  "connected_by_user_id": "6820f3a4e7b91d003c45a1f0"
}

Changes