---
title: "Connect Github"
method: POST
path: "/v1/user/github/connect"
tags: ["v1-github"]
---

# Connect Github

`POST /v1/user/github/connect`

Store GitHub credentials after successful OAuth flow.

Called by frontend after Supabase linkIdentity() or initial OAuth login.
The access_token is received from Supabase's session as provider_token.

Body:
    access_token: GitHub OAuth access token (from provider_token)
    scopes: List of OAuth scopes granted (e.g., ['repo', 'user:email'])

## Request body

- GitHubConnectRequest — Request body for POST /v1/user/github/connect.
  - `access_token` string, required
  - `scopes` string[]

## Response `200`

Successful Response

- GitHubConnectResponse — Response for POST /v1/user/github/connect.
  - `success` boolean, required
  - `github_username` string, required
  - `github_user_id` string, required
  - `message` string, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/tryardent/apis/fastapi.md) · [All operations](https://skmtc.net/tryardent/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/tryardent/fastapi/revisions/71b66f68e19c/schema)
