---
title: "Reject OAuth 2.0 Login Request"
method: PUT
path: "/admin/oauth2/auth/requests/login/reject"
tags: ["oAuth2"]
---

# Reject OAuth 2.0 Login Request

`PUT /admin/oauth2/auth/requests/login/reject`

When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider
to authenticate the subject and then tell the Ory OAuth2 Service about it.

The authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login
provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process.

This endpoint tells Ory that the subject has not authenticated and includes a reason why the authentication
was denied.

The response contains a redirect URL which the login provider should redirect the user-agent to.

## Query parameters

- `login_challenge` string, required

## Request body

- RejectOAuth2Request
  - `error` string — The error should follow the OAuth2 error format (e.g. `invalid_request`, `login_required`). Defaults to `request_denied`.
  - `error_debug` string — Debug contains information to help resolve the problem as a developer. Usually not exposed to the public but only in the server logs.
  - `error_description` string — Description of the error in a human readable format.
  - `error_hint` string — Hint to help resolve the error.
  - `status_code` integer — Represents the HTTP status code of the error (e.g. 401 or 403) Defaults to 400

## Response `200`

oAuth2RedirectTo

- OAuth2RedirectTo — Contains a redirect URL used to complete a login, consent, or logout request.
  - `redirect_to` string, required — RedirectURL is the URL which you should redirect the user's browser to once the authentication process is completed.

## Other responses

- `default` — errorOAuth2

## Changes

- **2022-10-27** `4505403da8d7` — 1 info
  - endpoint added
- **2022-02-16** `82d233540486` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/ory/apis/ory-hydra-api/changes/admin/oauth2/auth/requests/login/reject/put.md)

---

[API](https://skmtc.dev/ory/apis/ory-hydra-api.md) · [All operations](https://skmtc.dev/ory/apis/ory-hydra-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/ory/ory-hydra-api/revisions/ab053e716585/schema)
