---
title: "Return a validated denial callback"
method: POST
path: "/oauth/authorize/deny"
tags: ["OAuth"]
---

# Return a validated denial callback

`POST /oauth/authorize/deny`

## Request

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

Public first-party consent helper. Applies the same validation as approval and returns the registered callback carrying access_denied and state. 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 callback carrying the OAuth denial.

- AuthorizationGrantResponse: The redirect URI (carrying `code` and `state`) for the browser to follow back to the client.
  - `redirect_uri` string, uri

## Other responses

- `400`: Invalid request; no callback is returned.

---

[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/06540345bbbc?raw)
