---
title: "Authenticate"
method: POST
path: "/authenticate"
---

# Authenticate

`POST /authenticate`

Exchange authorization code for access token with PKCE and CSRF validation.

For local auth environments, the 'code' field contains the user's email
and authentication generates a synthetic bearer token locally.

## Request body

- AuthenticateRequest — Request body for exchanging authorization code for access token.
  - `code` string, required
  - `code_verifier` string, required
  - `nonce` string, nullable
  - `state` string, nullable

## Response `200`

Successful Response

- AuthenticateResponse — Response after successful authentication.
  - `success` boolean, required
  - `access_token` string, nullable, required

## Other responses

- `422` — Validation Error

---

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