List user's GitHub repos
const url = 'https://example.com/api/github/repos';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations ”Responses
Section titled “ Responses ”Repo list
object
object
Example
acme/my-appLightweight hint at what this repo is, used to pre-select the role in the picker
Short human-readable reason for the kind (e.g. “Vite + React”, “Express”, “Turbo monorepo”)
Not authenticated
object
Human-readable error message
Stable machine-readable error code for client branching
First validation message per field path
object
Structured validation issues (Zod)
object
Seconds until rate limit resets (429 responses)
True if re-linking GitHub may fix the issue
GitHub token invalid, expired, or insufficient scope. AppHandoff JWT/session is still valid.
object
Human-readable message (reconnect GitHub in Settings or integrations).
Stable machine-readable code; clients must not treat as AppHandoff session expiry.