> ## Documentation Index
> Fetch the complete documentation index at: https://docs-dev-docs-event-stream-action-templates.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Challenge Request

> Request an MFA challenge (OTP or OOB) to continue authentication at the token endpoint.

export const ResponseSchema = ({statusCode, type = "{}", children}) => {
  const [open, setOpen] = useState(false);
  return <div className="border border-gray-100 dark:border-gray-800 rounded-lg mb-3 overflow-hidden">
      <div className={`flex items-center gap-2.5 px-4 py-2.5 cursor-pointer select-none ${open ? "bg-gray-50 dark:bg-gray-800" : ""}`} onClick={() => setOpen(!open)}>
        {statusCode && <span className="border border-gray-300 dark:border-gray-600 text-gray-700 dark:text-gray-300 font-mono text-xs px-1.5 py-0.5 rounded">
            {statusCode.startsWith("default") ? "default" : statusCode}
          </span>}
        <span className="text-gray-500 dark:text-gray-400 text-sm font-mono">
          {type}
        </span>
        <span className="text-gray-400 dark:text-gray-500 text-sm italic">
          application/json
        </span>
        <svg className={`ml-auto opacity-50 transition-transform duration-200 ${open ? "rotate-180" : ""}`} width="16" height="16" viewBox="0 0 16 16" fill="none">
          <path d="M4 6l4 4 4-4" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
        </svg>
      </div>
      {open && <div className="px-4 pt-1 pb-3 border-t border-gray-100 dark:border-gray-800">
          {children}
        </div>}
    </div>;
};

## Endpoint

`POST /mfa/challenge`

The Multi-factor Authentication (MFA) API endpoints allow you to enforce MFA when users interact with [the Token endpoints](#get-token), as well as enroll and manage user authenticators.

First, request a challenge based on the challenge types supported by the application and user. If you know that one-time password (OTP) is supported, you can skip the challenge request.

Next, verify the multi-factor authentication using the `/oauth/token` endpoint and the specified challenge type: a one-time password (OTP), a recovery code, or an out-of-band (OOB) challenge.

To learn more, read:

* [Multi-factor Authentication and Resource Owner Password](https://auth0.com/docs/secure/multi-factor-authentication/authenticate-using-ropg-flow-with-mfa)
* [Multi-factor Authentication API](https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-developer-resources/mfa-api)
* [Multi-factor Authentication in Auth0](https://auth0.com/docs/secure/multi-factor-authentication)

## Challenge Request

Request a challenge for multi-factor authentication (MFA) based on the challenge types supported by the application and user.

The `challenge_type` is how the user will get the challenge and prove possession. Supported challenge types include:

* `otp`: for one-time password (OTP)
* `oob`: for SMS/Voice messages or out-of-band (OOB)

If OTP is supported by the user and you don't want to request a different factor, you can skip the challenge request and [verify the multi-factor authentication with a one-time password](#verify-with-one-time-password-otp-).

### Remarks

* This endpoint does not support enrollment; the user must be enrolled with the preferred method before requesting a challenge.
* Auth0 chooses the challenge type based on the application's supported types and types the user is enrolled with.
* An `unsupported_challenge_type` error is returned if your application does not support any of the challenge types the user has enrolled with.
* An `unsupported_challenge_type` error is returned if the user is not enrolled.
* If the user is not enrolled, you will get an `association_required` error, indicating the user needs to enroll to use MFA. Read [Add an authenticator](/multi-factor-authentication/add-an-authenticator) below on how to proceed.

### Learn More

* [Authenticate With Resource Owner Password Grant and MFA](https://auth0.com/docs/secure/multi-factor-authentication/authenticate-using-ropg-flow-with-mfa)
* [Manage Authenticator Factors using the MFA API](https://auth0.com/docs/secure/multi-factor-authentication/manage-mfa-auth0-apis/manage-authenticator-factors-mfa-api)

## Body Parameters

<ParamField body="mfa_token" type="string" required>
  The token received from mfa\_required error.
</ParamField>

<ParamField body="client_id" type="string" required>
  Your application's Client ID.
</ParamField>

<ParamField body="client_secret" type="string">
  Your application's Client Secret.
</ParamField>

<ParamField body="challenge_type" type="string">
  A whitespace-separated list of challenge types accepted by your application.

  Allowed values: `oob`, `otp`
</ParamField>

<ParamField body="client_assertion" type="string">
  A JWT containing a signed assertion with your application credentials.
</ParamField>

<ParamField body="client_assertion_type" type="string">
  The value is urn:ietf:params:oauth:client-assertion-type:jwt-bearer.
</ParamField>

<ParamField body="authenticator_id" type="string">
  The ID of the authenticator to challenge.
</ParamField>

## Response Schema

<ResponseSchema statusCode="200">
  <ResponseField name="challenge_type" type="string">
    The type of challenge this authenticator issues. Possible values: `otp`, `oob`.
  </ResponseField>

  <ResponseField name="oob_code" type="string">
    The code for the out-of-band challenge. Only present when `challenge_type` is `oob`.
  </ResponseField>

  <ResponseField name="binding_method" type="string">
    The method used for binding. Only present when applicable. Possible values: `prompt`.
  </ResponseField>
</ResponseSchema>

<ResponseSchema statusCode="400">
  <ResponseField name="error" type="string">
    Error code.
  </ResponseField>

  <ResponseField name="error_description" type="string">
    Detailed error description.
  </ResponseField>
</ResponseSchema>

## Response Messages

| Status | Description                                                                |
| ------ | -------------------------------------------------------------------------- |
| 200    | Challenge request successful                                               |
| 400    | Invalid request, such as unsupported challenge type or missing enrollment. |
