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

# ワンタイムパスワード（OTP）で多要素認証を確認する

> ワンタイムパスワード（OTP）を使用して MFA を確認し、トークンリクエストを完了します。

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>;
};

<div id="endpoint">
  ## エンドポイント
</div>

`POST /oauth/token`

ワンタイムパスワード (OTP) を使用して多要素認証 (MFA) を確認します。OTP で MFA を確認するには、ユーザーに OTP コードを取得させてから、`/oauth/token` エンドポイントにリクエストを送信します。リクエストには、OTP コード、受け取った `mfa_token` (`mfa_required` エラーから取得) 、および `grant_type` を [http://auth0.com/oauth/grant-type/mfa-otp](http://auth0.com/oauth/grant-type/mfa-otp) に設定したものを含める必要があります。レスポンスは、password または [http://auth0.com/oauth/grant-type/password-realm](http://auth0.com/oauth/grant-type/password-realm) グラントタイプのレスポンスと同じです。詳しくは、[OTP 認証器の関連付け](/ja/mfa/guides/mfa-api/otp) を参照してください。

<div id="learn-more">
  ### 詳細情報
</div>

* [OTP 認証器の関連付け](https://auth0.com/docs/mfa/guides/mfa-api/otp)

<div id="headers">
  ## ヘッダー
</div>

<ParamField header="DPoP" type="string">
  リクエストに対する DPoP 証明です。これは任意で、アプリケーションで Demonstrating Proof-of-Possession (所有証明) を使用している場合にのみ必要です。
</ParamField>

<div id="body-parameters">
  ## ボディパラメーター
</div>

<ParamField body="grant_type" type="string" required>
  使用するフローを示します。OTP MFA の場合は `http://auth0.com/oauth/grant-type/mfa-otp` を使用してください。
</ParamField>

<ParamField body="client_id" type="string">
  アプリケーションのクライアントID。
</ParamField>

<ParamField body="client_secret" type="string">
  アプリケーションのクライアントシークレット。
</ParamField>

<ParamField body="mfa_token" type="string" required>
  `mfa_required` エラーで受け取った `mfa_token`。
</ParamField>

<ParamField body="otp" type="string" required>
  ユーザーから提供された OTP コード。
</ParamField>

<ParamField body="client_assertion" type="string">
  アプリケーションの認証情報を使用した署名付きアサーションを含む JWT。
</ParamField>

<ParamField body="client_assertion_type" type="string">
  値は `urn:ietf:params:oauth:client-assertion-type:jwt-bearer` です。
</ParamField>

<div id="response-schema">
  ## レスポンススキーマ
</div>

<ResponseSchema>
  <ResponseField name="access_token" type="string">
    認証済みセッションのアクセストークン。
  </ResponseField>

  <ResponseField name="token_type" type="string">
    発行されるトークンの種類。
  </ResponseField>

  <ResponseField name="expires_in" type="integer">
    アクセストークンの有効期間 (秒単位) 。
  </ResponseField>
</ResponseSchema>

<div id="response-messages">
  ## レスポンスメッセージ
</div>

| ステータス | 説明                                |
| ----- | --------------------------------- |
| 200   | OTP の検証に成功しました。                   |
| 400   | パラメーターの不足や OTP が無効であるなど、無効なリクエスト。 |
