---
title: "OAuth Token Endpoint"
method: POST
path: "/oauth/token"
tags: ["MCP OAuth"]
---

# OAuth Token Endpoint

`POST /oauth/token`

OAuth 2.1 token endpoint (RFC 6749 §4.1.3, §6). Exchanges an authorization code with PKCE or a refresh token for an access/refresh token pair

## Response `200`

Token response

- TokenResponse
  - `access_token` string
  - `refresh_token` string
  - `token_type` string
  - `expires_in` integer
  - `workspace_id` string
  - `workspace_name` string

## Other responses

- `400` — OAuth error (RFC 6749 §5.2)

---

[API](https://skmtc.net/comet-ml/apis/opik-rest-api.md) · [All operations](https://skmtc.net/comet-ml/apis/opik-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/comet-ml/opik-rest-api/versions/4ed2fbc97cc3/schema)
