v1

latestOpenAPI 3.0.3Apache 2.02026-07-175068227.4 KB
oAuth2

Reject OAuth 2.0 Consent Request

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 Ory now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf.

The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request.

This endpoint tells Ory that the subject has not authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider must include a reason why the consent was not granted.

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

The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please head over to the OAuth 2.0 documentation.

put/admin/oauth2/auth/requests/consent/reject

Query parameters

consent_challengestring required

OAuth 2.0 Consent Request Challenge

Request body

errorstring

The error should follow the OAuth2 error format (e.g. invalid_request, login_required).

Defaults to request_denied.

error_debugstring

Debug contains information to help resolve the problem as a developer. Usually not exposed to the public but only in the server logs.

error_descriptionstring

Description of the error in a human readable format.

error_hintstring

Hint to help resolve the error.

status_codeinteger

Represents the HTTP status code of the error (e.g. 401 or 403)

Defaults to 400

Response

oAuth2RedirectTo

redirect_tostring required

RedirectURL is the URL which you should redirect the user's browser to once the authentication process is completed.

Example response

{
  "redirect_to": "redirect_to"
}