Skip to content

List user's GitHub repos

GET
/github/repos
curl --request GET \
--url https://example.com/api/github/repos \
--header 'Authorization: Bearer <token>'

Returns the user’s GitHub repositories enriched with Lovable detection status.

401 — Missing or invalid AppHandoff session (Bearer/cookie). Portals should treat as logout / re-login.

403 with code: GITHUB_AUTH — GitHub token rejected (expired, revoked, or missing repo scope). The AppHandoff session remains valid; prompt user to reconnect GitHub. Do not clear Supabase tokens.

Repo list

Media type application/json
object
repos
required
Array<object>
object
id
required
integer
full_name
required
string
Example
acme/my-app
name
string
private
required
boolean
html_url
string format: uri
description
string | null
language
string | null
updated_at
string format: date-time
kind
required

Lightweight hint at what this repo is, used to pre-select the role in the picker

string
Allowed values: frontend backend fullstack monorepo unknown
reason
required

Short human-readable reason for the kind (e.g. “Vite + React”, “Express”, “Turbo monorepo”)

string
total
required
integer

Not authenticated

Media type application/json
object
error
required

Human-readable error message

string
code

Stable machine-readable error code for client branching

string
fieldErrors

First validation message per field path

object
key
additional properties
string
issues

Structured validation issues (Zod)

Array<object>
object
path
required
string
message
required
string
retryAfter

Seconds until rate limit resets (429 responses)

number
reconnect

True if re-linking GitHub may fix the issue

boolean

GitHub token invalid, expired, or insufficient scope. AppHandoff JWT/session is still valid.

Media type application/json
object
error
required

Human-readable message (reconnect GitHub in Settings or integrations).

string
reconnect
required
boolean
code
required

Stable machine-readable code; clients must not treat as AppHandoff session expiry.

string
Allowed value: GITHUB_AUTH