---
title: "POST /api/oauth/consents/{requestId}/deny"
method: POST
path: "/api/oauth/consents/{requestId}/deny"
tags: ["OAuth"]
---

# POST /api/oauth/consents/{requestId}/deny

`POST /api/oauth/consents/{requestId}/deny`

## Request

- The document declares no server URL.
- Auth: API key in cookie `session`

Refuse the request; the application is told `access_denied`.

## Path parameters

- `requestId` string, required

## Response `200`

The request has succeeded.

- OAuthDecision: Where the browser goes next after the user has decided.
  - `redirectUrl` string, required: Absolute URL: the authorization endpoint's callback after approving, the application's redirect URI (with `error=access_denied`) after denying.

## Other responses

- `default`: Default error response shared by every operation. `@error` emits an OpenAPI `default` response, keeping central transport failures typed without enumerating every status on every operation.

## Changes

- **2026-10-18** `9380d4c85a04`: 3 info
  - removed the non-success response with the status `401`
  - removed the non-success response with the status `404`
  - added the optional property `errors` to the response with the `default` status
- **2026-10-17** `023e7c2cd140`: 1 info
  - endpoint added
- **2026-10-17** `d09902c84ca9`: 1 breaking
  - api path removed without deprecation
- **2026-10-17** `b3e2bb3e440b`: 1 info
  - endpoint added
- **2026-10-17** `6038dca99ed6`: 1 breaking
  - api path removed without deprecation

[Operation history](https://skmtc.dev/hexlet-basics/apis/hexlet-basics-api/changes/api/oauth/consents/:requestId/deny/post.md)

---

[API](https://skmtc.dev/hexlet-basics/apis/hexlet-basics-api.md) · [All operations](https://skmtc.dev/hexlet-basics/apis/hexlet-basics-api/llms.txt) · [OpenAPI document](https://skmtc.dev/hexlet-basics/apis/hexlet-basics-api/revisions/51c7f596b47c?raw)
