---
title: "Fail Authorization Request"
method: POST
path: "/api/{serviceId}/auth/authorization/fail"
tags: ["Authorization Endpoint"]
---

# Fail Authorization Request

`POST /api/{serviceId}/auth/authorization/fail`

This API generates a content of an error authorization response that the authorization server implementation
returns to the client application.

## Path parameters

- `serviceId` string, required

## Request body

- AuthorizationFailRequest
  - `ticket` string, required — The ticket issued from Authlete `/auth/authorization` API.
  - `reason` 'UNKNOWN' | 'NOT_LOGGED_IN' | 'MAX_AGE_NOT_SUPPORTED' | 'EXCEEDS_MAX_AGE' | 'DIFFERENT_SUBJECT' | 'ACR_NOT_SATISFIED' | 'DENIED' | 'SERVER_ERROR' | 'NOT_AUTHENTICATED' | 'ACCOUNT_SELECTION_REQUIRED' | 'CONSENT_REQUIRED' | 'INTERACTION_REQUIRED' | 'INVALID_TARGET', required — The reason of the failure of the authorization request. For more details, see [NO_INTERACTION] in the description of `/auth/authorization` API.
  - `description` string — The custom description about the authorization failure.

## Response `200`

- AuthorizationFailResponse
  - `resultCode` string — The code which represents the result of the API call.
  - `resultMessage` string — A short message which explains the result of the API call.
  - `action` 'INTERNAL_SERVER_ERROR' | 'BAD_REQUEST' | 'LOCATION' | 'FORM' — The next action that the authorization server implementation should take.
  - `responseContent` string — The content that the authorization server implementation is to return to the client application. Its format varies depending on the value of `action` parameter.

## Other responses

- `400`
- `401`
- `403`
- `429` — The request exceeded the request rate permitted for the endpoint.
- `500`

---

[API](https://skmtc.net/authlete/apis/authlete-api.md) · [All operations](https://skmtc.net/authlete/apis/authlete-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/authlete/authlete-api/versions/7ad74ab64749/schema)
