---
title: "Validate a consent request before showing its client and permissions"
method: POST
path: "/oauth/authorize/preview"
tags: ["OAuth"]
---

# Validate a consent request before showing its client and permissions

`POST /oauth/authorize/preview`

## Request

- Base URL: `https://api.purplegrain.com`
- URL: `https://api.purplegrain.com/oauth/authorize/preview`
- Auth: none required

Public first-party consent helper. Checks client registration, callback, scopes, resource and S256 PKCE. Creates no grant.

## Request body

- AuthorizationGrantRequest: Authorize parameters for the headless grant. Identical to the query parameters of `GET /oauth/authorize`; sent as a POST body alongside the consenting user's bearer token.
  - `client_id` string, required
  - `response_type` 'code', required
  - `redirect_uri` string, uri, required
  - `scope` string
  - `state` string
  - `code_challenge` string, required: PKCE code challenge (S256).
  - `code_challenge_method` 'S256', required
  - `nonce` string
  - `resource` string, uri: The exact MCP resource URI advertised by discovery. Omission uses that resource for existing clients.

## Response `200`

Validated client identity and requested permissions.

- object
  - `client_name` string, required
  - `scopes` string[], required
  - `resource` string, uri, required

## Other responses

- `400`: Invalid request; the consent UI must not enable approval or follow the query callback.

---

[API](https://skmtc.dev/purplegrain/apis/purple-grain-api.md) · [All operations](https://skmtc.dev/purplegrain/apis/purple-grain-api/llms.txt) · [OpenAPI document](https://skmtc.dev/purplegrain/apis/purple-grain-api/revisions/a9136f78e9fb?raw)
