---
title: "Github Callback"
method: GET
path: "/api/v1/auth/github/callback"
tags: ["authentication", "authentication", "github-oauth2"]
---

# Github Callback

`GET /api/v1/auth/github/callback`

## Request

- Base URL: `https://memory.kagura-ai.com` (the document declares no server; this is the origin it was published from)
- URL: `https://memory.kagura-ai.com/api/v1/auth/github/callback`
- Auth: none declared

Handle GitHub OAuth2 callback.

Same flow as Google callback: CSRF validation → token exchange →
user info → session creation → cookie → redirect.

## Query parameters

- `code` string, nullable: GitHub authorization code
- `state` string, nullable: CSRF state token
- `error` string, nullable: OAuth2 error code (e.g. access_denied) when the user cancels
- `error_description` string, nullable: Human-readable OAuth2 error detail (not reflected)

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/kagura-ai/apis/kagura-memory-cloud.md) · [All operations](https://skmtc.dev/kagura-ai/apis/kagura-memory-cloud/llms.txt) · [OpenAPI document](https://skmtc.dev/kagura-ai/apis/kagura-memory-cloud/revisions/09f17f5ada29?raw)
