---
title: "Oauth Callback"
method: POST
path: "/v2/auth/callback/{provider_id}"
tags: ["Auth Service (v2)"]
---

# Oauth Callback

`POST /v2/auth/callback/{provider_id}`

Finalize an OAuth flow.

Claims the auth request, verifies the caller, exchanges the code, and saves the token.
Used by both the frontend bridge and the headless flow (where a customer-owned service
forwards the code/state, optionally proxied through smith-go). In all cases the auth
request is user-initiated and the caller presents the end user's own credentials, so
the authenticated user must match the user who initiated the flow.

## Path parameters

- `provider_id` string, required

## Request body

- OAuthFinalizeRequest — Request model for OAuth callback finalization (frontend bridge and headless).
  - `code` string, required
  - `state` string, required

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/langchain-ai/apis/langsmith-deployment-control-plane-api.md) · [All operations](https://skmtc.net/langchain-ai/apis/langsmith-deployment-control-plane-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/langchain-ai/langsmith-deployment-control-plane-api/versions/a0cd098699b4/schema)
