---
title: "Initiate and Complete Discord OAuth Flow"
method: GET
path: "/discord/oauth"
tags: ["Discord", "Authentication"]
---

# Initiate and Complete Discord OAuth Flow

`GET /discord/oauth`

Handles the Discord OAuth callback to exchange an authorization code for user access and refresh tokens. Upon successful authentication, returns the token details.

## Query parameters

- `code` string, required

## Request body

- object

## Response `200`

Successfully exchanged authorization code for access and refresh tokens

- string

## Other responses

- `400` — Bad request, e.g., missing 'code' parameter or invalid authorization code
- `500` — Internal server error during token exchange or user processing

---

[API](https://skmtc.dev/seraph/apis/seraph-api.md) · [All operations](https://skmtc.dev/seraph/apis/seraph-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/seraph/seraph-api/revisions/82a1ec01c64d/schema)
