> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# チャレンジリクエスト

> トークン endpoint で認証を続行するための MFA チャレンジ（OTP または OOB）をリクエストします。

## エンドポイント

`POST /mfa/challenge`

Multi-factor Authentication (MFA) API のエンドポイントを使用すると、ユーザーが[トークンエンドポイント](#get-token)を利用する際に MFA を必須にできるほか、ユーザーの認証器の登録や管理も行えます。

まず、アプリケーションとユーザーがサポートしているチャレンジの種類に応じて、チャレンジをリクエストします。ワンタイムパスワード (OTP) がサポートされていることがわかっている場合は、このチャレンジリクエストを省略できます。

次に、`/oauth/token` エンドポイントと指定したチャレンジの種類 (ワンタイムパスワード (OTP)、リカバリーコード、または帯域外 (OOB) チャレンジ) を使用して、多要素認証を検証します。

詳しくは、次を参照してください。

* [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)

## チャレンジリクエスト

アプリケーションとユーザーでサポートされているチャレンジの種類に応じて、多要素認証 (MFA) のチャレンジをリクエストします。

`challenge_type` は、ユーザーがどのようにチャレンジを受け取り、所持していることを証明するかを指定します。サポートされているチャレンジの種類は次のとおりです。

* `otp`: ワンタイムパスワード (OTP)
* `oob`: SMS／音声メッセージ、または帯域外 (OOB)

ユーザーが OTP に対応していて、別の要素をリクエストする必要がない場合は、チャレンジリクエストを省略し、[ワンタイムパスワードを使って多要素認証を検証](#verify-with-one-time-password-otp-)できます。

### 注意事項

* このエンドポイントは登録をサポートしていません。チャレンジをリクエストする前に、ユーザーは希望する方法であらかじめ登録されている必要があります。
* Auth0 は、アプリケーションでサポートされている種類と、ユーザーが登録済みの種類に基づいて、チャレンジの種類を選択します。
* アプリケーションが、ユーザーが登録済みのチャレンジの種類をいずれもサポートしていない場合は、`unsupported_challenge_type` エラーが返されます。
* ユーザーが登録されていない場合は、`unsupported_challenge_type` エラーが返されます。
* ユーザーが登録されていない場合は、`association_required` エラーが返されます。これは、MFA を利用するにはユーザーの登録が必要であることを示します。進め方については、下記の [認証器を追加する](/docs/multi-factor-authentication/add-an-authenticator) を参照してください。

### 詳しく見る

* [Resource Owner Password Grant と MFA を使用して認証する](https://auth0.com/docs/secure/multi-factor-authentication/authenticate-using-ropg-flow-with-mfa)
* [MFA API で認証器要素を管理する](https://auth0.com/docs/secure/multi-factor-authentication/manage-mfa-auth0-apis/manage-authenticator-factors-mfa-api)

## Body パラメーター

**mfa\_token** `string` *required*

`mfa_required` エラーで受け取ったトークン。

**client\_id** `string` *required*

アプリケーションの Client ID。

**client\_secret** `string`

アプリケーションの Client Secret。

**challenge\_type** `string`

アプリケーションが受け入れるチャレンジの種類の空白区切りリスト。

指定可能な値: `oob`, `otp`

**client\_assertion** `string`

アプリケーションの認証情報で署名したアサーションを含む JWT。

**client\_assertion\_type** `string`

値は `urn:ietf:params:oauth:client-assertion-type:jwt-bearer` です。

**authenticator\_id** `string`

チャレンジ対象の認証器の ID。

## レスポンススキーマ

200

\{}

application/json

**challenge\_type** `string`

この認証器が発行するチャレンジの種類。指定可能な値: `otp`, `oob`。

**oob\_code** `string`

帯域外チャレンジのコード。`challenge_type` が `oob` の場合にのみ含まれます。

**binding\_method** `string`

バインドに使用される方式。該当する場合にのみ含まれます。指定可能な値: `prompt`。

400

\{}

application/json

**error** `string`

エラーコード。

**error\_description** `string`

エラーの詳細説明。

## 応答メッセージ

| Status | Description |
| - | - |
| 200 | チャレンジリクエストに成功しました |
| 400 | サポートされていないチャレンジの種類や登録情報の不足など、無効なリクエスト。 |
