> ## 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 エラーで取得したもの) 、および [http://auth0.com/oauth/grant-type/mfa-otp](http://auth0.com/oauth/grant-type/mfa-otp) に設定した grant\_type を含める必要があります。レスポンスは、password または [http://auth0.com/oauth/grant-type/password-realm](http://auth0.com/oauth/grant-type/password-realm) の grant type に対するレスポンスと同じです。詳しくは、[OTP 認証器を関連付ける](/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">
  ## Body パラメーター
</div>

<div className="prose-sm prose-gray dark:prose-invert">
  <span data-as="p">リクエスト本文は `application/x-www-form-urlencoded` 形式です。</span>
</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">
  アプリケーションの Client ID。
</ParamField>

<ParamField body="client_secret" type="string">
  アプリケーションの Client Secret。
</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>

| Status | Description                 |
| ------ | --------------------------- |
| 200    | OTPの検証に成功しました。              |
| 400    | パラメーター不足や無効なOTPなど、無効なリクエスト。 |
